You do have PCLATH pointing to the Jump Table. But it doesn't take into account the Jump it makes FROM the table.I do use PCLATH for the table jump, so that should be fine. And my GOTO's should be fine so long as the entire ISR is in page0, right?
If _No_Change, _Decrement, _Increment or _Error end up on the other side of a boundary, it will jump to the wrong place.
As long as the entire ISR is in the same page (doesn't have to be page 0), then it won't have a problem.
The trick is knowing when there is a problem, which you can do easily by adding these lines to the end of the ISR ...
If the ISR ends up crossing a boundary, that will flag an error to let you know something needs to be moved.Code:retfie ; Return from interrupt if ((high($) & 18h) != (high(ISR) & 18h)) error ISR crosses page boundary endif ENDASM
HTH,




Bookmarks