A couple of lines got left off. The basic flow is:
---------------------------------------------------------------------
DEFINE INTHAND IntSerial
(Setup main registers)
wsave VAR BYTE bankA system
ssave VAR BYTE bankA system
fsave VAR WORD bankA system
(Define other variables)
GOTO START
************** ISR STARTS HERE *************
asm
IntSerial
(Save W,STATUS,FSR0)
endasm
(BASIC PROGRAM to handle serial buffer, sets flag when carriage return received)
asm
(Restore W,STATUS,FSR0)
endasm
************ ISR ENDS HERE ***************
START:
(BASIC PROGRAM to handle buffer, do other things)
GOTO START
---------------------------------------------------------------
The program runs, but every once in awhile, I get odd port bits toggling.
Must I write my entire ISR in assembly, or can I keep it in BASIC as I am doing now?
Bookmarks