If you are saving all of the variables every time, in my book, it is not "superfast." That's a lot of unnecessary saving. The latency of saving every variable can throw a PIC RTC off by one count every interrupt. If you have a 32kHz watch crystal, you have to account for that or accept the loss in time.
But, that is what Basic is all about... not the fastest or most efficient code, but the simplest.
[edit adds this...]
For "superfast" interrupts, eliminate all "system" variables in the interrupt so you don't have to save them. If you must use basic commands that require system variables, you can do this by duplicating the subroutines using unique variable names. Then, your only concern is if you have multi-byte variables that are read and/or modified within both the interrupt and the non-interrupt code.
...and even then, you can use a byte variable to set a flag, so you don't have the multi-byte reads and/or modifications...
Bookmarks