( -*- forth -*- ) ( patch high address: hack: only works for addresses below 0x400: need to set pclath without touching wreg for speed ) ( computed goto ) : wjump, there 2 / 3 + >r ( word address >r ) PCLATH 0 r 0x100 and if bsf, else bcf, then PCLATH 1 r> 0x200 and if bsf, else bcf, then PCL addwf, f, ; : jumptos, push=w? if undo wjump, exit then INDF movf, drop, wjump, ; variable tablestart : tablemark there tablestart h! ; : tablecheck there tablestart h@ xor 0xff00 and if e-page then ; : terminator vector tablecheck ; : compiler vector jump, ; : route, jumptos, terminator compiler tablemark ; : (table), there 6 + call, ( call to table ) INDF movwf, f, ( store to tos ) exit, INDF movf, wjump, tablemark ; : compiler vector retlw, ; : table, (table), compiler terminator ;