Disassembly for CPC firmware with comments

This list represent everything that is happening on CPC.
; Disassembly of the CPC464 operating system ROM
;
; Generated with Disark http://julien-nevo.com/disark/
; Reformatted using Thonny Python scripts
; Finished by hand, eye and experience
; Richard Lloyd, May 2021
;
; Version 1, June 2021
;
; The following resources were used during the creation of this file. The contribution is gratefully acknowledged.
; http://julien-nevo.com/disark/
; www.cpctech.org.uk
; ROM-Listing CPC 464/664/6128, Jorn W Janneck, Till Mossakowski, 1986
;
; Some conventions have been used to aid searching for particular routines.
; EMS marks beginning/end of the sections in the startup routine
; Most firmware routines are prefixed with a 'pack' followed by the firmware name with underscores instead of spaces
; e. g. KL_U_ROM_ENABLE, TXT_OUTPUT, SOUND_CONTINUE
; The low kernel jumpblock and indirections use a colon after the pack.
; Indirections also have an entry without the pack/colon prefix
; e. g. LOW:USER_RESTART, IND:MC_WAIT_PRINTER, MC_WAIT_PRINTER
; Comments have been added at every known routine entry point. Comments for individual lines of code will
; be added as and when I need to understand a routine.
; The routines for floating point and integer maths used by BASIC are yet to be fully documented.
; However, they are all labelled with FLO and INT as appropriate
; Some parts of this ROM are copied into RAM (particularly during EMS)
; Where this happens, the entry is labelled with -> indicating source and destination
; Sometimes, extra bytes are added. e.g. &CF or &EF to the address table starting at &08AC
; Hex addresses are sometimes prefixed with & and sometimes # - sorry! Will be fixed at some point.
; The assembly language is intended for the MAXAM assembler. Remove the first 17 characters of every non-comment line
; to create a file ready for re-assembly
;
; If you spot an error, please be kind - just let me know.
;
; Columns
;1, 6, 18, 28, 48
;
org #0
; Start of Low Kernel Jumpblock in ROM
0000 01 89 7F lab0000 ld bc,#7f89 ; -> &0000(RAM) RST 0 - LOW:RESET_ENTRY [EMS starts here]
0003 ED 49 out (c),c ; -> &0003(RAM)
0005 C3 80 05 lab0005 jp lab0580 ; -> &0005(RAM) [EMS->#0580]
0008 C3 82 B9 lab0008 jp #b982 ; -> &0008(RAM) RST 1 - LOW:LOW_JUMP
000B C3 7C B9 jp #b97c ; -> &000B(RAM) KL_LOW_PCHL
000E C5 push bc ; -> &000E(RAM) PCBC_INSTRUCTION
000F C9 lab000F ret ; -> &000F(RAM)
0010 C3 16 BA lab0010 jp #ba16 ; -> &0010(RAM) RST 2 - LOW:SIDE_CALL
0013 C3 10 BA jp #ba10 ; -> &0013(RAM) KL_SIDE_PCHL
0016 D5 lab0016 push de ; -> &0016(RAM) PCDE_INSTRUCTION
0017 C9 ret ; -> &0017(RAM)
0018 C3 BF B9 lab0018 jp #b9bf ; -> &0018(RAM) RST 3 - LOW:FAR_CALL
001B C3 B1 B9 jp #b9b1 ; -> &001B(RAM)
001E E9 jp (hl) ; -> &001E(RAM) PCHL_INSTRUCTION
001F 00 nop ; -> &001F(RAM)
0020 C3 CB BA lab0020 jp #bacb ; -> &0020(RAM) RST 4 - LOW:RAM_LAM
0023 C3 B9 B9 jp #b9b9 ; -> &0023(RAM) KL_FAR_ICALL
0026 00 nop ; -> &0026(RAM)
0027 00 nop ; -> &0027(RAM)
0028 C3 2E BA jp #ba2e ; -> &0028(RAM) RST 5 - LOW:FIRM_JUMP
002B 00 lab002B nop ; -> &002B(RAM)
002C ED 49 lab002C out (c),c ; -> &002C(RAM)
002E D9 exx ; -> &002E(RAM)
002F FB ei ; -> &002F(RAM)
0030 F3 lab0030 di ; -> &0030(RAM) RST 6 - LOW:USER_RESTART
0031 D9 exx ; -> &0031(RAM)
0032 21 2B 00 lab0032 ld hl,lab002B ; -> &0032(RAM)
0035 71 ld (hl),c ; -> &0035(RAM)
0036 18 08 jr lab0040 ; -> &0036(RAM)
0038 C3 39 B9 jp #b939 ; -> &0038(RAM) RST 7 - LOW:INTERRUPT_ENTRY
003B C9 lab003B ret ; -> &003B(RAM) EXT_INTERRUPT
003C 00 nop ; -> &003C(RAM)
003D 00 lab003D nop ; -> &003D(RAM)
003E 00 nop ; -> &003E(RAM)
003F 00 lab003F nop ; -> &003F(RAM)
; End of Low Kernel Jumpblock
0040 CB D1 lab0040 set 2,c
0042 18 E8 jr lab002C
; Set up low kernel jumpblock in RAM
0044 21 40 00 lab0044 ld hl,lab0040 ; Copy first &40 bytes of this ROM to RAM at &0000 and initialise the low kernel jumpblock
0047 2D lab0047 dec l
0048 7E ld a,(hl)
0049 77 ld (hl),a
004A 20 FB jr nz,lab0047
004C 3E C7 ld a,#c7 ; Initialise the USER RESTART in the low kernel jumpblock
004E 32 30 00 lab004E ld (lab0030),a
0051 21 91 03 ld hl,lab0391 ; Set up the high kernel jumpblock, HL -> DE, &0391 - &0578
0054 11 00 B9 ld de,#b900 ; &b900 - &bae8
0057 01 E9 01 ld bc,#01e9 ; 489
005A ED B0 ldir
005C F3 lab005C di ; &BCC8=&005C (&09DC) [152] KL_CHOKE_OFF (Reset the Kernel)
005D 3A AB B1 ld a,(#b1ab)
0060 ED 5B A9 B1 lab0060 ld de,(#b1a9)
0064 06 C0 ld b,#c0
0066 21 00 B1 ld hl,#b100
0069 36 00 lab0069 ld (hl),#0
006B 23 inc hl
006C 10 FB djnz lab0069
006E 47 ld b,a
006F 0E FF ld c,#ff
0071 A9 xor c
0072 C0 ret nz
0073 4F ld c,a
0074 5F ld e,a
0075 57 ld d,a
0076 C9 ret
; Fnal routine before entering BASIC
0077 7C lab0077 ld a,h ; [EMS cont'd from #0659]
0078 B5 or l
0079 79 ld a,c
007A 20 04 jr nz,lab0080
007C 7D ld a,l
007D 21 06 C0 ld hl,#c006
0080 32 A8 B1 lab0080 ld (#b1a8),a
0083 32 AB B1 ld (#b1ab),a
0086 22 A9 B1 ld (#b1a9),hl
0089 21 FF AB ld hl,#abff
008C 11 40 00 ld de,lab0040
008F 01 FF B0 ld bc,#b0ff
0092 31 00 C0 ld sp,#c000
0095 DF rst 24 ; rst &18
0096 A9 xor c
0097 B1 or c
0098 C7 lab0098 rst 0
0099 F3 di ; &BD0D=&0099 (&0A0A) [175] KL_TIME_PLEASE (Ask the elapsed time)
009A ED 5B 89 B1 ld de,(#b189)
009E 2A 87 B1 ld hl,(#b187)
00A1 FB ei
00A2 C9 ret
00A3 F3 di ; &BD10=&00A3 (&0A0C) [176] KL_TIME_SET (Set the elapsed time)
00A4 AF xor a
00A5 32 8B B1 ld (#b18b),a
00A8 ED 53 89 B1 ld (#b189),de
00AC 22 87 B1 ld (#b187),hl
00AF FB ei
00B0 C9 ret
00B1 21 87 B1 lab00B1 ld hl,#b187
00B4 34 lab00B4 inc (hl)
00B5 23 inc hl
00B6 28 FC jr z,lab00B4
00B8 06 F5 ld b,#f5
00BA ED 78 in a,(c)
00BC 1F rra
00BD 30 08 jr nc,lab00C7
00BF 2A 8C B1 ld hl,(#b18c)
00C2 7C ld a,h
00C3 B7 or a
00C4 C4 53 01 call nz,lab0153
00C7 2A 8E B1 lab00C7 ld hl,(#b18e)
00CA 7C ld a,h
00CB B7 or a
00CC C4 53 01 call nz,lab0153
00CF CD 61 1F call lab1F61
00D2 21 92 B1 ld hl,#b192
00D5 35 dec (hl)
00D6 C0 ret nz
00D7 36 06 ld (hl),#6
00D9 CD B7 1B call lab1BB7
00DC 2A 90 B1 ld hl,(#b190)
00DF 7C ld a,h
00E0 B7 or a
00E1 C8 ret z
00E2 21 04 B1 ld hl,#b104
00E5 CB C6 set 0,(hl)
00E7 C9 ret
00E8 2B lab00E8 dec hl
00E9 36 00 ld (hl),#0
00EB 2B dec hl
00EC 3A 01 B1 ld a,(#b101)
00EF B7 or a
00F0 20 0C jr nz,lab00FE
00F2 22 00 B1 ld (#b100),hl
00F5 22 02 B1 ld (#b102),hl
00F8 21 04 B1 lab00F8 ld hl,#b104
00FB CB F6 set 6,(hl)
00FD C9 ret
00FE ED 5B 02 B1 lab00FE ld de,(#b102)
0102 22 02 B1 ld (#b102),hl
0105 EB ex de,hl
0106 73 ld (hl),e
0107 23 inc hl
0108 72 lab0108 ld (hl),d
0109 C9 lab0109 ret
010A ED 73 05 B1 lab010A ld (#b105),sp
010E 31 87 B1 ld sp,#b187
0111 E5 push hl
0112 D5 push de
0113 C5 push bc
0114 21 04 B1 ld hl,#b104
0117 CB 76 bit 6,(hl)
0119 28 1E jr z,lab0139
011B CB FE lab011B set 7,(hl)
011D 2A 00 B1 lab011D ld hl,(#b100)
0120 7C ld a,h
0121 B7 or a
0122 28 0E jr z,lab0132
0124 5E ld e,(hl)
0125 23 inc hl
0126 56 ld d,(hl)
0127 ED 53 00 B1 ld (#b100),de
012B 23 inc hl
012C CD 0A 02 lab012C call lab020A
012F F3 di
0130 18 EB jr lab011D
0132 21 04 B1 lab0132 ld hl,#b104
0135 CB 46 bit 0,(hl)
0137 28 10 jr z,lab0149
0139 36 00 lab0139 ld (hl),#0
013B 37 scf
013C 08 ex af,af'
013D CD 89 01 call lab0189
0140 B7 or a
0141 08 ex af,af'
0142 21 04 B1 ld hl,#b104
0145 7E ld a,(hl)
0146 B7 or a
0147 20 D2 jr nz,lab011B
0149 36 00 lab0149 ld (hl),#0
014B C1 pop bc
014C D1 pop de
014D E1 lab014D pop hl
014E ED 7B 05 B1 ld sp,(#b105)
0152 C9 ret
0153 5E lab0153 ld e,(hl)
0154 23 inc hl
0155 7E ld a,(hl)
0156 23 inc hl
0157 B7 or a
0158 CA E2 01 jp z,lab01E2
015B 57 ld d,a
015C D5 push de
015D CD E2 01 call lab01E2
0160 E1 pop hl
0161 18 F0 jr lab0153
0163 E5 lab0163 push hl ; &BCD7=&0163 (&09E6) [157] KL_NEW_FRAME_FLY (Initialise and put a block onto the frame flyback list)
0164 23 inc hl
0165 23 inc hl
0166 CD D2 01 call lab01D2
0169 E1 pop hl
016A 11 8C B1 ld de,#b18c ; &BCDA=&016A (&09E8) [158] KL_ADD_FRAME_FLY (Put a block onto the frame flyback list)
016D C3 73 03 jp lab0373
0170 11 8C B1 lab0170 ld de,#b18c ; &BCDD=&0170 (&09EA) [159] KL_DEL_FRAME_FLY (Remove a block from the frame flyback list)
0173 C3 82 03 jp lab0382
0176 E5 push hl ; &BCE0=&0176 (&09EC) [160] KL_NEW_FAST_TICKER (Initialise and put a block onto the fast tick list)
0177 23 inc hl
0178 23 inc hl
0179 CD D2 01 call lab01D2
017C E1 pop hl
017D 11 8E B1 ld de,#b18e ; &BCE3=&017D (&09EE) [161] KL_ADD_FAST_TICKER (Put a block onto the fast tick list)
0180 C3 73 03 jp lab0373
0183 11 8E B1 ld de,#b18e ; &BCE6=&0183 (&09F0) [162] KL_DEL_FAST_TICKER (Remove a block from the fast tick list)
0186 C3 82 03 jp lab0382
0189 2A 90 B1 lab0189 ld hl,(#b190)
018C 7C lab018C ld a,h
018D B7 or a
018E C8 ret z
018F 5E ld e,(hl)
0190 23 inc hl
0191 56 ld d,(hl)
0192 23 inc hl
0193 4E ld c,(hl)
0194 23 inc hl
0195 46 ld b,(hl)
0196 78 ld a,b
0197 B1 or c
0198 28 16 jr z,lab01B0
019A 0B dec bc
019B 78 ld a,b
019C B1 or c
019D 20 0E jr nz,lab01AD
019F D5 push de
01A0 23 inc hl
01A1 23 inc hl
01A2 E5 push hl
01A3 23 inc hl
01A4 CD E2 01 call lab01E2
01A7 E1 pop hl
01A8 46 ld b,(hl)
01A9 2B dec hl
01AA 4E ld c,(hl)
01AB 2B dec hl
01AC D1 pop de
01AD 70 lab01AD ld (hl),b
01AE 2B dec hl
01AF 71 ld (hl),c
01B0 EB lab01B0 ex de,hl
01B1 18 D9 jr lab018C
01B3 E5 push hl ; &BCE9=&01B3 (&09F2) [163] KL_ADD_TICKER (Put a block on the tick list)
01B4 23 inc hl
01B5 23 inc hl
01B6 F3 di
01B7 73 ld (hl),e
01B8 23 inc hl
01B9 72 ld (hl),d
01BA 23 inc hl
01BB 71 ld (hl),c
01BC 23 inc hl
01BD 70 ld (hl),b
01BE E1 pop hl
01BF 11 90 B1 ld de,#b190
01C2 C3 73 03 jp lab0373
01C5 11 90 B1 ld de,#b190 ; &BCEC=&01C5 (&09F4) [164] KL_DEL_TICKER (Remove a block from the tick list)
01C8 CD 82 03 call lab0382
01CB D0 ret nc
01CC EB ex de,hl
01CD 23 inc hl
01CE 5E ld e,(hl)
01CF 23 inc hl
01D0 56 ld d,(hl)
01D1 C9 ret
01D2 F3 lab01D2 di ; &BCEF=&01D2 (&09F6) [165] KL_INIT_EVENT (Initialise an event block)
01D3 23 inc hl
01D4 23 inc hl
01D5 36 00 ld (hl),#0
01D7 23 inc hl
01D8 70 ld (hl),b
01D9 23 inc hl
01DA 73 ld (hl),e
01DB 23 inc hl
01DC 72 ld (hl),d
01DD 23 inc hl
01DE 71 ld (hl),c
01DF 23 inc hl
01E0 FB ei
01E1 C9 ret
01E2 23 lab01E2 inc hl ; &BCF2=&01E2 (&09F8) [166] KL_EVENT ('Kick' an event block)
01E3 23 inc hl
01E4 F3 di
01E5 7E ld a,(hl)
01E6 34 inc (hl)
01E7 FA 06 02 lab01E7 jp m,lab0206
01EA B7 or a
01EB 20 13 jr nz,lab0200
01ED 23 inc hl
01EE 7E ld a,(hl)
01EF 2B dec hl
01F0 B7 or a
01F1 F2 2F 02 jp p,lab022F
01F4 08 ex af,af'
01F5 30 12 jr nc,lab0209
01F7 08 ex af,af'
01F8 87 add a,a
01F9 F2 E8 00 jp p,lab00E8
01FC 23 inc hl
01FD 23 inc hl
01FE 18 23 jr lab0223
0200 08 lab0200 ex af,af'
0201 38 01 jr c,lab0204
0203 FB ei
0204 08 lab0204 ex af,af'
0205 C9 ret
0206 35 lab0206 dec (hl)
0207 18 F7 jr lab0200
0209 08 lab0209 ex af,af'
020A FB lab020A ei
020B 7E ld a,(hl)
020C B7 or a
020D F8 ret m
020E E5 lab020E push hl
020F CD 1C 02 call lab021C
0212 E1 pop hl
0213 35 dec (hl)
0214 C8 ret z
0215 F2 0E 02 jp p,lab020E
0218 34 inc (hl)
0219 C9 ret
021A 23 inc hl ; &BCFE=&021A (&0A00) [170] KL_DO_SYNC (Perform an event routine)
021B 23 inc hl
021C 23 lab021C inc hl
021D 7E ld a,(hl)
021E 23 inc hl
021F 1F rra
0220 D2 B9 B9 jp nc,#b9b9
0223 5E lab0223 ld e,(hl)
0224 23 inc hl
0225 56 ld d,(hl)
0226 EB ex de,hl
0227 E9 jp (hl)
0228 21 00 00 ld hl,lab0000 ; &BCF5=&0228 (&09FA) [167] KL_SYNC_RESET (Clear synchronous event queue)
022B 22 94 B1 ld (#b194),hl
022E C9 ret
022F E5 lab022F push hl
0230 47 ld b,a
0231 11 96 B1 ld de,#b196
0234 EB lab0234 ex de,hl
0235 2B dec hl
0236 2B dec hl
0237 56 ld d,(hl)
0238 2B dec hl
0239 5E ld e,(hl)
023A 7A ld a,d
023B B7 or a
023C 28 07 jr z,lab0245
023E 13 inc de
023F 13 inc de
0240 13 inc de
0241 1A ld a,(de)
0242 B8 cp b
0243 30 EF jr nc,lab0234
0245 D1 lab0245 pop de
0246 1B dec de
0247 23 inc hl
0248 7E ld a,(hl)
0249 12 ld (de),a
024A 1B dec de
024B 72 ld (hl),d
024C 2B dec hl
024D 7E ld a,(hl)
024E 12 ld (de),a
024F 73 ld (hl),e
0250 08 ex af,af'
0251 38 01 jr c,lab0254
0253 FB ei
0254 08 lab0254 ex af,af'
0255 C9 ret
0256 F3 di ; &BCFB=&0256 (&09FE) [169] KL_NEXT_SYNC (Get the next event from the queue)
0257 2A 93 B1 ld hl,(#b193)
025A 7C ld a,h
025B B7 or a
025C 28 17 jr z,lab0275
025E E5 push hl
025F 5E ld e,(hl)
0260 23 inc hl
0261 56 ld d,(hl)
0262 23 inc hl
0263 23 inc hl
0264 3A 95 B1 ld a,(#b195)
0267 BE cp (hl)
0268 30 0A jr nc,lab0274
026A F5 push af
026B 7E ld a,(hl)
026C 32 95 B1 ld (#b195),a
026F ED 53 93 B1 ld (#b193),de
0273 F1 pop af
0274 E1 lab0274 pop hl
0275 FB lab0275 ei
0276 C9 ret
0277 32 95 B1 ld (#b195),a ; &BD01=&0277 (&0A02) [171] KL_DONE_SYNC (Finish processing an event)
027A 23 inc hl
027B 23 inc hl
027C 35 dec (hl)
027D C8 ret z
027E F3 di
027F F2 2F 02 lab027F jp p,lab022F
0282 34 inc (hl)
0283 FB ei
0284 C9 ret
0285 CD 8E 02 lab0285 call lab028E ; &BCF8=&0285 (&09FC) [168] KL_DEL_SYNCHRONOUS (Remove a synchronous event from the event queue)
0288 11 93 B1 ld de,#b193
028B C3 82 03 jp lab0382
028E 23 lab028E inc hl ; &BD0A=&028E (&0A08) [174] KL_DISARM_EVENT (Prevent an event from occurring)
028F 23 inc hl
0290 36 C0 ld (hl),#c0
0292 2B dec hl
0293 2B dec hl
0294 C9 ret
0295 21 95 B1 ld hl,#b195 ; &BD04=&0295 (&0A04) [172] KL_EVENT_DISABLE (Disable normal synchronous events)
0298 CB EE set 5,(hl)
029A C9 ret
029B 21 95 B1 ld hl,#b195 ; &BD07=&029B (&0A06) [173] KL_EVENT_ENABLE (Enable normal synchronous events)
029E CB AE res 5,(hl)
02A0 C9 ret
02A1 E5 lab02A1 push hl ; &BCD1=&02A1 (&09E2) [155] KL_LOG_EXT (Introduce an RSX to the firmware)
02A2 ED 5B A6 B1 ld de,(#b1a6)
02A6 22 A6 B1 ld (#b1a6),hl
02A9 73 ld (hl),e
02AA 23 inc hl
02AB 72 ld (hl),d
02AC 23 inc hl
02AD 71 ld (hl),c
02AE 23 inc hl
02AF 70 ld (hl),b
02B0 E1 pop hl
02B1 C9 ret
02B2 11 96 B1 ld de,#b196 ; &BCD4=&02B2 (&09E4) [156] KL_FIND_COMMAND (Search for an RSX or background ROM or foreground ROM to process a command)
02B5 01 10 00 ld bc,lab0010
02B8 CD A6 BA call #baa6
02BB EB ex de,hl
02BC 2B dec hl
02BD CB FE set 7,(hl)
02BF 2A A6 B1 ld hl,(#b1a6)
02C2 7D ld a,l
02C3 18 10 jr lab02D5
02C5 E5 lab02C5 push hl
02C6 23 inc hl
02C7 23 inc hl
02C8 4E ld c,(hl)
02C9 23 inc hl
02CA 46 ld b,(hl)
02CB CD F4 02 call lab02F4
02CE D1 pop de
02CF D8 ret c
02D0 EB ex de,hl
02D1 7E ld a,(hl)
02D2 23 inc hl
02D3 66 ld h,(hl)
02D4 6F ld l,a
02D5 B4 lab02D5 or h
02D6 20 ED jr nz,lab02C5
02D8 0E FF ld c,#ff
02DA 0C lab02DA inc c
02DB CD 83 BA call #ba83
02DE F5 push af
02DF E6 03 and #3
02E1 47 ld b,a
02E2 CC F4 02 call z,lab02F4
02E5 38 09 jr c,lab02F0
02E7 F1 pop af
02E8 87 add a,a
02E9 30 EF jr nc,lab02DA
02EB 79 ld a,c
02EC B7 or a
02ED 28 EB jr z,lab02DA
02EF C9 ret
02F0 F1 lab02F0 pop af
02F1 C3 0B 06 jp lab060B
02F4 21 04 C0 lab02F4 ld hl,#c004
02F7 78 ld a,b
02F8 B7 or a
02F9 28 04 jr z,lab02FF
02FB 60 ld h,b
02FC 69 ld l,c
02FD 0E FF ld c,#ff
02FF CD 7E BA lab02FF call #ba7e
0302 C5 push bc
0303 5E ld e,(hl)
0304 23 inc hl
0305 56 ld d,(hl)
0306 23 inc hl
0307 EB ex de,hl
0308 18 17 jr lab0321
030A 01 96 B1 lab030A ld bc,#b196
030D 0A lab030D ld a,(bc)
030E BE cp (hl)
030F 20 08 jr nz,lab0319
0311 23 inc hl
0312 03 inc bc
0313 87 add a,a
0314 30 F7 jr nc,lab030D
0316 EB ex de,hl
0317 18 0C jr lab0325
0319 7E lab0319 ld a,(hl)
031A 23 inc hl
031B 87 add a,a
031C 30 FB jr nc,lab0319
031E 13 inc de
031F 13 inc de
0320 13 inc de
0321 7E lab0321 ld a,(hl)
0322 B7 or a
0323 20 E5 jr nz,lab030A
0325 C1 lab0325 pop bc
0326 C3 8C BA jp #ba8c
0329 0E 07 ld c,#7 ; &BCCB=&0329 (&09DE) [153] KL_ROM_WALK (Find and initialise all background ROMs)
032B CD 32 03 lab032B call lab0332
032E 0D dec c
032F 20 FA jr nz,lab032B
0331 C9 ret
0332 79 lab0332 ld a,c ; &BCCE=&0332 (&09E0) [154] KL_INIT_BACK (Initialise a particular background ROM)
0333 FE 08 cp #8
0335 D0 ret nc
0336 CD 7E BA call #ba7e
0339 3A 00 C0 ld a,(#c000)
033C E6 03 and #3
033E 3D dec a
033F 20 1F jr nz,lab0360
0341 C5 push bc
0342 CD 06 C0 call #c006
0345 D5 push de
0346 23 inc hl
0347 EB ex de,hl
0348 21 AA B1 ld hl,#b1aa
034B ED 4B A8 B1 ld bc,(#b1a8)
034F 06 00 ld b,#0
0351 09 add hl,bc
0352 09 add hl,bc
0353 73 ld (hl),e
0354 23 inc hl
0355 72 ld (hl),d
0356 21 FC FF ld hl,#fffc
0359 19 add hl,de
035A CD A1 02 call lab02A1
035D 2B dec hl
035E D1 pop de
035F C1 pop bc
0360 C3 8C BA lab0360 jp #ba8c
0363 7E lab0363 ld a,(hl)
0364 BB cp e
0365 23 inc hl
0366 7E ld a,(hl)
0367 2B dec hl
0368 20 03 jr nz,lab036D
036A BA cp d
036B 37 scf
036C C8 ret z
036D B7 lab036D or a
036E C8 ret z
036F 6E ld l,(hl)
0370 67 ld h,a
0371 18 F0 jr lab0363
0373 EB lab0373 ex de,hl
0374 F3 di
0375 CD 63 03 call lab0363
0378 38 06 jr c,lab0380
037A 73 ld (hl),e
037B 23 inc hl
037C 72 ld (hl),d
037D 13 inc de
037E AF xor a
037F 12 ld (de),a
0380 FB lab0380 ei
0381 C9 ret
0382 EB lab0382 ex de,hl
0383 F3 di
0384 CD 63 03 call lab0363
0387 30 06 jr nc,lab038F
0389 1A ld a,(de)
038A 77 ld (hl),a
038B 13 inc de
038C 23 inc hl
038D 1A ld a,(de)
038E 77 ld (hl),a
038F FB lab038F ei
0390 C9 ret
; High Kernel Jumpblock, everything from (here) &0391 to &0579 copied into RAM at &b900 to &bae8 (ROM add + &b56f) by routine at #0044
0391 C3 5E BA lab0391 jp #ba5e ; -> &B900(RAM) KL_U_ROM_ENABLE &B900 (&04EF->&BA5E) Turn on the current Upper ROM
0394 C3 68 BA jp #ba68 ; -> &B903(RAM) KL_U_ROM_DISABLE &B903 (&04F9->BA68) Turn off the Upper ROM
0397 C3 4A BA jp #ba4a ; -> &B906(RAM) KL_L_ROM_ENABLE &B906 (&04DB->&BA4A) Turn on the Lower ROM
039A C3 54 BA jp #ba54 ; -> &B909(RAM) KL_L_ROM_DISABLE &B909 (&04E5->&BA54) Turn off the Lower ROM
039D C3 72 BA jp #ba72 ; -> &B90C(RAM) KL_ROM_RESTORE &B90C (&0503->&BA72) Restore the previous ROM state
03A0 C3 7E BA jp #ba7e ; -> &B90F(RAM) KL_ROM_SELECT &B90F (&050F->&BA7E) Select a particular Upper ROM
03A3 C3 A2 BA jp #baa2 ; -> &B912(RAM) KL_CURR_SELECTION &B912 (&0533->&BAA2) Ask which Upper ROM is currently selected
03A6 C3 83 BA jp #ba83 ; -> &B915(RAM) KL_PROBE_ROM &B915 (&0514->&BA83) Ask class and version of a ROM
03A9 C3 8C BA jp #ba8c ; -> &B918(RAM) KL_ROM_DESELECT &B918 (&051D->&BA8C) Restore the previous Upper ROM selection
03AC C3 A6 BA jp #baa6 ; -> &B91B(RAM) KL_LDIR &B91B (&0537->&BAA6) Move store (LDIR) with ROMs disabled
03AF C3 AC BA jp #baac ; -> &B91E(RAM) KL_LDDR &B91E (&053D->&BAAC) Move store (LDDR) with ROMs disabled
; Routines used by the High Kernel Jumpblock
03B2 3A 94 B1 ld a,(#b194) ; -> &B921(RAM) KL_POLL_SYNCHRONOUS Check if an event with higher priority than the current event is pending
03B5 B7 or a ; -> &B924(RAM)
03B6 C8 ret z ; -> &B925(RAM)
03B7 E5 push hl ; -> &B926(RAM)
03B8 F3 di ; -> &B927(RAM)
03B9 2A 93 B1 ld hl,(#b193) ; -> &B928(RAM)
03BC 7C ld a,h ; -> &B92B(RAM)
03BD B7 or a ; -> &B92C(RAM)
03BE 28 07 jr z,lab03C7
03C0 23 inc hl
03C1 23 inc hl
03C2 23 inc hl
03C3 3A 95 B1 ld a,(#b195)
03C6 BE cp (hl)
03C7 E1 lab03C7 pop hl
03C8 FB ei
03C9 C9 ret
03CA F3 di
03CB 08 ex af,af'
03CC 38 33 jr c,lab0401
03CE D9 exx
03CF 79 ld a,c
03D0 37 scf
03D1 FB ei
03D2 08 ex af,af'
03D3 F3 di
03D4 F5 push af
03D5 CB 91 res 2,c
03D7 ED 49 out (c),c
03D9 CD B1 00 call lab00B1
03DC B7 lab03DC or a
03DD 08 ex af,af'
03DE 4F ld c,a
03DF 06 7F ld b,#7f
03E1 3A 04 B1 ld a,(#b104)
03E4 B7 or a
03E5 28 14 jr z,lab03FB
03E7 FA 6A B9 jp m,#b96a
03EA 79 ld a,c
03EB E6 0C and #c
03ED F5 push af
03EE CB 91 res 2,c
03F0 D9 exx
03F1 CD 0A 01 call lab010A
03F4 D9 exx
03F5 E1 pop hl
03F6 79 ld a,c
03F7 E6 F3 and #f3
03F9 B4 or h
03FA 4F ld c,a
03FB ED 49 lab03FB out (c),c
03FD D9 exx
03FE F1 pop af
03FF FB ei
0400 C9 ret
0401 08 lab0401 ex af,af'
0402 E1 pop hl
0403 F5 push af
0404 CB D1 set 2,c
0406 ED 49 out (c),c
0408 CD 3B 00 call lab003B
040B 18 CF jr lab03DC
040D F3 di
040E E5 push hl
040F D9 exx
0410 D1 pop de
0411 18 06 jr lab0419
0413 F3 di
0414 D9 exx
0415 E1 pop hl
0416 5E ld e,(hl)
0417 23 inc hl
0418 56 ld d,(hl)
0419 08 lab0419 ex af,af'
041A 7A ld a,d
041B CB BA res 7,d
041D CB B2 res 6,d
041F 07 rlca
0420 07 rlca
0421 07 lab0421 rlca
0422 07 rlca
0423 A9 xor c
0424 E6 0C and #c
0426 A9 xor c
0427 C5 push bc
0428 CD A8 B9 call #b9a8
042B F3 di
042C D9 exx
042D 08 ex af,af'
042E 79 ld a,c
042F C1 pop bc
0430 E6 03 lab0430 and #3
0432 CB 89 res 1,c
0434 CB 81 res 0,c
0436 B1 or c
0437 18 01 jr lab043A
0439 D5 push de
043A 4F lab043A ld c,a
043B ED 49 out (c),c
043D B7 or a
043E 08 ex af,af'
043F D9 exx
0440 FB ei
0441 C9 ret
0442 F3 di
0443 08 ex af,af'
0444 79 ld a,c
0445 E5 push hl
0446 D9 exx
0447 D1 pop de
0448 18 15 jr lab045F
044A F3 di
044B E5 push hl
044C D9 exx
044D E1 pop hl
044E 18 09 jr lab0459
0450 F3 di
0451 D9 exx
0452 E1 pop hl
0453 5E ld e,(hl)
0454 23 inc hl
0455 56 ld d,(hl)
0456 23 inc hl
0457 E5 push hl
0458 EB ex de,hl
0459 5E lab0459 ld e,(hl)
045A 23 inc hl
045B 56 ld d,(hl)
045C 23 inc hl
045D 08 ex af,af'
045E 7E ld a,(hl)
045F FE FC lab045F cp #fc
0461 30 BE jr nc,lab0421
0463 06 DF lab0463 ld b,#df
0465 ED 79 out (c),a
0467 21 A8 B1 ld hl,#b1a8
046A 46 ld b,(hl)
046B 77 ld (hl),a
046C C5 push bc
046D FD E5 push iy
046F 3D dec a
0470 FE 07 cp #7
0472 30 0F jr nc,lab0483
0474 87 add a,a
0475 C6 AC add a,#ac
0477 6F ld l,a
0478 CE B1 adc a,#b1
047A 95 sub l
047B 67 ld h,a
047C 7E ld a,(hl)
047D 23 inc hl
047E 66 ld h,(hl)
047F 6F ld l,a
0480 E5 push hl
0481 FD E1 pop iy
0483 06 7F lab0483 ld b,#7f
0485 79 ld a,c
0486 CB D7 set 2,a
0488 CB 9F res 3,a
048A CD A8 B9 call #b9a8
048D FD E1 pop iy
048F F3 di
0490 D9 exx
0491 08 ex af,af'
0492 59 ld e,c
0493 C1 pop bc
0494 78 ld a,b
0495 06 DF ld b,#df
0497 ED 79 out (c),a
0499 32 A8 B1 ld (#b1a8),a
049C 06 7F ld b,#7f
049E 7B ld a,e
049F 18 8F jr lab0430
04A1 F3 di
04A2 E5 push hl
04A3 D9 exx
04A4 D1 pop de
04A5 18 08 jr lab04AF
04A7 F3 di
04A8 D9 exx
04A9 E1 pop hl
04AA 5E ld e,(hl)
04AB 23 inc hl
04AC 56 ld d,(hl)
04AD 23 inc hl
04AE E5 push hl
04AF 08 lab04AF ex af,af'
04B0 7A ld a,d
04B1 CB FA set 7,d
04B3 CB F2 set 6,d
04B5 E6 C0 and #c0
04B7 07 rlca
04B8 07 rlca
04B9 21 AB B1 ld hl,#b1ab
04BC 86 add a,(hl)
04BD 18 A4 jr lab0463
04BF F3 di
04C0 D9 exx
04C1 E1 pop hl
04C2 5E ld e,(hl)
04C3 23 inc hl
04C4 56 ld d,(hl)
04C5 CB 91 res 2,c
04C7 ED 49 out (c),c
04C9 ED 53 3F BA ld (#ba3f),de
04CD D9 exx
04CE FB ei
04CF CD 3E BA call #ba3e
04D2 F3 di
04D3 D9 exx
04D4 CB D1 set 2,c
04D6 ED 49 out (c),c
04D8 D9 exx
04D9 FB ei
04DA C9 ret
04DB F3 di ; -> &BA4A(RAM) KL_L_ROM_ENABLE &B906 (&04DB->&BA4A)
04DC D9 exx
04DD 79 ld a,c
04DE CB 91 res 2,c
04E0 ED 49 out (c),c
04E2 D9 exx
04E3 FB ei
04E4 C9 ret
04E5 F3 di ; -> &BA54(RAM) KL_L_ROM_DISABLE &B909 (&04E5->&BA54)
04E6 D9 exx
04E7 79 ld a,c
04E8 CB D1 set 2,c
04EA ED 49 out (c),c
04EC D9 exx
04ED FB ei
04EE C9 ret
04EF F3 di ; -> &BA5E(RAM) KL_U_ROM_ENABLE &B900 (&04EF->&BA5E)
04F0 D9 exx
04F1 79 ld a,c
04F2 CB 99 res 3,c
04F4 ED 49 out (c),c
04F6 D9 exx
04F7 FB ei
04F8 C9 ret
04F9 F3 di ; -> &BA68(RAM) KL_U_ROM_DISABLE &B903 (&04F9->BA68)
04FA D9 exx
04FB 79 ld a,c
04FC CB D9 set 3,c
04FE ED 49 out (c),c
0500 D9 exx
0501 FB ei
0502 C9 ret
0503 F3 di ; -> &BA72(RAM) KL_ROM_RESTORE &B90C (&0503->&BA72)
0504 D9 exx
0505 A9 xor c
0506 E6 0C and #c
0508 A9 xor c
0509 4F ld c,a
050A ED 49 out (c),c
050C D9 exx
050D FB ei
050E C9 ret
050F CD 5E BA call #ba5e ; -> &BA7E(RAM) KL_ROM_SELECT &B90F (&050F->&BA7E)
0512 18 0F jr lab0523
0514 CD 7E BA call #ba7e ; -> &BA83(RAM) KL_PROBE_ROM &B915 (&0514->&BA83)
0517 3A 00 C0 ld a,(#c000)
051A 2A 01 C0 ld hl,(#c001)
051D F5 push af ; -> &BA8C(RAM) KL_ROM_DESELECT &B918 (&051D->&BA8C)
051E 78 ld a,b
051F CD 72 BA call #ba72
0522 F1 pop af
0523 E5 lab0523 push hl
0524 F3 di
0525 06 DF ld b,#df
0527 ED 49 out (c),c
0529 21 A8 B1 ld hl,#b1a8
052C 46 ld b,(hl)
052D 71 ld (hl),c
052E 48 ld c,b
052F 47 ld b,a
0530 FB ei
0531 E1 pop hl
0532 C9 ret
0533 3A A8 B1 ld a,(#b1a8) ; -> &BAA2(RAM) KL_CURR_SELECTION &B912 (&0533->&BAA2)
0536 C9 ret
0537 CD B2 BA call #bab2 ; -> &BAA6(RAM) KL_LDIR &B91B (&0537->&BAA6)
053A ED B0 ldir
053C C9 ret
053D CD B2 BA call #bab2 ; -> &BAAC(RAM) KL_LDDR &B91E (&053D->&BAAC)
0540 ED B8 lddr
0542 C9 ret
0543 F3 di
0544 D9 exx
0545 E1 pop hl
0546 C5 push bc
0547 CB D1 set 2,c
0549 CB D9 set 3,c
054B ED 49 out (c),c
054D CD C7 BA call #bac7
0550 F3 di
0551 D9 exx
0552 C1 pop bc
0553 ED 49 out (c),c
0555 D9 exx
0556 FB ei
0557 C9 ret
0558 E5 push hl
0559 D9 exx
055A FB ei
055B C9 ret
055C F3 di
055D D9 exx
055E 59 ld e,c
055F CB D3 set 2,e
0561 CB DB set 3,e
0563 ED 59 out (c),e
0565 D9 exx
0566 7E ld a,(hl)
0567 D9 exx
0568 ED 49 out (c),c
056A D9 exx
056B FB ei
056C C9 ret
056D D9 exx
056E 79 ld a,c
056F F6 0C or #c
0571 ED 79 out (c),a
0573 DD 7E 00 ld a,(ix+0)
0576 ED 49 out (c),c
0578 D9 exx ; -> &BAE7(RAM)
0579 C9 ret ; -> &BAE8(RAM)
057A C7 rst 0
057B C7 rst 0
057C C7 rst 0
057D C7 rst 0
057E C7 rst 0
057F C7 rst 0
0580 F3 lab0580 di ; [EMS cont'd from &0005] Set up PPI & Display
0581 01 82 F7 ld bc,#f782 ; f7=PPI %1000 0010
0584 ED 49 out (c),c
0586 01 00 F4 ld bc,#f400 ; Initialise PPI port A data
0589 ED 49 out (c),c
058B 01 00 F6 ld bc,#f600 ; Initialise PPI port C data
058E ED 49 out (c),c
0590 01 7F EF ld bc,#ef7f ; ef=Printer Port
0593 ED 49 out (c),c
0595 06 F5 ld b,#f5 ; PPI port B
0597 ED 78 in a,(c)
0599 E6 10 and #10 ; %0001 0000
059B 21 C4 05 ld hl,lab05C4 ; Address, end of 50Hz Display data
059E 20 03 jr nz,lab05A3 ; Jump if 50Hz display is required
05A0 21 D4 05 ld hl,lab05D4 ; Address, end of 60Hz Display data (replaces 50Hz address)
05A3 01 0F BC lab05A3 ld bc,#bc0f ; bc=CRTC index %0000 1111=register 15
05A6 ED 49 lab05A6 out (c),c
05A8 2B dec hl ; Next byte DOWN 14,13,12 etc
05A9 7E ld a,(hl)
05AA 04 inc b ; B is now &bd=CRTC data
05AB ED 79 out (c),a
05AD 05 dec b ; B is now &bc=CRTC index
05AE 0D dec c
05AF F2 A6 05 jp p,lab05A6
05B2 18 20 jr lab05D4 ; [EMS->#05D4]
; CRTC data for 50Hz display
05B4 db #3f,#28,#2e,#8e,#26,#00,#19,#1e ; Registers 0 - 7
05BC db #00,#07,#00,#00,#30,#00,#c0,#00 ; Registers 8 - 15
; CRTC data for 60Hz display
05C4 lab05C4 db #3f,#28,#2e,#8e,#1f,#06,#19,#1b
05CC db #00,#07,#00,#00,#30,#00,#c0,#00
05D4 11 5C 06 lab05D4 ld de,lab065C ; [EMS cont'd from #05B2]
05D7 21 00 00 ld hl,lab0000
05DA 18 32 jr lab060E ; [EMS->#060E]
05DC 31 00 C0 ld sp,#c000 ; &BD13=&05DC (&0A0E) [177] MC_BOOT_PROGRAM (Load and run a foreground programme)
05DF E5 push hl
05E0 CD 68 1E call lab1E68
05E3 F3 di
05E4 01 FF F8 ld bc,#f8ff
05E7 ED 49 out (c),c
05E9 CD 5C 00 call lab005C
05EC E1 pop hl
05ED D5 push de
05EE C5 push bc
05EF E5 push hl
05F0 CD 1E 1A call lab1A1E
05F3 CD 88 10 call lab1088
05F6 CD B1 0A call lab0AB1
05F9 CD 5E BA call #ba5e
05FC E1 pop hl
05FD CD 75 07 call lab0775
0600 C1 pop bc
0601 D1 pop de
0602 38 07 jr c,lab060B
0604 EB ex de,hl
0605 48 ld c,b
0606 11 E8 06 ld de,lab06E8
0609 18 03 jr lab060E
060B 11 26 07 lab060B ld de,lab0726 ; &BD16=&060B (&0A10) [178] MC_START_PROGRAM (Run a foreground programme)
060E F3 lab060E di ; [EMS cont'd from #05DA]
060F ED 56 im 1
0611 D9 exx
0612 01 00 DF ld bc,#df00
0615 ED 49 out (c),c
0617 01 FF F8 ld bc,#f8ff
061A ED 49 out (c),c
061C 21 00 B1 ld hl,#b100
061F 11 01 B1 ld de,#b101
0622 01 FF 07 ld bc,#07ff
0625 36 00 ld (hl),#0
0627 ED B0 ldir
0629 01 89 7F ld bc,#7f89
062C ED 49 out (c),c
062E D9 exx
062F AF xor a
0630 08 ex af,af'
0631 31 00 C0 ld sp,#c000
0634 E5 push hl
0635 C5 push bc
0636 D5 push de
0637 CD 44 00 call lab0044 ; Initialise Low Kernel Jumpblock and High Kernel Jumpblock
063A CD 88 08 call lab0888 ; JUMP_RESTORE (&BD37,&0888) Initialise the main Firmware Jumpblock
063D CD E0 19 call lab19E0 ; KM_INITIALISE (&BB00) Including initialise 1 KM indirection
0640 CD 68 1E call lab1E68 ; SOUND_RESET (&BCA7)
0643 CD A0 0A call lab0AA0 ; SCR_INITIALISE (&BBFF) Including initialise 3 SCR indirections
0646 CD 78 10 call lab1078 ; TXT_INITIALISE (&BB4E) Including initialise 5 TXT indirections
0649 CD B0 15 call lab15B0 ; GRA_INITIALISE (&BBBA) Including initialise 3 GRA indirections
064C CD 70 23 call lab2370 ; CAS_INITIALISE (&BC65)
064F CD E6 07 call lab07E6 ; MC_RESET_PRINTER (&BD28) Including initialise 1 MC indirection
0652 FB ei
0653 E1 pop hl
0654 CD 75 07 call lab0775
0657 C1 pop bc
0658 E1 pop hl
0659 C3 77 00 jp lab0077 ; [EMS->#0077]
065C CD 12 07 lab065C call lab0712
065F CD EB 06 call lab06EB
0662 21 6D 06 ld hl,lab066D
0665 CD EB 06 call lab06EB
0668 21 93 06 ld hl,lab0693
066B 18 7E jr lab06EB
; Signon Display Text
066D lab066D db #20,#36,#34,#4b,#20,#4d,#69,#63 ; 64K Mic
0675 db #72,#6f,#63,#6f,#6d,#70,#75,#74 ; rocomput
067D db #65,#72,#20,#20,#28,#76,#31,#29 ; er (v1)
0685 db #0d,#0a,#0d,#0a,#00 ; .....
068A db #43,#6f,#70,#79,#72,#69,#67,#68 ; Copyrigh
0692 db #74,#20,#a4,#31,#39,#38,#34,#20 ; t .1984
069A db #41,#6d,#73,#74,#72,#61,#64,#20 ; Amstrad
06A2 db #43,#6f,#6e,#73,#75,#6d,#65,#72 ; Consumer
06AA db #20,#45,#6c,#65,#63,#74,#72,#6f ; Electro
06B2 db #6e,#69,#63,#73,#20,#70,#6c,#63 ; nics plc
06BA db #0d,#0a,#20,#20,#20,#20,#20,#20 ; ..
06C2 db #20,#20,#20,#20,#20,#61,#6e,#64 ; and
06CA db #20,#4c,#6f,#63,#6f,#6d,#6f,#74 ; Locomot
06D2 db #69,#76,#65,#20,#53,#6f,#66,#74 ; ive Soft
06DA db #77,#61,#72,#65,#20,#4c,#74,#64 ; ware Ltd
06E2 db #2e,#0d,#0a,#0d,#0a,#00 ; ......
06E8 21 F4 06 lab06E8 ld hl,lab06F4
06EB 7E lab06EB ld a,(hl)
06EC 23 inc hl
06ED B7 or a
06EE C8 ret z
06EF CD 00 14 call lab1400
06F2 18 F7 jr lab06EB
; Program Load Failed Text
06F4 lab06F4 db #2a,#2a,#2a,#20,#50,#52,#4f,#47 ; *** PROG
06FC db #52,#41,#4d,#20,#4c,#4f,#41,#44 ; RAM LOAD
0704 db #20,#46,#41,#49,#4c,#45,#44,#20 ; FAILED
070C db #2a,#2a,#2a,#0d,#0a,#00 ; ***...
0712 06 F5 lab0712 ld b,#f5
0714 ED 78 in a,(c)
0716 2F cpl
0717 E6 0E and #e
0719 0F rrca
071A 21 27 07 ld hl,lab0727
071D 3C inc a
071E 47 ld b,a
071F 7E lab071F ld a,(hl)
0720 23 inc hl
0721 B7 or a
0722 20 FB jr nz,lab071F
0724 10 F9 djnz lab071F
0726 C9 lab0726 ret
; System Names, Arnold etc
0727 lab0727 db #41,#72,#6e,#6f,#6c,#64,#00 ; Arnold.
072E db #0a,#20,#41,#6d,#73,#74,#72,#61 ; . Amstra
0736 db #64,#00 ; d.
0738 db #0a,#20,#4f,#72,#69,#6f,#6e,#00 ; . Orion.
0740 db #0a,#20,#53,#63,#68,#6e,#65,#69 ; . Schnei
0748 db #64,#65,#72,#00,#0a,#20,#41,#77 ; der.. Aw
0750 db #61,#00,#0a,#20,#53,#6f,#6c,#61 ; a.. Sola
0758 db #76,#6f,#78,#00 ; vox.
075C db #0a,#20,#53,#61,#69,#73,#68,#6f ; . Saisho
0764 db #00
0765 db #0a,#20,#54,#72,#69,#75,#6d,#70 ; . Triump
076D db #68,#00 ; h.
076F db #0a,#20,#49,#73,#70,#00 ; . Isp.
0775 E9 lab0775 jp (hl)
0776 FE 03 lab0776 cp #3 ; &BD1C=&0776 (&0A14) [180] MC_SET_MODE (Set the screen mode)
0778 D0 ret nc
0779 F3 di
077A D9 exx
077B CB 89 res 1,c
077D CB 81 res 0,c
077F B1 or c
0780 4F ld c,a
0781 ED 49 out (c),c
0783 FB ei
0784 D9 exx
0785 C9 ret
0786 C5 lab0786 push bc ; &BD22=&0786 (&0A18) [182] MC_CLEAR_INKS (Set all inks to one colour)
0787 D5 push de
0788 01 10 7F ld bc,#7f10
078B CD AB 07 call lab07AB
078E 0E 00 ld c,#0
0790 CD AB 07 lab0790 call lab07AB
0793 1B dec de
0794 20 FA jr nz,lab0790
0796 D1 pop de
0797 C1 pop bc
0798 C9 ret
0799 C5 lab0799 push bc ; &BD25=&0799 (&0A1A) [183] MC_SET_INKS (Set colours of all the inks)
079A D5 push de
079B 01 10 7F ld bc,#7f10
079E CD AB 07 call lab07AB
07A1 0E 00 ld c,#0
07A3 CD AB 07 lab07A3 call lab07AB
07A6 20 FB jr nz,lab07A3
07A8 D1 pop de
07A9 C1 pop bc
07AA C9 ret
07AB ED 49 lab07AB out (c),c
07AD 1A ld a,(de)
07AE 13 inc de
07AF E6 1F and #1f
07B1 F6 40 or #40
07B3 ED 79 out (c),a
07B5 0C inc c
07B6 79 ld a,c
07B7 FE 10 cp #10
07B9 C9 ret
07BA F5 lab07BA push af ; &BD19=&07BA (&0A12) [179] MC_WAIT_FLYBACK (Wait for frame flyback)
07BB C5 push bc
07BC 06 F5 ld b,#f5
07BE ED 78 lab07BE in a,(c)
07C0 1F rra
07C1 30 FB jr nc,lab07BE
07C3 C1 pop bc
07C4 F1 pop af
07C5 C9 ret
07C6 C5 lab07C6 push bc ; &BD1F=&07C6 (&0A16) [181] MC_SCREEN_OFFSET (Set the screen offset)
07C7 0F rrca
07C8 0F rrca
07C9 E6 30 and #30
07CB 4F ld c,a
07CC 7C ld a,h
07CD 1F rra
07CE E6 03 and #3
07D0 B1 or c
07D1 01 0C BC ld bc,#bc0c
07D4 ED 49 out (c),c
07D6 04 inc b
07D7 ED 79 out (c),a
07D9 05 dec b
07DA 0C inc c
07DB ED 49 out (c),c
07DD 04 inc b
07DE 7C ld a,h
07DF 1F rra
07E0 7D ld a,l
07E1 1F rra
07E2 ED 79 out (c),a
07E4 C1 pop bc
07E5 C9 ret
07E6 21 EC 07 lab07E6 ld hl,lab07EC ; &BD28=&07E6 (&0A1C) [184] MC_RESET_PRINTER (Reset the printer indirection)
07E9 C3 8A 0A jp lab0A8A
07EC 03 lab07EC db #3 ; Number of indirection bytes to restore (multiples of 3) &BD28=&07E6 (&0A1C) [184] MC_RESET_PRINTER (Reset the printer indirection)
07ED db #f1,#bd ; Destination address of first indirection to be restored &BDF1 MC_WAIT_PRINTER
07EF db #c3,#f8,#07 ; Indirection entry 01 of 01 (jp #07f8) &BDF1 IND:MC_WAIT_PRINTER (Print a character or time out)
07F2 C5 push bc ; &BD2B=&07F2 (&0A1E) [185] MC_PRINT_CHAR (Try to send a character to the Centronics port)
07F3 CD F1 BD call #bdf1
07F6 C1 pop bc
07F7 C9 ret
07F8 01 32 00 ld bc,lab0032
07FB CD 1B 08 lab07FB call lab081B
07FE 30 07 lab07FE jr nc,lab0807
0800 10 F9 lab0800 djnz lab07FB
0802 0D dec c
0803 20 F6 jr nz,lab07FB
0805 B7 or a
0806 C9 ret
0807 C5 lab0807 push bc ; &BD31=&0807 (&0A22) [187] MC_SEND_PRINTER (Send a character to the Centronics port)
0808 06 EF ld b,#ef
080A E6 7F and #7f
080C ED 79 out (c),a
080E F6 80 or #80
0810 F3 di
0811 ED 79 out (c),a
0813 E6 7F and #7f
0815 FB ei
0816 ED 79 out (c),a
0818 C1 pop bc
0819 37 scf
081A C9 ret
081B C5 lab081B push bc ; &BD2E=&081B (&0A20) [186] MC_BUSY_PRINTER (Test if the Centronics port is busy)
081C 4F ld c,a
081D 06 F5 ld b,#f5
081F ED 78 in a,(c)
0821 17 rla
0822 17 rla
0823 79 ld a,c
0824 C1 pop bc
0825 C9 ret
0826 F3 lab0826 di ; &BD34=&0826 (&0A24) [188] MC_SOUND_REGISTER (Send data to the sound chip register)
0827 06 F4 ld b,#f4
0829 ED 79 out (c),a
082B 06 F6 ld b,#f6
082D ED 78 in a,(c)
082F F6 C0 or #c0
0831 ED 79 out (c),a
0833 E6 3F and #3f
0835 ED 79 out (c),a
0837 06 F4 ld b,#f4
0839 ED 49 out (c),c
083B 06 F6 ld b,#f6
083D 4F ld c,a
083E F6 80 or #80
0840 ED 79 out (c),a
0842 ED 49 out (c),c
0844 FB ei
0845 C9 ret
0846 01 0E F4 lab0846 ld bc,#f40e
0849 ED 49 out (c),c
084B 06 F6 ld b,#f6
084D ED 78 in a,(c)
084F E6 30 and #30
0851 4F ld c,a
0852 F6 C0 or #c0
0854 ED 79 out (c),a
0856 ED 49 out (c),c
0858 04 inc b
0859 3E 92 ld a,#92
085B ED 79 out (c),a
085D C5 push bc
085E CB F1 set 6,c
0860 06 F6 lab0860 ld b,#f6
0862 ED 49 out (c),c
0864 06 F4 ld b,#f4
0866 ED 78 in a,(c)
0868 46 ld b,(hl)
0869 77 ld (hl),a
086A A0 and b
086B 2F cpl
086C 12 ld (de),a
086D 23 inc hl
086E 13 inc de
086F 0C inc c
0870 79 ld a,c
0871 E6 0F and #f
0873 FE 0A cp #a
0875 20 E9 jr nz,lab0860
0877 C1 pop bc
0878 3E 82 ld a,#82
087A ED 79 out (c),a
087C 05 dec b
087D ED 49 out (c),c
087F C9 ret
0880 C7 rst 0
0881 C7 rst 0
0882 C7 rst 0
0883 C7 rst 0
0884 C7 rst 0
0885 C7 rst 0
0886 C7 rst 0
0887 C7 rst 0
; &BD37=&0888 (&0A26) [189] JUMP_RESTORE (Restore the standard Jumpblocks (Note - 2 byte entries in ROM become 3 byte entries in RAM)
0888 11 AC 08 lab0888 ld de,lab08AC ; Point at the jumblock table stored in ROM
088B 21 00 BB ld hl,#bb00 ; Point at the RAM location where the restored jumpblock will start
088E 01 CF BF ld bc,#bfcf
0891 CD 97 08 call lab0897 ; loads b=&bf=191 entries c=&cf=rst 01
0894 01 EF 30 ld bc,#30FF ; loads b=&30= 48 entries c=&ef=rst 05
0897 71 lab0897 ld (hl),c ; puts &cf (or &ef) in first of 3 bytes
0898 23 inc hl
0899 1A ld a,(de) ; gets second byte
089A 77 ld (hl),a ; puts second of 3 bytes, low byte of address
089B 13 inc de
089C 23 inc hl
089D EB ex de,hl
089E 79 ld a,c
089F 2F cpl
08A0 07 rlca
08A1 07 rlca
08A2 E6 80 and #80
08A4 B6 or (hl)
08A5 EB ex de,hl
08A6 77 ld (hl),a ; puts third of 3 bytes, high byte of address
08A7 13 inc de
08A8 23 inc hl
08A9 10 EC djnz lab0897
08AB C9 ret
; Main Firmware Jumpblocks. RAM&entry=ROM&entry (ROM&location)
; Entries to the Key Manager
08AC lab08AC db #e0,#19 ; &BB00=&19E0 (&08AC) [00] KM_INITIALISE (Initialise the Key anager)
08AE db #1e,#1a ; &BB03=&1A1E (&08AE) [01] KM_RESET (Reset the Key Manager)
08B0 db #3c,#1a ; &BB06=&1A3C (&08B0) [02] KM_WAIT_CHAR (Wait for the next character from the keyboard)
08B2 db #42,#1a ; &BB09=&1A42 (&08B2) [03] KM_READ_CHAR (Test if a character is available from the keyboard)
08B4 db #77,#1a ; &BB0C=&1A77 (&08B4) [04] KM_CHAR_RETURN (Return a single character to the keyboard for next time)
08B6 db #bd,#1a ; &BB0F=&1ABD (&08B6) [05] KM_SET_EXPAND (Set an expansion string)
08B8 db #2e,#1b ; &BB12=&1B2E (&08B8) [06] KM_GET_EXPAND (Get a character from an expansion string)
08BA db #7b,#1a ; &BB15=&1A7B (&08BA) [07] KM_EXP_BUFFER (Allocate a buffer for expansion strings)
08BC db #56,#1b ; &BB18=&1B56 (&08BC) [08] KM_WAIT_KEY (Wait for the next key from the keyboard)
08BE db #5c,#1b ; &BB1B=&1B5C (&08BE) [09] KM_READ_KEY (Test if a key is available from the keyboard)
08C0 db #bd,#1c ; &BB1E=&1CBD (&08C0) [10] KM_TEST_KEY (Test if a key is pressed)
08C2 db #b3,#1b ; &BB21=&1BB3 (&08C2) [11] KM_GET_STATE (Fetch Caps Lock and Shift Lock states)
08C4 db #5c,#1c ; &BB24=&1C5C (&08C4) [12] KM_GET_JOYSTICK (Fetch the current state of the Joystick(s))
08C6 db #52,#1d ; &BB27=&1D52 (&08C6) [13] KM_SET_TRANSLATE (Set entry in key translation table without Shift or Control)
08C8 db #3e,#1d ; &BB2A=&1D3E (&08C8) [14] KM_GET_TRANSLATE (Get entry from key translation table without Shift or Control)
08CA db #57,#1d ; &BB2D=&1D57 (&08CA) [15] KM_SET_SHIFT (Set entry in key translation table when Shift key is pressed)
08CC db #43,#1d ; &BB30=&1D43 (&08CC) [16] KM_GET_SHIFT (Get entry from key translation table when Shift key is pressed)
08CE db #5c,#1d ; &BB33=&1D5C (&08CE) [17] KM_SET_CONTROL (Set entry in key translation table when Control key is pressed)
08D0 db #48,#1d ; &BB36=&1D48 (&08D0) [18] KM_GET_CONTROL (Get entry from key translation table when Control key is pressed)
08D2 db #ab,#1c ; &BB39=&1CAB (&08D2) [19] KM_SET_REPEAT (Set whether a kay may repeat)
08D4 db #a6,#1c ; &BB3C=&1CA6 (&08D4) [20] KM_GET_REPEAT (Ask if a key is allowed to repeat)
08D6 db #6d,#1c ; &BB3F=&1C6D (&08D6) [21] KM_SET_DELAY (Set start up delay and repeat speed)
08D8 db #69,#1c ; &BB42=&1C69 (&08D8) [22] KM_GET_DELAY (Get start up delay and repeat speed)
08DA db #71,#1c ; &BB45=&1C71 (&08DA) [23] KM_ARM_BREAK (Allow break events to be generated)
08DC db #82,#1c ; &BB48=&1C82 (&08DC) [24] KM_DISARM_BREAK (Prevent break events from being generated)
08DE db #90,#1c ; &BB4B=&1C90 (&08DE) [25] KM_BREAK_EVENT (Generate a break event - if armed)
; Entries to the Text VDU
08E0 db #78,#10 ; &BB4E=&1078 (&08E0) [26] TXT_INITIALISE (Initialise the Text VDU)
08E2 db #88,#10 ; &BB51=&1088 (&08E2) [27] TXT_RESET (Reset the Text VDU)
08E4 db #51,#14 ; &BB54=&1451 (&08E4) [28] TXT_VDU_ENABLE (Allow characters to be placed on the screen)
08E6 db #4b,#14 ; &BB57=&144B (&08E6) [29] TXT_VDU_DISABLE (Prevent characters from being placed on the screen)
08E8 db #00,#14 ; &BB5A=&1400 (&08E8) [30] TXT_OUTPUT (Output a character or control code to the Text VDU)
08EA db #34,#13 ; &BB5D=&1334 (&08EA) [31] TXT_WR_CHAR (Write a character onto the screen)
08EC db #ab,#13 ; &BB60=&13AB (&08EC) [32] TXT_RD_CHAR (Read a character from the screen)
08EE db #a7,#13 ; &BB63=&13A7 (&08EE) [33] TXT_SET_GRAPHIC (Turn on or off the Graphics VDU character writing option)
08F0 db #0c,#12 ; &BB66=&120C (&08F0) [34] TXT_WIN_ENABLE (Set the size of the current text window)
08F2 db #56,#12 ; &BB69=&1256 (&08F2) [35] TXT_GET_WINDOW (Get the size of the current text window)
08F4 db #40,#15 ; &BB6C=&1540 (&08F4) [36] TXT_CLEAR_WINDOW (Clear current window)
08F6 db #5e,#11 ; &BB6F=&115E (&08F6) [37] TXT_SET_COLUMN (Set cursor horizontal position)
08F8 db #69,#11 ; &BB72=&1169 (&08F8) [38] TXT_SET_ROW (Set cursor vertical position)
08FA db #74,#11 ; &BB75=&1174 (&08FA) [39] TXT_SET_CURSOR (Set cursor position)
08FC db #80,#11 ; &BB78=&1180 (&08FC) [40] TXT_GET_CURSOR (Ask current cursor position)
08FE db #89,#12 ; &BB7B=&1289 (&08FE) [41] TXT_CUR_ENABLE (Allow cursor display - user)
0900 db #9a,#12 ; &BB7E=&129A (&0900) [42] TXT_CUR_DISABLE (Disallow cursor display - user)
0902 db #79,#12 ; &BB81=&1279 (&0902) [43] TXT_CUR_ON (Allow cursor display - system)
0904 db #81,#12 ; &BB84=&1281 (&0904) [44] TXT_CUR_OFF (Disallow cursor display - system)
0906 db #ce,#11 ; &BB87=&11CE (&0906) [45] TXT_VALIDATE (Check if a cursor position is within a window)
0908 db #68,#12 ; &BB8A=&1268 (&0908) [46] TXT_PLACE_CURSOR (Put a cursor blob on the screen)
090A db #68,#12 ; &BB8D=&1268 (&090A) [47] TXT_REMOVE_CURSOR (Take a cursor blob off the screen)
090C db #a9,#12 ; &BB90=&12A9 (&090C) [48] TXT_SET_PEN (Set ink for writing characters)
090E db #bd,#12 ; &BB93=&12BD (&090E) [49] TXT_GET_PEN (Get ink for writing characters)
0910 db #ae,#12 ; &BB96=&12AE (&0910) [50] TXT_SET_PAPER (Set ink for writing text background)
0912 db #c3,#12 ; &BB99=&12C3 (&0912) [51] TXT_GET_PAPER (Get ink for writing text background)
0914 db #c9,#12 ; &BB9C=&12C9 (&0914) [52] TXT_INVERSE (Swap current pen and paper inks)
0916 db #7a,#13 ; &BB9F=&137A (&0916) [53] TXT_SET_BACK (Allow or disallow background being written)
0918 db #87,#13 ; &BBA2=&1387 (&0918) [54] TXT_GET_BACK (Ask if background is being written)
091A db #d3,#12 ; &BBA5=&12D3 (&091A) [55] TXT_GET_MATRIX (Get the address of a character matrix)
091C db #f1,#12 ; &BBA8=&12F1 (&091C) [56] TXT_SET_MATRIX (Set a character matrix)
091E db #fd,#12 ; &BBAB=&12FD (&091E) [57] TXT_SET_M_TABLE (Set the user defined matrix table address)
0920 db #2a,#13 ; &BBAE=&132A (&0920) [58] TXT_GET_M_TABLE (Get user defined matrix table address)
0922 db #cb,#14 ; &BBB1=&14CB (&0922) [59] TXT_GET_CONTROLS (Fetch address of control code table)
0924 db #e8,#10 ; &BBB4=&10E8 (&0924) [60] TXT_STR_SELECT (Select a Text VDU stream)
0926 db #07,#11 ; &BBB7=&1107 (&0926) [61] TXT_SWAP_STREAMS (Swap the states of two streams)
; Entries to the Graphics VDU
0928 db #b0,#15 ; &BBBA=&15B0 (&0928) [62] GRA_INITIALISE (Initialise the Graphics VDU)
092A db #df,#15 ; &BBBD=&15DF (&092A) [63] GRA_RESET (Reset the Graphics VDU - restore standard indirections)
092C db #f4,#15 ; &BBC0=&15F4 (&092C) [64] GRA_MOVE_ABSOLUTE (Move to an absolute position)
092E db #f1,#15 ; &BBC3=&15F1 (&092E) [65] GRA_MOVE_RELATIVE (Move relative to current position)
0930 db #fc,#15 ; &BBC6=&15FC (&0930) [66] GRA_ASK_CURSOR (Get the current position)
0932 db #04,#16 ; &BBC9=&1604 (&0932) [67] GRA_SET_ORIGIN (Set the origin of the user co-ordinates)
0934 db #12,#16 ; &BBCC=&1612 (&0934) [68] GRA_GET_ORIGIN (Get the origin of the user co-ordinates)
0936 db #34,#17 ; &BBCF=&1734 (&0936) [69] GRA_WIN_WIDTH (Set left and right edges of the graphics window)
0938 db #79,#17 ; &BBD2=&1779 (&0938) [70] GRA_WIN_HEIGHT (Set the top and bottom edges of the graphics window)
093A db #a6,#17 ; &BBD5=&17A6 (&093A) [71] GRA_GET_W_WIDTH (Get the left and right edges of the graphics window)
093C db #bc,#17 ; &BBD8=&17BC (&093C) [72] GRA_GET_W_HEIGHT (Get the top and bottom edges of the graphics window)
093E db #c5,#17 ; &BBDB=&17C5 (&093E) [73] GRA_CLEAR_WINDOW (Clear the graphics window)
0940 db #f6,#17 ; &BBDE=&17F6 (&0940) [74] GRA_SET_PEN (Set the graphics plotting ink)
0942 db #04,#18 ; &BBE1=&1804 (&0942) [75] GRA_GET_PEN (Get the current graphics plotting ink)
0944 db #fd,#17 ; &BBE4=&17FD (&0944) [76] GRA_SET_PAPER (Set the graphics background ink)
0946 db #0a,#18 ; &BBE7=&180A (&0946) [77] GRA_GET_PAPER (Get the current graphics background ink)
0948 db #13,#18 ; &BBEA=&1813 (&0948) [78] GRA_PLOT_ABSOLUTE (Plot a point at an absolute position)
094A db #10,#18 ; &BBED=&1810 (&094A) [79] GRA_PLOT_RELATIVE (Plot a point relative to the current position)
094C db #27,#18 ; &BBF0=&1827 (&094C) [80] GRA_TEST_ABSOLUTE (Test a point at an absolute position)
094E db #24,#18 ; &BBF3=&1824 (&094E) [81] GRA_TEST_RELATIVE (Test a point relative to the current position)
0950 db #39,#18 ; &BBF6=&1839 (&0950) [82] GRA_LINE_ABSOLUTE (Draw a line to an absolute position)
0952 db #36,#18 ; &BBF9=&1836 (&0952) [83] GRA_LINE_RELATIVE (Draw a line relative to the current position)
0954 db #45,#19 ; &BBFC=&1945 (&0954) [84] GRA_WR_CHAR (Put a character on the screen at the current graphics position)
; Entries to the Screen Pack
0956 db #a0,#0a ; &BBFF=&0AA0 (&0956) [85] SCR_INITIALISE (Initialise the Screen Pack)
0958 db #b1,#0a ; &BC02=&0AB1 (&0958) [86] SCR_RESET (Reset the Screen Pack)
095A db #3c,#0b ; &BC05=&0B3C (&095A) [87] SCR_SET_OFFSET (Set the offset of the start of the screen)
095C db #45,#0b ; &BC08=&0B45 (&095C) [88] SCR_SET_BASE (Set the area of RAM to use for the screen memory)
095E db #50,#0b ; &BC0B=&0B50 (&095E) [89] SCR_GET_LOCATION (Fetch current base and offset settings)
0960 db #ca,#0a ; &BC0E=&0ACA (&0960) [90] SCR_SET_MODE (Set screen into a new mode)
0962 db #ec,#0a ; &BC11=&0AEC (&0962) [91] SCR_GET_MODE (Ask the current screen mode)
0964 db #f7,#0a ; &BC14=&0AF7 (&0964) [92] SCR_CLEAR (Clear the screen (to ink 0))
0966 db #57,#0b ; &BC17=&0B57 (&0966) [93] SCR_CHAR_LIMITS (Ask size of the screen in characters)
0968 db #64,#0b ; &BC1A=&0B64 (&0968) [94] SCR_CHAR_POSITION (Convert physical co-ordinates to a screen position)
096A db #a9,#0b ; &BC1D=&0BA9 (&096A) [95] SCR_DOT_POSITION (Convert base co-ordinates to a screen position)
096C db #f9,#0b ; &BC20=&0BF9 (&096C) [96] SCR_NEXT_BYTE (Step a screen address right one byte)
096E db #05,#0c ; &BC23=&0C05 (&096E) [97] SCR_PREV_BYTE (Step a screen address left one byte)
0970 db #13,#0c ; &BC26=&0C13 (&0970) [98] SCR_NEXT_LINE (Step a screen address down one line)
0972 db #2d,#0c ; &BC29=&0C2D (&0972) [99] SCR_PREV_LINE (Step a screen address up one line)
0974 db #86,#0c ; &BC2C=&0C86 (&0974) [100] SCR_INK_ENCODE (Encode an ink to cover all pixels in a byte)
0976 db #a0,#0c ; &BC2F=&0CA0 (&0976) [101] SCR_INK_DECODE (Decode an encoded ink)
0978 db #ec,#0c ; &BC32=&0CEC (&0978) [102] SCR_SET_INK (Set the colours in which to dosplay an ink)
097A db #14,#0d ; &BC35=&0D14 (&097A) [103] SCR_GET_INK (Ask the colours an ink is currently displayed in)
097C db #f1,#0c ; &BC38=&0CF1 (&097C) [104] SCR_SET_BORDER (Set the colours in which to display the border)
097E db #19,#0d ; &BC3B=&0D19 (&097E) [105] SCR_GET_BORDER (Ask the colours the border is currently displayed in)
0980 db #e4,#0c ; &BC3E=&0CE4 (&0980) [106] SCR_SET_FLASHING (Set the flash periods)
0982 db #e8,#0c ; &BC41=&0CE8 (&0982) [107] SCR_GET_FLASHING (Ask the current flash periods)
0984 db #b3,#0d ; &BC44=&0DB3 (&0984) [108] SCR_FILL_BOX (Fill a character area of the screen with an ink)
0986 db #b7,#0d ; &BC47=&0DB7 (&0986) [109] SCR_FLOOD BOX (Fill a byte area of the screen with an ink)
0988 db #df,#0d ; &BC4A=&0DDF (&0988) [110] SCR_CHAR_INVERT (Invert a character position)
098A db #fa,#0d ; &BC4D=&0DFA (&098A) [111] SCR_HW_ROLL (Move the whole screen up or down eight pixel lines (one character))
098C db #3e,#0e ; &BC50=&0E3E (&098C) [112] SCR_SW_ROLL (Move an area of the screen up or down eight pixel lines (one character))
098E db #f3,#0e ; &BC53=&0EF3 (&098E) [113] SCR_SCR_UNPACK (Expand a character matrix for the current screen mode)
0990 db #49,#0f ; &BC56=&0F49 (&0990) [114] SCR_REPACK (Compress a character matrix to the standard form)
0992 db #49,#0c ; &BC59=&0C49 (&0992) [115] SCR_ACCESS (Set the screen write mode for the Graphics VDU)
0994 db #6b,#0c ; &BC5C=&0C6B (&0994) [116] SCR_PIXELS (Write a pixel to the screen ignoring the Graphics VDU write mode)
0996 db #c4,#0f ; &BC5F=&0FC4 (&0996) [117] SCR_HORIZONTAL (Plot a purely horizontal line
0998 db #2f,#10 ; &BC62=&102F (&0998) [118] SCR_VERTICAL (Plot a purely vertical line)
; Entries to the Cassette Manager
099A db #70,#23 ; &BC65=&2370 (&099A) [119] CAS_INITIALISE (Initialise the Cassette Manager)
099C db #7f,#23 ; &BC68=&237F (&099C) [120] CAS_SET_SPEED (Set the write speed)
099E db #8e,#23 ; &BC6B=&238E (&099E) [121] CAS_NOISY (Enable or disable prompt messages)
09A0 db #4b,#2a ; &BC6E=&2A4B (&09A0) [122] CAS_START_MOTOR (Start the cassette motor)
09A2 db #4f,#2a ; &BC71=&2A4F (&09A2) [123] CAS_STOP_MOTOR (Stop the cassette motor)
09A4 db #51,#2a ; &BC74=&2A51 (&09A4) [124] CAS_RESTORE_MOTOR (Restore previous state of cassette motor)
09A6 db #92,#23 ; &BC77=&2392 (&09A6) [125] CAS_IN_OPEN (Open a file for input)
09A8 db #fc,#23 ; &BC7A=&23FC (&09A8) [126] CAS_IN_CLOSE (Close the input file properly)
09AA db #01,#24 ; &BC7D=&2401 (&09AA) [127] CAS_CAS_IN_ABANDON (Close the input file immediately)
09AC db #35,#24 ; &BC80=&2435 (&09AC) [128] CAS_IN_CHAR (Read a character from the input file)
09AE db #ab,#24 ; &BC83=&24AB (&09AE) [129] CAS_IN_DIRECT (Read the input file into store)
09B0 db #9a,#24 ; &BC86=&249A (&09B0) [130] CAS_RETURN (Put the last character read back)
09B2 db #96,#24 ; &BC89=&2496 (&09B2) [131] CAS_TEST_EOF (Have we reached the end of the input file yet?)
09B4 db #ab,#23 ; &BC8C=&23AB (&09B4) [132] CAS_OUT_OPEN (Open a file for output)
09B6 db #15,#24 ; &BC8F=&2415 (&09B6) [133] CAS_OUT_CLOSE (Close the output file properly)
09B8 db #2e,#24 ; &BC92=&242E (&09B8) [134] CAS_OUT_ABANDON (Close the output file immediately)
09BA db #5b,#24 ; &BC95=&245B (&09BA) [135] CAS_OUT_CHAR (Write a character to the output file)
09BC db #ea,#24 ; &BC98=&24EA (&09BC) [136] CAS_OUT_DIRECT (Write the output file directly from store)
09BE db #28,#25 ; &BC9B=&2528 (&09BE) [137] CAS_CATALOG (Generate a catalogue from the tape)
09C0 db #3f,#28 ; &BC9E=&283F (&09C0) [138] CAS_WRITE (Write a record to tape)
09C2 db #36,#28 ; &BCA1=&2836 (&09C2) [139] CAS_READ (Read a record from tape)
09C4 db #51,#28 ; &BCA4=&2851 (&09C4) [140] CAS_CHECK (Compare a record on tape with the contents of store)
; Entries to the Sound Manager
09C6 db #68,#1e ; &BCA7=&1E68 (&09C6) [141] SOUND_RESET (Reset the Sound Manager)
09C8 db #9f,#1f ; &BCAA=&1F9F (&09C8) [142] SOUND_QUEUE (Add a sound to a sound queue)
09CA db #6c,#20 ; &BCAD=&206C (&09CA) [143] SOUND_CHECK (Ask if there is space in a sound queue)
09CC db #89,#20 ; &BCB0=&2089 (&09CC) [144] SOUND_ARM_EVENT (Set up an event to be run when a sound queue becomes not full)
09CE db #4a,#20 ; &BCB3=&204A (&09CE) [145] SOUND_RELEASE (Allow sounds to happen)
09D0 db #cb,#1e ; &BCB6=&1ECB (&09D0) [146] SOUND_HOLD (Stop all sounds in mid flight)
09D2 db #e6,#1e ; &BCB9=&1EE6 (&09D2) [147] SOUND_CONTINUE (Restart sounds after they have been stopped)
09D4 db #38,#23 ; &BCBC=&2338 (&09D4) [148] SOUND_AMPL_ENVELOPE (Set up an amplitude envelope)
09D6 db #3d,#23 ; &BCBF=&233D (&09D6) [149] SOUND_TONE_ENVELOPE (Set up a tone envelope)
09D8 db #49,#23 ; &BCC2=&2349 (&09D8) [150] SOUND_A_ADDRESS (Get the address of an amplitude envelope)
09DA db #4e,#23 ; &BCC5=&234E (&09DA) [151] SOUND_T_ADDRESS (Get the address of a tone envelope)
; Entries to the Kernel
09DC db #5c,#00 ; &BCC8=&005C (&09DC) [152] KL_CHOKE_OFF (Reset the Kernel)
09DE db #29,#03 ; &BCCB=&0329 (&09DE) [153] KL_ROM_WALK (Find and initialise all background ROMs)
09E0 db #32,#03 ; &BCCE=&0332 (&09E0) [154] KL_INIT_BACK (Initialise a particular background ROM)
09E2 db #a1,#02 ; &BCD1=&02A1 (&09E2) [155] KL_LOG_EXT (Introduce an RSX to the firmware)
09E4 db #b2,#02 ; &BCD4=&02B2 (&09E4) [156] KL_FIND_COMMAND (Search for an RSX or background ROM or foreground ROM to process a command)
09E6 db #63,#01 ; &BCD7=&0163 (&09E6) [157] KL_NEW_FRAME_FLY (Initialise and put a block onto the frame flyback list)
09E8 db #6a,#01 ; &BCDA=&016A (&09E8) [158] KL_ADD_FRAME_FLY (Put a block onto the frame flyback list)
09EA db #70,#01 ; &BCDD=&0170 (&09EA) [159] KL_DEL_FRAME_FLY (Remove a block from the frame flyback list)
09EC db #76,#01 ; &BCE0=&0176 (&09EC) [160] KL_NEW_FAST_TICKER (Initialise and put a block onto the fast tick list)
09EE db #7d,#01 ; &BCE3=&017D (&09EE) [161] KL_ADD_FAST_TICKER (Put a block onto the fast tick list)
09F0 db #83,#01 ; &BCE6=&0183 (&09F0) [162] KL_DEL_FAST_TICKER (Remove a block from the fast tick list)
09F2 db #b3,#01 ; &BCE9=&01B3 (&09F2) [163] KL_ADD_TICKER (Put a block on the tick list)
09F4 db #c5,#01 ; &BCEC=&01C5 (&09F4) [164] KL_DEL_TICKER (Remove a block from the tick list)
09F6 db #d2,#01 ; &BCEF=&01D2 (&09F6) [165] KL_INIT_EVENT (Initialise an event block)
09F8 db #e2,#01 ; &BCF2=&01E2 (&09F8) [166] KL_EVENT ('Kick' an event block)
09FA db #28,#02 ; &BCF5=&0228 (&09FA) [167] KL_SYNC_RESET (Clear synchronous event queue)
09FC db #85,#02 ; &BCF8=&0285 (&09FC) [168] KL_DEL_SYNCHRONOUS (Remove a synchronous event from the event queue)
09FE db #56,#02 ; &BCFB=&0256 (&09FE) [169] KL_NEXT_SYNC (Get the next event from the queue)
0A00 db #1a,#02 ; &BCFE=&021A (&0A00) [170] KL_DO_SYNC (Perform an event routine)
0A02 db #77,#02 ; &BD01=&0277 (&0A02) [171] KL_DONE_SYNC (Finish processing an event)
0A04 db #95,#02 ; &BD04=&0295 (&0A04) [172] KL_EVENT_DISABLE (Disable normal synchronous events)
0A06 db #9b,#02 ; &BD07=&029B (&0A06) [173] KL_EVENT_ENABLE (Enable normal synchronous events)
0A08 db #8e,#02 ; &BD0A=&028E (&0A08) [174] KL_DISARM_EVENT (Prevent an event from occurring)
0A0A lab0A0A db #99,#00 ; &BD0D=&0099 (&0A0A) [175] KL_TIME_PLEASE (Ask the elapsed time)
0A0C db #a3,#00 ; &BD10=&00A3 (&0A0C) [176] KL_TIME_SET (Set the elapsed time)
; Entries to the Machine Pack
0A0E db #dc,#05 ; &BD13=&05DC (&0A0E) [177] MC_BOOT_PROGRAM (Load and run a foreground programme)
0A10 db #0b,#06 ; &BD16=&060B (&0A10) [178] MC_START_PROGRAM (Run a foreground programme)
0A12 db #ba,#07 ; &BD19=&07BA (&0A12) [179] MC_WAIT_FLYBACK (Wait for frame flyback)
0A14 db #76,#07 ; &BD1C=&0776 (&0A14) [180] MC_SET_MODE (Set the screen mode)
0A16 db #c6,#07 ; &BD1F=&07C6 (&0A16) [181] MC_SCREEN_OFFSET (Set the screen offset)
0A18 db #86,#07 ; &BD22=&0786 (&0A18) [182] MC_CLEAR_INKS (Set all inks to one colour)
0A1A db #99,#07 ; &BD25=&0799 (&0A1A) [183] MC_SET_INKS (Set colours of all the inks)
0A1C db #e6,#07 ; &BD28=&07E6 (&0A1C) [184] MC_RESET_PRINTER (Reset the printer indirection)
0A1E db #f2,#07 ; &BD2B=&07F2 (&0A1E) [185] MC_PRINT_CHAR (Try to send a character to the Centronics port)
0A20 db #1b,#08 ; &BD2E=&081B (&0A20) [186] MC_BUSY_PRINTER (Test if the Centronics port is busy)
0A22 db #07,#08 ; &BD31=&0807 (&0A22) [187] MC_SEND_PRINTER (Send a character to the Centronics port)
0A24 db #26,#08 ; &BD34=&0826 (&0A24) [188] MC_SOUND_REGISTER (Send data to the sound chip register)
0A26 db #88,#08 ; &BD37=&0888 (&0A26) [189] JUMP_RESTORE (Restore the standard Jumpblocks
; Entries used by BASIC
0A28 db #98,#2a ; &BD3A=&2A98 (&0A28) EDIT
0A2A db #18,#2e ; &BD3D=&2E18 (&0A2A) FLO
0A2C db #29,#2e ; &BD40=&2E29 (&0A2C) FLO
0A2E db #55,#2e ; &BD43=&2E55 (&0A2E) FLO
0A30 lab0A30 db #66,#2e ; &BD46=&2E66 (&0A30) FLO
0A32 db #8e,#2e ; &BD49=&2E8E (&0A32) FLO
0A34 db #a1,#2e ; &BD4C=&2EA1 (&0A34) FLO
0A36 db #ac,#2e ; &BD4F=&2EAC (&0A36) FLO
0A38 db #b6,#2e ; &BD52=&2EB6 (&0A38) FLO
0A3A db #1d,#2f ; &BD55=&2F1D (&0A3A) FLO
0A3C db #3f,#33 ; &BD58=&333F (&0A3C) FLO
0A3E db #37,#33 ; &BD5B=&3337 (&0A3E) FLO
0A40 db #3b,#33 ; &BD5E=&333B (&0A40) FLO
0A42 db #15,#34 ; &BD61=&3415 (&0A42) FLO
0A44 db #9e,#34 ; &BD64=&349E (&0A44) FLO
0A46 db #78,#35 ; &BD67=&3578 (&0A46) FLO
0A48 db #9a,#35 ; &BD6A=&359A (&0A48) FLO
0A4A db #f8,#35 ; &BD6D=&35F8 (&0A4A) FLO
0A4C db #e8,#35 ; &BD70=&35E8 (&0A4C) FLO
0A4E db #ae,#31 ; &BD73=&31AE (&0A4E) FLO
0A50 db #a3,#31 ; &BD76=&31A3 (&0A50) FLO
0A52 db #0a,#31 ; &BD79=&310A (&0A52) FLO
0A54 db #0d,#31 ; &BD7C=&310D (&0A54) FLO
0A56 db #14,#30 ; &BD7F=&3014 (&0A56) FLO
0A58 db #0f,#30 ; &BD82=&300F (&0A58) FLO
0A5A db #90,#30 ; &BD85=&3090 (&0A5A) FLO
0A5C db #bc,#31 ; &BD88=&31BC (&0A5C) FLO
0A5E db #b2,#31 ; &BD8B=&31B2 (&0A5E) FLO
0A60 db #31,#32 ; &BD8E=&3231 (&0A60) FLO
0A62 db #41,#32 ; &BD91=&3241 (&0A62) FLO
0A64 db #5e,#2e ; &BD94=&2E5E (&0A64) FLO
0A66 db #94,#2f ; &BD97=&2F94 (&0A66) FLO
0A68 db #a1,#2f ; &BD9A=&2FA1 (&0A68) FLO
0A6A db #b7,#2f ; &BD9D=&2FB7 (&0A6A) FLO
0A6C db #e6,#2f ; &BDA0=&2FE6 (&0A6C) FLO
0A6E db #08,#37 ; &BDA3=&3708 (&0A6E) INT
0A70 db #0e,#37 ; &BDA6=&370E (&0A70) INT
0A72 db #15,#37 ; &BDA9=&3715 (&0A72) INT
0A74 db #28,#37 ; &BDAC=&3728 (&0A74) INT
0A76 db #31,#37 ; &BDAF=&3731 (&0A76) INT
0A78 db #30,#37 ; &BDB2=&3730 (&0A78) INT
0A7A db #39,#37 ; &BDB5=&3739 (&0A7A) INT
0A7C db #7a,#37 ; &BDB8=&377A (&0A7C) INT
0A7E db #81,#37 ; &BDBB=&3781 (&0A7E) INT
0A80 db #50,#37 ; &BDBE=&3750 (&0A80) INT Unsigned Multiplication
0A82 db #8c,#37 ; &BDC1=&378C (&0A82) INT Unsigned Division
0A84 db #e9,#37 ; &BDC4=&37E9 (&0A84) INT
0A86 db #d4,#37 ; &BDC7=&37D4 (&0A86) INT
0A88 db #e0,#37 ; &BDCA=&37E0 (&0A88) INT
; Routine to create/restore default indirection(s). HL contains the address of a table with details of the particular indirection(s) affected.
0A8A 4E lab0A8A ld c,(hl) ; Get the number of bytes to be transferred (multiple of 3)
0A8B 06 00 ld b,#0 ; BC now contains the number of bytes to be transferred
0A8D 23 inc hl
0A8E 5E ld e,(hl) ; Get low byte of destination
0A8F 23 inc hl
0A90 56 ld d,(hl) ; Get high byte of destination
0A91 23 inc hl
0A92 ED B0 ldir ; Overwrite current indirection entries with original data
0A94 C9 ret
0A95 C7 rst 0
0A96 C7 rst 0
0A97 C7 rst 0
0A98 C7 rst 0
0A99 C7 rst 0
0A9A C7 rst 0
0A9B C7 rst 0
0A9C C7 rst 0
0A9D C7 rst 0
0A9E C7 rst 0
0A9F C7 rst 0
0AA0 11 4D 10 lab0AA0 ld de,lab104D ; &BBFF=&0AA0 (&0956) [85] SCR_INITIALISE (Initialise the Screen Pack)
0AA3 CD 86 07 call lab0786
0AA6 3E C0 ld a,#c0
0AA8 32 CB B1 ld (#b1cb),a
0AAB CD B1 0A call lab0AB1
0AAE C3 F2 0A jp lab0AF2
0AB1 AF lab0AB1 xor a ; &BC02=&0AB1 (&0958) [86] SCR_RESET (Reset the Screen Pack)
0AB2 CD 49 0C call lab0C49
0AB5 21 BE 0A ld hl,lab0ABE
0AB8 CD 8A 0A call lab0A8A
0ABB C3 D2 0C jp lab0CD2
0ABE 09 lab0ABE db #9 ; Number of indirection bytes to restore (multiples of 3) &BC02=&0AB1 (&0958) [86] SCR_RESET (Reset the Screen Pack)
0ABF db #e5,#bd ; Destination address of first indirection to be restored &BDE5 SCR_READ
0AC1 db #c3,#82,#0c ; Indirection entry 01 of 03 (jp #0c82) &BDE5 IND:SCR_READ (Read a pixel from the screen)
0AC4 db #c3,#68,#0c ; Indirection entry 02 of 03 (jp #0c68) &BDE8 IND:SCR_WRITE (Write pixel(s) to the screen using the current graphics write mode)
0AC7 db #c3,#f7,#0a ; Indirection entry 03 of 03 (jp #0af7) &BDEB IND:SCR_MODE_CLEAR (Clear the screen to ink 0)
0ACA E6 03 and #3 ; &BC0E=&0ACA (&0960) [90] SCR_SET_MODE (Set screen into a new mode)
0ACC FE 03 cp #3
0ACE D0 ret nc
0ACF F5 push af
0AD0 CD 4F 0D call lab0D4F
0AD3 F1 pop af
0AD4 5F ld e,a
0AD5 CD B7 10 call lab10B7
0AD8 F5 push af
0AD9 CD D6 15 call lab15D6
0ADC E5 push hl
0ADD 7B ld a,e
0ADE CD 11 0B call lab0B11
0AE1 CD EB BD call #bdeb
0AE4 E1 pop hl
0AE5 CD B6 15 call lab15B6
0AE8 F1 pop af
0AE9 C3 D5 10 jp lab10D5
0AEC 3A C8 B1 lab0AEC ld a,(#b1c8) ; &BC11=&0AEC (&0962) [91] SCR_GET_MODE (Ask the current screen mode)
0AEF FE 01 cp #1
0AF1 C9 ret
0AF2 3E 01 lab0AF2 ld a,#1
0AF4 CD 11 0B call lab0B11
0AF7 CD 4F 0D call lab0D4F ; &BC14=&0AF7 (&0964) [92] SCR_CLEAR (Clear the screen (to ink 0))
0AFA 21 00 00 ld hl,lab0000
0AFD CD 3C 0B call lab0B3C
0B00 2A CA B1 ld hl,(#b1ca)
0B03 2E 00 ld l,#0
0B05 54 ld d,h
0B06 1E 01 ld e,#1
0B08 01 FF 3F ld bc,lab3FFF
0B0B 75 ld (hl),l
0B0C ED B0 ldir
0B0E C3 3C 0D jp lab0D3C
0B11 21 3A 0B lab0B11 ld hl,#0b3a
0B14 FE 01 cp #1
0B16 38 08 jr c,lab0B20
0B18 21 36 0B ld hl,#0b36
0B1B 28 03 jr z,lab0B20
0B1D 21 2E 0B ld hl,lab0B2E
0B20 11 CF B1 lab0B20 ld de,#b1cf
0B23 01 08 00 ld bc,lab0008
0B26 ED B0 ldir
0B28 32 C8 B1 ld (#b1c8),a
0B2B C3 76 07 jp lab0776
; Bitmasks for Modes 2, 1 & 0
0B2E lab0B2E db #80,#40,#20,#10,#08,#04,#02,#01
0B36 lab0B36 db #88,#44,#22,#11
0B3A lab0B3A db #aa,#55
0B3C 7C lab0B3C ld a,h ; &BC05=&0B3C (&095A) [87] SCR_SET_OFFSET (Set the offset of the start of the screen)
0B3D E6 07 and #7
0B3F 67 ld h,a
0B40 22 C9 B1 ld (#b1c9),hl
0B43 18 05 jr lab0B4A
0B45 E6 C0 and #c0 ; &BC08=&0B45 (&095C) [88] SCR_SET_BASE (Set the area of RAM to use for the screen memory)
0B47 32 CB B1 ld (#b1cb),a
0B4A CD 50 0B lab0B4A call lab0B50
0B4D C3 C6 07 jp lab07C6
0B50 2A C9 B1 lab0B50 ld hl,(#b1c9) ; &BC0B=&0B50 (&095E) [89] SCR_GET_LOCATION (Fetch current base and offset settings)
0B53 3A CB B1 ld a,(#b1cb)
0B56 C9 ret
0B57 CD EC 0A lab0B57 call lab0AEC ; &BC17=&0B57 (&0966) [93] SCR_CHAR_LIMITS (Ask size of the screen in characters)
0B5A 01 18 13 ld bc,lab1318
0B5D D8 ret c
0B5E 06 27 ld b,#27
0B60 C8 ret z
0B61 06 4F ld b,#4f
0B63 C9 ret
0B64 D5 lab0B64 push de ; &BC1A=&0B64 (&0968) [94] SCR_CHAR_POSITION (Convert physical co-ordinates to a screen position)
0B65 CD EC 0A call lab0AEC
0B68 06 04 ld b,#4
0B6A 38 05 jr c,lab0B71
0B6C 06 02 ld b,#2
0B6E 28 01 jr z,lab0B71
0B70 05 dec b
0B71 C5 lab0B71 push bc
0B72 5C ld e,h
0B73 16 00 ld d,#0
0B75 62 ld h,d
0B76 D5 push de
0B77 54 ld d,h
0B78 5D ld e,l
0B79 29 add hl,hl
0B7A 29 add hl,hl
0B7B 19 add hl,de
0B7C 29 add hl,hl
0B7D 29 add hl,hl
0B7E 29 add hl,hl
0B7F 29 add hl,hl
0B80 D1 pop de
0B81 19 lab0B81 add hl,de
0B82 10 FD djnz lab0B81
0B84 ED 5B C9 B1 ld de,(#b1c9)
0B88 19 add hl,de
0B89 7C ld a,h
0B8A E6 07 and #7
0B8C 67 ld h,a
0B8D 3A CB B1 ld a,(#b1cb)
0B90 84 add a,h
0B91 67 ld h,a
0B92 C1 pop bc
0B93 D1 pop de
0B94 C9 ret
0B95 7B lab0B95 ld a,e
0B96 95 sub l
0B97 3C inc a
0B98 87 add a,a
0B99 87 add a,a
0B9A 87 add a,a
0B9B 5F ld e,a
0B9C 7A ld a,d
0B9D 94 sub h
0B9E 3C inc a
0B9F 57 ld d,a
0BA0 CD 64 0B call lab0B64
0BA3 AF xor a
0BA4 82 lab0BA4 add a,d
0BA5 10 FD djnz lab0BA4
0BA7 57 ld d,a
0BA8 C9 ret
0BA9 D5 lab0BA9 push de ; &BC1D=&0BA9 (&096A) [95] SCR_DOT_POSITION (Convert base co-ordinates to a screen position)
0BAA EB ex de,hl
0BAB 21 C7 00 ld hl,lab00C7
0BAE B7 or a
0BAF ED 52 sbc hl,de
0BB1 7D ld a,l
0BB2 E6 07 and #7
0BB4 87 add a,a
0BB5 87 add a,a
0BB6 87 add a,a
0BB7 4F ld c,a
0BB8 7D ld a,l
0BB9 E6 F8 and #f8
0BBB 6F ld l,a
0BBC 54 ld d,h
0BBD 5D ld e,l
0BBE 29 add hl,hl
0BBF 29 add hl,hl
0BC0 19 add hl,de
0BC1 29 add hl,hl
0BC2 D1 pop de
0BC3 CD EC 0A call lab0AEC
0BC6 06 01 ld b,#1
0BC8 38 06 jr c,lab0BD0
0BCA 06 03 ld b,#3
0BCC 28 02 jr z,lab0BD0
0BCE 06 07 ld b,#7
0BD0 78 lab0BD0 ld a,b
0BD1 A3 and e
0BD2 F5 push af
0BD3 78 ld a,b
0BD4 0F rrca
0BD5 CB 3A lab0BD5 srl d
0BD7 CB 1B rr e
0BD9 0F rrca
0BDA 38 F9 jr c,lab0BD5
0BDC 19 add hl,de
0BDD ED 5B C9 B1 ld de,(#b1c9)
0BE1 19 add hl,de
0BE2 7C ld a,h
0BE3 E6 07 and #7
0BE5 67 ld h,a
0BE6 3A CB B1 ld a,(#b1cb)
0BE9 84 add a,h
0BEA 81 add a,c
0BEB 67 ld h,a
0BEC F1 pop af
0BED E5 push hl
0BEE 16 00 ld d,#0
0BF0 5F ld e,a
0BF1 21 CF B1 ld hl,#b1cf
0BF4 19 add hl,de
0BF5 4E ld c,(hl)
0BF6 EB ex de,hl
0BF7 E1 pop hl
0BF8 C9 ret
0BF9 2C lab0BF9 inc l ; &BC20=&0BF9 (&096C) [96] SCR_NEXT_BYTE (Step a screen address right one byte)
0BFA C0 ret nz
0BFB 24 inc h
0BFC 7C ld a,h
0BFD E6 07 and #7
0BFF C0 ret nz
0C00 7C ld a,h
0C01 D6 08 sub #8
0C03 67 ld h,a
0C04 C9 ret
0C05 7D ld a,l ; &BC23=&0C05 (&096E) [97] SCR_PREV_BYTE (Step a screen address left one byte)
0C06 2D dec l
0C07 B7 or a
0C08 C0 ret nz
0C09 7C ld a,h
0C0A 25 dec h
0C0B E6 07 and #7
0C0D C0 ret nz
0C0E 7C ld a,h
0C0F C6 08 add a,#8
0C11 67 ld h,a
0C12 C9 ret
0C13 7C lab0C13 ld a,h ; &BC26=&0C13 (&0970) [98] SCR_NEXT_LINE (Step a screen address down one line)
0C14 C6 08 add a,#8
0C16 67 ld h,a
0C17 E6 38 and #38
0C19 C0 ret nz
0C1A 7C ld a,h
0C1B D6 40 sub #40
0C1D 67 ld h,a
0C1E 7D ld a,l
0C1F C6 50 add a,#50
0C21 6F ld l,a
0C22 D0 ret nc
0C23 24 inc h
0C24 7C ld a,h
0C25 E6 07 and #7
0C27 C0 ret nz
0C28 7C ld a,h
0C29 D6 08 sub #8
0C2B 67 ld h,a
0C2C C9 ret
0C2D 7C lab0C2D ld a,h ; &BC29=&0C2D (&0972) [99] SCR_PREV_LINE (Step a screen address up one line)
0C2E D6 08 sub #8
0C30 67 ld h,a
0C31 E6 38 and #38
0C33 FE 38 cp #38
0C35 C0 ret nz
0C36 7C ld a,h
0C37 C6 40 add a,#40
0C39 67 ld h,a
0C3A 7D ld a,l
0C3B D6 50 sub #50
0C3D 6F ld l,a
0C3E D0 ret nc
0C3F 7C ld a,h
0C40 25 dec h
0C41 E6 07 and #7
0C43 C0 ret nz
0C44 7C ld a,h
0C45 C6 08 add a,#8
0C47 67 ld h,a
0C48 C9 ret
0C49 E6 03 lab0C49 and #3 ; &BC59=&0C49 (&0992) [115] SCR_ACCESS (Set the screen write mode for the Graphics VDU)
0C4B 21 6B 0C ld hl,lab0C6B
0C4E 28 0F jr z,lab0C5F
0C50 FE 02 cp #2
0C52 21 72 0C ld hl,lab0C72
0C55 38 08 jr c,lab0C5F
0C57 21 77 0C ld hl,lab0C77
0C5A 28 03 jr z,lab0C5F
0C5C 21 7D 0C ld hl,lab0C7D
0C5F 3E C3 lab0C5F ld a,#c3
0C61 32 CC B1 ld (#b1cc),a
0C64 22 CD B1 ld (#b1cd),hl
0C67 C9 ret
0C68 C3 CC B1 jp #b1cc
0C6B 7E lab0C6B ld a,(hl) ; &BC5C=&0C6B (&0994) [116] SCR_PIXELS (Write a pixel to the screen ignoring the Graphics VDU write mode)
0C6C A8 xor b
0C6D B1 or c
0C6E A9 xor c
0C6F A8 xor b
0C70 77 ld (hl),a
0C71 C9 ret
0C72 78 lab0C72 ld a,b
0C73 A1 and c
0C74 AE xor (hl)
0C75 77 ld (hl),a
0C76 C9 ret
0C77 79 lab0C77 ld a,c
0C78 2F cpl
0C79 B0 or b
0C7A A6 and (hl)
0C7B 77 ld (hl),a
0C7C C9 ret
0C7D 78 lab0C7D ld a,b
0C7E A1 and c
0C7F B6 or (hl)
0C80 77 ld (hl),a
0C81 C9 ret
0C82 7E ld a,(hl)
0C83 C3 AC 0C jp lab0CAC
0C86 C5 lab0C86 push bc ; &BC2C=&0C86 (&0974) [100] SCR_INK_ENCODE (Encode an ink to cover all pixels in a byte)
0C87 D5 push de
0C88 CD C2 0C call lab0CC2
0C8B 5F ld e,a
0C8C 06 08 ld b,#8
0C8E 3A CF B1 ld a,(#b1cf)
0C91 4F ld c,a
0C92 CB 0B lab0C92 rrc e
0C94 17 rla
0C95 CB 09 rrc c
0C97 38 02 jr c,lab0C9B
0C99 CB 03 rlc e
0C9B 10 F5 lab0C9B djnz lab0C92
0C9D D1 pop de
0C9E C1 pop bc
0C9F C9 ret
0CA0 C5 lab0CA0 push bc ; &BC2F=&0CA0 (&0976) [101] SCR_INK_DECODE (Decode an encoded ink)
0CA1 47 ld b,a
0CA2 3A CF B1 ld a,(#b1cf)
0CA5 4F ld c,a
0CA6 78 ld a,b
0CA7 CD AC 0C call lab0CAC
0CAA C1 pop bc
0CAB C9 ret
0CAC D5 lab0CAC push de
0CAD 11 08 00 ld de,lab0008
0CB0 0F lab0CB0 rrca
0CB1 CB 12 rl d
0CB3 CB 09 rrc c
0CB5 38 02 jr c,lab0CB9
0CB7 CB 1A rr d
0CB9 1D lab0CB9 dec e
0CBA 20 F4 jr nz,lab0CB0
0CBC 7A ld a,d
0CBD CD C2 0C call lab0CC2
0CC0 D1 pop de
0CC1 C9 ret
0CC2 57 lab0CC2 ld d,a
0CC3 CD EC 0A call lab0AEC
0CC6 7A ld a,d
0CC7 D0 ret nc
0CC8 0F rrca
0CC9 0F rrca
0CCA CE 00 adc a,#0
0CCC 0F rrca
0CCD 9F sbc a,a
0CCE E6 06 and #6
0CD0 AA xor d
0CD1 C9 ret
0CD2 21 4D 10 lab0CD2 ld hl,lab104D
0CD5 11 D9 B1 ld de,#b1d9
0CD8 01 22 00 ld bc,#0022
0CDB ED B0 ldir
0CDD AF xor a
0CDE 32 FB B1 ld (#b1fb),a
0CE1 21 0A 0A ld hl,lab0A0A
0CE4 22 D7 B1 ld (#b1d7),hl ; &BC3E=&0CE4 (&0980) [106] SCR_SET_FLASHING (Set the flash periods)
0CE7 C9 ret
0CE8 2A D7 B1 ld hl,(#b1d7) ; &BC41=&0CE8 (&0982) [107] SCR_GET_FLASHING (Ask the current flash periods)
0CEB C9 ret
0CEC E6 0F lab0CEC and #f ; &BC32=&0CEC (&0978) [102] SCR_SET_INK (Set the colours in which to dosplay an ink)
0CEE 3C inc a
0CEF 18 01 jr lab0CF2
0CF1 AF lab0CF1 xor a ; &BC38=&0CF1 (&097C) [104] SCR_SET_BORDER (Set the colours in which to display the border)
0CF2 5F lab0CF2 ld e,a
0CF3 78 ld a,b
0CF4 CD 0A 0D call lab0D0A
0CF7 46 ld b,(hl)
0CF8 79 ld a,c
0CF9 CD 0A 0D call lab0D0A
0CFC 4E ld c,(hl)
0CFD 7B ld a,e
0CFE CD 2F 0D call lab0D2F
0D01 71 ld (hl),c
0D02 EB ex de,hl
0D03 70 ld (hl),b
0D04 3E FF ld a,#ff
0D06 32 FC B1 ld (#b1fc),a
0D09 C9 ret
0D0A E6 1F lab0D0A and #1f
0D0C C6 93 add a,#93
0D0E 6F ld l,a
0D0F CE 0D adc a,#d
0D11 95 sub l
0D12 67 ld h,a
0D13 C9 ret
0D14 E6 0F and #f ; &BC35=&0D14 (&097A) [103] SCR_GET_INK (Ask the colours an ink is currently displayed in)
0D16 3C inc a
0D17 18 01 jr lab0D1A
0D19 AF xor a ; &BC3B=&0D19 (&097E) [105] SCR_GET_BORDER (Ask the colours the border is currently displayed in)
0D1A CD 2F 0D lab0D1A call lab0D2F
0D1D 1A ld a,(de)
0D1E 5E ld e,(hl)
0D1F CD 24 0D call lab0D24
0D22 41 ld b,c
0D23 7B ld a,e
0D24 0E 00 lab0D24 ld c,#0
0D26 21 93 0D ld hl,lab0D93
0D29 BE lab0D29 cp (hl)
0D2A C8 ret z
0D2B 23 inc hl
0D2C 0C inc c
0D2D 18 FA jr lab0D29
0D2F 5F lab0D2F ld e,a
0D30 16 00 ld d,#0
0D32 21 EA B1 ld hl,#b1ea
0D35 19 add hl,de
0D36 EB ex de,hl
0D37 21 EF FF ld hl,#ffef
0D3A 19 add hl,de
0D3B C9 ret
0D3C 21 FE B1 lab0D3C ld hl,#b1fe
0D3F E5 push hl
0D40 CD 70 01 call lab0170
0D43 CD 6D 0D call lab0D6D
0D46 11 5B 0D ld de,lab0D5B
0D49 06 81 ld b,#81
0D4B E1 pop hl
0D4C C3 63 01 jp lab0163
0D4F 21 FE B1 lab0D4F ld hl,#b1fe
0D52 CD 70 01 call lab0170
0D55 CD 81 0D call lab0D81
0D58 C3 86 07 jp lab0786
0D5B 21 FD B1 lab0D5B ld hl,#b1fd
0D5E 35 dec (hl)
0D5F 28 0C jr z,lab0D6D
0D61 2B dec hl
0D62 7E ld a,(hl)
0D63 B7 or a
0D64 C8 ret z
0D65 CD 81 0D call lab0D81
0D68 CD 99 07 call lab0799
0D6B 18 0F jr lab0D7C
0D6D CD 81 0D lab0D6D call lab0D81
0D70 32 FD B1 ld (#b1fd),a
0D73 CD 99 07 call lab0799
0D76 21 FB B1 ld hl,#b1fb
0D79 7E ld a,(hl)
0D7A 2F cpl
0D7B 77 ld (hl),a
0D7C AF lab0D7C xor a
0D7D 32 FC B1 ld (#b1fc),a
0D80 C9 ret
0D81 11 EA B1 lab0D81 ld de,#b1ea
0D84 3A FB B1 ld a,(#b1fb)
0D87 B7 or a
0D88 3A D8 B1 ld a,(#b1d8)
0D8B C8 ret z
0D8C 11 D9 B1 ld de,#b1d9
0D8F 3A D7 B1 ld a,(#b1d7)
0D92 C9 ret
0D93 lab0D93 db #14,#04,#15,#1c,#18,#1d,#0c,#05 ; Table to convert colour number to hardware colour number
0D9B db #0d,#16,#06,#17,#1e,#00,#1f,#0e
0DA3 db #07,#0f,#12,#02,#13,#1a,#19,#1b
0DAB db #0a,#03,#0b,#01,#08,#09,#10,#11
0DB3 4F lab0DB3 ld c,a ; &BC44=&0DB3 (&0984) [108] SCR_FILL_BOX (Fill a character area of the screen with an ink)
0DB4 CD 95 0B call lab0B95
0DB7 E5 lab0DB7 push hl ; &BC47=&0DB7 (&0986) [109] SCR_FLOOD BOX (Fill a byte area of the screen with an ink)
0DB8 7A ld a,d
0DB9 CD E8 0E call lab0EE8
0DBC 30 09 jr nc,lab0DC7
0DBE 42 ld b,d
0DBF 71 lab0DBF ld (hl),c
0DC0 CD F9 0B call lab0BF9
0DC3 10 FA djnz lab0DBF
0DC5 18 10 jr lab0DD7
0DC7 C5 lab0DC7 push bc
0DC8 D5 push de
0DC9 71 ld (hl),c
0DCA 15 dec d
0DCB 28 08 jr z,lab0DD5
0DCD 4A ld c,d
0DCE 06 00 ld b,#0
0DD0 54 ld d,h
0DD1 5D ld e,l
0DD2 13 inc de
0DD3 ED B0 ldir
0DD5 D1 lab0DD5 pop de
0DD6 C1 pop bc
0DD7 E1 lab0DD7 pop hl
0DD8 CD 13 0C call lab0C13
0DDB 1D dec e
0DDC 20 D9 jr nz,lab0DB7
0DDE C9 ret
0DDF 78 lab0DDF ld a,b ; &BC4A=&0DDF (&0988) [110] SCR_CHAR_INVERT (Invert a character position)
0DE0 A9 xor c
0DE1 4F ld c,a
0DE2 CD 64 0B call lab0B64
0DE5 16 08 ld d,#8
0DE7 E5 lab0DE7 push hl
0DE8 C5 push bc
0DE9 7E lab0DE9 ld a,(hl)
0DEA A9 xor c
0DEB 77 ld (hl),a
0DEC CD F9 0B call lab0BF9
0DEF 10 F8 djnz lab0DE9
0DF1 C1 pop bc
0DF2 E1 pop hl
0DF3 CD 13 0C call lab0C13
0DF6 15 dec d
0DF7 20 EE jr nz,lab0DE7
0DF9 C9 ret
0DFA 4F lab0DFA ld c,a ; &BC4D=&0DFA (&098A) [111] SCR_HW_ROLL (Move the whole screen up or down eight pixel lines (one character))
0DFB C5 push bc
0DFC 11 D0 FF ld de,#ffd0
0DFF 06 30 ld b,#30
0E01 CD 24 0E call lab0E24
0E04 C1 pop bc
0E05 CD BA 07 call lab07BA
0E08 78 ld a,b
0E09 B7 or a
0E0A 20 0D jr nz,lab0E19
0E0C 11 B0 FF ld de,#ffb0
0E0F CD 37 0E call lab0E37
0E12 11 00 00 ld de,lab0000
0E15 06 20 ld b,#20
0E17 18 0B jr lab0E24
0E19 11 50 00 lab0E19 ld de,#0050
0E1C CD 37 0E call lab0E37
0E1F 11 B0 FF ld de,#ffb0
0E22 06 20 ld b,#20
0E24 2A C9 B1 lab0E24 ld hl,(#b1c9)
0E27 19 add hl,de
0E28 7C ld a,h
0E29 E6 07 and #7
0E2B 67 ld h,a
0E2C 3A CB B1 ld a,(#b1cb)
0E2F 84 add a,h
0E30 67 ld h,a
0E31 50 ld d,b
0E32 1E 08 ld e,#8
0E34 C3 B7 0D jp lab0DB7
0E37 2A C9 B1 lab0E37 ld hl,(#b1c9)
0E3A 19 add hl,de
0E3B C3 3C 0B jp lab0B3C
0E3E F5 lab0E3E push af ; &BC50=&0E3E (&098C) [112] SCR_SW_ROLL (Move an area of the screen up or down eight pixel lines (one character))
0E3F 78 ld a,b
0E40 B7 or a
0E41 28 30 jr z,lab0E73
0E43 E5 push hl
0E44 CD 95 0B call lab0B95
0E47 E3 ex (sp),hl
0E48 2C inc l
0E49 CD 64 0B call lab0B64
0E4C 4A ld c,d
0E4D 7B ld a,e
0E4E D6 08 sub #8
0E50 47 ld b,a
0E51 28 17 jr z,lab0E6A
0E53 D1 pop de
0E54 CD BA 07 call lab07BA
0E57 C5 lab0E57 push bc
0E58 E5 push hl
0E59 D5 push de
0E5A CD A4 0E call lab0EA4
0E5D E1 pop hl
0E5E CD 13 0C call lab0C13
0E61 EB ex de,hl
0E62 E1 pop hl
0E63 CD 13 0C call lab0C13
0E66 C1 pop bc
0E67 10 EE djnz lab0E57
0E69 D5 push de
0E6A E1 lab0E6A pop hl
0E6B 51 ld d,c
0E6C 1E 08 ld e,#8
0E6E F1 pop af
0E6F 4F ld c,a
0E70 C3 B7 0D jp lab0DB7
0E73 E5 lab0E73 push hl
0E74 D5 push de
0E75 CD 95 0B call lab0B95
0E78 4A ld c,d
0E79 7B ld a,e
0E7A D6 08 sub #8
0E7C 47 ld b,a
0E7D D1 pop de
0E7E E3 ex (sp),hl
0E7F 28 E9 jr z,lab0E6A
0E81 C5 push bc
0E82 6B ld l,e
0E83 54 ld d,h
0E84 1C inc e
0E85 CD 64 0B call lab0B64
0E88 EB ex de,hl
0E89 CD 64 0B call lab0B64
0E8C C1 pop bc
0E8D CD BA 07 call lab07BA
0E90 CD 2D 0C lab0E90 call lab0C2D
0E93 E5 push hl
0E94 EB ex de,hl
0E95 CD 2D 0C call lab0C2D
0E98 E5 push hl
0E99 C5 push bc
0E9A CD A4 0E call lab0EA4
0E9D C1 pop bc
0E9E D1 pop de
0E9F E1 pop hl
0EA0 10 EE djnz lab0E90
0EA2 18 C6 jr lab0E6A
0EA4 06 00 lab0EA4 ld b,#0
0EA6 CD E6 0E call lab0EE6
0EA9 38 16 jr c,lab0EC1
0EAB CD E6 0E call lab0EE6
0EAE 30 25 jr nc,lab0ED5
0EB0 C5 push bc
0EB1 AF xor a
0EB2 95 sub l
0EB3 4F ld c,a
0EB4 ED B0 ldir
0EB6 C1 pop bc
0EB7 2F cpl
0EB8 3C inc a
0EB9 81 add a,c
0EBA 4F ld c,a
0EBB 7C ld a,h
0EBC D6 08 sub #8
0EBE 67 ld h,a
0EBF 18 14 jr lab0ED5
0EC1 CD E6 0E lab0EC1 call lab0EE6
0EC4 38 12 jr c,lab0ED8
0EC6 C5 push bc
0EC7 AF xor a
0EC8 93 sub e
0EC9 4F ld c,a
0ECA ED B0 ldir
0ECC C1 pop bc
0ECD 2F cpl
0ECE 3C inc a
0ECF 81 add a,c
0ED0 4F ld c,a
0ED1 7A ld a,d
0ED2 D6 08 sub #8
0ED4 57 ld d,a
0ED5 ED B0 lab0ED5 ldir
0ED7 C9 ret
0ED8 41 lab0ED8 ld b,c
0ED9 7E lab0ED9 ld a,(hl)
0EDA 12 ld (de),a
0EDB CD F9 0B call lab0BF9
0EDE EB ex de,hl
0EDF CD F9 0B call lab0BF9
0EE2 EB ex de,hl
0EE3 10 F4 djnz lab0ED9
0EE5 C9 ret
0EE6 79 lab0EE6 ld a,c
0EE7 EB ex de,hl
0EE8 3D lab0EE8 dec a
0EE9 85 add a,l
0EEA D0 ret nc
0EEB 7C ld a,h
0EEC E6 07 and #7
0EEE EE 07 xor #7
0EF0 C0 ret nz
0EF1 37 scf
0EF2 C9 ret
0EF3 CD EC 0A lab0EF3 call lab0AEC ; &BC53=&0EF3 (&098E) [113] SCR_SCR_UNPACK (Expand a character matrix for the current screen mode)
0EF6 06 08 ld b,#8
0EF8 38 31 jr c,lab0F2B
0EFA 28 06 jr z,lab0F02
0EFC 01 08 00 ld bc,lab0008
0EFF ED B0 ldir
0F01 C9 ret
0F02 4E lab0F02 ld c,(hl)
0F03 23 inc hl
0F04 E5 push hl
0F05 C5 push bc
0F06 06 04 ld b,#4
0F08 21 CF B1 ld hl,#b1cf
0F0B AF xor a
0F0C CB 01 lab0F0C rlc c
0F0E 30 01 jr nc,lab0F11
0F10 B6 or (hl)
0F11 23 lab0F11 inc hl
0F12 10 F8 djnz lab0F0C
0F14 12 ld (de),a
0F15 13 inc de
0F16 06 04 ld b,#4
0F18 21 CF B1 ld hl,#b1cf
0F1B AF xor a
0F1C CB 01 lab0F1C rlc c
0F1E 30 01 jr nc,lab0F21
0F20 B6 or (hl)
0F21 23 lab0F21 inc hl
0F22 10 F8 djnz lab0F1C
0F24 12 ld (de),a
0F25 13 inc de
0F26 C1 pop bc
0F27 E1 pop hl
0F28 10 D8 djnz lab0F02
0F2A C9 ret
0F2B 4E lab0F2B ld c,(hl)
0F2C 23 inc hl
0F2D E5 push hl
0F2E C5 push bc
0F2F 06 04 ld b,#4
0F31 AF lab0F31 xor a
0F32 21 CF B1 ld hl,#b1cf
0F35 CB 01 rlc c
0F37 30 01 jr nc,lab0F3A
0F39 7E ld a,(hl)
0F3A 23 lab0F3A inc hl
0F3B CB 01 rlc c
0F3D 30 01 jr nc,lab0F40
0F3F B6 or (hl)
0F40 12 lab0F40 ld (de),a
0F41 13 inc de
0F42 10 ED djnz lab0F31
0F44 C1 pop bc
0F45 E1 pop hl
0F46 10 E3 djnz lab0F2B
0F48 C9 ret
0F49 4F lab0F49 ld c,a ; &BC56=&0F49 (&0990) [114] SCR_REPACK (Compress a character matrix to the standard form)
0F4A CD 64 0B call lab0B64
0F4D CD EC 0A call lab0AEC
0F50 06 08 ld b,#8
0F52 38 45 jr c,lab0F99
0F54 28 0B jr z,lab0F61
0F56 7E lab0F56 ld a,(hl)
0F57 A9 xor c
0F58 2F cpl
0F59 12 ld (de),a
0F5A 13 inc de
0F5B CD 13 0C call lab0C13
0F5E 10 F6 djnz lab0F56
0F60 C9 ret
0F61 E5 lab0F61 push hl
0F62 D5 push de
0F63 E5 push hl
0F64 7E ld a,(hl)
0F65 A9 xor c
0F66 21 CF B1 ld hl,#b1cf
0F69 16 04 ld d,#4
0F6B F5 lab0F6B push af
0F6C A6 and (hl)
0F6D 20 01 jr nz,lab0F70
0F6F 37 scf
0F70 CB 13 lab0F70 rl e
0F72 23 inc hl
0F73 F1 pop af
0F74 15 dec d
0F75 20 F4 jr nz,lab0F6B
0F77 E1 pop hl
0F78 CD F9 0B call lab0BF9
0F7B 7E ld a,(hl)
0F7C A9 xor c
0F7D 21 CF B1 ld hl,#b1cf
0F80 16 04 ld d,#4
0F82 F5 lab0F82 push af
0F83 A6 and (hl)
0F84 20 01 jr nz,lab0F87
0F86 37 scf
0F87 CB 13 lab0F87 rl e
0F89 23 inc hl
0F8A F1 pop af
0F8B 15 dec d
0F8C 20 F4 jr nz,lab0F82
0F8E E1 pop hl
0F8F 73 ld (hl),e
0F90 EB ex de,hl
0F91 13 inc de
0F92 E1 pop hl
0F93 CD 13 0C call lab0C13
0F96 10 C9 djnz lab0F61
0F98 C9 ret
0F99 E5 lab0F99 push hl
0F9A D5 push de
0F9B 16 04 ld d,#4
0F9D 7E lab0F9D ld a,(hl)
0F9E E5 push hl
0F9F A9 xor c
0FA0 F5 push af
0FA1 21 CF B1 ld hl,#b1cf
0FA4 A6 and (hl)
0FA5 20 01 jr nz,lab0FA8
0FA7 37 scf
0FA8 CB 13 lab0FA8 rl e
0FAA F1 pop af
0FAB 23 inc hl
0FAC A6 and (hl)
0FAD 20 01 jr nz,lab0FB0
0FAF 37 scf
0FB0 CB 13 lab0FB0 rl e
0FB2 E1 pop hl
0FB3 CD F9 0B call lab0BF9
0FB6 15 dec d
0FB7 20 E4 jr nz,lab0F9D
0FB9 E1 pop hl
0FBA 73 ld (hl),e
0FBB EB ex de,hl
0FBC 13 inc de
0FBD E1 pop hl
0FBE CD 13 0C call lab0C13
0FC1 10 D6 djnz lab0F99
0FC3 C9 ret
0FC4 F5 lab0FC4 push af ; &BC5F=&0FC4 (&0996) [117] SCR_HORIZONTAL (Plot a purely horizontal line
0FC5 E5 push hl
0FC6 7A ld a,d
0FC7 2F cpl
0FC8 67 ld h,a
0FC9 7B ld a,e
0FCA 2F cpl
0FCB 6F ld l,a
0FCC 23 inc hl
0FCD 09 add hl,bc
0FCE 23 inc hl
0FCF E3 ex (sp),hl
0FD0 AF xor a
0FD1 93 sub e
0FD2 F5 push af
0FD3 CD A9 0B call lab0BA9
0FD6 E5 push hl
0FD7 78 ld a,b
0FD8 2F cpl
0FD9 6F ld l,a
0FDA 26 FF ld h,#ff
0FDC 22 07 B2 ld (#b207),hl
0FDF E1 pop hl
0FE0 F1 pop af
0FE1 A0 and b
0FE2 47 ld b,a
0FE3 28 45 jr z,lab102A
0FE5 E3 ex (sp),hl
0FE6 18 03 jr lab0FEB
0FE8 1A lab0FE8 ld a,(de)
0FE9 B1 or c
0FEA 4F ld c,a
0FEB 2B lab0FEB dec hl
0FEC 7C ld a,h
0FED B5 or l
0FEE 28 34 jr z,lab1024
0FF0 13 inc de
0FF1 10 F5 djnz lab0FE8
0FF3 EB ex de,hl
0FF4 E1 pop hl
0FF5 F1 pop af
0FF6 47 ld b,a
0FF7 CD E8 BD call #bde8
0FFA CD F9 0B call lab0BF9
0FFD E5 lab0FFD push hl
0FFE 2A 07 B2 lab0FFE ld hl,(#b207)
1001 19 add hl,de
1002 30 0C jr nc,lab1010
1004 EB ex de,hl
1005 E1 pop hl
1006 0E FF ld c,#ff
1008 CD E8 BD call #bde8
100B CD F9 0B call lab0BF9
100E 18 ED jr lab0FFD
1010 7B lab1010 ld a,e
1011 B7 or a
1012 28 0E jr z,lab1022
1014 AF xor a
1015 21 CF B1 ld hl,#b1cf
1018 B6 lab1018 or (hl)
1019 23 inc hl
101A 1D dec e
101B 20 FB jr nz,lab1018
101D 4F ld c,a
101E E1 pop hl
101F C3 E8 BD jp #bde8
1022 E1 lab1022 pop hl
1023 C9 ret
1024 E1 lab1024 pop hl
1025 F1 pop af
1026 47 ld b,a
1027 C3 E8 BD jp #bde8
102A D1 lab102A pop de
102B F1 pop af
102C 47 ld b,a
102D 18 CE jr lab0FFD
102F F5 lab102F push af ; &BC62=&102F (&0998) [118] SCR_VERTICAL (Plot a purely vertical line)
1030 E5 push hl
1031 7C ld a,h
1032 2F cpl
1033 67 ld h,a
1034 7D ld a,l
1035 2F cpl
1036 6F ld l,a
1037 23 inc hl
1038 09 add hl,bc
1039 23 inc hl
103A E3 ex (sp),hl
103B CD A9 0B call lab0BA9
103E D1 pop de
103F F1 pop af
1040 47 ld b,a
1041 CD E8 BD lab1041 call #bde8
1044 CD 2D 0C call lab0C2D
1047 1B dec de
1048 7A ld a,d
1049 B3 or e
104A 20 F5 jr nz,lab1041
104C C9 ret
104D lab104D db #04,#04,#0a,#13,#0c,#0b,#14,#15 ; Default colour palette using hardware colour numbers. Two palettes so that flashing colours can be defined.
1055 db #0d,#06,#1e,#1f,#07,#12,#19,#04
105D db #17,#04,#04,#0a,#13,#0c,#0b,#14
1065 db #15,#0d,#06,#1e,#1f,#07,#12,#19
106D db #0a,#07
106F C7 rst 0
1070 C7 rst 0
1071 C7 rst 0
1072 C7 rst 0
1073 C7 rst 0
1074 C7 rst 0
1075 C7 rst 0
1076 C7 rst 0
1077 C7 rst 0
1078 CD 88 10 lab1078 call lab1088 ; &BB4E=&1078 (&08E0) [26] TXT_INITIALISE (Initialise the Text VDU)
107B AF xor a
107C 32 95 B2 ld (#b295),a
107F 21 01 00 ld hl,#0001
1082 CD 3D 11 call lab113D
1085 C3 A3 10 jp lab10A3
1088 21 91 10 lab1088 ld hl,lab1091 ; &BB51=&1088 (&08E2) [27] TXT_RESET (Reset the Text VDU)
108B CD 8A 0A call lab0A8A
108E C3 5B 14 jp lab145B
1091 0F lab1091 db #f ; Number of indirection bytes to restore (multiples of 3) &BB51=&1088 (&08E2) [27] TXT_RESET (Reset the Text VDU)
1092 db #cd,#bd ; Destination address of first indirection to be restored &BDCD TXT_DRAW_CURSOR
1094 db #c3,#63,#12 ; Indirection entry 01 of 05 (jp #1263) &BDCD IND:TXT_DRAW_CURSOR (Place the cursor blob on the screen (if enabled))
1097 db #c3,#63,#12 ; Indirection entry 02 of 03 (jp #1263) &BDD0 IND:TXT_UNDRAW_CURSOR (Remove the cursor blob from the screen (if enabled))
109A db #c3,#4a,#13 ; Indirection entry 03 of 03 (jp #134a) &BDD3 IND:TXT_WRITE_CHAR (Write a character onto the screen)
109D db #c3,#c0,#13 ; Indirection entry 04 of 03 (jp #13c0) &BDD6 IND:TXT_UNWRITE (Read a character from the screen)
10A0 db #c3,#0c,#14 ; Indirection entry 05 of 03 (jp #140c) &BDD9 IND:TXT_OUT_ACTION (Output a character or control code)
10A3 3E 08 lab10A3 ld a,#8
10A5 11 0D B2 ld de,#b20d
10A8 21 85 B2 lab10A8 ld hl,#b285
10AB 01 0F 00 ld bc,lab000F
10AE ED B0 ldir
10B0 3D dec a
10B1 20 F5 jr nz,lab10A8
10B3 32 0C B2 ld (#b20c),a
10B6 C9 ret
10B7 3A 0C B2 lab10B7 ld a,(#b20c)
10BA 4F ld c,a
10BB 06 08 ld b,#8
10BD 78 lab10BD ld a,b
10BE 3D dec a
10BF CD E8 10 call lab10E8
10C2 CD D0 BD call #bdd0
10C5 CD C3 12 call lab12C3
10C8 32 90 B2 ld (#b290),a
10CB CD BD 12 call lab12BD
10CE 32 8F B2 ld (#b28f),a
10D1 10 EA djnz lab10BD
10D3 79 ld a,c
10D4 C9 ret
10D5 4F lab10D5 ld c,a
10D6 06 08 ld b,#8
10D8 78 lab10D8 ld a,b
10D9 3D dec a
10DA CD E8 10 call lab10E8
10DD C5 push bc
10DE 2A 8F B2 ld hl,(#b28f)
10E1 CD 3D 11 call lab113D
10E4 C1 pop bc
10E5 10 F1 djnz lab10D8
10E7 79 ld a,c
10E8 E6 07 lab10E8 and #7 ; &BBB4=&10E8 (&0924) [60] TXT_STR_SELECT (Select a Text VDU stream)
10EA 21 0C B2 ld hl,#b20c
10ED BE cp (hl)
10EE C8 ret z
10EF C5 push bc
10F0 D5 push de
10F1 4E ld c,(hl)
10F2 77 ld (hl),a
10F3 47 ld b,a
10F4 79 ld a,c
10F5 CD 2A 11 call lab112A
10F8 CD 22 11 call lab1122
10FB 78 ld a,b
10FC CD 2A 11 call lab112A
10FF EB ex de,hl
1100 CD 22 11 call lab1122
1103 79 ld a,c
1104 D1 pop de
1105 C1 pop bc
1106 C9 ret
1107 3A 0C B2 ld a,(#b20c) ; &BBB7=&1107 (&0926) [61] TXT_SWAP_STREAMS (Swap the states of two streams)
110A F5 push af
110B 79 ld a,c
110C CD E8 10 call lab10E8
110F 78 ld a,b
1110 32 0C B2 ld (#b20c),a
1113 CD 2A 11 call lab112A
1116 D5 push de
1117 79 ld a,c
1118 CD 2A 11 call lab112A
111B E1 pop hl
111C CD 22 11 call lab1122
111F F1 pop af
1120 18 C6 jr lab10E8
1122 C5 lab1122 push bc
1123 01 0F 00 ld bc,lab000F
1126 ED B0 ldir
1128 C1 pop bc
1129 C9 ret
112A E6 07 lab112A and #7
112C 5F ld e,a
112D 87 add a,a
112E 87 add a,a
112F 87 add a,a
1130 87 add a,a
1131 93 sub e
1132 C6 0D add a,#d
1134 5F ld e,a
1135 CE B2 adc a,#b2
1137 93 sub e
1138 57 ld d,a
1139 21 85 B2 ld hl,#b285
113C C9 ret
113D EB lab113D ex de,hl
113E 3E 03 ld a,#3
1140 32 8D B2 ld (#b28d),a
1143 7A ld a,d
1144 CD AE 12 call lab12AE
1147 7B ld a,e
1148 CD A9 12 call lab12A9
114B AF xor a
114C CD A7 13 call lab13A7
114F CD 7A 13 call lab137A
1152 21 00 00 ld hl,lab0000
1155 11 7F 7F ld de,#7f7f
1158 CD 0C 12 call lab120C
115B C3 51 14 jp lab1451
115E 3D lab115E dec a ; &BB6F=&115E (&08F6) [37] TXT_SET_COLUMN (Set cursor horizontal position)
115F 21 89 B2 ld hl,#b289
1162 86 add a,(hl)
1163 2A 85 B2 ld hl,(#b285)
1166 67 ld h,a
1167 18 0E jr lab1177
1169 3D dec a ; &BB72=&1169 (&08F8) [38] TXT_SET_ROW (Set cursor vertical position)
116A 21 88 B2 ld hl,#b288
116D 86 add a,(hl)
116E 2A 85 B2 ld hl,(#b285)
1171 6F ld l,a
1172 18 03 jr lab1177
1174 CD 8A 11 lab1174 call lab118A ; &BB75=&1174 (&08FA) [39] TXT_SET_CURSOR (Set cursor position)
1177 CD D0 BD lab1177 call #bdd0
117A 22 85 B2 lab117A ld (#b285),hl
117D C3 CD BD jp #bdcd
1180 2A 85 B2 lab1180 ld hl,(#b285) ; &BB78=&1180 (&08FC) [40] TXT_GET_CURSOR (Ask current cursor position)
1183 CD 97 11 call lab1197
1186 3A 8C B2 ld a,(#b28c)
1189 C9 ret
118A 3A 88 B2 lab118A ld a,(#b288)
118D 3D dec a
118E 85 add a,l
118F 6F ld l,a
1190 3A 89 B2 ld a,(#b289)
1193 3D dec a
1194 84 add a,h
1195 67 ld h,a
1196 C9 ret
1197 3A 88 B2 lab1197 ld a,(#b288)
119A 95 sub l
119B 2F cpl
119C 3C inc a
119D 3C inc a
119E 6F ld l,a
119F 3A 89 B2 ld a,(#b289)
11A2 94 sub h
11A3 2F cpl
11A4 3C inc a
11A5 3C inc a
11A6 67 ld h,a
11A7 C9 ret
11A8 CD D0 BD lab11A8 call #bdd0
11AB 2A 85 B2 lab11AB ld hl,(#b285)
11AE CD DA 11 call lab11DA
11B1 22 85 B2 ld (#b285),hl
11B4 D8 ret c
11B5 E5 push hl
11B6 21 8C B2 ld hl,#b28c
11B9 78 ld a,b
11BA 87 add a,a
11BB 3C inc a
11BC 86 add a,(hl)
11BD 77 ld (hl),a
11BE CD 56 12 call lab1256
11C1 3A 90 B2 ld a,(#b290)
11C4 F5 push af
11C5 DC 3E 0E call c,lab0E3E
11C8 F1 pop af
11C9 D4 FA 0D call nc,lab0DFA
11CC E1 pop hl
11CD C9 ret
11CE CD 8A 11 lab11CE call lab118A ; &BB87=&11CE (&0906) [45] TXT_VALIDATE (Check if a cursor position is within a window)
11D1 CD DA 11 call lab11DA
11D4 F5 push af
11D5 CD 97 11 call lab1197
11D8 F1 pop af
11D9 C9 ret
11DA 3A 8B B2 lab11DA ld a,(#b28b)
11DD BC cp h
11DE F2 E6 11 jp p,lab11E6
11E1 3A 89 B2 ld a,(#b289)
11E4 67 ld h,a
11E5 2C inc l
11E6 3A 89 B2 lab11E6 ld a,(#b289)
11E9 3D dec a
11EA BC cp h
11EB FA F3 11 jp m,lab11F3
11EE 3A 8B B2 ld a,(#b28b)
11F1 67 ld h,a
11F2 2D dec l
11F3 3A 88 B2 lab11F3 ld a,(#b288)
11F6 3D dec a
11F7 BD cp l
11F8 F2 06 12 jp p,lab1206
11FB 3A 8A B2 ld a,(#b28a)
11FE BD cp l
11FF 37 scf
1200 F0 ret p
1201 6F ld l,a
1202 06 FF ld b,#ff
1204 B7 or a
1205 C9 ret
1206 3C lab1206 inc a
1207 6F ld l,a
1208 06 00 ld b,#0
120A B7 or a
120B C9 ret
120C CD 57 0B lab120C call lab0B57 ; &BB66=&120C (&08F0) [34] TXT_WIN_ENABLE (Set the size of the current text window)
120F 7C ld a,h
1210 CD 44 12 call lab1244
1213 67 ld h,a
1214 7A ld a,d
1215 CD 44 12 call lab1244
1218 57 ld d,a
1219 BC cp h
121A 30 02 jr nc,lab121E
121C 54 ld d,h
121D 67 ld h,a
121E 7D lab121E ld a,l
121F CD 4D 12 call lab124D
1222 6F ld l,a
1223 7B ld a,e
1224 CD 4D 12 call lab124D
1227 5F ld e,a
1228 BD cp l
1229 30 02 jr nc,lab122D
122B 5D ld e,l
122C 6F ld l,a
122D 22 88 B2 lab122D ld (#b288),hl
1230 ED 53 8A B2 ld (#b28a),de
1234 7C ld a,h
1235 B5 or l
1236 20 06 jr nz,lab123E
1238 7A ld a,d
1239 A8 xor b
123A 20 02 jr nz,lab123E
123C 7B ld a,e
123D A9 xor c
123E 32 87 B2 lab123E ld (#b287),a
1241 C3 77 11 jp lab1177
1244 B7 lab1244 or a
1245 F2 49 12 jp p,lab1249
1248 AF xor a
1249 B8 lab1249 cp b
124A D8 ret c
124B 78 ld a,b
124C C9 ret
124D B7 lab124D or a
124E F2 52 12 jp p,lab1252
1251 AF xor a
1252 B9 lab1252 cp c
1253 D8 ret c
1254 79 ld a,c
1255 C9 ret
1256 2A 88 B2 lab1256 ld hl,(#b288) ; &BB69=&1256 (&08F2) [35] TXT_GET_WINDOW (Get the size of the current text window)
1259 ED 5B 8A B2 ld de,(#b28a)
125D 3A 87 B2 ld a,(#b287)
1260 C6 FF add a,#ff
1262 C9 ret
1263 3A 8D B2 ld a,(#b28d)
1266 B7 or a
1267 C0 ret nz
1268 C5 lab1268 push bc ; &BB8A=&1268 (&0908) [46] TXT_PLACE_CURSOR (Put a cursor blob on the screen) & [47] TXT_REMOVE_CURSOR (Take a cursor blob off the screen)
1269 D5 push de
126A E5 push hl
126B CD AB 11 call lab11AB
126E ED 4B 8F B2 ld bc,(#b28f)
1272 CD DF 0D call lab0DDF
1275 E1 pop hl
1276 D1 pop de
1277 C1 pop bc
1278 C9 ret
1279 F5 lab1279 push af ; &BB81=&1279 (&0902) [43] TXT_CUR_ON (Allow cursor display - system)
127A 3E FD ld a,#fd
127C CD 8B 12 call lab128B
127F F1 pop af
1280 C9 ret
1281 F5 lab1281 push af ; &BB84=&1281 (&0904) [44] TXT_CUR_OFF (Disallow cursor display - system)
1282 3E 02 ld a,#2
1284 CD 9C 12 call lab129C
1287 F1 pop af
1288 C9 ret
1289 3E FE lab1289 ld a,#fe ; &BB7B=&1289 (&08FE) [41] TXT_CUR_ENABLE (Allow cursor display - user)
128B F5 lab128B push af
128C CD D0 BD call #bdd0
128F F1 pop af
1290 E5 push hl
1291 21 8D B2 ld hl,#b28d
1294 A6 and (hl)
1295 77 ld (hl),a
1296 E1 pop hl
1297 C3 CD BD jp #bdcd
129A 3E 01 lab129A ld a,#1 ; &BB7E=&129A (&0900) [42] TXT_CUR_DISABLE (Disallow cursor display - user)
129C F5 lab129C push af
129D CD D0 BD call #bdd0
12A0 F1 pop af
12A1 E5 push hl
12A2 21 8D B2 ld hl,#b28d
12A5 B6 or (hl)
12A6 77 ld (hl),a
12A7 E1 pop hl
12A8 C9 ret
12A9 21 8F B2 lab12A9 ld hl,#b28f ; &BB90=&12A9 (&090C) [48] TXT_SET_PEN (Set ink for writing characters)
12AC 18 03 jr lab12B1
12AE 21 90 B2 lab12AE ld hl,#b290 ; &BB96=&12AE (&0910) [50] TXT_SET_PAPER (Set ink for writing text background)
12B1 F5 lab12B1 push af
12B2 CD D0 BD call #bdd0
12B5 F1 pop af
12B6 CD 86 0C call lab0C86
12B9 77 ld (hl),a
12BA C3 CD BD jp #bdcd
12BD 3A 8F B2 lab12BD ld a,(#b28f) ; &BB93=&12BD (&090E) [49] TXT_GET_PEN (Get ink for writing characters)
12C0 C3 A0 0C jp lab0CA0
12C3 3A 90 B2 lab12C3 ld a,(#b290) ; &BB99=&12C3 (&0912) [51] TXT_GET_PAPER (Get ink for writing text background)
12C6 C3 A0 0C jp lab0CA0
12C9 2A 8F B2 ld hl,(#b28f) ; &BB9C=&12C9 (&0914) [52] TXT_INVERSE (Swap current pen and paper inks)
12CC 7C ld a,h
12CD 65 ld h,l
12CE 6F ld l,a
12CF 22 8F B2 ld (#b28f),hl
12D2 C9 ret
12D3 D5 lab12D3 push de ; &BBA5=&12D3 (&091A) [55] TXT_GET_MATRIX (Get the address of a character matrix)
12D4 5F ld e,a
12D5 CD 2A 13 call lab132A
12D8 30 09 jr nc,lab12E3
12DA 57 ld d,a
12DB 7B ld a,e
12DC 92 sub d
12DD 3F ccf
12DE 30 03 jr nc,lab12E3
12E0 5F ld e,a
12E1 18 03 jr lab12E6
12E3 21 00 38 lab12E3 ld hl,lab3800
12E6 F5 lab12E6 push af
12E7 16 00 ld d,#0
12E9 EB ex de,hl
12EA 29 add hl,hl
12EB 29 add hl,hl
12EC 29 add hl,hl
12ED 19 add hl,de
12EE F1 pop af
12EF D1 pop de
12F0 C9 ret
12F1 EB lab12F1 ex de,hl ; &BBA8=&12F1 (&091C) [56] TXT_SET_MATRIX (Set a character matrix)
12F2 CD D3 12 call lab12D3
12F5 D0 ret nc
12F6 EB ex de,hl
12F7 01 08 00 lab12F7 ld bc,lab0008
12FA ED B0 ldir
12FC C9 ret
12FD E5 push hl ; &BBAB=&12FD (&091E) [57] TXT_SET_M_TABLE (Set the user defined matrix table address)
12FE 7A ld a,d
12FF B7 or a
1300 16 00 ld d,#0
1302 20 19 jr nz,lab131D
1304 15 dec d
1305 D5 push de
1306 4B ld c,e
1307 EB ex de,hl
1308 79 lab1308 ld a,c
1309 CD D3 12 call lab12D3
130C 7C ld a,h
130D AA xor d
130E 20 04 jr nz,lab1314
1310 7D ld a,l
1311 AB xor e
1312 28 08 jr z,lab131C
1314 C5 lab1314 push bc
1315 CD F7 12 call lab12F7
1318 C1 lab1318 pop bc
1319 0C inc c
131A 20 EC jr nz,lab1308
131C D1 lab131C pop de
131D CD 2A 13 lab131D call lab132A
1320 ED 53 94 B2 ld (#b294),de
1324 D1 pop de
1325 ED 53 96 B2 ld (#b296),de
1329 C9 ret
132A 2A 94 B2 lab132A ld hl,(#b294) ; &BBAE=&132A (&0920) [58] TXT_GET_M_TABLE (Get user defined matrix table address)
132D 7C ld a,h
132E 0F rrca
132F 7D ld a,l
1330 2A 96 B2 ld hl,(#b296)
1333 C9 ret
1334 47 lab1334 ld b,a ; &BB5D=&1334 (&08EA) [31] TXT_WR_CHAR (Write a character onto the screen)
1335 3A 8E B2 ld a,(#b28e)
1338 B7 or a
1339 C8 ret z
133A C5 push bc
133B CD A8 11 call lab11A8
133E 24 inc h
133F 22 85 B2 ld (#b285),hl
1342 25 dec h
1343 F1 pop af
1344 CD D3 BD call #bdd3
1347 C3 CD BD jp #bdcd
134A E5 push hl
134B CD D3 12 call lab12D3
134E 11 98 B2 ld de,#b298
1351 D5 push de
1352 CD F3 0E call lab0EF3
1355 D1 pop de
1356 E1 pop hl
1357 CD 64 0B call lab0B64
135A 0E 08 ld c,#8
135C C5 lab135C push bc
135D E5 push hl
135E C5 lab135E push bc
135F D5 push de
1360 EB ex de,hl
1361 4E ld c,(hl)
1362 CD 76 13 call lab1376
1365 CD F9 0B call lab0BF9
1368 D1 pop de
1369 13 inc de
136A C1 pop bc
136B 10 F1 djnz lab135E
136D E1 pop hl
136E CD 13 0C call lab0C13
1371 C1 pop bc
1372 0D dec c
1373 20 E7 jr nz,lab135C
1375 C9 ret
1376 2A 91 B2 lab1376 ld hl,(#b291)
1379 E9 jp (hl)
137A 21 91 13 lab137A ld hl,lab1391 ; &BB9F=&137A (&0916) [53] TXT_SET_BACK (Allow or disallow background being written)
137D B7 or a
137E 28 03 jr z,lab1383
1380 21 9F 13 ld hl,lab139F
1383 22 91 B2 lab1383 ld (#b291),hl
1386 C9 ret
1387 2A 91 B2 ld hl,(#b291) ; &BBA2=&1387 (&0918) [54] TXT_GET_BACK (Ask if background is being written)
138A 11 6F EC ld de,#ec6f
138D 19 add hl,de
138E 7C ld a,h
138F B5 or l
1390 C9 ret
1391 2A 8F B2 lab1391 ld hl,(#b28f)
1394 79 ld a,c
1395 2F cpl
1396 A4 and h
1397 47 ld b,a
1398 79 ld a,c
1399 A5 and l
139A B0 or b
139B 0E FF ld c,#ff
139D 18 03 jr lab13A2
139F 3A 8F B2 lab139F ld a,(#b28f)
13A2 47 lab13A2 ld b,a
13A3 EB ex de,hl
13A4 C3 6B 0C jp lab0C6B
13A7 32 93 B2 lab13A7 ld (#b293),a ; &BB63=&13A7 (&08EE) [33] TXT_SET_GRAPHIC (Turn on or off the Graphics VDU character writing option)
13AA C9 ret
13AB E5 lab13AB push hl ; &BB60=&13AB (&08EC) [32] TXT_RD_CHAR (Read a character from the screen)
13AC D5 push de
13AD C5 push bc
13AE CD D0 BD call #bdd0
13B1 2A 85 B2 ld hl,(#b285)
13B4 CD D6 BD call #bdd6
13B7 F5 push af
13B8 CD CD BD call #bdcd
13BB F1 pop af
13BC C1 pop bc
13BD D1 pop de
13BE E1 pop hl
13BF C9 ret
13C0 3A 8F B2 ld a,(#b28f)
13C3 11 98 B2 ld de,#b298
13C6 E5 push hl
13C7 D5 push de
13C8 CD 49 0F call lab0F49
13CB CD E3 13 call lab13E3
13CE D1 pop de
13CF E1 pop hl
13D0 30 01 jr nc,lab13D3
13D2 C0 ret nz
13D3 3A 90 B2 lab13D3 ld a,(#b290)
13D6 D5 push de
13D7 CD 49 0F call lab0F49
13DA D1 pop de
13DB 06 08 ld b,#8
13DD 1A lab13DD ld a,(de)
13DE 2F cpl
13DF 12 ld (de),a
13E0 13 inc de
13E1 10 FA djnz lab13DD
13E3 0E 00 lab13E3 ld c,#0
13E5 79 lab13E5 ld a,c
13E6 CD D3 12 call lab12D3
13E9 11 98 B2 ld de,#b298
13EC 06 08 ld b,#8
13EE 1A lab13EE ld a,(de)
13EF BE cp (hl)
13F0 20 09 jr nz,lab13FB
13F2 23 inc hl
13F3 13 inc de
13F4 10 F8 djnz lab13EE
13F6 79 ld a,c
13F7 FE 20 cp #20
13F9 37 scf
13FA C9 ret
13FB 0C lab13FB inc c
13FC 20 E7 jr nz,lab13E5
13FE AF xor a
13FF C9 ret
1400 F5 lab1400 push af ; &BB5A=&1400 (&08E8) [30] TXT_OUTPUT (Output a character or control code to the Text VDU)
1401 C5 push bc
1402 D5 push de
1403 E5 push hl
1404 CD D9 BD call #bdd9
1407 E1 pop hl
1408 D1 pop de
1409 C1 pop bc
140A F1 pop af
140B C9 ret
140C 4F ld c,a
140D 3A 93 B2 ld a,(#b293)
1410 B7 or a
1411 79 ld a,c
1412 C2 45 19 jp nz,lab1945
1415 21 B8 B2 ld hl,#b2b8
1418 46 ld b,(hl)
1419 78 ld a,b
141A FE 0A cp #a
141C 30 28 jr nc,lab1446
141E B7 or a
141F 20 06 jr nz,lab1427
1421 79 ld a,c
1422 FE 20 cp #20
1424 D2 34 13 jp nc,lab1334
1427 04 lab1427 inc b
1428 70 ld (hl),b
1429 58 ld e,b
142A 16 00 ld d,#0
142C 19 add hl,de
142D 71 ld (hl),c
142E 3A B9 B2 ld a,(#b2b9)
1431 5F ld e,a
1432 21 C3 B2 ld hl,#b2c3
1435 19 add hl,de
1436 19 add hl,de
1437 19 add hl,de
1438 7E ld a,(hl)
1439 B8 cp b
143A D0 ret nc
143B 23 inc hl
143C 5E ld e,(hl)
143D 23 inc hl
143E 56 ld d,(hl)
143F 21 B9 B2 ld hl,#b2b9
1442 79 ld a,c
1443 CD 16 00 call lab0016
1446 AF lab1446 xor a
1447 32 B8 B2 ld (#b2b8),a
144A C9 ret
144B CD 9A 12 call lab129A ; &BB57=&144B (&08E6) [29] TXT_VDU_DISABLE (Prevent characters from being placed on the screen)
144E AF xor a
144F 18 05 jr lab1456
1451 CD 89 12 lab1451 call lab1289 ; %BB54=&1451 (&08E4) [28] TXT_VDU_ENABLE (Allow characters to be placed on the screen)
1454 3E FF ld a,#ff
1456 32 8E B2 lab1456 ld (#b28e),a
1459 18 EB jr lab1446
145B AF lab145B xor a
145C 32 B8 B2 ld (#b2b8),a
145F 21 6B 14 ld hl,lab146B
1462 11 C3 B2 ld de,#b2c3
1465 01 60 00 ld bc,lab0060
1468 ED B0 ldir
146A C9 ret
146B lab146B db #00,#e2,#14 ; Control Code Handler Routines
146E db #01,#34,#13
1471 db #00,#9a,#12
1474 db #00,#89,#12
1477 db #01,#ca,#0a
147A db #01,#45,#19
147D db #00,#51,#14
1480 db #00,#d8,#14
1483 db #00,#0a,#15
1486 db #00,#0f,#15
1489 db #00,#14,#15
148C db #00,#19,#15
148F db #00,#40,#15
1492 db #00,#30,#15
1495 db #01,#ae,#12
1498 db #01,#a9,#12
149B db #00,#4f,#15
149E db #00,#8e,#15
14A1 db #00,#84,#15
14A4 db #00,#6d,#15
14A7 db #00,#56,#15
14AA db #00,#4b,#14
14AD db #01,#e3,#14
14B0 db #01,#49,#0c
14B3 db #00,#c9,#12
14B6 db #09,#04,#15
14B9 db #04,#f8,#14
14BC db #00,#e2,#14
14BF db #03,#e8,#14
14C2 db #02,#f1,#14
14C5 db #00,#2a,#15
14C8 db #02,#38,#15
14CB 21 C3 B2 ld hl,#b2c3 ; &BBB1=&14CB (&0922) [59] TXT_GET_CONTROLS (Fetch address of control code table)
14CE C9 ret
14CF lab14CF db #87,#00,#00,#5a,#00,#00,#0b,#14 ; Data - Control Code BEL
14D7 db #00
14D8 DD E5 push ix
14DA 21 CF 14 ld hl,lab14CF
14DD CD 9F 1F call lab1F9F
14E0 DD E1 pop ix
14E2 C9 ret
14E3 0F rrca
14E4 9F sbc a,a
14E5 C3 7A 13 jp lab137A
14E8 23 inc hl
14E9 7E ld a,(hl)
14EA 23 inc hl
14EB 46 ld b,(hl)
14EC 23 inc hl
14ED 4E ld c,(hl)
14EE C3 EC 0C jp lab0CEC
14F1 23 inc hl
14F2 46 ld b,(hl)
14F3 23 inc hl
14F4 4E ld c,(hl)
14F5 C3 F1 0C jp lab0CF1
14F8 23 inc hl
14F9 56 ld d,(hl)
14FA 23 inc hl
14FB 7E ld a,(hl)
14FC 23 inc hl
14FD 5E ld e,(hl)
14FE 23 inc hl
14FF 6E ld l,(hl)
1500 67 ld h,a
1501 C3 0C 12 jp lab120C
1504 23 inc hl
1505 7E ld a,(hl)
1506 23 inc hl
1507 C3 F1 12 jp lab12F1
150A 11 00 FF ld de,#ff00
150D 18 0D jr lab151C
150F 11 00 01 ld de,#0100
1512 18 08 jr lab151C
1514 11 01 00 ld de,#0001
1517 18 03 jr lab151C
1519 11 FF 00 ld de,#00ff
151C D5 lab151C push de
151D CD A8 11 call lab11A8
1520 D1 pop de
1521 7D ld a,l
1522 83 add a,e
1523 6F ld l,a
1524 7C ld a,h
1525 82 add a,d
1526 67 lab1526 ld h,a
1527 C3 7A 11 jp lab117A
152A 2A 88 B2 ld hl,(#b288)
152D C3 77 11 jp lab1177
1530 CD A8 11 call lab11A8
1533 3A 89 B2 ld a,(#b289)
1536 18 EE jr lab1526
1538 23 inc hl
1539 56 ld d,(hl)
153A 23 inc hl
153B 5E ld e,(hl)
153C EB ex de,hl
153D C3 74 11 jp lab1174
1540 CD D0 BD call #bdd0 ; &BB6C=&1540 (&08F4) [36] TXT_CLEAR_WINDOW (Clear current window)
1543 2A 88 B2 ld hl,(#b288)
1546 22 85 B2 ld (#b285),hl
1549 ED 5B 8A B2 ld de,(#b28a)
154D 18 48 jr lab1597
154F CD A8 11 call lab11A8
1552 54 ld d,h
1553 5D ld e,l
1554 18 41 jr lab1597
1556 CD 84 15 call lab1584
1559 2A 88 B2 ld hl,(#b288)
155C ED 5B 8A B2 ld de,(#b28a)
1560 3A 85 B2 ld a,(#b285)
1563 6F ld l,a
1564 2C inc l
1565 BB cp e
1566 3A 90 B2 ld a,(#b290)
1569 DC B3 0D call c,lab0DB3
156C C9 ret
156D CD 8E 15 call lab158E
1570 2A 88 B2 ld hl,(#b288)
1573 3A 8B B2 ld a,(#b28b)
1576 57 ld d,a
1577 3A 85 B2 ld a,(#b285)
157A 3D dec a
157B 5F ld e,a
157C BD cp l
157D 3A 90 B2 ld a,(#b290)
1580 D4 B3 0D call nc,lab0DB3
1583 C9 ret
1584 CD A8 11 lab1584 call lab11A8
1587 5D ld e,l
1588 3A 8B B2 ld a,(#b28b)
158B 57 ld d,a
158C 18 09 jr lab1597
158E CD A8 11 lab158E call lab11A8
1591 EB ex de,hl
1592 6B ld l,e
1593 3A 89 B2 ld a,(#b289)
1596 67 ld h,a
1597 3A 90 B2 lab1597 ld a,(#b290)
159A CD B3 0D call lab0DB3
159D CD CD BD call #bdcd
15A0 C9 ret
15A1 C7 rst 0
15A2 C7 rst 0
15A3 C7 rst 0
15A4 C7 rst 0
15A5 C7 rst 0
15A6 C7 rst 0
15A7 C7 rst 0
15A8 C7 rst 0
15A9 C7 rst 0
15AA C7 rst 0
15AB C7 rst 0
15AC C7 rst 0
15AD C7 rst 0
15AE C7 rst 0
15AF C7 rst 0
15B0 CD DF 15 lab15B0 call lab15DF ; &BBBA=&15B0 (&0928) [62] GRA_INITIALISE (Initialise the Graphics VDU)
15B3 21 01 00 ld hl,#0001
15B6 7C lab15B6 ld a,h
15B7 CD FD 17 call lab17FD
15BA 7D ld a,l
15BB CD F6 17 call lab17F6
15BE 21 00 00 ld hl,lab0000
15C1 54 ld d,h
15C2 5D ld e,l
15C3 CD 04 16 call lab1604
15C6 11 00 80 ld de,#8000
15C9 21 FF 7F ld hl,#7fff
15CC E5 push hl
15CD D5 push de
15CE CD 34 17 call lab1734
15D1 E1 pop hl
15D2 D1 pop de
15D3 C3 79 17 jp lab1779
15D6 CD 0A 18 lab15D6 call lab180A
15D9 67 ld h,a
15DA CD 04 18 call lab1804
15DD 6F ld l,a
15DE C9 ret
15DF 21 E5 15 lab15DF ld hl,lab15E5 ; &BBBD=&15DF (&092A) [63] GRA_RESET (Reset the Graphics VDU - restore standard indirections)
15E2 C3 8A 0A jp lab0A8A
15E5 09 lab15E5 db #9 ; Number of indirection bytes to restore (multiples of 3) &BBBD=&15DF (&092A) [63] GRA_RESET (Reset the Graphics VDU - restore standard indirections)
15E6 db #dc,#bd ; Destination address of first indirection to be restored &BDDC GRA_PLOT
15E8 db #c3,#16,#18 ; Indirection entry 01 of 03 (jp #1816) &BDDC IND:GRA_PLOT (Plot a point)
15EB db #c3,#2a,#18 ; Indirection entry 02 of 03 (jp #182a) &BDDF IND:GRA_TEST (Test a point)
15EE db #c3,#3c,#18 ; Indirection entry 03 of 03 (jp #183c) &BDE2 IND:GRA_LINE (Draw a line)
15F1 CD 57 16 call lab1657 ; &BBC3=&15F1 (&092E) [65] GRA_MOVE_RELATIVE (Move relative to current position)
15F4 ED 53 2C B3 lab15F4 ld (#b32c),de ; &BBC0=&15F4 (&092C) [64] GRA_MOVE_ABSOLUTE (Move to an absolute position)
15F8 22 2E B3 ld (#b32e),hl
15FB C9 ret
15FC ED 5B 2C B3 lab15FC ld de,(#b32c) ; &BBC6=&15FC (&0930) [66] GRA_ASK_CURSOR (Get the current position)
1600 2A 2E B3 ld hl,(#b32e)
1603 C9 ret
1604 ED 53 28 B3 lab1604 ld (#b328),de ; &BBC9=&1604 (&0932) [67] GRA_SET_ORIGIN (Set the origin of the user co-ordinates)
1608 22 2A B3 ld (#b32a),hl
160B 11 00 00 lab160B ld de,lab0000
160E 62 ld h,d
160F 6B ld l,e
1610 18 E2 jr lab15F4
1612 ED 5B 28 B3 ld de,(#b328) ; &BBCC=&1612 (&0934) [68] GRA_GET_ORIGIN (Get the origin of the user co-ordinates)
1616 2A 2A B3 ld hl,(#b32a)
1619 C9 ret
161A CD FC 15 lab161A call lab15FC
161D CD F4 15 lab161D call lab15F4
1620 E5 push hl
1621 CD EC 0A call lab0AEC
1624 2F cpl
1625 C6 01 add a,#1
1627 CE 02 adc a,#2
1629 26 00 ld h,#0
162B 6F ld l,a
162C CB 7A bit 7,d
162E 28 03 jr z,lab1633
1630 EB ex de,hl
1631 19 add hl,de
1632 EB ex de,hl
1633 2F lab1633 cpl
1634 A3 and e
1635 5F ld e,a
1636 7D ld a,l
1637 2A 28 B3 ld hl,(#b328)
163A 19 add hl,de
163B 0F rrca
163C DC 74 17 call c,lab1774
163F 0F rrca
1640 DC 74 17 call c,lab1774
1643 D1 pop de
1644 E5 push hl
1645 7A ld a,d
1646 07 rlca
1647 30 01 jr nc,lab164A
1649 13 inc de
164A 7B lab164A ld a,e
164B E6 FE and #fe
164D 5F ld e,a
164E 2A 2A B3 ld hl,(#b32a)
1651 19 add hl,de
1652 CD 74 17 call lab1774
1655 D1 pop de
1656 C9 ret
1657 E5 lab1657 push hl
1658 2A 2C B3 ld hl,(#b32c)
165B 19 add hl,de
165C D1 pop de
165D E5 push hl
165E 2A 2E B3 ld hl,(#b32e)
1661 19 add hl,de
1662 D1 pop de
1663 C9 ret
1664 D5 lab1664 push de
1665 E5 push hl
1666 2A 30 B3 ld hl,(#b330)
1669 2B dec hl
166A B7 or a
166B ED 52 sbc hl,de
166D F2 AC 16 jp p,lab16AC
1670 2A 32 B3 ld hl,(#b332)
1673 B7 or a
1674 ED 52 sbc hl,de
1676 FA AC 16 jp m,lab16AC
1679 D1 pop de
167A 2A 34 B3 ld hl,(#b334)
167D B7 or a
167E ED 52 sbc hl,de
1680 FA AD 16 jp m,lab16AD
1683 2A 36 B3 ld hl,(#b336)
1686 2B dec hl
1687 B7 or a
1688 ED 52 sbc hl,de
168A FA 91 16 jp m,lab1691
168D ED 5B 36 B3 ld de,(#b336)
1691 2A 36 B3 lab1691 ld hl,(#b336)
1694 2B dec hl
1695 B7 or a
1696 ED 42 sbc hl,bc
1698 F2 AD 16 jp p,lab16AD
169B 2A 34 B3 ld hl,(#b334)
169E B7 or a
169F ED 42 sbc hl,bc
16A1 F2 A8 16 jp p,lab16A8
16A4 ED 4B 34 B3 ld bc,(#b334)
16A8 EB lab16A8 ex de,hl
16A9 D1 pop de
16AA 37 scf
16AB C9 ret
16AC E1 lab16AC pop hl
16AD D1 lab16AD pop de
16AE B7 or a
16AF C9 ret
16B0 E5 lab16B0 push hl
16B1 D5 push de
16B2 EB ex de,hl
16B3 2A 36 B3 ld hl,(#b336)
16B6 2B dec hl
16B7 B7 or a
16B8 ED 52 sbc hl,de
16BA F2 F8 16 jp p,lab16F8
16BD 2A 34 B3 ld hl,(#b334)
16C0 B7 or a
16C1 ED 52 sbc hl,de
16C3 FA F8 16 jp m,lab16F8
16C6 D1 pop de
16C7 2A 32 B3 ld hl,(#b332)
16CA B7 or a
16CB ED 52 sbc hl,de
16CD FA F9 16 jp m,lab16F9
16D0 2A 30 B3 ld hl,(#b330)
16D3 2B dec hl
16D4 B7 or a
16D5 ED 52 sbc hl,de
16D7 FA DE 16 jp m,lab16DE
16DA ED 5B 30 B3 ld de,(#b330)
16DE 2A 30 B3 lab16DE ld hl,(#b330)
16E1 2B dec hl
16E2 B7 or a
16E3 ED 42 sbc hl,bc
16E5 F2 F9 16 jp p,lab16F9
16E8 2A 32 B3 ld hl,(#b332)
16EB B7 or a
16EC ED 42 sbc hl,bc
16EE F2 F5 16 jp p,lab16F5
16F1 ED 4B 32 B3 ld bc,(#b332)
16F5 E1 lab16F5 pop hl
16F6 37 scf
16F7 C9 ret
16F8 D1 lab16F8 pop de
16F9 E1 lab16F9 pop hl
16FA B7 or a
16FB C9 ret
16FC CD 1D 16 lab16FC call lab161D
16FF E5 lab16FF push hl
1700 2A 30 B3 ld hl,(#b330)
1703 2B dec hl
1704 B7 or a
1705 ED 52 sbc hl,de
1707 F2 2D 17 jp p,lab172D
170A 2A 32 B3 ld hl,(#b332)
170D B7 or a
170E ED 52 sbc hl,de
1710 FA 2D 17 jp m,lab172D
1713 E1 pop hl
1714 D5 push de
1715 EB ex de,hl
1716 2A 36 B3 ld hl,(#b336)
1719 2B dec hl
171A B7 or a
171B ED 52 sbc hl,de
171D F2 30 17 jp p,lab1730
1720 2A 34 B3 ld hl,(#b334)
1723 B7 or a
1724 ED 52 sbc hl,de
1726 FA 30 17 jp m,lab1730
1729 EB ex de,hl
172A D1 pop de
172B 37 scf
172C C9 ret
172D E1 lab172D pop hl
172E B7 or a
172F C9 ret
1730 EB lab1730 ex de,hl
1731 D1 pop de
1732 B7 or a
1733 C9 ret
1734 E5 lab1734 push hl ; &BBCF=&1734 (&0936) [69] GRA_WIN_WIDTH (Set left and right edges of the graphics window)
1735 CD 60 17 call lab1760
1738 D1 pop de
1739 E5 push hl
173A CD 60 17 call lab1760
173D D1 pop de
173E 7B ld a,e
173F 95 sub l
1740 7A ld a,d
1741 9C sbc a,h
1742 38 01 jr c,lab1745
1744 EB ex de,hl
1745 7B lab1745 ld a,e
1746 E6 F8 and #f8
1748 5F ld e,a
1749 7D ld a,l
174A F6 07 or #7
174C 6F ld l,a
174D CD EC 0A call lab0AEC
1750 3D dec a
1751 FC 70 17 call m,lab1770
1754 3D dec a
1755 FC 70 17 call m,lab1770
1758 ED 53 30 B3 ld (#b330),de
175C 22 32 B3 ld (#b332),hl
175F C9 ret
1760 7A lab1760 ld a,d
1761 B7 or a
1762 21 00 00 ld hl,lab0000
1765 F8 ret m
1766 21 7F 02 ld hl,lab027F
1769 7B ld a,e
176A 95 sub l
176B 7A ld a,d
176C 9C sbc a,h
176D D0 ret nc
176E EB ex de,hl
176F C9 ret
1770 CB 2A lab1770 sra d
1772 CB 1B rr e
1774 CB 2C lab1774 sra h
1776 CB 1D rr l
1778 C9 ret
1779 E5 lab1779 push hl ; &BBD2=&1779 (&0938) [70] GRA_WIN_HEIGHT (Set the top and bottom edges of the graphics window)
177A CD 92 17 call lab1792
177D D1 pop de
177E E5 push hl
177F CD 92 17 call lab1792
1782 D1 pop de
1783 7D ld a,l
1784 93 sub e
1785 7C ld a,h
1786 9A sbc a,d
1787 38 01 jr c,lab178A
1789 EB ex de,hl
178A ED 53 34 B3 lab178A ld (#b334),de
178E 22 36 B3 ld (#b336),hl
1791 C9 ret
1792 7A lab1792 ld a,d
1793 B7 or a
1794 21 00 00 ld hl,lab0000
1797 F8 ret m
1798 CB 3A srl d
179A CB 1B rr e
179C 21 C7 00 ld hl,lab00C7
179F 7B ld a,e
17A0 95 sub l
17A1 7A ld a,d
17A2 9C sbc a,h
17A3 D0 ret nc
17A4 EB ex de,hl
17A5 C9 ret
17A6 ED 5B 30 B3 lab17A6 ld de,(#b330) ; &BBD5=&17A6 (&093A) [71] GRA_GET_W_WIDTH (Get the left and right edges of the graphics window)
17AA 2A 32 B3 ld hl,(#b332)
17AD CD EC 0A call lab0AEC
17B0 3D dec a
17B1 FC B6 17 call m,lab17B6
17B4 3D dec a
17B5 F0 ret p
17B6 29 lab17B6 add hl,hl
17B7 23 inc hl
17B8 EB ex de,hl
17B9 29 add hl,hl
17BA EB ex de,hl
17BB C9 ret
17BC ED 5B 34 B3 ld de,(#b334) ; &BBD8=&17BC (&093C) [72] GRA_GET_W_HEIGHT (Get the top and bottom edges of the graphics window)
17C0 2A 36 B3 ld hl,(#b336)
17C3 18 F1 jr lab17B6
17C5 CD A6 17 call lab17A6 ; &BBDB=&17C5 (&093E) [73] GRA_CLEAR_WINDOW (Clear the graphics window)
17C8 B7 or a
17C9 ED 52 sbc hl,de
17CB 23 inc hl
17CC CD 74 17 call lab1774
17CF CD 74 17 call lab1774
17D2 CB 3D srl l
17D4 45 ld b,l
17D5 ED 5B 36 B3 ld de,(#b336)
17D9 2A 34 B3 ld hl,(#b334)
17DC E5 push hl
17DD B7 or a
17DE ED 52 sbc hl,de
17E0 23 inc hl
17E1 4D ld c,l
17E2 ED 5B 30 B3 ld de,(#b330)
17E6 E1 pop hl
17E7 C5 push bc
17E8 CD A9 0B call lab0BA9
17EB D1 pop de
17EC 3A 39 B3 ld a,(#b339)
17EF 4F ld c,a
17F0 CD B7 0D call lab0DB7
17F3 C3 0B 16 jp lab160B
17F6 CD 86 0C lab17F6 call lab0C86 ; &BBDE=&17F6 (&0940) [74] GRA_SET_PEN (Set the graphics plotting ink)
17F9 32 38 B3 ld (#b338),a
17FC C9 ret
17FD CD 86 0C lab17FD call lab0C86 ; &BBE4=&17FD (&0944) [76] GRA_SET_PAPER (Set the graphics background ink)
1800 32 39 B3 ld (#b339),a
1803 C9 ret
1804 3A 38 B3 lab1804 ld a,(#b338) ; &BBE1=&1804 (&0942) [75] GRA_GET_PEN (Get the current graphics plotting ink)
1807 C3 A0 0C jp lab0CA0
180A 3A 39 B3 lab180A ld a,(#b339) ; &BBE7=&180A (&0946) [77] GRA_GET_PAPER (Get the current graphics background ink)
180D C3 A0 0C jp lab0CA0
1810 CD 57 16 call lab1657 ; &BBED=&1810 (&094A) [79] GRA_PLOT_RELATIVE (Plot a point relative to the current position)
1813 C3 DC BD jp #bddc ; &BBEA=&1813 (&0948) [78] GRA_PLOT_ABSOLUTE (Plot a point at an absolute position)
1816 CD FC 16 call lab16FC
1819 D0 ret nc
181A CD A9 0B call lab0BA9
181D 3A 38 B3 ld a,(#b338)
1820 47 ld b,a
1821 C3 E8 BD jp #bde8
1824 CD 57 16 call lab1657 ; &BBF3=&1824 (&094E) [81] GRA_TEST_RELATIVE (Test a point relative to the current position)
1827 C3 DF BD jp #bddf ; &BBF0=&1827 (&094C) [80] GRA_TEST_ABSOLUTE (Test a point at an absolute position)
182A CD FC 16 call lab16FC
182D D2 0A 18 jp nc,lab180A
1830 CD A9 0B call lab0BA9
1833 C3 E5 BD jp #bde5
1836 CD 57 16 call lab1657 ; &BBF9=&1836 (&0952) [83] GRA_LINE_RELATIVE (Draw a line relative to the current position)
1839 C3 E2 BD jp #bde2 ; &BBF6=&1839 (&0950) [82] GRA_LINE_ABSOLUTE (Draw a line to an absolute position)
183C E5 push hl
183D D5 push de
183E CD 1A 16 call lab161A
1841 ED 53 42 B3 ld (#b342),de
1845 22 44 B3 ld (#b344),hl
1848 D1 pop de
1849 E1 pop hl
184A CD 1D 16 call lab161D
184D E5 push hl
184E 2A 42 B3 ld hl,(#b342)
1851 B7 or a
1852 ED 52 sbc hl,de
1854 44 ld b,h
1855 4D ld c,l
1856 FA 69 18 jp m,lab1869
1859 2A 42 B3 ld hl,(#b342)
185C EB ex de,hl
185D 22 42 B3 ld (#b342),hl
1860 2A 44 B3 ld hl,(#b344)
1863 E3 ex (sp),hl
1864 22 44 B3 ld (#b344),hl
1867 18 08 jr lab1871
1869 21 00 00 lab1869 ld hl,lab0000
186C B7 or a
186D ED 42 sbc hl,bc
186F 44 ld b,h
1870 4D ld c,l
1871 D1 lab1871 pop de
1872 2A 44 B3 ld hl,(#b344)
1875 B7 or a
1876 ED 52 sbc hl,de
1878 EB ex de,hl
1879 F2 8E 18 jp p,lab188E
187C 21 00 00 ld hl,lab0000
187F B7 or a
1880 ED 52 sbc hl,de
1882 54 ld d,h
1883 5D ld e,l
1884 B7 or a
1885 ED 42 sbc hl,bc
1887 21 01 00 ld hl,#0001
188A 30 27 jr nc,lab18B3
188C 18 0A jr lab1898
188E 62 lab188E ld h,d
188F 6B ld l,e
1890 B7 or a
1891 ED 42 sbc hl,bc
1893 21 FF FF ld hl,#ffff
1896 30 09 jr nc,lab18A1
1898 22 3A B3 lab1898 ld (#b33a),hl
189B 60 ld h,b
189C 69 ld l,c
189D 3E FF ld a,#ff
189F 18 19 jr lab18BA
18A1 E5 lab18A1 push hl
18A2 2A 42 B3 ld hl,(#b342)
18A5 09 add hl,bc
18A6 22 42 B3 ld (#b342),hl
18A9 2A 44 B3 ld hl,(#b344)
18AC B7 or a
18AD ED 52 sbc hl,de
18AF 22 44 B3 ld (#b344),hl
18B2 E1 pop hl
18B3 22 3A B3 lab18B3 ld (#b33a),hl
18B6 60 ld h,b
18B7 69 ld l,c
18B8 EB ex de,hl
18B9 AF xor a
18BA 32 46 B3 lab18BA ld (#b346),a
18BD 13 inc de
18BE ED 53 40 B3 ld (#b340),de
18C2 23 inc hl
18C3 CD 8C 37 call lab378C
18C6 22 3C B3 ld (#b33c),hl
18C9 ED 53 3E B3 ld (#b33e),de
18CD ED 4B 40 B3 ld bc,(#b340)
18D1 50 ld d,b
18D2 59 ld e,c
18D3 CB 3A srl d
18D5 CB 1B rr e
18D7 C5 lab18D7 push bc
18D8 ED 4B 3C B3 ld bc,(#b33c)
18DC 2A 3E B3 ld hl,(#b33e)
18DF 19 add hl,de
18E0 EB ex de,hl
18E1 2A 40 B3 ld hl,(#b340)
18E4 B7 or a
18E5 ED 52 sbc hl,de
18E7 30 07 jr nc,lab18F0
18E9 19 add hl,de
18EA EB ex de,hl
18EB B7 or a
18EC ED 52 sbc hl,de
18EE EB ex de,hl
18EF 03 inc bc
18F0 D5 lab18F0 push de
18F1 3A 46 B3 ld a,(#b346)
18F4 B7 or a
18F5 28 23 jr z,lab191A
18F7 2A 42 B3 ld hl,(#b342)
18FA 54 ld d,h
18FB 5D ld e,l
18FC 09 add hl,bc
18FD 22 42 B3 ld (#b342),hl
1900 44 ld b,h
1901 4D ld c,l
1902 0B dec bc
1903 2A 44 B3 ld hl,(#b344)
1906 E5 push hl
1907 CD B0 16 call lab16B0
190A 3A 38 B3 ld a,(#b338)
190D DC C4 0F call c,lab0FC4
1910 D1 pop de
1911 2A 3A B3 ld hl,(#b33a)
1914 19 add hl,de
1915 22 44 B3 ld (#b344),hl
1918 18 23 jr lab193D
191A 2A 44 B3 lab191A ld hl,(#b344)
191D 54 ld d,h
191E 5D ld e,l
191F 09 add hl,bc
1920 22 44 B3 ld (#b344),hl
1923 44 ld b,h
1924 4D ld c,l
1925 0B dec bc
1926 EB ex de,hl
1927 ED 5B 42 B3 ld de,(#b342)
192B D5 push de
192C CD 64 16 call lab1664
192F 3A 38 B3 ld a,(#b338)
1932 DC 2F 10 call c,lab102F
1935 D1 pop de
1936 2A 3A B3 ld hl,(#b33a)
1939 19 add hl,de
193A 22 42 B3 ld (#b342),hl
193D D1 lab193D pop de
193E C1 pop bc
193F 0B dec bc
1940 78 ld a,b
1941 B1 or c
1942 20 93 jr nz,lab18D7
1944 C9 ret
1945 DD E5 lab1945 push ix ; &BBFC=&1945 (&0954) [84] GRA_WR_CHAR (Put a character on the screen at the current graphics position)
1947 CD D3 12 call lab12D3
194A 11 3A B3 ld de,#b33a
194D D5 push de
194E DD E1 pop ix
1950 01 08 00 ld bc,lab0008
1953 ED B0 ldir
1955 CD 1A 16 call lab161A
1958 CD FF 16 call lab16FF
195B 30 4C jr nc,lab19A9
195D E5 push hl
195E D5 push de
195F 01 07 00 ld bc,#0007
1962 EB ex de,hl
1963 09 add hl,bc
1964 EB ex de,hl
1965 B7 or a
1966 ED 42 sbc hl,bc
1968 CD FF 16 call lab16FF
196B D1 pop de
196C E1 pop hl
196D 30 3A jr nc,lab19A9
196F CD A9 0B call lab0BA9
1972 16 08 ld d,#8
1974 E5 lab1974 push hl
1975 1E 08 ld e,#8
1977 CD CF 19 lab1977 call lab19CF
197A CB 09 rrc c
197C DC F9 0B call c,lab0BF9
197F DD CB 00 06 rlc (ix+0)
1983 1D dec e
1984 20 F1 jr nz,lab1977
1986 E1 pop hl
1987 CD 13 0C call lab0C13
198A DD 23 inc ix
198C 15 dec d
198D 20 E5 jr nz,lab1974
198F DD E1 lab198F pop ix
1991 CD FC 15 call lab15FC
1994 EB ex de,hl
1995 CD EC 0A call lab0AEC
1998 01 08 00 ld bc,lab0008
199B FE 01 cp #1
199D 28 04 jr z,lab19A3
199F 30 03 jr nc,lab19A4
19A1 09 add hl,bc
19A2 09 add hl,bc
19A3 09 lab19A3 add hl,bc
19A4 09 lab19A4 add hl,bc
19A5 EB ex de,hl
19A6 C3 F4 15 jp lab15F4
19A9 0E 08 lab19A9 ld c,#8
19AB D5 lab19AB push de
19AC 06 08 ld b,#8
19AE CD FF 16 lab19AE call lab16FF
19B1 30 0C jr nc,lab19BF
19B3 E5 push hl
19B4 D5 push de
19B5 C5 push bc
19B6 CD A9 0B call lab0BA9
19B9 CD CF 19 call lab19CF
19BC C1 pop bc
19BD D1 pop de
19BE E1 pop hl
19BF DD CB 00 06 lab19BF rlc (ix+0)
19C3 13 inc de
19C4 10 E8 djnz lab19AE
19C6 D1 pop de
19C7 2B dec hl
19C8 DD 23 inc ix
19CA 0D dec c
19CB 20 DE jr nz,lab19AB
19CD 18 C0 jr lab198F
19CF DD CB 00 7E lab19CF bit 7,(ix+0)
19D3 3A 38 B3 ld a,(#b338)
19D6 20 03 jr nz,lab19DB
19D8 3A 39 B3 ld a,(#b339)
19DB 47 lab19DB ld b,a
19DC C3 E8 BD jp #bde8
19DF C7 rst 0
19E0 21 02 1E lab19E0 ld hl,lab1E02 ; &BB00=&19E0 (&08AC) [00] KM_INITIALISE (Initialise the Key anager)
19E3 CD 6D 1C call lab1C6D
19E6 AF xor a
19E7 32 0B B5 ld (#b50b),a
19EA 67 ld h,a
19EB 6F ld l,a
19EC 22 E7 B4 ld (#b4e7),hl
19EF 21 3C B4 ld hl,#b43c
19F2 11 B0 FF ld de,#ffb0
19F5 22 47 B5 ld (#b547),hl
19F8 19 add hl,de
19F9 22 45 B5 ld (#b545),hl
19FC 19 add hl,de
19FD 22 43 B5 ld (#b543),hl
1A00 19 add hl,de
1A01 22 41 B5 ld (#b541),hl
1A04 EB ex de,hl
1A05 21 69 1D ld hl,lab1D69
1A08 01 FA 00 ld bc,#00fa
1A0B ED B0 ldir
1A0D 06 0A ld b,#a
1A0F 21 EB B4 ld hl,#b4eb
1A12 36 00 lab1A12 ld (hl),#0
1A14 23 inc hl
1A15 10 FB djnz lab1A12
1A17 06 0A ld b,#a
1A19 36 FF lab1A19 ld (hl),#ff
1A1B 23 inc hl
1A1C 10 FB djnz lab1A19
1A1E CD ED 1C lab1A1E call lab1CED ; &BB03=&1A1E (&08AE) [01] KM_RESET (Reset the Key Manager)
1A21 CD 75 1A call lab1A75
1A24 11 46 B4 ld de,#b446
1A27 21 98 00 ld hl,lab0098
1A2A CD 81 1A call lab1A81
1A2D 21 36 1A ld hl,lab1A36
1A30 CD 8A 0A call lab0A8A
1A33 C3 82 1C jp lab1C82
1A36 03 lab1A36 db #3 ; Number of indirection bytes to restore (multiples of 3) &BB03=&1A1E (&08AE) [01] KM_RESET (Reset the Key Manager)
1A37 db #ee,#bd ; Destination address of first indirection to be restored &BDEE KM_TEST_BREAK
1A39 db #c3,#2f,#1c ; Indirection entry 01 of 01 (jp #1c2f) &BDEE KM_TEST_BREAK (Test for break (or reset))
1A3C CD 42 1A lab1A3C call lab1A42 ; &BB06=&1A3C (&08B0) [02] KM_WAIT_CHAR (Wait for the next character from the keyboard)
1A3F 30 FB jr nc,lab1A3C
1A41 C9 ret
1A42 E5 lab1A42 push hl ; &BB09=&1A42 (&08B2) [03] KM_READ_CHAR (Test if a character is available from the keyboard)
1A43 21 E0 B4 ld hl,#b4e0
1A46 7E ld a,(hl)
1A47 36 FF ld (hl),#ff
1A49 BE cp (hl)
1A4A 38 27 jr c,lab1A73
1A4C 2A DE B4 ld hl,(#b4de)
1A4F 7C ld a,h
1A50 B7 or a
1A51 20 11 jr nz,lab1A64
1A53 CD 5C 1B lab1A53 call lab1B5C
1A56 30 1B jr nc,lab1A73
1A58 FE 80 cp #80
1A5A 38 17 jr c,lab1A73
1A5C FE A0 cp #a0
1A5E 3F ccf
1A5F 38 12 jr c,lab1A73
1A61 67 ld h,a
1A62 2E 00 ld l,#0
1A64 D5 lab1A64 push de
1A65 CD 2E 1B call lab1B2E
1A68 38 02 jr c,lab1A6C
1A6A 26 00 ld h,#0
1A6C 2C lab1A6C inc l
1A6D 22 DE B4 ld (#b4de),hl
1A70 D1 pop de
1A71 30 E0 jr nc,lab1A53
1A73 E1 lab1A73 pop hl
1A74 C9 ret
1A75 3E FF lab1A75 ld a,#ff
1A77 32 E0 B4 ld (#b4e0),a ; &BB0C=&1A77 (&08B4) [04] KM_CHAR_RETURN (Return a single character to the keyboard for next time)
1A7A C9 ret
1A7B CD 81 1A call lab1A81 ; &BB15=&1A7B (&08BA) [07] KM_EXP_BUFFER (Allocate a buffer for expansion strings)
1A7E 3F ccf
1A7F FB ei
1A80 C9 ret
1A81 F3 lab1A81 di
1A82 7D ld a,l
1A83 D6 31 sub #31
1A85 7C ld a,h
1A86 DE 00 sbc a,#0
1A88 D8 ret c
1A89 19 add hl,de
1A8A 22 E3 B4 ld (#b4e3),hl
1A8D EB ex de,hl
1A8E 22 E1 B4 ld (#b4e1),hl
1A91 01 30 0A ld bc,lab0A30
1A94 36 01 lab1A94 ld (hl),#1
1A96 23 inc hl
1A97 71 ld (hl),c
1A98 23 inc hl
1A99 0C inc c
1A9A 10 F8 djnz lab1A94
1A9C EB ex de,hl
1A9D 21 B3 1A ld hl,lab1AB3
1AA0 0E 0A ld c,#a
1AA2 ED B0 ldir
1AA4 EB ex de,hl
1AA5 06 13 ld b,#13
1AA7 AF xor a
1AA8 77 lab1AA8 ld (hl),a
1AA9 23 inc hl
1AAA 10 FC djnz lab1AA8
1AAC 22 E5 B4 ld (#b4e5),hl
1AAF 32 DF B4 ld (#b4df),a
1AB2 C9 ret
1AB3 lab1AB3 db #01,#2e
1AB5 db #01,#0d
1AB7 db #05,#52,#55,#4e,#22,#0d ; PRUN".
1ABD F3 di ; &BB0F=&1ABD (&08B6) [05] KM_SET_EXPAND (Set an expansion string)
1ABE 78 ld a,b
1ABF CD 3E 1B call lab1B3E
1AC2 30 1F jr nc,lab1AE3
1AC4 C5 push bc
1AC5 D5 push de
1AC6 E5 push hl
1AC7 CD E5 1A call lab1AE5
1ACA 3F ccf
1ACB E1 pop hl
1ACC D1 pop de
1ACD C1 pop bc
1ACE 30 13 jr nc,lab1AE3
1AD0 1B dec de
1AD1 79 ld a,c
1AD2 0C inc c
1AD3 12 lab1AD3 ld (de),a
1AD4 13 inc de
1AD5 E7 rst 32
1AD6 23 inc hl
1AD7 0D dec c
1AD8 20 F9 jr nz,lab1AD3
1ADA 21 DF B4 ld hl,#b4df
1ADD 78 ld a,b
1ADE AE xor (hl)
1ADF 20 01 jr nz,lab1AE2
1AE1 77 ld (hl),a
1AE2 37 lab1AE2 scf
1AE3 FB lab1AE3 ei
1AE4 C9 ret
1AE5 06 00 lab1AE5 ld b,#0
1AE7 60 ld h,b
1AE8 6F ld l,a
1AE9 79 ld a,c
1AEA 95 sub l
1AEB C8 ret z
1AEC 30 0F jr nc,lab1AFD
1AEE 7D ld a,l
1AEF 69 ld l,c
1AF0 4F ld c,a
1AF1 19 add hl,de
1AF2 EB ex de,hl
1AF3 09 add hl,bc
1AF4 CD 22 1B call lab1B22
1AF7 28 23 jr z,lab1B1C
1AF9 ED B0 ldir
1AFB 18 1F jr lab1B1C
1AFD 4F lab1AFD ld c,a
1AFE 19 add hl,de
1AFF E5 push hl
1B00 2A E5 B4 ld hl,(#b4e5)
1B03 09 add hl,bc
1B04 EB ex de,hl
1B05 2A E3 B4 ld hl,(#b4e3)
1B08 7D ld a,l
1B09 93 sub e
1B0A 7C ld a,h
1B0B 9A sbc a,d
1B0C E1 pop hl
1B0D D8 ret c
1B0E CD 22 1B call lab1B22
1B11 2A E5 B4 ld hl,(#b4e5)
1B14 28 06 jr z,lab1B1C
1B16 D5 push de
1B17 1B dec de
1B18 2B dec hl
1B19 ED B8 lddr
1B1B D1 pop de
1B1C ED 53 E5 B4 lab1B1C ld (#b4e5),de
1B20 B7 or a
1B21 C9 ret
1B22 3A E5 B4 lab1B22 ld a,(#b4e5)
1B25 95 sub l
1B26 4F ld c,a
1B27 3A E6 B4 ld a,(#b4e6)
1B2A 9C sbc a,h
1B2B 47 ld b,a
1B2C B1 or c
1B2D C9 ret
1B2E CD 3E 1B lab1B2E call lab1B3E ; &BB12=&1B2E (&08B8) [06] KM_GET_EXPAND (Get a character from an expansion string)
1B31 D0 ret nc
1B32 BD cp l
1B33 C8 ret z
1B34 3F ccf
1B35 D0 ret nc
1B36 E5 push hl
1B37 26 00 ld h,#0
1B39 19 add hl,de
1B3A 7E ld a,(hl)
1B3B E1 pop hl
1B3C 37 scf
1B3D C9 ret
1B3E E6 7F lab1B3E and #7f
1B40 FE 20 cp #20
1B42 D0 ret nc
1B43 E5 push hl
1B44 2A E1 B4 ld hl,(#b4e1)
1B47 11 00 00 ld de,lab0000
1B4A 3C inc a
1B4B 19 lab1B4B add hl,de
1B4C 5E ld e,(hl)
1B4D 23 inc hl
1B4E 3D dec a
1B4F 20 FA jr nz,lab1B4B
1B51 7B ld a,e
1B52 EB ex de,hl
1B53 E1 pop hl
1B54 37 scf
1B55 C9 ret
1B56 CD 5C 1B lab1B56 call lab1B5C ; &BB18=&1B56 (&08BC) [08] KM_WAIT_KEY (Wait for the next key from the keyboard)
1B59 30 FB jr nc,lab1B56
1B5B C9 ret
1B5C E5 lab1B5C push hl ; &BB1B=&1B5C (&08BE) [09] KM_READ_KEY (Test if a key is available from the keyboard)
1B5D C5 push bc
1B5E CD 15 1D lab1B5E call lab1D15
1B61 30 3A jr nc,lab1B9D
1B63 79 ld a,c
1B64 FE EF cp #ef
1B66 28 34 jr z,lab1B9C
1B68 E6 0F and #f
1B6A 87 add a,a
1B6B 87 add a,a
1B6C 87 add a,a
1B6D 3D dec a
1B6E 3C lab1B6E inc a
1B6F CB 08 rrc b
1B71 30 FB jr nc,lab1B6E
1B73 CD A0 1B call lab1BA0
1B76 21 E8 B4 ld hl,#b4e8
1B79 CB 7E bit 7,(hl)
1B7B 28 0A jr z,lab1B87
1B7D FE 61 cp #61
1B7F 38 06 jr c,lab1B87
1B81 FE 7B cp #7b
1B83 30 02 jr nc,lab1B87
1B85 C6 E0 add a,#e0
1B87 FE FF lab1B87 cp #ff
1B89 28 D3 jr z,lab1B5E
1B8B FE FE cp #fe
1B8D 21 E7 B4 ld hl,#b4e7
1B90 28 05 jr z,lab1B97
1B92 FE FD cp #fd
1B94 23 inc hl
1B95 20 05 jr nz,lab1B9C
1B97 7E lab1B97 ld a,(hl)
1B98 2F cpl
1B99 77 ld (hl),a
1B9A 18 C2 jr lab1B5E
1B9C 37 lab1B9C scf
1B9D C1 lab1B9D pop bc
1B9E E1 pop hl
1B9F C9 ret
1BA0 CB 11 lab1BA0 rl c
1BA2 DA 48 1D jp c,lab1D48
1BA5 47 ld b,a
1BA6 3A E7 B4 ld a,(#b4e7)
1BA9 B1 or c
1BAA E6 40 and #40
1BAC 78 ld a,b
1BAD C2 43 1D jp nz,lab1D43
1BB0 C3 3E 1D jp lab1D3E
1BB3 2A E7 B4 ld hl,(#b4e7) ; &BB21=&1BB3 (&08C2) [11] KM_GET_STATE (Fetch Caps Lock and Shift Lock states)
1BB6 C9 ret
1BB7 11 FF B4 lab1BB7 ld de,#b4ff
1BBA 21 F5 B4 ld hl,#b4f5
1BBD CD 46 08 call lab0846
1BC0 3A 01 B5 ld a,(#b501)
1BC3 E6 A0 and #a0
1BC5 4F ld c,a
1BC6 21 ED B4 ld hl,#b4ed
1BC9 B6 or (hl)
1BCA 77 ld (hl),a
1BCB 21 FF B4 ld hl,#b4ff
1BCE 11 EB B4 ld de,#b4eb
1BD1 06 00 ld b,#0
1BD3 1A lab1BD3 ld a,(de)
1BD4 AE xor (hl)
1BD5 A6 and (hl)
1BD6 C4 48 1C call nz,lab1C48
1BD9 7E ld a,(hl)
1BDA 12 ld (de),a
1BDB 23 inc hl
1BDC 13 inc de
1BDD 0C inc c
1BDE 79 ld a,c
1BDF E6 0F and #f
1BE1 FE 0A cp #a
1BE3 20 EE jr nz,lab1BD3
1BE5 79 ld a,c
1BE6 E6 A0 and #a0
1BE8 CB 71 bit 6,c
1BEA 4F ld c,a
1BEB C4 EE BD call nz,#bdee
1BEE 78 ld a,b
1BEF B7 or a
1BF0 C0 ret nz
1BF1 21 09 B5 ld hl,#b509
1BF4 35 dec (hl)
1BF5 C0 ret nz
1BF6 2A 0A B5 ld hl,(#b50a)
1BF9 EB ex de,hl
1BFA 42 ld b,d
1BFB 16 00 ld d,#0
1BFD 21 EB B4 ld hl,#b4eb
1C00 19 add hl,de
1C01 7E ld a,(hl)
1C02 2A 47 B5 ld hl,(#b547)
1C05 19 add hl,de
1C06 A6 and (hl)
1C07 A0 and b
1C08 C8 ret z
1C09 21 09 B5 ld hl,#b509
1C0C 34 inc (hl)
1C0D 3A 40 B5 ld a,(#b540)
1C10 B7 or a
1C11 C0 ret nz
1C12 79 ld a,c
1C13 B3 or e
1C14 4F ld c,a
1C15 3A E9 B4 ld a,(#b4e9)
1C18 32 09 B5 lab1C18 ld (#b509),a
1C1B CD FE 1C call lab1CFE
1C1E 79 ld a,c
1C1F E6 0F and #f
1C21 6F ld l,a
1C22 60 ld h,b
1C23 22 0A B5 ld (#b50a),hl
1C26 FE 08 cp #8
1C28 C0 ret nz
1C29 CB 60 bit 4,b
1C2B C0 ret nz
1C2C CB F1 set 6,c
1C2E C9 ret
1C2F 21 F3 B4 ld hl,#b4f3
1C32 CB 56 bit 2,(hl)
1C34 C8 ret z
1C35 79 ld a,c
1C36 EE A0 xor #a0
1C38 20 56 jr nz,lab1C90
1C3A C5 push bc
1C3B 23 inc hl
1C3C 06 0A ld b,#a
1C3E 8E lab1C3E adc a,(hl)
1C3F 2B dec hl
1C40 10 FC djnz lab1C3E
1C42 C1 pop bc
1C43 FE A4 cp #a4
1C45 20 49 jr nz,lab1C90
1C47 C7 rst 0
1C48 E5 lab1C48 push hl
1C49 D5 push de
1C4A 5F lab1C4A ld e,a
1C4B 2F cpl
1C4C 3C inc a
1C4D A3 and e
1C4E 47 ld b,a
1C4F 3A EA B4 ld a,(#b4ea)
1C52 CD 18 1C call lab1C18
1C55 78 ld a,b
1C56 AB xor e
1C57 20 F1 jr nz,lab1C4A
1C59 D1 pop de
1C5A E1 pop hl
1C5B C9 ret
1C5C 3A F1 B4 ld a,(#b4f1) ; &BB24=&1C5C (&08C4) [12] KM_GET_JOYSTICK (Fetch the current state of the Joystick(s))
1C5F E6 7F and #7f
1C61 6F ld l,a
1C62 3A F4 B4 ld a,(#b4f4)
1C65 E6 7F and #7f
1C67 67 ld h,a
1C68 C9 ret
1C69 2A E9 B4 ld hl,(#b4e9) ; &BB42=&1C69 (&08D8) [22] KM_GET_DELAY (Get start up delay and repeat speed)
1C6C C9 ret
1C6D 22 E9 B4 lab1C6D ld (#b4e9),hl ; &BB3F=&1C6D (&08D6) [21] KM_SET_DELAY (Set start up delay and repeat speed)
1C70 C9 ret
1C71 CD 82 1C call lab1C82 ; &BB45=&1C71 (&08DA) [23] KM_ARM_BREAK (Allow break events to be generated)
1C74 21 0D B5 ld hl,#b50d
1C77 06 40 ld b,#40
1C79 CD D2 01 call lab01D2
1C7C 3E FF ld a,#ff
1C7E 32 0C B5 ld (#b50c),a
1C81 C9 ret
1C82 C5 lab1C82 push bc ; &BB48=&1C82 (&08DC) [24] KM_DISARM_BREAK (Prevent break events from being generated)
1C83 D5 push de
1C84 21 0C B5 ld hl,#b50c
1C87 36 00 ld (hl),#0
1C89 23 inc hl
1C8A CD 85 02 call lab0285
1C8D D1 pop de
1C8E C1 pop bc
1C8F C9 ret
1C90 21 0C B5 lab1C90 ld hl,#b50c ; &BB4B=&1C90 (&08DE) [25] KM_BREAK_EVENT (Generate a break event - if armed)
1C93 7E ld a,(hl)
1C94 36 00 ld (hl),#0
1C96 BE cp (hl)
1C97 C8 ret z
1C98 C5 push bc
1C99 D5 push de
1C9A 23 inc hl
1C9B CD E2 01 call lab01E2
1C9E 0E EF ld c,#ef
1CA0 CD FE 1C call lab1CFE
1CA3 D1 pop de
1CA4 C1 pop bc
1CA5 C9 ret
1CA6 2A 47 B5 ld hl,(#b547) ; &BB3C=&1CA6 (&08D4) [20] KM_GET_REPEAT (Ask if a key is allowed to repeat)
1CA9 18 1D jr lab1CC8
1CAB FE 50 cp #50 ; &BB39=&1CAB (&08D2) [19] KM_SET_REPEAT (Set whether a kay may repeat)
1CAD D0 ret nc
1CAE 2A 47 B5 ld hl,(#b547)
1CB1 CD CD 1C call lab1CCD
1CB4 4F ld c,a
1CB5 2F cpl
1CB6 A6 and (hl)
1CB7 77 ld (hl),a
1CB8 79 ld a,c
1CB9 A0 and b
1CBA B6 or (hl)
1CBB 77 ld (hl),a
1CBC C9 ret
1CBD F5 lab1CBD push af ; &BB1E=&1CBD (&08C0) [10] KM_TEST_KEY (Test if a key is pressed)
1CBE 3A ED B4 ld a,(#b4ed)
1CC1 E6 A0 and #a0
1CC3 4F ld c,a
1CC4 F1 pop af
1CC5 21 EB B4 ld hl,#b4eb
1CC8 CD CD 1C lab1CC8 call lab1CCD
1CCB A6 and (hl)
1CCC C9 ret
1CCD D5 lab1CCD push de
1CCE F5 push af
1CCF E6 F8 and #f8
1CD1 0F rrca
1CD2 0F rrca
1CD3 0F rrca
1CD4 5F ld e,a
1CD5 16 00 ld d,#0
1CD7 19 add hl,de
1CD8 F1 pop af
1CD9 E5 push hl
1CDA 21 E5 1C ld hl,lab1CE5
1CDD E6 07 and #7
1CDF 5F ld e,a
1CE0 19 add hl,de
1CE1 7E ld a,(hl)
1CE2 E1 pop hl
1CE3 D1 pop de
1CE4 C9 ret
1CE5 lab1CE5 db #01,#02,#04,#08,#10,#20,#40,#80 ; Table to convert from bit index (0-7) to bit OR mask (1<<bit index)
1CED F3 lab1CED di
1CEE 21 3C B5 ld hl,#b53c
1CF1 36 15 ld (hl),#15
1CF3 23 inc hl
1CF4 AF xor a
1CF5 77 ld (hl),a
1CF6 23 inc hl
1CF7 36 01 ld (hl),#1
1CF9 23 inc hl
1CFA 77 ld (hl),a
1CFB 23 inc hl
1CFC 77 ld (hl),a
1CFD C9 ret
1CFE 21 3C B5 lab1CFE ld hl,#b53c
1D01 B7 or a
1D02 35 dec (hl)
1D03 28 0E jr z,lab1D13
1D05 CD 2C 1D call lab1D2C
1D08 71 ld (hl),c
1D09 23 inc hl
1D0A 70 ld (hl),b
1D0B 21 40 B5 ld hl,#b540
1D0E 34 inc (hl)
1D0F 21 3E B5 ld hl,#b53e
1D12 37 scf
1D13 34 lab1D13 inc (hl)
1D14 C9 ret
1D15 21 3E B5 lab1D15 ld hl,#b53e
1D18 B7 or a
1D19 35 dec (hl)
1D1A 28 0E jr z,lab1D2A
1D1C CD 2C 1D call lab1D2C
1D1F 4E ld c,(hl)
1D20 23 inc hl
1D21 46 ld b,(hl)
1D22 21 40 B5 ld hl,#b540
1D25 35 dec (hl)
1D26 21 3C B5 ld hl,#b53c
1D29 37 scf
1D2A 34 lab1D2A inc (hl)
1D2B C9 ret
1D2C 23 lab1D2C inc hl
1D2D 34 inc (hl)
1D2E 7E ld a,(hl)
1D2F FE 14 cp #14
1D31 20 02 jr nz,lab1D35
1D33 AF xor a
1D34 77 ld (hl),a
1D35 87 lab1D35 add a,a
1D36 CE 14 adc a,#14
1D38 6F ld l,a
1D39 CE B5 adc a,#b5
1D3B 95 sub l
1D3C 67 ld h,a
1D3D C9 ret
1D3E 2A 41 B5 lab1D3E ld hl,(#b541) ; &BB2A=&1D3E (&08C8) [14] KM_GET_TRANSLATE (Get entry from key translation table without Shift or Control)
1D41 18 08 jr lab1D4B
1D43 2A 43 B5 lab1D43 ld hl,(#b543) ; &BB30=&1D43 (&08CC) [16] KM_GET_SHIFT (Get entry from key translation table when Shift key is pressed)
1D46 18 03 jr lab1D4B
1D48 2A 45 B5 lab1D48 ld hl,(#b545) ; &BB36=&1D48 (&08D0) [18] KM_GET_CONTROL (Get entry from key translation table when Control key is pressed)
1D4B 85 lab1D4B add a,l
1D4C 6F ld l,a
1D4D 8C adc a,h
1D4E 95 sub l
1D4F 67 ld h,a
1D50 7E ld a,(hl)
1D51 C9 ret
1D52 2A 41 B5 ld hl,(#b541) ; &BB27=&1D52 (&08C6) [13] KM_SET_TRANSLATE (Set entry in key translation table without Shift or Control)
1D55 18 08 jr lab1D5F
1D57 2A 43 B5 ld hl,(#b543) ; &BB2D=&1D57 (&08CA) [15] KM_SET_SHIFT (Set entry in key translation table when Shift key is pressed)
1D5A 18 03 jr lab1D5F
1D5C 2A 45 B5 ld hl,(#b545) ; &BB33=&1D5C (&08CE) [17] KM_SET_CONTROL (Set entry in key translation table when Control key is pressed)
1D5F FE 50 lab1D5F cp #50
1D61 D0 ret nc
1D62 85 add a,l
1D63 6F ld l,a
1D64 8C adc a,h
1D65 95 sub l
1D66 67 ld h,a
1D67 70 ld (hl),b
1D68 C9 ret
1D69 lab1D69 db #f0,#f3,#f1,#89,#86,#83,#8b,#8a ; ........ Key Translation Table
1D71 db #f2,#e0,#87,#88,#85,#81,#82,#80 ; ........
1D79 db #10,#5b,#0d,#5d,#84,#ff,#5c,#ff ; .[.]..\.
1D81 db #5e,#2d,#40,#70,#3b,#3a,#2f,#2e ; ^-@p;:/.
1D89 db #30,#39,#6f,#69,#6c,#6b,#6d,#2c ; 09oilkm,
1D91 db #38,#37,#75,#79,#68,#6a,#6e,#20 ; 87uyhjn
1D99 db #36,#35,#72,#74,#67,#66,#62,#76 ; 65rtgfbv
1DA1 db #34,#33,#65,#77,#73,#64,#63,#78 ; 43ewsdcx
1DA9 db #31,#32,#fc,#71,#09,#61,#fd,#7a ; 12.q.a.z
1DB1 db #0b,#0a,#08,#09,#58,#5a,#ff,#7f ; ....XZ..
1DB9 db #f4,#f7,#f5,#89,#86,#83,#8b,#8a ; ........ Key Shift Table
1DC1 db #f6,#e0,#87,#88,#85,#81,#82,#80 ; ........
1DC9 db #10,#7b,#0d,#7d,#84,#ff,#60,#ff ; ......`.
1DD1 db #a3,#3d,#7c,#50,#2b,#2a,#3f,#3e ; .=.P+*?>
1DD9 db #5f,#29,#4f,#49,#4c,#4b,#4d,#3c ; _)OILKM<
1DE1 db #28,#27,#55,#59,#48,#4a,#4e,#20 ; ('UYHJN
1DE9 db #26,#25,#52,#54,#47,#46,#42,#56 ; &%RTGFBV
1DF1 db #24,#23,#45,#57,#53,#44,#43,#58 ; $#EWSDCX
1DF9 db #21,#22,#fc,#51,#09,#41,#fd,#5a ; !".Q.A.Z
1E01 db #0b,#0a,#08,#09,#58,#5a,#ff,#7f ; ....XZ..
1E09 db #f8,#fb,#f9,#89,#86,#83,#8c,#8a ; ........ Key CTRL Table
1E11 db #fa,#e0,#87,#88,#85,#81,#82,#80 ; ........
1E19 db #10,#1b,#0d,#1d,#84,#ff,#1c,#ff ; ........
1E21 db #1e,#ff,#00,#10,#ff,#ff,#ff,#ff ; ........
1E29 db #1f,#ff,#0f,#09,#0c,#0b,#0d,#ff ; ........
1E31 db #ff,#ff,#15,#19,#08,#0a,#0e,#ff ; ........
1E39 db #ff,#ff,#12,#14,#07,#06,#02,#16 ; ....td$.
1E41 db #ff,#ff,#05,#17,#13,#04,#03,#18 ; .._..C3.
1E49 db #ff,#7e,#fc,#11,#e1,#01,#fe,#1a ; ........
1E51 db #ff,#ff,#ff,#ff,#ff,#ff,#ff,#7f ; ........
1E59 db #07,#03,#4b,#ff,#ff,#ff,#ff,#ff ; .?K.....
1E61 db #ab,#8f ; ..
1E63 C7 rst 0
1E64 C7 rst 0
1E65 C7 rst 0
1E66 C7 rst 0
1E67 C7 rst 0
1E68 AF lab1E68 xor a ; &BCA7=&1E68 (&09C6) [141] SOUND_RESET (Reset the Sound Manager)
1E69 F3 di
1E6A 32 52 B5 ld (#b552),a
1E6D 32 51 B5 ld (#b551),a
1E70 21 55 B5 ld hl,#b555
1E73 11 03 1F ld de,lab1F03
1E76 06 81 ld b,#81
1E78 CD D2 01 call lab01D2
1E7B 3E 3F ld a,#3f
1E7D 32 19 B6 ld (#b619),a
1E80 21 5C B5 ld hl,#b55c
1E83 01 3D 00 ld bc,lab003D
1E86 11 08 01 ld de,lab0108
1E89 AF xor a
1E8A 77 lab1E8A ld (hl),a
1E8B 23 inc hl
1E8C 72 ld (hl),d
1E8D 23 inc hl
1E8E 73 ld (hl),e
1E8F 09 add hl,bc
1E90 3C inc a
1E91 EB ex de,hl
1E92 29 add hl,hl
1E93 EB ex de,hl
1E94 FE 03 cp #3
1E96 20 F2 jr nz,lab1E8A
1E98 0E 07 ld c,#7
1E9A DD E5 lab1E9A push ix
1E9C E5 push hl
1E9D 21 1D B5 ld hl,#b51d
1EA0 41 ld b,c
1EA1 11 3F 00 lab1EA1 ld de,lab003F
1EA4 19 add hl,de
1EA5 CB 38 lab1EA5 srl b
1EA7 30 F8 jr nc,lab1EA1
1EA9 C5 push bc
1EAA E5 push hl
1EAB DD E1 pop ix
1EAD EB ex de,hl
1EAE CD 7F 22 call lab227F
1EB1 13 inc de
1EB2 13 inc de
1EB3 13 inc de
1EB4 6B ld l,e
1EB5 62 ld h,d
1EB6 13 inc de
1EB7 01 3B 00 ld bc,lab003B
1EBA 36 00 ld (hl),#0
1EBC ED B0 ldir
1EBE DD 36 1C 04 ld (ix+28),#4
1EC2 C1 pop bc
1EC3 EB ex de,hl
1EC4 04 inc b
1EC5 10 DE djnz lab1EA5
1EC7 E1 pop hl
1EC8 DD E1 pop ix
1ECA C9 ret
1ECB 21 52 B5 ld hl,#b552 ; &BCB6=&1ECB (&09D0) [146] SOUND_HOLD (Stop all sounds in mid flight)
1ECE F3 di
1ECF 7E ld a,(hl)
1ED0 36 00 ld (hl),#0
1ED2 FB ei
1ED3 B7 or a
1ED4 C8 ret z
1ED5 2B dec hl
1ED6 77 ld (hl),a
1ED7 2E 03 ld l,#3
1ED9 0E 00 ld c,#0
1EDB 3E 07 lab1EDB ld a,#7
1EDD 85 add a,l
1EDE CD 26 08 call lab0826
1EE1 2D dec l
1EE2 20 F7 jr nz,lab1EDB
1EE4 37 scf
1EE5 C9 ret
1EE6 3A 51 B5 lab1EE6 ld a,(#b551) ; &BCB9=&1EE6 (&09D2) [147] SOUND_CONTINUE (Restart sounds after they have been stopped)
1EE9 B7 or a
1EEA C8 ret z
1EEB DD 21 1D B5 ld ix,#b51d
1EEF 11 3F 00 ld de,lab003F
1EF2 DD 19 lab1EF2 add ix,de
1EF4 CB 3F srl a
1EF6 F5 push af
1EF7 DD 7E 0F ld a,(ix+15)
1EFA DC 76 22 call c,lab2276
1EFD F1 pop af
1EFE 20 F2 jr nz,lab1EF2
1F00 C3 1E 20 jp lab201E
1F03 DD E5 lab1F03 push ix
1F05 21 50 B5 ld hl,#b550
1F08 E5 push hl
1F09 AF xor a
1F0A 77 ld (hl),a
1F0B 23 inc hl
1F0C 46 ld b,(hl)
1F0D C5 push bc
1F0E 23 inc hl
1F0F B6 or (hl)
1F10 28 22 jr z,lab1F34
1F12 DD 21 1D B5 ld ix,#b51d
1F16 01 3F 00 lab1F16 ld bc,lab003F
1F19 DD 09 lab1F19 add ix,bc
1F1B CB 3F srl a
1F1D 30 FA jr nc,lab1F19
1F1F F5 push af
1F20 DD 7E 04 ld a,(ix+4)
1F23 1F rra
1F24 DC C2 22 call c,lab22C2
1F27 DD 7E 07 ld a,(ix+7)
1F2A 1F rra
1F2B DC B6 21 call c,lab21B6
1F2E DC A8 20 call c,lab20A8
1F31 F1 pop af
1F32 20 E2 jr nz,lab1F16
1F34 C1 lab1F34 pop bc
1F35 E1 pop hl
1F36 7E ld a,(hl)
1F37 B7 or a
1F38 28 20 jr z,lab1F5A
1F3A 4F ld c,a
1F3B 23 inc hl
1F3C 7E ld a,(hl)
1F3D 70 ld (hl),b
1F3E A8 xor b
1F3F 47 ld b,a
1F40 23 inc hl
1F41 B6 or (hl)
1F42 77 ld (hl),a
1F43 78 ld a,b
1F44 2F cpl
1F45 A1 and c
1F46 28 12 jr z,lab1F5A
1F48 DD 21 1D B5 ld ix,#b51d
1F4C 11 3F 00 ld de,lab003F
1F4F DD 19 lab1F4F add ix,de
1F51 CB 3F srl a
1F53 F5 push af
1F54 DC 7F 22 call c,lab227F
1F57 F1 pop af
1F58 20 F5 jr nz,lab1F4F
1F5A AF lab1F5A xor a
1F5B 32 54 B5 ld (#b554),a
1F5E DD E1 pop ix
1F60 C9 ret
1F61 21 52 B5 lab1F61 ld hl,#b552
1F64 7E ld a,(hl)
1F65 B7 or a
1F66 C8 ret z
1F67 23 inc hl
1F68 35 dec (hl)
1F69 C0 ret nz
1F6A 34 inc (hl)
1F6B 23 inc hl
1F6C 7E ld a,(hl)
1F6D B7 or a
1F6E C0 ret nz
1F6F 2B dec hl
1F70 36 03 ld (hl),#3
1F72 2B dec hl
1F73 46 ld b,(hl)
1F74 21 22 B5 ld hl,#b522
1F77 11 3F 00 ld de,lab003F
1F7A AF xor a
1F7B 19 lab1F7B add hl,de
1F7C CB 38 srl b
1F7E 30 FB jr nc,lab1F7B
1F80 35 dec (hl)
1F81 20 05 jr nz,lab1F88
1F83 2B dec hl
1F84 CB 06 rlc (hl)
1F86 8A adc a,d
1F87 23 inc hl
1F88 23 lab1F88 inc hl
1F89 35 dec (hl)
1F8A 20 05 jr nz,lab1F91
1F8C 23 inc hl
1F8D CB 06 rlc (hl)
1F8F 8A adc a,d
1F90 2B dec hl
1F91 2B lab1F91 dec hl
1F92 04 inc b
1F93 10 E6 djnz lab1F7B
1F95 B7 or a
1F96 C8 ret z
1F97 21 54 B5 ld hl,#b554
1F9A 77 ld (hl),a
1F9B 23 inc hl
1F9C C3 E2 01 jp lab01E2
1F9F CD E6 1E lab1F9F call lab1EE6 ; &BCAA=&1F9F (&09C8) [142] SOUND_QUEUE (Add a sound to a sound queue)
1FA2 7E ld a,(hl)
1FA3 E6 07 and #7
1FA5 37 scf
1FA6 C8 ret z
1FA7 4F ld c,a
1FA8 B6 or (hl)
1FA9 FC 9A 1E call m,lab1E9A
1FAC 41 ld b,c
1FAD DD 21 1D B5 ld ix,#b51d
1FB1 11 3F 00 ld de,lab003F
1FB4 AF xor a
1FB5 DD 19 lab1FB5 add ix,de
1FB7 CB 38 srl b
1FB9 30 FA jr nc,lab1FB5
1FBB DD 72 1E ld (ix+30),d
1FBE DD BE 1C cp (ix+28)
1FC1 3F ccf
1FC2 9F sbc a,a
1FC3 04 inc b
1FC4 10 EF djnz lab1FB5
1FC6 B7 or a
1FC7 C0 ret nz
1FC8 41 ld b,c
1FC9 7E ld a,(hl)
1FCA 1F rra
1FCB 1F rra
1FCC 1F rra
1FCD B0 or b
1FCE E6 0F and #f
1FD0 4F ld c,a
1FD1 23 inc hl
1FD2 DD 21 1D B5 ld ix,#b51d
1FD6 11 3F 00 lab1FD6 ld de,lab003F
1FD9 DD 19 lab1FD9 add ix,de
1FDB CB 38 srl b
1FDD 30 FA jr nc,lab1FD9
1FDF E5 push hl
1FE0 C5 push bc
1FE1 DD 7E 1B ld a,(ix+27)
1FE4 DD 34 1B inc (ix+27)
1FE7 DD 35 1C dec (ix+28)
1FEA EB ex de,hl
1FEB CD 3A 20 call lab203A
1FEE E5 push hl
1FEF EB ex de,hl
1FF0 DD 7E 01 ld a,(ix+1)
1FF3 2F cpl
1FF4 A1 and c
1FF5 12 ld (de),a
1FF6 13 inc de
1FF7 7E ld a,(hl)
1FF8 23 inc hl
1FF9 87 add a,a
1FFA 87 add a,a
1FFB 87 add a,a
1FFC 87 add a,a
1FFD 47 ld b,a
1FFE 7E ld a,(hl)
1FFF 23 inc hl
2000 E6 0F and #f
2002 B0 or b
2003 12 ld (de),a
2004 13 inc de
2005 01 06 00 ld bc,#0006
2008 ED B0 ldir
200A E1 pop hl
200B F3 di
200C DD 7E 1A ld a,(ix+26)
200F DD 34 1A inc (ix+26)
2012 DD B6 03 or (ix+3)
2015 FB ei
2016 CC BD 20 call z,lab20BD
2019 C1 pop bc
201A E1 pop hl
201B 04 inc b
201C 10 B8 djnz lab1FD6
201E E5 lab201E push hl
201F 21 51 B5 ld hl,#b551
2022 7E ld a,(hl)
2023 B7 or a
2024 28 11 jr z,lab2037
2026 36 00 ld (hl),#0
2028 F3 di
2029 23 inc hl
202A 46 ld b,(hl)
202B B0 or b
202C 77 ld (hl),a
202D 78 ld a,b
202E B7 or a
202F 20 05 jr nz,lab2036
2031 23 inc hl
2032 36 03 ld (hl),#3
2034 23 inc hl
2035 77 ld (hl),a
2036 FB lab2036 ei
2037 E1 lab2037 pop hl
2038 37 scf
2039 C9 ret
203A E6 03 lab203A and #3
203C 87 add a,a
203D 87 add a,a
203E 87 add a,a
203F C6 1F add a,#1f
2041 DD E5 push ix
2043 E1 pop hl
2044 85 add a,l
2045 6F ld l,a
2046 8C adc a,h
2047 95 sub l
2048 67 ld h,a
2049 C9 ret
204A 6F ld l,a ; &BCB3=&204A (&09CE) [145] SOUND_RELEASE (Allow sounds to happen)
204B CD E6 1E call lab1EE6
204E 7D ld a,l
204F E6 07 and #7
2051 C8 ret z
2052 DD 21 1D B5 ld ix,#b51d
2056 11 3F 00 lab2056 ld de,lab003F
2059 DD 19 lab2059 add ix,de
205B CB 3F srl a
205D 30 FA jr nc,lab2059
205F F5 push af
2060 DD CB 03 5E bit 3,(ix+3)
2064 C4 B7 20 call nz,lab20B7
2067 F1 pop af
2068 20 EC jr nz,lab2056
206A 18 B2 jr lab201E
206C E6 07 and #7 ; &BCAD=&206C (&09CA) [143] SOUND_CHECK (Ask if there is space in a sound queue)
206E C8 ret z
206F 21 20 B5 ld hl,#b520
2072 11 3F 00 ld de,lab003F
2075 19 lab2075 add hl,de
2076 1F rra
2077 30 FC jr nc,lab2075
2079 F3 di
207A 7E ld a,(hl)
207B 87 add a,a
207C 87 add a,a
207D 87 add a,a
207E 11 19 00 ld de,#0019
2081 19 add hl,de
2082 B6 or (hl)
2083 23 inc hl
2084 23 inc hl
2085 36 00 ld (hl),#0
2087 FB ei
2088 C9 ret
2089 E6 07 and #7 ; &BCB0=&2089 (&09CC) [144] SOUND_ARM_EVENT (Set up an event to be run when a sound queue becomes not full)
208B C8 ret z
208C EB ex de,hl
208D 21 39 B5 ld hl,#b539
2090 01 3F 00 ld bc,lab003F
2093 09 lab2093 add hl,bc
2094 1F rra
2095 30 FC jr nc,lab2093
2097 AF xor a
2098 F3 di
2099 BE cp (hl)
209A 23 inc hl
209B 73 ld (hl),e
209C 23 inc hl
209D 20 03 jr nz,lab20A2
209F 72 ld (hl),d
20A0 FB ei
20A1 C9 ret
20A2 77 lab20A2 ld (hl),a
20A3 FB ei
20A4 EB ex de,hl
20A5 C3 E2 01 jp lab01E2
20A8 DD 7E 1A lab20A8 ld a,(ix+26)
20AB B7 or a
20AC CA 7F 22 jp z,lab227F
20AF DD 7E 01 ld a,(ix+1)
20B2 21 50 B5 ld hl,#b550
20B5 B6 or (hl)
20B6 77 ld (hl),a
20B7 DD 7E 19 lab20B7 ld a,(ix+25)
20BA CD 3A 20 call lab203A
20BD 7E lab20BD ld a,(hl)
20BE B7 or a
20BF 28 0C jr z,lab20CD
20C1 CB 5F bit 3,a
20C3 20 53 jr nz,lab2118
20C5 E5 push hl
20C6 36 00 ld (hl),#0
20C8 CD 1F 21 call lab211F
20CB E1 pop hl
20CC D0 ret nc
20CD DD 36 03 10 lab20CD ld (ix+3),#10
20D1 23 inc hl
20D2 7E ld a,(hl)
20D3 E6 F0 and #f0
20D5 F5 push af
20D6 AE xor (hl)
20D7 5F ld e,a
20D8 23 inc hl
20D9 4E ld c,(hl)
20DA 23 inc hl
20DB 56 ld d,(hl)
20DC 23 inc hl
20DD B2 or d
20DE B1 or c
20DF 28 08 jr z,lab20E9
20E1 E5 push hl
20E2 CD AB 22 call lab22AB
20E5 DD 56 01 ld d,(ix+1)
20E8 E1 pop hl
20E9 4E lab20E9 ld c,(hl)
20EA 23 inc hl
20EB 5E ld e,(hl)
20EC 23 inc hl
20ED 7E ld a,(hl)
20EE 23 inc hl
20EF 66 ld h,(hl)
20F0 6F ld l,a
20F1 F1 pop af
20F2 CD 75 21 call lab2175
20F5 21 51 B5 ld hl,#b551
20F8 DD 7E 01 ld a,(ix+1)
20FB B6 or (hl)
20FC 77 ld (hl),a
20FD DD 34 19 inc (ix+25)
2100 DD 35 1A dec (ix+26)
2103 DD 34 1C inc (ix+28)
2106 F3 di
2107 DD 7E 1E ld a,(ix+30)
210A DD 36 1E 00 ld (ix+30),#0
210E FB ei
210F B7 or a
2110 C8 ret z
2111 67 ld h,a
2112 DD 6E 1D ld l,(ix+29)
2115 C3 E2 01 jp lab01E2
2118 CB 9E lab2118 res 3,(hl)
211A DD 36 03 08 ld (ix+3),#8
211E C9 ret
211F DD E5 lab211F push ix
2121 47 ld b,a
2122 DD 4E 01 ld c,(ix+1)
2125 DD 21 5C B5 ld ix,#b55c
2129 CB 47 bit 0,a
212B 20 0C jr nz,lab2139
212D DD 21 9B B5 ld ix,#b59b
2131 CB 4F bit 1,a
2133 20 04 jr nz,lab2139
2135 DD 21 DA B5 ld ix,#b5da
2139 F3 lab2139 di
213A DD 7E 03 ld a,(ix+3)
213D A1 and c
213E 28 2D jr z,lab216D
2140 78 ld a,b
2141 DD BE 01 cp (ix+1)
2144 28 1A jr z,lab2160
2146 DD E5 push ix
2148 DD 21 DA B5 ld ix,#b5da
214C CB 57 bit 2,a
214E 20 04 jr nz,lab2154
2150 DD 21 9B B5 ld ix,#b59b
2154 DD 7E 03 lab2154 ld a,(ix+3)
2157 A1 and c
2158 28 12 jr z,lab216C
215A FB ei
215B CD B7 20 call lab20B7
215E DD E1 pop ix
2160 DD 36 03 00 lab2160 ld (ix+3),#0
2164 FB ei
2165 CD B7 20 call lab20B7
2168 DD E1 pop ix
216A 37 scf
216B C9 ret
216C E1 lab216C pop hl
216D DD E1 lab216D pop ix
216F DD 70 03 ld (ix+3),b
2172 FB ei
2173 B7 or a
2174 C9 ret
2175 CB FB lab2175 set 7,e
2177 DD 73 0F ld (ix+15),e
217A 5F ld e,a
217B 7D ld a,l
217C B4 or h
217D 20 01 jr nz,lab2180
217F 2B dec hl
2180 DD 75 08 lab2180 ld (ix+8),l
2183 DD 74 09 ld (ix+9),h
2186 79 ld a,c
2187 B7 or a
2188 28 08 jr z,lab2192
218A 3E 06 ld a,#6
218C CD 26 08 call lab0826
218F DD 7E 02 ld a,(ix+2)
2192 B2 lab2192 or d
2193 CD 8B 22 call lab228B
2196 7B ld a,e
2197 B7 or a
2198 28 0A jr z,lab21A4
219A 21 0A B6 ld hl,#b60a
219D 16 00 ld d,#0
219F 19 add hl,de
21A0 7E ld a,(hl)
21A1 B7 or a
21A2 20 03 jr nz,lab21A7
21A4 21 B2 21 lab21A4 ld hl,lab21B2
21A7 DD 75 0A lab21A7 ld (ix+10),l
21AA DD 74 0B ld (ix+11),h
21AD CD 65 22 call lab2265
21B0 18 0D jr lab21BF
21B2 lab21B2 db #01,#01,#00,#c8 ; Possible data - 4 bytes
21B6 DD 6E 0D lab21B6 ld l,(ix+13)
21B9 DD 66 0E ld h,(ix+14)
21BC DD 5E 10 ld e,(ix+16)
21BF 7B lab21BF ld a,e
21C0 FE FF cp #ff
21C2 28 76 jr z,lab223A
21C4 87 add a,a
21C5 7E ld a,(hl)
21C6 23 inc hl
21C7 38 4A jr c,lab2213
21C9 28 0D jr z,lab21D8
21CB 1D dec e
21CC B7 or a
21CD 20 06 jr nz,lab21D5
21CF DD B6 0F or (ix+15)
21D2 F2 DD 21 jp p,lab21DD
21D5 DD 86 0F lab21D5 add a,(ix+15)
21D8 E6 0F lab21D8 and #f
21DA CD 73 22 call lab2273
21DD 4E lab21DD ld c,(hl)
21DE DD 7E 09 ld a,(ix+9)
21E1 47 ld b,a
21E2 87 add a,a
21E3 38 1B jr c,lab2200
21E5 AF xor a
21E6 91 sub c
21E7 DD 86 08 add a,(ix+8)
21EA 38 0C jr c,lab21F8
21EC 05 dec b
21ED F2 F5 21 jp p,lab21F5
21F0 DD 4E 08 ld c,(ix+8)
21F3 AF xor a
21F4 47 ld b,a
21F5 DD 70 09 lab21F5 ld (ix+9),b
21F8 DD 77 08 lab21F8 ld (ix+8),a
21FB B0 or b
21FC 20 02 jr nz,lab2200
21FE 1E FF ld e,#ff
2200 7B lab2200 ld a,e
2201 B7 or a
2202 CC 46 22 call z,lab2246
2205 DD 73 10 ld (ix+16),e
2208 F3 di
2209 DD 71 06 ld (ix+6),c
220C DD 36 07 80 ld (ix+7),#80
2210 FB ei
2211 B7 or a
2212 C9 ret
2213 57 lab2213 ld d,a
2214 4B ld c,e
2215 3E 0D ld a,#d
2217 CD 26 08 call lab0826
221A 4A ld c,d
221B 3E 0B ld a,#b
221D CD 26 08 call lab0826
2220 4E ld c,(hl)
2221 3E 0C ld a,#c
2223 CD 26 08 call lab0826
2226 3E 10 ld a,#10
2228 CD 73 22 call lab2273
222B CD 46 22 call lab2246
222E 7B ld a,e
222F 3C inc a
2230 20 8D jr nz,lab21BF
2232 21 B2 21 ld hl,lab21B2
2235 CD 65 22 call lab2265
2238 18 85 jr lab21BF
223A AF lab223A xor a
223B DD 77 03 ld (ix+3),a
223E DD 77 07 ld (ix+7),a
2241 DD 77 04 ld (ix+4),a
2244 37 scf
2245 C9 ret
2246 DD 35 0C lab2246 dec (ix+12)
2249 20 1E jr nz,lab2269
224B DD 7E 09 ld a,(ix+9)
224E 87 add a,a
224F 21 B2 21 ld hl,lab21B2
2252 30 11 jr nc,lab2265
2254 DD 34 08 inc (ix+8)
2257 20 06 jr nz,lab225F
2259 DD 34 09 inc (ix+9)
225C 1E FF ld e,#ff
225E C8 ret z
225F DD 6E 0A lab225F ld l,(ix+10)
2262 DD 66 0B ld h,(ix+11)
2265 7E lab2265 ld a,(hl)
2266 DD 77 0C ld (ix+12),a
2269 23 lab2269 inc hl
226A 5E ld e,(hl)
226B 23 inc hl
226C DD 75 0D ld (ix+13),l
226F DD 74 0E ld (ix+14),h
2272 C9 ret
2273 DD 77 0F lab2273 ld (ix+15),a
2276 4F lab2276 ld c,a
2277 DD 7E 00 ld a,(ix+0)
227A C6 08 add a,#8
227C C3 26 08 jp lab0826
227F DD 7E 01 lab227F ld a,(ix+1)
2282 2F cpl
2283 21 52 B5 ld hl,#b552
2286 F3 di
2287 A6 and (hl)
2288 77 ld (hl),a
2289 FB ei
228A AF xor a
228B 47 lab228B ld b,a
228C DD 7E 01 ld a,(ix+1)
228F DD B6 02 or (ix+2)
2292 21 19 B6 ld hl,#b619
2295 F3 di
2296 B6 or (hl)
2297 A8 xor b
2298 BE cp (hl)
2299 77 ld (hl),a
229A FB ei
229B 20 03 jr nz,lab22A0
229D 78 ld a,b
229E B7 or a
229F C0 ret nz
22A0 AF lab22A0 xor a
22A1 CD 76 22 call lab2276
22A4 F3 di
22A5 4E ld c,(hl)
22A6 3E 07 ld a,#7
22A8 C3 26 08 jp lab0826
22AB CD 24 23 lab22AB call lab2324
22AE 7B ld a,e
22AF CD 4E 23 call lab234E
22B2 D0 ret nc
22B3 7E ld a,(hl)
22B4 E6 7F and #7f
22B6 C8 ret z
22B7 DD 75 11 ld (ix+17),l
22BA DD 74 12 ld (ix+18),h
22BD CD 13 23 call lab2313
22C0 18 09 jr lab22CB
22C2 DD 6E 14 lab22C2 ld l,(ix+20)
22C5 DD 66 15 ld h,(ix+21)
22C8 DD 5E 18 ld e,(ix+24)
22CB 4E lab22CB ld c,(hl)
22CC 23 inc hl
22CD 7B ld a,e
22CE D6 F0 sub #f0
22D0 38 04 jr c,lab22D6
22D2 1E 00 ld e,#0
22D4 18 0E jr lab22E4
22D6 1D lab22D6 dec e
22D7 79 ld a,c
22D8 87 add a,a
22D9 9F sbc a,a
22DA 57 ld d,a
22DB DD 7E 16 ld a,(ix+22)
22DE 81 add a,c
22DF 4F ld c,a
22E0 DD 7E 17 ld a,(ix+23)
22E3 8A adc a,d
22E4 57 lab22E4 ld d,a
22E5 CD 24 23 call lab2324
22E8 4E ld c,(hl)
22E9 7B ld a,e
22EA B7 or a
22EB 20 19 jr nz,lab2306
22ED DD 7E 13 ld a,(ix+19)
22F0 3D dec a
22F1 20 10 jr nz,lab2303
22F3 DD 6E 11 ld l,(ix+17)
22F6 DD 66 12 ld h,(ix+18)
22F9 7E ld a,(hl)
22FA C6 80 add a,#80
22FC 38 05 jr c,lab2303
22FE DD 36 04 00 ld (ix+4),#0
2302 C9 ret
2303 CD 13 23 lab2303 call lab2313
2306 DD 73 18 lab2306 ld (ix+24),e
2309 F3 di
230A DD 71 05 ld (ix+5),c
230D DD 36 04 80 ld (ix+4),#80
2311 FB ei
2312 C9 ret
2313 DD 77 13 lab2313 ld (ix+19),a
2316 23 inc hl
2317 5E ld e,(hl)
2318 23 inc hl
2319 DD 75 14 ld (ix+20),l
231C DD 74 15 ld (ix+21),h
231F 7B ld a,e
2320 B7 or a
2321 C0 ret nz
2322 1C inc e
2323 C9 ret
2324 DD 7E 00 lab2324 ld a,(ix+0)
2327 87 add a,a
2328 F5 push af
2329 DD 71 16 ld (ix+22),c
232C CD 26 08 call lab0826
232F F1 pop af
2330 3C inc a
2331 4A ld c,d
2332 DD 71 17 ld (ix+23),c
2335 C3 26 08 jp lab0826
2338 11 0A B6 ld de,#b60a ; &BCBC=&2338 (&09D4) [148] SOUND_AMPL_ENVELOPE (Set up an amplitude envelope)
233B 18 03 jr lab2340
233D 11 FA B6 ld de,#b6fa ; &BCBF=&233D (&09D6) [149] SOUND_TONE_ENVELOPE (Set up a tone envelope)
2340 EB lab2340 ex de,hl
2341 CD 51 23 call lab2351
2344 EB ex de,hl
2345 D0 ret nc
2346 ED B0 ldir
2348 C9 ret
2349 21 0A B6 ld hl,#b60a ; &BCC2=&2349 (&09D8) [150] SOUND_A_ADDRESS (Get the address of an amplitude envelope)
234C 18 03 jr lab2351
234E 21 FA B6 lab234E ld hl,#b6fa ; &BCC5=&234E (&09DA) [151 SOUND_T_ADDRESS (Get the address of a tone envelope)
2351 B7 lab2351 or a
2352 C8 ret z
2353 FE 10 cp #10
2355 D0 ret nc
2356 01 10 00 ld bc,lab0010
2359 87 add a,a
235A 87 add a,a
235B 87 add a,a
235C 87 add a,a
235D 85 add a,l
235E 6F ld l,a
235F 8C adc a,h
2360 95 sub l
2361 67 ld h,a
2362 37 scf
2363 C9 ret
2364 C7 rst 0
2365 C7 rst 0
2366 C7 rst 0
2367 C7 rst 0
2368 C7 rst 0
2369 C7 rst 0
236A C7 rst 0
236B C7 rst 0
236C C7 rst 0
236D C7 rst 0
236E C7 rst 0
236F C7 rst 0
2370 CD 01 24 lab2370 call lab2401 ; &BC65=&2370 (&099A) [119] CAS_INITIALISE (Initialise the Cassette Manager)
2373 CD 2E 24 call lab242E
2376 AF xor a
2377 CD 8E 23 call lab238E
237A 21 4D 01 ld hl,lab014D
237D 3E 19 ld a,#19
237F 29 add hl,hl ; &BC68=&237F (&099C) [120] CAS_SET_SPEED (Set the write speed)
2380 29 add hl,hl
2381 29 add hl,hl
2382 29 add hl,hl
2383 29 add hl,hl
2384 29 add hl,hl
2385 0F rrca
2386 0F rrca
2387 E6 3F and #3f
2389 6F ld l,a
238A 22 D1 B8 ld (#b8d1),hl
238D C9 ret
238E 32 00 B8 lab238E ld (#b800),a ; &BC6B=&238E (&099E) [121] CAS_NOISY (Enable or disable prompt messages)
2391 C9 ret
2392 DD 21 02 B8 ld ix,#b802 ; &BC77=&2392 (&09A6) [125] CAS_IN_OPEN (Open a file for input)
2396 CD AF 23 call lab23AF
2399 D0 ret nc
239A E5 push hl
239B CD 3F 25 call lab253F
239E ED 5B 1C B8 ld de,(#b81c)
23A2 ED 4B 1F B8 ld bc,(#b81f)
23A6 3A 19 B8 ld a,(#b819)
23A9 E1 pop hl
23AA C9 ret
23AB DD 21 47 B8 ld ix,#b847 ; &BC8C=&23AB (&09B4) [132] CAS_OUT_OPEN (Open a file for output)
23AF DD 7E 00 lab23AF ld a,(ix+0)
23B2 B7 or a
23B3 C0 ret nz
23B4 DD E5 push ix
23B6 E3 ex (sp),hl
23B7 36 01 ld (hl),#1
23B9 23 inc hl
23BA 73 ld (hl),e
23BB 23 inc hl
23BC 72 ld (hl),d
23BD 23 inc hl
23BE 73 ld (hl),e
23BF 23 inc hl
23C0 72 ld (hl),d
23C1 23 inc hl
23C2 EB ex de,hl
23C3 E1 pop hl
23C4 D5 push de
23C5 0E 40 ld c,#40
23C7 12 lab23C7 ld (de),a
23C8 13 inc de
23C9 0D dec c
23CA 20 FB jr nz,lab23C7
23CC D1 pop de
23CD D5 push de
23CE 78 ld a,b
23CF FE 10 cp #10
23D1 38 02 jr c,lab23D5
23D3 06 10 ld b,#10
23D5 04 lab23D5 inc b
23D6 48 ld c,b
23D7 18 07 jr lab23E0
23D9 E7 lab23D9 rst 32
23DA 23 inc hl
23DB CD B6 27 call lab27B6
23DE 12 ld (de),a
23DF 13 inc de
23E0 10 F7 lab23E0 djnz lab23D9
23E2 0D lab23E2 dec c
23E3 28 09 jr z,lab23EE
23E5 1B dec de
23E6 1A ld a,(de)
23E7 EE 20 xor #20
23E9 20 03 jr nz,lab23EE
23EB 12 ld (de),a
23EC 18 F4 jr lab23E2
23EE E1 lab23EE pop hl
23EF DD 36 15 01 ld (ix+21),#1
23F3 DD 36 17 16 ld (ix+23),#16
23F7 DD 35 1C dec (ix+28)
23FA 37 scf
23FB C9 ret
23FC 3A 02 B8 ld a,(#b802) ; &BC7A=&23FC (&09A8) [126] CAS_IN_CLOSE (Close the input file properly)
23FF B7 or a
2400 C8 ret z
2401 21 02 B8 lab2401 ld hl,#b802 ; &BC7D=&2401 (&09AA) [127] CAS_CAS_IN_ABANDON (Close the input file immediately)
2404 3E 01 ld a,#1
2406 36 00 lab2406 ld (hl),#0
2408 23 inc hl
2409 5E ld e,(hl)
240A 23 inc hl
240B 56 ld d,(hl)
240C 21 CC B8 ld hl,#b8cc
240F AE xor (hl)
2410 37 scf
2411 C0 ret nz
2412 77 ld (hl),a
2413 9F sbc a,a
2414 C9 ret
2415 3A 47 B8 ld a,(#b847) ; &BC8F=&2415 (&09B6) [133] CAS_OUT_CLOSE (Close the output file properly)
2418 FE 04 cp #4
241A 28 12 jr z,lab242E
241C C6 FF add a,#ff
241E D0 ret nc
241F 21 5D B8 ld hl,#b85d
2422 36 FF ld (hl),#ff
2424 23 inc hl
2425 23 inc hl
2426 7E ld a,(hl)
2427 23 inc hl
2428 B6 or (hl)
2429 37 scf
242A C4 14 26 call nz,lab2614
242D D0 ret nc
242E 21 47 B8 lab242E ld hl,#b847 ; &BC92=&242E (&09B8) [134] CAS_OUT_ABANDON (Close the output file immediately)
2431 3E 02 ld a,#2
2433 18 D1 jr lab2406
2435 E5 lab2435 push hl ; &BC80=&2435 (&09AC) [128] CAS_IN_CHAR (Read a character from the input file)
2436 D5 push de
2437 C5 push bc
2438 06 02 ld b,#2
243A CD 8B 24 call lab248B
243D 20 1A jr nz,lab2459
243F 2A 1A B8 ld hl,(#b81a)
2442 7C ld a,h
2443 B5 or l
2444 37 scf
2445 CC 3F 25 call z,lab253F
2448 30 0F jr nc,lab2459
244A 2A 1A B8 ld hl,(#b81a)
244D 2B dec hl
244E 22 1A B8 ld (#b81a),hl
2451 2A 05 B8 ld hl,(#b805)
2454 E7 rst 32
2455 23 inc hl
2456 22 05 B8 ld (#b805),hl
2459 18 2C lab2459 jr lab2487
245B E5 push hl ; &BC95=&245B (&09BA) [135] CAS_OUT_CHAR (Write a character to the output file)
245C D5 push de
245D C5 push bc
245E 4F ld c,a
245F 21 47 B8 ld hl,#b847
2462 06 02 ld b,#2
2464 CD 8E 24 call lab248E
2467 20 1E jr nz,lab2487
2469 2A 5F B8 ld hl,(#b85f)
246C 11 00 08 ld de,lab0800
246F ED 52 sbc hl,de
2471 C5 push bc
2472 D4 14 26 call nc,lab2614
2475 C1 pop bc
2476 30 0F jr nc,lab2487
2478 2A 5F B8 ld hl,(#b85f)
247B 23 inc hl
247C 22 5F B8 ld (#b85f),hl
247F 2A 4A B8 ld hl,(#b84a)
2482 71 ld (hl),c
2483 23 inc hl
2484 22 4A B8 ld (#b84a),hl
2487 C1 lab2487 pop bc
2488 D1 pop de
2489 E1 pop hl
248A C9 ret
248B 21 02 B8 lab248B ld hl,#b802
248E 7E lab248E ld a,(hl)
248F B8 cp b
2490 C8 ret z
2491 EE 01 xor #1
2493 C0 ret nz
2494 70 ld (hl),b
2495 C9 ret
2496 CD 35 24 call lab2435 ; &BC89=&2496 (&09B2) [131] CAS_TEST_EOF (Have we reached the end of the input file yet?)
2499 D0 ret nc
249A E5 push hl ; &BC86=&249A (&09B0) [130] CAS_RETURN (Put the last character read back)
249B 2A 1A B8 ld hl,(#b81a)
249E 23 inc hl
249F 22 1A B8 ld (#b81a),hl
24A2 2A 05 B8 ld hl,(#b805)
24A5 2B dec hl
24A6 22 05 B8 ld (#b805),hl
24A9 E1 pop hl
24AA C9 ret
24AB EB ex de,hl ; &BC83=&24AB (&09AE) [129] CAS_IN_DIRECT (Read the input file into store)
24AC 06 03 ld b,#3
24AE CD 8B 24 call lab248B
24B1 C0 ret nz
24B2 ED 53 1C B8 ld (#b81c),de
24B6 CD CF 24 call lab24CF
24B9 2A 1C B8 lab24B9 ld hl,(#b81c)
24BC ED 5B 1A B8 ld de,(#b81a)
24C0 19 add hl,de
24C1 22 1C B8 ld (#b81c),hl
24C4 CD 3F 25 call lab253F
24C7 38 F0 jr c,lab24B9
24C9 C8 ret z
24CA 2A A6 B8 ld hl,(#b8a6)
24CD 37 scf
24CE C9 ret
24CF 2A 03 B8 lab24CF ld hl,(#b803)
24D2 ED 5B 1C B8 ld de,(#b81c)
24D6 ED 4B 1A B8 ld bc,(#b81a)
24DA 7B ld a,e
24DB 95 sub l
24DC 7A ld a,d
24DD 9C sbc a,h
24DE DA A6 BA jp c,#baa6
24E1 09 add hl,bc
24E2 2B dec hl
24E3 EB ex de,hl
24E4 09 add hl,bc
24E5 2B dec hl
24E6 EB ex de,hl
24E7 C3 AC BA jp #baac
24EA E5 push hl ; &BC98=&24EA (&09BC) [136] CAS_OUT_DIRECT (Write the output file directly from store)
24EB C5 push bc
24EC 4F ld c,a
24ED 21 47 B8 ld hl,#b847
24F0 06 03 ld b,#3
24F2 CD 8E 24 call lab248E
24F5 79 ld a,c
24F6 C1 pop bc
24F7 E1 pop hl
24F8 C0 ret nz
24F9 32 5E B8 ld (#b85e),a
24FC ED 53 64 B8 ld (#b864),de
2500 ED 43 66 B8 ld (#b866),bc
2504 22 48 B8 lab2504 ld (#b848),hl
2507 ED 53 5F B8 ld (#b85f),de
250B 21 FF F7 ld hl,#f7ff
250E 19 add hl,de
250F 3F ccf
2510 D8 ret c
2511 21 00 08 ld hl,lab0800
2514 22 5F B8 ld (#b85f),hl
2517 EB ex de,hl
2518 ED 52 sbc hl,de
251A E5 push hl
251B 2A 48 B8 ld hl,(#b848)
251E 19 add hl,de
251F E5 push hl
2520 CD 14 26 call lab2614
2523 E1 pop hl
2524 D1 pop de
2525 D0 ret nc
2526 18 DC jr lab2504
2528 21 02 B8 ld hl,#b802 ; &BC9B=&2528 (&09BE) [137] CAS_CATALOG (Generate a catalogue from the tape)
252B 7E ld a,(hl)
252C B7 or a
252D C0 ret nz
252E 36 05 ld (hl),#5
2530 ED 53 03 B8 ld (#b803),de
2534 CD 8E 23 call lab238E
2537 CD 44 25 lab2537 call lab2544
253A 38 FB jr c,lab2537
253C C3 01 24 jp lab2401
253F 3A 18 B8 lab253F ld a,(#b818)
2542 B7 or a
2543 C0 ret nz
2544 01 01 83 lab2544 ld bc,#8301
2547 CD 73 26 call lab2673
254A 30 5C jr nc,lab25A8
254C 21 8C B8 lab254C ld hl,#b88c
254F 11 40 00 ld de,lab0040
2552 3E 2C ld a,#2c
2554 CD 36 28 call lab2836
2557 30 4F jr nc,lab25A8
2559 CD C5 25 call lab25C5
255C 20 57 jr nz,lab25B5
255E 06 8B ld b,#8b
2560 38 02 jr c,lab2564
2562 06 89 ld b,#89
2564 CD 92 26 lab2564 call lab2692
2567 ED 5B 9F B8 ld de,(#b89f)
256B 2A 1C B8 ld hl,(#b81c)
256E 3A 02 B8 ld a,(#b802)
2571 FE 03 cp #3
2573 28 0E jr z,lab2583
2575 21 FF F7 ld hl,#f7ff
2578 19 add hl,de
2579 3E 04 ld a,#4
257B 38 2B jr c,lab25A8
257D 2A 03 B8 ld hl,(#b803)
2580 22 05 B8 ld (#b805),hl
2583 3E 16 lab2583 ld a,#16
2585 CD 36 28 call lab2836
2588 30 1E jr nc,lab25A8
258A 21 17 B8 ld hl,#b817
258D 34 inc (hl)
258E 3A 9D B8 ld a,(#b89d)
2591 23 inc hl
2592 77 ld (hl),a
2593 AF xor a
2594 32 1E B8 ld (#b81e),a
2597 2A 9F B8 ld hl,(#b89f)
259A 22 1A B8 ld (#b81a),hl
259D CD BF 27 call lab27BF
25A0 3E 8C ld a,#8c
25A2 CC 0C 27 call z,lab270C
25A5 37 scf
25A6 18 65 jr lab260D
25A8 B7 lab25A8 or a
25A9 21 02 B8 ld hl,#b802
25AC 28 5D jr z,lab260B
25AE 06 85 ld b,#85
25B0 CD 13 27 call lab2713
25B3 18 97 jr lab254C
25B5 F5 lab25B5 push af
25B6 06 88 ld b,#88
25B8 CD 92 26 call lab2692
25BB F1 pop af
25BC 30 8E jr nc,lab254C
25BE 06 87 ld b,#87
25C0 CD 11 27 call lab2711
25C3 18 87 jr lab254C
25C5 CD BF 27 lab25C5 call lab27BF
25C8 37 scf
25C9 C8 ret z
25CA 3A 1E B8 ld a,(#b81e)
25CD B7 or a
25CE 28 1B jr z,lab25EB
25D0 3A A3 B8 ld a,(#b8a3)
25D3 2F cpl
25D4 B7 or a
25D5 C0 ret nz
25D6 3A 07 B8 ld a,(#b807)
25D9 B7 or a
25DA C4 F3 25 call nz,lab25F3
25DD C0 ret nz
25DE 21 8C B8 ld hl,#b88c
25E1 11 07 B8 ld de,#b807
25E4 01 40 00 ld bc,lab0040
25E7 ED B0 ldir
25E9 AF xor a
25EA C9 ret
25EB CD F3 25 lab25EB call lab25F3
25EE C0 ret nz
25EF EB ex de,hl
25F0 1A ld a,(de)
25F1 BE cp (hl)
25F2 C9 ret
25F3 21 07 B8 lab25F3 ld hl,#b807
25F6 11 8C B8 ld de,#b88c
25F9 06 10 ld b,#10
25FB 1A lab25FB ld a,(de)
25FC CD B6 27 call lab27B6
25FF 4F ld c,a
2600 7E ld a,(hl)
2601 CD B6 27 call lab27B6
2604 A9 xor c
2605 C0 ret nz
2606 23 inc hl
2607 13 inc de
2608 10 F1 djnz lab25FB
260A C9 ret
260B 36 04 lab260B ld (hl),#4
260D 9F lab260D sbc a,a
260E F5 push af
260F CD 4F 2A call lab2A4F
2612 F1 pop af
2613 C9 ret
2614 01 02 84 lab2614 ld bc,#8402
2617 CD 73 26 call lab2673
261A 30 4A jr nc,lab2666
261C 06 8A ld b,#8a
261E 11 4C B8 ld de,#b84c
2621 CD 95 26 call lab2695
2624 21 63 B8 ld hl,#b863
2627 CD 88 26 call lab2688
262A 30 3A jr nc,lab2666
262C 2A 48 B8 lab262C ld hl,(#b848)
262F 22 4A B8 ld (#b84a),hl
2632 22 61 B8 ld (#b861),hl
2635 E5 push hl
2636 21 4C B8 ld hl,#b84c
2639 11 40 00 ld de,lab0040
263C 3E 2C ld a,#2c
263E CD 3F 28 call lab283F
2641 E1 pop hl
2642 30 22 jr nc,lab2666
2644 ED 5B 5F B8 ld de,(#b85f)
2648 3E 16 ld a,#16
264A CD 3F 28 call lab283F
264D 21 5D B8 ld hl,#b85d
2650 DC 88 26 call c,lab2688
2653 30 11 jr nc,lab2666
2655 21 00 00 ld hl,lab0000
2658 22 5F B8 ld (#b85f),hl
265B 21 5C B8 ld hl,#b85c
265E 34 inc (hl)
265F AF xor a
2660 32 63 B8 ld (#b863),a
2663 37 scf
2664 18 A7 jr lab260D
2666 B7 lab2666 or a
2667 21 47 B8 ld hl,#b847
266A 28 9F jr z,lab260B
266C 06 86 ld b,#86
266E CD 13 27 call lab2713
2671 18 B9 jr lab262C
2673 21 CC B8 lab2673 ld hl,#b8cc
2676 79 ld a,c
2677 BE cp (hl)
2678 36 00 ld (hl),#0
267A 37 scf
267B E5 push hl
267C C5 push bc
267D C4 60 27 call nz,lab2760
2680 C1 pop bc
2681 E1 pop hl
2682 9F sbc a,a
2683 D0 ret nc
2684 71 ld (hl),c
2685 C3 4B 2A jp lab2A4B
2688 7E lab2688 ld a,(hl)
2689 B7 or a
268A 37 scf
268B C8 ret z
268C 01 2C 01 ld bc,lab012C
268F C3 72 2A jp lab2A72
2692 11 8C B8 lab2692 ld de,#b88c
2695 3A 00 B8 lab2695 ld a,(#b800)
2698 B7 or a
2699 C0 ret nz
269A 32 01 B8 ld (#b801),a
269D CD 83 27 call lab2783
26A0 CD 26 27 call lab2726
26A3 1A ld a,(de)
26A4 B7 or a
26A5 20 0A jr nz,lab26B1
26A7 3E 8E ld a,#8e
26A9 CD 27 27 call lab2727
26AC 01 10 00 ld bc,lab0010
26AF 18 2E jr lab26DF
26B1 CD BF 27 lab26B1 call lab27BF
26B4 01 00 10 ld bc,#1000
26B7 28 0D jr z,lab26C6
26B9 6B ld l,e
26BA 62 ld h,d
26BB 7E lab26BB ld a,(hl)
26BC B7 or a
26BD 28 04 jr z,lab26C3
26BF 0C inc c
26C0 23 inc hl
26C1 10 F8 djnz lab26BB
26C3 78 lab26C3 ld a,b
26C4 41 ld b,c
26C5 4F ld c,a
26C6 CD 8D 27 lab26C6 call lab278D
26C9 1A lab26C9 ld a,(de)
26CA CD B6 27 call lab27B6
26CD B7 or a
26CE 20 02 jr nz,lab26D2
26D0 3E 20 ld a,#20
26D2 C5 lab26D2 push bc
26D3 D5 push de
26D4 CD 34 13 call lab1334
26D7 D1 pop de
26D8 C1 pop bc
26D9 13 inc de
26DA 10 ED djnz lab26C9
26DC CD 5C 27 call lab275C
26DF EB lab26DF ex de,hl
26E0 09 add hl,bc
26E1 EB ex de,hl
26E2 3E 8D ld a,#8d
26E4 CD 27 27 call lab2727
26E7 06 02 ld b,#2
26E9 CD 8D 27 call lab278D
26EC 1A ld a,(de)
26ED CD A4 27 call lab27A4
26F0 CD 5C 27 call lab275C
26F3 13 inc de
26F4 CD BF 27 call lab27BF
26F7 20 0B jr nz,lab2704
26F9 13 inc de
26FA 1A ld a,(de)
26FB E6 0F and #f
26FD C6 24 add a,#24
26FF CD 80 27 call lab2780
2702 18 58 jr lab275C
2704 1A lab2704 ld a,(de)
2705 21 01 B8 ld hl,#b801
2708 B6 or (hl)
2709 C8 ret z
270A 18 6F jr lab277B
270C CD 27 27 lab270C call lab2727
270F 18 6A jr lab277B
2711 3E FF lab2711 ld a,#ff
2713 F5 lab2713 push af
2714 CD 1F 27 call lab271F
2717 F1 pop af
2718 C6 60 add a,#60
271A D4 80 27 call nc,lab2780
271D 18 5C jr lab277B
271F CD 80 11 lab271F call lab1180
2722 25 dec h
2723 C4 7B 27 call nz,lab277B
2726 78 lab2726 ld a,b
2727 E5 lab2727 push hl
2728 E6 7F and #7f
272A 47 ld b,a
272B 21 C5 27 ld hl,lab27C5
272E 28 07 jr z,lab2737
2730 7E lab2730 ld a,(hl)
2731 23 inc hl
2732 B7 or a
2733 20 FB jr nz,lab2730
2735 10 F9 djnz lab2730
2737 7E lab2737 ld a,(hl)
2738 B7 or a
2739 28 05 jr z,lab2740
273B CD 43 27 call lab2743
273E 18 F7 jr lab2737
2740 E1 lab2740 pop hl
2741 23 inc hl
2742 C9 ret
2743 FA 27 27 lab2743 jp m,lab2727
2746 E5 push hl
2747 06 00 ld b,#0
2749 04 lab2749 inc b
274A 7E ld a,(hl)
274B 23 inc hl
274C 07 rlca
274D 30 FA jr nc,lab2749
274F CD 8D 27 call lab278D
2752 E1 pop hl
2753 7E lab2753 ld a,(hl)
2754 23 inc hl
2755 E6 7F and #7f
2757 CD 80 27 call lab2780
275A 10 F7 djnz lab2753
275C 3E 20 lab275C ld a,#20
275E 18 20 jr lab2780
2760 3A 00 B8 lab2760 ld a,(#b800)
2763 B7 or a
2764 37 scf
2765 C0 ret nz
2766 CD 1F 27 call lab271F
2769 CD 42 1A lab2769 call lab1A42
276C 38 FB jr c,lab2769
276E CD 79 12 call lab1279
2771 CD 56 1B call lab1B56
2774 CD 81 12 call lab1281
2777 FE 1B cp #1b
2779 C8 ret z
277A 37 scf
277B CD 83 27 lab277B call lab2783
277E 3E 0A ld a,#a
2780 C3 00 14 lab2780 jp lab1400
2783 F5 lab2783 push af
2784 E5 push hl
2785 3E 01 ld a,#1
2787 CD 5E 11 call lab115E
278A E1 pop hl
278B F1 pop af
278C C9 ret
278D D5 lab278D push de
278E CD 56 12 call lab1256
2791 5C ld e,h
2792 CD 80 11 call lab1180
2795 7C ld a,h
2796 3D dec a
2797 83 add a,e
2798 80 add a,b
2799 3D dec a
279A BA cp d
279B D1 pop de
279C D8 ret c
279D 3E FF ld a,#ff
279F 32 01 B8 ld (#b801),a
27A2 18 D7 jr lab277B
27A4 06 FF lab27A4 ld b,#ff
27A6 04 lab27A6 inc b
27A7 D6 0A sub #a
27A9 30 FB jr nc,lab27A6
27AB C6 3A add a,#3a
27AD F5 push af
27AE 78 ld a,b
27AF B7 or a
27B0 C4 A4 27 call nz,lab27A4
27B3 F1 pop af
27B4 18 CA jr lab2780
27B6 FE 61 lab27B6 cp #61
27B8 D8 ret c
27B9 FE 7B cp #7b
27BB D0 ret nc
27BC C6 E0 add a,#e0
27BE C9 ret
27BF 3A 02 B8 lab27BF ld a,(#b802)
27C2 FE 05 cp #5
27C4 C9 ret
27C5 lab27C5 db #50,#72,#65,#73,#f3,#00,#50,#4c ; Pres..PL
27CD db #41,#d9,#74,#68,#65,#ee,#61,#6e ; A.the.an
27D5 db #f9,#6b,#65,#79,#ba,#00,#65,#72 ; .key..er
27DD db #72,#6f,#f2,#00,#80,#81,#00,#80 ; ro......
27E5 db #52,#45,#c3,#61,#6e,#e4,#81,#00 ; RE.an...
27ED db #52,#65,#61,#e4,#82,#00,#57,#72 ; Rea...Wr
27F5 db #69,#74,#e5,#82,#00,#52,#65,#77 ; it...Rew
27FD db #69,#6e,#e4,#74,#61,#70,#e5,#00 ; in.tap..
2805 db #46,#6f,#75,#6e,#64,#20,#a0,#00 ; Found ..
280D db #4c,#6f,#61,#64,#69,#6e,#e7,#00 ; Loadin..
2815 db #53,#61,#76,#69,#6e,#e7,#00,#00 ; Savin...
281D db #4f,#eb,#00,#62,#6c,#6f,#63,#eb ; O..bloc.
2825 db #00,#55,#6e,#6e,#61,#6d,#65,#e4 ; .Unname.
282D db #66,#69,#6c,#65,#20,#20,#20,#a0 ; file .
2835 db #00
2836 CD 73 28 lab2836 call lab2873 ; &BCA1=&2836 (&09C2) [139] CAS_READ (Read a record from tape)
2839 F5 push af
283A 21 B8 28 ld hl,lab28B8
283D 18 19 jr lab2858
283F CD 73 28 lab283F call lab2873 ; &BC9E=&283F (&09C0) [138] CAS_WRITE (Write a record to tape)
2842 F5 push af
2843 CD 64 29 call lab2964
2846 21 F7 28 ld hl,lab28F7
2849 DC 9D 28 call c,lab289D
284C DC 79 29 call c,lab2979
284F 18 0F jr lab2860
2851 CD 73 28 call lab2873 ; &BCA4=&2851 (&09C4) [140] CAS_CHECK (Compare a record on tape with the contents of store)
2854 F5 push af
2855 21 C7 28 ld hl,lab28C7
2858 E5 lab2858 push hl
2859 CD 19 29 call lab2919
285C E1 pop hl
285D DC 9D 28 call c,lab289D
2860 D1 lab2860 pop de
2861 F5 push af
2862 01 82 F7 ld bc,#f782
2865 ED 49 out (c),c
2867 01 10 F6 ld bc,#f610
286A ED 49 out (c),c
286C FB ei
286D 7A ld a,d
286E CD 51 2A call lab2A51
2871 F1 pop af
2872 C9 ret
2873 32 CD B8 lab2873 ld (#b8cd),a
2876 1B dec de
2877 1C inc e
2878 E5 push hl
2879 D5 push de
287A CD 68 1E call lab1E68
287D D1 pop de
287E DD E1 pop ix
2880 CD 4B 2A call lab2A4B
2883 F3 di
2884 01 0E F4 ld bc,#f40e
2887 ED 49 out (c),c
2889 01 D0 F6 ld bc,#f6d0
288C ED 49 out (c),c
288E 0E 10 ld c,#10
2890 ED 49 out (c),c
2892 01 92 F7 ld bc,#f792
2895 ED 49 out (c),c
2897 01 58 F6 ld bc,#f658
289A ED 49 out (c),c
289C C9 ret
289D 7A lab289D ld a,d
289E B7 or a
289F 28 0D jr z,lab28AE
28A1 E5 lab28A1 push hl
28A2 D5 push de
28A3 1E 00 ld e,#0
28A5 CD AE 28 call lab28AE
28A8 D1 pop de
28A9 E1 pop hl
28AA D0 ret nc
28AB 15 dec d
28AC 20 F3 jr nz,lab28A1
28AE 01 FF FF lab28AE ld bc,#ffff
28B1 ED 43 D3 B8 ld (#b8d3),bc
28B5 16 01 ld d,#1
28B7 E9 jp (hl)
28B8 CD B0 29 lab28B8 call lab29B0
28BB D0 ret nc
28BC DD 77 00 ld (ix+0),a
28BF DD 23 inc ix
28C1 15 dec d
28C2 1D dec e
28C3 20 F3 jr nz,lab28B8
28C5 18 12 jr lab28D9
28C7 CD B0 29 lab28C7 call lab29B0
28CA D0 ret nc
28CB 47 ld b,a
28CC CD DC BA call #badc
28CF A8 xor b
28D0 3E 03 ld a,#3
28D2 C0 ret nz
28D3 DD 23 inc ix
28D5 15 dec d
28D6 1D dec e
28D7 20 EE jr nz,lab28C7
28D9 15 lab28D9 dec d
28DA 28 06 jr z,lab28E2
28DC CD B0 29 call lab29B0
28DF D0 ret nc
28E0 18 F7 jr lab28D9
28E2 CD A6 29 lab28E2 call lab29A6
28E5 CD B0 29 call lab29B0
28E8 D0 ret nc
28E9 AA xor d
28EA 20 07 jr nz,lab28F3
28EC CD B0 29 call lab29B0
28EF D0 ret nc
28F0 AB xor e
28F1 37 scf
28F2 C8 ret z
28F3 3E 02 lab28F3 ld a,#2
28F5 B7 or a
28F6 C9 ret
28F7 CD DC BA lab28F7 call #badc
28FA CD F8 29 call lab29F8
28FD D0 ret nc
28FE DD 23 inc ix
2900 15 dec d
2901 1D dec e
2902 20 F3 jr nz,lab28F7
2904 15 lab2904 dec d
2905 28 07 jr z,lab290E
2907 AF xor a
2908 CD F8 29 call lab29F8
290B D0 ret nc
290C 18 F6 jr lab2904
290E CD A6 29 lab290E call lab29A6
2911 CD F8 29 call lab29F8
2914 D0 ret nc
2915 7B ld a,e
2916 C3 F8 29 jp lab29F8
2919 D5 lab2919 push de
291A CD 23 29 call lab2923
291D D1 pop de
291E D8 ret c
291F B7 or a
2920 C8 ret z
2921 18 F6 jr lab2919
2923 2E 55 lab2923 ld l,#55
2925 CD CD 29 call lab29CD
2928 D0 ret nc
2929 11 00 00 ld de,lab0000
292C 62 ld h,d
292D CD CD 29 lab292D call lab29CD
2930 D0 ret nc
2931 EB ex de,hl
2932 06 00 ld b,#0
2934 09 add hl,bc
2935 EB ex de,hl
2936 25 dec h
2937 20 F4 jr nz,lab292D
2939 61 lab2939 ld h,c
293A 79 ld a,c
293B 92 sub d
293C 4F ld c,a
293D 9F sbc a,a
293E 47 ld b,a
293F EB ex de,hl
2940 09 add hl,bc
2941 EB ex de,hl
2942 CD CD 29 call lab29CD
2945 D0 ret nc
2946 7A ld a,d
2947 CB 3F srl a
2949 CB 3F srl a
294B 8A adc a,d
294C 94 sub h
294D 38 EA jr c,lab2939
294F 91 sub c
2950 38 E7 jr c,lab2939
2952 7A ld a,d
2953 1F rra
2954 8A adc a,d
2955 67 ld h,a
2956 22 CE B8 ld (#b8ce),hl
2959 CD B0 29 call lab29B0
295C D0 ret nc
295D 21 CD B8 ld hl,#b8cd
2960 AE xor (hl)
2961 C0 ret nz
2962 37 scf
2963 C9 ret
2964 CD 89 2A lab2964 call lab2A89
2967 21 01 08 ld hl,#0801
296A CD 7C 29 call lab297C
296D D0 ret nc
296E B7 or a
296F CD 08 2A call lab2A08
2972 D0 ret nc
2973 3A CD B8 ld a,(#b8cd)
2976 C3 F8 29 jp lab29F8
2979 21 21 00 lab2979 ld hl,#0021
297C 06 F4 lab297C ld b,#f4
297E ED 78 in a,(c)
2980 E6 04 and #4
2982 C8 ret z
2983 E5 push hl
2984 37 scf
2985 CD 08 2A call lab2A08
2988 E1 pop hl
2989 2B dec hl
298A 7C ld a,h
298B B5 or l
298C 20 EE jr nz,lab297C
298E 37 scf
298F C9 ret
2990 2A D3 B8 lab2990 ld hl,(#b8d3)
2993 AC xor h
2994 F2 A0 29 jp p,lab29A0
2997 7C ld a,h
2998 EE 08 xor #8
299A 67 ld h,a
299B 7D ld a,l
299C EE 10 xor #10
299E 6F ld l,a
299F 37 scf
29A0 ED 6A lab29A0 adc hl,hl
29A2 22 D3 B8 ld (#b8d3),hl
29A5 C9 ret
29A6 2A D3 B8 lab29A6 ld hl,(#b8d3)
29A9 7D ld a,l
29AA 2F cpl
29AB 5F ld e,a
29AC 7C ld a,h
29AD 2F cpl
29AE 57 ld d,a
29AF C9 ret
29B0 D5 lab29B0 push de
29B1 1E 08 ld e,#8
29B3 2A CE B8 lab29B3 ld hl,(#b8ce)
29B6 CD D4 29 call lab29D4
29B9 DC DD 29 call c,lab29DD
29BC 30 0D jr nc,lab29CB
29BE 7C ld a,h
29BF 91 sub c
29C0 9F sbc a,a
29C1 CB 12 rl d
29C3 CD 90 29 call lab2990
29C6 1D dec e
29C7 20 EA jr nz,lab29B3
29C9 7A ld a,d
29CA 37 scf
29CB D1 lab29CB pop de
29CC C9 ret
29CD 06 F4 lab29CD ld b,#f4
29CF ED 78 in a,(c)
29D1 E6 04 and #4
29D3 C8 ret z
29D4 ED 5F lab29D4 ld a,r
29D6 C6 03 add a,#3
29D8 0F rrca
29D9 0F rrca
29DA E6 1F and #1f
29DC 4F ld c,a
29DD 06 F5 lab29DD ld b,#f5
29DF 79 lab29DF ld a,c
29E0 C6 02 add a,#2
29E2 4F ld c,a
29E3 38 0E jr c,lab29F3
29E5 ED 78 in a,(c)
29E7 AD xor l
29E8 E6 80 and #80
29EA 20 F3 jr nz,lab29DF
29EC AF xor a
29ED ED 4F ld r,a
29EF CB 0D rrc l
29F1 37 scf
29F2 C9 ret
29F3 AF lab29F3 xor a
29F4 ED 4F ld r,a
29F6 3C inc a
29F7 C9 ret
29F8 D5 lab29F8 push de
29F9 1E 08 ld e,#8
29FB 57 ld d,a
29FC CB 02 lab29FC rlc d
29FE CD 08 2A call lab2A08
2A01 30 03 jr nc,lab2A06
2A03 1D dec e
2A04 20 F6 jr nz,lab29FC
2A06 D1 lab2A06 pop de
2A07 C9 ret
2A08 ED 4B D0 B8 lab2A08 ld bc,(#b8d0)
2A0C 2A D2 B8 ld hl,(#b8d2)
2A0F 9F sbc a,a
2A10 67 ld h,a
2A11 28 07 jr z,lab2A1A
2A13 7D ld a,l
2A14 87 add a,a
2A15 80 add a,b
2A16 6F ld l,a
2A17 79 ld a,c
2A18 90 sub b
2A19 4F ld c,a
2A1A 7D lab2A1A ld a,l
2A1B 32 D0 B8 ld (#b8d0),a
2A1E 2E 0A ld l,#a
2A20 CD 37 2A call lab2A37
2A23 38 06 jr c,lab2A2B
2A25 91 sub c
2A26 30 0C jr nc,lab2A34
2A28 2F cpl
2A29 3C inc a
2A2A 4F ld c,a
2A2B 7C lab2A2B ld a,h
2A2C CD 90 29 call lab2990
2A2F 2E 0B ld l,#b
2A31 CD 37 2A call lab2A37
2A34 3E 01 lab2A34 ld a,#1
2A36 C9 ret
2A37 ED 5F lab2A37 ld a,r
2A39 CB 3F srl a
2A3B 91 sub c
2A3C 30 03 jr nc,lab2A41
2A3E 3C lab2A3E inc a
2A3F 20 FD jr nz,lab2A3E
2A41 06 F7 lab2A41 ld b,#f7
2A43 ED 69 out (c),l
2A45 F5 push af
2A46 AF xor a
2A47 ED 4F ld r,a
2A49 F1 pop af
2A4A C9 ret
2A4B 3E 10 lab2A4B ld a,#10 ; &BC6E=&2A4B (&09A0) [122] CAS_START_MOTOR (Start the cassette motor)
2A4D 18 02 jr lab2A51
2A4F 3E EF lab2A4F ld a,#ef ; &BC71=&2A4F (&09A2) [123] CAS_STOP_MOTOR (Stop the cassette motor)
2A51 C5 lab2A51 push bc ; &BC74=&2A51 (&09A4) [124] CAS_RESTORE_MOTOR (Restore previous state of cassette motor)
2A52 06 F6 ld b,#f6
2A54 ED 48 in c,(c)
2A56 04 inc b
2A57 E6 10 and #10
2A59 3E 08 ld a,#8
2A5B 28 01 jr z,lab2A5E
2A5D 3C inc a
2A5E ED 79 lab2A5E out (c),a
2A60 37 scf
2A61 28 0C jr z,lab2A6F
2A63 79 ld a,c
2A64 E6 10 and #10
2A66 C5 push bc
2A67 01 C8 00 ld bc,#00c8
2A6A 37 scf
2A6B CC 72 2A call z,lab2A72
2A6E C1 pop bc
2A6F 79 lab2A6F ld a,c
2A70 C1 pop bc
2A71 C9 ret
2A72 C5 lab2A72 push bc
2A73 E5 push hl
2A74 CD 89 2A call lab2A89
2A77 3E 42 ld a,#42
2A79 CD BD 1C call lab1CBD
2A7C E1 pop hl
2A7D C1 pop bc
2A7E 20 07 jr nz,lab2A87
2A80 0B dec bc
2A81 78 ld a,b
2A82 B1 or c
2A83 20 ED jr nz,lab2A72
2A85 37 scf
2A86 C9 ret
2A87 AF lab2A87 xor a
2A88 C9 ret
2A89 01 82 06 lab2A89 ld bc,lab0682
2A8C 0B lab2A8C dec bc
2A8D 78 ld a,b
2A8E B1 or c
2A8F 20 FB jr nz,lab2A8C
2A91 C9 ret
2A92 C7 rst 0
2A93 C7 rst 0
2A94 C7 rst 0
2A95 C7 rst 0
2A96 C7 rst 0
2A97 C7 rst 0
2A98 C5 push bc ; &BD3A=&2A98 (&0A28) EDIT
2A99 D5 push de
2A9A E5 push hl
2A9B E5 push hl
2A9C 01 FF 00 ld bc,#00ff
2A9F 0C lab2A9F inc c
2AA0 7E ld a,(hl)
2AA1 23 inc hl
2AA2 B7 or a
2AA3 20 FA jr nz,lab2A9F
2AA5 32 DD B8 ld (#b8dd),a
2AA8 CD 6F 2C call lab2C6F
2AAB E1 pop hl
2AAC CD 67 2D call lab2D67
2AAF C5 lab2AAF push bc
2AB0 E5 push hl
2AB1 CD D9 2D call lab2DD9
2AB4 E1 pop hl
2AB5 C1 pop bc
2AB6 CD C6 2A call lab2AC6
2AB9 30 F4 jr nc,lab2AAF
2ABB F5 push af
2ABC CD D2 2C call lab2CD2
2ABF F1 pop af
2AC0 E1 pop hl
2AC1 D1 pop de
2AC2 C1 pop bc
2AC3 FE FC cp #fc
2AC5 C9 ret
2AC6 E5 lab2AC6 push hl
2AC7 21 E0 2A ld hl,lab2AE0
2ACA 5F ld e,a
2ACB 78 ld a,b
2ACC B1 or c
2ACD 7B ld a,e
2ACE 20 0B jr nz,lab2ADB
2AD0 FE F0 cp #f0
2AD2 38 07 jr c,lab2ADB
2AD4 FE F4 cp #f4
2AD6 30 03 jr nc,lab2ADB
2AD8 21 1C 2B ld hl,lab2B1C
2ADB CD F6 2D lab2ADB call lab2DF6
2ADE E3 ex (sp),hl
2ADF C9 ret
; Key codes to edit an existing line
2AE0 lab2AE0 db #13,#01,#2c
2AE3 db #fc,#42,#2b
2AE6 db #ef,#40,#2b
2AE9 db #0d,#69,#2b
2AEC db #f0,#b3,#2b
2AEF db #f1,#7e,#2b
2AF2 db #f2,#aa,#2b
2AF5 db #f3,#75,#2b
2AF8 db #f8,#c7,#2b
2AFB db #f9,#92,#2b
2AFE db #fa,#bd,#2b
2B01 db #fb,#89,#2b
2B04 db #f4,#a2,#2c
2B07 db #f5,#a7,#2c
2B0A db #f6,#9d,#2c
2B0D db #f7,#98,#2c
2B10 db #e0,#ea,#2c
2B13 db #7f,#3d,#2c
2B16 db #10,#4a,#2c
2B19 db #e1,#f9,#2b
2B1C 04 lab2B1C db #4 ;
2B1D db #2b,#2b
2B1F F0 db #f0 ;
2B20 db #2f,#2b
2B22 F1 db #f1 ;
2B23 db #33,#2b
2B25 F2 db #f2 ;
2B26 db #3b,#2b
2B28 F3 db #f3 ;
2B29 db #37,#2b
2B2B 3E 07 lab2B2B ld a,#7
2B2D 18 0E jr lab2B3D
2B2F 3E 0B ld a,#b
2B31 18 0A jr lab2B3D
2B33 3E 0A ld a,#a
2B35 18 06 jr lab2B3D
2B37 3E 09 ld a,#9
2B39 18 02 jr lab2B3D
2B3B 3E 08 ld a,#8
2B3D CD 00 14 lab2B3D call lab1400
2B40 B7 or a
2B41 C9 ret
2B42 F5 push af
2B43 CD 49 2B call lab2B49
2B46 F1 pop af
2B47 37 scf
2B48 C9 ret
2B49 CD 69 2B lab2B49 call lab2B69
2B4C 21 61 2B ld hl,lab2B61
2B4F CD 69 2B call lab2B69
2B52 CD 80 11 call lab1180
2B55 25 dec h
2B56 C8 ret z
2B57 3E 0D ld a,#d
2B59 CD 00 14 call lab1400
2B5C 3E 0A ld a,#a
2B5E C3 00 14 jp lab1400
2B61 lab2B61 db #2a,#42,#72,#65,#61,#6b,#2a,#00 ; *Break*.
2B69 F5 lab2B69 push af
2B6A 7E lab2B6A ld a,(hl)
2B6B 23 inc hl
2B6C B7 or a
2B6D C4 A8 2D call nz,lab2DA8
2B70 20 F8 jr nz,lab2B6A
2B72 F1 pop af
2B73 37 scf
2B74 C9 ret
2B75 16 01 ld d,#1
2B77 CD 93 2B call lab2B93
2B7A CA 2B 2B jp z,lab2B2B
2B7D C9 ret
2B7E CD EB 2B call lab2BEB
2B81 79 ld a,c
2B82 90 sub b
2B83 BA cp d
2B84 DA 2B 2B jp c,lab2B2B
2B87 18 0A jr lab2B93
2B89 CD EB 2B call lab2BEB
2B8C 7A ld a,d
2B8D 93 sub e
2B8E C8 ret z
2B8F 57 ld d,a
2B90 18 01 jr lab2B93
2B92 51 ld d,c
2B93 78 lab2B93 ld a,b
2B94 B9 cp c
2B95 C8 ret z
2B96 D5 push de
2B97 CD 50 2D call lab2D50
2B9A 7E ld a,(hl)
2B9B D4 A8 2D call nc,lab2DA8
2B9E 04 inc b
2B9F 23 inc hl
2BA0 D4 67 2D call nc,lab2D67
2BA3 D1 pop de
2BA4 15 dec d
2BA5 20 EC jr nz,lab2B93
2BA7 F6 FF or #ff
2BA9 C9 ret
2BAA 16 01 ld d,#1
2BAC CD C8 2B call lab2BC8
2BAF CA 2B 2B jp z,lab2B2B
2BB2 C9 ret
2BB3 CD EB 2B call lab2BEB
2BB6 78 ld a,b
2BB7 BA cp d
2BB8 DA 2B 2B jp c,lab2B2B
2BBB 18 0B jr lab2BC8
2BBD CD EB 2B call lab2BEB
2BC0 7B ld a,e
2BC1 D6 01 sub #1
2BC3 C8 ret z
2BC4 57 ld d,a
2BC5 18 01 jr lab2BC8
2BC7 51 ld d,c
2BC8 78 lab2BC8 ld a,b
2BC9 B7 or a
2BCA C8 ret z
2BCB CD 4A 2D call lab2D4A
2BCE 30 07 jr nc,lab2BD7
2BD0 05 dec b
2BD1 2B dec hl
2BD2 15 dec d
2BD3 20 F3 jr nz,lab2BC8
2BD5 18 11 jr lab2BE8
2BD7 78 lab2BD7 ld a,b
2BD8 B7 or a
2BD9 28 0A jr z,lab2BE5
2BDB 05 dec b
2BDC 2B dec hl
2BDD D5 push de
2BDE CD 29 2D call lab2D29
2BE1 D1 pop de
2BE2 15 dec d
2BE3 20 F2 jr nz,lab2BD7
2BE5 CD 67 2D lab2BE5 call lab2D67
2BE8 F6 FF lab2BE8 or #ff
2BEA C9 ret
2BEB E5 lab2BEB push hl
2BEC CD 56 12 call lab1256
2BEF 7A ld a,d
2BF0 94 sub h
2BF1 3C inc a
2BF2 57 ld d,a
2BF3 CD 80 11 call lab1180
2BF6 5C ld e,h
2BF7 E1 pop hl
2BF8 C9 ret
2BF9 3A DD B8 ld a,(#b8dd)
2BFC 2F cpl
2BFD 32 DD B8 ld (#b8dd),a
2C00 C9 ret
2C01 B7 lab2C01 or a
2C02 C8 ret z
2C03 5F ld e,a
2C04 3A DD B8 ld a,(#b8dd)
2C07 B7 or a
2C08 28 0D jr z,lab2C17
2C0A 78 ld a,b
2C0B B9 cp c
2C0C 28 09 jr z,lab2C17
2C0E 73 ld (hl),e
2C0F 7B ld a,e
2C10 CD A8 2D call lab2DA8
2C13 23 inc hl
2C14 04 inc b
2C15 B7 or a
2C16 C9 ret
2C17 79 lab2C17 ld a,c
2C18 FE FF cp #ff
2C1A CA 2B 2B jp z,lab2B2B
2C1D AF xor a
2C1E 32 DC B8 ld (#b8dc),a
2C21 7B ld a,e
2C22 CD A8 2D call lab2DA8
2C25 0C inc c
2C26 E5 push hl
2C27 7E lab2C27 ld a,(hl)
2C28 73 ld (hl),e
2C29 5F ld e,a
2C2A 23 inc hl
2C2B B7 or a
2C2C 20 F9 jr nz,lab2C27
2C2E 77 ld (hl),a
2C2F E1 pop hl
2C30 04 inc b
2C31 23 inc hl
2C32 CD 67 2D call lab2D67
2C35 3A DC B8 ld a,(#b8dc)
2C38 B7 or a
2C39 C4 29 2D call nz,lab2D29
2C3C C9 ret
2C3D 78 ld a,b
2C3E B7 or a
2C3F CA 2B 2B jp z,lab2B2B
2C42 CD 4A 2D call lab2D4A
2C45 D2 2B 2B jp nc,lab2B2B
2C48 05 dec b
2C49 2B dec hl
2C4A 78 ld a,b
2C4B B9 cp c
2C4C CA 2B 2B jp z,lab2B2B
2C4F E5 push hl
2C50 23 lab2C50 inc hl
2C51 7E ld a,(hl)
2C52 2B dec hl
2C53 77 ld (hl),a
2C54 23 inc hl
2C55 B7 or a
2C56 20 F8 jr nz,lab2C50
2C58 2B dec hl
2C59 36 20 ld (hl),#20
2C5B 32 DC B8 ld (#b8dc),a
2C5E E3 ex (sp),hl
2C5F CD 67 2D call lab2D67
2C62 E3 ex (sp),hl
2C63 36 00 ld (hl),#0
2C65 E1 pop hl
2C66 0D dec c
2C67 3A DC B8 ld a,(#b8dc)
2C6A B7 or a
2C6B C4 2D 2D call nz,lab2D2D
2C6E C9 ret
2C6F 21 00 00 lab2C6F ld hl,lab0000
2C72 22 DE B8 ld (#b8de),hl
2C75 C9 ret
2C76 ED 5B DE B8 lab2C76 ld de,(#b8de)
2C7A 7C ld a,h
2C7B AA xor d
2C7C C0 ret nz
2C7D 7D ld a,l
2C7E AB xor e
2C7F C0 ret nz
2C80 37 scf
2C81 C9 ret
2C82 4F lab2C82 ld c,a
2C83 2A DE B8 ld hl,(#b8de)
2C86 7C ld a,h
2C87 B5 or l
2C88 C8 ret z
2C89 7D ld a,l
2C8A 81 add a,c
2C8B 6F ld l,a
2C8C CD CE 11 lab2C8C call lab11CE
2C8F 38 03 jr c,lab2C94
2C91 21 00 00 ld hl,lab0000
2C94 22 DE B8 lab2C94 ld (#b8de),hl
2C97 C9 ret
2C98 11 00 01 ld de,#0100
2C9B 18 0D jr lab2CAA
2C9D 11 00 FF ld de,#ff00
2CA0 18 08 jr lab2CAA
2CA2 11 FF 00 ld de,#00ff
2CA5 18 03 jr lab2CAA
2CA7 11 01 00 ld de,#0001
2CAA C5 lab2CAA push bc
2CAB E5 push hl
2CAC 2A DE B8 ld hl,(#b8de)
2CAF 7C ld a,h
2CB0 B5 or l
2CB1 CC 80 11 call z,lab1180
2CB4 7C ld a,h
2CB5 82 add a,d
2CB6 67 ld h,a
2CB7 7D ld a,l
2CB8 83 add a,e
2CB9 6F ld l,a
2CBA CD CE 11 call lab11CE
2CBD 30 0B jr nc,lab2CCA
2CBF E5 push hl
2CC0 CD D2 2C call lab2CD2
2CC3 E1 pop hl
2CC4 22 DE B8 ld (#b8de),hl
2CC7 CD CD 2C call lab2CCD
2CCA E1 lab2CCA pop hl
2CCB C1 pop bc
2CCC C9 ret
2CCD 11 68 12 lab2CCD ld de,lab1268
2CD0 18 03 jr lab2CD5
2CD2 11 68 12 lab2CD2 ld de,lab1268
2CD5 2A DE B8 lab2CD5 ld hl,(#b8de)
2CD8 7C ld a,h
2CD9 B5 or l
2CDA C8 ret z
2CDB E5 push hl
2CDC CD 80 11 call lab1180
2CDF E3 ex (sp),hl
2CE0 CD 74 11 call lab1174
2CE3 CD 16 00 call lab0016
2CE6 E1 pop hl
2CE7 C3 74 11 jp lab1174
2CEA C5 push bc
2CEB E5 push hl
2CEC CD 80 11 call lab1180
2CEF EB ex de,hl
2CF0 2A DE B8 ld hl,(#b8de)
2CF3 7C ld a,h
2CF4 B5 or l
2CF5 20 0C jr nz,lab2D03
2CF7 78 ld a,b
2CF8 B1 or c
2CF9 20 26 jr nz,lab2D21
2CFB CD 80 11 call lab1180
2CFE 22 DE B8 ld (#b8de),hl
2D01 18 06 jr lab2D09
2D03 CD 74 11 lab2D03 call lab1174
2D06 CD 68 12 call lab1268
2D09 CD AB 13 lab2D09 call lab13AB
2D0C F5 push af
2D0D EB ex de,hl
2D0E CD 74 11 call lab1174
2D11 2A DE B8 ld hl,(#b8de)
2D14 24 inc h
2D15 CD CE 11 call lab11CE
2D18 30 03 jr nc,lab2D1D
2D1A 22 DE B8 ld (#b8de),hl
2D1D CD CD 2C lab2D1D call lab2CCD
2D20 F1 pop af
2D21 E1 lab2D21 pop hl
2D22 C1 pop bc
2D23 DA 01 2C jp c,lab2C01
2D26 C3 2B 2B jp lab2B2B
2D29 16 01 lab2D29 ld d,#1
2D2B 18 02 jr lab2D2F
2D2D 16 FF lab2D2D ld d,#ff
2D2F C5 lab2D2F push bc
2D30 E5 push hl
2D31 D5 push de
2D32 CD D2 2C call lab2CD2
2D35 D1 pop de
2D36 2A DE B8 ld hl,(#b8de)
2D39 7C ld a,h
2D3A B5 or l
2D3B 28 09 jr z,lab2D46
2D3D 7C ld a,h
2D3E 82 add a,d
2D3F 67 ld h,a
2D40 CD 8C 2C call lab2C8C
2D43 CD CD 2C call lab2CCD
2D46 E1 lab2D46 pop hl
2D47 C1 pop bc
2D48 B7 or a
2D49 C9 ret
2D4A D5 lab2D4A push de
2D4B 11 08 FF ld de,#ff08
2D4E 18 04 jr lab2D54
2D50 D5 lab2D50 push de
2D51 11 09 01 ld de,lab0109
2D54 C5 lab2D54 push bc
2D55 E5 push hl
2D56 CD 80 11 call lab1180
2D59 7A ld a,d
2D5A 84 add a,h
2D5B 67 ld h,a
2D5C CD CE 11 call lab11CE
2D5F 7B ld a,e
2D60 DC 00 14 call c,lab1400
2D63 E1 pop hl
2D64 C1 pop bc
2D65 D1 pop de
2D66 C9 ret
2D67 C5 lab2D67 push bc
2D68 E5 push hl
2D69 EB ex de,hl
2D6A CD 80 11 call lab1180
2D6D 4F ld c,a
2D6E EB ex de,hl
2D6F 7E lab2D6F ld a,(hl)
2D70 23 inc hl
2D71 B7 or a
2D72 C4 85 2D call nz,lab2D85
2D75 20 F8 jr nz,lab2D6F
2D77 CD 80 11 call lab1180
2D7A 91 sub c
2D7B EB ex de,hl
2D7C 85 add a,l
2D7D 6F ld l,a
2D7E CD 74 11 call lab1174
2D81 E1 pop hl
2D82 C1 pop bc
2D83 B7 or a
2D84 C9 ret
2D85 F5 lab2D85 push af
2D86 C5 push bc
2D87 D5 push de
2D88 E5 push hl
2D89 47 ld b,a
2D8A CD 80 11 call lab1180
2D8D 91 sub c
2D8E 83 add a,e
2D8F 5F ld e,a
2D90 48 ld c,b
2D91 CD CE 11 call lab11CE
2D94 38 05 jr c,lab2D9B
2D96 78 ld a,b
2D97 87 add a,a
2D98 3C inc a
2D99 83 add a,e
2D9A 5F ld e,a
2D9B EB lab2D9B ex de,hl
2D9C CD CE 11 call lab11CE
2D9F 79 ld a,c
2DA0 DC A8 2D call c,lab2DA8
2DA3 E1 pop hl
2DA4 D1 pop de
2DA5 C1 pop bc
2DA6 F1 pop af
2DA7 C9 ret
2DA8 F5 lab2DA8 push af
2DA9 C5 push bc
2DAA D5 push de
2DAB E5 push hl
2DAC 47 ld b,a
2DAD CD 80 11 call lab1180
2DB0 4F ld c,a
2DB1 C5 push bc
2DB2 CD CE 11 call lab11CE
2DB5 C1 pop bc
2DB6 DC 76 2C call c,lab2C76
2DB9 F5 push af
2DBA DC D2 2C call c,lab2CD2
2DBD 78 ld a,b
2DBE C5 push bc
2DBF CD 34 13 call lab1334
2DC2 C1 pop bc
2DC3 CD 80 11 call lab1180
2DC6 91 sub c
2DC7 C4 82 2C call nz,lab2C82
2DCA F1 pop af
2DCB 30 07 jr nc,lab2DD4
2DCD 9F sbc a,a
2DCE 32 DC B8 ld (#b8dc),a
2DD1 CD CD 2C call lab2CCD
2DD4 E1 lab2DD4 pop hl
2DD5 D1 pop de
2DD6 C1 pop bc
2DD7 F1 pop af
2DD8 C9 ret
2DD9 CD 80 11 lab2DD9 call lab1180
2DDC 4F ld c,a
2DDD CD CE 11 call lab11CE
2DE0 CD 76 2C call lab2C76
2DE3 DA 3C 1A jp c,lab1A3C
2DE6 CD 79 12 call lab1279
2DE9 CD 80 11 call lab1180
2DEC 91 sub c
2DED C4 82 2C call nz,lab2C82
2DF0 CD 3C 1A call lab1A3C
2DF3 C3 81 12 jp lab1281
2DF6 F5 lab2DF6 push af
2DF7 C5 push bc
2DF8 46 ld b,(hl)
2DF9 23 inc hl
2DFA E5 push hl
2DFB 23 lab2DFB inc hl
2DFC 23 inc hl
2DFD BE cp (hl)
2DFE 23 inc hl
2DFF 28 04 jr z,lab2E05
2E01 05 dec b
2E02 20 F7 jr nz,lab2DFB
2E04 E3 ex (sp),hl
2E05 F1 lab2E05 pop af
2E06 7E ld a,(hl)
2E07 23 inc hl
2E08 66 ld h,(hl)
2E09 6F ld l,a
2E0A C1 pop bc
2E0B F1 pop af
2E0C C9 ret
2E0D C7 rst 0
2E0E C7 rst 0
2E0F C7 rst 0
2E10 C7 rst 0
2E11 C7 rst 0
2E12 C7 rst 0
2E13 C7 rst 0
2E14 C7 rst 0
2E15 C7 rst 0
2E16 C7 rst 0
2E17 C7 rst 0
2E18 E5 lab2E18 push hl ; &BD3D=&2E18 (&0A2A) FLO
2E19 D5 push de
2E1A C5 push bc
2E1B EB ex de,hl
2E1C 01 05 00 ld bc,lab0005
2E1F ED B0 ldir
2E21 EB ex de,hl
2E22 2B dec hl
2E23 7E ld a,(hl)
2E24 C1 pop bc
2E25 D1 pop de
2E26 E1 pop hl
2E27 37 scf
2E28 C9 ret
2E29 D5 lab2E29 push de ; &BD40=&2E29 (&0A2C) FLO
2E2A C5 push bc
2E2B F6 7F or #7f
2E2D 47 ld b,a
2E2E AF xor a
2E2F 12 ld (de),a
2E30 13 inc de
2E31 12 ld (de),a
2E32 13 inc de
2E33 0E 90 ld c,#90
2E35 7C ld a,h
2E36 B7 or a
2E37 20 08 jr nz,lab2E41
2E39 4F ld c,a
2E3A 65 ld h,l
2E3B 6F ld l,a
2E3C B4 or h
2E3D 28 0D jr z,lab2E4C
2E3F 0E 88 ld c,#88
2E41 FA 4B 2E lab2E41 jp m,lab2E4B
2E44 29 lab2E44 add hl,hl
2E45 0D dec c
2E46 B4 or h
2E47 F2 44 2E jp p,lab2E44
2E4A 7C ld a,h
2E4B A0 lab2E4B and b
2E4C EB lab2E4C ex de,hl
2E4D 73 ld (hl),e
2E4E 23 inc hl
2E4F 77 ld (hl),a
2E50 23 inc hl
2E51 71 ld (hl),c
2E52 C1 pop bc
2E53 E1 pop hl
2E54 C9 ret
2E55 C5 push bc ; &BD43=&2E55 (&0A2E) FLO
2E56 01 00 A0 ld bc,#a000
2E59 CD 60 2E call lab2E60
2E5C C1 pop bc
2E5D C9 ret
2E5E 06 A8 ld b,#a8 ; &BD94=&2E5E (&0A64) FLO
2E60 D5 lab2E60 push de
2E61 CD A1 36 call lab36A1
2E64 D1 pop de
2E65 C9 ret
2E66 E5 lab2E66 push hl ; &BD46=&2E66 (&0A30) FLO
2E67 DD E1 pop ix
2E69 AF xor a
2E6A DD 96 04 sub (ix+4)
2E6D 28 1B jr z,lab2E8A
2E6F C6 90 add a,#90
2E71 D0 ret nc
2E72 D5 push de
2E73 C5 push bc
2E74 C6 10 add a,#10
2E76 CD 3D 36 call lab363D
2E79 CB 21 sla c
2E7B ED 5A adc hl,de
2E7D 28 08 jr z,lab2E87
2E7F DD 7E 03 ld a,(ix+3)
2E82 B7 or a
2E83 3F lab2E83 ccf
2E84 C1 pop bc
2E85 D1 pop de
2E86 C9 ret
2E87 9F lab2E87 sbc a,a
2E88 18 F9 jr lab2E83
2E8A 6F lab2E8A ld l,a
2E8B 67 ld h,a
2E8C 37 scf
2E8D C9 ret
2E8E CD A1 2E lab2E8E call lab2EA1 ; &BD49=&2E8E (&0A32) FLO
2E91 D0 ret nc
2E92 F0 ret p
2E93 E5 lab2E93 push hl
2E94 79 ld a,c
2E95 34 lab2E95 inc (hl)
2E96 20 06 jr nz,lab2E9E
2E98 23 inc hl
2E99 3D dec a
2E9A 20 F9 jr nz,lab2E95
2E9C 34 inc (hl)
2E9D 0C inc c
2E9E E1 lab2E9E pop hl
2E9F 37 scf
2EA0 C9 ret
2EA1 E5 lab2EA1 push hl ; &BD4C=&2EA1 (&0A34) FLO
2EA2 D5 push de
2EA3 E5 push hl
2EA4 DD E1 pop ix
2EA6 CD 04 36 call lab3604
2EA9 D1 pop de
2EAA E1 pop hl
2EAB C9 ret
2EAC CD A1 2E call lab2EA1 ; &BD4F=&2EAC (&0A36) FLO
2EAF D0 ret nc
2EB0 C8 ret z
2EB1 CB 78 bit 7,b
2EB3 C8 ret z
2EB4 18 DD jr lab2E93
2EB6 CD E8 35 call lab35E8 ; &BD52=&2EB6 (&0A38) FLO
2EB9 47 ld b,a
2EBA 28 52 jr z,lab2F0E
2EBC FC FB 35 call m,lab35FB
2EBF E5 push hl
2EC0 DD 7E 04 ld a,(ix+4)
2EC3 D6 80 sub #80
2EC5 5F ld e,a
2EC6 9F sbc a,a
2EC7 57 ld d,a
2EC8 6B ld l,e
2EC9 62 ld h,d
2ECA 29 add hl,hl
2ECB 29 add hl,hl
2ECC 29 add hl,hl
2ECD 19 add hl,de
2ECE 29 add hl,hl
2ECF 19 add hl,de
2ED0 29 add hl,hl
2ED1 29 add hl,hl
2ED2 19 add hl,de
2ED3 7C ld a,h
2ED4 D6 09 sub #9
2ED6 5F ld e,a
2ED7 E1 pop hl
2ED8 C5 push bc
2ED9 D5 push de
2EDA C4 1F 2F call nz,lab2F1F
2EDD FD 21 13 2F lab2EDD ld iy,lab2F13
2EE1 CD A0 35 call lab35A0
2EE4 28 1B jr z,lab2F01
2EE6 30 08 jr nc,lab2EF0
2EE8 CD 12 34 call lab3412
2EEB D1 pop de
2EEC 1D dec e
2EED D5 push de
2EEE 18 ED jr lab2EDD
2EF0 FD 21 18 2F lab2EF0 ld iy,lab2F18
2EF4 CD A0 35 call lab35A0
2EF7 38 08 jr c,lab2F01
2EF9 CD 9B 34 call lab349B
2EFC D1 pop de
2EFD 1C inc e
2EFE D5 push de
2EFF 18 EF jr lab2EF0
2F01 CD 8E 2E lab2F01 call lab2E8E
2F04 79 ld a,c
2F05 D1 pop de
2F06 C1 pop bc
2F07 4F ld c,a
2F08 3D dec a
2F09 85 add a,l
2F0A 6F ld l,a
2F0B D0 ret nc
2F0C 24 inc h
2F0D C9 ret
2F0E 5F lab2F0E ld e,a
2F0F 77 ld (hl),a
2F10 0E 01 ld c,#1
2F12 C9 ret
2F13 lab2F13 db #f0,#1f,#bc,#3e,#96 ; Possible data - 10 bytes
2F18 lab2F18 db #fe,#27,#6b,#6e,#9e
2F1D 2F cpl ; &BD55=&2F1D (&0A3A) FLO
2F1E 3C inc a
2F1F B7 lab2F1F or a
2F20 37 scf
2F21 C8 ret z
2F22 4F ld c,a
2F23 F2 28 2F jp p,lab2F28
2F26 2F cpl
2F27 3C inc a
2F28 CD 3E 2F lab2F28 call lab2F3E
2F2B 28 09 jr z,lab2F36
2F2D C5 push bc
2F2E F5 push af
2F2F CD 36 2F call lab2F36
2F32 F1 pop af
2F33 C1 pop bc
2F34 18 F2 jr lab2F28
2F36 79 lab2F36 ld a,c
2F37 B7 or a
2F38 F2 9E 34 jp p,lab349E
2F3B C3 15 34 jp lab3415
2F3E 11 8F 2F lab2F3E ld de,lab2F8F
2F41 D6 0D sub #d
2F43 D0 ret nc
2F44 C6 0C add a,#c
2F46 5F ld e,a
2F47 87 add a,a
2F48 87 add a,a
2F49 83 add a,e
2F4A C6 53 add a,#53
2F4C 5F ld e,a
2F4D CE 2F adc a,#2f
2F4F 93 sub e
2F50 57 ld d,a
2F51 AF xor a
2F52 C9 ret
; Powers of 10 in internal floating point representation
2F53 lab2F53 db #00,#00,#00,#20,#84
2F58 db #00,#00,#00,#48,#87
2F5D db #00,#00,#00,#7a,#8a
2F62 db #00,#00,#40,#1c,#8e
2F67 db #00,#00,#50,#43,#91
2F6C db #00,#00,#24,#74,#94
2F71 db #00,#80,#96,#18,#98
2F76 db #00,#20,#bc,#3e,#9b
2F7B db #00,#28,#6b,#6e,#9e
2F80 db #00,#f9,#02,#15,#a2
2F85 db #40,#b7,#43,#3a,#a5
2F8A db #10,#a5,#d4,#68,#a8
2F8F lab2F8F db #2a,#e7,#84,#11,#ac
2F94 21 65 89 lab2F94 ld hl,#8965 ; &BD97=&2F94 (&0A66) FLO
2F97 22 E6 B8 ld (#b8e6),hl
2F9A 21 07 6C ld hl,#6c07
2F9D 22 E4 B8 ld (#b8e4),hl
2FA0 C9 ret
2FA1 EB ex de,hl ; &BD9A=&2FA1 (&0A68) FLO
2FA2 CD 94 2F call lab2F94
2FA5 EB ex de,hl
2FA6 CD E8 35 call lab35E8
2FA9 C8 ret z
2FAA 11 E4 B8 ld de,#b8e4
2FAD 06 04 ld b,#4
2FAF 1A lab2FAF ld a,(de)
2FB0 AE xor (hl)
2FB1 12 ld (de),a
2FB2 13 inc de
2FB3 23 inc hl
2FB4 10 F9 djnz lab2FAF
2FB6 C9 ret
2FB7 E5 push hl ; &BD9D=&2FB7 (&0A6A) FLO
2FB8 2A E6 B8 ld hl,(#b8e6)
2FBB 01 07 6C ld bc,#6c07
2FBE CD FA 2F call lab2FFA
2FC1 E5 push hl
2FC2 2A E4 B8 ld hl,(#b8e4)
2FC5 01 65 89 ld bc,#8965
2FC8 CD FA 2F call lab2FFA
2FCB D5 push de
2FCC E5 push hl
2FCD 2A E6 B8 ld hl,(#b8e6)
2FD0 CD FA 2F call lab2FFA
2FD3 E3 ex (sp),hl
2FD4 09 add hl,bc
2FD5 22 E4 B8 ld (#b8e4),hl
2FD8 E1 pop hl
2FD9 01 07 6C ld bc,#6c07
2FDC ED 4A adc hl,bc
2FDE C1 pop bc
2FDF 09 add hl,bc
2FE0 C1 pop bc
2FE1 09 add hl,bc
2FE2 22 E6 B8 ld (#b8e6),hl
2FE5 E1 pop hl
2FE6 E5 push hl ; &BDA0=&2FE6 (&0A6C) FLO
2FE7 DD E1 pop ix
2FE9 2A E4 B8 ld hl,(#b8e4)
2FEC ED 5B E6 B8 ld de,(#b8e6)
2FF0 01 00 00 ld bc,lab0000
2FF3 DD 36 04 80 ld (ix+4),#80
2FF7 C3 B1 36 jp lab36B1
2FFA EB lab2FFA ex de,hl
2FFB 21 00 00 ld hl,lab0000
2FFE 3E 11 ld a,#11
3000 3D lab3000 dec a
3001 C8 ret z
3002 29 add hl,hl
3003 CB 13 rl e
3005 CB 12 rl d
3007 30 F7 jr nc,lab3000
3009 09 add hl,bc
300A 30 F4 jr nc,lab3000
300C 13 inc de
300D 18 F1 jr lab3000
300F 11 8B 30 ld de,#308B ; &BD82=&300F (&0A58) FLO
3012 18 03 jr lab3017
3014 11 86 30 lab3014 ld de,lab3086 ; &BD7F=&3014 (&0A56) FLO
3017 CD E8 35 lab3017 call lab35E8
301A 3D dec a
301B FE 01 cp #1
301D D0 ret nc
301E D5 push de
301F CD 6C 35 call lab356C
3022 F5 push af
3023 DD 36 04 80 ld (ix+4),#80
3027 11 81 30 ld de,lab3081
302A CD 9A 35 call lab359A
302D 30 06 jr nc,lab3035
302F DD 34 04 inc (ix+4)
3032 F1 pop af
3033 3D dec a
3034 F5 push af
3035 CD 16 33 lab3035 call lab3316
3038 D5 push de
3039 11 32 33 ld de,lab3332
303C CD 3F 33 call lab333F
303F EB ex de,hl
3040 E1 pop hl
3041 D5 push de
3042 11 32 33 ld de,lab3332
3045 CD 37 33 call lab3337
3048 D1 pop de
3049 CD 9E 34 call lab349E
304C CD A9 32 call lab32A9
304F 04 db #4 ; Possible Data - 21 bytes
3050 db #4c,#4b,#57,#5e,#7f
3055 db #0d,#08,#9b,#13,#80
305A db #23,#93,#38,#76,#80
305F db #20,#3b,#aa,#38,#82
3064 D5 push de
3065 CD 15 34 call lab3415
3068 D1 pop de
3069 E3 ex (sp),hl
306A 7C ld a,h
306B B7 or a
306C F2 71 30 jp p,lab3071
306F 2F cpl
3070 3C inc a
3071 6F lab3071 ld l,a
3072 7C ld a,h
3073 26 00 ld h,#0
3075 CD 29 2E call lab2E29
3078 EB ex de,hl
3079 E1 pop hl
307A CD 3F 33 call lab333F
307D D1 pop de
307E C3 15 34 jp lab3415
3081 lab3081 db #34,#f3,#04,#35,#80 ; Possible Data - 15 bytes
3086 lab3086 db #f8,#17,#72,#31,#80
308B lab308B db #85,#9a,#20,#1a,#7f
3090 06 E1 lab3090 ld b,#e1 ; &BD85=&3090 (&0A5A) FLO
3092 CD 07 33 call lab3307
3095 D2 28 33 jp nc,lab3328
3098 11 00 31 ld de,lab3100
309B CD 9A 35 call lab359A
309E F2 EC 36 jp p,lab36EC
30A1 11 05 31 ld de,lab3105
30A4 CD 9A 35 call lab359A
30A7 FA E6 36 jp m,lab36E6
30AA 11 FB 30 ld de,lab30FB
30AD CD D4 32 call lab32D4
30B0 7B ld a,e
30B1 F2 B6 30 jp p,lab30B6
30B4 ED 44 neg
30B6 F5 lab30B6 push af
30B7 CD 1D 33 call lab331D
30BA CD 0F 33 call lab330F
30BD D5 push de
30BE CD AC 32 call lab32AC
30C1 03 db #3 ; Possible Data - 16 bytes
30C2 db #f4,#32,#eb,#0f,#73
30C7 db #08,#b8,#d5,#52,#7b
30CC lab30CC db #00,#00,#00,#00,#80
30D1 E3 ex (sp),hl
30D2 CD AC 32 call lab32AC
30D5 02 db #2 ; Possible Data - 11 bytes
30D6 db #09,#60,#de,#01,#78
30DB db #f8,#17,#72,#31,#7e
30E0 CD 15 34 call lab3415
30E3 D1 pop de
30E4 E5 push hl
30E5 EB ex de,hl
30E6 CD 37 33 call lab3337
30E9 EB ex de,hl
30EA E1 pop hl
30EB CD 9E 34 call lab349E
30EE 11 CC 30 lab30EE ld de,lab30CC
30F1 CD 3F 33 call lab333F
30F4 DD 34 04 inc (ix+4)
30F7 F1 pop af
30F8 C3 7B 35 jp lab357B
30FB lab30FB db #29,#3b,#aa,#38,#81 ; Possible Data - 15 bytes
3100 lab3100 db #c7,#33,#0f,#30,#87
3105 lab3105 db #f8,#17,#72,#b1,#87
310A 11 CC 30 ld de,lab30CC ; &BD79=&310A (&0A52) FLO
310D EB ex de,hl ; &BD7C=&310D (&0A54) FLO
310E CD E8 35 call lab35E8
3111 EB ex de,hl
3112 CA 28 33 jp z,lab3328
3115 F5 push af
3116 CD E8 35 call lab35E8
3119 28 25 jr z,lab3140
311B 47 ld b,a
311C FC FB 35 call m,lab35FB
311F E5 push hl
3120 CD 82 31 call lab3182
3123 E1 pop hl
3124 38 25 jr c,lab314B
3126 E3 ex (sp),hl
3127 E1 pop hl
3128 FA 48 31 jp m,lab3148
312B C5 push bc
312C D5 push de
312D CD 14 30 call lab3014
3130 D1 pop de
3131 DC 15 34 call c,lab3415
3134 DC 90 30 call c,lab3090
3137 C1 lab3137 pop bc
3138 D0 ret nc
3139 78 ld a,b
313A B7 or a
313B FC FB 35 call m,lab35FB
313E 37 scf
313F C9 ret
3140 F1 lab3140 pop af
3141 37 scf
3142 F0 ret p
3143 CD EC 36 call lab36EC
3146 AF xor a
3147 C9 ret
3148 AF lab3148 xor a
3149 3C inc a
314A C9 ret
314B 4F lab314B ld c,a
314C F1 pop af
314D C5 push bc
314E F5 push af
314F 79 ld a,c
3150 37 scf
3151 8F lab3151 adc a,a
3152 30 FD jr nc,lab3151
3154 47 ld b,a
3155 CD 0F 33 call lab330F
3158 EB ex de,hl
3159 78 ld a,b
315A 87 lab315A add a,a
315B 28 15 jr z,lab3172
315D F5 push af
315E CD 1D 33 call lab331D
3161 30 16 jr nc,lab3179
3163 F1 pop af
3164 30 F4 jr nc,lab315A
3166 F5 push af
3167 11 E8 B8 ld de,#b8e8
316A CD 15 34 call lab3415
316D 30 0A jr nc,lab3179
316F F1 pop af
3170 18 E8 jr lab315A
3172 F1 lab3172 pop af
3173 37 scf
3174 FC FD 32 call m,lab32FD
3177 18 BE jr lab3137
3179 F1 lab3179 pop af
317A F1 pop af
317B C1 pop bc
317C FA E6 36 jp m,lab36E6
317F C3 EE 36 jp lab36EE
3182 C5 lab3182 push bc
3183 CD 17 33 call lab3317
3186 CD A1 2E call lab2EA1
3189 79 ld a,c
318A C1 pop bc
318B 30 02 jr nc,lab318F
318D 28 03 jr z,lab3192
318F 78 lab318F ld a,b
3190 B7 or a
3191 C9 ret
3192 4F lab3192 ld c,a
3193 7E ld a,(hl)
3194 1F rra
3195 9F sbc a,a
3196 A0 and b
3197 47 ld b,a
3198 79 ld a,c
3199 FE 02 cp #2
319B 9F sbc a,a
319C D0 ret nc
319D 7E ld a,(hl)
319E FE 27 cp #27
31A0 D8 ret c
31A1 AF xor a
31A2 C9 ret
31A3 11 A9 31 ld de,lab31A9 ; &BD76=&31A3 (&0A50) FLO
31A6 C3 18 2E jp lab2E18
31A9 A2 lab31A9 and d
31AA DA 0F 49 jp c,#490f
31AD 82 add a,d
31AE 32 F7 B8 ld (#b8f7),a ; &BD73=&31AE (&0A4E) FLO
31B1 C9 ret
31B2 CD E8 35 lab31B2 call lab35E8 ; &BD8B=&31B2 (&0A5E) FLO
31B5 FC FB 35 call m,lab35FB
31B8 F6 01 or #1
31BA 18 01 jr lab31BD
31BC AF lab31BC xor a ; &BD88=&31BC (&0A5C) FLO
31BD F5 lab31BD push af
31BE 11 1D 32 ld de,lab321D
31C1 06 F0 ld b,#f0
31C3 3A F7 B8 ld a,(#b8f7)
31C6 B7 or a
31C7 28 05 jr z,lab31CE
31C9 11 22 32 ld de,#3222
31CC 06 F6 ld b,#f6
31CE CD 07 33 lab31CE call lab3307
31D1 30 3A jr nc,lab320D
31D3 F1 pop af
31D4 CD D5 32 call lab32D5
31D7 D0 ret nc
31D8 7B ld a,e
31D9 1F rra
31DA DC FB 35 call c,lab35FB
31DD 06 E8 ld b,#e8
31DF CD 07 33 call lab3307
31E2 D2 E6 36 jp nc,lab36E6
31E5 DD 34 04 inc (ix+4)
31E8 CD A9 32 call lab32A9
31EB 06 db #6 ; Possible Data - 31 bytes
31EC db #1b,#2d,#1a,#e6,#6e
31F1 db #f8,#fb,#07,#28,#74
31F6 db #01,#89,#68,#99,#79
31FB db #e1,#df,#35,#23,#7d
3200 db #28,#e7,#5d,#a5,#80
3205 lab3205 db #a2,#da,#0f,#49,#81
320A C3 15 34 jp lab3415
320D F1 lab320D pop af
320E C2 28 33 jp nz,lab3328
3211 3A F7 B8 ld a,(#b8f7)
3214 FE 01 cp #1
3216 D8 ret c
3217 11 27 32 ld de,lab3227
321A C3 15 34 jp lab3415
321D lab321D db #6e,#83,#f9,#22,#7f ; Possible Data - 20 bytes
3222 lab3222 db #b6,#60,#0b,#36,#79
3227 lab3227 db #13,#35,#fa,#0e,#7b
322C lab322C db #d3,#e0,#2e,#65,#86
3231 CD 0F 33 call lab330F ; &BD8E=&3231 (&0A60) FLO
3234 D5 push de
3235 CD B2 31 call lab31B2
3238 E3 ex (sp),hl
3239 DC BC 31 call c,lab31BC
323C D1 pop de
323D DA 9E 34 jp c,lab349E
3240 C9 ret
3241 CD E8 35 call lab35E8 ; &BD91=&3241 (&0A62) FLO
3244 F5 push af
3245 FC FB 35 call m,lab35FB
3248 06 F0 ld b,#f0
324A CD 07 33 call lab3307
324D 30 4A jr nc,lab3299
324F 3D dec a
3250 F5 push af
3251 F4 FD 32 call p,lab32FD
3254 CD A9 32 call lab32A9
3257 0B db #b ; Possible Data - 56 bytes
3258 db #ff,#c1,#03,#0f,#77
325D db #83,#fc,#e8,#eb,#79
3262 db #6f,#ca,#78,#36,#7b
3267 db #d5,#3e,#b0,#b5,#7c
326C db #b0,#c1,#8b,#09,#7d
3271 db #af,#e8,#32,#b4,#7d
3276 db #74,#6c,#65,#62,#7d
327B db #d1,#f5,#37,#92,#7e
3280 db #7a,#c3,#cb,#4c,#7e
3285 db #83,#a7,#aa,#aa,#7f
328A db #fe,#ff,#ff,#7f,#80
328F CD 15 34 call lab3415
3292 F1 pop af
3293 11 05 32 ld de,lab3205
3296 F4 3B 33 call p,lab333B
3299 3A F7 B8 lab3299 ld a,(#b8f7)
329C B7 or a
329D 11 2C 32 ld de,lab322C
32A0 C4 15 34 call nz,lab3415
32A3 F1 pop af
32A4 FC FB 35 call m,lab35FB
32A7 37 scf
32A8 C9 ret
32A9 CD 1D 33 lab32A9 call lab331D
32AC CD 16 33 lab32AC call lab3316
32AF EB ex de,hl
32B0 D1 pop de
32B1 1A ld a,(de)
32B2 13 inc de
32B3 47 ld b,a
32B4 CD 18 2E call lab2E18
32B7 13 lab32B7 inc de
32B8 13 inc de
32B9 13 inc de
32BA 13 inc de
32BB 13 inc de
32BC D5 push de
32BD 11 ED B8 ld de,#b8ed
32C0 05 dec b
32C1 C8 ret z
32C2 C5 push bc
32C3 11 F2 B8 ld de,#b8f2
32C6 CD 15 34 call lab3415
32C9 C1 pop bc
32CA D1 pop de
32CB D5 push de
32CC C5 push bc
32CD CD 3F 33 call lab333F
32D0 C1 pop bc
32D1 D1 pop de
32D2 18 E3 jr lab32B7
32D4 AF lab32D4 xor a
32D5 F5 lab32D5 push af
32D6 CD 15 34 call lab3415
32D9 F1 pop af
32DA 11 CC 30 ld de,lab30CC
32DD C4 3F 33 call nz,lab333F
32E0 E5 push hl
32E1 CD 66 2E call lab2E66
32E4 30 13 jr nc,lab32F9
32E6 D1 pop de
32E7 E5 push hl
32E8 F5 push af
32E9 D5 push de
32EA 11 ED B8 ld de,#b8ed
32ED CD 29 2E call lab2E29
32F0 EB ex de,hl
32F1 E1 pop hl
32F2 CD 37 33 call lab3337
32F5 F1 pop af
32F6 D1 pop de
32F7 37 scf
32F8 C9 ret
32F9 E1 lab32F9 pop hl
32FA AF xor a
32FB 3C inc a
32FC C9 ret
32FD CD 16 33 lab32FD call lab3316
3300 EB ex de,hl
3301 CD 28 33 call lab3328
3304 C3 9E 34 jp lab349E
3307 CD 6C 35 lab3307 call lab356C
330A F0 ret p
330B B8 cp b
330C C8 ret z
330D 3F ccf
330E C9 ret
330F EB lab330F ex de,hl
3310 21 E8 B8 ld hl,#b8e8
3313 C3 18 2E jp lab2E18
3316 EB lab3316 ex de,hl
3317 21 F2 B8 lab3317 ld hl,#b8f2
331A C3 18 2E jp lab2E18
331D EB lab331D ex de,hl
331E 21 ED B8 ld hl,#b8ed
3321 CD 18 2E call lab2E18
3324 EB ex de,hl
3325 C3 15 34 jp lab3415
3328 D5 lab3328 push de
3329 11 32 33 ld de,lab3332
332C CD 18 2E call lab2E18
332F D1 pop de
3330 37 scf
3331 C9 ret
3332 lab3332 db #00,#00,#00,#00,#81 ; Possible Data - 5 bytes
3337 3E 01 lab3337 ld a,#1 ; &BD5B=&3337 (&0A3E) FLO
3339 18 05 jr lab3340
333B 3E 80 lab333B ld a,#80 ; &BD5E=&333B (&0A40) FLO
333D 18 01 jr lab3340
333F AF lab333F xor a ; &BD58=&333F (&0A3C) FLO
3340 E5 lab3340 push hl
3341 DD E1 pop ix
3343 D5 push de
3344 FD E1 pop iy
3346 DD 46 03 ld b,(ix+3)
3349 FD 4E 03 ld c,(iy+3)
334C B7 or a
334D 28 0B jr z,lab335A
334F FA 58 33 jp m,lab3358
3352 3E 80 ld a,#80
3354 A9 xor c
3355 4F ld c,a
3356 18 02 jr lab335A
3358 A8 lab3358 xor b
3359 47 ld b,a
335A DD 7E 04 lab335A ld a,(ix+4)
335D FD BE 04 cp (iy+4)
3360 30 14 jr nc,lab3376
3362 50 ld d,b
3363 41 ld b,c
3364 4A ld c,d
3365 B7 or a
3366 57 ld d,a
3367 FD 7E 04 ld a,(iy+4)
336A DD 77 04 ld (ix+4),a
336D 28 54 jr z,lab33C3
336F 92 sub d
3370 FE 21 cp #21
3372 30 4F jr nc,lab33C3
3374 18 11 jr lab3387
3376 AF lab3376 xor a
3377 FD 96 04 sub (iy+4)
337A 28 59 jr z,lab33D5
337C DD 86 04 add a,(ix+4)
337F FE 21 cp #21
3381 30 52 jr nc,lab33D5
3383 E5 push hl
3384 FD E1 pop iy
3386 EB ex de,hl
3387 5F lab3387 ld e,a
3388 78 ld a,b
3389 A9 xor c
338A F5 push af
338B C5 push bc
338C 7B ld a,e
338D CD 43 36 call lab3643
3390 79 ld a,c
3391 C1 pop bc
3392 4F ld c,a
3393 F1 pop af
3394 FA DA 33 jp m,lab33DA
3397 FD 7E 00 ld a,(iy+0)
339A 85 add a,l
339B 6F ld l,a
339C FD 7E 01 ld a,(iy+1)
339F 8C adc a,h
33A0 67 ld h,a
33A1 FD 7E 02 ld a,(iy+2)
33A4 8B adc a,e
33A5 5F ld e,a
33A6 FD 7E 03 ld a,(iy+3)
33A9 CB FF set 7,a
33AB 8A adc a,d
33AC 57 ld d,a
33AD D2 BA 36 jp nc,lab36BA
33B0 CB 1A rr d
33B2 CB 1B rr e
33B4 CB 1C rr h
33B6 CB 1D rr l
33B8 CB 19 rr c
33BA DD 34 04 inc (ix+4)
33BD C2 BA 36 jp nz,lab36BA
33C0 C3 EE 36 jp lab36EE
33C3 FD 7E 02 lab33C3 ld a,(iy+2)
33C6 DD 77 02 ld (ix+2),a
33C9 FD 7E 01 ld a,(iy+1)
33CC DD 77 01 ld (ix+1),a
33CF FD 7E 00 ld a,(iy+0)
33D2 DD 77 00 ld (ix+0),a
33D5 DD 70 03 lab33D5 ld (ix+3),b
33D8 37 scf
33D9 C9 ret
33DA AF lab33DA xor a
33DB 91 sub c
33DC 4F ld c,a
33DD FD 7E 00 ld a,(iy+0)
33E0 9D sbc a,l
33E1 6F ld l,a
33E2 FD 7E 01 ld a,(iy+1)
33E5 9C sbc a,h
33E6 67 ld h,a
33E7 FD 7E 02 ld a,(iy+2)
33EA 9B sbc a,e
33EB 5F ld e,a
33EC FD 7E 03 ld a,(iy+3)
33EF CB FF set 7,a
33F1 9A sbc a,d
33F2 57 ld d,a
33F3 30 16 jr nc,lab340B
33F5 78 ld a,b
33F6 2F cpl
33F7 47 ld b,a
33F8 AF xor a
33F9 91 sub c
33FA 4F ld c,a
33FB 3E 00 ld a,#0
33FD 9D sbc a,l
33FE 6F ld l,a
33FF 3E 00 ld a,#0
3401 9C sbc a,h
3402 67 ld h,a
3403 3E 00 ld a,#0
3405 9B sbc a,e
3406 5F ld e,a
3407 3E 00 ld a,#0
3409 9A sbc a,d
340A 57 ld d,a
340B 87 lab340B add a,a
340C DA BA 36 jp c,lab36BA
340F C3 B1 36 jp lab36B1
3412 11 53 2F lab3412 ld de,lab2F53
3415 D5 lab3415 push de ; &BD61=&3415 (&0A42) FLO
3416 FD E1 pop iy
3418 E5 push hl
3419 DD E1 pop ix
341B FD 7E 04 ld a,(iy+4)
341E B7 or a
341F 28 2C jr z,lab344D
3421 3D dec a
3422 CD 48 35 call lab3548
3425 28 26 jr z,lab344D
3427 30 21 jr nc,lab344A
3429 F5 push af
342A C5 push bc
342B CD 50 34 call lab3450
342E 79 ld a,c
342F C1 pop bc
3430 4F ld c,a
3431 F1 pop af
3432 CB 7A bit 7,d
3434 20 0D jr nz,lab3443
3436 3D dec a
3437 28 14 jr z,lab344D
3439 CB 21 sla c
343B CB 15 rl l
343D CB 14 rl h
343F CB 13 rl e
3441 CB 12 rl d
3443 DD 77 04 lab3443 ld (ix+4),a
3446 B7 or a
3447 C2 BA 36 jp nz,lab36BA
344A C3 EE 36 lab344A jp lab36EE
344D C3 E6 36 lab344D jp lab36E6
3450 21 00 00 lab3450 ld hl,lab0000
3453 5D ld e,l
3454 54 ld d,h
3455 FD 7E 00 ld a,(iy+0)
3458 CD 93 34 call lab3493
345B FD 7E 01 ld a,(iy+1)
345E CD 93 34 call lab3493
3461 FD 7E 02 ld a,(iy+2)
3464 CD 93 34 call lab3493
3467 FD 7E 03 ld a,(iy+3)
346A F6 80 or #80
346C 06 08 lab346C ld b,#8
346E 1F rra
346F 4F ld c,a
3470 30 14 lab3470 jr nc,lab3486
3472 7D ld a,l
3473 DD 86 00 add a,(ix+0)
3476 6F ld l,a
3477 7C ld a,h
3478 DD 8E 01 adc a,(ix+1)
347B 67 ld h,a
347C 7B ld a,e
347D DD 8E 02 adc a,(ix+2)
3480 5F ld e,a
3481 7A ld a,d
3482 DD 8E 03 adc a,(ix+3)
3485 57 ld d,a
3486 CB 1A lab3486 rr d
3488 CB 1B rr e
348A CB 1C rr h
348C CB 1D rr l
348E CB 19 rr c
3490 10 DE djnz lab3470
3492 C9 ret
3493 B7 lab3493 or a
3494 20 D6 jr nz,lab346C
3496 6C ld l,h
3497 63 ld h,e
3498 5A ld e,d
3499 57 ld d,a
349A C9 ret
349B 11 53 2F lab349B ld de,lab2F53
349E D5 lab349E push de ; &BD64=&349E (&0A44) FLO
349F FD E1 pop iy
34A1 E5 push hl
34A2 DD E1 pop ix
34A4 AF xor a
34A5 FD 96 04 sub (iy+4)
34A8 28 58 jr z,lab3502
34AA CD 48 35 call lab3548
34AD CA E6 36 jp z,lab36E6
34B0 30 4D jr nc,lab34FF
34B2 C5 push bc
34B3 4F ld c,a
34B4 5E ld e,(hl)
34B5 23 inc hl
34B6 56 ld d,(hl)
34B7 23 inc hl
34B8 7E ld a,(hl)
34B9 23 inc hl
34BA 66 ld h,(hl)
34BB 6F ld l,a
34BC EB ex de,hl
34BD FD 46 03 ld b,(iy+3)
34C0 CB F8 set 7,b
34C2 CD 32 35 call lab3532
34C5 30 06 jr nc,lab34CD
34C7 79 ld a,c
34C8 B7 or a
34C9 20 08 jr nz,lab34D3
34CB 18 31 jr lab34FE
34CD 0D lab34CD dec c
34CE 29 add hl,hl
34CF CB 13 rl e
34D1 CB 12 rl d
34D3 DD 71 04 lab34D3 ld (ix+4),c
34D6 CD 07 35 call lab3507
34D9 DD 71 03 ld (ix+3),c
34DC CD 07 35 call lab3507
34DF DD 71 02 ld (ix+2),c
34E2 CD 07 35 call lab3507
34E5 DD 71 01 ld (ix+1),c
34E8 CD 07 35 call lab3507
34EB D4 32 35 call nc,lab3532
34EE 9F sbc a,a
34EF 69 ld l,c
34F0 DD 66 01 ld h,(ix+1)
34F3 DD 5E 02 ld e,(ix+2)
34F6 DD 56 03 ld d,(ix+3)
34F9 C1 pop bc
34FA 4F ld c,a
34FB C3 BA 36 jp lab36BA
34FE C1 lab34FE pop bc
34FF C3 EE 36 lab34FF jp lab36EE
3502 CD 94 35 lab3502 call lab3594
3505 AF xor a
3506 C9 ret
3507 0E 01 lab3507 ld c,#1
3509 38 08 lab3509 jr c,lab3513
350B 7A ld a,d
350C B8 cp b
350D 3F ccf
350E CC 36 35 call z,lab3536
3511 30 13 jr nc,lab3526
3513 7D lab3513 ld a,l
3514 FD 96 00 sub (iy+0)
3517 6F ld l,a
3518 7C ld a,h
3519 FD 9E 01 sbc a,(iy+1)
351C 67 ld h,a
351D 7B ld a,e
351E FD 9E 02 sbc a,(iy+2)
3521 5F ld e,a
3522 7A ld a,d
3523 98 sbc a,b
3524 57 ld d,a
3525 37 scf
3526 CB 11 lab3526 rl c
3528 9F sbc a,a
3529 29 add hl,hl
352A CB 13 rl e
352C CB 12 rl d
352E 3C inc a
352F 20 D8 jr nz,lab3509
3531 C9 ret
3532 7A lab3532 ld a,d
3533 B8 cp b
3534 3F ccf
3535 C0 ret nz
3536 7B lab3536 ld a,e
3537 FD BE 02 cp (iy+2)
353A 3F ccf
353B C0 ret nz
353C 7C ld a,h
353D FD BE 01 cp (iy+1)
3540 3F ccf
3541 C0 ret nz
3542 7D ld a,l
3543 FD BE 00 cp (iy+0)
3546 3F ccf
3547 C9 ret
3548 4F lab3548 ld c,a
3549 DD 7E 03 ld a,(ix+3)
354C FD AE 03 xor (iy+3)
354F 47 ld b,a
3550 DD 7E 04 ld a,(ix+4)
3553 B7 or a
3554 C8 ret z
3555 81 add a,c
3556 4F ld c,a
3557 1F rra
3558 A9 xor c
3559 79 ld a,c
355A F2 68 35 jp p,lab3568
355D DD CB 03 FE set 7,(ix+3)
3561 D6 7F sub #7f
3563 37 scf
3564 C0 ret nz
3565 FE 01 cp #1
3567 C9 ret
3568 B7 lab3568 or a
3569 F8 ret m
356A AF xor a
356B C9 ret
356C E5 lab356C push hl
356D DD E1 pop ix
356F DD 7E 04 ld a,(ix+4)
3572 B7 or a
3573 C8 ret z
3574 D6 80 sub #80
3576 37 scf
3577 C9 ret
3578 E5 push hl ; &BD67=&3578 (&0A46) FLO
3579 DD E1 pop ix
357B B7 lab357B or a
357C FA 89 35 jp m,lab3589
357F DD 86 04 add a,(ix+4)
3582 DD 77 04 ld (ix+4),a
3585 3F ccf
3586 D8 ret c
3587 18 0B jr lab3594
3589 DD 86 04 lab3589 add a,(ix+4)
358C 38 02 jr c,lab3590
358E AF xor a
358F 37 scf
3590 DD 77 04 lab3590 ld (ix+4),a
3593 C9 ret
3594 DD 46 03 lab3594 ld b,(ix+3)
3597 CD EE 36 call lab36EE
359A E5 lab359A push hl ; &BD6A=&359A (&0A48) FLO
359B DD E1 pop ix
359D D5 push de
359E FD E1 pop iy
35A0 DD 7E 04 lab35A0 ld a,(ix+4)
35A3 FD BE 04 cp (iy+4)
35A6 38 3A jr c,lab35E2
35A8 20 33 jr nz,lab35DD
35AA B7 or a
35AB C8 ret z
35AC DD 7E 03 ld a,(ix+3)
35AF FD AE 03 xor (iy+3)
35B2 FA DD 35 jp m,lab35DD
35B5 DD 7E 03 ld a,(ix+3)
35B8 FD 96 03 sub (iy+3)
35BB 20 17 jr nz,lab35D4
35BD DD 7E 02 ld a,(ix+2)
35C0 FD 96 02 sub (iy+2)
35C3 20 0F jr nz,lab35D4
35C5 DD 7E 01 ld a,(ix+1)
35C8 FD 96 01 sub (iy+1)
35CB 20 07 jr nz,lab35D4
35CD DD 7E 00 ld a,(ix+0)
35D0 FD 96 00 sub (iy+0)
35D3 C8 ret z
35D4 9F lab35D4 sbc a,a
35D5 FD AE 03 xor (iy+3)
35D8 87 lab35D8 add a,a
35D9 9F sbc a,a
35DA D8 ret c
35DB 3C inc a
35DC C9 ret
35DD DD 7E 03 lab35DD ld a,(ix+3)
35E0 18 F6 jr lab35D8
35E2 FD 7E 03 lab35E2 ld a,(iy+3)
35E5 2F cpl
35E6 18 F0 jr lab35D8
35E8 E5 lab35E8 push hl ; &BD70=&35E8 (&0A4C) FLO
35E9 DD E1 pop ix
35EB DD 7E 04 ld a,(ix+4)
35EE B7 or a
35EF C8 ret z
35F0 DD 7E 03 ld a,(ix+3)
35F3 87 add a,a
35F4 9F sbc a,a
35F5 D8 ret c
35F6 3C inc a
35F7 C9 ret
35F8 E5 push hl ; &BD6D=&35F8 (&0A4A) FLO
35F9 DD E1 pop ix
35FB DD 7E 03 lab35FB ld a,(ix+3)
35FE EE 80 xor #80
3600 DD 77 03 ld (ix+3),a
3603 C9 ret
3604 AF lab3604 xor a
3605 DD 96 04 sub (ix+4)
3608 20 0A jr nz,lab3614
360A 06 04 ld b,#4
360C 77 lab360C ld (hl),a
360D 23 inc hl
360E 10 FC djnz lab360C
3610 0E 01 ld c,#1
3612 37 scf
3613 C9 ret
3614 C6 A0 lab3614 add a,#a0
3616 D0 ret nc
3617 E5 push hl
3618 CD 3D 36 call lab363D
361B AF xor a
361C B8 cp b
361D 8F adc a,a
361E B1 or c
361F 4D ld c,l
3620 44 ld b,h
3621 E1 pop hl
3622 71 ld (hl),c
3623 23 inc hl
3624 70 ld (hl),b
3625 23 inc hl
3626 73 ld (hl),e
3627 23 inc hl
3628 5F ld e,a
3629 7E ld a,(hl)
362A 72 ld (hl),d
362B E6 80 and #80
362D 47 ld b,a
362E 0E 04 ld c,#4
3630 AF xor a
3631 B6 lab3631 or (hl)
3632 20 05 jr nz,lab3639
3634 2B dec hl
3635 0D dec c
3636 20 F9 jr nz,lab3631
3638 0C inc c
3639 7B lab3639 ld a,e
363A B7 or a
363B 37 scf
363C C9 ret
363D FE 21 lab363D cp #21
363F 38 02 jr c,lab3643
3641 3E 21 ld a,#21
3643 5E lab3643 ld e,(hl)
3644 23 inc hl
3645 56 ld d,(hl)
3646 23 inc hl
3647 4E ld c,(hl)
3648 23 inc hl
3649 66 ld h,(hl)
364A 69 ld l,c
364B EB ex de,hl
364C CB FA set 7,d
364E 01 00 00 ld bc,lab0000
3651 18 0B jr lab365E
3653 4F lab3653 ld c,a
3654 78 ld a,b
3655 B5 or l
3656 47 ld b,a
3657 79 ld a,c
3658 4D ld c,l
3659 6C ld l,h
365A 63 ld h,e
365B 5A ld e,d
365C 16 00 ld d,#0
365E D6 08 lab365E sub #8
3660 30 F1 jr nc,lab3653
3662 C6 08 add a,#8
3664 C8 ret z
3665 CB 3A lab3665 srl d
3667 CB 1B rr e
3669 CB 1C rr h
366B CB 1D rr l
366D CB 19 rr c
366F 3D dec a
3670 20 F3 jr nz,lab3665
3672 C9 ret
3673 14 lab3673 inc d
3674 15 dec d
3675 F8 ret m
3676 20 17 jr nz,lab368F
3678 57 ld d,a
3679 7B ld a,e
367A B4 or h
367B B5 or l
367C B1 or c
367D C8 ret z
367E 7A ld a,d
367F D6 08 lab367F sub #8
3681 38 1C jr c,lab369F
3683 C8 ret z
3684 53 ld d,e
3685 5C ld e,h
3686 65 ld h,l
3687 69 ld l,c
3688 0E 00 ld c,#0
368A 14 inc d
368B 15 dec d
368C 28 F1 jr z,lab367F
368E F8 ret m
368F 3D lab368F dec a
3690 C8 ret z
3691 CB 21 sla c
3693 CB 15 rl l
3695 CB 14 rl h
3697 CB 13 rl e
3699 CB 12 rl d
369B F2 8F 36 jp p,lab368F
369E C9 ret
369F AF lab369F xor a
36A0 C9 ret
36A1 E5 lab36A1 push hl
36A2 DD E1 pop ix
36A4 DD 70 04 ld (ix+4),b
36A7 47 ld b,a
36A8 5E ld e,(hl)
36A9 23 inc hl
36AA 56 ld d,(hl)
36AB 23 inc hl
36AC 7E ld a,(hl)
36AD 23 inc hl
36AE 66 ld h,(hl)
36AF 6F ld l,a
36B0 EB ex de,hl
36B1 DD 7E 04 lab36B1 ld a,(ix+4)
36B4 CD 73 36 call lab3673
36B7 DD 77 04 ld (ix+4),a
36BA CB 21 lab36BA sla c
36BC 30 13 jr nc,lab36D1
36BE 2C inc l
36BF 20 10 jr nz,lab36D1
36C1 24 inc h
36C2 20 0D jr nz,lab36D1
36C4 1C inc e
36C5 20 0A jr nz,lab36D1
36C7 14 inc d
36C8 20 07 jr nz,lab36D1
36CA DD 34 04 inc (ix+4)
36CD 28 1F jr z,lab36EE
36CF 16 80 ld d,#80
36D1 78 lab36D1 ld a,b
36D2 F6 7F or #7f
36D4 A2 and d
36D5 DD 77 03 ld (ix+3),a
36D8 DD 73 02 ld (ix+2),e
36DB DD 74 01 ld (ix+1),h
36DE DD 75 00 ld (ix+0),l
36E1 DD E5 lab36E1 push ix
36E3 E1 pop hl
36E4 37 scf
36E5 C9 ret
36E6 AF lab36E6 xor a
36E7 DD 77 04 ld (ix+4),a
36EA 18 F5 jr lab36E1
36EC 06 00 lab36EC ld b,#0
36EE 78 lab36EE ld a,b
36EF F6 7F or #7f
36F1 DD 77 03 ld (ix+3),a
36F4 F6 FF or #ff
36F6 DD 77 04 ld (ix+4),a
36F9 DD 77 00 ld (ix+0),a
36FC DD 77 01 ld (ix+1),a
36FF DD 77 02 ld (ix+2),a
3702 C9 ret
3703 C7 rst 0
3704 C7 rst 0
3705 C7 rst 0
3706 C7 rst 0
3707 C7 rst 0
3708 44 ld b,h ; &BDA3=&3708 (&0A6E) INT
3709 CD D1 37 call lab37D1
370C 18 02 jr lab3710
370E 06 00 ld b,#0 ; &BDA6=&370E (&0A70) INT
3710 1E 00 lab3710 ld e,#0
3712 0E 02 ld c,#2
3714 C9 ret
3715 7C lab3715 ld a,h ; &BDA9=&3715 (&0A72) INT
3716 B7 or a
3717 FA 20 37 jp m,lab3720
371A B0 or b
371B FA D4 37 jp m,lab37D4
371E 37 scf
371F C9 ret
3720 EE 80 lab3720 xor #80
3722 B5 or l
3723 C0 ret nz
3724 78 ld a,b
3725 37 scf
3726 8F adc a,a
3727 C9 ret
3728 B7 or a ; &BDAC=&3728 (&0A74) INT
3729 ED 5A adc hl,de
372B 37 scf
372C E0 ret po
372D F6 FF or #ff
372F C9 ret
3730 EB ex de,hl ; &BDB2=&3730 (&0A78) INT
3731 B7 or a ; &BDAF=&3731 (&0A76) INT
3732 ED 52 sbc hl,de
3734 37 scf
3735 E0 ret po
3736 F6 FF or #ff
3738 C9 ret
3739 CD 45 37 call lab3745 ; &BDB5=&3739 (&0A7A) INT
373C CD 50 37 call lab3750
373F D2 15 37 jp nc,lab3715
3742 F6 FF or #ff
3744 C9 ret
3745 7C lab3745 ld a,h
3746 AA xor d
3747 47 ld b,a
3748 EB ex de,hl
3749 CD D1 37 call lab37D1
374C EB ex de,hl
374D C3 D1 37 jp lab37D1
3750 7C lab3750 ld a,h ; &BDBE=&3750 (&0A80) INT Unsigned Multiplication
3751 B7 or a
3752 28 05 jr z,lab3759
3754 7A ld a,d
3755 B7 or a
3756 37 scf
3757 C0 ret nz
3758 EB ex de,hl
3759 B5 lab3759 or l
375A C8 ret z
375B 7A ld a,d
375C B3 or e
375D 7D ld a,l
375E 6B ld l,e
375F 62 ld h,d
3760 C8 ret z
3761 FE 03 cp #3
3763 38 10 jr c,lab3775
3765 37 scf
3766 8F lab3766 adc a,a
3767 30 FD jr nc,lab3766
3769 29 lab3769 add hl,hl
376A D8 ret c
376B 87 add a,a
376C 30 02 jr nc,lab3770
376E 19 add hl,de
376F D8 ret c
3770 FE 80 lab3770 cp #80
3772 20 F5 jr nz,lab3769
3774 C9 ret
3775 FE 01 lab3775 cp #1
3777 C8 ret z
3778 29 add hl,hl
3779 C9 ret
377A CD 89 37 call lab3789 ; &BDB8=&377A (&0A7C) INT
377D DA 15 37 lab377D jp c,lab3715
3780 C9 ret
3781 4C ld c,h ; &BDBB=&3781 (&0A7E) INT
3782 CD 89 37 call lab3789
3785 EB ex de,hl
3786 41 ld b,c
3787 18 F4 jr lab377D
3789 CD 45 37 lab3789 call lab3745
378C 7A lab378C ld a,d ; &BDC1=&378C (&0A82) INT Unsigned Division
378D B3 or e
378E C8 ret z
378F C5 push bc
3790 EB ex de,hl
3791 06 01 ld b,#1
3793 7C ld a,h
3794 B7 or a
3795 20 09 jr nz,lab37A0
3797 7A ld a,d
3798 BD cp l
3799 38 05 jr c,lab37A0
379B 65 ld h,l
379C 2E 00 ld l,#0
379E 06 09 ld b,#9
37A0 7B lab37A0 ld a,e
37A1 95 sub l
37A2 7A ld a,d
37A3 9C sbc a,h
37A4 38 05 jr c,lab37AB
37A6 04 inc b
37A7 29 add hl,hl
37A8 30 F6 jr nc,lab37A0
37AA 3F ccf
37AB 3F lab37AB ccf
37AC 78 ld a,b
37AD 44 ld b,h
37AE 4D ld c,l
37AF 21 00 00 ld hl,lab0000
37B2 3D dec a
37B3 20 03 jr nz,lab37B8
37B5 18 17 jr lab37CE
37B7 29 lab37B7 add hl,hl
37B8 F5 lab37B8 push af
37B9 78 ld a,b
37BA 1F rra
37BB 47 ld b,a
37BC 79 ld a,c
37BD 1F rra
37BE 4F ld c,a
37BF 7B ld a,e
37C0 91 sub c
37C1 7A ld a,d
37C2 98 sbc a,b
37C3 38 05 jr c,lab37CA
37C5 57 ld d,a
37C6 7B ld a,e
37C7 91 sub c
37C8 5F ld e,a
37C9 2C inc l
37CA F1 lab37CA pop af
37CB 3D dec a
37CC 20 E9 jr nz,lab37B7
37CE 37 lab37CE scf
37CF C1 pop bc
37D0 C9 ret
37D1 7C lab37D1 ld a,h
37D2 B7 or a
37D3 F0 ret p
37D4 AF lab37D4 xor a ; &BDC7=&37D4 (&0A86) INT
37D5 95 sub l
37D6 6F ld l,a
37D7 9C sbc a,h
37D8 95 sub l
37D9 BC cp h
37DA 67 ld h,a
37DB 37 scf
37DC C0 ret nz
37DD FE 01 cp #1
37DF C9 ret
37E0 7C ld a,h ; &BDCA=&37E0 (&0A88) INT
37E1 87 add a,a
37E2 9F sbc a,a
37E3 D8 ret c
37E4 B5 or l
37E5 C8 ret z
37E6 AF xor a
37E7 3C inc a
37E8 C9 ret
37E9 7C ld a,h ; &BDC4=&37E9 (&0A84) INT
37EA AA xor d
37EB 7C ld a,h
37EC F2 F4 37 jp p,lab37F4
37EF 87 add a,a
37F0 9F lab37F0 sbc a,a
37F1 D8 ret c
37F2 3C inc a
37F3 C9 ret
37F4 BA lab37F4 cp d
37F5 20 F9 jr nz,lab37F0
37F7 7D ld a,l
37F8 93 sub e
37F9 20 F5 jr nz,lab37F0
37FB C9 ret
37FC C7 rst 0
37FD C7 rst 0
37FE C7 rst 0
37FF 01 db #1
; Character matrices 0-255
3800 lab3800 db #ff,#c3,#c3,#c3,#c3,#c3,#c3,#ff ; Character 000/255 &00 NUL ([CTRL]@)
3808 db #ff,#c0,#c0,#c0,#c0,#c0,#c0,#c0 ; Character 001/255 &01 SOH ([CTRL]A)
3810 db #18,#18,#18,#18,#18,#18,#18,#ff ; Character 002/255 &02 STX ([CTRL]B)
3818 db #03,#03,#03,#03,#03,#03,#03,#ff ; Character 003/255 &03 ETX ([CTRL]C)
3820 db #0c,#18,#30,#7e,#0c,#18,#30,#00 ; Character 004/255 &04 EOT ([CTRL]D)
3828 db #ff,#c3,#e7,#db,#db,#e7,#c3,#ff ; Character 005/255 &05 ENQ ([CTRL]E)
3830 db #00,#01,#03,#06,#cc,#78,#30,#00 ; Character 006/255 &06 ACK ([CTRL]F)
3838 db #3c,#66,#c3,#c3,#ff,#24,#e7,#00 ; Character 007/255 &07 BEL ([CTRL]G)
3840 db #00,#00,#30,#60,#ff,#60,#30,#00 ; Character 008/255 &08 BS ([CTRL]H)
3848 db #00,#00,#0c,#06,#ff,#06,#0c,#00 ; Character 009/255 &09 HT ([CTRL]I)
3850 db #18,#18,#18,#18,#db,#7e,#3c,#18 ; Character 010/255 &0A LF ([CTRL]J)
3858 db #18,#3c,#7e,#db,#18,#18,#18,#18 ; Character 011/255 &0B VT ([CTRL]K)
3860 db #18,#5a,#3c,#99,#db,#7e,#3c,#18 ; Character 012/255 &0C FF ([CTRL]L)
3868 db #00,#03,#33,#63,#fe,#60,#30,#00 ; Character 013/255 &0D CR ([CTRL]M)
3870 db #3c,#66,#ff,#db,#db,#ff,#66,#3c ; Character 014/255 &0E SO ([CTRL]N)
3878 db #3c,#66,#c3,#db,#db,#c3,#66,#3c ; Character 015/255 &0F SI ([CTRL]O)
3880 db #ff,#c3,#c3,#ff,#c3,#c3,#c3,#ff ; Character 016/255 &10 DLE ([CTRL]P)
3888 db #3c,#7e,#db,#db,#df,#c3,#66,#3c ; Character 017/255 &11 DC1 ([CTRL]Q)
3890 db #3c,#66,#c3,#df,#db,#db,#7e,#3c ; Character 018/255 &12 DC2 ([CTRL]R)
3898 db #3c,#66,#c3,#fb,#db,#db,#7e,#3c ; Character 019/255 &13 DC3 ([CTRL]S)
38A0 db #3c,#7e,#db,#db,#fb,#c3,#66,#3c ; Character 020/255 &14 DC4 ([CTRL]T)
38A8 db #00,#01,#33,#1e,#ce,#7b,#31,#00 ; Character 021/255 &15 NAK ([CTRL]U)
38B0 db #7e,#66,#66,#66,#66,#66,#66,#e7 ; Character 022/255 &16 SYN ([CTRL]V)
38B8 db #03,#03,#03,#ff,#03,#03,#03,#00 ; Character 023/255 &17 ETB ([CTRL]W)
38C0 db #ff,#66,#3c,#18,#18,#3c,#66,#ff ; Character 024/255 &18 CAN ([CTRL]X)
38C8 db #18,#18,#3c,#3c,#3c,#3c,#18,#18 ; Character 025/255 &19 EM ([CTRL]Y)
38D0 db #3c,#66,#66,#30,#18,#00,#18,#00 ; Character 026/255 &1A SUB ([CTRL]Z)
38D8 db #3c,#66,#c3,#ff,#c3,#c3,#66,#3c ; Character 027/255 &1B ESC
38E0 db #ff,#db,#db,#db,#fb,#c3,#c3,#ff ; Character 028/255 &1C FS
38E8 db #ff,#c3,#c3,#fb,#db,#db,#db,#ff ; Character 029/255 &1D GS
38F0 db #ff,#c3,#c3,#df,#db,#db,#db,#ff ; Character 030/255 &1E RS
38F8 db #ff,#db,#db,#db,#df,#c3,#c3,#ff ; Character 031/255 &1F US
3900 db #00,#00,#00,#00,#00,#00,#00,#00 ; Character 032/255 &20 SP
3908 db #18,#18,#18,#18,#18,#00,#18,#00 ; Character 033/255 &21 ! (Exclamation Mark)
3910 db #6c,#6c,#6c,#00,#00,#00,#00,#00 ; Character 034/255 &22 " (Double Quotes)
3918 db #6c,#6c,#fe,#6c,#fe,#6c,#6c,#00 ; Character 035/255 &23 # (Hash)
3920 db #18,#3e,#58,#3c,#1a,#7c,#18,#00 ; Character 036/255 &24 $ (Dollar)
3928 db #00,#c6,#cc,#18,#30,#66,#c6,#00 ; Character 037/255 &25 % (Percentage Sign)
3930 db #38,#6c,#38,#76,#dc,#cc,#76,#00 ; Character 038/255 &26 & (Ampersand)
3938 db #18,#18,#30,#00,#00,#00,#00,#00 ; Character 039/255 &27 ' (Single Quote)
3940 db #0c,#18,#30,#30,#30,#18,#0c,#00 ; Character 040/255 &28 ( (Open Bracket)
3948 db #30,#18,#0c,#0c,#0c,#18,#30,#00 ; Character 041/255 &29 ) (Close Bracket)
3950 db #00,#66,#3c,#ff,#3c,#66,#00,#00 ; Character 042/255 &2A * (Asterisk)
3958 db #00,#18,#18,#7e,#18,#18,#00,#00 ; Character 043/255 &2B + (Plus)
3960 db #00,#00,#00,#00,#00,#18,#18,#30 ; Character 044/255 &2C , (Comma)
3968 db #00,#00,#00,#7e,#00,#00,#00,#00 ; Character 045/255 &2D - (Minus)
3970 db #00,#00,#00,#00,#00,#18,#18,#00 ; Character 046/255 &2E . (Full Stop)
3978 db #06,#0c,#18,#30,#60,#c0,#80,#00 ; Character 047/255 &2F / (Slash, Divide)
3980 db #7c,#c6,#ce,#d6,#e6,#c6,#7c,#00 ; Character 048/255 &30 0 (Zero)
3988 db #18,#38,#18,#18,#18,#18,#7e,#00 ; Character 049/255 &31 1 (One)
3990 db #3c,#66,#06,#3c,#60,#66,#7e,#00 ; Character 050/255 &32 2 (Two)
3998 db #3c,#66,#06,#1c,#06,#66,#3c,#00 ; Character 051/255 &33 3 (Three)
39A0 db #1c,#3c,#6c,#cc,#fe,#0c,#1e,#00 ; Character 052/255 &34 4 (Four)
39A8 db #7e,#62,#60,#7c,#06,#66,#3c,#00 ; Character 053/255 &35 5 (Five)
39B0 db #3c,#66,#60,#7c,#66,#66,#3c,#00 ; Character 054/255 &36 6 (Six)
39B8 db #7e,#66,#06,#0c,#18,#18,#18,#00 ; Character 055/255 &37 7 (Seven)
39C0 db #3c,#66,#66,#3c,#66,#66,#3c,#00 ; Character 056/255 &38 8 (Eight)
39C8 db #3c,#66,#66,#3e,#06,#66,#3c,#00 ; Character 057/255 &39 9 (Nine)
39D0 db #00,#00,#18,#18,#00,#18,#18,#00 ; Character 058/255 &3A : (Colon)
39D8 db #00,#00,#18,#18,#00,#18,#18,#30 ; Character 059/255 &3B ; (Semi-colon)
39E0 db #0c,#18,#30,#60,#30,#18,#0c,#00 ; Character 060/255 &3C < (Less than)
39E8 db #00,#00,#7e,#00,#00,#7e,#00,#00 ; Character 061/255 &3D = (Equals)
39F0 db #60,#30,#18,#0c,#18,#30,#60,#00 ; Character 062/255 &3E > (Greater than)
39F8 db #3c,#66,#66,#0c,#18,#00,#18,#00 ; Character 063/255 &3F ? (Question Mark)
3A00 db #7c,#c6,#de,#de,#de,#c0,#7c,#00 ; Character 064/255 &40 @ (At)
3A08 db #18,#3c,#66,#66,#7e,#66,#66,#00 ; Character 065/255 &41 A
3A10 db #fc,#66,#66,#7c,#66,#66,#fc,#00 ; Character 066/255 &42 B
3A18 db #3c,#66,#c0,#c0,#c0,#66,#3c,#00 ; Character 067/255 &43 C
3A20 db #f8,#6c,#66,#66,#66,#6c,#f8,#00 ; Character 068/255 &44 D
3A28 db #fe,#62,#68,#78,#68,#62,#fe,#00 ; Character 069/255 &45 E
3A30 db #fe,#62,#68,#78,#68,#60,#f0,#00 ; Character 070/255 &46 F
3A38 db #3c,#66,#c0,#c0,#ce,#66,#3e,#00 ; Character 071/255 &47 G
3A40 db #66,#66,#66,#7e,#66,#66,#66,#00 ; Character 072/255 &48 H
3A48 db #7e,#18,#18,#18,#18,#18,#7e,#00 ; Character 073/255 &49 I
3A50 db #1e,#0c,#0c,#0c,#cc,#cc,#78,#00 ; Character 074/255 &4A J
3A58 db #e6,#66,#6c,#78,#6c,#66,#e6,#00 ; Character 075/255 &4B K
3A60 db #f0,#60,#60,#60,#62,#66,#fe,#00 ; Character 076/255 &4C L
3A68 db #c6,#ee,#fe,#fe,#d6,#c6,#c6,#00 ; Character 077/255 &4D M
3A70 db #c6,#e6,#f6,#de,#ce,#c6,#c6,#00 ; Character 078/255 &4E N
3A78 db #38,#6c,#c6,#c6,#c6,#6c,#38,#00 ; Character 079/255 &4F O
3A80 db #fc,#66,#66,#7c,#60,#60,#f0,#00 ; Character 080/255 &50 P
3A88 db #38,#6c,#c6,#c6,#da,#cc,#76,#00 ; Character 081/255 &51 Q
3A90 db #fc,#66,#66,#7c,#6c,#66,#e6,#00 ; Character 082/255 &52 R
3A98 db #3c,#66,#60,#3c,#06,#66,#3c,#00 ; Character 083/255 &53 S
3AA0 db #7e,#5a,#18,#18,#18,#18,#3c,#00 ; Character 084/255 &54 T
3AA8 db #66,#66,#66,#66,#66,#66,#3c,#00 ; Character 085/255 &55 U
3AB0 db #66,#66,#66,#66,#66,#3c,#18,#00 ; Character 086/255 &56 V
3AB8 db #c6,#c6,#c6,#d6,#fe,#ee,#c6,#00 ; Character 087/255 &57 W
3AC0 db #c6,#6c,#38,#38,#6c,#c6,#c6,#00 ; Character 088/255 &58 X
3AC8 db #66,#66,#66,#3c,#18,#18,#3c,#00 ; Character 089/255 &59 Y
3AD0 db #fe,#c6,#8c,#18,#32,#66,#fe,#00 ; Character 090/255 &5A Z
3AD8 db #3c,#30,#30,#30,#30,#30,#3c,#00 ; Character 091/255 &5B [ (Open Square Bracket)
3AE0 db #c0,#60,#30,#18,#0c,#06,#02,#00 ; Character 092/255 &5C \ (Back Slash)
3AE8 db #3c,#0c,#0c,#0c,#0c,#0c,#3c,#00 ; Character 093/255 &5D ] (Close Square Bracket)
3AF0 db #18,#3c,#7e,#18,#18,#18,#18,#00 ; Character 094/255 &5E ^ (Up Arrow/Caret)
3AF8 db #00,#00,#00,#00,#00,#00,#00,#ff ; Character 095/255 &5F _ (Underscore)
3B00 db #30,#18,#0c,#00,#00,#00,#00,#00 ; Character 096/255 &60
3B08 db #00,#00,#78,#0c,#7c,#cc,#76,#00 ; Character 097/255 &61 a
3B10 db #e0,#60,#7c,#66,#66,#66,#dc,#00 ; Character 098/255 &62 b
3B18 db #00,#00,#3c,#66,#60,#66,#3c,#00 ; Character 099/255 &63 c
3B20 db #1c,#0c,#7c,#cc,#cc,#cc,#76,#00 ; Character 100/255 &64 d
3B28 db #00,#00,#3c,#66,#7e,#60,#3c,#00 ; Character 101/255 &65 e
3B30 db #1c,#36,#30,#78,#30,#30,#78,#00 ; Character 102/255 &66 f
3B38 db #00,#00,#3e,#66,#66,#3e,#06,#7c ; Character 103/255 &67 g
3B40 db #e0,#60,#6c,#76,#66,#66,#e6,#00 ; Character 104/255 &68 h
3B48 db #18,#00,#38,#18,#18,#18,#3c,#00 ; Character 105/255 &69 i
3B50 db #06,#00,#0e,#06,#06,#66,#66,#3c ; Character 106/255 &6A j
3B58 db #e0,#60,#66,#6c,#78,#6c,#e6,#00 ; Character 107/255 &6B k
3B60 db #38,#18,#18,#18,#18,#18,#3c,#00 ; Character 108/255 &6C l
3B68 db #00,#00,#6c,#fe,#d6,#d6,#c6,#00 ; Character 109/255 &6D m
3B70 db #00,#00,#dc,#66,#66,#66,#66,#00 ; Character 110/255 &6E n
3B78 db #00,#00,#3c,#66,#66,#66,#3c,#00 ; Character 111/255 &6F o
3B80 db #00,#00,#dc,#66,#66,#7c,#60,#f0 ; Character 112/255 &70 p
3B88 db #00,#00,#76,#cc,#cc,#7c,#0c,#1e ; Character 113/255 &71 q
3B90 db #00,#00,#dc,#76,#60,#60,#f0,#00 ; Character 114/255 &72 r
3B98 db #00,#00,#3c,#60,#3c,#06,#7c,#00 ; Character 115/255 &73 s
3BA0 db #30,#30,#7c,#30,#30,#36,#1c,#00 ; Character 116/255 &74 t
3BA8 db #00,#00,#66,#66,#66,#66,#3e,#00 ; Character 117/255 &75 u
3BB0 db #00,#00,#66,#66,#66,#3c,#18,#00 ; Character 118/255 &76 v
3BB8 db #00,#00,#c6,#d6,#d6,#fe,#6c,#00 ; Character 119/255 &77 w
3BC0 db #00,#00,#c6,#6c,#38,#6c,#c6,#00 ; Character 120/255 &78 x
3BC8 db #00,#00,#66,#66,#66,#3e,#06,#7c ; Character 121/255 &79 y
3BD0 db #00,#00,#7e,#4c,#18,#32,#7e,#00 ; Character 122/255 &7A z
3BD8 db #0e,#18,#18,#70,#18,#18,#0e,#00 ; Character 123/255 &7B { (Open Curly Bracket)
3BE0 db #18,#18,#18,#18,#18,#18,#18,#00 ; Character 124/255 &7C | (Bar/Pipe)
3BE8 db #70,#18,#18,#0e,#18,#18,#70,#00 ; Character 125/255 &7D } (Close Curly Bracket)
3BF0 db #76,#dc,#00,#00,#00,#00,#00,#00 ; Character 126/255 &7E
3BF8 db #cc,#33,#cc,#33,#cc,#33,#cc,#33 ; Character 127/255 &7F
3C00 db #00,#00,#00,#00,#00,#00,#00,#00 ; Character 128/255 &80
3C08 db #f0,#f0,#f0,#f0,#00,#00,#00,#00 ; Character 129/255 &81
3C10 db #0f,#0f,#0f,#0f,#00,#00,#00,#00 ; Character 130/255 &82
3C18 db #ff,#ff,#ff,#ff,#00,#00,#00,#00 ; Character 131/255 &83
3C20 db #00,#00,#00,#00,#f0,#f0,#f0,#f0 ; Character 132/255 &84
3C28 db #f0,#f0,#f0,#f0,#f0,#f0,#f0,#f0 ; Character 133/255 &85
3C30 db #0f,#0f,#0f,#0f,#f0,#f0,#f0,#f0 ; Character 134/255 &86
3C38 db #ff,#ff,#ff,#ff,#f0,#f0,#f0,#f0 ; Character 135/255 &87
3C40 db #00,#00,#00,#00,#0f,#0f,#0f,#0f ; Character 136/255 &88
3C48 db #f0,#f0,#f0,#f0,#0f,#0f,#0f,#0f ; Character 137/255 &89
3C50 db #0f,#0f,#0f,#0f,#0f,#0f,#0f,#0f ; Character 138/255 &8A
3C58 db #ff,#ff,#ff,#ff,#0f,#0f,#0f,#0f ; Character 139/255 &8B
3C60 db #00,#00,#00,#00,#ff,#ff,#ff,#ff ; Character 140/255 &8C
3C68 db #f0,#f0,#f0,#f0,#ff,#ff,#ff,#ff ; Character 141/255 &8D
3C70 db #0f,#0f,#0f,#0f,#ff,#ff,#ff,#ff ; Character 142/255 &8E
3C78 db #ff,#ff,#ff,#ff,#ff,#ff,#ff,#ff ; Character 143/255 &8F
3C80 db #00,#00,#00,#18,#18,#00,#00,#00 ; Character 144/255 &90
3C88 db #18,#18,#18,#18,#18,#00,#00,#00 ; Character 145/255 &91
3C90 db #00,#00,#00,#1f,#1f,#00,#00,#00 ; Character 146/255 &92
3C98 db #18,#18,#18,#1f,#0f,#00,#00,#00 ; Character 147/255 &93
3CA0 db #00,#00,#00,#18,#18,#18,#18,#18 ; Character 148/255 &94
3CA8 db #18,#18,#18,#18,#18,#18,#18,#18 ; Character 149/255 &95
3CB0 db #00,#00,#00,#0f,#1f,#18,#18,#18 ; Character 150/255 &96
3CB8 db #18,#18,#18,#1f,#1f,#18,#18,#18 ; Character 151/255 &97
3CC0 db #00,#00,#00,#f8,#f8,#00,#00,#00 ; Character 152/255 &98
3CC8 db #18,#18,#18,#f8,#f0,#00,#00,#00 ; Character 153/255 &99
3CD0 db #00,#00,#00,#ff,#ff,#00,#00,#00 ; Character 154/255 &9A
3CD8 db #18,#18,#18,#ff,#ff,#00,#00,#00 ; Character 155/255 &9B
3CE0 db #00,#00,#00,#f0,#f8,#18,#18,#18 ; Character 156/255 &9C
3CE8 db #18,#18,#18,#f8,#f8,#18,#18,#18 ; Character 157/255 &9D
3CF0 db #00,#00,#00,#ff,#ff,#18,#18,#18 ; Character 158/255 &9E
3CF8 db #18,#18,#18,#ff,#ff,#18,#18,#18 ; Character 159/255 &9F
3D00 db #10,#38,#6c,#c6,#00,#00,#00,#00 ; Character 160/255 &A0
3D08 db #0c,#18,#30,#00,#00,#00,#00,#00 ; Character 161/255 &A1
3D10 db #66,#66,#00,#00,#00,#00,#00,#00 ; Character 162/255 &A2
3D18 db #3c,#66,#60,#f8,#60,#66,#fe,#00 ; Character 163/255 &A3
3D20 db #38,#44,#ba,#a2,#ba,#44,#38,#00 ; Character 164/255 &A4
3D28 db #7e,#f4,#f4,#74,#34,#34,#34,#00 ; Character 165/255 &A5
3D30 db #1e,#30,#38,#6c,#38,#18,#f0,#00 ; Character 166/255 &A6
3D38 db #18,#18,#0c,#00,#00,#00,#00,#00 ; Character 167/255 &A7
3D40 db #40,#c0,#44,#4c,#54,#1e,#04,#00 ; Character 168/255 &A8
3D48 db #40,#c0,#4c,#52,#44,#08,#1e,#00 ; Character 169/255 &A9
3D50 db #e0,#10,#62,#16,#ea,#0f,#02,#00 ; Character 170/255 &AA
3D58 db #00,#18,#18,#7e,#18,#18,#7e,#00 ; Character 171/255 &AB
3D60 db #18,#18,#00,#7e,#00,#18,#18,#00 ; Character 172/255 &AC
3D68 db #00,#00,#00,#7e,#06,#06,#00,#00 ; Character 173/255 &AD
3D70 db #18,#00,#18,#30,#66,#66,#3c,#00 ; Character 174/255 &AE
3D78 db #18,#00,#18,#18,#18,#18,#18,#00 ; Character 175/255 &AF
3D80 db #00,#00,#73,#de,#cc,#de,#73,#00 ; Character 176/255 &B0
3D88 db #7c,#c6,#c6,#fc,#c6,#c6,#f8,#c0 ; Character 177/255 &B1
3D90 db #00,#66,#66,#3c,#66,#66,#3c,#00 ; Character 178/255 &B2
3D98 db #3c,#60,#60,#3c,#66,#66,#3c,#00 ; Character 179/255 &B3
3DA0 db #00,#00,#1e,#30,#7c,#30,#1e,#00 ; Character 180/255 &B4
3DA8 db #38,#6c,#c6,#fe,#c6,#6c,#38,#00 ; Character 181/255 &B5
3DB0 db #00,#c0,#60,#30,#38,#6c,#c6,#00 ; Character 182/255 &B6
3DB8 db #00,#00,#66,#66,#66,#7c,#60,#60 ; Character 183/255 &B7
3DC0 db #00,#00,#00,#fe,#6c,#6c,#6c,#00 ; Character 184/255 &B8
3DC8 db #00,#00,#00,#7e,#d8,#d8,#70,#00 ; Character 185/255 &B9
3DD0 db #03,#06,#0c,#3c,#66,#3c,#60,#c0 ; Character 186/255 &BA
3DD8 db #03,#06,#0c,#66,#66,#3c,#60,#c0 ; Character 187/255 &BB
3DE0 db #00,#e6,#3c,#18,#38,#6c,#c7,#00 ; Character 188/255 &BC
3DE8 db #00,#00,#66,#c3,#db,#db,#7e,#00 ; Character 189/255 &BD
3DF0 db #fe,#c6,#60,#30,#60,#c6,#fe,#00 ; Character 190/255 &BE
3DF8 db #00,#7c,#c6,#c6,#c6,#6c,#ee,#00 ; Character 191/255 &BF
3E00 db #18,#30,#60,#c0,#80,#00,#00,#00 ; Character 192/255 &C0
3E08 db #18,#0c,#06,#03,#01,#00,#00,#00 ; Character 193/255 &C1
3E10 db #00,#00,#00,#01,#03,#06,#0c,#18 ; Character 194/255 &C2
3E18 db #00,#00,#00,#80,#c0,#60,#30,#18 ; Character 195/255 &C3
3E20 db #18,#3c,#66,#c3,#81,#00,#00,#00 ; Character 196/255 &C4
3E28 db #18,#0c,#06,#03,#03,#06,#0c,#18 ; Character 197/255 &C5
3E30 db #00,#00,#00,#81,#c3,#66,#3c,#18 ; Character 198/255 &C6
3E38 db #18,#30,#60,#c0,#c0,#60,#30,#18 ; Character 199/255 &C7
3E40 db #18,#30,#60,#c1,#83,#06,#0c,#18 ; Character 200/255 &C8
3E48 db #18,#0c,#06,#83,#c1,#60,#30,#18 ; Character 201/255 &C9
3E50 db #18,#3c,#66,#c3,#c3,#66,#3c,#18 ; Character 202/255 &CA
3E58 db #c3,#e7,#7e,#3c,#3c,#7e,#e7,#c3 ; Character 203/255 &CB
3E60 db #03,#07,#0e,#1c,#38,#70,#e0,#c0 ; Character 204/255 &CC
3E68 db #c0,#e0,#70,#38,#1c,#0e,#07,#03 ; Character 205/255 &CD
3E70 db #cc,#cc,#33,#33,#cc,#cc,#33,#33 ; Character 206/255 &CE
3E78 db #aa,#55,#aa,#55,#aa,#55,#aa,#55 ; Character 207/255 &CF
3E80 db #ff,#ff,#00,#00,#00,#00,#00,#00 ; Character 208/255 &D0
3E88 db #03,#03,#03,#03,#03,#03,#03,#03 ; Character 209/255 &D1
3E90 db #00,#00,#00,#00,#00,#00,#ff,#ff ; Character 210/255 &D2
3E98 db #c0,#c0,#c0,#c0,#c0,#c0,#c0,#c0 ; Character 211/255 &D3
3EA0 db #ff,#fe,#fc,#f8,#f0,#e0,#c0,#80 ; Character 212/255 &D4
3EA8 db #ff,#7f,#3f,#1f,#0f,#07,#03,#01 ; Character 213/255 &D5
3EB0 db #01,#03,#07,#0f,#1f,#3f,#7f,#ff ; Character 214/255 &D6
3EB8 db #80,#c0,#e0,#f0,#f8,#fc,#fe,#ff ; Character 215/255 &D7
3EC0 db #aa,#55,#aa,#55,#00,#00,#00,#00 ; Character 216/255 &D8
3EC8 db #0a,#05,#0a,#05,#0a,#05,#0a,#05 ; Character 217/255 &D9
3ED0 db #00,#00,#00,#00,#aa,#55,#aa,#55 ; Character 218/255 &DA
3ED8 db #a0,#50,#a0,#50,#a0,#50,#a0,#50 ; Character 219/255 &DB
3EE0 db #aa,#54,#a8,#50,#a0,#40,#80,#00 ; Character 220/255 &DC
3EE8 db #aa,#55,#2a,#15,#0a,#05,#02,#01 ; Character 221/255 &DD
3EF0 db #01,#02,#05,#0a,#15,#2a,#55,#aa ; Character 222/255 &DE
3EF8 db #00,#80,#40,#a0,#50,#a8,#54,#aa ; Character 223/255 &DF
3F00 db #7e,#ff,#99,#ff,#bd,#c3,#ff,#7e ; Character 224/255 &E0
3F08 db #7e,#ff,#99,#ff,#c3,#bd,#ff,#7e ; Character 225/255 &E1
3F10 db #38,#38,#fe,#fe,#fe,#10,#38,#00 ; Character 226/255 &E2
3F18 db #10,#38,#7c,#fe,#7c,#38,#10,#00 ; Character 227/255 &E3
3F20 db #6c,#fe,#fe,#fe,#7c,#38,#10,#00 ; Character 228/255 &E4
3F28 db #10,#38,#7c,#fe,#fe,#10,#38,#00 ; Character 229/255 &E5
3F30 db #00,#3c,#66,#c3,#c3,#66,#3c,#00 ; Character 230/255 &E6
3F38 db #00,#3c,#7e,#ff,#ff,#7e,#3c,#00 ; Character 231/255 &E7
3F40 db #00,#7e,#66,#66,#66,#66,#7e,#00 ; Character 232/255 &E8
3F48 db #00,#7e,#7e,#7e,#7e,#7e,#7e,#00 ; Character 233/255 &E9
3F50 db #0f,#07,#0d,#78,#cc,#cc,#cc,#78 ; Character 234/255 &EA
3F58 db #3c,#66,#66,#66,#3c,#18,#7e,#18 ; Character 235/255 &EB
3F60 db #0c,#0c,#0c,#0c,#0c,#3c,#7c,#38 ; Character 236/255 &EC
3F68 db #18,#1c,#1e,#1b,#18,#78,#f8,#70 ; Character 237/255 &ED
3F70 db #99,#5a,#24,#c3,#c3,#24,#5a,#99 ; Character 238/255 &EE
3F78 db #10,#38,#38,#38,#38,#38,#7c,#d6 ; Character 239/255 &EF
3F80 db #18,#3c,#7e,#ff,#18,#18,#18,#18 ; Character 240/255 &F0
3F88 db #18,#18,#18,#18,#ff,#7e,#3c,#18 ; Character 241/255 &F1
3F90 db #10,#30,#70,#ff,#ff,#70,#30,#10 ; Character 242/255 &F2
3F98 db #08,#0c,#0e,#ff,#ff,#0e,#0c,#08 ; Character 243/255 &F3
3FA0 db #00,#00,#18,#3c,#7e,#ff,#ff,#00 ; Character 244/255 &F4
3FA8 db #00,#00,#ff,#ff,#7e,#3c,#18,#00 ; Character 245/255 &F5
3FB0 db #80,#e0,#f8,#fe,#f8,#e0,#80,#00 ; Character 246/255 &F6
3FB8 db #02,#0e,#3e,#fe,#3e,#0e,#02,#00 ; Character 247/255 &F7
3FC0 db #38,#38,#92,#7c,#10,#28,#28,#28 ; Character 248/255 &F8
3FC8 db #38,#38,#10,#fe,#10,#28,#44,#82 ; Character 249/255 &F9
3FD0 db #38,#38,#12,#7c,#90,#28,#24,#22 ; Character 250/255 &FA
3FD8 db #38,#38,#90,#7c,#12,#28,#48,#88 ; Character 251/255 &FB
3FE0 db #00,#3c,#18,#3c,#3c,#3c,#18,#00 ; Character 252/255 &FC
3FE8 db #3c,#ff,#ff,#18,#0c,#18,#30,#18 ; Character 253/255 &FD
3FF0 db #18,#3c,#7e,#18,#18,#7e,#3c,#18 ; Character 254/255 &FE
3FF8 db #00,#24,#66,#ff,#66,#24,#00,#00 ; Character 255/255 &FF