Ttelmah Guest
|
|
Posted: Sat Mar 17, 2007 4:12 am |
|
|
If you code a _single_high priority interrupt, using the 'fast' option, it gets jumped to directly from the 0008 high priority address, with no registers saved. All you do is code this as a 'high priority int_global', checking what the source actually was, and calling the required routines. This routine will use RETFIE 1, so the W register etc., are saved for you by the hardware, and all you have to do, is ensure that the individual routines save anything else they require, and clear their own interrupt flags.
Generally, if you need just one 'fast' interrupt, then the best way is just to code this as 'fast', and then check the assembler generated for the handler routine, and add any extra register saves/restores needed.
Beware of the 'caveat' that in general, if high priority interrupts are used, INT_EXT, will always be 'high priority', so even if you only 'want' one high priority interrupt, you may well end up with two... :(
Best Wishes |
|