             ;******* Trap handler 
             oldIR:   .EQUATE 9          ;Stack address of IR on trap 
             ; 
FC9B  C80000 trap:    LDX     0,i        ;Clear X for a byte compare 
FC9E  DB0009          LDBYTEX oldIR,s    ;X := trapped IR 
FCA1  B80028          CPX     0x0028,i   ;If X >= first nonunary trap opcode 
FCA4  0EFCB7          BRGE    nonUnary   ;trap opcode is nonunary 
             ; 
FCA7  980003 unary:   ANDX    0x0003,i   ;Mask out all but rightmost two bits 
FCAA  1D              ASLX               ;An address is two bytes 
FCAB  17FCAF          CALL    unaryJT,x  ;Call unary trap routine 
FCAE  01              RETTR              ;Return from trap 
             ; 
FCAF  FDB6   unaryJT: .ADDRSS opcode24   ;Address of NOP0 subroutine 
FCB1  FDB7            .ADDRSS opcode25   ;Address of NOP1 subroutine 
FCB3  FDB8            .ADDRSS opcode26   ;Address of NOP2 subroutine 
FCB5  FDB9            .ADDRSS opcode27   ;Address of NOP3 subroutine 
             ; 
FCB7  1F     nonUnary:ASRX               ;Trap opcode is nonunary 
FCB8  1F              ASRX               ;Discard addressing mode bits 
FCB9  1F              ASRX               
FCBA  880005          SUBX    5,i        ;Adjust so that NOP opcode = 0 
FCBD  1D              ASLX               ;An address is two bytes 
FCBE  17FCC2          CALL    nonUnJT,x  ;Call nonunary trap routine 
FCC1  01     return:  RETTR              ;Return from trap 
             ; 
FCC2  FDBA   nonUnJT: .ADDRSS opcode28   ;Address of NOP subroutine 
FCC4  FDC4            .ADDRSS opcode30   ;Address of DECI subroutine 
FCC6  FF3B            .ADDRSS opcode38   ;Address of DECO subroutine 
FCC8  FFC6            .ADDRSS opcode40   ;Address of STRO subroutine 
