
Originally Posted by
Bill Legge
I guess I could create two BYTES to hold the RAIN data and increment the 'higher' BYTE if there is a carry from the 'lower' - Seems a bit cumbersome and I was looking for a neater/easier way.
Simple addition or incrementing variables doesn't use the system registers.
So it's ok to break out of ASM and do it with PBP.
Code:
Rain VAR WORD
ASM
MyInt
;save context
;asm part here
ENDASM
Rain = Rain + 1
ASM
;more asm here
;restore context
retfie
ENDASM
Bookmarks