TS2068 ROM Disassembly

See all articles from SINCUS v5 n5
           ;Handle a "cursor right"
; Identical to Spectrum at 100C

0B72 7E LD A,(HL) ;Get character
0B73 FE0D CP #0D ;ENTER character
0B75 C8 RET Z ;If already at end of line

0B76 23 INC HL ;Update cursor

0B77 225B5C L0B77 LD (K_CUR),HL ;Redo K_CUR
0B7A C9 RET

;Handle a "DELETE"
; Identical to Spectrum at 1015

0B7B CD970B CALL #0B97 ;Decrement cursor, unless at start
0B7E 010100 LD BC,#0001 ;One space
0B81 C35017 JP #1750 ;Reclaim the space

;Ignore the next 2 codes
; Identical to Spectrum at 101E

0B84 CDCF11 CALL #11CF ;Wait for a key
0B87 CDCF11 CALL #11CF ;Again

;Handle an "ENTER"
; Identical to Spectrum at 1024

0B8A E1 L0B8A POP HL ;Trash the RETurn to #0A8E
0B8B E1 POP HL ;Trash the RETurn to #0BE5

0B8C E1 L0B8C POP HL
0B8D 223D5C LD (ERR_SP),HL ;Restore old value
0B90 FDCB007E BIT 7,(IY+0) ;ERR_NR
0B94 C0 RET NZ ;If no errors

0B95 F9 LD SP,HL ;Otherwise, jump to error routine
0B96 C9 RET ;Effective JP

;Used in deleting. Moves the cursor 1 space left, unless we're
; already at the beginning of a line
; Identical to Spectrum at 1031

0B97 37 SCF
0B98 CDFB0C CALL #0CFB ;Put value in DE. E_LINE for editing,
; or WORKSP for INPUT mode
0B9B ED52 SBC HL,DE
0B9D 19 ADD HL,DE
0B9E 23 INC HL
0B9F C1 POP BC ;Trash return address
0BA0 D8 RET C ;So RETurn is to #0A8E

0BA1 C5 PUSH BC ;Restore RETurn address
0BA2 44 LD B,H
0BA3 4D LD C,L ;Cursor address

;This keeps control characters & their follow up bytes together
; during deletion
0BA4 62 L0BA4 LD H,D
0BA5 6B LD L,E
0BA6 23 INC HL
0BA7 1A LD A,(DE)
0BA8 E6F0 AND #F0
0BAA FE10 CP #10
0BAC 2009 JR NZ,L0BB7

0BAE 23 INC HL
0BAF 1A LD A,(DE)
0BB0 D617 SUB #17
0BB2 CE00 ADC A,#00
0BB4 2001 JR NZ,L0BB7

0BB6 23 INC HL

0BB7 A7 L0BB7 AND A
0BB8 ED42 SBC HL,BC
0BBA 09 ADD HL,BC
0BBB EB EX DE,HL
0BBC 38E6 JR C,L0BA4

0BBE C9 RET

;Handle a "cursor up"
; Identical to Spectrum at 1059

0BBF FDCB376E BIT 5,(IY+55) ;FLAG_X
0BC3 C0 RET NZ ;If in INPUT mode

0BC4 2A495C LD HL,(E_PPC) ;Line number
0BC7 CDD616 CALL #16D6 ;Get its address
0BCA EB EX DE,HL ;Point to previous line
0BCB CD2413 CALL #1324 ;Get line #
0BCE 214A5C LD HL,#5C4A ;E_PPC - hi byte
0BD1 CD6816 CALL #1668 ;Store the number

0BD4 CDE114 L0BD4 CALL #14E1 ;Do an automatic listing
0BD7 3E00 LD A,#00 ;Stream 0 for channel "K"
0BD9 C33012 JP #1230 ;Make it current channel

;For symbol shift & graphics
; Identical to Spectrum at 1076

0BDC FDCB377E BIT 7,(IY+55) ;FLAG_X - for INPUT ... LINE ...
0BE0 28A8 JR Z,L0B8A ;If not

0BE2 C3E70A JP #0AE7 ;If we are

;Handle an editing error and make the TS2068 honk at the
; errant programmer
; Identical to Spectrum at 107F

0BE5 FDCB3066 BIT 4,(IY+48) ;FLAGS2
0BE9 28A1 JR Z,L0B8C ;If not using channel "K"

0BEB FD3600FF LD (IY+0),#FF ;ERR_NR - no error
0BEF 1600 LD D,#00
0BF1 FD5EFE LD E,(IY-2) ;RASP
0BF4 21901A LD HL,#1A90 ;Pitch
0BF7 CDF303 CALL #03F3 ;BEEP the raspberry
0BFA C3860A JP #0A86 ;Back to the editor

;Clear edit area or workspace (depending on mode)
; Identical to Spectrum at 1097

0BFD E5 PUSH HL
0BFE CDF60C CALL #0CF6 ;Point DE & HL to proper spaces
0C01 2B DEC HL
0C02 CD4D17 CALL #174D ;Close up the space
0C05 225B5C LD (K_CUR),HL
0C08 FD360700 LD (IY+7),#00 ;MODE - K mode
0C0C E1 POP HL
0C0D C9 RET

;Input a key & handle mode switching & caps lock
; Identical to Spectrum at 10A8

0C0E FDCB025E BIT 3,(IY+2) ;TV_FLAG
0C12 C4830C CALL NZ,#0C83 ;Copy line to lower screen
0C15 A7 AND A ;CY=0
0C16 FDCB016E BIT 5,(IY+1) ;FLAGS
0C1A C8 RET Z ;If no key was pressed

0C1B 3A085C LD A,(LAST_K)
0C1E FDCB01AE RES 5,(IY+1) ;FLAGS
0C22 F5 PUSH AF
0C23 FDCB026E BIT 5,(IY+2) ;TV_FLAG
0C27 C4A908 CALL NZ,#08A9 ;Clear lower screen
0C2A F1 POP AF
0C2B FE20 CP #20
0C2D 3052 JR NC,L0C81 ;Printable character or token

0C2F FE10 CP #10
0C31 302D JR NC,L0C60 ;Some control codes

0C33 FE06 CP #06
0C35 300A JR NC,L0C41 ;Mode & CAPS LOCK codes


;FLASH, BRIGHT & INVERSE
0C37 47 LD B,A
0C38 E601 AND #01
0C3A 4F LD C,A
0C3B 78 LD A,B
0C3C 1F RRA
0C3D C612 ADD A,#12
0C3F 182A JR L0C6B

;Mode & CAPS LOCK codes
0C41 2009 L0C41 JR NZ,L0C4C

0C43 216A5C LD HL,FLAGS2
0C46 3E08 LD A,#08
0C48 AE XOR (HL)
0C49 77 LD (HL),A
0C4A 180E JR L0C5A

0C4C FE0E L0C4C CP #0E
0C4E D8 RET C

0C4F D60D SUB #0D
0C51 21415C LD HL,MODE
0C54 BE CP (HL)
0C55 77 LD (HL),A
0C56 2002 JR NZ,L0C5A

0C58 3600 LD (HL),#00
0C5A FDCB02DE L0C5A SET 3,(IY+2) ;TV_FLAG
0C5E BF CP A
0C5F C9 RET

;The rest of the control codes
0C60 47 L0C60 LD B,A
0C61 E607 AND #07
0C63 4F LD C,A
0C64 3E10 LD A,#10
0C66 CB58 BIT 3,B
0C68 2001 JR NZ,L0C6B

0C6A 3C INC A

0C6B FD71D3 L0C6B LD (IY-45),C ;K_DATA
0C6E 11730C LD DE,#0C73
0C71 1806 JR L0C79

0C73 3A0D5C LD A,(K_DATA)
0C76 110E0C LD DE,#0C0E ;Jump address

0C79 2A4F5C L0C79 LD HL,(CHANS)
0C7C 23 INC HL
0C7D 23 INC HL
0C7E 73 LD (HL),E
0C7F 23 INC HL
0C80 72 LD (HL),D

0C81 37 L0C81 SCF
0C82 C9 RET

;Copy line in INPUT or EDIT area into edit line on screen
; Identical to Spectrum at 111D

0C83 CD8808 CALL #0888 ;Use permanent colors
0C86 FDCB029E RES 3,(IY+2) ;TV_FLAG
0C8A FDCB02AE RES 5,(IY+2) ;TV_FLAG
0C8E 2A8A5C LD HL,(SPOSNL)
0C91 E5 PUSH HL
0C92 2A3D5C LD HL,(ERR_SP)
0C95 E5 PUSH HL
0C96 21CD0C LD HL,#0CCD ;A JP address
0C99 E5 PUSH HL
0C9A ED733D5C LD (ERR_SP),SP
0C9E 2A825C LD HL,(ECHO_E)
0CA1 E5 PUSH HL
0CA2 37 SCF
0CA3 CDFB0C CALL #0CFB ;Point HL to start & DE to end of space
0CA6 EB EX DE,HL
0CA7 CDC915 CALL #15C9 ;Print the line
0CAA EB EX DE,HL
0CAB CD2D16 CALL #162D ;Print the cursor
0CAE 2A8A5C LD HL,(SPOSNL)
0CB1 E3 EX (SP),HL
0CB2 EB EX DE,HL
0CB3 CD8808 CALL #0888 ;Use permanent colors

0CB6 3A8B5C L0CB6 LD A,(SPOSNL + 1) ;hi-byte - line number
0CB9 92 SUB D
0CBA 3826 JR C,L0CE2

0CBC 2006 JR NZ,L0CC4

0CBE 7B LD A,E
0CBF FD9650 SUB (IY+80) ;S_POSN - lo byte - column
0CC2 301E JR NC,L0CE2

0CC4 3E20 L0CC4 LD A,#20 ;An ASCII space
0CC6 D5 PUSH DE
0CC7 CD0005 CALL #0500 ;Print the space
0CCA D1 POP DE
0CCB 18E9 JR L0CB6

;Handle edit errors
0CCD 1600 LD D,#00
0CCF FD5EFE LD E,(IY-2) ;RASP
0CD2 21901A LD HL,#1A90 ;Pitch
0CD5 CDF303 CALL #03F3 ;BEEP routine
0CD8 FD3600FF LD (IY+0),#FF ;ERR_NR - cancel any error
0CDC ED5B8A5C LD DE,(SPOSNL)
0CE0 1802 JR L0CE4

;Normal exit
0CE2 D1 L0CE2 POP DE
0CE3 E1 POP HL

;Error exit from here
0CE4 E1 L0CE4 POP HL
0CE5 223D5C LD (ERR_SP),HL
0CE8 C1 POP BC
0CE9 D5 PUSH DE
0CEA CD1409 CALL #0914 ;Save pointers
0CED E1 POP HL
0CEE 22825C LD (ECHO_E),HL
0CF1 FD362600 LD (IY+38),#00
0CF5 C9 RET

;Set HL=address of first byte, DE=last byte of work or edit spa[illegible]
; Identical to Spectrum at 1190

0CF6 2A615C LD HL,(WORKSP)
0CF9 2B DEC HL
0CFA A7 AND A

0CFB ED5B595C LD DE,(E_LINE)
0CFF FDCB376E BIT 5,(IY+55)
0D03 C8 RET Z

0D04 ED5B615C LD DE,(WORKSP)
0D08 D8 RET C

0D09 2A635C LD HL,(STKBOT)
0D0C C9 RET

;Remove the extra floating point garbage from a BASIC line
; Identical to Spectrum at 11A7

0D0D 7E L0D0D LD A,(HL)
0D0E FE0E CP #0E ;Number slug character
0D10 010600 LD BC,#0006 ;5 bytes for number + 1 for slug
0D13 CC5017 CALL Z,#1750 ;Reclaim the space
0D16 7E LD A,(HL)
0D17 23 INC HL
0D18 FE0D CP #0D ;ENTER character
0D1A 20F1 JR NZ,L0D0D ;Loop again if not at end of line

0D1C C9 RET


;####################################
;# The Top Level Executive Portion #
;####################################

;NEW handler
; Similar to Spectrum at 11B7

0D1D F3 DI
0D1E 3EFF LD A,#FF ;NEW - not power up
0D20 ED5BB25C LD DE,(RAMTOP)
0D24 D9 EXX
0D25 ED4BB45C LD BC,(P_RAMT)
0D29 ED5B385C LD DE,(RASP)
0D2D 2A7B5C LD HL,(UDG)
0D30 D9 EXX ;Put 'em where NEW can't get 'em

;Enter here at Power Up
0D31 47 LD B,A ;Save the NEW/Power Up flag
0D32 3E07 LD A,#07
0D34 D3FE OUT (#FE),A ;White border
0D36 3E3F LD A,#3F ;So Refresh cycles "point" to ROM
; (it's useful when debugging the hardware)
0D38 ED47 LD I,A
0D3A 00 NOP
0D3B 00 NOP ;These cause extra M1 cycles (hence
0D3C 00 NOP ; extra refresh cycles) before RAM is
0D3D 00 NOP ; used at power up. This is a Z-80
0D3E 00 NOP ; hardware requirement.
0D3F 00 NOP
;The RAM check
0D40 62 LD H,D
0D41 6B LD L,E
0D42 3602 L0D42 LD (HL),#02
0D44 2B DEC HL
0D45 BC CP H
0D46 20FA JR NZ,L0D42

0D48 A7 L0D48 AND A
0D49 ED52 SBC HL,DE
0D4B 19 ADD HL,DE
0D4C 23 INC HL
0D4D 3006 JR NC,L0D55

0D4F 35 DEC (HL)
0D50 2803 JR Z,L0D55

0D52 35 DEC (HL)
0D53 28F3 JR Z,L0D48

0D55 2B L0D55 DEC HL

;Restore system variables that NEW mustn't wipe out
0D56 D9 EXX
0D57 ED43B45C LD (P_RAMT),BC
0D5B ED53385C LD (RASP),DE
0D5F 227B5C LD (UDG),HL
0D62 D9 EXX
0D63 04 INC B
0D64 2819 JR Z,L0D7F ;If doing a NEW

;Here if Power On or RESET
0D66 22B45C LD (P_RAMT),HL
0D69 11AF3E LD DE,#3EAF
0D6C 01A800 LD BC,#00A8
0D6F EB EX DE,HL
0D70 EDB8 LDDR
0D72 EB EX DE,HL
0D73 23 INC HL
0D74 227B5C LD (UDG),HL
0D77 2B DEC HL
0D78 014000 LD BC,#0040
0D7B ED43385C LD (RASP),BC

;Jump ahead here when doing a NEW
0D7F 22B25C L0D7F LD (RAMTOP),HL
0D82 21003C LD HL,#3C00
0D85 22365C LD (CHARS),HL
0D88 210062 LD HL,#6200 ;The first location above the stack
0D8B 22C05C LD (MSTBOT),HL
0D8E 2B DEC HL
0D8F 363E LD (HL),#3E ;The last stack entry is 3E00. This
0D91 2B DEC HL ; represents an "impossible" line
0D92 F9 LD SP,HL ; number.
0D93 2B DEC HL
0D94 2B DEC HL
0D95 223D5C LD (ERR_SP),HL
0D98 ED56 IM 1
0D9A 00 NOP ;Spectrum has an EI around here
0D9B FD213A5C LD IY,ERR_NR

;Set up the initial Channels
0D9F 214068 LD HL,#6840
0DA2 224F5C LD (CHANS),HL
0DA5 11AA11 LD DE,#11AA
0DA8 011500 LD BC,#0015
0DAB EB EX DE,HL
0DAC EDB0 LDIR
0DAE EB EX DE,HL

;Some of the system variable initialization from the Spectrum
; removed from here, & put in the EXROM. This would allow
; expansion banks to add channels without having to do a lot
; mucking about with the memory layout
0DAF 3E38 LD A,#38
0DB1 328D5C LD (ATTR_P),A
0DB4 328F5C LD (ATTR_T),A
0DB7 32485C LD (BORDCR),A
0DBA 212305 LD HL,#0523
0DBD 22095C LD (REPDEL),HL
0DC0 FD35C6 DEC (IY-58) ;K_STATE gets #FF
0DC3 FD35CA DEC (IY-54) ;K_STATE + 4 gets #FF

;Set up the initial streams
0DC6 21C111 LD HL,#11C1
0DC9 11105C LD DE,STRMS
0DCC 010E00 LD BC,#000E
0DCF EDB0 LDIR

;Standard video mode (TS2068 only)
0DD1 AF XOR A
0DD2 D3FF OUT (#FF),A

;Clear printer buffer
0DD4 FDCB01CE SET 1,(IY+1) ;FLAGS - printer in use
0DD8 CD350A CALL #0A35 ;Clear print buffer

0DDB FD363102 LD (IY+49),#02 ;DF_SZ - Edit line = 2 lines
0DDF CDA608 CALL #08A6 ;Clear screen
0DE2 AF XOR A
0DE3 FDCB01E6 SET 4,(IY+1) ;FLAGS (TS2068 only)

;Print copyright messages
0DE7 111711 LD DE,#1117 ;Address of copyright message
0DEA CD3F07 CALL #073F ;Print it
0DED FDCB02EE SET 5,(IY+2) ;TV_FLAG - Edit line to be cleared

;Move the code that will copy RAM resident code from EXROM to[illegible]
; We can't copy EXROM directly from Home ROM, because we have[illegible]
; switch the ROM out to do so.
0DF1 210B0E LD HL,#0E0B
0DF4 110060 LD DE,#6000
0DF7 011D00 LD BC,#001D
0DFA EDB0 LDIR

;This causes the code to be copied
0DFC CD0060 CALL #6000

;Set up BS_SP, the Bank Switching stack pointer
0DFF 21CE65 LD HL,#65CE
0E02 22CE65 LD (#65CE),HL

;This effectively does a JP (not CALL) to X08E7 (EXROM addres[illegible]
; This checks for additional memory and finishes initializing
; system variables. In the absence of activity from additiona[illegible]
; banks, control will then be passed to 0E2F, in the Main Lo[illegible]
0E05 21E708 LD HL,#08E7
0E08 CD1568 CALL #6815 ;GOTO_EXT - goto X08E7


;This code is copied to location 6000. It in turn copies the RAM
; Resident code from EXROM to 6200
; This code has no Spectrum counterpart

0E0B 3E01 LD A,#01
0E0D D3F4 OUT (#F4),A
0E0F DBFF IN A,(#FF)
0E11 CBFF SET 7,A
0E13 D3FF OUT (#FF),A ;EXROM is switched in, at this point
0E15 210010 LD HL,#1000
0E18 110062 LD DE,#6200
0E1B 013006 LD BC,#0630
0E1E EDB0 LDIR ;Code is copied, here
0E20 CBBF RES 7,A
0E22 D3FF OUT (#FF),A
0E24 AF XOR A
0E25 D3F4 OUT (#F4),A ;Home ROM is switched back in, now
0E27 C9 RET

;The Main Execution Loop. Reads & handles BASIC lines and
; commands that are typed into the edit line

0E28 FD363102 L0E28 LD (IY+49),#02 ;DF_SZ
0E2C CDE114 CALL #14E1 ;Do an auto listing

;Enter here from initialization or NEW
0E2F CD3F13 CALL #133F ;Empty the workspaces

0E32 3E00 L0E32 LD A,#00
0E34 CD3012 CALL #1230 ;OPEN "K" channel
0E37 CD820A CALL #0A82 ;Line input
0E3A CD271A CALL #1A27 ;Syntax check
0E3D FDCB007E BIT 7,(IY+0) ;ERR_NR
0E41 2012 JR NZ,L0E55 ;Jump if syntax is OK

0E43 FDCB3066 BIT 4,(IY+48) ;FLAGS2
0E47 2844 JR Z,L0E8D ;If not using channel K

0E49 2A595C LD HL,(E_LINE) ;Point to start of bad line
0E4C CD0D0D CALL #0D0D ;Wipe the floating point trash
0E4F FD3600FF LD (IY+0),#FF ;Wipe the error code
0E33 18DD JR L0E32 ;...and give the programmer another try

;Here if syntax OK. Now check for a line number
0E55 2A595C L0E55 LD HL,(E_LINE) ;Start of line
0E58 225D5C LD (CH_ADD),HL
0E5B CD6817 CALL #1768 ;Get line # into BC, if it exists
0E5E 78 LD A,B
0E5F B1 OR C ;If a legal one exists, then jump
0E60 C25811 JP NZ,#1158 ; and add it to the program

0E63 DF RST #18 ;Check first character
0E64 FE0D CP #0D
0E66 28C0 JR Z,L0E28 ;Jump if it's only an ENTER

;Here if it's a command (no line number)
0E68 FDCB3046 BIT 0,(IY+48) ;FLAGS2
0E6C C4EA08 CALL NZ,#08EA ;Clear screen, if appropriate
0E6F CDA908 CALL #08A9 ;Always clear edit line
0E72 3E19 LD A,#19
0E74 FD964F SUB (IY+79) ;S_POSN - hi byte
0E77 328C5C LD (SCR_CT),A ;Set up scroll count
0E7A FDCB01FE SET 7,(IY+1) ;FLAGS - Signal "line execute"
0E7E FD3600FF LD (IY+0),#FF ;ERR_NR - No error
0E82 FD360A01 LD (IY+10),#01 ;NSPPC - run the first statement
0E86 FD367C00 LD (IY+124),#00 ;ERRLN - ON ERROR GOTO 0
0E8A CDD81A CALL #1AD8 ;RUN the line

;The address of this instruction is pointed to by ERR_SP
0E8D 76 L0E8D HALT

;A lengthy addition for the TS2068
0E8E FD7E00 LD A,(IY+0) ;ERR_NR
0E91 FEFF CP #FF
0E93 2833 JR Z,L0EC8 ;If ERR_NR shows no error

0E95 FDCB7D7E BIT 7,(IY+125) ;ERR_LN - hi byte
0E99 282D JR Z,L0EC8
0E9B FDCB7DF6 SET 6,(IY+125) ;ERR_LN - hi byte
0E9F 3C INC A ;Produce "proper" error code
0EA0 32BB5C LD (ERRT),A
0EA3 FD3600FF LD (IY+0),#FF ;Wipe the error
0EA7 2A455C LD HL,(PPC)
0EAA 22B85C LD (ERRC),HL ;Save the line where error occurr[illegible]
0EAD 3A475C LD A,(SUBPPC)
0EB0 32BA5C LD (ERRS),A ; Save statement where error occur[illegible]
0EB3 2AB65C LD HL,(ERRLN)
0EB6 CBBC RES 7,H ;
0EB8 CBB4 RES 6,H ;reset ERR_LN flags
0EBA 22425C LD (NEWPPC),HL ;Line to be jumped to
0EBD FD360A01 LD (IY+10),#01 ;Jump to statement 1 of the line
0EC1 218D0E LD HL,#0E8D
0EC4 E5 PUSH HL ;Preload stack with return to 0E8[illegible]
0EC5 C3B91A JP #1AB9 ;Do a "statement return"

;Here if no error
0EC8 3E07 L0EC8 LD A,#07
0ECA D3F5 OUT (#F5),A
0ECC 3EFF LD A,#FF
0ECE D3F6 OUT (#F6),A ;Initialize sound chip
0ED0 FDCB029E RES 3,(IY+2) ;TV_FLAG - fix input cursor error

;Here's where the Spectrum version resumes
0ED4 FDCB01AE RES 5,(IY+1) ;FLAGS - ready for new key
0ED8 FDCB304E BIT 1,(IY+48) ;FLAGS2
0EDC C4230A CALL NZ,#0A23 ;Dump print buffer, if there's i[illegible]
0EDF 3A3A5C LD A,(ERR_NR)
0EE2 3C INC A

0EE3 F5 PUSH AF ;Save "proper" error number

;Reset some system variables
0EE4 210000 LD HL,#0000
0EE7 FD7437 LD (IY+55),H ;FLAGX
0EEA FD7426 LD (IY+38),H ;X_PTR, high byte
0EED 220B5C LD (DEFADD),HL
0EF0 210100 LD HL,#0001
0EF3 22165C LD (STRMS +6),HL ;Stream 0 gets channel K
0EF6 CD3F13 CALL #133F ;Empty workspaces
0EF9 FDCB37AE RES 5,(IY+55) ;Edit mode
0EFD CDA908 CALL #08A9 ;Clear edit line
0F00 FDCB02EE SET 5,(IY+2) ;TV_FLAG - for clearing edit li[illegible]
0F04 F1 POP AF ;Error number
0F05 47 LD B,A
0F06 FE0A CP #0A
0F08 3802 JR C,L0F0C ;Jump for reports 0-9

0F0A C607 ADD A,#07 ;Convert to ASCII letter

0F0C CDEA11 L0F0C CALL #11EA ;Print error code
0F0F 3E20 LD A,#20
0F11 D7 RST #10 ;Print a space
0F12 78 LD A,B ;Error number
0F13 11650F LD DE,#0F65 ;Address of message table
0F16 CD3F07 CALL #073F ;Print the message
0F19 AF XOR A
0F1A 111511 LD DE,#1115 ;Address of the " ," string
0F1D CD3F07 CALL #073F ;Print it
0F20 ED4B455C LD BC,(PPC) ;Line number
0F24 CD8817 CALL #1788 ;Print it
0F27 3E3A LD A,":"
0F29 D7 RST #10 ;Print it
0F2A FD4E0D LD C,(IY+13) ;SUBPPC = statement number
0F2D 0600 LD B,#00
0F2F CD8817 CALL #1788 ;Print it
0F32 CDFD0B CALL #0BFD ;Clear edit area
0F35 3A3A5C LD A,(ERR_NR)
0F38 3C INC A
0F39 281B JR Z,L0F56 ;If "error message" is "OK"

0F3B FE09 CP #09
0F3D 2804 JR Z,L0F43 ;If "error" was a STOP statem[illegible]

0F3F FE15 CP #15
0F41 2003 JR NZ,L0F46 ;If "error" was a BREAK

0F43 FD340D L0F43 INC (IY+13) ;SUBPPC