Hi Joe,

Thanks for the reply. In your asm ISR I find that you clear the int flag defined not by PICBASIC. You are directly handling a RAM location defined earlier by you. Another thing that is unclear to me is that when PBP defines a word does it put the higher and lower byte in consecutive location and in the same bank. I am not confident in handling RAM bank switching. Although I am trying to get familiar. I successfully called (a.k.a. call)a picbasic subroutine from within an asm ISR routine to test conditions and take action. I got the idea from the asm file generated by PBP where a sub-routine ends with the "return" statement. (The same for assembly too). My application is time sensitive and I do a little bit multitasking.(I seggregate jobs in different time frame). For example I generate an int. every mili second. Count the mili second to 9 (for e.g.) and use a select case within the main body to do different things at different time. Your and others thoughts on this regards is most most welcome.
Regards
Sougata