ASEG ORG 5000H SPSTOR: NOP ; SP saved here. NOP UPSTOR: NOP ; UP saved here NOP FROM00: PUSH HL ; Vector C7 here. LD HL,00C1H JR USRSTK FROM08: PUSH HL ; Vector CF here. LD HL,00C5H JR USRSTK FROM10: PUSH HL ; Vector D7 here. LD HL,0E1DDH JR USRSTK FROM18: PUSH HL ; Vector DF here. LD HL,0E5DDH JR USRSTK FROM20: PUSH HL ; Vector E7 here. LD HL,00E1H JR USRSTK FROM28: PUSH HL ; Vector EF here. LD HL,00E5H JR USRSTK FROM30: PUSH HL ; Vector F7 here. LD HL,0E1FDH JR USRSTK FROM38: PUSH HL ; Vector FF here. LD HL,0E5FDH USRSTK: LD (OPSTOR),HL ; Place in OPSTOR. POP HL LD (SPSTOR),SP ; Save the SP. LD SP,(UPSTOR) ; Initialize User Stack. OPSTOR: NOP ; Event happens here. NOP LD (UPSTOR),SP ; Save the UP. LD SP,(SPSTOR) ; Restore the SP. RET ; Back the program END