OS EQU 00000H L00CC EQU 000CCH L00CE EQU 000CEH L00D8 EQU 000D8H L00D9 EQU 000D9H IOERR EQU 000D0H CBREAK EQU 000DDH PRSTR EQU 00200H CONSTS EQU 00316H CONIN EQU 00320H IOVECT EQU 0037AH PRADR EQU 004AFH PRHEX EQU 004B4H MENU EQU 0278EH ORG 01FF1H IORESULT: ;01FF1H LD HL,IOERR ;000D0H LD A,(HL) LD (HL),0 LD L,A LD H,0 RET CTRLC: ;01FFBH CALL CONSTS ;00316H LD A,H OR L RET Z LD A,(CBREAK) ;000DDH PUSH AF XOR A LD (CBREAK),A ;000DDH CALL CONIN ;00320H POP AF LD (CBREAK),A ;000DDH LD A,L CP 3 RET NZ POP IX L2016: ;02016H LD DE,1 JR L202C ;0202CH IOERROR: ;0201BH LD A,(IOERR) ;000D0H OR A RET Z POP IX LD E,A LD D,1 JR L202C ;0202CH L2027: ;02027H POP IX L2029: ;02029H LD E,A LD D,2 L202C: ;0202CH PUSH DE CALL IOVECT ;0037AH POP DE XOR A LD (CBREAK),A ;000DDH LD HL,(L00CE) ;000CEH LD A,H OR L PUSH IX POP HL LD BC,(L00CC) ;000CCH SBC HL,BC LD BC,15H ADD HL,BC LD (L00CE),HL ;000CEH OR A JR NZ,L2054 ;02054H PUSH DE PUSH DE PUSH HL CALL L00D9 ;000D9H POP DE L2054: ;02054H LD A,D OR A JR NZ,L206C ;0206CH USERBRK: ;02058H CALL PRSTR ;00200H DB '^C',0DH,0AH DB 'User break',0 JR PRPC ;02097H L206C: ;0206CH DEC A JR NZ,RUNERROR ;0207AH CALL PRSTR ;00200H DB 0DH,0AH,'I/O',0 JR PRERROR ;02088H RUNERROR: ;0207AH CALL PRSTR ;00200H DB 0DH,0AH,'Run-time',0 PRERROR: ;02088H CALL PRSTR ;00200H DB ' error ',0 LD A,E CALL PRHEX ;004B4H PRPC: ;02097H CALL PRSTR ;00200H DB ', PC=',0 LD HL,(L00CE) ;000CEH CALL PRADR ;004AFH JR L20BD ;020BDH L20A8: CALL PRSTR ;00200H DB 'Not enough memory',0 L20BD: CALL PRSTR ;00200H DB 0DH,0AH,'Program aborted',0 HALT: ;020D4H LD A,(L00D8) ;000D8H OR A JP Z,MENU ;0278EH JP OS ;00000H ;020DEH ; ...etc