Bill,
I should also add, that there are many things you can do at the ASM level, that still use Basic Language statements. The only difference being, you can only use statements that don't use PBP system variables.
For instance, the original program will work perfect on a 12F675 if you remove the ReEnterPBP.bas include file, and change the interrupt "Type" to ASM. (comment wsave's too) Then there will be plenty of RAM left for the main program
Code:
LED1 VAR GPIO.1
INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT_INT, _ToggleLED1, ASM, yes
endm
INT_CREATE ; Creates the interrupt processor
INT_ENABLE INT_INT ; enable external (INT) interrupts
ENDASM
Main:
PAUSE 1
GOTO Main
'---[INT - interrupt handler]---------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURN
It works because the TOGGLE statement doesn't use any PBP system variables.
You can toggle or set the state of any pins ...
Assign values to variables A = B, as long as they're not array's.
Add or subtract variables. But not mult/divide, and no complex formulas.
You can use IF = THEN's, as long as you don't use AND/OR with multiple conditions.
Some day I'll make a full list, but if there's something specific you need to do, I'll help weed out the things that won't work.
I'm positive DT_INTS can do what you're looking for.
<br>
Bookmarks