; z80dasm 1.1.0 ; command line: z80dasm --a -l -g 0 -t PX8OS1.bin ; Port data from: ; - PX8 Technical Manual Chapter 2,3,2 ; - Operating System Reference Manual Chapter 16 p000h equ 000h ; GAH40M Input Capture register (L) command trigger (r) / Control1 register (w) (bit0=BANK0; ROM/RAM switch) p001h equ 001h ; GAH40M Input Capture register (H) command trigger (r) / Command register (w) p002h equ 002h ; GAH40M Input Capture register (L) barcode trigger (r) / Control2 register (w) p003h equ 003h ; GAH40M Input Capture register (H) barcode trigger (r) p004h equ 004h ; GAH40M Interrupt Status register (r) / Interrupt Enable register (w) p005h equ 005h ; GAH40M Status register (r) p006h equ 006h ; GAH40M Serial I/O register (rw) p00ch equ 00Ch ; 82C51 Status (r) / Command (w) p00dh equ 00Dh ; 82C51 Data (rw) p00eh equ 00Eh ; SED 1320 Status (r) p00fh equ 00Fh ; SED 1320 Data (r) / Command register (w) (Communication to 6303 and indirectly VRAM) p080h equ 080h ; H102A/H103A Intelligent RAM DISK 60/120K Read data status - Write data p081h equ 081h ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information - Write command p084h equ 084h ; H107A Acoustic Coupler Tone dialer control (w) p085h equ 085h ; H107A Acoustic Coupler Model control (w) p086h equ 086h ; H107A Acoustic Coupler Model status (r) p087h equ 087h ; H107A Acoustic Coupler Port mode (w) p090h equ 090h ; Non-intelligent RAM disk Address register 1 (w) (auto increment) p091h equ 091h ; Non-intelligent RAM disk Address register 2 (w) p092h equ 092h ; Non-intelligent RAM disk Address register 3 (w) p093h equ 093h ; Non-intelligent RAM disk Access port (r/w) p094h equ 094h ; Non-intelligent RAM disk Command/Status register (r/w) p0a0h equ 0A0h ; H108A/H115A Multi-Unit 64/II 82C53 Count register p0a3h equ 0A3h ; H108A/H115A Multi-Unit 64/II 82C53 Counter mode p0a4h equ 0A4h ; H108A/H115A Multi-Unit 64/II 82C51 Data p0a5h equ 0A5h ; H108A/H115A Multi-Unit 64/II 82C51 Control status p0a6h equ 0A6h ; H108A/H115A Multi-Unit 64/II Carrier Detect signal p0a7h equ 0A7h ; H108A/H115A Multi-Unit 64/II RS-232C power on/off ; OS ROM Memory Map data from: ; - Operating System Reference Manual Chapter 2.3.2 ; - Operating System Reference Manual Chapter 18 ;0000H STARTER - System initialize, RESET switch processing, POWER switch processing, alarm interrupt processing in power off state ;002ah INTROM - interrupt processing from 7508 and 8251 ; MENU - controls menu processing ; SYSCRN - controls system display processing ;1C42h RELOC - relocates RAM resident modules (1c42h - 1cabh) ;1dddh BDOS - processes CP/M BDOS calls (1cach - 1ddeh) ; PREBIOS - preprocessing CP/M BIOS calls (1dddh - ; POSTBIOS - postprocessing CP/M BIOS calls ; BIOS1 - BIOS sub-module 1 ; BIOS2 - BIOS sub-module 2 ; BIOS3 - BIOS sub-module 3 ; SCREEN - controls CONOUT BIOS call processing ; MTOS - ; MIOS - ;738ch CCPD - CCP in relocatable format (738c - 7801h) ; RBDOSD - BDOS entry portion in relocatable format. ; RSYSPR - BIOS entry portion in relocatable format. Includes interrupt handling and other system routines ;7cb8h SYSAR1 - Copied into RAM and initialize the system work area 7cb8h - 7d40h > f000h - f0af0h ;7d40h SYSAR2 - 7d40h - 7f90h > f0b0h - f300h ;7F90H SYSAR3 - 7f90h - 7fcfh > f330h - f37fh ;7FFFh ROMID - Contains the ROM identification ; RAM Memory Map information from: ; - Operating System Reference Manual Chapter 18 ; - http://www.cpm.z80.de/download/cpm2-asm.zip Z80 CP/M 2.2 disassembly ;0000H CP/M system area ;0100H TPA ;8000H CCP and up, 800H bytes ; RBDOS, 100H bytes ; RBIOS, 100H bytes ; RAM Disk, 1 kByte increments (0400H) ; User BIOS, 256 Byte increments ((0100H) ;EC00H OS system area, up to FFFFH (E800H for Japanese-language version) ; RSYSPR ;F000H SYSAR1 ;F080H SYSAR2 ;F330H SYSAR3 ;F380H SYSAR4 ;F800H ;F806H KEYBUF Keyboard buffer ;F828H TIMBUF TIMBUF Timer/clock buffer ;F833H SYSFCB System FCB ;F857H SYSDMA System DMA ;F8D7H MCTID MCT ID area ;F90CH MCTDIR MCT directory area ;FA8CH TOSBUF MTOS buffer ;FD16H MCTRSV MCT work area ;FE30H STRTSK STARTER stack area ;FE70H INTSK Interrupt handler stack area ;FF50H BIOSSK BIOS stack area ;FF90H BDOSSK BDOS stack area org 00000h l0000h: jp l002ah ;0000 c3 2a 00 Jump past jump table l0003h: jp l1d7fh ;0003 c3 7f 1d .  . l0006h: jp l2c80h ;0006 c3 80 2c . . , l0009h: jp l604ch ;0009 c3 4c 60 . L ` l000ch: jp l6d17h ;000c c3 17 6d . . m l000fh: jp l2aach ;000f c3 ac 2a . . * l0012h: jp l1d0ch ;0012 c3 0c 1d . . . l0015h: jp l1d13h ;0015 c3 13 1d . . . l0018h: jp l041fh ;0018 c3 1f 04 . . . jp l1c82h ;001b c3 82 1c . . . jp l7070h ;001e c3 70 70 . p p l0021h: jp l6c81h ;0021 c3 81 6c . . l sub_0024h: jp l6c86h ;0024 c3 86 6c . . l sub_0027h: jp l6c8bh ;0027 c3 8b 6c . . l l002ah: di ;002a f3 im 2 ;002b ed 5e Interrupt mode 2 ld a,001h ;002d 3e 01 out (004h),a ;002f d3 04 ; GAH40M Interrupt Enable register (w) ld sp,0fe70h ;0031 31 70 fe 1 p . l0034h: ld a,0beh ;0034 3e be > . out (00dh),a ;0036 d3 0d ; 82C51 Data (rw) ld a,040h ;0038 3e 40 > @ out (00dh),a ;003a d3 0d ; 82C51 Data (rw) l003ch: call sub_3875h ;003c cd 75 38 . u 8 in a,(00fh) ;003f db 0f ; SED 1320 Data (r) (Communication to 6303 and indirectly VRAM) ld a,0efh ;0041 3e ef > . ld i,a ;0043 ed 47 . G l0045h: ld a,(0f0b8h) ;0045 3a b8 f0 : . . bit 6,a ;0048 cb 77 . w l004ah: jr nz,l0094h ;004a 20 48 H ld c,002h ;004c 0e 02 . . call sub_38f9h ;004e cd f9 38 . . 8 bit 3,a ;0051 cb 5f . _ jr nz,l0094h ;0053 20 3f Skip part res 2,a ;0055 cb 97 . . bit 4,a ;0057 cb 67 . g jr z,l005dh ;0059 28 02 ( . set 2,a ;005b cb d7 . . l005dh: and 007h ;005d e6 07 . . push af ;005f f5 . ld a,(0f387h) ;0060 3a 87 f3 : . . ld b,a ;0063 47 G l0064h: ld a,(0f388h) ;0064 3a 88 f3 : . . ld c,a ;0067 4f O pop af ;0068 f1 . srl b ;0069 cb 38 . 8 rla ;006b 17 . srl c ;006c cb 39 . 9 rla ;006e 17 . push af ;006f f5 . rrca ;0070 0f . rrca ;0071 0f . and 001h ;0072 e6 01 . . ld (0f387h),a ;0074 32 87 f3 2 . . ld a,001h ;0077 3e 01 > . ld (0f388h),a ;0079 32 88 f3 2 . . call sub_073eh ;007c cd 3e 07 . > . l007fh: pop af ;007f f1 . l0080h: ld hl,l05b7h ;0080 21 b7 05 ! . . ld b,000h ;0083 06 00 . . ld c,a ;0085 4f O add hl,bc ;0086 09 . ld a,(hl) ;0087 7e ~ l0088h: rrca ;0088 0f . jr c,l00ddh ;0089 38 52 8 R l008bh: rrca ;008b 0f . sub_008ch: jp c,l016eh ;008c da 6e 01 . n . rrca ;008f 0f . jr c,l00b5h ;0090 38 23 8 # sub_0092h: jr l00b5h ;0092 18 21 . ! l0094h: ld hl,0f380h ;0094 21 80 f3 fill RAM from f380h ld de,0f381h ;0097 11 81 f3 . ld bc,l0c7fh ;009a 01 7f 0c to ffffh with efh ld (hl),0efh ;009d 36 ef with efh ldir ;009f ed b0 as RAM Disk initialize ? ld a,001h ;00a1 3e 01 > . ld (0f388h),a ;00a3 32 88 f3 2 . . ld c,008h ;00a6 0e 08 . . call sub_4237h ;00a8 cd 37 42 . 7 B and 001h ;00ab e6 01 . . ld (0f387h),a ;00ad 32 87 f3 2 . . call sub_02c4h ;00b0 cd c4 02 . . . jr l00cah ;00b3 18 15 . . l00b5h: call sub_0757h ;00b5 cd 57 07 . W . sub_00b8h: and 030h ;00b8 e6 30 . 0 xor 030h ;00ba ee 30 . 0 jr z,l0094h ;00bc 28 d6 ( . ld a,(0f01dh) ;00be 3a 1d f0 : . . or a ;00c1 b7 . jr z,l00cah ;00c2 28 06 ( . call sub_01e4h ;00c4 cd e4 01 . . . call l0222h+2 ;00c7 cd 24 02 . $ . l00cah: call sub_03c8h ;00ca cd c8 03 . . . ld a,005h ;00cd 3e 05 > . ld (0f389h),a ;00cf 32 89 f3 2 . . xor a ;00d2 af . ld (0f539h),a ;00d3 32 39 f5 2 9 . ld ix,(0f006h) ;00d6 dd 2a 06 f0 . * . . sub_00dah: call sub_2c2eh ;00da cd 2e 2c . . , l00ddh: ld a,001h ;00dd 3e 01 > . l00dfh: ld (0f389h),a ;00df 32 89 f3 2 . . call sub_01dah ;00e2 cd da 01 . . . l00e5h: ld a,(0f01dh) ;00e5 3a 1d f0 : . . or a ;00e8 b7 . sub_00e9h: call nz,l0222h+2 ;00e9 c4 24 02 . $ . call 0050dh ;00ec cd 0d 05 . . . sub_00efh: call sub_5bb5h ;00ef cd b5 5b . . [ ld a,(0f330h) ;00f2 3a 30 f3 : 0 . or a ;00f5 b7 . jr z,l0121h ;00f6 28 29 ( ) ld hl,(0f017h) ;00f8 2a 17 f0 * . . call sub_706eh ;00fb cd 6e 70 . n p sub_00feh: ld a,001h ;00fe 3e 01 > . l0100h: ld (0f0b3h),a ;0100 32 b3 f0 2 . . out (004h),a ;0103 d3 04 ; GAH40M Interrupt Enable register (w) ld hl,(0f709h) ;0105 2a 09 f7 * . . ld (hl),000h ;0108 36 00 6 . call sub_020bh ;010a cd 0b 02 . . . l010dh: call sub_309fh ;010d cd 9f 30 . . 0 xor a ;0110 af . ld (0f539h),a ;0111 32 39 f5 2 9 . ld ix,(0f006h) ;0114 dd 2a 06 f0 . * . . inc ix ;0118 dd 23 . # l011ah: inc ix ;011a dd 23 . # inc ix ;011c dd 23 . # call sub_2c2eh ;011e cd 2e 2c . . , l0121h: ld (0f389h),a ;0121 32 89 f3 2 . . dec a ;0124 3d = ld (0f330h),a ;0125 32 30 f3 2 0 . ld hl,(0f019h) ;0128 2a 19 f0 * . . call sub_706eh ;012b cd 6e 70 . n p call sub_3610h ;012e cd 10 36 . . 6 ld a,(0f35ah) ;0131 3a 5a f3 : Z . or a ;0134 b7 . call nz,sub_3c8ch ;0135 c4 8c 3c . . < ld a,(0f2c8h) ;0138 3a c8 f2 : . . or a ;013b b7 . call z,sub_3e3eh ;013c cc 3e 3e . > > ld a,(0f1cah) ;013f 3a ca f1 : . . or a ;0142 b7 . call nz,sub_3473h ;0143 c4 73 34 . s 4 call sub_708fh ;0146 cd 8f 70 . . p ld hl,0f4bdh ;0149 21 bd f4 ! . . ld de,0f0d9h ;014c 11 d9 f0 . . . ld bc,l0003h+1 ;014f 01 04 00 . . . ldir ;0152 ed b0 . . ld a,(0f0b3h) ;0154 3a b3 f0 : . . out (004h),a ;0157 d3 04 ; GAH40M Interrupt Enable register (w) ld sp,(0f383h) ;0159 ed 7b 83 f3 . { . . ld a,(0f385h) ;015d 3a 85 f3 : . . ld (0f0bah),a ;0160 32 ba f0 2 . . pop hl ;0163 e1 . pop de ;0164 d1 . pop bc ;0165 c1 . pop af ;0166 f1 . ex af,af' ;0167 08 . exx ;0168 d9 . pop iy ;0169 fd e1 . . pop ix ;016b dd e1 . . ret ;016d c9 . l016eh: ld a,080h ;016e 3e 80 > . ld (0f070h),a ;0170 32 70 f0 2 p . ld a,00ah ;0173 3e 0a > . ld (0f4e6h),a ;0175 32 e6 f4 2 . . ld a,001h ;0178 3e 01 > . ld (0f06fh),a ;017a 32 6f f0 2 o . call sub_01dah ;017d cd da 01 . . . call 0ef8ch ;0180 cd 8c ef . . . ld c,003h ;0183 0e 03 . . ld hl,(0f01bh) ;0185 2a 1b f0 * . . call l7070h ;0188 cd 70 70 . p p ld a,(0f06ch) ;018b 3a 6c f0 : l . inc a ;018e 3c < l018fh: ld (0f389h),a ;018f 32 89 f3 2 . . dec a ;0192 3d = cp 003h ;0193 fe 03 . . jr z,l01b7h ;0195 28 20 ( cp 002h ;0197 fe 02 . . jp z,l00e5h ;0199 ca e5 00 . . . ld hl,0f0b8h ;019c 21 b8 f0 ! . . set 0,(hl) ;019f cb c6 . . push hl ;01a1 e5 . xor a ;01a2 af . ld (0f4e9h),a ;01a3 32 e9 f4 2 . . ei ;01a6 fb . l01a7h: call sub_0940h ;01a7 cd 40 09 . @ . di ;01aa f3 . l01abh: pop hl ;01ab e1 . res 0,(hl) ;01ac cb 86 . . ld a,(0f4e9h) ;01ae 3a e9 f4 : . . or a ;01b1 b7 . jp nz,l00e5h ;01b2 c2 e5 00 . . . jr l01d2h ;01b5 18 1b . . l01b7h: call sub_708fh ;01b7 cd 8f 70 . . p l01bah: ld ix,(0f06dh) ;01ba dd 2a 6d f0 . * m . xor a ;01be af . ld (0f539h),a ;01bf 32 39 f5 2 9 . sub_01c2h: ld a,(0f330h) ;01c2 3a 30 f3 : 0 . or a ;01c5 b7 . jr nz,l01cfh ;01c6 20 07 . ld sp,(0f383h) ;01c8 ed 7b 83 f3 . { . . call 0ed89h ;01cc cd 89 ed . . . l01cfh: call 0ed94h ;01cf cd 94 ed . . . l01d2h: call 0ef8fh ;01d2 cd 8f ef . . . sub_01d5h: ld c,0ffh ;01d5 0e ff . . call sub_2c46h ;01d7 cd 46 2c . F , sub_01dah: ld c,00ah ;01da 0e 0a . . call sub_4505h ;01dc cd 05 45 . . E l01dfh: jr c,sub_01dah ;01df 38 f9 8 . inc c ;01e1 0c . dec c ;01e2 0d . ret z ;01e3 c8 . sub_01e4h: ld c,00bh ;01e4 0e 0b . . call sub_4505h ;01e6 cd 05 45 . . E jr c,sub_01e4h ;01e9 38 f9 8 . inc c ;01eb 0c . dec c ;01ec 0d . jr nz,sub_01e4h ;01ed 20 f5 . ld a,0ffh ;01ef 3e ff > . ld (0f330h),a ;01f1 32 30 f3 2 0 . call sub_1c4eh ;01f4 cd 4e 1c . N . call sub_1c42h ;01f7 cd 42 1c . B . ld c,001h ;01fa 0e 01 . . call sub_4488h ;01fc cd 88 44 . . D ld de,l0220h ;01ff 11 20 02 . . ld bc,l0003h+1 ;0202 01 04 00 . . . call sub_44bbh ;0205 cd bb 44 . . D call sub_44b2h ;0208 cd b2 44 . . D sub_020bh: call 07092h ;020b cd 92 70 . . p l020eh: call sub_4b20h ;020e cd 20 4b . K l0211h: ld hl,0f0ddh ;0211 21 dd f0 ! . . call sub_051bh ;0214 cd 1b 05 . . . ld hl,0f0f1h ;0217 21 f1 f0 ! . . call sub_051bh ;021a cd 1b 05 . . . jp sub_708fh ;021d c3 8f 70 . . p l0220h: nop ;0220 00 . l0221h: adc a,(hl) ;0221 8e . l0222h: jp pe,l21ffh ;0222 ea ff 21 . . ! cp b ;0225 b8 . l0226h: ret p ;0226 f0 . l0227h: set 5,(hl) ;0227 cb ee . . ld hl,0f0dbh ;0229 21 db f0 ! . . set 6,(hl) ;022c cb f6 . . call sub_054dh ;022e cd 4d 05 . M . l0231h: ld c,001h ;0231 0e 01 . . ld hl,(0f015h) ;0233 2a 15 f0 * . . call l7070h ;0236 cd 70 70 . p p call sub_5b4fh ;0239 cd 4f 5b . O [ ld hl,l446bh ;023c 21 6b 44 ! k D call sub_051bh ;023f cd 1b 05 . . . call sub_708fh ;0242 cd 8f 70 . . p call sub_3610h ;0245 cd 10 36 . . 6 l0248h: ld hl,l0658h ;0248 21 58 06 ! X . call sub_051bh ;024b cd 1b 05 . . . ld hl,0f3d5h ;024e 21 d5 f3 ! . . ld b,008h ;0251 06 08 . . l0253h: ld (hl),020h ;0253 36 20 6 dec hl ;0255 2b + djnz l0253h ;0256 10 fb . . inc hl ;0258 23 # l0259h: ei ;0259 fb . halt ;025a 76 v push hl ;025b e5 . call sub_361ch ;025c cd 1c 36 . . 6 pop hl ;025f e1 . sub_0260h: call z,sub_2e61h ;0260 cc 61 2e . a . ld a,(0f0dch) ;0263 3a dc f0 : . . or a ;0266 b7 . jr z,l0278h ;0267 28 0f ( . call sub_0940h ;0269 cd 40 09 . @ . di ;026c f3 . ld a,(0f0dah) ;026d 3a da f0 : . . or a ;0270 b7 . jr z,l0231h ;0271 28 be ( . ld c,0ffh ;0273 0e ff . . call sub_2e61h ;0275 cd 61 2e . a . l0278h: push hl ;0278 e5 . call sub_113eh ;0279 cd 3e 11 . > . or a ;027c b7 . pop hl ;027d e1 . jr z,l0259h ;027e 28 d9 ( . push hl ;0280 e5 . call sub_3610h ;0281 cd 10 36 . . 6 call sub_1146h ;0284 cd 46 11 . F . di ;0287 f3 . pop hl ;0288 e1 . l0289h: cp 00dh ;0289 fe 0d . . jr z,l029dh ;028b 28 10 ( . cp 020h ;028d fe 20 . jr c,l0259h ;028f 38 c8 8 . ld (hl),a ;0291 77 w inc hl ;0292 23 # ld c,020h ;0293 0e 20 . call sub_0533h ;0295 cd 33 05 . 3 . l0298h: ld a,l ;0298 7d } cp 0d6h ;0299 fe d6 . . jr nz,l0259h ;029b 20 bc . l029dh: ld hl,0f01eh ;029d 21 1e f0 ! . . ld de,0f3ceh ;02a0 11 ce f3 . . . ld b,008h ;02a3 06 08 . . l02a5h: ld a,(de) ;02a5 1a . cpl ;02a6 2f / cp (hl) ;02a7 be . jr nz,l0248h ;02a8 20 9e . inc hl ;02aa 23 # l02abh: inc de ;02ab 13 . djnz l02a5h ;02ac 10 f7 . . call sub_5bb5h ;02ae cd b5 5b . . [ call sub_0592h ;02b1 cd 92 05 . . . ld hl,0f0dch ;02b4 21 dc f0 ! . . res 6,(hl) ;02b7 cb b6 . . l02b9h: ld hl,0f0dbh ;02b9 21 db f0 ! . . res 6,(hl) ;02bc cb b6 . . ld hl,0f0b8h ;02be 21 b8 f0 ! . . res 5,(hl) ;02c1 cb ae . . ret ;02c3 c9 . sub_02c4h: ld c,029h ;02c4 0e 29 . ) l02c6h: call sub_4237h ;02c6 cd 37 42 . 7 B ld c,01dh ;02c9 0e 1d . . call sub_4237h ;02cb cd 37 42 . 7 B call sub_1ca0h ;02ce cd a0 1c . . . call sub_01e4h ;02d1 cd e4 01 . . . call sub_5b4fh ;02d4 cd 4f 5b . O [ ld a,040h ;02d7 3e 40 > @ l02d9h: ld (0f0b8h),a ;02d9 32 b8 f0 2 . . ei ;02dc fb . ld hl,l05d7h ;02dd 21 d7 05 Point to 'SYSTEM INITIALIZE' call sub_051bh ;02e0 cd 1b 05 . . . xor a ;02e3 af . ld bc,l2000h+2 ;02e4 01 02 20 . . ld d,00ch ;02e7 16 0c . . l02e9h: call sub_0473h ;02e9 cd 73 04 . s . ld hl,0f476h ;02ec 21 76 f4 ! v . call sub_1113h ;02ef cd 13 11 . . . l02f2h: ld de,0f440h ;02f2 11 40 f4 . @ . ld bc,l0006h ;02f5 01 06 00 . . . ldir ;02f8 ed b0 . . ld hl,(0f476h) ;02fa 2a 76 f4 * v . ld a,(0f478h) ;02fd 3a 78 f4 : x . ld (0f440h),a ;0300 32 40 f4 2 @ . ld (0f441h),hl ;0303 22 41 f4 " A . l0306h: ld hl,l060eh ;0306 21 0e 06 ! . . l0309h: call sub_051bh ;0309 cd 1b 05 . . . xor a ;030c af . l030dh: ld bc,l1603h ;030d 01 03 16 . . . ld d,001h ;0310 16 01 . . call sub_0473h ;0312 cd 73 04 . s . ld a,(0f476h) ;0315 3a 76 f4 : v . ld (0f446h),a ;0318 32 46 f4 2 F . ld de,0f440h ;031b 11 40 f4 . @ . ld c,0ffh ;031e 0e ff . . call sub_2c16h ;0320 cd 16 2c . . , l0323h: in a,(094h) ;0323 db 94 ; Non-intelligent RAM disk Command/Status register (r/w) bit 7,a ;0325 cb 7f .  l0327h: jr nz,l033bh ;0327 20 12 . ld b,040h ;0329 06 40 . @ bit 2,a ;032b cb 57 . W jr l0331h ;032d 18 02 . . ld b,080h ;032f 06 80 . . l0331h: xor a ;0331 af . ld (0f009h),a ;0332 32 09 f0 2 . . ld a,b ;0335 78 x ld (0f6a8h),a ;0336 32 a8 f6 2 . . jr l0381h ;0339 18 46 . F l033bh: xor a ;033b af . l033ch: ld (0f009h),a ;033c 32 09 f0 2 . . in a,(081h) ;033f db 81 Intelligent RAM Disk Handshake information bit 7,a ;0341 cb 7f 0 of RAM disk connected jr nz,l0363h ;0343 20 1e . l0345h: in a,(081h) ;0345 db 81 Intelligent RAM Disk Handshake information bit 1,a ;0347 cb 4f IBF: Receive data state, 0=present, 1=not present jr nz,l0345h ;0349 20 fa If not present, retry xor a ;034b af . out (081h),a ;034c d3 81 Intelligent RAM Disk Write command l034eh: in a,(081h) ;034e db 81 Intelligent RAM Disk Handshake information bit 0,a ;0350 cb 47 OBF: Receive data state, 0=Command or data transfer enabled, 1=Command or data transfer disabled jr z,l034eh ;0352 28 fa If not enabled, retry l0354h: in a,(080h) ;0354 db 80 Intelligent RAM Disk data status bit 0,a ;0356 cb 47 ?0=Ok, 1=Read from invalid RAM bank? l0358h: ld hl,0f6a8h ;0358 21 a8 f6 ! . . ld (hl),03ch ;035b 36 3c 6 < jr z,l0381h ;035d 28 22 ( " ld (hl),078h ;035f 36 78 6 x jr l0381h ;0361 18 1e . . l0363h: ld hl,l0626h ;0363 21 26 06 ! & . call sub_051bh ;0366 cd 1b 05 . . . ld a,009h ;0369 3e 09 > . ld bc,l1603h+1 ;036b 01 04 16 . . . ld d,002h ;036e 16 02 . . call sub_0473h ;0370 cd 73 04 . s . dec a ;0373 3d = jr z,l0363h ;0374 28 ed ( . inc a ;0376 3c < cp 019h ;0377 fe 19 . . jr nc,l0363h ;0379 30 e8 0 . ld (0f009h),a ;037b 32 09 f0 2 . . ld (0f6a8h),a ;037e 32 a8 f6 2 . . l0381h: ld hl,l063fh ;0381 21 3f 06 ! ? . call sub_051bh ;0384 cd 1b 05 . . . ld a,(0f00bh) ;0387 3a 0b f0 : . . ld bc,l1605h ;038a 01 05 16 . . . ld d,002h ;038d 16 02 . . call sub_0473h ;038f cd 73 04 . s . ld (0f00bh),a ;0392 32 0b f0 2 . . call sub_0458h ;0395 cd 58 04 . X . l0398h: jr nc,l0323h ;0398 30 89 0 . di ;039a f3 . call l041fh ;039b cd 1f 04 . . . ld a,0c3h ;039e 3e c3 > . ld (0f380h),a ;03a0 32 80 f3 2 . . ld (0f381h),bc ;03a3 ed 43 81 f3 . C . . ld (0f076h),bc ;03a7 ed 43 76 f0 . C v . ld (0f006h),de ;03ab ed 53 06 f0 . S . . ld (0f004h),ix ;03af dd 22 04 f0 . " . . ld (0f002h),iy ;03b3 fd 22 02 f0 . " . . ld hl,0f3d6h ;03b7 21 d6 f3 ! . . call sub_17f6h ;03ba cd f6 17 . . . ld hl,0f3ffh ;03bd 21 ff f3 ! . . l03c0h: call sub_17f6h ;03c0 cd f6 17 . . . xor a ;03c3 af . ld (0f0b8h),a ;03c4 32 b8 f0 2 . . ret ;03c7 c9 . sub_03c8h: xor a ;03c8 af . ld (0f4e8h),a ;03c9 32 e8 f4 2 . . call sub_01e4h ;03cc cd e4 01 . . . l03cfh: call sub_0458h ;03cf cd 58 04 . X . jr c,l03d8h ;03d2 38 04 8 . pop af ;03d4 f1 . jp l0094h ;03d5 c3 94 00 . . . l03d8h: call l041fh ;03d8 cd 1f 04 . . . push bc ;03db c5 . push de ;03dc d5 . push ix ;03dd dd e5 . . l03dfh: push iy ;03df fd e5 . . ld hl,(0f076h) ;03e1 2a 76 f0 * v . ld bc,(0f006h) ;03e4 ed 4b 06 f0 . K . . l03e8h: add hl,bc ;03e8 09 . ld bc,(0f004h) ;03e9 ed 4b 04 f0 . K . . add hl,bc ;03ed 09 . ld bc,(0f002h) ;03ee ed 4b 02 f0 . K . . add hl,bc ;03f2 09 . ld b,004h ;03f3 06 04 . . l03f5h: pop de ;03f5 d1 . or a ;03f6 b7 . sbc hl,de ;03f7 ed 52 . R djnz l03f5h ;03f9 10 fa . . xor a ;03fb af . ld b,a ;03fc 47 G ld c,a ;03fd 4f O sbc hl,bc ;03fe ed 42 . B l0400h: jr z,l0406h ;0400 28 04 ( . l0402h: pop af ;0402 f1 . jp l0094h ;0403 c3 94 00 . . . l0406h: ld hl,(0f6a8h) ;0406 2a a8 f6 * . . l0409h: ld h,000h ;0409 26 00 & . ld a,l ;040b 7d } or a ;040c b7 . l040dh: jr z,l0410h ;040d 28 01 ( . dec hl ;040f 2b + l0410h: ld (0f291h),hl ;0410 22 91 f2 " . . cp 01eh ;0413 fe 1e . . jr c,l041ch ;0415 38 05 8 . ld l,01fh ;0417 2e 1f . . ld (0f293h),hl ;0419 22 93 f2 " . . l041ch: jp sub_309fh ;041c c3 9f 30 . . 0 l041fh: or a ;041f b7 . ld hl,0ec00h ;0420 21 00 ec ! . . ld a,(0f00bh) ;0423 3a 0b f0 : . . l0426h: ld b,a ;0426 47 G ld c,000h ;0427 0e 00 . . l0429h: sbc hl,bc ;0429 ed 42 . B push hl ;042b e5 . ld a,(0f009h) ;042c 3a 09 f0 : . . ld b,a ;042f 47 G sla b ;0430 cb 20 . sla b ;0432 cb 20 . or a ;0434 b7 . sbc hl,bc ;0435 ed 42 . B ld bc,l0100h ;0437 01 00 01 . . . sbc hl,bc ;043a ed 42 . B push hl ;043c e5 . pop de ;043d d1 . l043eh: ld bc,l0100h ;043e 01 00 01 . . . sbc hl,bc ;0441 ed 42 . B push hl ;0443 e5 . pop ix ;0444 dd e1 . . ld (0f53fh),ix ;0446 dd 22 3f f5 . " ? . ld bc,00800h ;044a 01 00 08 . . . sbc hl,bc ;044d ed 42 . B push hl ;044f e5 . pop iy ;0450 fd e1 . . ld (0f541h),iy ;0452 fd 22 41 f5 . " A . pop bc ;0456 c1 . ret ;0457 c9 . sub_0458h: ld a,(0f00bh) ;0458 3a 0b f0 : . . or a ;045b b7 . jr z,l0464h ;045c 28 06 ( . dec a ;045e 3d = srl a ;045f cb 3f . ? srl a ;0461 cb 3f . ? inc a ;0463 3c < l0464h: ld hl,0f009h ;0464 21 09 f0 ! . . add a,(hl) ;0467 86 . cp 019h ;0468 fe 19 . . ret c ;046a d8 . xor a ;046b af . ld (0f009h),a ;046c 32 09 f0 2 . . ld (0f00bh),a ;046f 32 0b f0 2 . . ret ;0472 c9 . sub_0473h: call sub_04b5h ;0473 cd b5 04 . . . add a,030h ;0476 c6 30 . 0 ld (0f477h),a ;0478 32 77 f4 2 w . xor a ;047b af . ld e,a ;047c 5f _ l047dh: push bc ;047d c5 . ld ix,0f476h ;047e dd 21 76 f4 . ! v . call sub_0f33h ;0482 cd 33 0f . 3 . pop bc ;0485 c1 . push bc ;0486 c5 . push de ;0487 d5 . l0488h: ld d,c ;0488 51 Q ld a,b ;0489 78 x add a,e ;048a 83 . ld e,a ;048b 5f _ call sub_0fbdh ;048c cd bd 0f . . . l048fh: call sub_1146h ;048f cd 46 11 . F . cp 00dh ;0492 fe 0d . . jr z,l04aah ;0494 28 14 ( . cp 01ch ;0496 fe 1c . . l0498h: jr z,l04a6h ;0498 28 0c ( . cp 01dh ;049a fe 1d . . jr z,l04a6h ;049c 28 08 ( . cp 030h ;049e fe 30 . 0 jr c,l048fh ;04a0 38 ed 8 . cp 03ah ;04a2 fe 3a . : jr nc,l048fh ;04a4 30 e9 0 . l04a6h: pop de ;04a6 d1 . pop bc ;04a7 c1 . jr l047dh ;04a8 18 d3 . . l04aah: pop de ;04aa d1 . pop bc ;04ab c1 . ld ix,0f473h ;04ac dd 21 73 f4 . ! s . call sub_04c2h ;04b0 cd c2 04 . . . ld a,l ;04b3 7d } ret ;04b4 c9 . sub_04b5h: push bc ;04b5 c5 . ld hl,0f473h ;04b6 21 73 f4 ! s . ld b,00fh ;04b9 06 0f . . l04bbh: ld (hl),030h ;04bb 36 30 6 0 inc hl ;04bd 23 # djnz l04bbh ;04be 10 fb . . pop bc ;04c0 c1 . ret ;04c1 c9 . sub_04c2h: ld b,005h ;04c2 06 05 . . ld hl,l0000h ;04c4 21 00 00 ! . . l04c7h: add hl,hl ;04c7 29 ) push hl ;04c8 e5 . add hl,hl ;04c9 29 ) add hl,hl ;04ca 29 ) pop de ;04cb d1 . l04cch: add hl,de ;04cc 19 . ld a,(ix+000h) ;04cd dd 7e 00 . ~ . sub 030h ;04d0 d6 30 . 0 ld e,a ;04d2 5f _ ld d,000h ;04d3 16 00 . . add hl,de ;04d5 19 . inc ix ;04d6 dd 23 . # djnz l04c7h ;04d8 10 ed . . ret ;04da c9 . sub_04dbh: push ix ;04db dd e5 . . ld iy,l0503h ;04dd fd 21 03 05 . ! . . ld b,005h ;04e1 06 05 . . l04e3h: xor a ;04e3 af . ld d,(iy+001h) ;04e4 fd 56 01 . V . ld e,(iy+000h) ;04e7 fd 5e 00 . ^ . l04eah: or a ;04ea b7 . sbc hl,de ;04eb ed 52 . R jr c,l04f2h ;04ed 38 03 8 . inc a ;04ef 3c < jr l04eah ;04f0 18 f8 . . l04f2h: add hl,de ;04f2 19 . add a,030h ;04f3 c6 30 . 0 ld (ix+000h),a ;04f5 dd 77 00 . w . inc ix ;04f8 dd 23 . # inc iy ;04fa fd 23 . # inc iy ;04fc fd 23 . # djnz l04e3h ;04fe 10 e3 . . l0500h: pop ix ;0500 dd e1 . . ret ;0502 c9 . l0503h: djnz l052ch ;0503 10 27 . ' ret pe ;0505 e8 . l0506h: inc bc ;0506 03 . ld h,h ;0507 64 d nop ;0508 00 . ld a,(bc) ;0509 0a . nop ;050a 00 . ld bc,0af00h ;050b 01 00 af . . . l050eh: ld (0f0b8h),a ;050e 32 b8 f0 2 . . ld (0f4e9h),a ;0511 32 e9 f4 2 . . ld (0f0d8h),a ;0514 32 d8 f0 2 . . l0517h: ld (0f4eah),a ;0517 32 ea f4 2 . . l051ah: ret ;051a c9 . sub_051bh: ld a,(hl) ;051b 7e ~ inc hl ;051c 23 # inc a ;051d 3c < ret z ;051e c8 . dec a ;051f 3d = ld c,a ;0520 4f O call sub_0533h ;0521 cd 33 05 . 3 . jr sub_051bh ;0524 18 f5 . . ld a,(hl) ;0526 7e ~ inc hl ;0527 23 # sub_0528h: or a ;0528 b7 . ret z ;0529 c8 . ld b,a ;052a 47 G l052bh: ld c,(hl) ;052b 4e N l052ch: call sub_0533h ;052c cd 33 05 . 3 . inc hl ;052f 23 # djnz l052bh ;0530 10 f9 . . ret ;0532 c9 . sub_0533h: push af ;0533 f5 . push bc ;0534 c5 . push de ;0535 d5 . push hl ;0536 e5 . push ix ;0537 dd e5 . . push iy ;0539 fd e5 . . call sub_2b48h ;053b cd 48 2b . H + call sub_4b3dh ;053e cd 3d 4b . = K call sub_2b68h ;0541 cd 68 2b . h + pop iy ;0544 fd e1 . . pop ix ;0546 dd e1 . . pop hl ;0548 e1 . pop de ;0549 d1 . pop bc ;054a c1 . pop af ;054b f1 . ret ;054c c9 . sub_054dh: ld hl,0f0f7h ;054d 21 f7 f0 ! . . ld de,0f38ah ;0550 11 8a f3 . . . ld bc,l0015h+1 ;0553 01 16 00 . . . ldir ;0556 ed b0 . . ld hl,0f806h ;0558 21 06 f8 ! . . ld bc,l0021h ;055b 01 21 00 . ! . ldir ;055e ed b0 . . ld a,(0f0b2h) ;0560 3a b2 f0 : . . ld (0f3c1h),a ;0563 32 c1 f3 2 . . xor a ;0566 af . ld b,00ch ;0567 06 0c . . ld hl,0f0f7h ;0569 21 f7 f0 ! . . l056ch: ld (hl),a ;056c 77 w inc hl ;056d 23 # djnz l056ch ;056e 10 fc . . ld h,a ;0570 67 g ld l,a ;0571 6f o ld (0f108h),hl ;0572 22 08 f1 " . . ld (0f10ah),hl ;0575 22 0a f1 " . . ld a,(0f0b2h) ;0578 3a b2 f0 : . . and 0f8h ;057b e6 f8 . . ld (0f0b2h),a ;057d 32 b2 f0 2 . . out (002h),a ;0580 d3 02 . . ld hl,00042h ;0582 21 42 00 ! B . ld (0f0ffh),hl ;0585 22 ff f0 " . . ld hl,0f806h ;0588 21 06 f8 ! . . ld (0f0fah),hl ;058b 22 fa f0 " . . ld (0f0fch),hl ;058e 22 fc f0 " . . ret ;0591 c9 . sub_0592h: ld hl,0f38ah ;0592 21 8a f3 ! . . ld de,0f0f7h ;0595 11 f7 f0 . . . ld bc,l0015h+1 ;0598 01 16 00 . . . ldir ;059b ed b0 . . ld de,0f806h ;059d 11 06 f8 . . . l05a0h: ld bc,l0021h ;05a0 01 21 00 . ! . ldir ;05a3 ed b0 . . ld a,(0f3c1h) ;05a5 3a c1 f3 : . . and 007h ;05a8 e6 07 . . ld b,a ;05aa 47 G ld a,(0f0b2h) ;05ab 3a b2 f0 : . . and 0f8h ;05ae e6 f8 . . or b ;05b0 b0 . ld (0f0b2h),a ;05b1 32 b2 f0 2 . . out (002h),a ;05b4 d3 02 . . ret ;05b6 c9 . l05b7h: ld bc,l0100h+1 ;05b7 01 01 01 . . . ld bc,l0100h+1 ;05ba 01 01 01 . . . ld bc,00201h ;05bd 01 01 02 . . . ld (bc),a ;05c0 02 . ld (bc),a ;05c1 02 . ld (bc),a ;05c2 02 . ld (bc),a ;05c3 02 . ld (bc),a ;05c4 02 . ld (bc),a ;05c5 02 . ld (bc),a ;05c6 02 . inc b ;05c7 04 . inc b ;05c8 04 . inc b ;05c9 04 . inc b ;05ca 04 . inc b ;05cb 04 . inc b ;05cc 04 . inc b ;05cd 04 . inc b ;05ce 04 . inc b ;05cf 04 . inc b ;05d0 04 . inc b ;05d1 04 . inc b ;05d2 04 . inc b ;05d3 04 . l05d4h: inc b ;05d4 04 . inc b ;05d5 04 . inc b ;05d6 04 . l05d7h: dec de ;05d7 1b . or 00ch ;05d8 f6 0c . . ld d,e ;05da 53 S ld e,c ;05db 59 Y ld d,e ;05dc 53 S ld d,h ;05dd 54 T ld b,l ;05de 45 E ld c,l ;05df 4d M jr nz,l062bh ;05e0 20 49 I ld c,(hl) ;05e2 4e N ld c,c ;05e3 49 I ld d,h ;05e4 54 T ld c,c ;05e5 49 I ld b,c ;05e6 41 A ld c,h ;05e7 4c L ld c,c ;05e8 49 I ld e,d ;05e9 5a Z ld b,l ;05ea 45 E dec de ;05eb 1b . dec a ;05ec 3d = ld (l4520h),hl ;05ed 22 20 45 " E ld c,(hl) ;05f0 4e N l05f1h: ld d,h ;05f1 54 T ld b,l ;05f2 45 E ld d,d ;05f3 52 R jr nz,$+70 ;05f4 20 44 D ld b,c ;05f6 41 A ld d,h ;05f7 54 T ld b,l ;05f8 45 E jr nz,l064fh ;05f9 20 54 T l05fbh: ld c,c ;05fb 49 I ld c,l ;05fc 4d M ld b,l ;05fd 45 E jr nz,l0628h ;05fe 20 28 ( ld c,l ;0600 4d M l0601h: ld c,l ;0601 4d M ld b,h ;0602 44 D ld b,h ;0603 44 D ld e,c ;0604 59 Y ld e,c ;0605 59 Y l0606h: ld l,b ;0606 68 h l0607h: ld l,b ;0607 68 h ld l,l ;0608 6d m ld l,l ;0609 6d m ld (hl),e ;060a 73 s ld (hl),e ;060b 73 s add hl,hl ;060c 29 ) rst 38h ;060d ff . l060eh: dec de ;060e 1b . dec a ;060f 3d = inc hl ;0610 23 # l0611h: jr nz,l0658h ;0611 20 45 E ld c,(hl) ;0613 4e N ld d,h ;0614 54 T ld b,l ;0615 45 E ld d,d ;0616 52 R jr nz,l065dh ;0617 20 44 D ld b,c ;0619 41 A ld e,c ;061a 59 Y jr nz,l063dh ;061b 20 20 jr z,l064fh ;061d 28 30 ( 0 jr nz,l0695h ;061f 20 74 t ld l,a ;0621 6f o jr nz,l065ah ;0622 20 36 6 add hl,hl ;0624 29 ) rst 38h ;0625 ff . l0626h: dec de ;0626 1b . dec a ;0627 3d = l0628h: inc h ;0628 24 $ jr nz,l0645h ;0629 20 1a . l062bh: ld b,l ;062b 45 E ld c,(hl) ;062c 4e N ld d,h ;062d 54 T ld b,l ;062e 45 E ld d,d ;062f 52 R jr nz,$+84 ;0630 20 52 R ld b,c ;0632 41 A ld c,l ;0633 4d M jr nz,$+70 ;0634 20 44 D ld c,c ;0636 49 I ld d,e ;0637 53 S ld c,e ;0638 4b K jr nz,l068eh ;0639 20 53 S l063bh: ld c,c ;063b 49 I ld e,d ;063c 5a Z l063dh: ld b,l ;063d 45 E rst 38h ;063e ff . l063fh: dec de ;063f 1b . dec a ;0640 3d = dec h ;0641 25 % jr nz,l065eh ;0642 20 1a . ld b,l ;0644 45 E l0645h: ld c,(hl) ;0645 4e N ld d,h ;0646 54 T ld b,l ;0647 45 E ld d,d ;0648 52 R jr nz,$+87 ;0649 20 55 U ld d,e ;064b 53 S ld b,l ;064c 45 E ld d,d ;064d 52 R ld b,d ;064e 42 B l064fh: ld c,c ;064f 49 I ld c,a ;0650 4f O ld d,e ;0651 53 S jr nz,l06a7h ;0652 20 53 S ld c,c ;0654 49 I ld e,d ;0655 5a Z ld b,l ;0656 45 E rst 38h ;0657 ff . l0658h: dec de ;0658 1b . l0659h: dec a ;0659 3d = l065ah: ld hl,0ff2ah ;065a 21 2a ff ! * . l065dh: rst 38h ;065d ff . l065eh: rst 38h ;065e ff . rst 38h ;065f ff . rst 38h ;0660 ff . rst 38h ;0661 ff . rst 38h ;0662 ff . rst 38h ;0663 ff . rst 38h ;0664 ff . rst 38h ;0665 ff . rst 38h ;0666 ff . rst 38h ;0667 ff . rst 38h ;0668 ff . rst 38h ;0669 ff . rst 38h ;066a ff . rst 38h ;066b ff . rst 38h ;066c ff . l066dh: rst 38h ;066d ff . rst 38h ;066e ff . rst 38h ;066f ff . sub_0670h: ld hl,0f0bbh ;0670 21 bb f0 ! . . l0673h: set 7,(hl) ;0673 cb fe . . xor a ;0675 af . ld (0f4e2h),a ;0676 32 e2 f4 2 . . l0679h: call sub_09f6h ;0679 cd f6 09 . . . ei ;067c fb . ld c,002h ;067d 0e 02 . . call sub_38f9h ;067f cd f9 38 . . 8 l0682h: ld (0f4e3h),a ;0682 32 e3 f4 2 . . cp 0c0h ;0685 fe c0 . . jr c,l06c7h ;0687 38 3e 8 > push af ;0689 f5 . and 007h ;068a e6 07 . . push af ;068c f5 . push af ;068d f5 . l068eh: ld a,(0f387h) ;068e 3a 87 f3 : . . ld b,a ;0691 47 G pop af ;0692 f1 . and 001h ;0693 e6 01 . . l0695h: ld (0f387h),a ;0695 32 87 f3 2 . . pop af ;0698 f1 . srl b ;0699 cb 38 . 8 rla ;069b 17 . ld hl,0f0c8h ;069c 21 c8 f0 ! . . ld b,000h ;069f 06 00 . . ld c,a ;06a1 4f O add hl,bc ;06a2 09 . ld a,(hl) ;06a3 7e ~ pop bc ;06a4 c1 . l06a5h: bit 5,b ;06a5 cb 68 . h l06a7h: jr z,l06abh ;06a7 28 02 ( . set 0,a ;06a9 cb c7 . . l06abh: ld (0f4e2h),a ;06ab 32 e2 f4 2 . . rrca ;06ae 0f . call c,sub_0831h ;06af dc 31 08 . 1 . rrca ;06b2 0f . call c,sub_07deh ;06b3 dc de 07 . . . rrca ;06b6 0f . call c,sub_0885h ;06b7 dc 85 08 . . . rrca ;06ba 0f . call c,sub_0787h ;06bb dc 87 07 . . . rrca ;06be 0f . call c,sub_0791h ;06bf dc 91 07 . . . di ;06c2 f3 . call sub_09fdh ;06c3 cd fd 09 . . . ret ;06c6 c9 . l06c7h: ld b,a ;06c7 47 G cp 010h ;06c8 fe 10 . . jr nz,l06eah ;06ca 20 1e . push bc ;06cc c5 . call sub_0757h ;06cd cd 57 07 . W . and 009h ;06d0 e6 09 . . ld (0f10bh),a ;06d2 32 0b f1 2 . . ld (0f10ch),a ;06d5 32 0c f1 2 . . ld a,0ffh ;06d8 3e ff > . ld (0f10ah),a ;06da 32 0a f1 2 . . call sub_070ah ;06dd cd 0a 07 . . . pop bc ;06e0 c1 . l06e1h: ld hl,0f806h ;06e1 21 06 f8 ! . . ld (0f0fah),hl ;06e4 22 fa f0 " . . ld (0f0fch),hl ;06e7 22 fc f0 " . . l06eah: ld hl,(0f0fah) ;06ea 2a fa f0 * . . push hl ;06ed e5 . inc hl ;06ee 23 # ld a,l ;06ef 7d } cp 027h ;06f0 fe 27 . ' jr nz,l06f7h ;06f2 20 03 . ld hl,0f806h ;06f4 21 06 f8 ! . . l06f7h: ld a,(0f0fch) ;06f7 3a fc f0 : . . cp l ;06fa bd . jr nz,l0700h ;06fb 20 03 . pop hl ;06fd e1 . jr l0705h ;06fe 18 05 . . l0700h: ld (0f0fah),hl ;0700 22 fa f0 " . . pop hl ;0703 e1 . ld (hl),b ;0704 70 p l0705h: di ;0705 f3 . call sub_09fdh ;0706 cd fd 09 . . . ret ;0709 c9 . sub_070ah: call sub_074ch ;070a cd 4c 07 . L . l070dh: ld c,002h ;070d 0e 02 . . call sub_38f9h ;070f cd f9 38 . . 8 cp 010h ;0712 fe 10 . . jr z,sub_070ah ;0714 28 f4 ( . jr c,l070dh ;0716 38 f5 8 . ld a,(0f0feh) ;0718 3a fe f0 : . . and 014h ;071b e6 14 . . ld b,a ;071d 47 G push bc ;071e c5 . call sub_0757h ;071f cd 57 07 . W . pop bc ;0722 c1 . push af ;0723 f5 . and 022h ;0724 e6 22 . " or b ;0726 b0 . ld b,a ;0727 47 G pop af ;0728 f1 . bit 0,a ;0729 cb 47 . G jr z,l072fh ;072b 28 02 ( . set 7,b ;072d cb f8 . . l072fh: bit 3,a ;072f cb 5f . _ jr z,l0735h ;0731 28 02 ( . set 6,b ;0733 cb f0 . . l0735h: bit 4,a ;0735 cb 67 . g jr z,l073bh ;0737 28 02 ( . set 0,b ;0739 cb c0 . . l073bh: ld a,b ;073b 78 x jr l0743h ;073c 18 05 . . sub_073eh: ld a,(0f0feh) ;073e 3a fe f0 : . . and 014h ;0741 e6 14 . . l0743h: ld (0f0feh),a ;0743 32 fe f0 2 . . call sub_3a9dh ;0746 cd 9d 3a . . : jp l3af1h ;0749 c3 f1 3a . . : sub_074ch: ld c,003h ;074c 0e 03 . . call sub_38f9h ;074e cd f9 38 . . 8 call sub_387bh ;0751 cd 7b 38 . { 8 jp sub_3875h ;0754 c3 75 38 . u 8 sub_0757h: call sub_074ch ;0757 cd 4c 07 . L . ld d,000h ;075a 16 00 . . l075ch: ld c,002h ;075c 0e 02 . . call sub_38f9h ;075e cd f9 38 . . 8 cp 0bfh ;0761 fe bf . . jr z,l077bh ;0763 28 16 ( . cp 0c0h ;0765 fe c0 . . jr nc,l0780h ;0767 30 17 0 . sub 0b2h ;0769 d6 b2 . . l076bh: jr c,l075ch ;076b 38 ef 8 . inc a ;076d 3c < ld b,000h ;076e 06 00 . . scf ;0770 37 7 l0771h: rl b ;0771 cb 10 . . dec a ;0773 3d = jr nz,l0771h ;0774 20 fb . ld a,d ;0776 7a z or b ;0777 b0 . ld d,a ;0778 57 W jr l075ch ;0779 18 e1 . . l077bh: ld a,d ;077b 7a z ld (0f4e5h),a ;077c 32 e5 f4 2 . . ret ;077f c9 . l0780h: bit 0,a ;0780 cb 47 . G call nz,sub_0885h ;0782 c4 85 08 . . . jr l075ch ;0785 18 d5 . . sub_0787h: push af ;0787 f5 . ld a,0ffh ;0788 3e ff > . ld (0f0d8h),a ;078a 32 d8 f0 2 . . ld c,000h ;078d 0e 00 . . jr l07afh ;078f 18 1e . . sub_0791h: push af ;0791 f5 . ld a,001h ;0792 3e 01 > . ld (0f4eah),a ;0794 32 ea f4 2 . . ld a,(0f008h) ;0797 3a 08 f0 : . . or a ;079a b7 . jr z,l07a8h ;079b 28 0b ( . ld b,a ;079d 47 G push bc ;079e c5 . call sub_0757h ;079f cd 57 07 . W . pop bc ;07a2 c1 . ld c,001h ;07a3 0e 01 . . and b ;07a5 a0 . jr z,l07afh ;07a6 28 07 ( . l07a8h: ld c,000h ;07a8 0e 00 . . ld a,002h ;07aa 3e 02 > . l07ach: ld (0f4eah),a ;07ac 32 ea f4 2 . . l07afh: push bc ;07af c5 . call sub_07c8h ;07b0 cd c8 07 . . . pop bc ;07b3 c1 . ld a,(0f0d9h) ;07b4 3a d9 f0 : . . ld (0f0dah),a ;07b7 32 da f0 2 . . l07bah: or a ;07ba b7 . l07bbh: jr nz,l07c6h ;07bb 20 09 . di ;07bd f3 . push bc ;07be c5 . call sub_09fdh ;07bf cd fd 09 . . . pop bc ;07c2 c1 . call sub_2e61h ;07c3 cd 61 2e . a . l07c6h: pop af ;07c6 f1 . ret ;07c7 c9 . sub_07c8h: ld hl,l07d9h ;07c8 21 d9 07 ! . . ld b,005h ;07cb 06 05 . . l07cdh: push hl ;07cd e5 . l07ceh: push bc ;07ce c5 . ld a,(hl) ;07cf 7e ~ call l06c7h ;07d0 cd c7 06 . . . pop bc ;07d3 c1 . pop hl ;07d4 e1 . inc hl ;07d5 23 # l07d6h: djnz l07cdh ;07d6 10 f5 . . ret ;07d8 c9 . l07d9h: and d ;07d9 a2 . and e ;07da a3 . and l ;07db a5 . and (hl) ;07dc a6 . l07ddh: and a ;07dd a7 . sub_07deh: push af ;07de f5 . ld a,(0f0b8h) ;07df 3a b8 f0 : . . and 003h ;07e2 e6 03 . . jr nz,l082fh ;07e4 20 49 I ld hl,0f070h ;07e6 21 70 f0 ! p . bit 7,(hl) ;07e9 cb 7e . ~ jr nz,l081eh ;07eb 20 31 1 l07edh: set 7,(hl) ;07ed cb fe . . l07efh: ld hl,0f4e6h ;07ef 21 e6 f4 ! . . ld (hl),00ah ;07f2 36 0a 6 . ld a,001h ;07f4 3e 01 > . ld (0f06fh),a ;07f6 32 6f f0 2 o . ld hl,0f4e4h ;07f9 21 e4 f4 ! . . set 3,(hl) ;07fc cb de . . call 0ef92h ;07fe cd 92 ef . . . ld a,(0f0dbh) ;0801 3a db f0 : . . ld (0f0dch),a ;0804 32 dc f0 2 . . or a ;0807 b7 . jr nz,l081bh ;0808 20 11 . push ix ;080a dd e5 . . push iy ;080c fd e5 . . l080eh: call sub_09fdh ;080e cd fd 09 . . . call sub_0940h ;0811 cd 40 09 . @ . call sub_09f6h ;0814 cd f6 09 . . . pop iy ;0817 fd e1 . . pop ix ;0819 dd e1 . . l081bh: call 0ef95h ;081b cd 95 ef . . . l081eh: ld a,(0f0dah) ;081e 3a da f0 : . . or a ;0821 b7 . jr z,l082fh ;0822 28 0b ( . res 5,a ;0824 cb af . . ld (0f0dah),a ;0826 32 da f0 2 . . or a ;0829 b7 . jr nz,l082fh ;082a 20 03 . call sub_2e47h ;082c cd 47 2e . G . l082fh: pop af ;082f f1 . ret ;0830 c9 . sub_0831h: push af ;0831 f5 . ld hl,0f4e4h ;0832 21 e4 f4 ! . . set 6,(hl) ;0835 cb f6 . . ld hl,(0f071h) ;0837 2a 71 f0 * q . inc hl ;083a 23 # ld (0f071h),hl ;083b 22 71 f0 " q . ld hl,(0f073h) ;083e 2a 73 f0 * s . dec hl ;0841 2b + ld (0f073h),hl ;0842 22 73 f0 " s . ld a,(0f070h) ;0845 3a 70 f0 : p . bit 7,a ;0848 cb 7f .  jr z,l0857h ;084a 28 0b ( . ld hl,0f4e6h ;084c 21 e6 f4 ! . . dec (hl) ;084f 35 5 jr nz,l0857h ;0850 20 05 . ld hl,0f070h ;0852 21 70 f0 ! p . res 7,(hl) ;0855 cb be . . l0857h: ld a,(0f331h) ;0857 3a 31 f3 : 1 . or a ;085a b7 . jr z,l0873h ;085b 28 16 ( . ld hl,(0f4e7h) ;085d 2a e7 f4 * . . dec hl ;0860 2b + ld (0f4e7h),hl ;0861 22 e7 f4 " . . ld a,l ;0864 7d } or a ;0865 b7 . jr nz,l0873h ;0866 20 0b . or h ;0868 b4 . jr nz,l0873h ;0869 20 08 . xor a ;086b af . ld (0f331h),a ;086c 32 31 f3 2 1 . dec a ;086f 3d = ld (0f332h),a ;0870 32 32 f3 2 2 . l0873h: ld a,(0f333h) ;0873 3a 33 f3 : 3 . or a ;0876 b7 . jr z,l0883h ;0877 28 0a ( . dec a ;0879 3d = ld (0f333h),a ;087a 32 33 f3 2 3 . jr nz,l0883h ;087d 20 04 . dec a ;087f 3d = ld (0f334h),a ;0880 32 34 f3 2 4 . l0883h: pop af ;0883 f1 . ret ;0884 c9 . sub_0885h: push af ;0885 f5 . ld a,0ffh ;0886 3e ff > . ld (0f4e9h),a ;0888 32 e9 f4 2 . . pop af ;088b f1 . ret ;088c c9 . sub_088dh: ld hl,0f0bbh ;088d 21 bb f0 ! . . set 6,(hl) ;0890 cb f6 . . l0892h: ld hl,0f6b8h ;0892 21 b8 f6 ! . . bit 0,(hl) ;0895 cb 46 . F ret z ;0897 c8 . in a,(00dh) ;0898 db 0d ; 82C51 Data (rw) ld b,a ;089a 47 G rlca ;089b 07 . and 070h ;089c e6 70 . p or (hl) ;089e b6 . ld (hl),a ;089f 77 w bit 1,b ;08a0 cb 48 . H ret z ;08a2 c8 . ld a,b ;08a3 78 x and 080h ;08a4 e6 80 . . ld b,a ;08a6 47 G in a,(004h) ;08a7 db 04 ; GAH40M Interrupt Status register (r) rlca ;08a9 07 . and 008h ;08aa e6 08 . . or b ;08ac b0 . xor 088h ;08ad ee 88 . . or (hl) ;08af b6 . ld (hl),a ;08b0 77 w in a,(00ch) ;08b1 db 0c ; 82C51 Status (r)? ld b,a ;08b3 47 G ld a,(0f6c9h) ;08b4 3a c9 f6 : . . and b ;08b7 a0 . ld b,a ;08b8 47 G ld hl,0f6c4h ;08b9 21 c4 f6 ! . . bit 4,(hl) ;08bc cb 66 . f jr z,l08d4h ;08be 28 14 ( . ld a,(0f00ch) ;08c0 3a 0c f0 : . . cp b ;08c3 b8 . jr nz,l08cah ;08c4 20 04 . set 7,(hl) ;08c6 cb fe . . jr l0892h ;08c8 18 c8 . . l08cah: ld a,(0f00dh) ;08ca 3a 0d f0 : . . cp b ;08cd b8 . jr nz,l08d4h ;08ce 20 04 . res 7,(hl) ;08d0 cb be . . jr l0892h ;08d2 18 be . . l08d4h: ld hl,0f6b8h ;08d4 21 b8 f6 ! . . bit 1,(hl) ;08d7 cb 4e . N jr z,l08deh ;08d9 28 03 ( . set 2,(hl) ;08db cb d6 . . ret ;08dd c9 . l08deh: ld hl,(0f6bbh) ;08de 2a bb f6 * . . call 0edbah ;08e1 cd ba ed . . . ld a,b ;08e4 78 x inc hl ;08e5 23 # ld d,h ;08e6 54 T ld e,l ;08e7 5d ] ld bc,(0f6c1h) ;08e8 ed 4b c1 f6 . K . . or a ;08ec b7 . sbc hl,bc ;08ed ed 42 . B ex de,hl ;08ef eb . jr nz,l08f5h ;08f0 20 03 . ld hl,(0f6bdh) ;08f2 2a bd f6 * . . l08f5h: ld (0f6bbh),hl ;08f5 22 bb f6 " . . ld bc,(0f6b9h) ;08f8 ed 4b b9 f6 . K . . or a ;08fc b7 . sbc hl,bc ;08fd ed 42 . B jr nz,l0906h ;08ff 20 05 . ld hl,0f6b8h ;0901 21 b8 f6 ! . . set 1,(hl) ;0904 cb ce . . l0906h: ld de,(0f6cch) ;0906 ed 5b cc f6 . [ . . ld hl,0f6c4h ;090a 21 c4 f6 ! . . bit 2,(hl) ;090d cb 56 . V ex de,hl ;090f eb . jr z,l091ah ;0910 28 08 ( . cp 00eh ;0912 fe 0e . . jr z,l091bh ;0914 28 05 ( . cp 00fh ;0916 fe 0f . . jr z,l091bh ;0918 28 01 ( . l091ah: inc hl ;091a 23 # l091bh: ld (0f6cch),hl ;091b 22 cc f6 " . . ex de,hl ;091e eb . bit 4,(hl) ;091f cb 66 . f jp z,l0892h ;0921 ca 92 08 . . . call sub_4093h ;0924 cd 93 40 . . @ ld hl,(0f6c5h) ;0927 2a c5 f6 * . . or a ;092a b7 . sbc hl,bc ;092b ed 42 . B jp nc,l0892h ;092d d2 92 08 . . . l0930h: call sub_4065h ;0930 cd 65 40 . e @ jr nz,l0930h ;0933 20 fb . ld a,(0f00ch) ;0935 3a 0c f0 : . . out (00ch),a ;0938 d3 0c ; 82C51 Command (w) ld hl,0f6c4h ;093a 21 c4 f6 ! . . set 6,(hl) ;093d cb f6 . . ret ;093f c9 . sub_0940h: ld hl,0f0d9h ;0940 21 d9 f0 ! . . set 5,(hl) ;0943 cb ee . . xor a ;0945 af . ld (0f0dch),a ;0946 32 dc f0 2 . . ld hl,0f0b8h ;0949 21 b8 f0 ! . . set 1,(hl) ;094c cb ce . . ld a,(0f06ch) ;094e 3a 6c f0 : l . cp 003h ;0951 fe 03 . . jr nz,l095eh ;0953 20 09 . ld ix,(0f06dh) ;0955 dd 2a 6d f0 . * m . call 0edb1h ;0959 cd b1 ed . . . jr l09d7h ;095c 18 79 . y l095eh: ld a,(0f0b9h) ;095e 3a b9 f0 : . . push af ;0961 f5 . ld a,(0f071h) ;0962 3a 71 f0 : q . add a,032h ;0965 c6 32 . 2 ld (0f4ebh),a ;0967 32 eb f4 2 . . ld c,003h ;096a 0e 03 . . ld hl,(0f01bh) ;096c 2a 1b f0 * . . call l7070h ;096f cd 70 70 . p p call sub_5b4fh ;0972 cd 4f 5b . O [ ld c,00ch ;0975 0e 0c . . call sub_0533h ;0977 cd 33 05 . 3 . call sub_708fh ;097a cd 8f 70 . . p call sub_130dh ;097d cd 0d 13 . . . ld hl,l09e4h ;0980 21 e4 09 ! . . call sub_051bh ;0983 cd 1b 05 . . . call sub_054dh ;0986 cd 4d 05 . M . l0989h: ld a,(0f0dah) ;0989 3a da f0 : . . or a ;098c b7 . jr nz,l09b4h ;098d 20 25 % ld hl,0f0b8h ;098f 21 b8 f0 ! . . bit 0,(hl) ;0992 cb 46 . F jr z,l099ch ;0994 28 06 ( . ld a,(0f4e9h) ;0996 3a e9 f4 : . . or a ;0999 b7 . jr nz,l09b4h ;099a 20 18 . l099ch: ld a,(0f4ebh) ;099c 3a eb f4 : . . ld b,a ;099f 47 G ld a,(0f071h) ;09a0 3a 71 f0 : q . cp b ;09a3 b8 . jr z,l09b4h ;09a4 28 0e ( . halt ;09a6 76 v l09a7h: call sub_113eh ;09a7 cd 3e 11 . > . l09aah: or a ;09aa b7 . jr z,l0989h ;09ab 28 dc ( . call sub_1146h ;09ad cd 46 11 . F . cp 01bh ;09b0 fe 1b . . jr nz,l09a7h ;09b2 20 f3 . l09b4h: call 0ef98h ;09b4 cd 98 ef . . . call sub_0592h ;09b7 cd 92 05 . . . ld a,(0f0b8h) ;09ba 3a b8 f0 : . . and 025h ;09bd e6 25 . % call z,sub_5bb5h ;09bf cc b5 5b . . [ call sub_073eh ;09c2 cd 3e 07 . > . pop af ;09c5 f1 . ld (0f0b9h),a ;09c6 32 b9 f0 2 . . or a ;09c9 b7 . jr z,l09d7h ;09ca 28 0b ( . ld a,(0f0dah) ;09cc 3a da f0 : . . or a ;09cf b7 . jr z,l09d7h ;09d0 28 05 ( . set 7,a ;09d2 cb ff . . ld (0f0dah),a ;09d4 32 da f0 2 . . l09d7h: ld hl,0f0d9h ;09d7 21 d9 f0 ! . . res 5,(hl) ;09da cb ae . . ld hl,0f0b8h ;09dc 21 b8 f0 ! . . res 1,(hl) ;09df cb 8e . . jp sub_3610h ;09e1 c3 10 36 . . 6 l09e4h: dec de ;09e4 1b . dec a ;09e5 3d = inc h ;09e6 24 $ ld hl,(07250h) ;09e7 2a 50 72 * P r ; Press ESC key ld h,l ;09ea 65 e ld (hl),e ;09eb 73 s ld (hl),e ;09ec 73 s jr nz,$+71 ;09ed 20 45 E ld d,e ;09ef 53 S ld b,e ;09f0 43 C jr nz,l0a5eh ;09f1 20 6b k ld h,l ;09f3 65 e ld a,c ;09f4 79 y rst 38h ;09f5 ff . sub_09f6h: ld a,(0f0b3h) ;09f6 3a b3 f0 : . . res 0,a ;09f9 cb 87 . . jr l0a02h ;09fb 18 05 . . sub_09fdh: ld a,(0f0b3h) ;09fd 3a b3 f0 : . . set 0,a ;0a00 cb c7 . . l0a02h: ld (0f0b3h),a ;0a02 32 b3 f0 2 . . out (004h),a ;0a05 d3 04 ; GAH40M Interrupt Enable register (w) ret ;0a07 c9 . rst 38h ;0a08 ff . rst 38h ;0a09 ff . rst 38h ;0a0a ff . rst 38h ;0a0b ff . rst 38h ;0a0c ff . rst 38h ;0a0d ff . l0a0eh: rst 38h ;0a0e ff . rst 38h ;0a0f ff . sub_0a10h: ld hl,0f0b8h ;0a10 21 b8 f0 ! . . set 4,(hl) ;0a13 cb e6 . . call sub_1c42h ;0a15 cd 42 1c . B . ld c,00dh ;0a18 0e 0d . . call 01d3eh ;0a1a cd 3e 1d . > . ld ix,0f036h ;0a1d dd 21 36 f0 . ! 6 . ld c,001h ;0a21 0e 01 . . ld b,004h ;0a23 06 04 . . l0a25h: ld a,(ix+000h) ;0a25 dd 7e 00 . ~ . cp 043h ;0a28 fe 43 . C jr nz,l0a3ah ;0a2a 20 0e . ld a,(ix+001h) ;0a2c dd 7e 01 . ~ . cp 04fh ;0a2f fe 4f . O jr nz,l0a3ah ;0a31 20 07 . ld a,(ix+002h) ;0a33 dd 7e 02 . ~ . cp 04dh ;0a36 fe 4d . M jr z,l0a43h ;0a38 28 09 ( . l0a3ah: inc c ;0a3a 0c . inc ix ;0a3b dd 23 . # inc ix ;0a3d dd 23 . # inc ix ;0a3f dd 23 . # djnz l0a25h ;0a41 10 e2 . . l0a43h: ld a,c ;0a43 79 y ld (0f4d5h),a ;0a44 32 d5 f4 2 . . ld hl,l114fh ;0a47 21 4f 11 ! O . call sub_051bh ;0a4a cd 1b 05 . . . xor a ;0a4d af . ld (0f46ah),a ;0a4e 32 6a f4 2 j . ld (0f4b0h),a ;0a51 32 b0 f4 2 . . dec a ;0a54 3d = ld (0f46bh),a ;0a55 32 6b f4 2 k . ld (0f4b3h),a ;0a58 32 b3 f4 2 . . ld (0f4bch),a ;0a5b 32 bc f4 2 . . l0a5eh: ld a,020h ;0a5e 3e 20 > ld (0f46eh),a ;0a60 32 6e f4 2 n . ld hl,l0503h ;0a63 21 03 05 ! . . ld (0f46ch),hl ;0a66 22 6c f4 " l . ld a,(0f035h) ;0a69 3a 35 f0 : 5 . or a ;0a6c b7 . jr z,l0a7eh ;0a6d 28 0f ( . call sub_0bafh ;0a6f cd af 0b . . . ld hl,0f4b4h ;0a72 21 b4 f4 ! . . call sub_051bh ;0a75 cd 1b 05 . . . ld hl,l1183h ;0a78 21 83 11 ! . . call sub_051bh ;0a7b cd 1b 05 . . . l0a7eh: call sub_0c0ah ;0a7e cd 0a 0c . . . ld a,(0f46ah) ;0a81 3a 6a f4 : j . or a ;0a84 b7 . jp z,l0b01h ;0a85 ca 01 0b . . . ld hl,0f4bdh ;0a88 21 bd f4 ! . . ld (hl),030h ;0a8b 36 30 6 0 inc hl ;0a8d 23 # ld (hl),02fh ;0a8e 36 2f 6 / inc hl ;0a90 23 # ld a,(0f46bh) ;0a91 3a 6b f4 : k . add a,031h ;0a94 c6 31 . 1 ld (hl),a ;0a96 77 w inc hl ;0a97 23 # ld (hl),020h ;0a98 36 20 6 inc hl ;0a9a 23 # ld a,(0f46eh) ;0a9b 3a 6e f4 : n . ld (hl),a ;0a9e 77 w inc hl ;0a9f 23 # ld (hl),0ffh ;0aa0 36 ff 6 . ld a,(0f46bh) ;0aa2 3a 6b f4 : k . ld b,a ;0aa5 47 G inc b ;0aa6 04 . xor a ;0aa7 af . l0aa8h: push bc ;0aa8 c5 . push af ;0aa9 f5 . ld d,a ;0aaa 57 W ld e,000h ;0aab 1e 00 . . call sub_0fbdh ;0aad cd bd 0f . . . ld hl,l1169h ;0ab0 21 69 11 ! i . call sub_051bh ;0ab3 cd 1b 05 . . . pop af ;0ab6 f1 . push af ;0ab7 f5 . ld d,a ;0ab8 57 W ld e,02fh ;0ab9 1e 2f . / call sub_0fbdh ;0abb cd bd 0f . . . call sub_3839h ;0abe cd 39 38 . 9 8 ld hl,l117dh ;0ac1 21 7d 11 ! } . call sub_051bh ;0ac4 cd 1b 05 . . . ld hl,0f4bdh ;0ac7 21 bd f4 ! . . inc (hl) ;0aca 34 4 call sub_051bh ;0acb cd 1b 05 . . . pop af ;0ace f1 . add a,008h ;0acf c6 08 . . pop bc ;0ad1 c1 . djnz l0aa8h ;0ad2 10 d4 . . xor a ;0ad4 af . ld (0f46fh),a ;0ad5 32 6f f4 2 o . ld (0f470h),a ;0ad8 32 70 f4 2 p . ld (0f471h),a ;0adb 32 71 f4 2 q . call sub_0ce9h ;0ade cd e9 0c . . . call sub_3610h ;0ae1 cd 10 36 . . 6 l0ae4h: halt ;0ae4 76 v l0ae5h: ld de,00815h ;0ae5 11 15 08 . . . call sub_0fd6h ;0ae8 cd d6 0f . . . call sub_361ch ;0aeb cd 1c 36 . . 6 call z,sub_2c46h ;0aee cc 46 2c . F , call sub_113eh ;0af1 cd 3e 11 . > . or a ;0af4 b7 . jr z,l0ae4h ;0af5 28 ed ( . call sub_3610h ;0af7 cd 10 36 . . 6 call sub_1146h ;0afa cd 46 11 . F . cp 01bh ;0afd fe 1b . . jr nz,l0b0ah ;0aff 20 09 . l0b01h: xor a ;0b01 af . ld (0f4b1h),a ;0b02 32 b1 f4 2 . . ld (0f107h),a ;0b05 32 07 f1 2 . . jr l0b57h ;0b08 18 4d . M l0b0ah: cp 00dh ;0b0a fe 0d . . jr z,l0b40h ;0b0c 28 32 ( 2 l0b0eh: cp 008h ;0b0e fe 08 . . jr z,l0b24h ;0b10 28 12 ( . cp 005h ;0b12 fe 05 . . jr z,l0b24h ;0b14 28 0e ( . cp 020h ;0b16 fe 20 . jr nc,l0b24h ;0b18 30 0a 0 . push af ;0b1a f5 . call sub_1039h ;0b1b cd 39 10 . 9 . pop af ;0b1e f1 . call sub_0ce9h ;0b1f cd e9 0c . . . jr l0ae5h ;0b22 18 c1 . . l0b24h: push af ;0b24 f5 . ld b,000h ;0b25 06 00 . . ld c,009h ;0b27 0e 09 . . ld d,03ch ;0b29 16 3c . < ld a,(0f4b0h) ;0b2b 3a b0 f4 : . . ld e,a ;0b2e 5f _ ld ix,0f473h ;0b2f dd 21 73 f4 . ! s . pop af ;0b33 f1 . call sub_0f33h ;0b34 cd 33 0f . 3 . ld a,e ;0b37 7b { ld (0f4b0h),a ;0b38 32 b0 f4 2 . . call sub_0fb6h ;0b3b cd b6 0f . . . jr l0ae5h ;0b3e 18 a5 . . l0b40h: ld b,03ch ;0b40 06 3c . < ld hl,0f4aeh ;0b42 21 ae f4 ! . . call sub_194ah ;0b45 cd 4a 19 . J . inc hl ;0b48 23 # ld (hl),00dh ;0b49 36 0d 6 . inc b ;0b4b 04 . ld a,b ;0b4c 78 x ld (0f107h),a ;0b4d 32 07 f1 2 . . ld de,0f473h ;0b50 11 73 f4 . s . ld (0f105h),de ;0b53 ed 53 05 f1 . S . . l0b57h: push hl ;0b57 e5 . xor a ;0b58 af . ld (0f035h),a ;0b59 32 35 f0 2 5 . di ;0b5c f3 . call sub_020bh ;0b5d cd 0b 02 . . . ei ;0b60 fb . ld hl,0f0b8h ;0b61 21 b8 f0 ! . . res 4,(hl) ;0b64 cb a6 . . pop hl ;0b66 e1 . ld a,(0f4b1h) ;0b67 3a b1 f4 : . . dec a ;0b6a 3d = ret nz ;0b6b c0 . ld (hl),000h ;0b6c 36 00 6 . call sub_2e21h ;0b6e cd 21 2e . ! . ld hl,0f473h ;0b71 21 73 f4 ! s . ld b,03ch ;0b74 06 3c . < call sub_10d4h ;0b76 cd d4 10 . . . ld a,(0f107h) ;0b79 3a 07 f1 : . . dec a ;0b7c 3d = ld hl,l0080h ;0b7d 21 80 00 ! . . ld c,000h ;0b80 0e 00 . . call sub_2c28h ;0b82 cd 28 2c . ( , inc a ;0b85 3c < ld b,000h ;0b86 06 00 . . ld c,a ;0b88 4f O ld hl,0f473h ;0b89 21 73 f4 ! s . ld de,l0080h+1 ;0b8c 11 81 00 . . . xor a ;0b8f af . ld (0f107h),a ;0b90 32 07 f1 2 . . call sub_2c2bh ;0b93 cd 2b 2c . + , ld hl,l0003h+1 ;0b96 21 04 00 ! . . ld c,000h ;0b99 0e 00 . . call sub_2c25h ;0b9b cd 25 2c . % , ld e,a ;0b9e 5f _ ld c,00eh ;0b9f 0e 0e . . call 01d3eh ;0ba1 cd 3e 1d . > . ld ix,l0100h ;0ba4 dd 21 00 01 . ! . . xor a ;0ba8 af . ld (0f539h),a ;0ba9 32 39 f5 2 9 . call sub_2c2eh ;0bac cd 2e 2c . . , sub_0bafh: push af ;0baf f5 . push bc ;0bb0 c5 . push de ;0bb1 d5 . push hl ;0bb2 e5 . push ix ;0bb3 dd e5 . . push iy ;0bb5 fd e5 . . ld a,(0f46ah) ;0bb7 3a 6a f4 : j . inc a ;0bba 3c < cp 079h ;0bbb fe 79 . y jr nz,l0bc6h ;0bbd 20 07 . ld a,02ah ;0bbf 3e 2a > * ld (0f46eh),a ;0bc1 32 6e f4 2 n . jr l0c01h ;0bc4 18 3b . ; l0bc6h: ld (0f46ah),a ;0bc6 32 6a f4 2 j . ld a,(0f4b2h) ;0bc9 3a b2 f4 : . . add a,014h ;0bcc c6 14 . . ld (0f4b2h),a ;0bce 32 b2 f4 2 . . ld hl,0f46ch ;0bd1 21 6c f4 ! l . inc (hl) ;0bd4 34 4 ld a,004h ;0bd5 3e 04 > . cp (hl) ;0bd7 be . jr nz,l0bfah ;0bd8 20 20 xor a ;0bda af . ld (0f4b2h),a ;0bdb 32 b2 f4 2 . . ld (0f46ch),a ;0bde 32 6c f4 2 l . ld hl,0f4b3h ;0be1 21 b3 f4 ! . . inc (hl) ;0be4 34 4 ld a,(0f46dh) ;0be5 3a 6d f4 : m . inc a ;0be8 3c < ld (0f46dh),a ;0be9 32 6d f4 2 m . cp 006h ;0bec fe 06 . . jr nz,l0bfah ;0bee 20 0a . xor a ;0bf0 af . ld (0f46dh),a ;0bf1 32 6d f4 2 m . inc (hl) ;0bf4 34 4 inc (hl) ;0bf5 34 4 ld hl,0f46bh ;0bf6 21 6b f4 ! k . inc (hl) ;0bf9 34 4 l0bfah: ld de,(0f4b2h) ;0bfa ed 5b b2 f4 . [ . . call sub_0fbdh ;0bfe cd bd 0f . . . l0c01h: pop iy ;0c01 fd e1 . . pop ix ;0c03 dd e1 . . pop hl ;0c05 e1 . l0c06h: pop de ;0c06 d1 . pop bc ;0c07 c1 . pop af ;0c08 f1 . ret ;0c09 c9 . sub_0c0ah: call l1d0ch ;0c0a cd 0c 1d . . . ld de,0f857h ;0c0d 11 57 f8 . W . ld c,01ah ;0c10 0e 1a . . call 01d3eh ;0c12 cd 3e 1d . > . ld de,0f02bh ;0c15 11 2b f0 . + . ld l,009h ;0c18 2e 09 . . l0c1ah: dec l ;0c1a 2d - jp z,l0ce6h ;0c1b ca e6 0c . . . ld a,(de) ;0c1e 1a . inc de ;0c1f 13 . ld (0f473h),a ;0c20 32 73 f4 2 s . sub 041h ;0c23 d6 41 . A jr c,l0c1ah ;0c25 38 f3 8 . cp 008h ;0c27 fe 08 . . jr c,l0c33h ;0c29 38 08 8 . sub 020h ;0c2b d6 20 . jr c,l0c1ah ;0c2d 38 eb 8 . cp 008h ;0c2f fe 08 . . jr nc,l0c1ah ;0c31 30 e7 0 . l0c33h: inc a ;0c33 3c < ld ix,0f833h ;0c34 dd 21 33 f8 . ! 3 . ld (ix+000h),a ;0c38 dd 77 00 . w . xor a ;0c3b af . ld (ix+00ch),a ;0c3c dd 77 0c . w . ld (ix+00fh),a ;0c3f dd 77 0f . w . push de ;0c42 d5 . push hl ;0c43 e5 . ld b,00bh ;0c44 06 0b . . l0c46h: inc ix ;0c46 dd 23 . # ld (ix+000h),03fh ;0c48 dd 36 00 3f . 6 . ? djnz l0c46h ;0c4c 10 f8 . . ld de,0f833h ;0c4e 11 33 f8 . 3 . ld c,011h ;0c51 0e 11 . . call 01d3eh ;0c53 cd 3e 1d . > . pop hl ;0c56 e1 . pop de ;0c57 d1 . bit 7,a ;0c58 cb 7f .  jr nz,l0c1ah ;0c5a 20 be . l0c5ch: push de ;0c5c d5 . push hl ;0c5d e5 . rlca ;0c5e 07 . rlca ;0c5f 07 . rlca ;0c60 07 . rlca ;0c61 07 . rlca ;0c62 07 . ld b,000h ;0c63 06 00 . . ld c,a ;0c65 4f O ld ix,0f857h ;0c66 dd 21 57 f8 . ! W . add ix,bc ;0c6a dd 09 . . res 7,(ix+009h) ;0c6c dd cb 09 be . . . . ld iy,0f036h ;0c70 fd 21 36 f0 . ! 6 . ld h,004h ;0c74 26 04 & . l0c76h: ld a,(iy+000h) ;0c76 fd 7e 00 . ~ . add a,(iy+001h) ;0c79 fd 86 01 . . . add a,(iy+002h) ;0c7c fd 86 02 . . . l0c7fh: cp 060h ;0c7f fe 60 . ` jr z,l0ccch ;0c81 28 49 ( I ld a,(ix+009h) ;0c83 dd 7e 09 . ~ . cp (iy+000h) ;0c86 fd be 00 . . . jr nz,l0ccch ;0c89 20 41 A ld a,(ix+00ah) ;0c8b dd 7e 0a . ~ . cp (iy+001h) ;0c8e fd be 01 . . . jr nz,l0ccch ;0c91 20 39 9 ld a,(ix+00bh) ;0c93 dd 7e 0b . ~ . cp (iy+002h) ;0c96 fd be 02 . . . jr nz,l0ccch ;0c99 20 31 1 call sub_0bafh ;0c9b cd af 0b . . . ld a,(0f46eh) ;0c9e 3a 6e f4 : n . cp 020h ;0ca1 fe 20 . jr z,l0ca9h ;0ca3 28 04 ( . pop hl ;0ca5 e1 . pop de ;0ca6 d1 . jr l0ce6h ;0ca7 18 3d . = l0ca9h: push ix ;0ca9 dd e5 . . pop hl ;0cab e1 . ld de,0f473h ;0cac 11 73 f4 . s . push de ;0caf d5 . inc hl ;0cb0 23 # inc de ;0cb1 13 . ld a,03ah ;0cb2 3e 3a > : ld (de),a ;0cb4 12 . inc de ;0cb5 13 . ld bc,l0006h+2 ;0cb6 01 08 00 . . . ldir ;0cb9 ed b0 . . ld a,020h ;0cbb 3e 20 > ld (de),a ;0cbd 12 . inc de ;0cbe 13 . ld bc,l0003h ;0cbf 01 03 00 . . . ldir ;0cc2 ed b0 . . pop hl ;0cc4 e1 . ld a,00eh ;0cc5 3e 0e > . call sub_0528h ;0cc7 cd 28 05 . ( . jr l0cd7h ;0cca 18 0b . . l0ccch: dec h ;0ccc 25 % jr z,l0cd7h ;0ccd 28 08 ( . inc iy ;0ccf fd 23 . # inc iy ;0cd1 fd 23 . # inc iy ;0cd3 fd 23 . # jr l0c76h ;0cd5 18 9f . . l0cd7h: ld c,012h ;0cd7 0e 12 . . call 01d3eh ;0cd9 cd 3e 1d . > . pop hl ;0cdc e1 . pop de ;0cdd d1 . inc a ;0cde 3c < jp z,l0c1ah ;0cdf ca 1a 0c . . . dec a ;0ce2 3d = jp l0c5ch ;0ce3 c3 5c 0c . \ . l0ce6h: jp l1d13h ;0ce6 c3 13 1d . . . sub_0ce9h: push af ;0ce9 f5 . ld a,(0f46fh) ;0cea 3a 6f f4 : o . ld b,a ;0ced 47 G ld a,(0f470h) ;0cee 3a 70 f4 : p . ld c,a ;0cf1 4f O ld a,(0f471h) ;0cf2 3a 71 f4 : q . ld d,a ;0cf5 57 W ld a,(0f46bh) ;0cf6 3a 6b f4 : k . ld e,a ;0cf9 5f _ ld a,(0f46ch) ;0cfa 3a 6c f4 : l . ld h,a ;0cfd 67 g ld a,(0f46dh) ;0cfe 3a 6d f4 : m . ld l,a ;0d01 6f o pop af ;0d02 f1 . or a ;0d03 b7 . jp z,l0daah ;0d04 ca aa 0d . . . cp 01eh ;0d07 fe 1e . . jr z,l0d25h ;0d09 28 1a ( . cp 01fh ;0d0b fe 1f . . jr z,l0d2eh ;0d0d 28 1f ( . cp 01ch ;0d0f fe 1c . . jr z,l0d49h ;0d11 28 36 ( 6 cp 01dh ;0d13 fe 1d . . jr z,l0d6dh ;0d15 28 56 ( V cp 011h ;0d17 fe 11 . . jr z,l0d85h ;0d19 28 6a ( j cp 010h ;0d1b fe 10 . . jr z,l0d8eh ;0d1d 28 6f ( o cp 014h ;0d1f fe 14 . . jp z,l0d97h ;0d21 ca 97 0d . . . ret ;0d24 c9 . l0d25h: inc d ;0d25 14 . dec d ;0d26 15 . jp z,l0daah ;0d27 ca aa 0d . . . dec d ;0d2a 15 . jp l0daah ;0d2b c3 aa 0d . . . l0d2eh: ld a,d ;0d2e 7a z cp 005h ;0d2f fe 05 . . jp z,l0daah ;0d31 ca aa 0d . . . ld a,b ;0d34 78 x cp e ;0d35 bb . jr nz,l0d45h ;0d36 20 0d . ld a,l ;0d38 7d } sub d ;0d39 92 . jp z,l0daah ;0d3a ca aa 0d . . . dec a ;0d3d 3d = jr nz,l0d45h ;0d3e 20 05 . ld a,h ;0d40 7c | cp c ;0d41 b9 . jp c,l0daah ;0d42 da aa 0d . . . l0d45h: inc d ;0d45 14 . jp l0daah ;0d46 c3 aa 0d . . . l0d49h: ld a,c ;0d49 79 y add a,d ;0d4a 82 . cp 008h ;0d4b fe 08 . . jr z,l0d68h ;0d4d 28 19 ( . ld a,b ;0d4f 78 x cp e ;0d50 bb . jr nz,l0d5bh ;0d51 20 08 . ld a,c ;0d53 79 y cp h ;0d54 bc . jr nz,l0d5bh ;0d55 20 04 . ld a,d ;0d57 7a z cp l ;0d58 bd . jr z,l0d68h ;0d59 28 0d ( . l0d5bh: ld a,c ;0d5b 79 y cp 003h ;0d5c fe 03 . . jr nz,l0d65h ;0d5e 20 05 . xor a ;0d60 af . ld c,a ;0d61 4f O inc d ;0d62 14 . jr l0daah ;0d63 18 45 . E l0d65h: inc c ;0d65 0c . jr l0daah ;0d66 18 42 . B l0d68h: xor a ;0d68 af . ld c,a ;0d69 4f O ld d,a ;0d6a 57 W jr l0daah ;0d6b 18 3d . = l0d6dh: inc c ;0d6d 0c . dec c ;0d6e 0d . jr nz,l0d82h ;0d6f 20 11 . ld c,003h ;0d71 0e 03 . . dec d ;0d73 15 . ld a,d ;0d74 7a z inc a ;0d75 3c < jr nz,l0daah ;0d76 20 32 2 ld d,005h ;0d78 16 05 . . ld a,b ;0d7a 78 x cp e ;0d7b bb . jr nz,l0daah ;0d7c 20 2c , ld c,h ;0d7e 4c L ld d,l ;0d7f 55 U jr l0daah ;0d80 18 28 . ( l0d82h: dec c ;0d82 0d . jr l0daah ;0d83 18 25 . % l0d85h: ld a,b ;0d85 78 x cp e ;0d86 bb . jr z,l0daah ;0d87 28 21 ( ! inc b ;0d89 04 . ld c,011h ;0d8a 0e 11 . . jr l0da4h ;0d8c 18 16 . . l0d8eh: inc b ;0d8e 04 . dec b ;0d8f 05 . jr z,l0daah ;0d90 28 18 ( . dec b ;0d92 05 . ld c,010h ;0d93 0e 10 . . jr l0da4h ;0d95 18 0d . . l0d97h: inc b ;0d97 04 . dec b ;0d98 05 . jr z,l0daah ;0d99 28 0f ( . ld b,000h ;0d9b 06 00 . . ld c,01bh ;0d9d 0e 1b . . call sub_0533h ;0d9f cd 33 05 . 3 . ld c,0d4h ;0da2 0e d4 . . l0da4h: call sub_0533h ;0da4 cd 33 05 . 3 . xor a ;0da7 af . ld c,a ;0da8 4f O ld d,a ;0da9 57 W l0daah: ld a,b ;0daa 78 x ld (0f46fh),a ;0dab 32 6f f4 2 o . ld a,c ;0dae 79 y ld (0f470h),a ;0daf 32 70 f4 2 p . ld a,d ;0db2 7a z ld (0f471h),a ;0db3 32 71 f4 2 q . ld a,b ;0db6 78 x add a,d ;0db7 82 . jr nz,l0dc6h ;0db8 20 0c . ld a,c ;0dba 79 y or a ;0dbb b7 . jr nz,l0dc6h ;0dbc 20 08 . ld a,(0f035h) ;0dbe 3a 35 f0 : 5 . or a ;0dc1 b7 . ld a,001h ;0dc2 3e 01 > . jr nz,l0dc8h ;0dc4 20 02 . l0dc6h: ld a,002h ;0dc6 3e 02 > . l0dc8h: ld (0f4b1h),a ;0dc8 32 b1 f4 2 . . ld a,0fah ;0dcb 3e fa > . inc b ;0dcd 04 . l0dceh: add a,008h ;0dce c6 08 . . djnz l0dceh ;0dd0 10 fc . . dec a ;0dd2 3d = ld (0f472h),a ;0dd3 32 72 f4 2 r . inc a ;0dd6 3c < add a,d ;0dd7 82 . ld (0f4b3h),a ;0dd8 32 b3 f4 2 . . xor a ;0ddb af . inc c ;0ddc 0c . l0dddh: add a,014h ;0ddd c6 14 . . dec c ;0ddf 0d . jr nz,l0dddh ;0de0 20 fb . ld (0f4b2h),a ;0de2 32 b2 f4 2 . . ld hl,0f473h ;0de5 21 73 f4 ! s . ld a,(0f470h) ;0de8 3a 70 f4 : p . add a,a ;0deb 87 . add a,a ;0dec 87 . ld c,a ;0ded 4f O add a,a ;0dee 87 . add a,a ;0def 87 . add a,c ;0df0 81 . ld d,a ;0df1 57 W ld a,(0f471h) ;0df2 3a 71 f4 : q . add a,00ah ;0df5 c6 0a . . ld e,a ;0df7 5f _ push de ;0df8 d5 . ld c,020h ;0df9 0e 20 . ld (hl),014h ;0dfb 36 14 6 . inc hl ;0dfd 23 # ld b,014h ;0dfe 06 14 . . l0e00h: ld (hl),d ;0e00 72 r inc d ;0e01 14 . inc hl ;0e02 23 # ld (hl),e ;0e03 73 s inc hl ;0e04 23 # ld (hl),c ;0e05 71 q l0e06h: inc hl ;0e06 23 # djnz l0e00h ;0e07 10 f7 . . di ;0e09 f3 . xor a ;0e0a af . call sub_1043h ;0e0b cd 43 10 . C . l0e0eh: ld c,031h ;0e0e 0e 31 . 1 call sub_4488h ;0e10 cd 88 44 . . D ld bc,l003ch+1 ;0e13 01 3d 00 . = . ld de,0f473h ;0e16 11 73 f4 . s . call sub_44bbh ;0e19 cd bb 44 . . D call sub_44b2h ;0e1c cd b2 44 . . D ld a,001h ;0e1f 3e 01 > . call sub_1043h ;0e21 cd 43 10 . C . ei ;0e24 fb . ld de,00815h ;0e25 11 15 08 . . . call sub_0fd6h ;0e28 cd d6 0f . . . di ;0e2b f3 . ld c,01ah ;0e2c 0e 1a . . call sub_4488h ;0e2e cd 88 44 . . D ld c,0ffh ;0e31 0e ff . . call sub_44ach ;0e33 cd ac 44 . . D ld c,020h ;0e36 0e 20 . call sub_44ach ;0e38 cd ac 44 . . D ld c,009h ;0e3b 0e 09 . . call sub_44ach ;0e3d cd ac 44 . . D ld c,001h ;0e40 0e 01 . . call sub_44ach ;0e42 cd ac 44 . . D call sub_44b2h ;0e45 cd b2 44 . . D ei ;0e48 fb . ld hl,0f473h ;0e49 21 73 f4 ! s . ld b,03ch ;0e4c 06 3c . < call sub_17ffh ;0e4e cd ff 17 . . . di ;0e51 f3 . ld c,034h ;0e52 0e 34 . 4 call sub_4488h ;0e54 cd 88 44 . . D ld hl,0f473h ;0e57 21 73 f4 ! s . pop de ;0e5a d1 . push hl ;0e5b e5 . ld (hl),d ;0e5c 72 r inc hl ;0e5d 23 # ld (hl),e ;0e5e 73 s inc hl ;0e5f 23 # ld (hl),00eh ;0e60 36 0e 6 . pop de ;0e62 d1 . ld bc,l0003h ;0e63 01 03 00 . . . call sub_44bbh ;0e66 cd bb 44 . . D call sub_44b2h ;0e69 cd b2 44 . . D ld bc,l000ch+2 ;0e6c 01 0e 00 . . . ld de,0f473h ;0e6f 11 73 f4 . s . call sub_44d2h ;0e72 cd d2 44 . . D ei ;0e75 fb . ld ix,0f473h ;0e76 dd 21 73 f4 . ! s . ld iy,0f036h ;0e7a fd 21 36 f0 . ! 6 . ld hl,0f042h ;0e7e 21 42 f0 ! B . ld a,(0f4b1h) ;0e81 3a b1 f4 : . . cp 002h ;0e84 fe 02 . . jr nz,l0eb1h ;0e86 20 29 ) ld de,l0009h+1 ;0e88 11 0a 00 . . . ld c,a ;0e8b 4f O ld b,004h ;0e8c 06 04 . . l0e8eh: ld a,(ix+00bh) ;0e8e dd 7e 0b . ~ . cp (iy+000h) ;0e91 fd be 00 . . . jr nz,l0ea7h ;0e94 20 11 . ld a,(ix+00ch) ;0e96 dd 7e 0c . ~ . cp (iy+001h) ;0e99 fd be 01 . . . jr nz,l0ea7h ;0e9c 20 09 . ld a,(ix+00dh) ;0e9e dd 7e 0d . ~ . cp (iy+002h) ;0ea1 fd be 02 . . . ld a,c ;0ea4 79 y jr z,l0eb1h ;0ea5 28 0a ( . l0ea7h: inc c ;0ea7 0c . inc iy ;0ea8 fd 23 . # inc iy ;0eaa fd 23 . # inc iy ;0eac fd 23 . # add hl,de ;0eae 19 . djnz l0e8eh ;0eaf 10 dd . . l0eb1h: ld (0f4b1h),a ;0eb1 32 b1 f4 2 . . dec a ;0eb4 3d = jr nz,l0ec5h ;0eb5 20 0e . ld b,00eh ;0eb7 06 0e . . ld a,020h ;0eb9 3e 20 > l0ebbh: ld (ix+000h),a ;0ebb dd 77 00 . w . inc ix ;0ebe dd 23 . # djnz l0ebbh ;0ec0 10 f9 . . xor a ;0ec2 af . jr l0f12h ;0ec3 18 4d . M l0ec5h: ld b,a ;0ec5 47 G ld a,(0f4d5h) ;0ec6 3a d5 f4 : . . cp b ;0ec9 b8 . ld a,b ;0eca 78 x jr nz,l0edch ;0ecb 20 0f . ld a,020h ;0ecd 3e 20 > ld (ix+00bh),a ;0ecf dd 77 0b . w . ld (ix+00ch),a ;0ed2 dd 77 0c . w . ld (ix+00dh),a ;0ed5 dd 77 0d . w . ld a,00bh ;0ed8 3e 0b > . jr l0f12h ;0eda 18 36 . 6 l0edch: push hl ;0edc e5 . ld a,02eh ;0edd 3e 2e > . ld (0f47dh),a ;0edf 32 7d f4 2 } . ld hl,0f473h ;0ee2 21 73 f4 ! s . push hl ;0ee5 e5 . pop de ;0ee6 d1 . ld b,00eh ;0ee7 06 0e . . l0ee9h: ld a,(hl) ;0ee9 7e ~ cp 020h ;0eea fe 20 . jr z,l0ef0h ;0eec 28 02 ( . ld (de),a ;0eee 12 . inc de ;0eef 13 . l0ef0h: inc hl ;0ef0 23 # djnz l0ee9h ;0ef1 10 f6 . . push de ;0ef3 d5 . pop hl ;0ef4 e1 . ld b,00eh ;0ef5 06 0e . . call sub_17ffh ;0ef7 cd ff 17 . . . ld hl,0f480h ;0efa 21 80 f4 ! . . ld de,0f48bh ;0efd 11 8b f4 . . . l0f00h: ld bc,l000ch+2 ;0f00 01 0e 00 . . . lddr ;0f03 ed b8 . . ld a,020h ;0f05 3e 20 > ld (de),a ;0f07 12 . inc hl ;0f08 23 # sub_0f09h: ex de,hl ;0f09 eb . pop hl ;0f0a e1 . ld bc,l0009h+1 ;0f0b 01 0a 00 . . . l0f0eh: ldir ;0f0e ed b0 . . ld a,01ah ;0f10 3e 1a > . l0f12h: ld (0f4b0h),a ;0f12 32 b0 f4 2 . . push af ;0f15 f5 . ld b,000h ;0f16 06 00 . . inc a ;0f18 3c < ld d,a ;0f19 57 W ld e,000h ;0f1a 1e 00 . . ld c,009h ;0f1c 0e 09 . . ld ix,0f473h ;0f1e dd 21 73 f4 . ! s . xor a ;0f22 af . call sub_0f33h ;0f23 cd 33 0f . 3 . pop af ;0f26 f1 . ld e,a ;0f27 5f _ call sub_0fb6h ;0f28 cd b6 0f . . . di ;0f2b f3 . ld a,003h ;0f2c 3e 03 > . call sub_1043h ;0f2e cd 43 10 . C . ei ;0f31 fb . ret ;0f32 c9 . sub_0f33h: push bc ;0f33 c5 . push ix ;0f34 dd e5 . . pop hl ;0f36 e1 . push de ;0f37 d5 . ld d,000h ;0f38 16 00 . . add hl,de ;0f3a 19 . pop de ;0f3b d1 . or a ;0f3c b7 . jr z,l0f85h ;0f3d 28 46 ( F cp 008h ;0f3f fe 08 . . jr z,l0f5eh ;0f41 28 1b ( . cp 005h ;0f43 fe 05 . . jr z,l0f6dh ;0f45 28 26 ( & cp 01ch ;0f47 fe 1c . . jr z,l0f7dh ;0f49 28 32 ( 2 cp 01dh ;0f4b fe 1d . . jr z,l0f76h ;0f4d 28 27 ( ' cp 020h ;0f4f fe 20 . jr nc,l0f55h ;0f51 30 02 0 . pop bc ;0f53 c1 . ret ;0f54 c9 . l0f55h: ld (hl),a ;0f55 77 w inc e ;0f56 1c . ld a,d ;0f57 7a z sub e ;0f58 93 . jr nz,l0f85h ;0f59 20 2a * dec e ;0f5b 1d . jr l0f85h ;0f5c 18 27 . ' l0f5eh: inc e ;0f5e 1c . dec e ;0f5f 1d . jr z,l0f85h ;0f60 28 23 ( # dec e ;0f62 1d . ld a,d ;0f63 7a z sub e ;0f64 93 . ld b,a ;0f65 47 G dec b ;0f66 05 . dec hl ;0f67 2b + call sub_0fa4h ;0f68 cd a4 0f . . . jr l0f85h ;0f6b 18 18 . . l0f6dh: ld a,d ;0f6d 7a z sub e ;0f6e 93 . ld b,a ;0f6f 47 G inc b ;0f70 04 . call sub_17ffh ;0f71 cd ff 17 . . . jr l0f85h ;0f74 18 0f . . l0f76h: inc e ;0f76 1c . dec e ;0f77 1d . jr z,l0f85h ;0f78 28 0b ( . dec e ;0f7a 1d . jr l0f85h ;0f7b 18 08 . . l0f7dh: inc e ;0f7d 1c . ld a,d ;0f7e 7a z sub e ;0f7f 93 . jr nz,l0f85h ;0f80 20 03 . dec e ;0f82 1d . jr l0f85h ;0f83 18 00 . . l0f85h: pop bc ;0f85 c1 . push bc ;0f86 c5 . push de ;0f87 d5 . inc e ;0f88 1c . dec e ;0f89 1d . jr z,l0f8dh ;0f8a 28 01 ( . dec e ;0f8c 1d . l0f8dh: push ix ;0f8d dd e5 . . pop hl ;0f8f e1 . push de ;0f90 d5 . ld d,000h ;0f91 16 00 . . add hl,de ;0f93 19 . pop de ;0f94 d1 . ld a,d ;0f95 7a z sub e ;0f96 93 . push af ;0f97 f5 . ld d,c ;0f98 51 Q ld a,b ;0f99 78 x add a,e ;0f9a 83 . ld e,a ;0f9b 5f _ pop af ;0f9c f1 . ld b,a ;0f9d 47 G call sub_0fe8h ;0f9e cd e8 0f . . . pop de ;0fa1 d1 . pop bc ;0fa2 c1 . ret ;0fa3 c9 . sub_0fa4h: push de ;0fa4 d5 . push hl ;0fa5 e5 . pop de ;0fa6 d1 . inc hl ;0fa7 23 # inc b ;0fa8 04 . dec b ;0fa9 05 . jr z,l0fb1h ;0faa 28 05 ( . ld c,b ;0fac 48 H ld b,000h ;0fad 06 00 . . ldir ;0faf ed b0 . . l0fb1h: dec hl ;0fb1 2b + ld (hl),020h ;0fb2 36 20 6 pop de ;0fb4 d1 . ret ;0fb5 c9 . sub_0fb6h: ld a,(0f472h) ;0fb6 3a 72 f4 : r . ld d,a ;0fb9 57 W ld a,b ;0fba 78 x add a,e ;0fbb 83 . ld e,a ;0fbc 5f _ sub_0fbdh: push de ;0fbd d5 . ld c,01bh ;0fbe 0e 1b . . call sub_0533h ;0fc0 cd 33 05 . 3 . ld c,03dh ;0fc3 0e 3d . = call sub_0533h ;0fc5 cd 33 05 . 3 . pop de ;0fc8 d1 . push de ;0fc9 d5 . ld a,d ;0fca 7a z call sub_0fd0h ;0fcb cd d0 0f . . . pop de ;0fce d1 . ld a,e ;0fcf 7b { sub_0fd0h: add a,020h ;0fd0 c6 20 . ld c,a ;0fd2 4f O jp sub_0533h ;0fd3 c3 33 05 . 3 . sub_0fd6h: push de ;0fd6 d5 . ld hl,0f4bdh ;0fd7 21 bd f4 ! . . call sub_104dh ;0fda cd 4d 10 . M . ld a,020h ;0fdd 3e 20 > ld (0f4c5h),a ;0fdf 32 c5 f4 2 . . ld (0f4cbh),a ;0fe2 32 cb f4 2 . . pop de ;0fe5 d1 . ld b,017h ;0fe6 06 17 . . sub_0fe8h: inc b ;0fe8 04 . dec b ;0fe9 05 . ret z ;0fea c8 . push bc ;0feb c5 . push de ;0fec d5 . push de ;0fed d5 . ld ix,080b0h ;0fee dd 21 b0 80 . ! . . pop bc ;0ff2 c1 . inc b ;0ff3 04 . ld de,00050h ;0ff4 11 50 00 . P . l0ff7h: add ix,de ;0ff7 dd 19 . . djnz l0ff7h ;0ff9 10 fc . . pop de ;0ffb d1 . ld d,000h ;0ffc 16 00 . . add ix,de ;0ffe dd 19 . . push ix ;1000 dd e5 . . pop de ;1002 d1 . pop bc ;1003 c1 . di ;1004 f3 . l1005h: push bc ;1005 c5 . l1006h: push de ;1006 d5 . push hl ;1007 e5 . ld c,001h ;1008 0e 01 . . call sub_4488h ;100a cd 88 44 . . D ld c,d ;100d 4a J l100eh: call sub_44ach ;100e cd ac 44 . . D ld c,e ;1011 4b K call sub_44ach ;1012 cd ac 44 . . D ld a,(hl) ;1015 7e ~ call sub_5651h ;1016 cd 51 56 . Q V l1019h: ld c,a ;1019 4f O call sub_44ach ;101a cd ac 44 . . D ld c,000h ;101d 0e 00 . . call sub_44ach ;101f cd ac 44 . . D call sub_44b2h ;1022 cd b2 44 . . D pop hl ;1025 e1 . pop de ;1026 d1 . pop bc ;1027 c1 . inc hl ;1028 23 # inc de ;1029 13 . djnz l1005h ;102a 10 d9 . . ei ;102c fb . ret ;102d c9 . ld hl,l118fh ;102e 21 8f 11 ! . . jr l1036h ;1031 18 03 . . ld hl,l1192h ;1033 21 92 11 ! . . l1036h: jp sub_051bh ;1036 c3 1b 05 . . . sub_1039h: call sub_113eh ;1039 cd 3e 11 . > . or a ;103c b7 . ret z ;103d c8 . call sub_1146h ;103e cd 46 11 . F . jr sub_1039h ;1041 18 f6 . . sub_1043h: ld (0f335h),a ;1043 32 35 f3 2 5 . sub_1046h: ld d,a ;1046 57 W ld c,019h ;1047 0e 19 . . call sub_4535h ;1049 cd 35 45 . 5 E ret ;104c c9 . sub_104dh: push hl ;104d e5 . push hl ;104e e5 . push hl ;104f e5 . ex de,hl ;1050 eb . ld c,000h ;1051 0e 00 . . call sub_2c16h ;1053 cd 16 2c . . , pop hl ;1056 e1 . ld bc,l0006h ;1057 01 06 00 . . . add hl,bc ;105a 09 . ld b,(hl) ;105b 46 F pop hl ;105c e1 . push bc ;105d c5 . push hl ;105e e5 . ld a,(hl) ;105f 7e ~ inc hl ;1060 23 # ld b,(hl) ;1061 46 F inc hl ;1062 23 # ld c,(hl) ;1063 4e N ld (hl),a ;1064 77 w dec hl ;1065 2b + ld (hl),c ;1066 71 q dec hl ;1067 2b + ld (hl),b ;1068 70 p call sub_10e4h ;1069 cd e4 10 . . . ld bc,l0009h+2 ;106c 01 0b 00 . . . add hl,bc ;106f 09 . push hl ;1070 e5 . pop de ;1071 d1 . add hl,bc ;1072 09 . ex de,hl ;1073 eb . call sub_10c8h ;1074 cd c8 10 . . . ld b,006h ;1077 06 06 . . l1079h: dec de ;1079 1b . djnz l1079h ;107a 10 fd . . call sub_10c8h ;107c cd c8 10 . . . pop hl ;107f e1 . ld bc,l0009h+1 ;1080 01 0a 00 . . . add hl,bc ;1083 09 . ex de,hl ;1084 eb . ld hl,01195h ;1085 21 95 11 ! . . pop bc ;1088 c1 . inc b ;1089 04 . ld a,b ;108a 78 x cp 008h ;108b fe 08 . . jr c,l1094h ;108d 38 05 8 . ld hl,l1169h ;108f 21 69 11 ! i . jr l1099h ;1092 18 05 . . l1094h: inc hl ;1094 23 # inc hl ;1095 23 # inc hl ;1096 23 # djnz l1094h ;1097 10 fb . . l1099h: ld bc,l0003h ;1099 01 03 00 . . . ldir ;109c ed b0 . . pop hl ;109e e1 . push hl ;109f e5 . pop ix ;10a0 dd e1 . . ld a,0ffh ;10a2 3e ff > . ld (ix+008h),a ;10a4 dd 77 08 . w . ld (ix+00eh),a ;10a7 dd 77 0e . w . ld (ix+017h),a ;10aa dd 77 17 . w . ld a,02fh ;10ad 3e 2f > / ld (ix+002h),a ;10af dd 77 02 . w . ld (ix+005h),a ;10b2 dd 77 05 . w . ld a,028h ;10b5 3e 28 > ( ld (ix+009h),a ;10b7 dd 77 09 . w . ld a,029h ;10ba 3e 29 > ) ld (ix+00dh),a ;10bc dd 77 0d . w . ld a,03ah ;10bf 3e 3a > : ld (ix+011h),a ;10c1 dd 77 11 . w . ld (ix+014h),a ;10c4 dd 77 14 . w . ret ;10c7 c9 . sub_10c8h: ld a,003h ;10c8 3e 03 > . l10cah: ld bc,l0000h+2 ;10ca 01 02 00 . . . lddr ;10cd ed b8 . . dec de ;10cf 1b . dec a ;10d0 3d = jr nz,l10cah ;10d1 20 f7 . ret ;10d3 c9 . sub_10d4h: ld a,(hl) ;10d4 7e ~ cp 061h ;10d5 fe 61 . a jr c,l10e0h ;10d7 38 07 8 . cp 07bh ;10d9 fe 7b . { jr nc,l10e0h ;10db 30 03 0 . sub 020h ;10dd d6 20 . ld (hl),a ;10df 77 w l10e0h: inc hl ;10e0 23 # djnz sub_10d4h ;10e1 10 f1 . . ret ;10e3 c9 . sub_10e4h: push hl ;10e4 e5 . ld bc,l0003h+2 ;10e5 01 05 00 . . . add hl,bc ;10e8 09 . push hl ;10e9 e5 . pop de ;10ea d1 . ld bc,l0006h ;10eb 01 06 00 . . . add hl,bc ;10ee 09 . ex de,hl ;10ef eb . ld b,006h ;10f0 06 06 . . l10f2h: ld a,(hl) ;10f2 7e ~ push af ;10f3 f5 . call sub_1104h ;10f4 cd 04 11 . . . pop af ;10f7 f1 . rrca ;10f8 0f . rrca ;10f9 0f . rrca ;10fa 0f . rrca ;10fb 0f . call sub_1104h ;10fc cd 04 11 . . . dec hl ;10ff 2b + djnz l10f2h ;1100 10 f0 . . pop hl ;1102 e1 . ret ;1103 c9 . sub_1104h: and 00fh ;1104 e6 0f . . l1106h: cp 00fh ;1106 fe 0f . . jr z,l110eh ;1108 28 04 ( . add a,030h ;110a c6 30 . 0 jr l1110h ;110c 18 02 . . l110eh: ld a,02ah ;110e 3e 2a > * l1110h: ld (de),a ;1110 12 . dec de ;1111 1b . ret ;1112 c9 . sub_1113h: push hl ;1113 e5 . push hl ;1114 e5 . pop ix ;1115 dd e1 . . ld b,006h ;1117 06 06 . . l1119h: ld a,(hl) ;1119 7e ~ inc hl ;111a 23 # ld d,(hl) ;111b 56 V inc hl ;111c 23 # cp 02ah ;111d fe 2a . * jp nz,l1124h ;111f c2 24 11 . $ . ld a,00fh ;1122 3e 0f > . l1124h: rla ;1124 17 . rla ;1125 17 . rla ;1126 17 . rla ;1127 17 . and 0f0h ;1128 e6 f0 . . ld c,a ;112a 4f O ld a,d ;112b 7a z cp 02ah ;112c fe 2a . * jr nz,l1132h ;112e 20 02 . ld a,00fh ;1130 3e 0f > . l1132h: and 00fh ;1132 e6 0f . . or c ;1134 b1 . ld (ix+000h),a ;1135 dd 77 00 . w . inc ix ;1138 dd 23 . # djnz l1119h ;113a 10 dd . . pop hl ;113c e1 . ret ;113d c9 . sub_113eh: call sub_2b48h ;113e cd 48 2b . H + call sub_35d8h ;1141 cd d8 35 . . 5 jr l114ch ;1144 18 06 . . sub_1146h: call sub_2b48h ;1146 cd 48 2b . H + call sub_35feh ;1149 cd fe 35 . . 5 l114ch: jp sub_2b68h ;114c c3 68 2b . h + l114fh: dec de ;114f 1b . ret nc ;1150 d0 . nop ;1151 00 . jr z,l115ch ;1152 28 08 ( . dec de ;1154 1b . pop de ;1155 d1 . nop ;1156 00 . dec de ;1157 1b . out (001h),a ;1158 d3 01 . . inc c ;115a 0c . dec de ;115b 1b . l115ch: sub 002h ;115c d6 02 . . dec de ;115e 1b . sub h ;115f 94 . ex af,af' ;1160 08 . dec de ;1161 1b . sub l ;1162 95 . ld bc,l1bffh ;1163 01 ff 1b . . . sub 000h ;1166 d6 00 . . rst 38h ;1168 ff . ; ? SYSCRN ? l1169h: ld hl,(l2a2ah) ;1169 2a 2a 2a * * * jr nz,$+79 ;116c 20 4d M ; MENU screen *** ld b,l ;116e 45 E ld c,(hl) ;116f 4e N ld d,l ;1170 55 U jr nz,l11e6h ;1171 20 73 s ld h,e ;1173 63 c ld (hl),d ;1174 72 r ld h,l ;1175 65 e ld h,l ;1176 65 e ld l,(hl) ;1177 6e n jr nz,l11a4h ;1178 20 2a * ld hl,(0ff2ah) ;117a 2a 2a ff * * . l117dh: ld d,b ;117d 50 P ; PAGE ld b,c ;117e 41 A ld b,a ;117f 47 G ld b,l ;1180 45 E jr nz,$+1 ;1181 20 ff . l1183h: jr nz,l11adh ;1183 20 28 ( ; (resident) ld (hl),d ;1185 72 r ld h,l ;1186 65 e ld (hl),e ;1187 73 s ld l,c ;1188 69 i ld h,h ;1189 64 d ld h,l ;118a 65 e ld l,(hl) ;118b 6e n ld (hl),h ;118c 74 t add hl,hl ;118d 29 ) rst 38h ;118e ff . l118fh: dec de ;118f 1b . inc sp ;1190 33 3 rst 38h ;1191 ff . l1192h: dec de ;1192 1b . ld (l1bffh),a ;1193 32 ff 1b 2 . . or 0ffh ;1196 f6 ff . . ld d,e ;1198 53 S ; SUN ld d,l ;1199 55 U ld c,(hl) ;119a 4e N ld c,l ;119b 4d M ; MON ld c,a ;119c 4f O ld c,(hl) ;119d 4e N ld d,h ;119e 54 T ; TUE ld d,l ;119f 55 U ld b,l ;11a0 45 E ld d,a ;11a1 57 W ; WED ld b,l ;11a2 45 E ld b,h ;11a3 44 D l11a4h: ld d,h ;11a4 54 T ; THU ld c,b ;11a5 48 H ld d,l ;11a6 55 U ld b,(hl) ;11a7 46 F ; FRI ld d,d ;11a8 52 R ld c,c ;11a9 49 I ld d,e ;11aa 53 S ; SAT ld b,c ;11ab 41 A ld d,h ;11ac 54 T l11adh: rst 38h ;11ad ff . rst 38h ;11ae ff . rst 38h ;11af ff . l11b0h: ld hl,0f0b8h ;11b0 21 b8 f0 ! . . ld a,(hl) ;11b3 7e ~ and 027h ;11b4 e6 27 . ' ret nz ;11b6 c0 . set 2,(hl) ;11b7 cb d6 . . ld hl,0f0d9h ;11b9 21 d9 f0 ! . . set 4,(hl) ;11bc cb e6 . . ld hl,0f0dbh ;11be 21 db f0 ! . . set 4,(hl) ;11c1 cb e6 . . l11c3h: ld a,(0f2e0h) ;11c3 3a e0 f2 : . . ld (0f78fh),a ;11c6 32 8f f7 2 . . ld a,(0f07bh) ;11c9 3a 7b f0 : { . ld (0f07ch),a ;11cc 32 7c f0 2 | . ld a,(0f108h) ;11cf 3a 08 f1 : . . ld (0f4ech),a ;11d2 32 ec f4 2 . . ld a,0ffh ;11d5 3e ff > . ld (0f108h),a ;11d7 32 08 f1 2 . . ld a,008h ;11da 3e 08 > . ld (0f2cfh),a ;11dc 32 cf f2 2 . . call sub_1751h ;11df cd 51 17 . Q . xor a ;11e2 af . call sub_1046h ;11e3 cd 46 10 . F . l11e6h: call sub_5b4fh ;11e6 cd 4f 5b . O [ l11e9h: call 07092h ;11e9 cd 92 70 . . p ld hl,l1953h ;11ec 21 53 19 ! S . call sub_051bh ;11ef cd 1b 05 . . . call sub_12f7h ;11f2 cd f7 12 . . . call sub_130dh ;11f5 cd 0d 13 . . . call sub_13c8h ;11f8 cd c8 13 . . . call sub_136ch ;11fb cd 6c 13 . l . call sub_13d3h ;11fe cd d3 13 . . . call sub_13f1h ;1201 cd f1 13 . . . call sub_1381h ;1204 cd 81 13 . . . call sub_708fh ;1207 cd 8f 70 . . p l120ah: ld hl,l1a07h ;120a 21 07 1a ! . . call sub_17d1h ;120d cd d1 17 . . . ld hl,l1a2bh ;1210 21 2b 1a ! + . call sub_051bh ;1213 cd 1b 05 . . . ld hl,l1a4bh ;1216 21 4b 1a ! K . call sub_17aeh ;1219 cd ae 17 . . . ld a,(0f029h) ;121c 3a 29 f0 : ) . or a ;121f b7 . jr z,l122bh ;1220 28 09 ( . ld de,l060eh ;1222 11 0e 06 . . . ld hl,l1af6h ;1225 21 f6 1a ! . . call sub_051bh ;1228 cd 1b 05 . . . l122bh: call sub_141ah ;122b cd 1a 14 . . . ld hl,l1c0ch ;122e 21 0c 1c ! . . call sub_051bh ;1231 cd 1b 05 . . . l1234h: ld hl,0f0dch ;1234 21 dc f0 ! . . bit 4,(hl) ;1237 cb 66 . f jr z,l1247h ;1239 28 0c ( . res 4,(hl) ;123b cb a6 . . call sub_0940h ;123d cd 40 09 . @ . ld hl,0f0dah ;1240 21 da f0 ! . . res 5,(hl) ;1243 cb ae . . jr l11e9h ;1245 18 a2 . . l1247h: ld hl,0f0dah ;1247 21 da f0 ! . . bit 4,(hl) ;124a cb 66 . f jr nz,$+109 ;124c 20 6b k call sub_1831h ;124e cd 31 18 . 1 . jr c,l120ah ;1251 38 b7 8 . cp 01bh ;1253 fe 1b . . jr z,$+100 ;1255 28 62 ( b inc c ;1257 0c . jr z,l127ah ;1258 28 20 ( push af ;125a f5 . ld a,(0f10bh) ;125b 3a 0b f1 : . . or a ;125e b7 . call nz,sub_173dh ;125f c4 3d 17 . = . pop af ;1262 f1 . sub 031h ;1263 d6 31 . 1 jp z,l142fh ;1265 ca 2f 14 . / . dec a ;1268 3d = jp z,l147dh ;1269 ca 7d 14 . } . dec a ;126c 3d = jp z,l155fh ;126d ca 5f 15 . _ . dec a ;1270 3d = jp z,l15b6h ;1271 ca b6 15 . . . dec a ;1274 3d = jp z,l1686h ;1275 ca 86 16 . . . jr l1234h ;1278 18 ba . . l127ah: cp 0e9h ;127a fe e9 . . jr z,l1234h ;127c 28 b6 ( . ld b,a ;127e 47 G ld a,(0f361h) ;127f 3a 61 f3 : a . or a ;1282 b7 . jr nz,l1234h ;1283 20 af . ld a,(0f2ddh) ;1285 3a dd f2 : . . or a ;1288 b7 . jr nz,l1292h ;1289 20 07 . ld a,b ;128b 78 x cp 0e5h ;128c fe e5 . . jr z,l1234h ;128e 28 a4 ( . jr l1297h ;1290 18 05 . . l1292h: ld a,b ;1292 78 x cp 0e5h ;1293 fe e5 . . jr nz,l1234h ;1295 20 9d . l1297h: push bc ;1297 c5 . call sub_173dh ;1298 cd 3d 17 . = . pop af ;129b f1 . and 00fh ;129c e6 0f . . ld hl,l12a5h ;129e 21 a5 12 ! . . call sub_6042h ;12a1 cd 42 60 . B ` jp (hl) ;12a4 e9 . l12a5h: sub 016h ;12a5 d6 16 . . jp c,0e916h ;12a7 da 16 e9 . . . ld d,0eeh ;12aa 16 ee . . ld d,0f5h ;12ac 16 f5 . . ld d,0fah ;12ae 16 fa . . ld d,01eh ;12b0 16 1e . . rla ;12b2 17 . add hl,hl ;12b3 29 ) rla ;12b4 17 . scf ;12b5 37 7 rla ;12b6 17 . ld a,(0cd17h) ;12b7 3a 17 cd : . . dec a ;12ba 3d = rla ;12bb 17 . call sub_5bb5h ;12bc cd b5 5b . . [ ld a,(0f335h) ;12bf 3a 35 f3 : 5 . call sub_1046h ;12c2 cd 46 10 . F . ld a,(0f4ech) ;12c5 3a ec f4 : . . ld (0f108h),a ;12c8 32 08 f1 2 . . call sub_1768h ;12cb cd 68 17 . h . call sub_3610h ;12ce cd 10 36 . . 6 ld hl,0f0dch ;12d1 21 dc f0 ! . . res 4,(hl) ;12d4 cb a6 . . ld hl,0f0dbh ;12d6 21 db f0 ! . . res 4,(hl) ;12d9 cb a6 . . ld hl,0f0b8h ;12db 21 b8 f0 ! . . res 2,(hl) ;12de cb 96 . . ld hl,0f0d9h ;12e0 21 d9 f0 ! . . res 4,(hl) ;12e3 cb a6 . . ld a,(0f0dah) ;12e5 3a da f0 : . . or a ;12e8 b7 . jr z,l12f6h ;12e9 28 0b ( . res 4,a ;12eb cb a7 . . ld (0f0dah),a ;12ed 32 da f0 2 . . or a ;12f0 b7 . jr nz,l12f6h ;12f1 20 03 . call sub_2e47h ;12f3 cd 47 2e . G . l12f6h: ret ;12f6 c9 . sub_12f7h: ld de,l0045h ;12f7 11 45 00 . E . call sub_0fbdh ;12fa cd bd 0f . . . ld hl,l1af6h ;12fd 21 f6 1a ! . . ld a,(0f01dh) ;1300 3a 1d f0 : . . or a ;1303 b7 . jr z,l1309h ;1304 28 03 ( . ld hl,l1ad7h ;1306 21 d7 1a ! . . l1309h: ld a,00ah ;1309 3e 0a > . jr l137dh ;130b 18 70 . p sub_130dh: ld de,l0100h ;130d 11 00 01 . . . call sub_0fbdh ;1310 cd bd 0f . . . call sub_1888h ;1313 cd 88 18 . . . ld a,(0f43dh) ;1316 3a 3d f4 : = . or a ;1319 b7 . jr nz,l1322h ;131a 20 06 . ld c,005h ;131c 0e 05 . . call sub_0533h ;131e cd 33 05 . 3 . ret ;1321 c9 . l1322h: push af ;1322 f5 . push hl ;1323 e5 . push af ;1324 f5 . call sub_135fh ;1325 cd 5f 13 . _ . ld hl,l1b60h ;1328 21 60 1b ! ` . call sub_051bh ;132b cd 1b 05 . . . ld de,l011ah ;132e 11 1a 01 . . . call sub_0fbdh ;1331 cd bd 0f . . . pop af ;1334 f1 . push af ;1335 f5 . call sub_135fh ;1336 cd 5f 13 . _ . pop af ;1339 f1 . ld hl,l1b67h ;133a 21 67 1b ! g . dec a ;133d 3d = jr z,l1343h ;133e 28 03 ( . ld hl,l1b6eh ;1340 21 6e 1b ! n . l1343h: call sub_051bh ;1343 cd 1b 05 . . . ld de,l010dh ;1346 11 0d 01 . . . call sub_0fbdh ;1349 cd bd 0f . . . pop hl ;134c e1 . call sub_051bh ;134d cd 1b 05 . . . pop af ;1350 f1 . cp 003h ;1351 fe 03 . . ret z ;1353 c8 . ld de,00127h ;1354 11 27 01 . ' . call sub_0fbdh ;1357 cd bd 0f . . . ld hl,0f3ffh ;135a 21 ff f3 ! . . jr l1375h ;135d 18 16 . . sub_135fh: ld hl,l1b03h ;135f 21 03 1b ! . . dec a ;1362 3d = jr z,l1368h ;1363 28 03 ( . ld hl,l1b2eh ;1365 21 2e 1b ! . . l1368h: ld a,006h ;1368 3e 06 > . jr l137dh ;136a 18 11 . . sub_136ch: ld de,l0227h ;136c 11 27 02 . ' . l136fh: call sub_0fbdh ;136f cd bd 0f . . . ld hl,0f3d6h ;1372 21 d6 f3 ! . . l1375h: call sub_18e7h ;1375 cd e7 18 . . . ld hl,0f440h ;1378 21 40 f4 ! @ . ld a,028h ;137b 3e 28 > ( l137dh: call sub_0528h ;137d cd 28 05 . ( . ret ;1380 c9 . sub_1381h: ld de,0003bh ;1381 11 3b 00 . ; . call sub_0fbdh ;1384 cd bd 0f . . . ld hl,l1af6h ;1387 21 f6 1a ! . . ld a,(0f02ah) ;138a 3a 2a f0 : * . or a ;138d b7 . jr nz,l1393h ;138e 20 03 . ld hl,l1b94h ;1390 21 94 1b ! . . l1393h: ld a,006h ;1393 3e 06 > . call sub_0528h ;1395 cd 28 05 . ( . ld de,l040dh ;1398 11 0d 04 . . . call sub_0fbdh ;139b cd bd 0f . . . ld a,008h ;139e 3e 08 > . ld hl,0f02bh ;13a0 21 2b f0 ! + . call sub_0528h ;13a3 cd 28 05 . ( . ld b,004h ;13a6 06 04 . . ld de,l0429h ;13a8 11 29 04 . ) . ld hl,0f036h ;13ab 21 36 f0 ! 6 . l13aeh: push bc ;13ae c5 . push de ;13af d5 . push hl ;13b0 e5 . call sub_0fbdh ;13b1 cd bd 0f . . . ld c,02eh ;13b4 0e 2e . . call sub_0533h ;13b6 cd 33 05 . 3 . pop hl ;13b9 e1 . ld a,003h ;13ba 3e 03 > . call sub_0528h ;13bc cd 28 05 . ( . pop de ;13bf d1 . pop bc ;13c0 c1 . ld a,e ;13c1 7b { add a,00ah ;13c2 c6 0a . . ld e,a ;13c4 5f _ djnz l13aeh ;13c5 10 e7 . . ret ;13c7 c9 . sub_13c8h: ld de,sub_020bh+2 ;13c8 11 0d 02 . . . call sub_0fbdh ;13cb cd bd 0f . . . ld a,(0f6a8h) ;13ce 3a a8 f6 : . . jr l13dch ;13d1 18 09 . . sub_13d3h: ld de,l030dh ;13d3 11 0d 03 . . . call sub_0fbdh ;13d6 cd bd 0f . . . ld a,(0f00bh) ;13d9 3a 0b f0 : . . l13dch: ld h,000h ;13dc 26 00 & . ld l,a ;13de 6f o ld ix,0f440h ;13df dd 21 40 f4 . ! @ . call sub_04dbh ;13e3 cd db 04 . . . push ix ;13e6 dd e5 . . pop hl ;13e8 e1 . inc hl ;13e9 23 # inc hl ;13ea 23 # ld a,003h ;13eb 3e 03 > . call sub_0528h ;13ed cd 28 05 . ( . ret ;13f0 c9 . sub_13f1h: ld de,l0327h ;13f1 11 27 03 . ' . call sub_0fbdh ;13f4 cd bd 0f . . . ld hl,01affh ;13f7 21 ff 1a ! . . ld a,(0f2e0h) ;13fa 3a e0 f2 : . . rlca ;13fd 07 . jr c,l1403h ;13fe 38 03 8 . l1400h: ld hl,l1bfch ;1400 21 fc 1b ! . . l1403h: call sub_051bh ;1403 cd 1b 05 . . . l1406h: ld de,l0331h ;1406 11 31 03 . 1 . call sub_0fbdh ;1409 cd bd 0f . . . ld hl,01affh ;140c 21 ff 1a ! . . ld a,(0f07bh) ;140f 3a 7b f0 : { . or a ;1412 b7 . jr nz,l1418h ;1413 20 03 . ld hl,l1bfch ;1415 21 fc 1b ! . . l1418h: jr l142bh ;1418 18 11 . . sub_141ah: ld a,(0f361h) ;141a 3a 61 f3 : a . or a ;141d b7 . ret nz ;141e c0 . ld hl,l1a74h ;141f 21 74 1a ! t . ld a,(0f2ddh) ;1422 3a dd f2 : . . or a ;1425 b7 . jr z,l142bh ;1426 28 03 ( . ld hl,l1ab3h ;1428 21 b3 1a ! . . l142bh: call sub_051bh ;142b cd 1b 05 . . . ret ;142e c9 . l142fh: ld hl,l1ad7h ;142f 21 d7 1a ! . . call sub_1796h ;1432 cd 96 17 . . . l1435h: call sub_1831h ;1435 cd 31 18 . 1 . jr c,l147ah ;1438 38 40 8 @ cp 01bh ;143a fe 1b . . jr z,l147ah ;143c 28 3c ( < sub 031h ;143e d6 31 . 1 jr z,l1447h ;1440 28 05 ( . dec a ;1442 3d = jr z,l1456h ;1443 28 11 ( . jr l1435h ;1445 18 ee . . l1447h: ld (0f01dh),a ;1447 32 1d f0 2 . . ld b,008h ;144a 06 08 . . ld hl,0f01eh ;144c 21 1e f0 ! . . l144fh: ld (hl),03fh ;144f 36 3f 6 ? inc hl ;1451 23 # djnz l144fh ;1452 10 fb . . jr l1477h ;1454 18 21 . ! l1456h: ld hl,l1aedh ;1456 21 ed 1a ! . . call sub_1774h ;1459 cd 74 17 . t . ld d,008h ;145c 16 08 . . call sub_1805h ;145e cd 05 18 . . . jr c,l147ah ;1461 38 17 8 . ld hl,0f440h ;1463 21 40 f4 ! @ . ld de,0f01eh ;1466 11 1e f0 . . . ld b,008h ;1469 06 08 . . l146bh: ld a,(hl) ;146b 7e ~ cpl ;146c 2f / ld (de),a ;146d 12 . inc hl ;146e 23 # inc de ;146f 13 . djnz l146bh ;1470 10 f9 . . ld a,0ffh ;1472 3e ff > . ld (0f01dh),a ;1474 32 1d f0 2 . . l1477h: call sub_12f7h ;1477 cd f7 12 . . . l147ah: jp l120ah ;147a c3 0a 12 . . . l147dh: ld a,(0f029h) ;147d 3a 29 f0 : ) . or a ;1480 b7 . jr nz,l14c4h ;1481 20 41 A ld hl,l1b03h ;1483 21 03 1b ! . . call sub_1796h ;1486 cd 96 17 . . . l1489h: call sub_1831h ;1489 cd 31 18 . 1 . jr c,l14c4h ;148c 38 36 8 6 cp 031h ;148e fe 31 . 1 jr z,l14a5h ;1490 28 13 ( . cp 032h ;1492 fe 32 . 2 jr z,l14c7h ;1494 28 31 ( 1 cp 033h ;1496 fe 33 . 3 jr z,l14c7h ;1498 28 2d ( - cp 034h ;149a fe 34 . 4 jp z,l153fh ;149c ca 3f 15 . ? . cp 01bh ;149f fe 1b . . jr z,l14c4h ;14a1 28 21 ( ! jr l1489h ;14a3 18 e4 . . l14a5h: ld c,081h ;14a5 0e 81 . . call sub_2c16h ;14a7 cd 16 2c . . , ld hl,0f428h ;14aa 21 28 f4 ! ( . push hl ;14ad e5 . pop de ;14ae d1 . ld b,008h ;14af 06 08 . . l14b1h: ld (hl),000h ;14b1 36 00 6 . inc hl ;14b3 23 # djnz l14b1h ;14b4 10 fb . . ld c,082h ;14b6 0e 82 . . call sub_2c16h ;14b8 cd 16 2c . . , ld hl,0f3ffh ;14bb 21 ff f3 ! . . call sub_17f6h ;14be cd f6 17 . . . call sub_130dh ;14c1 cd 0d 13 . . . l14c4h: jp l120ah ;14c4 c3 0a 12 . . . l14c7h: push af ;14c7 f5 . call sub_1888h ;14c8 cd 88 18 . . . ld hl,01b34h ;14cb 21 34 1b ! 4 . pop af ;14ce f1 . sub 031h ;14cf d6 31 . 1 ld (0f43eh),a ;14d1 32 3e f4 2 > . dec a ;14d4 3d = jr z,l14dah ;14d5 28 03 ( . ld hl,l1b46h ;14d7 21 46 1b ! F . l14dah: call sub_1786h ;14da cd 86 17 . . . ld hl,l1b57h ;14dd 21 57 1b ! W . call sub_051bh ;14e0 cd 1b 05 . . . ld hl,0f434h ;14e3 21 34 f4 ! 4 . ld de,0f440h ;14e6 11 40 f4 . @ . ld bc,l0006h+2 ;14e9 01 08 00 . . . ldir ;14ec ed b0 . . ld bc,00b06h ;14ee 01 06 0b . . . ld d,008h ;14f1 16 08 . . call sub_1808h ;14f3 cd 08 18 . . . jr c,l14c4h ;14f6 38 cc 8 . ld hl,0f447h ;14f8 21 47 f4 ! G . ld de,0f449h ;14fb 11 49 f4 . I . ld bc,l0006h+2 ;14fe 01 08 00 . . . l1501h: lddr ;1501 ed b8 . . xor a ;1503 af . ld (0f440h),a ;1504 32 40 f4 2 @ . ld (0f441h),a ;1507 32 41 f4 2 A . ld (0f44ah),a ;150a 32 4a f4 2 J . ld (0f44bh),a ;150d 32 4b f4 2 K . inc hl ;1510 23 # call sub_1113h ;1511 cd 13 11 . . . ld hl,0f446h ;1514 21 46 f4 ! F . ld (hl),0ffh ;1517 36 ff 6 . ld a,(0f43eh) ;1519 3a 3e f4 : > . inc hl ;151c 23 # ld (hl),a ;151d 77 w ld hl,0f3ffh ;151e 21 ff f3 ! . . ld (0f448h),hl ;1521 22 48 f4 " H . ld hl,0f43dh ;1524 21 3d f4 ! = . cp (hl) ;1527 be . jr z,l1530h ;1528 28 06 ( . ld hl,0f3ffh ;152a 21 ff f3 ! . . call sub_17f6h ;152d cd f6 17 . . . l1530h: ld de,0f440h ;1530 11 40 f4 . @ . ld c,082h ;1533 0e 82 . . call sub_2c16h ;1535 cd 16 2c . . , ld c,080h ;1538 0e 80 . . call sub_2c16h ;153a cd 16 2c . . , jr l1559h ;153d 18 1a . . l153fh: ld hl,l1b1fh ;153f 21 1f 1b ! . . call sub_1774h ;1542 cd 74 17 . t . ld hl,0f3ffh ;1545 21 ff f3 ! . . call sub_18e7h ;1548 cd e7 18 . . . ld d,028h ;154b 16 28 . ( call sub_1805h ;154d cd 05 18 . . . jp c,l120ah ;1550 da 0a 12 . . . ld hl,0f3ffh ;1553 21 ff f3 ! . . call sub_1919h ;1556 cd 19 19 . . . l1559h: call sub_130dh ;1559 cd 0d 13 . . . jp l147dh ;155c c3 7d 14 . } . l155fh: ld hl,l1a06h ;155f 21 06 1a ! . . call sub_1796h ;1562 cd 96 17 . . . ld hl,01a3ah ;1565 21 3a 1a ! : . call sub_051bh ;1568 cd 1b 05 . . . ld hl,l1b75h ;156b 21 75 1b ! u . call sub_051bh ;156e cd 1b 05 . . . ld hl,01ae1h ;1571 21 e1 1a ! . . call sub_17aeh ;1574 cd ae 17 . . . ld hl,l1c11h ;1577 21 11 1c ! . . call sub_051bh ;157a cd 1b 05 . . . l157dh: call sub_1831h ;157d cd 31 18 . 1 . jr c,l15b3h ;1580 38 31 8 1 cp 01bh ;1582 fe 1b . . jr z,l15b3h ;1584 28 2d ( - sub 031h ;1586 d6 31 . 1 jr z,l158fh ;1588 28 05 ( . dec a ;158a 3d = jr z,l1597h ;158b 28 0a ( . jr l157dh ;158d 18 ee . . l158fh: ld hl,0f3d6h ;158f 21 d6 f3 ! . . call sub_17f6h ;1592 cd f6 17 . . . jr l15b0h ;1595 18 19 . . l1597h: ld hl,l1b82h ;1597 21 82 1b ! . . call sub_1774h ;159a cd 74 17 . t . ld hl,0f3d6h ;159d 21 d6 f3 ! . . call sub_18e7h ;15a0 cd e7 18 . . . ld d,028h ;15a3 16 28 . ( call sub_1805h ;15a5 cd 05 18 . . . jr c,l15b3h ;15a8 38 09 8 . ld hl,0f3d6h ;15aa 21 d6 f3 ! . . call sub_1919h ;15ad cd 19 19 . . . l15b0h: call sub_136ch ;15b0 cd 6c 13 . l . l15b3h: jp l120ah ;15b3 c3 0a 12 . . . l15b6h: ld hl,l1b94h ;15b6 21 94 1b ! . . call sub_1796h ;15b9 cd 96 17 . . . l15bch: call sub_1831h ;15bc cd 31 18 . 1 . jr c,l15e9h ;15bf 38 28 8 ( cp 031h ;15c1 fe 31 . 1 jr z,l15e3h ;15c3 28 1e ( . cp 032h ;15c5 fe 32 . 2 jr z,l15ech ;15c7 28 23 ( # cp 033h ;15c9 fe 33 . 3 jr z,l15f2h ;15cb 28 25 ( % cp 034h ;15cd fe 34 . 4 jr z,l1617h ;15cf 28 46 ( F cp 035h ;15d1 fe 35 . 5 jr z,l1617h ;15d3 28 42 ( B cp 036h ;15d5 fe 36 . 6 jr z,l1617h ;15d7 28 3e ( > cp 037h ;15d9 fe 37 . 7 jr z,l1617h ;15db 28 3a ( : cp 01bh ;15dd fe 1b . . jr z,l15e9h ;15df 28 08 ( . jr l15bch ;15e1 18 d9 . . l15e3h: ld (0f02ah),a ;15e3 32 2a f0 2 * . call sub_1381h ;15e6 cd 81 13 . . . l15e9h: jp l120ah ;15e9 c3 0a 12 . . . l15ech: xor a ;15ec af . ld (0f02ah),a ;15ed 32 2a f0 2 * . jr l1615h ;15f0 18 23 . # l15f2h: ld hl,l1bbch ;15f2 21 bc 1b ! . . call sub_1774h ;15f5 cd 74 17 . t . ld hl,0f02bh ;15f8 21 2b f0 ! + . ld de,0f440h ;15fb 11 40 f4 . @ . ld bc,l0006h+2 ;15fe 01 08 00 . . . ldir ;1601 ed b0 . . l1603h: ld d,008h ;1603 16 08 . . l1605h: call sub_1805h ;1605 cd 05 18 . . . jr c,l15e9h ;1608 38 df 8 . ld hl,0f440h ;160a 21 40 f4 ! @ . ld de,0f02bh ;160d 11 2b f0 . + . ld bc,l0006h+2 ;1610 01 08 00 . . . ldir ;1613 ed b0 . . l1615h: jr l1680h ;1615 18 69 . i l1617h: push af ;1617 f5 . ld hl,l1bc7h ;1618 21 c7 1b ! . . call sub_1774h ;161b cd 74 17 . t . ld de,l0517h ;161e 11 17 05 . . . call sub_0fbdh ;1621 cd bd 0f . . . pop af ;1624 f1 . sub 003h ;1625 d6 03 . . ld c,a ;1627 4f O call sub_0533h ;1628 cd 33 05 . 3 . sub 030h ;162b d6 30 . 0 ld de,0f036h ;162d 11 36 f0 . 6 . ld hl,0f042h ;1630 21 42 f0 ! B . l1633h: dec a ;1633 3d = jr z,l163fh ;1634 28 09 ( . inc de ;1636 13 . inc de ;1637 13 . inc de ;1638 13 . ld bc,l0009h+1 ;1639 01 0a 00 . . . add hl,bc ;163c 09 . jr l1633h ;163d 18 f4 . . l163fh: ld (0f454h),de ;163f ed 53 54 f4 . S T . ld (0f456h),hl ;1643 22 56 f4 " V . push hl ;1646 e5 . push de ;1647 d5 . pop hl ;1648 e1 . ld de,0f440h ;1649 11 40 f4 . @ . ld bc,l0003h ;164c 01 03 00 . . . ldir ;164f ed b0 . . ld a,020h ;1651 3e 20 > ld (de),a ;1653 12 . inc de ;1654 13 . pop hl ;1655 e1 . ld bc,l0009h+1 ;1656 01 0a 00 . . . ldir ;1659 ed b0 . . ld d,00eh ;165b 16 0e . . call sub_1805h ;165d cd 05 18 . . . jp c,l120ah ;1660 da 0a 12 . . . ld b,003h ;1663 06 03 . . ld hl,0f440h ;1665 21 40 f4 ! @ . push hl ;1668 e5 . call sub_10d4h ;1669 cd d4 10 . . . pop hl ;166c e1 . ld de,(0f454h) ;166d ed 5b 54 f4 . [ T . ld bc,l0003h ;1671 01 03 00 . . . ldir ;1674 ed b0 . . inc hl ;1676 23 # ld de,(0f456h) ;1677 ed 5b 56 f4 . [ V . ld bc,l0009h+1 ;167b 01 0a 00 . . . ldir ;167e ed b0 . . l1680h: call sub_1381h ;1680 cd 81 13 . . . jp l15b6h ;1683 c3 b6 15 . . . l1686h: ld hl,l1bd8h ;1686 21 d8 1b ! . . call sub_1796h ;1689 cd 96 17 . . . l168ch: call sub_1831h ;168c cd 31 18 . 1 . jp c,l120ah ;168f da 0a 12 . . . cp 01bh ;1692 fe 1b . . jp z,l120ah ;1694 ca 0a 12 . . . ld ix,0f2e0h ;1697 dd 21 e0 f2 . ! . . ld iy,0f78fh ;169b fd 21 8f f7 . ! . . sub 031h ;169f d6 31 . 1 jr z,l16aeh ;16a1 28 0b ( . dec a ;16a3 3d = jr z,l16b8h ;16a4 28 12 ( . dec a ;16a6 3d = jr z,l16c2h ;16a7 28 19 ( . dec a ;16a9 3d = jr z,l16c5h ;16aa 28 19 ( . jr l168ch ;16ac 18 de . . l16aeh: set 7,(ix+000h) ;16ae dd cb 00 fe . . . . set 7,(iy+000h) ;16b2 fd cb 00 fe . . . . jr l16cbh ;16b6 18 13 . . l16b8h: res 7,(ix+000h) ;16b8 dd cb 00 be . . . . res 7,(iy+000h) ;16bc fd cb 00 be . . . . jr l16cbh ;16c0 18 09 . . l16c2h: dec a ;16c2 3d = jr l16c5h ;16c3 18 00 . . l16c5h: ld (0f07bh),a ;16c5 32 7b f0 2 { . ld (0f07ch),a ;16c8 32 7c f0 2 | . l16cbh: call sub_13f1h ;16cb cd f1 13 . . . ld hl,l1c11h ;16ce 21 11 1c ! . . call sub_051bh ;16d1 cd 1b 05 . . . jr l168ch ;16d4 18 b6 . . ld b,006h ;16d6 06 06 . . jr l16f0h ;16d8 18 16 . . call 060a0h ;16da cd a0 60 . . ` ld b,004h ;16dd 06 04 . . call sub_2c43h ;16df cd 43 2c . C , di ;16e2 f3 . call sub_7098h ;16e3 cd 98 70 . . p ei ;16e6 fb . jr l173ah ;16e7 18 51 . Q call sub_173dh ;16e9 cd 3d 17 . = . jr l173ah ;16ec 18 4c . L ld b,008h ;16ee 06 08 . . l16f0h: call sub_2c43h ;16f0 cd 43 2c . C , jr l173ah ;16f3 18 45 . E call sub_642bh ;16f5 cd 2b 64 . + d jr l173ah ;16f8 18 40 . @ ld hl,l1abbh ;16fa 21 bb 1a ! . . call sub_1746h ;16fd cd 46 17 . F . call sub_0027h ;1700 cd 27 00 . ' . l1703h: or a ;1703 b7 . jr z,l171bh ;1704 28 15 ( . ld hl,l1c16h ;1706 21 16 1c ! . . call sub_051bh ;1709 cd 1b 05 . . . l170ch: ld a,(0f0dah) ;170c 3a da f0 : . . or a ;170f b7 . jr nz,l171bh ;1710 20 09 . call sub_113eh ;1712 cd 3e 11 . > . or a ;1715 b7 . l1716h: jr z,l170ch ;1716 28 f4 ( . call sub_1146h ;1718 cd 46 11 . F . l171bh: jp l11e9h ;171b c3 e9 11 . . . ld hl,l1a85h ;171e 21 85 1a ! . . call sub_1746h ;1721 cd 46 17 . F . call sub_0024h ;1724 cd 24 00 . $ . jr l1703h ;1727 18 da . . ld hl,l1a94h ;1729 21 94 1a ! . . call sub_1746h ;172c cd 46 17 . F . ld de,l77cbh ;172f 11 cb 77 . . w call l0021h ;1732 cd 21 00 . ! . jr l1703h ;1735 18 cc . . call sub_6441h ;1737 cd 41 64 . A d l173ah: jp l1234h ;173a c3 34 12 . 4 . sub_173dh: di ;173d f3 . call 0709bh ;173e cd 9b 70 . . p call sub_63b9h ;1741 cd b9 63 . . c ei ;1744 fb . ret ;1745 c9 . sub_1746h: ld c,00ch ;1746 0e 0c . . call sub_0533h ;1748 cd 33 05 . 3 . ld a,007h ;174b 3e 07 > . call sub_0528h ;174d cd 28 05 . ( . ret ;1750 c9 . sub_1751h: ld hl,0f346h ;1751 21 46 f3 ! F . ld de,0f3c2h ;1754 11 c2 f3 . . . ld bc,l000ch ;1757 01 0c 00 . . . ldir ;175a ed b0 . . ld hl,l7fa6h ;175c 21 a6 7f ! .  ld de,0f346h ;175f 11 46 f3 . F . ld bc,l000ch ;1762 01 0c 00 . . . ldir ;1765 ed b0 . . ret ;1767 c9 . sub_1768h: ld hl,0f3c2h ;1768 21 c2 f3 ! . . ld de,0f346h ;176b 11 46 f3 . F . ld bc,l000ch ;176e 01 0c 00 . . . ldir ;1771 ed b0 . . ret ;1773 c9 . sub_1774h: push hl ;1774 e5 . ld hl,l1a22h ;1775 21 22 1a ! " . call sub_17d1h ;1778 cd d1 17 . . . pop hl ;177b e1 . call sub_051bh ;177c cd 1b 05 . . . ld c,02ch ;177f 0e 2c . , call sub_0533h ;1781 cd 33 05 . 3 . jr l1789h ;1784 18 03 . . sub_1786h: call sub_17d1h ;1786 cd d1 17 . . . l1789h: ld hl,l1a19h ;1789 21 19 1a ! . . ld a,008h ;178c 3e 08 > . call sub_0528h ;178e cd 28 05 . ( . ld hl,l1a3fh ;1791 21 3f 1a ! ? . jr l17f2h ;1794 18 5c . \ sub_1796h: push hl ;1796 e5 . ld hl,l1a07h ;1797 21 07 1a ! . . call sub_17d1h ;179a cd d1 17 . . . ld hl,l1a33h ;179d 21 33 1a ! 3 . call sub_051bh ;17a0 cd 1b 05 . . . pop hl ;17a3 e1 . call sub_17aeh ;17a4 cd ae 17 . . . ld hl,l1c11h ;17a7 21 11 1c ! . . call sub_051bh ;17aa cd 1b 05 . . . ret ;17ad c9 . sub_17aeh: ld b,031h ;17ae 06 31 . 1 l17b0h: ld a,(hl) ;17b0 7e ~ inc hl ;17b1 23 # inc a ;17b2 3c < ret z ;17b3 c8 . dec a ;17b4 3d = jr z,l17bdh ;17b5 28 06 ( . ld c,a ;17b7 4f O call sub_0533h ;17b8 cd 33 05 . 3 . jr l17b0h ;17bb 18 f3 . . l17bdh: ld c,020h ;17bd 0e 20 . call sub_0533h ;17bf cd 33 05 . 3 . call sub_0533h ;17c2 cd 33 05 . 3 . ld c,b ;17c5 48 H inc b ;17c6 04 . call sub_0533h ;17c7 cd 33 05 . 3 . ld c,03dh ;17ca 0e 3d . = call sub_0533h ;17cc cd 33 05 . 3 . jr l17b0h ;17cf 18 df . . sub_17d1h: push hl ;17d1 e5 . call sub_17e8h ;17d2 cd e8 17 . . . jr l17dbh ;17d5 18 04 . . push hl ;17d7 e5 . call sub_17edh ;17d8 cd ed 17 . . . l17dbh: pop hl ;17db e1 . call sub_051bh ;17dc cd 1b 05 . . . sub_17dfh: ld hl,0f440h ;17df 21 40 f4 ! @ . ld b,028h ;17e2 06 28 . ( call sub_17ffh ;17e4 cd ff 17 . . . ret ;17e7 c9 . sub_17e8h: ld hl,l1c00h ;17e8 21 00 1c ! . . jr l17f2h ;17eb 18 05 . . sub_17edh: ld hl,l1c06h ;17ed 21 06 1c ! . . jr l17f2h ;17f0 18 00 . . l17f2h: call sub_051bh ;17f2 cd 1b 05 . . . ret ;17f5 c9 . sub_17f6h: xor a ;17f6 af . ld (hl),a ;17f7 77 w inc hl ;17f8 23 # ld b,028h ;17f9 06 28 . ( call sub_17ffh ;17fb cd ff 17 . . . ret ;17fe c9 . sub_17ffh: ld (hl),020h ;17ff 36 20 6 l1801h: inc hl ;1801 23 # l1802h: djnz sub_17ffh ;1802 10 fb . . ret ;1804 c9 . sub_1805h: ld bc,00206h ;1805 01 06 02 . . . sub_1808h: xor a ;1808 af . ld e,a ;1809 5f _ l180ah: push bc ;180a c5 . ld ix,0f440h ;180b dd 21 40 f4 . ! @ . call sub_0f33h ;180f cd 33 0f . 3 . pop bc ;1812 c1 . push bc ;1813 c5 . push de ;1814 d5 . ld d,c ;1815 51 Q ld a,b ;1816 78 x add a,e ;1817 83 . ld e,a ;1818 5f _ call sub_0fbdh ;1819 cd bd 0f . . . l181ch: call sub_1831h ;181c cd 31 18 . 1 . inc c ;181f 0c . jr z,l181ch ;1820 28 fa ( . pop de ;1822 d1 . pop bc ;1823 c1 . jr c,l1830h ;1824 38 0a 8 . or a ;1826 b7 . cp 00dh ;1827 fe 0d . . jr z,l1830h ;1829 28 05 ( . cp 01bh ;182b fe 1b . . jr nz,l180ah ;182d 20 db . scf ;182f 37 7 l1830h: ret ;1830 c9 . sub_1831h: call sub_3610h ;1831 cd 10 36 . . 6 l1834h: call sub_361ch ;1834 cd 1c 36 . . 6 jr nz,l1845h ;1837 20 0c . ld hl,0f0dah ;1839 21 da f0 ! . . set 4,(hl) ;183c cb e6 . . ld a,002h ;183e 3e 02 > . ld (0f4eah),a ;1840 32 ea f4 2 . . jr l1869h ;1843 18 24 . $ l1845h: call sub_186ch ;1845 cd 6c 18 . l . ld a,(0f0dah) ;1848 3a da f0 : . . or a ;184b b7 . jr nz,l1869h ;184c 20 1b . ld a,(0f0dch) ;184e 3a dc f0 : . . or a ;1851 b7 . jr nz,l1869h ;1852 20 15 . call sub_113eh ;1854 cd 3e 11 . > . or a ;1857 b7 . jr nz,l1864h ;1858 20 0a . call sub_608eh ;185a cd 8e 60 . . ` bit 6,h ;185d cb 74 . t jr nz,sub_1831h ;185f 20 d0 . halt ;1861 76 v jr l1834h ;1862 18 d0 . . l1864h: call sub_1146h ;1864 cd 46 11 . F . or a ;1867 b7 . ret ;1868 c9 . l1869h: xor a ;1869 af . scf ;186a 37 7 ret ;186b c9 . sub_186ch: ld de,l0018h+2 ;186c 11 1a 00 . . . call sub_0fd6h ;186f cd d6 0f . . . call 06091h ;1872 cd 91 60 . . ` ld ix,0f428h ;1875 dd 21 28 f4 . ! ( . call sub_04dbh ;1879 cd db 04 . . . push ix ;187c dd e5 . . pop hl ;187e e1 . ld de,l0345h ;187f 11 45 03 . E . ld b,005h ;1882 06 05 . . call sub_0fe8h ;1884 cd e8 0f . . . ret ;1887 c9 . sub_1888h: ld hl,0f428h ;1888 21 28 f4 ! ( . push hl ;188b e5 . push hl ;188c e5 . ex de,hl ;188d eb . ld a,(0f06fh) ;188e 3a 6f f0 : o . push af ;1891 f5 . ld c,084h ;1892 0e 84 . . call sub_2c16h ;1894 cd 16 2c . . , pop af ;1897 f1 . ld (0f06fh),a ;1898 32 6f f0 2 o . ex de,hl ;189b eb . pop ix ;189c dd e1 . . ld a,(ix+007h) ;189e dd 7e 07 . ~ . ld (ix+015h),a ;18a1 dd 77 15 . w . or a ;18a4 b7 . jr nz,l18aeh ;18a5 20 07 . ld b,015h ;18a7 06 15 . . call sub_17ffh ;18a9 cd ff 17 . . . jr l18ceh ;18ac 18 20 . l18aeh: call sub_10e4h ;18ae cd e4 10 . . . ld hl,0f42ah ;18b1 21 2a f4 ! * . ld de,0f434h ;18b4 11 34 f4 . 4 . ld bc,l0006h+2 ;18b7 01 08 00 . . . ldir ;18ba ed b0 . . ld hl,(0f42ah) ;18bc 2a 2a f4 * * . ld (0f428h),hl ;18bf 22 28 f4 " ( . ld hl,(0f42ch) ;18c2 2a 2c f4 * , . ld (0f42bh),hl ;18c5 22 2b f4 " + . ld hl,(0f430h) ;18c8 2a 30 f4 * 0 . ld (0f431h),hl ;18cb 22 31 f4 " 1 . l18ceh: ld a,02fh ;18ce 3e 2f > / ld (ix+002h),a ;18d0 dd 77 02 . w . ld a,020h ;18d3 3e 20 > ld (ix+005h),a ;18d5 dd 77 05 . w . ld a,03ah ;18d8 3e 3a > : ld (ix+008h),a ;18da dd 77 08 . w . ld a,0ffh ;18dd 3e ff > . ld (ix+00bh),a ;18df dd 77 0b . w . ld (ix+014h),a ;18e2 dd 77 14 . w . pop hl ;18e5 e1 . ret ;18e6 c9 . sub_18e7h: push hl ;18e7 e5 . call sub_17dfh ;18e8 cd df 17 . . . pop hl ;18eb e1 . ld a,(hl) ;18ec 7e ~ or a ;18ed b7 . ret z ;18ee c8 . inc hl ;18ef 23 # ld de,0f440h ;18f0 11 40 f4 . @ . ld b,028h ;18f3 06 28 . ( l18f5h: push af ;18f5 f5 . ld a,(hl) ;18f6 7e ~ cp 020h ;18f7 fe 20 . jr c,l1904h ;18f9 38 09 8 . ld (de),a ;18fb 12 . pop af ;18fc f1 . dec a ;18fd 3d = ret z ;18fe c8 . inc de ;18ff 13 . inc hl ;1900 23 # djnz l18f5h ;1901 10 f2 . . ret ;1903 c9 . l1904h: ld c,a ;1904 4f O ld a,05eh ;1905 3e 5e > ^ ld (de),a ;1907 12 . pop af ;1908 f1 . inc de ;1909 13 . dec b ;190a 05 . ret z ;190b c8 . push af ;190c f5 . ld a,c ;190d 79 y add a,040h ;190e c6 40 . @ ld (de),a ;1910 12 . pop af ;1911 f1 . dec a ;1912 3d = ret z ;1913 c8 . inc de ;1914 13 . inc hl ;1915 23 # djnz l18f5h ;1916 10 dd . . ret ;1918 c9 . sub_1919h: push hl ;1919 e5 . inc hl ;191a 23 # push hl ;191b e5 . ld b,028h ;191c 06 28 . ( call sub_17ffh ;191e cd ff 17 . . . pop de ;1921 d1 . dec hl ;1922 2b + push hl ;1923 e5 . ld hl,0f440h ;1924 21 40 f4 ! @ . ld b,028h ;1927 06 28 . ( l1929h: ld a,(hl) ;1929 7e ~ cp 05eh ;192a fe 5e . ^ jr z,l1935h ;192c 28 07 ( . ld (de),a ;192e 12 . inc de ;192f 13 . inc hl ;1930 23 # djnz l1929h ;1931 10 f6 . . jr l1941h ;1933 18 0c . . l1935h: dec b ;1935 05 . jr z,l1941h ;1936 28 09 ( . inc hl ;1938 23 # ld a,(hl) ;1939 7e ~ sub 040h ;193a d6 40 . @ ld (de),a ;193c 12 . inc de ;193d 13 . inc hl ;193e 23 # djnz l1929h ;193f 10 e8 . . l1941h: pop hl ;1941 e1 . l1942h: ld b,028h ;1942 06 28 . ( call sub_194ah ;1944 cd 4a 19 . J . pop hl ;1947 e1 . ld (hl),b ;1948 70 p ret ;1949 c9 . sub_194ah: ld a,(hl) ;194a 7e ~ cp 020h ;194b fe 20 . ret nz ;194d c0 . dec hl ;194e 2b + djnz sub_194ah ;194f 10 f9 . . inc hl ;1951 23 # ret ;1952 c9 . l1953h: inc c ;1953 0c . ld hl,(l2a2ah) ;1954 2a 2a 2a * * * ; *** SYSTEM DISPLAY *** jr nz,l19ach ;1957 20 53 S ld e,c ;1959 59 Y ld d,e ;195a 53 S ld d,h ;195b 54 T ld b,l ;195c 45 E ld c,l ;195d 4d M jr nz,$+70 ;195e 20 44 D ld c,c ;1960 49 I ld d,e ;1961 53 S ld d,b ;1962 50 P ld c,h ;1963 4c L ld b,c ;1964 41 A ld e,c ;1965 59 Y jr nz,l1992h ;1966 20 2a * ld hl,(l1b2ah) ;1968 2a 2a 1b * * . dec a ;196b 3d = ld (l3c20h),hl ;196c 22 20 3c " < ; ld d,d ;196f 52 R ld b,c ;1970 41 A ld c,l ;1971 4d M jr nz,$+34 ;1972 20 20 jr nz,$+70 ;1974 20 44 D ld c,c ;1976 49 I ld d,e ;1977 53 S ld c,e ;1978 4b K ld a,01bh ;1979 3e 1b > . dec a ;197b 3d = ld (l6b33h),hl ;197c 22 33 6b " 3 k ld h,d ;197f 62 b dec de ;1980 1b . dec a ;1981 3d = ld (l3c3ah),hl ;1982 22 3a 3c " : < ; ld b,c ;1985 41 A ld d,l ;1986 55 U ld d,h ;1987 54 T ld c,a ;1988 4f O jr nz,l19deh ;1989 20 53 S ld d,h ;198b 54 T ld b,c ;198c 41 A ld d,d ;198d 52 R ld d,h ;198e 54 T ld a,01bh ;198f 3e 1b > . dec a ;1991 3d = l1992h: inc hl ;1992 23 # jr nz,l19d1h ;1993 20 3c < ; ld d,l ;1995 55 U ld d,e ;1996 53 S ld b,l ;1997 45 E ld d,d ;1998 52 R jr nz,l19bbh ;1999 20 20 ld b,d ;199b 42 B ld c,c ;199c 49 I ld c,a ;199d 4f O ld d,e ;199e 53 S ld a,01bh ;199f 3e 1b > . dec a ;19a1 3d = inc hl ;19a2 23 # jr nc,l1942h ;19a3 30 9d 0 . ld (03635h),a ;19a5 32 35 36 2 5 6 jr nz,l1a0ch ;19a8 20 62 b dec de ;19aa 1b . dec a ;19ab 3d = l19ach: inc hl ;19ac 23 # ld a,(04d3ch) ;19ad 3a 3c 4d : < M ; ld b,e ;19b0 43 C ld d,h ;19b1 54 T jr nz,l19d4h ;19b2 20 20 jr nz,l1a03h ;19b4 20 4d M ld c,a ;19b6 4f O ld b,h ;19b7 44 D ld b,l ;19b8 45 E ld a,020h ;19b9 3e 20 > l19bbh: jr nz,l19ddh ;19bb 20 20 jr nz,l1a32h ;19bd 20 73 s ld (hl),h ;19bf 74 t ld l,a ;19c0 6f o ld (hl),b ;19c1 70 p inc l ;19c2 2c , dec de ;19c3 1b . dec a ;19c4 3d = inc hl ;19c5 23 # ld d,h ;19c6 54 T halt ;19c7 76 v ld h,l ;19c8 65 e ld (hl),d ;19c9 72 r ld l,c ;19ca 69 i ld h,(hl) ;19cb 66 f ld a,c ;19cc 79 y jr nz,l1a0bh ;19cd 20 3c < ld b,e ;19cf 43 C ld c,a ;19d0 4f O l19d1h: ld d,l ;19d1 55 U ld c,(hl) ;19d2 4e N ld d,h ;19d3 54 T l19d4h: ld a,01bh ;19d4 3e 1b > . dec a ;19d6 3d = inc h ;19d7 24 $ jr nz,l1a16h ;19d8 20 3c < ld c,l ;19da 4d M ld b,l ;19db 45 E ld c,(hl) ;19dc 4e N l19ddh: ld d,l ;19dd 55 U l19deh: jr nz,$+70 ;19de 20 44 D ld d,d ;19e0 52 R ld c,c ;19e1 49 I ld d,(hl) ;19e2 56 V ld b,l ;19e3 45 E ld a,01bh ;19e4 3e 1b > . dec a ;19e6 3d = inc h ;19e7 24 $ ld a,(04d3ch) ;19e8 3a 3c 4d : < M ld b,l ;19eb 45 E ld c,(hl) ;19ec 4e N ld d,l ;19ed 55 U jr nz,$+34 ;19ee 20 20 ld b,(hl) ;19f0 46 F ld c,c ;19f1 49 I ld c,h ;19f2 4c L ld b,l ;19f3 45 E ld a,020h ;19f4 3e 20 > ld sp,l3d1bh ;19f6 31 1b 3d 1 . = inc h ;19f9 24 $ ld d,c ;19fa 51 Q ld (l3d1bh),a ;19fb 32 1b 3d 2 . = inc h ;19fe 24 $ ld e,e ;19ff 5b [ inc sp ;1a00 33 3 dec de ;1a01 1b . dec a ;1a02 3d = l1a03h: inc h ;1a03 24 $ ld h,l ;1a04 65 e inc (hl) ;1a05 34 4 l1a06h: rst 38h ;1a06 ff . l1a07h: dec l ;1a07 2d - jr nz,l1a5dh ;1a08 20 53 S ld h,l ;1a0a 65 e l1a0bh: ld l,h ;1a0b 6c l l1a0ch: ld h,l ;1a0c 65 e ld h,e ;1a0d 63 c ld (hl),h ;1a0e 74 t jr nz,l1a7fh ;1a0f 20 6e n ld (hl),l ;1a11 75 u ld l,l ;1a12 6d m ld h,d ;1a13 62 b ld h,l ;1a14 65 e ld (hl),d ;1a15 72 r l1a16h: jr nz,l1a87h ;1a16 20 6f o ld (hl),d ;1a18 72 r l1a19h: jr nz,l1a60h ;1a19 20 45 E ld d,e ;1a1b 53 S ld b,e ;1a1c 43 C jr nz,$+118 ;1a1d 20 74 t ld l,a ;1a1f 6f o sub_1a20h: jr nz,$+1 ;1a20 20 ff . l1a22h: dec l ;1a22 2d - jr nz,l1a6eh ;1a23 20 49 I ld l,(hl) ;1a25 6e n ld (hl),b ;1a26 70 p ld (hl),l ;1a27 75 u ld (hl),h ;1a28 74 t jr nz,$+1 ;1a29 20 ff . l1a2bh: ld h,l ;1a2b 65 e ld a,b ;1a2c 78 x ld l,c ;1a2d 69 i ld (hl),h ;1a2e 74 t ld l,00dh ;1a2f 2e 0d . . ld a,(bc) ;1a31 0a . l1a32h: rst 38h ;1a32 ff . l1a33h: ld (hl),d ;1a33 72 r ld h,l ;1a34 65 e ld (hl),h ;1a35 74 t ld (hl),l ;1a36 75 u ld (hl),d ;1a37 72 r ld l,(hl) ;1a38 6e n ld l,00dh ;1a39 2e 0d . . ld a,(bc) ;1a3b 0a . jr nz,l1a5eh ;1a3c 20 20 rst 38h ;1a3e ff . l1a3fh: ld h,e ;1a3f 63 c ld h,c ;1a40 61 a ld l,(hl) ;1a41 6e n ld h,e ;1a42 63 c ld h,l ;1a43 65 e ld l,h ;1a44 6c l ld l,00dh ;1a45 2e 0d . . ld a,(bc) ;1a47 0a . jr nz,l1a6ah ;1a48 20 20 rst 38h ;1a4a ff . l1a4bh: nop ;1a4b 00 . ld (hl),b ;1a4c 70 p ld h,c ;1a4d 61 a ld (hl),e ;1a4e 73 s ld (hl),e ;1a4f 73 s ld (hl),a ;1a50 77 w ld l,a ;1a51 6f o ld (hl),d ;1a52 72 r ld h,h ;1a53 64 d nop ;1a54 00 . ld h,c ;1a55 61 a ld l,h ;1a56 6c l ld h,c ;1a57 61 a ld (hl),d ;1a58 72 r ld l,l ;1a59 6d m cpl ;1a5a 2f / ld (hl),a ;1a5b 77 w ld h,c ;1a5c 61 a l1a5dh: ld l,e ;1a5d 6b k l1a5eh: ld h,l ;1a5e 65 e nop ;1a5f 00 . l1a60h: ld h,c ;1a60 61 a ld (hl),l ;1a61 75 u ld (hl),h ;1a62 74 t ld l,a ;1a63 6f o jr nz,l1ad9h ;1a64 20 73 s ld (hl),h ;1a66 74 t ld h,c ;1a67 61 a ld (hl),d ;1a68 72 r ld (hl),h ;1a69 74 t l1a6ah: nop ;1a6a 00 . ld l,l ;1a6b 6d m ld h,l ;1a6c 65 e ld l,(hl) ;1a6d 6e n l1a6eh: ld (hl),l ;1a6e 75 u nop ;1a6f 00 . ld c,l ;1a70 4d M ld b,e ;1a71 43 C ld d,h ;1a72 54 T rst 38h ;1a73 ff . l1a74h: dec de ;1a74 1b . dec a ;1a75 3d = daa ;1a76 27 ' inc hl ;1a77 23 # inc a ;1a78 3c < inc a ;1a79 3c < add a,l ;1a7a 85 . jr nz,l1aach ;1a7b 20 2f / dec de ;1a7d 1b . dec a ;1a7e 3d = l1a7fh: daa ;1a7f 27 ' inc (hl) ;1a80 34 4 inc a ;1a81 3c < add a,l ;1a82 85 . jr nz,l1ab4h ;1a83 20 2f / l1a85h: ld l,l ;1a85 6d m ld l,a ;1a86 6f o l1a87h: ld (hl),l ;1a87 75 u ld l,(hl) ;1a88 6e n ld (hl),h ;1a89 74 t jr nz,l1aach ;1a8a 20 20 dec de ;1a8c 1b . dec a ;1a8d 3d = daa ;1a8e 27 ' ld b,h ;1a8f 44 D adc a,e ;1a90 8b . adc a,e ;1a91 8b . jr nz,l1ac3h ;1a92 20 2f / ; /dirinit l1a94h: ld h,h ;1a94 64 d ld l,c ;1a95 69 i ld (hl),d ;1a96 72 r ld l,c ;1a97 69 i ld l,(hl) ;1a98 6e n ld l,c ;1a99 69 i ld (hl),h ;1a9a 74 t dec de ;1a9b 1b . dec a ;1a9c 3d = daa ;1a9d 27 ' ld d,e ;1a9e 53 S add a,l ;1a9f 85 . ld a,03eh ;1aa0 3e 3e > > ; >> /erase jr nz,l1ad3h ;1aa2 20 2f / ld h,l ;1aa4 65 e ld (hl),d ;1aa5 72 r ld h,c ;1aa6 61 a ld (hl),e ;1aa7 73 s ld h,l ;1aa8 65 e dec de ;1aa9 1b . dec a ;1aaa 3d = daa ;1aab 27 ' l1aach: ld h,b ;1aac 60 ` sub b ;1aad 90 . sub b ;1aae 90 . sub b ;1aaf 90 . jr nz,$+49 ;1ab0 20 2f / rst 38h ;1ab2 ff . l1ab3h: dec de ;1ab3 1b . l1ab4h: dec a ;1ab4 3d = daa ;1ab5 27 ' dec h ;1ab6 25 % dec b ;1ab7 05 . jr nz,l1adah ;1ab8 20 20 ; /remove cpl ;1aba 2f / l1abbh: ld (hl),d ;1abb 72 r ld h,l ;1abc 65 e ld l,l ;1abd 6d m ld l,a ;1abe 6f o halt ;1abf 76 v ld h,l ;1ac0 65 e jr nz,l1adeh ;1ac1 20 1b . l1ac3h: dec a ;1ac3 3d = daa ;1ac4 27 ' scf ;1ac5 37 7 cpl ;1ac6 2f / dec de ;1ac7 1b . dec a ;1ac8 3d = daa ;1ac9 27 ' ld b,a ;1aca 47 G cpl ;1acb 2f / dec de ;1acc 1b . dec a ;1acd 3d = daa ;1ace 27 ' ld d,a ;1acf 57 W cpl ;1ad0 2f / dec de ;1ad1 1b . dec a ;1ad2 3d = l1ad3h: daa ;1ad3 27 ' ld h,a ;1ad4 67 g cpl ;1ad5 2f / rst 38h ;1ad6 ff . l1ad7h: inc a ;1ad7 3c < ; ld d,b ;1ad8 50 P l1ad9h: ld b,c ;1ad9 41 A l1adah: ld d,e ;1ada 53 S ld d,e ;1adb 53 S ld d,a ;1adc 57 W ld c,a ;1add 4f O l1adeh: ld d,d ;1ade 52 R ld b,h ;1adf 44 D ld a,000h ;1ae0 3e 00 > . ld l,a ;1ae2 6f o ld h,(hl) ;1ae3 66 f ld h,(hl) ;1ae4 66 f nop ;1ae5 00 . ld h,c ;1ae6 61 a ld (hl),e ;1ae7 73 s ld (hl),e ;1ae8 73 s ld l,c ;1ae9 69 i ld h,a ;1aea 67 g ld l,(hl) ;1aeb 6e n rst 38h ;1aec ff . l1aedh: ld (hl),b ;1aed 70 p ld h,c ;1aee 61 a ld (hl),e ;1aef 73 s ld (hl),e ;1af0 73 s ld (hl),a ;1af1 77 w ld l,a ;1af2 6f o ld (hl),d ;1af3 72 r ld h,h ;1af4 64 d rst 38h ;1af5 ff . l1af6h: jr nz,l1b18h ;1af6 20 20 jr nz,l1b1ah ;1af8 20 20 jr nz,l1b1ch ;1afa 20 20 sub_1afch: jr nz,l1b1eh ;1afc 20 20 jr nz,l1b20h ;1afe 20 20 jr nz,l1b22h ;1b00 20 20 rst 38h ;1b02 ff . l1b03h: inc a ;1b03 3c < ; ld b,c ;1b04 41 A ld c,h ;1b05 4c L ld b,c ;1b06 41 A ld d,d ;1b07 52 R ld c,l ;1b08 4d M cpl ;1b09 2f / ld d,a ;1b0a 57 W ld b,c ;1b0b 41 A ld c,e ;1b0c 4b K ld b,l ;1b0d 45 E l1b0eh: ld a,000h ;1b0e 3e 00 > . ld l,a ;1b10 6f o ld h,(hl) ;1b11 66 f ld h,(hl) ;1b12 66 f l1b13h: nop ;1b13 00 . ld h,c ;1b14 61 a ld l,h ;1b15 6c l ld h,c ;1b16 61 a ld (hl),d ;1b17 72 r l1b18h: ld l,l ;1b18 6d m nop ;1b19 00 . l1b1ah: ld (hl),a ;1b1a 77 w ld h,c ;1b1b 61 a l1b1ch: ld l,e ;1b1c 6b k ld h,l ;1b1d 65 e l1b1eh: nop ;1b1e 00 . l1b1fh: ld l,l ;1b1f 6d m ; message/string l1b20h: ld h,l ;1b20 65 e ld (hl),e ;1b21 73 s l1b22h: ld (hl),e ;1b22 73 s ld h,c ;1b23 61 a ld h,a ;1b24 67 g ld h,l ;1b25 65 e cpl ;1b26 2f / ld (hl),e ;1b27 73 s ld (hl),h ;1b28 74 t ld (hl),d ;1b29 72 r l1b2ah: ld l,c ;1b2a 69 i ld l,(hl) ;1b2b 6e n ld h,a ;1b2c 67 g rst 38h ;1b2d ff . l1b2eh: inc a ;1b2e 3c < ; l1b62h: ld c,c ;1b62 49 I ld c,l ;1b63 4d M ld b,l ;1b64 45 E ld a,0ffh ;1b65 3e ff > . l1b67h: jr nz,l1b89h ;1b67 20 20 ld c,l ;1b69 4d M ld d,e ;1b6a 53 S ld b,a ;1b6b 47 G ld a,0ffh ;1b6c 3e ff > . l1b6eh: ld d,e ;1b6e 53 S ld d,h ;1b6f 54 T ld d,d ;1b70 52 R ld c,(hl) ;1b71 4e N ld b,a ;1b72 47 G ld a,0ffh ;1b73 3e ff > . l1b75h: inc a ;1b75 3c < ld b,c ;1b76 41 A ld d,l ;1b77 55 U ld d,h ;1b78 54 T ld c,a ;1b79 4f O jr nz,l1bcfh ;1b7a 20 53 S ld d,h ;1b7c 54 T ld b,c ;1b7d 41 A ld d,d ;1b7e 52 R ld d,h ;1b7f 54 T ld a,0ffh ;1b80 3e ff > . l1b82h: ld h,c ;1b82 61 a ld (hl),l ;1b83 75 u ld (hl),h ;1b84 74 t ld l,a ;1b85 6f o jr nz,l1bfbh ;1b86 20 73 s ld (hl),h ;1b88 74 t l1b89h: ld h,c ;1b89 61 a l1b8ah: ld (hl),d ;1b8a 72 r ld (hl),h ;1b8b 74 t jr nz,l1c01h ;1b8c 20 73 s ld (hl),h ;1b8e 74 t ld (hl),d ;1b8f 72 r ld l,c ;1b90 69 i ld l,(hl) ;1b91 6e n ld h,a ;1b92 67 g rst 38h ;1b93 ff . l1b94h: inc a ;1b94 3c < ld c,l ;1b95 4d M ld b,l ;1b96 45 E ld c,(hl) ;1b97 4e N ld d,l ;1b98 55 U ld a,000h ;1b99 3e 00 > . ld l,a ;1b9b 6f o l1b9ch: ld h,(hl) ;1b9c 66 f ld h,(hl) ;1b9d 66 f nop ;1b9e 00 . ld l,a ;1b9f 6f o ld l,(hl) ;1ba0 6e n nop ;1ba1 00 . ld h,h ;1ba2 64 d ld (hl),d ;1ba3 72 r ld l,c ;1ba4 69 i halt ;1ba5 76 v ld h,l ;1ba6 65 e nop ;1ba7 00 . ld h,l ;1ba8 65 e ld a,b ;1ba9 78 x ld (hl),h ;1baa 74 t ld sp,l6500h ;1bab 31 00 65 1 . e ld a,b ;1bae 78 x ld (hl),h ;1baf 74 t ld (l6500h),a ;1bb0 32 00 65 2 . e ld a,b ;1bb3 78 x ld (hl),h ;1bb4 74 t l1bb5h: inc sp ;1bb5 33 3 l1bb6h: nop ;1bb6 00 . ld h,l ;1bb7 65 e ld a,b ;1bb8 78 x ld (hl),h ;1bb9 74 t inc (hl) ;1bba 34 4 rst 38h ;1bbb ff . l1bbch: ld h,h ;1bbc 64 d ld (hl),d ;1bbd 72 r ld l,c ;1bbe 69 i halt ;1bbf 76 v ld h,l ;1bc0 65 e jr nz,l1c31h ;1bc1 20 6e n ld h,c ;1bc3 61 a l1bc4h: ld l,l ;1bc4 6d m ld h,l ;1bc5 65 e l1bc6h: rst 38h ;1bc6 ff . l1bc7h: ld h,l ;1bc7 65 e ld a,b ;1bc8 78 x ld (hl),h ;1bc9 74 t ld h,l ;1bca 65 e ld l,(hl) ;1bcb 6e n ld (hl),h ;1bcc 74 t ld l,c ;1bcd 69 i ld l,a ;1bce 6f o l1bcfh: ld l,(hl) ;1bcf 6e n jr nz,$+112 ;1bd0 20 6e n ld h,c ;1bd2 61 a ld l,l ;1bd3 6d m ld h,l ;1bd4 65 e jr nz,l1bf7h ;1bd5 20 20 rst 38h ;1bd7 ff . l1bd8h: inc a ;1bd8 3c < ld c,l ;1bd9 4d M ld b,e ;1bda 43 C ld d,h ;1bdb 54 T ld a,000h ;1bdc 3e 00 > . ld (hl),e ;1bde 73 s ld (hl),h ;1bdf 74 t ld l,a ;1be0 6f o ld (hl),b ;1be1 70 p nop ;1be2 00 . ld l,(hl) ;1be3 6e n ld l,a ;1be4 6f o ld l,(hl) ;1be5 6e n ld (hl),e ;1be6 73 s ld (hl),h ;1be7 74 t ld l,a ;1be8 6f o ld (hl),b ;1be9 70 p nop ;1bea 00 . halt ;1beb 76 v ld h,l ;1bec 65 e ld (hl),d ;1bed 72 r ld l,c ;1bee 69 i ld h,(hl) ;1bef 66 f ld a,c ;1bf0 79 y nop ;1bf1 00 . ld l,(hl) ;1bf2 6e n ld l,a ;1bf3 6f o ld l,(hl) ;1bf4 6e n halt ;1bf5 76 v ld h,l ;1bf6 65 e l1bf7h: ld (hl),d ;1bf7 72 r ld l,c ;1bf8 69 i ld h,(hl) ;1bf9 66 f ld a,c ;1bfa 79 y l1bfbh: rst 38h ;1bfb ff . l1bfch: ld l,(hl) ;1bfc 6e n ld l,a ;1bfd 6f o ld l,(hl) ;1bfe 6e n l1bffh: rst 38h ;1bff ff . l1c00h: dec de ;1c00 1b . l1c01h: dec a ;1c01 3d = dec h ;1c02 25 % jr nz,l1c1fh ;1c03 20 1a . rst 38h ;1c05 ff . l1c06h: dec de ;1c06 1b . dec a ;1c07 3d = ld h,020h ;1c08 26 20 & ld a,(de) ;1c0a 1a . rst 38h ;1c0b ff . l1c0ch: dec de ;1c0c 1b . dec a ;1c0d 3d = dec h ;1c0e 25 % ld b,b ;1c0f 40 @ rst 38h ;1c10 ff . l1c11h: dec de ;1c11 1b . dec a ;1c12 3d = dec h ;1c13 25 % ld b,d ;1c14 42 B rst 38h ;1c15 ff . l1c16h: jr nz,$+103 ;1c16 20 65 e ld (hl),d ;1c18 72 r ld (hl),d ;1c19 72 r ld l,a ;1c1a 6f o ld (hl),d ;1c1b 72 r rst 38h ;1c1c ff . rst 38h ;1c1d ff . rst 38h ;1c1e ff . l1c1fh: rst 38h ;1c1f ff . sub_1c20h: ld hl,(0f004h) ;1c20 2a 04 f0 * . . push hl ;1c23 e5 . ex de,hl ;1c24 eb . ld hl,l78f0h ;1c25 21 f0 78 ! . x ld bc,l0080h ;1c28 01 80 00 . . . ldir ;1c2b ed b0 . . xor a ;1c2d af . ld (0f535h),a ;1c2e 32 35 f5 2 5 . l1c31h: pop hl ;1c31 e1 . ld de,l0006h ;1c32 11 06 00 . . . add hl,de ;1c35 19 . push hl ;1c36 e5 . ld de,l0009h+2 ;1c37 11 0b 00 . . . add hl,de ;1c3a 19 . ex de,hl ;1c3b eb . pop hl ;1c3c e1 . ld a,0c3h ;1c3d 3e c3 > . call sub_1c98h ;1c3f cd 98 1c . . . sub_1c42h: ld de,0f330h ;1c42 11 30 f3 . 0 . ld hl,l7f90h ;1c45 21 90 7f ! .  ld bc,00040h ;1c48 01 40 00 . @ . ldir ;1c4b ed b0 . . ; Copy 40h bytes from 7f90h - 7fcfh to f330 - f37fh ret ;1c4d c9 . sub_1c4eh: call l1c82h ;1c4e cd 82 1c . . . ld hl,0ec00h ;1c51 21 00 ec ! . . ld a,0cdh ;1c54 3e cd > . ld de,0ec81h ;1c56 11 81 ec . . . ld c,02bh ;1c59 0e 2b . + l1c5bh: call sub_1c98h ;1c5b cd 98 1c . . . jr nz,l1c5bh ;1c5e 20 fb . ld de,0ec81h ;1c60 11 81 ec . . . ld hl,l7970h ;1c63 21 70 79 ! p y ld bc,00348h ;1c66 01 48 03 . H . ldir ;1c69 ed b0 . . ; Copy 348h bytes from 7970h - 7cb8h to ec81h - efc9h ld de,0eff0h ;1c6b 11 f0 ef . . . ld hl,0efb6h ;1c6e 21 b6 ef ! . . ld bc,l000fh+1 ;1c71 01 10 00 . . . ldir ;1c74 ed b0 . . ; Copy fh bytes from efb6h - efc5h to eff0h - efffh ld de,0f0b0h ;1c76 11 b0 f0 . . . ld hl,l7d40h ;1c79 21 40 7d ! @ } ld bc,00250h ;1c7c 01 50 02 . P . ldir ;1c7f ed b0 . . ; Copy 250h bytes from 7d40h - 7f90h to f0b0h - f3000h ret ;1c81 c9 . l1c82h: ld hl,(0f006h) ;1c82 2a 06 f0 * . . ld a,0c3h ;1c85 3e c3 > . ld de,0ec00h ;1c87 11 00 ec . . . ld c,02bh ;1c8a 0e 2b . + l1c8ch: call sub_1c98h ;1c8c cd 98 1c . . . inc de ;1c8f 13 . inc de ;1c90 13 . inc de ;1c91 13 . jr nz,l1c8ch ;1c92 20 f8 . ld a,0c9h ;1c94 3e c9 > . ld (hl),a ;1c96 77 w ret ;1c97 c9 . sub_1c98h: ld (hl),a ;1c98 77 w inc hl ;1c99 23 # ld (hl),e ;1c9a 73 s inc hl ;1c9b 23 # ld (hl),d ;1c9c 72 r inc hl ;1c9d 23 # dec c ;1c9e 0d . ret ;1c9f c9 . sub_1ca0h: ld de,0f000h ;1ca0 11 00 f0 . . . ld hl,l7cb8h ;1ca3 21 b8 7c ! . | ld bc,l0088h ;1ca6 01 88 00 . . . ldir ;1ca9 ed b0 . . ; Copy 88h bytes from 7cb8h - 7d40h to f000h - f088h ret ;1cab c9 . sub_1cach: ld hl,(0f002h) ;1cac 2a 02 f0 * . . ex de,hl ;1caf eb . ld hl,l7030h ;1cb0 21 30 70 ! 0 p ld bc,l07bbh ;1cb3 01 bb 07 . . . ld (0f6e7h),bc ;1cb6 ed 43 e7 f6 . C . . ld (0f6e9h),de ;1cba ed 53 e9 f6 . S . . ld (0f6ebh),hl ;1cbe 22 eb f6 " . . ld a,d ;1cc1 7a z ld (0f6f1h),a ;1cc2 32 f1 f6 2 . . add hl,bc ;1cc5 09 . l1cc6h: ld c,008h ;1cc6 0e 08 . . ld b,(hl) ;1cc8 46 F ld (0f6edh),bc ;1cc9 ed 43 ed f6 . C . . inc hl ;1ccd 23 # ld (0f6efh),hl ;1cce 22 ef f6 " . . l1cd1h: ld bc,(0f6e7h) ;1cd1 ed 4b e7 f6 . K . . ld a,b ;1cd5 78 x or c ;1cd6 b1 . ret z ;1cd7 c8 . dec bc ;1cd8 0b . ld (0f6e7h),bc ;1cd9 ed 43 e7 f6 . C . . ld de,(0f6e9h) ;1cdd ed 5b e9 f6 . [ . . ld hl,(0f6ebh) ;1ce1 2a eb f6 * . . ld a,(hl) ;1ce4 7e ~ ld (de),a ;1ce5 12 . ld bc,(0f6edh) ;1ce6 ed 4b ed f6 . K . . ld a,b ;1cea 78 x sla a ;1ceb cb 27 . ' ld b,a ;1ced 47 G jr nc,l1cf5h ;1cee 30 05 0 . ld a,(0f6f1h) ;1cf0 3a f1 f6 : . . add a,(hl) ;1cf3 86 . ld (de),a ;1cf4 12 . l1cf5h: inc de ;1cf5 13 . inc hl ;1cf6 23 # ld (0f6ebh),hl ;1cf7 22 eb f6 " . . ld (0f6e9h),de ;1cfa ed 53 e9 f6 . S . . dec c ;1cfe 0d . jr nz,l1d06h ;1cff 20 05 . ld hl,(0f6efh) ;1d01 2a ef f6 * . . jr l1cc6h ;1d04 18 c0 . . l1d06h: ld (0f6edh),bc ;1d06 ed 43 ed f6 . C . . jr l1cd1h ;1d0a 18 c5 . . l1d0ch: ld a,0ffh ;1d0c 3e ff > . ld hl,l1d2ah ;1d0e 21 2a 1d ! * . jr l1d17h ;1d11 18 04 . . l1d13h: xor a ;1d13 af . ld hl,l78f9h ;1d14 21 f9 78 ! . x l1d17h: push hl ;1d17 e5 . ld hl,(0f004h) ;1d18 2a 04 f0 * . . ld de,l0009h ;1d1b 11 09 00 . . . add hl,de ;1d1e 19 . ex de,hl ;1d1f eb . pop hl ;1d20 e1 . ld bc,l0006h+2 ;1d21 01 08 00 . . . ldir ;1d24 ed b0 . . ld (0f535h),a ;1d26 32 35 f5 2 5 . ret ;1d29 c9 . l1d2ah: defb 0fdh,0edh,000h ;illegal sequence ;1d2a fd ed 00 . . . xor 003h ;1d2d ee 03 . . xor 006h ;1d2f ee 06 . . xor 0ffh ;1d31 ee ff . . rst 38h ;1d33 ff . rst 38h ;1d34 ff . l1d35h: rst 38h ;1d35 ff . rst 38h ;1d36 ff . rst 38h ;1d37 ff . call c,00316h ;1d38 dc 16 03 . . . nop ;1d3b 00 . nop ;1d3c 00 . ld bc,l49c3h ;1d3d 01 c3 49 . . I dec e ;1d40 1d . l1d41h: ld e,a ;1d41 5f _ jr nz,l1da7h ;1d42 20 63 c jr nz,$+105 ;1d44 20 67 g jr nz,$+109 ;1d46 20 6b k jr nz,l1d35h ;1d48 20 eb . ld (0f4efh),hl ;1d4a 22 ef f4 " . . ex de,hl ;1d4d eb . ld a,e ;1d4e 7b { ld (0f516h),a ;1d4f 32 16 f5 2 . . ld hl,l0000h ;1d52 21 00 00 ! . . ld (0f4f1h),hl ;1d55 22 f1 f4 " . . add hl,sp ;1d58 39 9 ld (0f4edh),hl ;1d59 22 ed f4 " . . jp l6000h ;1d5c c3 00 60 . . ` l1d5fh: xor a ;1d5f af . ld (0f520h),a ;1d60 32 20 f5 2 . ld (0f51eh),a ;1d63 32 1e f5 2 . . ld hl,l2aach ;1d66 21 ac 2a ! . * push hl ;1d69 e5 . ld a,c ;1d6a 79 y cp 029h ;1d6b fe 29 . ) ret nc ;1d6d d0 . ld c,e ;1d6e 4b K ld hl,l1d7fh ;1d6f 21 7f 1d !  . ld e,a ;1d72 5f _ ld d,000h ;1d73 16 00 . . add hl,de ;1d75 19 . add hl,de ;1d76 19 . ld e,(hl) ;1d77 5e ^ inc hl ;1d78 23 # ld d,(hl) ;1d79 56 V ld hl,(0f4efh) ;1d7a 2a ef f4 * . . ex de,hl ;1d7d eb . jp (hl) ;1d7e e9 . l1d7fh: sra e ;1d7f cb 2b . + nop ;1d81 00 . jr nz,$-54 ;1d82 20 c8 . ld e,006h ;1d84 1e 06 . . jr nz,$-36 ;1d86 20 da . dec hl ;1d88 2b + rst 10h ;1d89 d7 . dec hl ;1d8a 2b + inc c ;1d8b 0c . jr nz,$+39 ;1d8c 20 25 % jr nz,$+45 ;1d8e 20 2b + jr nz,l1dc2h ;1d90 20 30 0 jr nz,$+27 ;1d92 20 19 . rra ;1d94 1f . ld (hl),020h ;1d95 36 20 6 or (hl) ;1d97 b6 . add hl,hl ;1d98 29 ) daa ;1d99 27 ' dec hl ;1d9a 2b + ld a,l ;1d9b 7d }  add hl,hl ;1d9c 29 ) call nc,0dd29h ;1d9d d4 29 dd . ) . add hl,hl ;1da0 29 ) ex (sp),hl ;1da1 e3 . add hl,hl ;1da2 29 ) l1da3h: nop ;1da3 00 . ld hl,(l2a0fh) ;1da4 2a 0f 2a * . * l1da7h: jr l1dd3h ;1da7 18 2a . * ld e,02ah ;1da9 1e 2a . * inc h ;1dab 24 $ ld hl,(l2a2dh) ;1dac 2a 2d 2a * - * ld (hl),02ah ;1daf 36 2a 6 * inc a ;1db1 3c < ld hl,(l2a42h) ;1db2 2a 42 2a * B * ld c,c ;1db5 49 I ld hl,(l2264h) ;1db6 2a 64 22 * d " ld c,a ;1db9 4f O ld hl,(l2a55h) ;1dba 2a 55 2a * U * ld e,(hl) ;1dbd 5e ^ ld hl,(l2a65h) ;1dbe 2a 65 2a * e * ld a,c ;1dc1 79 y l1dc2h: ld hl,(l2a7fh) ;1dc2 2a 7f 2a *  * add a,l ;1dc5 85 . ld hl,(l2946h) ;1dc6 2a 46 29 * F ) adc a,e ;1dc9 8b . ld hl,(l203ch) ;1dca 2a 3c 20 * < inc a ;1dcd 3c < jr nz,l1da3h ;1dce 20 d3 . ld hl,(l0221h) ;1dd0 2a 21 02 * ! . l1dd3h: ld e,0cdh ;1dd3 1e cd . . dec e ;1dd5 1d . ld e,0feh ;1dd6 1e fe . . inc bc ;1dd8 03 . jp z,l2bcbh ;1dd9 ca cb 2b . . + ret ;1ddc c9 . l1dddh: ld hl,l1e0dh ;1ddd 21 0d 1e ! . . ; BDOS ERROR2 (BADSEL) jp l1dech ;1de0 c3 ec 1d . . . l1de3h: ld hl,01e19h ;1de3 21 19 1e ! . . ; BDOS ERROR3 (DISKRO) jp l1dech ;1de6 c3 ec 1d . . . l1de9h: ld hl,l1e14h ;1de9 21 14 1e ! . . ; BDOS ERROR4 (FILERO) l1dech: call sub_1e1dh ;1dec cd 1d 1e . . . ; jp l2bcbh ;1def c3 cb 2b . . + l1df2h: ld b,d ;1df2 42 B ; 'BDOS ERR ON ' ; BDOS BDOSERR ld b,h ;1df3 44 D ld c,a ;1df4 4f O ld d,e ;1df5 53 S jr nz,$+71 ;1df6 20 45 E ld d,d ;1df8 52 R ld d,d ;1df9 52 R jr nz,l1e4bh ;1dfa 20 4f O ld c,(hl) ;1dfc 4e N jr nz,$+38 ;1dfd 20 24 $ l1dffh: ld a,(l2420h) ;1dff 3a 20 24 ; ' : $ ' ; BDOS BDOSDRV ld b,d ;1e02 42 B ; 'BAD SECTOR$' ; BDOS BADSEC ld b,c ;1e03 41 A ld b,h ;1e04 44 D jr nz,l1e5ah ;1e05 20 53 S ld b,l ;1e07 45 E ld b,e ;1e08 43 C ld d,h ;1e09 54 T ld c,a ;1e0a 4f O ld d,d ;1e0b 52 R inc h ;1e0c 24 $ l1e0dh: ld d,e ;1e0d 53 S ; 'SELECT$' ; BDOS BADSEL ld b,l ;1e0e 45 E ld c,h ;1e0f 4c L ld b,l ;1e10 45 E ld b,e ;1e11 43 C ld d,h ;1e12 54 T inc h ;1e13 24 $ l1e14h: ld b,(hl) ;1e14 46 F ; 'FILE ' ; BDOS FILERO ld c,c ;1e15 49 I ld c,h ;1e16 4c L ld b,l ;1e17 45 E jr nz,$+84 ;1e18 20 52 R ; ' R/O$' ; BDOS DISKRO cpl ;1e1a 2f / ld c,a ;1e1b 4f O inc h ;1e1c 24 $ sub_1e1dh: push hl ;1e1d e5 . ; BDOS PRTERR routine call sub_1f01h ;1e1e cd 01 1f . . . call sub_2b38h ;1e21 cd 38 2b . 8 + add a,041h ;1e24 c6 41 . A ld bc,l1df2h ;1e26 01 f2 1d . . . call sub_2071h ;1e29 cd 71 20 . q call sub_1f0bh ;1e2c cd 0b 1f . . . pop bc ;1e2f c1 . call sub_1f0bh ;1e30 cd 0b 1f . . . sub_1e33h: ld hl,0f33ah ;1e33 21 3a f3 ! : . ; BDOS GETCHAR routine ld a,(hl) ;1e36 7e ~ ld (hl),000h ;1e37 36 00 6 . or a ;1e39 b7 . ret nz ;1e3a c0 . jp l2bd1h ;1e3b c3 d1 2b . . + sub_1e3eh: call sub_1e33h ;1e3e cd 33 1e . 3 . ; BDOS GETECHO routine call sub_1e4ch ;1e41 cd 4c 1e . L . ret c ;1e44 d8 . sub_1e45h: push af ;1e45 f5 . ld c,a ;1e46 4f O call sub_1ec8h ;1e47 cd c8 1e . . . pop af ;1e4a f1 . l1e4bh: ret ;1e4b c9 . sub_1e4ch: cp 00dh ;1e4c fe 0d . . ; BDOS CHKCHAR routine ret z ;1e4e c8 . cp 00ah ;1e4f fe 0a . . ret z ;1e51 c8 . cp 009h ;1e52 fe 09 . . ret z ;1e54 c8 . cp 008h ;1e55 fe 08 . . ret z ;1e57 c8 . cp 020h ;1e58 fe 20 . l1e5ah: ret ;1e5a c9 . sub_1e5bh: ld a,(0f33ah) ;1e5b 3a 3a f3 : : . ; BDOS CKCONSOL routine or a ;1e5e b7 . jp nz,l1e7dh ;1e5f c2 7d 1e . } . call sub_2bceh ;1e62 cd ce 2b . . + and 001h ;1e65 e6 01 . . ret z ;1e67 c8 . call l2bd1h ;1e68 cd d1 2b . . + cp 013h ;1e6b fe 13 . . jp nz,l1e7ah ;1e6d c2 7a 1e . z . call l2bd1h ;1e70 cd d1 2b . . + cp 003h ;1e73 fe 03 . . jp z,l2bcbh ;1e75 ca cb 2b . . + xor a ;1e78 af . ret ;1e79 c9 . l1e7ah: ld (0f33ah),a ;1e7a 32 3a f3 2 : . ; BDOS CKCON1 routine l1e7dh: ld a,001h ;1e7d 3e 01 > . ; BDOS CKCON2 routine ret ;1e7f c9 . sub_1e80h: ld a,(0f336h) ;1e80 3a 36 f3 : 6 . ; BDOS OUTCHAR routine or a ;1e83 b7 . jp nz,l1e9ah ;1e84 c2 9a 1e . . . push bc ;1e87 c5 . call sub_1e5bh ;1e88 cd 5b 1e . [ . pop bc ;1e8b c1 . push bc ;1e8c c5 . call sub_2bd4h ;1e8d cd d4 2b . . + pop bc ;1e90 c1 . push bc ;1e91 c5 . ld a,(0f339h) ;1e92 3a 39 f3 : 9 . or a ;1e95 b7 . call nz,sub_2bd7h ;1e96 c4 d7 2b . . + pop bc ;1e99 c1 . l1e9ah: ld a,c ;1e9a 79 y ; BDOS OUTCHR1 routine ld hl,0f338h ;1e9b 21 38 f3 ! 8 . cp 07fh ;1e9e fe 7f .  ret z ;1ea0 c8 . inc (hl) ;1ea1 34 4 cp 020h ;1ea2 fe 20 . ret nc ;1ea4 d0 . dec (hl) ;1ea5 35 5 ld a,(hl) ;1ea6 7e ~ or a ;1ea7 b7 . ret z ;1ea8 c8 . ld a,c ;1ea9 79 y cp 008h ;1eaa fe 08 . . jp nz,l1eb1h ;1eac c2 b1 1e . . . dec (hl) ;1eaf 35 5 ret ;1eb0 c9 . l1eb1h: cp 00ah ;1eb1 fe 0a . . ; BDOS OUTCHR2 routine ret nz ;1eb3 c0 . ld (hl),000h ;1eb4 36 00 6 . ret ;1eb6 c9 . sub_1eb7h: ld a,c ;1eb7 79 y ; BDOS SHOWIT routine call sub_1e4ch ;1eb8 cd 4c 1e . L . jp nc,sub_1ec8h ;1ebb d2 c8 1e . . . push af ;1ebe f5 . ld c,05eh ;1ebf 0e 5e . ^ call sub_1e80h ;1ec1 cd 80 1e . . . pop af ;1ec4 f1 . or 040h ;1ec5 f6 40 . @ ld c,a ;1ec7 4f O sub_1ec8h: ld a,c ;1ec8 79 y ; BDOS OUTCON routine cp 009h ;1ec9 fe 09 . . jp nz,sub_1e80h ;1ecb c2 80 1e . . . l1eceh: ld c,020h ;1ece 0e 20 . ; BDOS OUTCON1 routine call sub_1e80h ;1ed0 cd 80 1e . . . ld a,(0f338h) ;1ed3 3a 38 f3 : 8 . and 007h ;1ed6 e6 07 . . jp nz,l1eceh ;1ed8 c2 ce 1e . . . ret ;1edb c9 . sub_1edch: call sub_1ee4h ;1edc cd e4 1e . . . ; BDOS BACKUP routine ld c,020h ;1edf 0e 20 . call sub_2bd4h ;1ee1 cd d4 2b . . + sub_1ee4h: ld c,008h ;1ee4 0e 08 . . ; BDOS BACKUP1 routine jp sub_2bd4h ;1ee6 c3 d4 2b . . + sub_1ee9h: ld c,023h ;1ee9 0e 23 . # ; BDOS NEWLINE routine call sub_1e80h ;1eeb cd 80 1e . . . call sub_1f01h ;1eee cd 01 1f . . . l1ef1h: ld a,(0f338h) ;1ef1 3a 38 f3 : 8 . ; BDOS NEWLN1 routine ld hl,0f337h ;1ef4 21 37 f3 ! 7 . cp (hl) ;1ef7 be . ret nc ;1ef8 d0 . ld c,020h ;1ef9 0e 20 . call sub_1e80h ;1efb cd 80 1e . . . jp l1ef1h ;1efe c3 f1 1e . . . ; Output a (cr) (lf) to the console device (screen) sub_1f01h: ld c,00dh ;1f01 0e 0d . . ; BDOS OUTCRLF routine call sub_1e80h ;1f03 cd 80 1e . . . ld c,00ah ;1f06 0e 0a . . jp sub_1e80h ;1f08 c3 80 1e . . . ; Print message pointed to by (BC). It will end with a '$'. sub_1f0bh: ld a,(bc) ;1f0b 0a . ; BDOS PRTMESG routine cp 024h ;1f0c fe 24 . $ ret z ;1f0e c8 . inc bc ;1f0f 03 . push bc ;1f10 c5 . ld c,a ;1f11 4f O call sub_1ec8h ;1f12 cd c8 1e . . . pop bc ;1f15 c1 . jp sub_1f0bh ;1f16 c3 0b 1f . . . ; Function to execute a buffered read. l1f19h: ld a,(0f338h) ;1f19 3a 38 f3 : 8 . ; BDOS RDBUFF routine ld (0f337h),a ;1f1c 32 37 f3 2 7 . ld hl,(0f4efh) ;1f1f 2a ef f4 * . . jp l2ae4h ;1f22 c3 e4 2a . . * l1f25h: ld b,000h ;1f25 06 00 . . l1f27h: push bc ;1f27 c5 . ; BDOS RDBUF1 push hl ;1f28 e5 . l1f29h: call sub_1e33h ;1f29 cd 33 1e . 3 . ; BDOS RDBUF2 and 0ffh ;1f2c e6 ff . . pop hl ;1f2e e1 . pop bc ;1f2f c1 . cp 00dh ;1f30 fe 0d . . jp z,l1ff9h ;1f32 ca f9 1f . . . cp 00ah ;1f35 fe 0a . . jp z,l1ff9h ;1f37 ca f9 1f . . . cp 008h ;1f3a fe 08 . . jp nz,l1f4eh ;1f3c c2 4e 1f . N . ld a,b ;1f3f 78 x or a ;1f40 b7 . jp z,l1f27h ;1f41 ca 27 1f . ' . dec b ;1f44 05 . ld a,(0f338h) ;1f45 3a 38 f3 : 8 . ld (0f336h),a ;1f48 32 36 f3 2 6 . jp l1fa8h ;1f4b c3 a8 1f . . . l1f4eh: cp 07fh ;1f4e fe 7f .  ; BDOS RDBUF3 jp nz,l1f5eh ;1f50 c2 5e 1f . ^ . ld a,b ;1f53 78 x or a ;1f54 b7 . jp z,l1f27h ;1f55 ca 27 1f . ' . call sub_2aedh ;1f58 cd ed 2a . . * jp l1fe1h ;1f5b c3 e1 1f . . . l1f5eh: cp 005h ;1f5e fe 05 . . ; BDOS RDBUF4 jp nz,l1f6fh ;1f60 c2 6f 1f . o . push bc ;1f63 c5 . push hl ;1f64 e5 . call sub_1f01h ;1f65 cd 01 1f . . . xor a ;1f68 af . ld (0f337h),a ;1f69 32 37 f3 2 7 . jp l1f29h ;1f6c c3 29 1f . ) . l1f6fh: cp 010h ;1f6f fe 10 . . ; BDOS RDBUF5 jp nz,l1f80h ;1f71 c2 80 1f . . . push hl ;1f74 e5 . ld hl,0f339h ;1f75 21 39 f3 ! 9 . ld a,001h ;1f78 3e 01 > . sub (hl) ;1f7a 96 . ld (hl),a ;1f7b 77 w pop hl ;1f7c e1 . jp l1f27h ;1f7d c3 27 1f . ' . l1f80h: cp 018h ;1f80 fe 18 . . ; BDOS RDBUF6 jp nz,l1f97h ;1f82 c2 97 1f . . . pop hl ;1f85 e1 . l1f86h: ld a,(0f337h) ;1f86 3a 37 f3 : 7 . ; BDOS RDBUF7 ld hl,0f338h ;1f89 21 38 f3 ! 8 . cp (hl) ;1f8c be . jp nc,l1f19h ;1f8d d2 19 1f . . . dec (hl) ;1f90 35 5 call sub_1edch ;1f91 cd dc 1e . . . jp l1f86h ;1f94 c3 86 1f . . . l1f97h: cp 015h ;1f97 fe 15 . . ; BDOS RDBUF8 jp nz,l1fa3h ;1f99 c2 a3 1f . . . call sub_1ee9h ;1f9c cd e9 1e . . . pop hl ;1f9f e1 . jp l1f19h ;1fa0 c3 19 1f . . . l1fa3h: cp 012h ;1fa3 fe 12 . . ; BDOS RDBUF9 jp nz,l1fdeh ;1fa5 c2 de 1f . . . l1fa8h: push bc ;1fa8 c5 . ; BDOS RDBUF10 call sub_1ee9h ;1fa9 cd e9 1e . . . pop bc ;1fac c1 . pop hl ;1fad e1 . push hl ;1fae e5 . push bc ;1faf c5 . l1fb0h: ld a,b ;1fb0 78 x ; BDOS RDBUF11 or a ;1fb1 b7 . jp z,l1fc2h ;1fb2 ca c2 1f . . . call sub_2af5h ;1fb5 cd f5 2a . . * push bc ;1fb8 c5 . push hl ;1fb9 e5 . call sub_1eb7h ;1fba cd b7 1e . . . pop hl ;1fbd e1 . pop bc ;1fbe c1 . jp l1fb0h ;1fbf c3 b0 1f . . . l1fc2h: push hl ;1fc2 e5 . ; BDOS RDBUF12 ld a,(0f336h) ;1fc3 3a 36 f3 : 6 . or a ;1fc6 b7 . jp z,l1f29h ;1fc7 ca 29 1f . ) . ld hl,0f338h ;1fca 21 38 f3 ! 8 . sub (hl) ;1fcd 96 . ld (0f336h),a ;1fce 32 36 f3 2 6 . l1fd1h: call sub_1edch ;1fd1 cd dc 1e . . . ; BDOS RDBUF13 ld hl,0f336h ;1fd4 21 36 f3 ! 6 . dec (hl) ;1fd7 35 5 jp nz,l1fd1h ;1fd8 c2 d1 1f . . . ; Try again jp l1f29h ;1fdb c3 29 1f . ) . ; Next char (RDBUF2) ; Missing: RDBUF14 to RDBUF17 l1fdeh: call sub_2afch ;1fde cd fc 2a . . * ; ?BDOS RDBUF14? l1fe1h: push bc ;1fe1 c5 . ; ?BDOS RDBUF15? push hl ;1fe2 e5 . ld c,a ;1fe3 4f O call sub_1eb7h ;1fe4 cd b7 1e . . . jp l2b04h ;1fe7 c3 04 2b . . + l1feah: cp 003h ;1fea fe 03 . . ld a,b ;1fec 78 x jp nz,l1ff5h ;1fed c2 f5 1f . . . cp 001h ;1ff0 fe 01 . . jp z,l2bcbh ;1ff2 ca cb 2b . . + l1ff5h: cp c ;1ff5 b9 . ; ?BDOS RDBUF16? jp c,l1f27h ;1ff6 da 27 1f . ' . l1ff9h: pop hl ;1ff9 e1 . ; ?BDOS RDBUF17? call sub_2b0ch ;1ffa cd 0c 2b . . + jp sub_1e80h ;1ffd c3 80 1e . . . ; to OUTCHAR ; Function to get a character from the console device. ; or ; Function to get a character from the tape reader device. l2000h: call sub_1e3eh ;2000 cd 3e 1e . > . ; ?BDOS GETCON? ?GETRDR? jp l2039h ;2003 c3 39 20 . 9 l2006h: call sub_2bddh ;2006 cd dd 2b . . + ; BDOS DIRCIO routine jp l2039h ;2009 c3 39 20 . 9 ld a,c ;200c 79 y inc a ;200d 3c < jp z,l2018h ;200e ca 18 20 . . inc a ;2011 3c < jp z,sub_2bceh ;2012 ca ce 2b . . + jp sub_2bd4h ;2015 c3 d4 2b . . + ; JP CONOUT l2018h: call sub_2bceh ;2018 cd ce 2b . . + ; BDOS DIRC1 routine or a ;201b b7 . jp z,l2ac9h ;201c ca c9 2a . . * call l2bd1h ;201f cd d1 2b . . + jp l2039h ;2022 c3 39 20 . 9 ; JP SETSTAT ; Function to set the i/o byte. call sub_204eh ;2025 cd 4e 20 . N ; ?BDOS GETIOB? jp l2039h ;2028 c3 39 20 . 9 ; Function to set the i/o byte. ld a,c ;202b 79 y ; ?BDOS SETIOB? call sub_2054h ;202c cd 54 20 . T ret ;202f c9 . ; Function to print the character string pointed to by (DE) ; on the console device. The string ends with a '$'. ex de,hl ;2030 eb . ; BDOS PRTSTR routine ld c,l ;2031 4d M ld b,h ;2032 44 D jp sub_1f0bh ;2033 c3 0b 1f . . . call sub_1e5bh ;2036 cd 5b 1e . [ . ; BDOS GETCSTS routine l2039h: ld (0f4f1h),a ;2039 32 f1 f4 2 . . ; BDOS SETSTAT routine l203ch: ret ;203c c9 . sub_203dh: ld a,001h ;203d 3e 01 > . jp l2039h ;203f c3 39 20 . 9 l2042h: xor a ;2042 af . ld c,000h ;2043 0e 00 . . ld hl,l0003h+1 ;2045 21 04 00 ! . . call 0ecffh ;2048 cd ff ec . . . jp l1dddh ;204b c3 dd 1d . . . sub_204eh: ld ix,0ecf9h ;204e dd 21 f9 ec . ! . . jr l2058h ;2052 18 04 . . sub_2054h: ld ix,0ecffh ;2054 dd 21 ff ec . ! . . l2058h: ld hl,l0003h ;2058 21 03 00 ! . . ld c,000h ;205b 0e 00 . . jp (ix) ;205d dd e9 . . l205fh: ld de,l0000h ;205f 11 00 00 . . . ld a,(l0211h) ;2062 3a 11 02 : . . nop ;2065 00 . ld a,(l0410h+1) ;2066 3a 11 04 : . . nop ;2069 00 . ld a,(l0611h) ;206a 3a 11 06 Point to " ENTER DAY (0 to 6)" nop ;206d 00 . jp 0edd5h ;206e c3 d5 ed . . . sub_2071h: push af ;2071 f5 . call sub_1f0bh ;2072 cd 0b 1f . . . pop af ;2075 f1 . call sub_1e45h ;2076 cd 45 1e . E . ld bc,l1dffh ;2079 01 ff 1d . . . ret ;207c c9 . rst 38h ;207d ff . rst 38h ;207e ff . sub_207fh: ld hl,01d43h ;207f 21 43 1d ! C . l2082h: ld e,(hl) ;2082 5e ^ inc hl ;2083 23 # ld d,(hl) ;2084 56 V ex de,hl ;2085 eb . jp (hl) ;2086 e9 . sub_2087h: inc c ;2087 0c . l2088h: dec c ;2088 0d . ret z ;2089 c8 . ld a,(de) ;208a 1a . ld (hl),a ;208b 77 w inc de ;208c 13 . inc hl ;208d 23 # jp l2088h ;208e c3 88 20 . . sub_2091h: ld a,(0f33ch) ;2091 3a 3c f3 : < . ld c,a ;2094 4f O call sub_2be3h ;2095 cd e3 2b . . + ld a,h ;2098 7c | or l ;2099 b5 . ret z ;209a c8 . ld e,(hl) ;209b 5e ^ inc hl ;209c 23 # ld d,(hl) ;209d 56 V inc hl ;209e 23 # ld (0f4f3h),hl ;209f 22 f3 f4 " . . inc hl ;20a2 23 # inc hl ;20a3 23 # ld (0f4f5h),hl ;20a4 22 f5 f4 " . . inc hl ;20a7 23 # inc hl ;20a8 23 # ld (0f4f7h),hl ;20a9 22 f7 f4 " . . inc hl ;20ac 23 # inc hl ;20ad 23 # ex de,hl ;20ae eb . ld (0f510h),hl ;20af 22 10 f5 " . . ld hl,0f4f9h ;20b2 21 f9 f4 ! . . ld c,008h ;20b5 0e 08 . . call sub_2087h ;20b7 cd 87 20 . . ld hl,(0f4fbh) ;20ba 2a fb f4 * . . ex de,hl ;20bd eb . ld hl,0f501h ;20be 21 01 f5 ! . . ld c,00fh ;20c1 0e 0f . . call sub_2087h ;20c3 cd 87 20 . . ld hl,(0f506h) ;20c6 2a 06 f5 * . . ld a,h ;20c9 7c | ld hl,0f51dh ;20ca 21 1d f5 ! . . ld (hl),0ffh ;20cd 36 ff 6 . or a ;20cf b7 . jp z,l20d5h ;20d0 ca d5 20 . . ld (hl),000h ;20d3 36 00 6 . l20d5h: ld a,0ffh ;20d5 3e ff > . or a ;20d7 b7 . ret ;20d8 c9 . sub_20d9h: call sub_2be0h ;20d9 cd e0 2b . . + xor a ;20dc af . ld hl,(0f4f5h) ;20dd 2a f5 f4 * . . ld (hl),a ;20e0 77 w inc hl ;20e1 23 # ld (hl),a ;20e2 77 w ld hl,(0f4f7h) ;20e3 2a f7 f4 * . . ld (hl),a ;20e6 77 w inc hl ;20e7 23 # ld (hl),a ;20e8 77 w ret ;20e9 c9 . sub_20eah: call sub_2befh ;20ea cd ef 2b . . + jp l20f3h ;20ed c3 f3 20 . . sub_20f0h: call sub_2bf2h ;20f0 cd f2 2b . . + l20f3h: or a ;20f3 b7 . ret z ;20f4 c8 . ld hl,l1d41h ;20f5 21 41 1d ! A . jp l2082h ;20f8 c3 82 20 . . sub_20fbh: ld hl,(0f52ah) ;20fb 2a 2a f5 * * . ld c,002h ;20fe 0e 02 . . call sub_2222h ;2100 cd 22 22 . " " ld (0f525h),hl ;2103 22 25 f5 " % . ld (0f52ch),hl ;2106 22 2c f5 " , . sub_2109h: ld hl,0f525h ;2109 21 25 f5 ! % . ld c,(hl) ;210c 4e N inc hl ;210d 23 # ld b,(hl) ;210e 46 F ld hl,(0f4f7h) ;210f 2a f7 f4 * . . ld e,(hl) ;2112 5e ^ inc hl ;2113 23 # ld d,(hl) ;2114 56 V ld hl,(0f4f5h) ;2115 2a f5 f4 * . . ld a,(hl) ;2118 7e ~ inc hl ;2119 23 # ld h,(hl) ;211a 66 f ld l,a ;211b 6f o l211ch: ld a,c ;211c 79 y sub e ;211d 93 . ld a,b ;211e 78 x sbc a,d ;211f 9a . jp nc,l2132h ;2120 d2 32 21 . 2 ! push hl ;2123 e5 . ld hl,(0f501h) ;2124 2a 01 f5 * . . ld a,e ;2127 7b { sub l ;2128 95 . ld e,a ;2129 5f _ ld a,d ;212a 7a z sbc a,h ;212b 9c . ld d,a ;212c 57 W pop hl ;212d e1 . dec hl ;212e 2b + jp l211ch ;212f c3 1c 21 . . ! l2132h: push hl ;2132 e5 . ld hl,(0f501h) ;2133 2a 01 f5 * . . add hl,de ;2136 19 . jp c,l2147h ;2137 da 47 21 . G ! ld a,c ;213a 79 y sub l ;213b 95 . ld a,b ;213c 78 x sbc a,h ;213d 9c . jp c,l2147h ;213e da 47 21 . G ! ex de,hl ;2141 eb . pop hl ;2142 e1 . inc hl ;2143 23 # jp l2132h ;2144 c3 32 21 . 2 ! l2147h: pop hl ;2147 e1 . push bc ;2148 c5 . push de ;2149 d5 . push hl ;214a e5 . ex de,hl ;214b eb . ld hl,(0f50eh) ;214c 2a 0e f5 * . . add hl,de ;214f 19 . ld b,h ;2150 44 D ld c,l ;2151 4d M call sub_2be6h ;2152 cd e6 2b . . + pop de ;2155 d1 . ld hl,(0f4f5h) ;2156 2a f5 f4 * . . ld (hl),e ;2159 73 s inc hl ;215a 23 # ld (hl),d ;215b 72 r pop de ;215c d1 . ld hl,(0f4f7h) ;215d 2a f7 f4 * . . ld (hl),e ;2160 73 s inc hl ;2161 23 # ld (hl),d ;2162 72 r pop bc ;2163 c1 . ld a,c ;2164 79 y sub e ;2165 93 . ld c,a ;2166 4f O ld a,b ;2167 78 x sbc a,d ;2168 9a . ld b,a ;2169 47 G ld hl,(0f510h) ;216a 2a 10 f5 * . . ex de,hl ;216d eb . call sub_2bf8h ;216e cd f8 2b . . + ld c,l ;2171 4d M ld b,h ;2172 44 D jp l2be9h ;2173 c3 e9 2b . . + sub_2176h: ld hl,0f503h ;2176 21 03 f5 ! . . ld c,(hl) ;2179 4e N ld a,(0f523h) ;217a 3a 23 f5 : # . l217dh: or a ;217d b7 . rra ;217e 1f . dec c ;217f 0d . jp nz,l217dh ;2180 c2 7d 21 . } ! ld b,a ;2183 47 G ld a,008h ;2184 3e 08 > . sub (hl) ;2186 96 . ld c,a ;2187 4f O ld a,(0f522h) ;2188 3a 22 f5 : " . l218bh: dec c ;218b 0d . jp z,l2194h ;218c ca 94 21 . . ! or a ;218f b7 . rla ;2190 17 . jp l218bh ;2191 c3 8b 21 . . ! l2194h: add a,b ;2194 80 . ret ;2195 c9 . sub_2196h: ld hl,(0f4efh) ;2196 2a ef f4 * . . ld de,l000fh+1 ;2199 11 10 00 . . . add hl,de ;219c 19 . add hl,bc ;219d 09 . ld a,(0f51dh) ;219e 3a 1d f5 : . . or a ;21a1 b7 . jp z,l21a9h ;21a2 ca a9 21 . . ! ld l,(hl) ;21a5 6e n ld h,000h ;21a6 26 00 & . ret ;21a8 c9 . l21a9h: add hl,bc ;21a9 09 . ld e,(hl) ;21aa 5e ^ inc hl ;21ab 23 # ld d,(hl) ;21ac 56 V ex de,hl ;21ad eb . ret ;21ae c9 . sub_21afh: call sub_2176h ;21af cd 76 21 . v ! ld c,a ;21b2 4f O ld b,000h ;21b3 06 00 . . call sub_2196h ;21b5 cd 96 21 . . ! ld (0f525h),hl ;21b8 22 25 f5 " % . ret ;21bb c9 . sub_21bch: ld hl,(0f525h) ;21bc 2a 25 f5 * % . ld a,l ;21bf 7d } or h ;21c0 b4 . ret ;21c1 c9 . sub_21c2h: ld a,(0f503h) ;21c2 3a 03 f5 : . . ld hl,(0f525h) ;21c5 2a 25 f5 * % . l21c8h: add hl,hl ;21c8 29 ) dec a ;21c9 3d = jp nz,l21c8h ;21ca c2 c8 21 . . ! ld (0f527h),hl ;21cd 22 27 f5 " ' . ld a,(0f504h) ;21d0 3a 04 f5 : . . ld c,a ;21d3 4f O ld a,(0f523h) ;21d4 3a 23 f5 : # . and c ;21d7 a1 . or l ;21d8 b5 . ld l,a ;21d9 6f o ld (0f525h),hl ;21da 22 25 f5 " % . ret ;21dd c9 . sub_21deh: ld hl,(0f4efh) ;21de 2a ef f4 * . . ld de,l000ch ;21e1 11 0c 00 . . . add hl,de ;21e4 19 . ret ;21e5 c9 . sub_21e6h: ld hl,(0f4efh) ;21e6 2a ef f4 * . . ld de,l000fh ;21e9 11 0f 00 . . . add hl,de ;21ec 19 . ex de,hl ;21ed eb . ld hl,l000fh+2 ;21ee 21 11 00 ! . . add hl,de ;21f1 19 . ret ;21f2 c9 . sub_21f3h: call sub_21e6h ;21f3 cd e6 21 . . ! ld a,(hl) ;21f6 7e ~ ld (0f523h),a ;21f7 32 23 f5 2 # . ex de,hl ;21fa eb . ld a,(hl) ;21fb 7e ~ ld (0f521h),a ;21fc 32 21 f5 2 ! . l21ffh: call sub_21deh ;21ff cd de 21 . . ! ld a,(0f505h) ;2202 3a 05 f5 : . . and (hl) ;2205 a6 . ld (0f522h),a ;2206 32 22 f5 2 " . ret ;2209 c9 . l220ah: call sub_21e6h ;220a cd e6 21 . . ! ld a,(0f515h) ;220d 3a 15 f5 : . . cp 002h ;2210 fe 02 . . jp nz,l2216h ;2212 c2 16 22 . . " xor a ;2215 af . l2216h: ld c,a ;2216 4f O ld a,(0f523h) ;2217 3a 23 f5 : # . add a,c ;221a 81 . ld (hl),a ;221b 77 w ex de,hl ;221c eb . ld a,(0f521h) ;221d 3a 21 f5 : ! . ld (hl),a ;2220 77 w ret ;2221 c9 . sub_2222h: inc c ;2222 0c . l2223h: dec c ;2223 0d . ret z ;2224 c8 . ld a,h ;2225 7c | or a ;2226 b7 . rra ;2227 1f . ld h,a ;2228 67 g ld a,l ;2229 7d } rra ;222a 1f . ld l,a ;222b 6f o jp l2223h ;222c c3 23 22 . # " sub_222fh: ld c,080h ;222f 0e 80 . . ld hl,(0f4f9h) ;2231 2a f9 f4 * . . xor a ;2234 af . l2235h: add a,(hl) ;2235 86 . inc hl ;2236 23 # dec c ;2237 0d . jp nz,l2235h ;2238 c2 35 22 . 5 " ret ;223b c9 . sub_223ch: inc c ;223c 0c . l223dh: dec c ;223d 0d . ret z ;223e c8 . add hl,hl ;223f 29 ) jp l223dh ;2240 c3 3d 22 . = " sub_2243h: push bc ;2243 c5 . ld a,(0f33ch) ;2244 3a 3c f3 : < . ld c,a ;2247 4f O ld hl,l0000h+1 ;2248 21 01 00 ! . . call sub_223ch ;224b cd 3c 22 . < " pop bc ;224e c1 . ld a,c ;224f 79 y or l ;2250 b5 . ld l,a ;2251 6f o ld a,b ;2252 78 x or h ;2253 b4 . ld h,a ;2254 67 g ret ;2255 c9 . sub_2256h: ld hl,(0f33eh) ;2256 2a 3e f3 * > . ld a,(0f33ch) ;2259 3a 3c f3 : < . ld c,a ;225c 4f O call sub_2222h ;225d cd 22 22 . " " ld a,l ;2260 7d } and 001h ;2261 e6 01 . . ret ;2263 c9 . l2264h: ld hl,0f33eh ;2264 21 3e f3 ! > . ld c,(hl) ;2267 4e N inc hl ;2268 23 # ld b,(hl) ;2269 46 F call sub_2243h ;226a cd 43 22 . C " ld (0f33eh),hl ;226d 22 3e f3 " > . ld hl,(0f508h) ;2270 2a 08 f5 * . . inc hl ;2273 23 # ex de,hl ;2274 eb . ld hl,(0f4f3h) ;2275 2a f3 f4 * . . ld (hl),e ;2278 73 s inc hl ;2279 23 # ld (hl),d ;227a 72 r ret ;227b c9 . sub_227ch: call sub_2296h ;227c cd 96 22 . . " sub_227fh: ld de,l0009h ;227f 11 09 00 . . . add hl,de ;2282 19 . ld a,(hl) ;2283 7e ~ rla ;2284 17 . ret nc ;2285 d0 . ld hl,01d47h ;2286 21 47 1d ! G . jp l2082h ;2289 c3 82 20 . . sub_228ch: call sub_2256h ;228c cd 56 22 . V " ret z ;228f c8 . ld hl,01d45h ;2290 21 45 1d ! E . jp l2082h ;2293 c3 82 20 . . sub_2296h: ld hl,(0f4f9h) ;2296 2a f9 f4 * . . ld a,(0f529h) ;2299 3a 29 f5 : ) . sub_229ch: add a,l ;229c 85 . ld l,a ;229d 6f o ret nc ;229e d0 . inc h ;229f 24 $ ret ;22a0 c9 . sub_22a1h: ld hl,(0f4efh) ;22a1 2a ef f4 * . . ld de,l000ch+2 ;22a4 11 0e 00 . . . add hl,de ;22a7 19 . ld a,(hl) ;22a8 7e ~ ret ;22a9 c9 . sub_22aah: call sub_22a1h ;22aa cd a1 22 . . " ld (hl),000h ;22ad 36 00 6 . ret ;22af c9 . sub_22b0h: call sub_22a1h ;22b0 cd a1 22 . . " or 080h ;22b3 f6 80 . . ld (hl),a ;22b5 77 w ret ;22b6 c9 . sub_22b7h: ld hl,(0f52ah) ;22b7 2a 2a f5 * * . ex de,hl ;22ba eb . ld hl,(0f4f3h) ;22bb 2a f3 f4 * . . ld a,e ;22be 7b { sub (hl) ;22bf 96 . inc hl ;22c0 23 # ld a,d ;22c1 7a z sbc a,(hl) ;22c2 9e . ret ;22c3 c9 . sub_22c4h: call sub_22b7h ;22c4 cd b7 22 . . " ret c ;22c7 d8 . inc de ;22c8 13 . ld (hl),d ;22c9 72 r dec hl ;22ca 2b + ld (hl),e ;22cb 73 s ret ;22cc c9 . sub_22cdh: ld a,e ;22cd 7b { sub l ;22ce 95 . ld l,a ;22cf 6f o ld a,d ;22d0 7a z sbc a,h ;22d1 9c . ld h,a ;22d2 67 g ret ;22d3 c9 . sub_22d4h: ld c,0ffh ;22d4 0e ff . . l22d6h: ld hl,(0f52ch) ;22d6 2a 2c f5 * , . ex de,hl ;22d9 eb . ld hl,(0f50ch) ;22da 2a 0c f5 * . . l22ddh: call sub_22cdh ;22dd cd cd 22 . . " ret nc ;22e0 d0 . push bc ;22e1 c5 . call sub_222fh ;22e2 cd 2f 22 . / " ld hl,(0f4fdh) ;22e5 2a fd f4 * . . ex de,hl ;22e8 eb . ld hl,(0f52ch) ;22e9 2a 2c f5 * , . add hl,de ;22ec 19 . pop bc ;22ed c1 . inc c ;22ee 0c . jp z,l22fch ;22ef ca fc 22 . . " cp (hl) ;22f2 be . ret z ;22f3 c8 . call sub_22b7h ;22f4 cd b7 22 . . " ret nc ;22f7 d0 . call l2264h ;22f8 cd 64 22 . d " ret ;22fb c9 . l22fch: ld (hl),a ;22fc 77 w l22fdh: ret ;22fd c9 . sub_22feh: call sub_22d4h ;22fe cd d4 22 . . " call sub_2318h ;2301 cd 18 23 . . # ld c,001h ;2304 0e 01 . . call sub_20f0h ;2306 cd f0 20 . . jp l2312h ;2309 c3 12 23 . . # sub_230ch: call sub_2318h ;230c cd 18 23 . . # call sub_20eah ;230f cd ea 20 . . l2312h: ld hl,0f342h ;2312 21 42 f3 ! B . jp l231bh ;2315 c3 1b 23 . . # sub_2318h: ld hl,0f4f9h ;2318 21 f9 f4 ! . . l231bh: ld c,(hl) ;231b 4e N inc hl ;231c 23 # ld b,(hl) ;231d 46 F jp l2bech ;231e c3 ec 2b . . + l2321h: ld hl,(0f4f9h) ;2321 2a f9 f4 * . . ex de,hl ;2324 eb . ld hl,(0f342h) ;2325 2a 42 f3 * B . ld c,080h ;2328 0e 80 . . jp sub_2087h ;232a c3 87 20 . . sub_232dh: ld hl,0f52ah ;232d 21 2a f5 ! * . ld a,(hl) ;2330 7e ~ inc hl ;2331 23 # cp (hl) ;2332 be . ret nz ;2333 c0 . inc a ;2334 3c < ret ;2335 c9 . l2336h: ld hl,0ffffh ;2336 21 ff ff ! . . ld (0f52ah),hl ;2339 22 2a f5 " * . ret ;233c c9 . sub_233dh: ld hl,(0f508h) ;233d 2a 08 f5 * . . ex de,hl ;2340 eb . ld hl,(0f52ah) ;2341 2a 2a f5 * * . inc hl ;2344 23 # ld (0f52ah),hl ;2345 22 2a f5 " * . call sub_22cdh ;2348 cd cd 22 . . " jp nc,l2351h ;234b d2 51 23 . Q # jp l2336h ;234e c3 36 23 . 6 # l2351h: ld a,(0f52ah) ;2351 3a 2a f5 : * . and 003h ;2354 e6 03 . . ld b,005h ;2356 06 05 . . l2358h: add a,a ;2358 87 . dec b ;2359 05 . jp nz,l2358h ;235a c2 58 23 . X # ld (0f529h),a ;235d 32 29 f5 2 ) . or a ;2360 b7 . ret nz ;2361 c0 . push bc ;2362 c5 . call sub_20fbh ;2363 cd fb 20 . . call sub_230ch ;2366 cd 0c 23 . . # pop bc ;2369 c1 . jp l22d6h ;236a c3 d6 22 . . " sub_236dh: ld a,c ;236d 79 y and 007h ;236e e6 07 . . inc a ;2370 3c < ld e,a ;2371 5f _ ld d,a ;2372 57 W ld a,c ;2373 79 y rrca ;2374 0f . rrca ;2375 0f . rrca ;2376 0f . and 01fh ;2377 e6 1f . . ld c,a ;2379 4f O ld a,b ;237a 78 x add a,a ;237b 87 . add a,a ;237c 87 . add a,a ;237d 87 . add a,a ;237e 87 . add a,a ;237f 87 . or c ;2380 b1 . ld c,a ;2381 4f O ld a,b ;2382 78 x rrca ;2383 0f . rrca ;2384 0f . rrca ;2385 0f . and 01fh ;2386 e6 1f . . ld b,a ;2388 47 G ld hl,(0f4ffh) ;2389 2a ff f4 * . . add hl,bc ;238c 09 . ld a,(hl) ;238d 7e ~ l238eh: rlca ;238e 07 . dec e ;238f 1d . jp nz,l238eh ;2390 c2 8e 23 . . # ret ;2393 c9 . sub_2394h: push de ;2394 d5 . call sub_236dh ;2395 cd 6d 23 . m # and 0feh ;2398 e6 fe . . pop bc ;239a c1 . or c ;239b b1 . l239ch: rrca ;239c 0f . dec d ;239d 15 . jp nz,l239ch ;239e c2 9c 23 . . # ld (hl),a ;23a1 77 w ret ;23a2 c9 . sub_23a3h: call sub_2296h ;23a3 cd 96 22 . . " ld de,l000fh+1 ;23a6 11 10 00 . . . add hl,de ;23a9 19 . push bc ;23aa c5 . ld c,011h ;23ab 0e 11 . . l23adh: pop de ;23ad d1 . dec c ;23ae 0d . ret z ;23af c8 . push de ;23b0 d5 . ld a,(0f51dh) ;23b1 3a 1d f5 : . . or a ;23b4 b7 . jp z,l23c0h ;23b5 ca c0 23 . . # push bc ;23b8 c5 . push hl ;23b9 e5 . ld c,(hl) ;23ba 4e N ld b,000h ;23bb 06 00 . . jp l23c6h ;23bd c3 c6 23 . . # l23c0h: dec c ;23c0 0d . push bc ;23c1 c5 . ld c,(hl) ;23c2 4e N inc hl ;23c3 23 # ld b,(hl) ;23c4 46 F push hl ;23c5 e5 . l23c6h: ld a,c ;23c6 79 y or b ;23c7 b0 . jp z,l23d5h ;23c8 ca d5 23 . . # ld hl,(0f506h) ;23cb 2a 06 f5 * . . ld a,l ;23ce 7d } sub c ;23cf 91 . ld a,h ;23d0 7c | sbc a,b ;23d1 98 . call nc,sub_2394h ;23d2 d4 94 23 . . # l23d5h: pop hl ;23d5 e1 . inc hl ;23d6 23 # pop bc ;23d7 c1 . jp l23adh ;23d8 c3 ad 23 . . # l23dbh: ld hl,(0f506h) ;23db 2a 06 f5 * . . ld c,003h ;23de 0e 03 . . call sub_2222h ;23e0 cd 22 22 . " " inc hl ;23e3 23 # ld b,h ;23e4 44 D ld c,l ;23e5 4d M ld hl,(0f4ffh) ;23e6 2a ff f4 * . . l23e9h: ld (hl),000h ;23e9 36 00 6 . inc hl ;23eb 23 # dec bc ;23ec 0b . ld a,b ;23ed 78 x or c ;23ee b1 . jp nz,l23e9h ;23ef c2 e9 23 . . # ld hl,(0f50ah) ;23f2 2a 0a f5 * . . ex de,hl ;23f5 eb . ld hl,(0f4ffh) ;23f6 2a ff f4 * . . ld (hl),e ;23f9 73 s inc hl ;23fa 23 # ld (hl),d ;23fb 72 r call sub_20d9h ;23fc cd d9 20 . . ld hl,(0f4f3h) ;23ff 2a f3 f4 * . . ld (hl),003h ;2402 36 03 6 . inc hl ;2404 23 # ld (hl),000h ;2405 36 00 6 . call l2336h ;2407 cd 36 23 . 6 # l240ah: ld c,0ffh ;240a 0e ff . . call sub_233dh ;240c cd 3d 23 . = # call sub_232dh ;240f cd 2d 23 . - # ret z ;2412 c8 . call sub_2296h ;2413 cd 96 22 . . " ld a,0e5h ;2416 3e e5 > . cp (hl) ;2418 be . jp z,l240ah ;2419 ca 0a 24 . . $ ld a,(0f33bh) ;241c 3a 3b f3 : ; . cp (hl) ;241f be . l2420h: jp nz,l242eh ;2420 c2 2e 24 . . $ inc hl ;2423 23 # ld a,(hl) ;2424 7e ~ sub 024h ;2425 d6 24 . $ jp nz,l242eh ;2427 c2 2e 24 . . $ dec a ;242a 3d = ld (0f4f1h),a ;242b 32 f1 f4 2 . . l242eh: ld c,001h ;242e 0e 01 . . call sub_23a3h ;2430 cd a3 23 . . # call sub_22c4h ;2433 cd c4 22 . . " jp l240ah ;2436 c3 0a 24 . . $ l2439h: ld a,(0f514h) ;2439 3a 14 f5 : . . jp l2039h ;243c c3 39 20 . 9 sub_243fh: push bc ;243f c5 . push af ;2440 f5 . ld a,(0f505h) ;2441 3a 05 f5 : . . cpl ;2444 2f / ld b,a ;2445 47 G ld a,c ;2446 79 y and b ;2447 a0 . ld c,a ;2448 4f O pop af ;2449 f1 . and b ;244a a0 . sub c ;244b 91 . and 01fh ;244c e6 1f . . pop bc ;244e c1 . ret ;244f c9 . sub_2450h: ld a,0ffh ;2450 3e ff > . ld (0f514h),a ;2452 32 14 f5 2 . . ld hl,0f518h ;2455 21 18 f5 ! . . ld (hl),c ;2458 71 q ld hl,(0f4efh) ;2459 2a ef f4 * . . ld (0f519h),hl ;245c 22 19 f5 " . . call l2336h ;245f cd 36 23 . 6 # call sub_20d9h ;2462 cd d9 20 . . l2465h: ld c,000h ;2465 0e 00 . . call sub_233dh ;2467 cd 3d 23 . = # call sub_232dh ;246a cd 2d 23 . - # jp z,l24cch ;246d ca cc 24 . . $ ld hl,(0f519h) ;2470 2a 19 f5 * . . ex de,hl ;2473 eb . ld a,(de) ;2474 1a . cp 0e5h ;2475 fe e5 . . jp z,l2482h ;2477 ca 82 24 . . $ push de ;247a d5 . call sub_22b7h ;247b cd b7 22 . . " pop de ;247e d1 . jp nc,l24cch ;247f d2 cc 24 . . $ l2482h: call sub_2296h ;2482 cd 96 22 . . " ld a,(0f518h) ;2485 3a 18 f5 : . . ld c,a ;2488 4f O ld b,000h ;2489 06 00 . . l248bh: ld a,c ;248b 79 y or a ;248c b7 . jp z,l24bbh ;248d ca bb 24 . . $ ld a,(de) ;2490 1a . cp 03fh ;2491 fe 3f . ? jp z,l24b4h ;2493 ca b4 24 . . $ ld a,b ;2496 78 x cp 00dh ;2497 fe 0d . . jp z,l24b4h ;2499 ca b4 24 . . $ cp 00ch ;249c fe 0c . . ld a,(de) ;249e 1a . jp z,l24abh ;249f ca ab 24 . . $ sub (hl) ;24a2 96 . and 07fh ;24a3 e6 7f .  jp nz,l2465h ;24a5 c2 65 24 . e $ jp l24b4h ;24a8 c3 b4 24 . . $ l24abh: push bc ;24ab c5 . ld c,(hl) ;24ac 4e N call sub_243fh ;24ad cd 3f 24 . ? $ pop bc ;24b0 c1 . jp nz,l2465h ;24b1 c2 65 24 . e $ l24b4h: inc de ;24b4 13 . inc hl ;24b5 23 # inc b ;24b6 04 . dec c ;24b7 0d . jp l248bh ;24b8 c3 8b 24 . . $ l24bbh: ld a,(0f52ah) ;24bb 3a 2a f5 : * . and 003h ;24be e6 03 . . ld (0f4f1h),a ;24c0 32 f1 f4 2 . . ld hl,0f514h ;24c3 21 14 f5 ! . . ld a,(hl) ;24c6 7e ~ rla ;24c7 17 . ret nc ;24c8 d0 . xor a ;24c9 af . ld (hl),a ;24ca 77 w ret ;24cb c9 . l24cch: call l2336h ;24cc cd 36 23 . 6 # ld a,0ffh ;24cf 3e ff > . jp l2039h ;24d1 c3 39 20 . 9 sub_24d4h: call sub_228ch ;24d4 cd 8c 22 . . " ld c,00ch ;24d7 0e 0c . . call sub_2450h ;24d9 cd 50 24 . P $ l24dch: call sub_232dh ;24dc cd 2d 23 . - # ret z ;24df c8 . call sub_227ch ;24e0 cd 7c 22 . | " call sub_2296h ;24e3 cd 96 22 . . " ld (hl),0e5h ;24e6 36 e5 6 . ld c,000h ;24e8 0e 00 . . call sub_23a3h ;24ea cd a3 23 . . # call sub_22feh ;24ed cd fe 22 . . " call l2465h ;24f0 cd 65 24 . e $ jp l24dch ;24f3 c3 dc 24 . . $ sub_24f6h: ld d,b ;24f6 50 P ld e,c ;24f7 59 Y l24f8h: ld a,c ;24f8 79 y or b ;24f9 b0 . jp z,l2509h ;24fa ca 09 25 . . % dec bc ;24fd 0b . push de ;24fe d5 . push bc ;24ff c5 . call sub_236dh ;2500 cd 6d 23 . m # rra ;2503 1f . jp nc,l2524h ;2504 d2 24 25 . $ % pop bc ;2507 c1 . pop de ;2508 d1 . l2509h: ld hl,(0f506h) ;2509 2a 06 f5 * . . ld a,e ;250c 7b { sub l ;250d 95 . ld a,d ;250e 7a z sbc a,h ;250f 9c . jp nc,l252ch ;2510 d2 2c 25 . , % inc de ;2513 13 . push bc ;2514 c5 . push de ;2515 d5 . ld b,d ;2516 42 B ld c,e ;2517 4b K call sub_236dh ;2518 cd 6d 23 . m # rra ;251b 1f . jp nc,l2524h ;251c d2 24 25 . $ % pop de ;251f d1 . pop bc ;2520 c1 . jp l24f8h ;2521 c3 f8 24 . . $ l2524h: rla ;2524 17 . inc a ;2525 3c < call l239ch ;2526 cd 9c 23 . . # pop hl ;2529 e1 . pop de ;252a d1 . ret ;252b c9 . l252ch: ld a,c ;252c 79 y or b ;252d b0 . jp nz,l24f8h ;252e c2 f8 24 . . $ ld hl,l0000h ;2531 21 00 00 ! . . ret ;2534 c9 . sub_2535h: ld c,000h ;2535 0e 00 . . ld e,020h ;2537 1e 20 . sub_2539h: push de ;2539 d5 . ld b,000h ;253a 06 00 . . ld hl,(0f4efh) ;253c 2a ef f4 * . . add hl,bc ;253f 09 . ex de,hl ;2540 eb . call sub_2296h ;2541 cd 96 22 . . " pop bc ;2544 c1 . call sub_2087h ;2545 cd 87 20 . . l2548h: call sub_20fbh ;2548 cd fb 20 . . jp sub_22feh ;254b c3 fe 22 . . " sub_254eh: call sub_228ch ;254e cd 8c 22 . . " ld c,00ch ;2551 0e 0c . . call sub_2450h ;2553 cd 50 24 . P $ ld hl,(0f4efh) ;2556 2a ef f4 * . . ld a,(hl) ;2559 7e ~ ld de,l000fh+1 ;255a 11 10 00 . . . add hl,de ;255d 19 . ld (hl),a ;255e 77 w l255fh: call sub_232dh ;255f cd 2d 23 . - # ret z ;2562 c8 . call sub_227ch ;2563 cd 7c 22 . | " ld c,010h ;2566 0e 10 . . ld e,00ch ;2568 1e 0c . . call sub_2539h ;256a cd 39 25 . 9 % call l2465h ;256d cd 65 24 . e $ jp l255fh ;2570 c3 5f 25 . _ % sub_2573h: ld c,00ch ;2573 0e 0c . . call sub_2450h ;2575 cd 50 24 . P $ l2578h: call sub_232dh ;2578 cd 2d 23 . - # ret z ;257b c8 . ld c,000h ;257c 0e 00 . . ld e,00ch ;257e 1e 0c . . call sub_2539h ;2580 cd 39 25 . 9 % call l2465h ;2583 cd 65 24 . e $ jp l2578h ;2586 c3 78 25 . x % sub_2589h: ld c,00fh ;2589 0e 0f . . call sub_2450h ;258b cd 50 24 . P $ call sub_232dh ;258e cd 2d 23 . - # ret z ;2591 c8 . sub_2592h: call sub_21deh ;2592 cd de 21 . . ! ld a,(hl) ;2595 7e ~ push af ;2596 f5 . push hl ;2597 e5 . call sub_2296h ;2598 cd 96 22 . . " ex de,hl ;259b eb . ld hl,(0f4efh) ;259c 2a ef f4 * . . ld c,020h ;259f 0e 20 . push de ;25a1 d5 . call sub_2087h ;25a2 cd 87 20 . . call sub_22b0h ;25a5 cd b0 22 . . " pop de ;25a8 d1 . ld hl,l000ch ;25a9 21 0c 00 ! . . add hl,de ;25ac 19 . ld c,(hl) ;25ad 4e N ld hl,l000fh ;25ae 21 0f 00 ! . . add hl,de ;25b1 19 . ld b,(hl) ;25b2 46 F pop hl ;25b3 e1 . pop af ;25b4 f1 . ld (hl),a ;25b5 77 w ld a,c ;25b6 79 y cp (hl) ;25b7 be . ld a,b ;25b8 78 x jp z,l25c3h ;25b9 ca c3 25 . . % ld a,000h ;25bc 3e 00 > . jp c,l25c3h ;25be da c3 25 . . % ld a,080h ;25c1 3e 80 > . l25c3h: ld hl,(0f4efh) ;25c3 2a ef f4 * . . ld de,l000fh ;25c6 11 0f 00 . . . add hl,de ;25c9 19 . ld (hl),a ;25ca 77 w ret ;25cb c9 . sub_25cch: ld a,(hl) ;25cc 7e ~ inc hl ;25cd 23 # or (hl) ;25ce b6 . dec hl ;25cf 2b + ret nz ;25d0 c0 . ld a,(de) ;25d1 1a . ld (hl),a ;25d2 77 w inc de ;25d3 13 . inc hl ;25d4 23 # ld a,(de) ;25d5 1a . ld (hl),a ;25d6 77 w dec de ;25d7 1b . dec hl ;25d8 2b + ret ;25d9 c9 . sub_25dah: xor a ;25da af . ld (0f4f1h),a ;25db 32 f1 f4 2 . . ld (0f52ah),a ;25de 32 2a f5 2 * . ld (0f52bh),a ;25e1 32 2b f5 2 + . call sub_2256h ;25e4 cd 56 22 . V " ret nz ;25e7 c0 . call sub_22a1h ;25e8 cd a1 22 . . " and 080h ;25eb e6 80 . . ret nz ;25ed c0 . ld c,00fh ;25ee 0e 0f . . call sub_2450h ;25f0 cd 50 24 . P $ call sub_232dh ;25f3 cd 2d 23 . - # ret z ;25f6 c8 . ld bc,l000fh+1 ;25f7 01 10 00 . . . call sub_2296h ;25fa cd 96 22 . . " add hl,bc ;25fd 09 . ex de,hl ;25fe eb . ld hl,(0f4efh) ;25ff 2a ef f4 * . . add hl,bc ;2602 09 . ld c,010h ;2603 0e 10 . . l2605h: ld a,(0f51dh) ;2605 3a 1d f5 : . . or a ;2608 b7 . jp z,l2620h ;2609 ca 20 26 . & ld a,(hl) ;260c 7e ~ or a ;260d b7 . ld a,(de) ;260e 1a . jp nz,l2613h ;260f c2 13 26 . . & ld (hl),a ;2612 77 w l2613h: or a ;2613 b7 . jp nz,l2619h ;2614 c2 19 26 . . & ld a,(hl) ;2617 7e ~ ld (de),a ;2618 12 . l2619h: cp (hl) ;2619 be . jp nz,l2657h ;261a c2 57 26 . W & jp l2635h ;261d c3 35 26 . 5 & l2620h: call sub_25cch ;2620 cd cc 25 . . % ex de,hl ;2623 eb . call sub_25cch ;2624 cd cc 25 . . % ex de,hl ;2627 eb . ld a,(de) ;2628 1a . cp (hl) ;2629 be . jp nz,l2657h ;262a c2 57 26 . W & inc de ;262d 13 . inc hl ;262e 23 # ld a,(de) ;262f 1a . cp (hl) ;2630 be . jp nz,l2657h ;2631 c2 57 26 . W & dec c ;2634 0d . l2635h: inc de ;2635 13 . inc hl ;2636 23 # dec c ;2637 0d . jp nz,l2605h ;2638 c2 05 26 . . & ld bc,0ffech ;263b 01 ec ff . . . add hl,bc ;263e 09 . ex de,hl ;263f eb . add hl,bc ;2640 09 . ld a,(de) ;2641 1a . cp (hl) ;2642 be . jp c,l264fh ;2643 da 4f 26 . O & ld (hl),a ;2646 77 w ld bc,l0003h ;2647 01 03 00 . . . add hl,bc ;264a 09 . ex de,hl ;264b eb . add hl,bc ;264c 09 . ld a,(hl) ;264d 7e ~ ld (de),a ;264e 12 . l264fh: ld a,0ffh ;264f 3e ff > . ld (0f512h),a ;2651 32 12 f5 2 . . jp l2548h ;2654 c3 48 25 . H % l2657h: ld hl,0f4f1h ;2657 21 f1 f4 ! . . dec (hl) ;265a 35 5 ret ;265b c9 . sub_265ch: call sub_228ch ;265c cd 8c 22 . . " ld hl,(0f4efh) ;265f 2a ef f4 * . . push hl ;2662 e5 . ld hl,0f33dh ;2663 21 3d f3 ! = . ld (0f4efh),hl ;2666 22 ef f4 " . . ld c,001h ;2669 0e 01 . . call sub_2450h ;266b cd 50 24 . P $ call sub_232dh ;266e cd 2d 23 . - # pop hl ;2671 e1 . ld (0f4efh),hl ;2672 22 ef f4 " . . ret z ;2675 c8 . ex de,hl ;2676 eb . ld hl,l000fh ;2677 21 0f 00 ! . . add hl,de ;267a 19 . ld c,011h ;267b 0e 11 . . xor a ;267d af . l267eh: ld (hl),a ;267e 77 w inc hl ;267f 23 # dec c ;2680 0d . jp nz,l267eh ;2681 c2 7e 26 . ~ & ld hl,l000ch+1 ;2684 21 0d 00 ! . . add hl,de ;2687 19 . ld (hl),a ;2688 77 w call sub_22c4h ;2689 cd c4 22 . . " call sub_2535h ;268c cd 35 25 . 5 % jp sub_22b0h ;268f c3 b0 22 . . " sub_2692h: xor a ;2692 af . ld (0f512h),a ;2693 32 12 f5 2 . . call sub_25dah ;2696 cd da 25 . . % call sub_232dh ;2699 cd 2d 23 . - # ret z ;269c c8 . ld hl,(0f4efh) ;269d 2a ef f4 * . . ld bc,l000ch ;26a0 01 0c 00 . . . add hl,bc ;26a3 09 . ld a,(hl) ;26a4 7e ~ inc a ;26a5 3c < and 01fh ;26a6 e6 1f . . ld (hl),a ;26a8 77 w jp z,l26bbh ;26a9 ca bb 26 . . & ld b,a ;26ac 47 G ld a,(0f505h) ;26ad 3a 05 f5 : . . and b ;26b0 a0 . ld hl,0f512h ;26b1 21 12 f5 ! . . and (hl) ;26b4 a6 . jp z,l26c6h ;26b5 ca c6 26 . . & jp l26e4h ;26b8 c3 e4 26 . . & l26bbh: ld bc,l0000h+2 ;26bb 01 02 00 . . . add hl,bc ;26be 09 . inc (hl) ;26bf 34 4 ld a,(hl) ;26c0 7e ~ and 00fh ;26c1 e6 0f . . jp z,l26eeh ;26c3 ca ee 26 . . & l26c6h: ld c,00fh ;26c6 0e 0f . . call sub_2450h ;26c8 cd 50 24 . P $ call sub_232dh ;26cb cd 2d 23 . - # jp nz,l26e4h ;26ce c2 e4 26 . . & ld a,(0f513h) ;26d1 3a 13 f5 : . . inc a ;26d4 3c < jp z,l26eeh ;26d5 ca ee 26 . . & call sub_265ch ;26d8 cd 5c 26 . \ & call sub_232dh ;26db cd 2d 23 . - # jp z,l26eeh ;26de ca ee 26 . . & jp l26e7h ;26e1 c3 e7 26 . . & l26e4h: call sub_2592h ;26e4 cd 92 25 . . % l26e7h: call sub_21f3h ;26e7 cd f3 21 . . ! xor a ;26ea af . jp l2039h ;26eb c3 39 20 . 9 l26eeh: call sub_203dh ;26ee cd 3d 20 . = jp sub_22b0h ;26f1 c3 b0 22 . . " l26f4h: ld a,001h ;26f4 3e 01 > . ld (0f515h),a ;26f6 32 15 f5 2 . . sub_26f9h: ld a,0ffh ;26f9 3e ff > . ld (0f513h),a ;26fb 32 13 f5 2 . . call sub_21f3h ;26fe cd f3 21 . . ! ld a,(0f523h) ;2701 3a 23 f5 : # . l2704h: ld hl,0f521h ;2704 21 21 f5 ! ! . cp (hl) ;2707 be . jp c,l271eh ;2708 da 1e 27 . . ' cp 080h ;270b fe 80 . . jp nz,l2733h ;270d c2 33 27 . 3 ' l2710h: call sub_2692h ;2710 cd 92 26 . . & xor a ;2713 af . ld (0f523h),a ;2714 32 23 f5 2 # . ld a,(0f4f1h) ;2717 3a f1 f4 : . . or a ;271a b7 . jp nz,l2733h ;271b c2 33 27 . 3 ' l271eh: call sub_21afh ;271e cd af 21 . . ! call sub_21bch ;2721 cd bc 21 . . ! jp z,l2733h ;2724 ca 33 27 . 3 ' call sub_21c2h ;2727 cd c2 21 . . ! call sub_2109h ;272a cd 09 21 . . ! call sub_20eah ;272d cd ea 20 . . jp l220ah ;2730 c3 0a 22 . . " l2733h: jp sub_203dh ;2733 c3 3d 20 . = l2736h: ld a,001h ;2736 3e 01 > . ld (0f515h),a ;2738 32 15 f5 2 . . sub_273bh: ld a,000h ;273b 3e 00 > . ld (0f513h),a ;273d 32 13 f5 2 . . call sub_228ch ;2740 cd 8c 22 . . " ld hl,(0f4efh) ;2743 2a ef f4 * . . call sub_227fh ;2746 cd 7f 22 .  " call sub_21f3h ;2749 cd f3 21 . . ! ld a,(0f523h) ;274c 3a 23 f5 : # . cp 080h ;274f fe 80 . . jp nc,sub_203dh ;2751 d2 3d 20 . = call sub_21afh ;2754 cd af 21 . . ! call sub_21bch ;2757 cd bc 21 . . ! ld c,000h ;275a 0e 00 . . jp nz,l27a6h ;275c c2 a6 27 . . ' call sub_2176h ;275f cd 76 21 . v ! ld (0f517h),a ;2762 32 17 f5 2 . . ld bc,l0000h ;2765 01 00 00 . . . or a ;2768 b7 . jp z,l2773h ;2769 ca 73 27 . s ' ld c,a ;276c 4f O dec bc ;276d 0b . call sub_2196h ;276e cd 96 21 . . ! ld b,h ;2771 44 D ld c,l ;2772 4d M l2773h: call sub_24f6h ;2773 cd f6 24 . . $ ld a,l ;2776 7d } or h ;2777 b4 . jp nz,l2780h ;2778 c2 80 27 . . ' ld a,002h ;277b 3e 02 > . jp l2039h ;277d c3 39 20 . 9 l2780h: ld (0f525h),hl ;2780 22 25 f5 " % . ex de,hl ;2783 eb . ld hl,(0f4efh) ;2784 2a ef f4 * . . ld bc,l000fh+1 ;2787 01 10 00 . . . add hl,bc ;278a 09 . ld a,(0f51dh) ;278b 3a 1d f5 : . . or a ;278e b7 . ld a,(0f517h) ;278f 3a 17 f5 : . . jp z,l279ch ;2792 ca 9c 27 . . ' call sub_229ch ;2795 cd 9c 22 . . " ld (hl),e ;2798 73 s jp l27a4h ;2799 c3 a4 27 . . ' l279ch: ld c,a ;279c 4f O ld b,000h ;279d 06 00 . . add hl,bc ;279f 09 . add hl,bc ;27a0 09 . ld (hl),e ;27a1 73 s inc hl ;27a2 23 # ld (hl),d ;27a3 72 r l27a4h: ld c,002h ;27a4 0e 02 . . l27a6h: ld a,(0f4f1h) ;27a6 3a f1 f4 : . . or a ;27a9 b7 . ret nz ;27aa c0 . push bc ;27ab c5 . call sub_21c2h ;27ac cd c2 21 . . ! ld a,(0f515h) ;27af 3a 15 f5 : . . dec a ;27b2 3d = dec a ;27b3 3d = jp nz,l27f3h ;27b4 c2 f3 27 . . ' pop bc ;27b7 c1 . push bc ;27b8 c5 . ld a,c ;27b9 79 y dec a ;27ba 3d = dec a ;27bb 3d = jp nz,l27f3h ;27bc c2 f3 27 . . ' push hl ;27bf e5 . ld hl,(0f4f9h) ;27c0 2a f9 f4 * . . ld d,a ;27c3 57 W l27c4h: ld (hl),a ;27c4 77 w inc hl ;27c5 23 # inc d ;27c6 14 . jp p,l27c4h ;27c7 f2 c4 27 . . ' call sub_2318h ;27ca cd 18 23 . . # ld hl,(0f527h) ;27cd 2a 27 f5 * ' . ld c,002h ;27d0 0e 02 . . l27d2h: ld (0f525h),hl ;27d2 22 25 f5 " % . push bc ;27d5 c5 . call sub_2109h ;27d6 cd 09 21 . . ! pop bc ;27d9 c1 . call sub_20f0h ;27da cd f0 20 . . ld hl,(0f525h) ;27dd 2a 25 f5 * % . ld c,000h ;27e0 0e 00 . . ld a,(0f504h) ;27e2 3a 04 f5 : . . ld b,a ;27e5 47 G and l ;27e6 a5 . cp b ;27e7 b8 . inc hl ;27e8 23 # jp nz,l27d2h ;27e9 c2 d2 27 . . ' pop hl ;27ec e1 . ld (0f525h),hl ;27ed 22 25 f5 " % . call l2312h ;27f0 cd 12 23 . . # l27f3h: call sub_2109h ;27f3 cd 09 21 . . ! pop bc ;27f6 c1 . push bc ;27f7 c5 . call sub_20f0h ;27f8 cd f0 20 . . pop bc ;27fb c1 . ld a,(0f523h) ;27fc 3a 23 f5 : # . ld hl,0f521h ;27ff 21 21 f5 ! ! . cp (hl) ;2802 be . jp c,l280ah ;2803 da 0a 28 . . ( ld (hl),a ;2806 77 w inc (hl) ;2807 34 4 ld c,002h ;2808 0e 02 . . l280ah: nop ;280a 00 . nop ;280b 00 . ld hl,l0000h ;280c 21 00 00 ! . . push af ;280f f5 . call sub_22a1h ;2810 cd a1 22 . . " and 07fh ;2813 e6 7f .  ld (hl),a ;2815 77 w pop af ;2816 f1 . cp 07fh ;2817 fe 7f .  jp nz,l2838h ;2819 c2 38 28 . 8 ( ld a,(0f515h) ;281c 3a 15 f5 : . . cp 001h ;281f fe 01 . . jp nz,l2838h ;2821 c2 38 28 . 8 ( call l220ah ;2824 cd 0a 22 . . " l2827h: call sub_2692h ;2827 cd 92 26 . . & ld hl,0f4f1h ;282a 21 f1 f4 ! . . ld a,(hl) ;282d 7e ~ or a ;282e b7 . jp nz,l2836h ;282f c2 36 28 . 6 ( dec a ;2832 3d = ld (0f523h),a ;2833 32 23 f5 2 # . l2836h: ld (hl),000h ;2836 36 00 6 . l2838h: jp l220ah ;2838 c3 0a 22 . . " sub_283bh: xor a ;283b af . ld (0f515h),a ;283c 32 15 f5 2 . . sub_283fh: push bc ;283f c5 . ld hl,(0f4efh) ;2840 2a ef f4 * . . ex de,hl ;2843 eb . ld hl,l0021h ;2844 21 21 00 ! ! . add hl,de ;2847 19 . ld a,(hl) ;2848 7e ~ and 07fh ;2849 e6 7f .  push af ;284b f5 . ld a,(hl) ;284c 7e ~ rla ;284d 17 . inc hl ;284e 23 # ld a,(hl) ;284f 7e ~ rla ;2850 17 . and 01fh ;2851 e6 1f . . ld c,a ;2853 4f O ld a,(hl) ;2854 7e ~ rra ;2855 1f . rra ;2856 1f . rra ;2857 1f . rra ;2858 1f . and 00fh ;2859 e6 0f . . ld b,a ;285b 47 G pop af ;285c f1 . inc hl ;285d 23 # ld l,(hl) ;285e 6e n inc l ;285f 2c , dec l ;2860 2d - ld l,006h ;2861 2e 06 . . jp nz,l28c3h ;2863 c2 c3 28 . . ( ld hl,00020h ;2866 21 20 00 ! . add hl,de ;2869 19 . ld (hl),a ;286a 77 w ld hl,l000ch ;286b 21 0c 00 ! . . add hl,de ;286e 19 . ld a,c ;286f 79 y sub (hl) ;2870 96 . jp nz,l287fh ;2871 c2 7f 28 .  ( ld hl,l000ch+2 ;2874 21 0e 00 ! . . add hl,de ;2877 19 . ld a,b ;2878 78 x sub (hl) ;2879 96 . and 07fh ;287a e6 7f .  jp z,l28b7h ;287c ca b7 28 . . ( l287fh: push bc ;287f c5 . push de ;2880 d5 . call sub_25dah ;2881 cd da 25 . . % pop de ;2884 d1 . pop bc ;2885 c1 . ld l,003h ;2886 2e 03 . . ld a,(0f4f1h) ;2888 3a f1 f4 : . . inc a ;288b 3c < jp z,l28bch ;288c ca bc 28 . . ( ld hl,l000ch ;288f 21 0c 00 ! . . add hl,de ;2892 19 . ld (hl),c ;2893 71 q ld hl,l000ch+2 ;2894 21 0e 00 ! . . add hl,de ;2897 19 . ld (hl),b ;2898 70 p call sub_2589h ;2899 cd 89 25 . . % ld a,(0f4f1h) ;289c 3a f1 f4 : . . inc a ;289f 3c < jp nz,l28b7h ;28a0 c2 b7 28 . . ( pop bc ;28a3 c1 . push bc ;28a4 c5 . ld l,004h ;28a5 2e 04 . . inc c ;28a7 0c . jp z,l28bch ;28a8 ca bc 28 . . ( call sub_265ch ;28ab cd 5c 26 . \ & ld l,005h ;28ae 2e 05 . . ld a,(0f4f1h) ;28b0 3a f1 f4 : . . inc a ;28b3 3c < jp z,l28bch ;28b4 ca bc 28 . . ( l28b7h: pop bc ;28b7 c1 . xor a ;28b8 af . jp l2039h ;28b9 c3 39 20 . 9 l28bch: push hl ;28bc e5 . call sub_22a1h ;28bd cd a1 22 . . " ld (hl),0c0h ;28c0 36 c0 6 . pop hl ;28c2 e1 . l28c3h: pop bc ;28c3 c1 . ld a,l ;28c4 7d } ld (0f4f1h),a ;28c5 32 f1 f4 2 . . jp sub_22b0h ;28c8 c3 b0 22 . . " l28cbh: ld c,0ffh ;28cb 0e ff . . call sub_283bh ;28cd cd 3b 28 . ; ( call z,sub_26f9h ;28d0 cc f9 26 . . & ret ;28d3 c9 . l28d4h: ld c,000h ;28d4 0e 00 . . call sub_283bh ;28d6 cd 3b 28 . ; ( call z,sub_273bh ;28d9 cc 3b 27 . ; ' ret ;28dc c9 . sub_28ddh: ex de,hl ;28dd eb . add hl,de ;28de 19 . ld c,(hl) ;28df 4e N ld b,000h ;28e0 06 00 . . ld hl,l000ch ;28e2 21 0c 00 ! . . add hl,de ;28e5 19 . ld a,(hl) ;28e6 7e ~ rrca ;28e7 0f . and 080h ;28e8 e6 80 . . add a,c ;28ea 81 . ld c,a ;28eb 4f O ld a,000h ;28ec 3e 00 > . adc a,b ;28ee 88 . ld b,a ;28ef 47 G ld a,(hl) ;28f0 7e ~ rrca ;28f1 0f . and 00fh ;28f2 e6 0f . . add a,b ;28f4 80 . ld b,a ;28f5 47 G ld hl,l000ch+2 ;28f6 21 0e 00 ! . . add hl,de ;28f9 19 . ld a,(hl) ;28fa 7e ~ add a,a ;28fb 87 . add a,a ;28fc 87 . add a,a ;28fd 87 . add a,a ;28fe 87 . push af ;28ff f5 . add a,b ;2900 80 . ld b,a ;2901 47 G push af ;2902 f5 . pop hl ;2903 e1 . ld a,l ;2904 7d } pop hl ;2905 e1 . or l ;2906 b5 . and 001h ;2907 e6 01 . . ret ;2909 c9 . l290ah: ld c,00ch ;290a 0e 0c . . call sub_2450h ;290c cd 50 24 . P $ ld hl,(0f4efh) ;290f 2a ef f4 * . . ld de,l0021h ;2912 11 21 00 . ! . add hl,de ;2915 19 . push hl ;2916 e5 . ld (hl),d ;2917 72 r inc hl ;2918 23 # ld (hl),d ;2919 72 r inc hl ;291a 23 # ld (hl),d ;291b 72 r l291ch: call sub_232dh ;291c cd 2d 23 . - # jp z,l2944h ;291f ca 44 29 . D ) call sub_2296h ;2922 cd 96 22 . . " ld de,l000fh ;2925 11 0f 00 . . . call sub_28ddh ;2928 cd dd 28 . . ( pop hl ;292b e1 . push hl ;292c e5 . ld e,a ;292d 5f _ ld a,c ;292e 79 y sub (hl) ;292f 96 . inc hl ;2930 23 # ld a,b ;2931 78 x sbc a,(hl) ;2932 9e . inc hl ;2933 23 # ld a,e ;2934 7b { sbc a,(hl) ;2935 9e . jp c,l293eh ;2936 da 3e 29 . > ) ld (hl),e ;2939 73 s dec hl ;293a 2b + ld (hl),b ;293b 70 p dec hl ;293c 2b + ld (hl),c ;293d 71 q l293eh: call l2465h ;293e cd 65 24 . e $ jp l291ch ;2941 c3 1c 29 . . ) l2944h: pop hl ;2944 e1 . ret ;2945 c9 . l2946h: ld hl,(0f4efh) ;2946 2a ef f4 * . . ld de,00020h ;2949 11 20 00 . . call sub_28ddh ;294c cd dd 28 . . ( ld hl,l0021h ;294f 21 21 00 ! ! . add hl,de ;2952 19 . ld (hl),c ;2953 71 q inc hl ;2954 23 # ld (hl),b ;2955 70 p inc hl ;2956 23 # ld (hl),a ;2957 77 w ret ;2958 c9 . l2959h: ld hl,(0f340h) ;2959 2a 40 f3 * @ . ld a,(0f33ch) ;295c 3a 3c f3 : < . ld c,a ;295f 4f O call sub_2222h ;2960 cd 22 22 . " " push hl ;2963 e5 . ex de,hl ;2964 eb . call sub_2091h ;2965 cd 91 20 . . pop hl ;2968 e1 . call z,sub_207fh ;2969 cc 7f 20 .  ld a,l ;296c 7d } rra ;296d 1f . ret c ;296e d8 . ld hl,(0f340h) ;296f 2a 40 f3 * @ . ld c,l ;2972 4d M ld b,h ;2973 44 D call sub_2243h ;2974 cd 43 22 . C " ld (0f340h),hl ;2977 22 40 f3 " @ . jp l23dbh ;297a c3 db 23 . . # sub_297dh: ld a,(0f516h) ;297d 3a 16 f5 : . . ld hl,0f33ch ;2980 21 3c f3 ! < . cp (hl) ;2983 be . ret z ;2984 c8 . ld b,(hl) ;2985 46 F jp l2b30h ;2986 c3 30 2b . 0 + sub_2989h: ld a,0ffh ;2989 3e ff > . ld (0f51eh),a ;298b 32 1e f5 2 . . ld hl,(0f4efh) ;298e 2a ef f4 * . . ld a,(hl) ;2991 7e ~ and 01fh ;2992 e6 1f . . dec a ;2994 3d = ld (0f516h),a ;2995 32 16 f5 2 . . cp 01eh ;2998 fe 1e . . jp nc,l29adh ;299a d2 ad 29 . . ) ld a,(0f33ch) ;299d 3a 3c f3 : < . ld (0f51fh),a ;29a0 32 1f f5 2 . . ld a,(hl) ;29a3 7e ~ ld (0f520h),a ;29a4 32 20 f5 2 . and 0e0h ;29a7 e6 e0 . . ld (hl),a ;29a9 77 w call sub_297dh ;29aa cd 7d 29 . } ) l29adh: ld a,(0f33bh) ;29ad 3a 3b f3 : ; . ld hl,(0f4efh) ;29b0 2a ef f4 * . . or (hl) ;29b3 b6 . ld (hl),a ;29b4 77 w ret ;29b5 c9 . ld a,022h ;29b6 3e 22 > " jp l2039h ;29b8 c3 39 20 . 9 l29bbh: ld hl,l0000h ;29bb 21 00 00 ! . . ld (0f340h),hl ;29be 22 40 f3 " @ . ld hl,(0f33eh) ;29c1 2a 3e f3 * > . xor a ;29c4 af . ld (0f33ch),a ;29c5 32 3c f3 2 < . ld hl,l0080h ;29c8 21 80 00 ! . . call sub_2b1dh ;29cb cd 1d 2b . . + call l2312h ;29ce cd 12 23 . . # jp l2959h ;29d1 c3 59 29 . Y ) call sub_22aah ;29d4 cd aa 22 . . " call sub_2989h ;29d7 cd 89 29 . . ) jp sub_2589h ;29da c3 89 25 . . % call sub_2989h ;29dd cd 89 29 . . ) jp sub_25dah ;29e0 c3 da 25 . . % ld c,000h ;29e3 0e 00 . . ex de,hl ;29e5 eb . ld a,(hl) ;29e6 7e ~ cp 03fh ;29e7 fe 3f . ? jp z,l29fah ;29e9 ca fa 29 . . ) call sub_21deh ;29ec cd de 21 . . ! ld a,(hl) ;29ef 7e ~ cp 03fh ;29f0 fe 3f . ? call nz,sub_22aah ;29f2 c4 aa 22 . . " call sub_2989h ;29f5 cd 89 29 . . ) ld c,00fh ;29f8 0e 0f . . l29fah: call sub_2450h ;29fa cd 50 24 . P $ jp l2321h ;29fd c3 21 23 . ! # l2a00h: ld hl,(0f519h) ;2a00 2a 19 f5 * . . ld (0f4efh),hl ;2a03 22 ef f4 " . . call sub_2989h ;2a06 cd 89 29 . . ) call l2465h ;2a09 cd 65 24 . e $ jp l2321h ;2a0c c3 21 23 . ! # l2a0fh: call sub_2989h ;2a0f cd 89 29 . . ) call sub_24d4h ;2a12 cd d4 24 . . $ jp l2439h ;2a15 c3 39 24 . 9 $ call sub_2989h ;2a18 cd 89 29 . . ) jp l26f4h ;2a1b c3 f4 26 . . & call sub_2989h ;2a1e cd 89 29 . . ) jp l2736h ;2a21 c3 36 27 . 6 ' call sub_22aah ;2a24 cd aa 22 . . " call sub_2989h ;2a27 cd 89 29 . . ) l2a2ah: jp sub_265ch ;2a2a c3 5c 26 . \ & l2a2dh: call sub_2989h ;2a2d cd 89 29 . . ) call sub_254eh ;2a30 cd 4e 25 . N % jp l2439h ;2a33 c3 39 24 . 9 $ ld hl,(0f340h) ;2a36 2a 40 f3 * @ . jp l2a61h ;2a39 c3 61 2a . a * ld a,(0f33ch) ;2a3c 3a 3c f3 : < . jp l2039h ;2a3f c3 39 20 . 9 l2a42h: ex de,hl ;2a42 eb . call sub_2b1dh ;2a43 cd 1d 2b . . + jp l2312h ;2a46 c3 12 23 . . # ld hl,(0f4ffh) ;2a49 2a ff f4 * . . jp l2a61h ;2a4c c3 61 2a . a * ld hl,(0f33eh) ;2a4f 2a 3e f3 * > . jp l2a61h ;2a52 c3 61 2a . a * l2a55h: call sub_2989h ;2a55 cd 89 29 . . ) call sub_2573h ;2a58 cd 73 25 . s % jp l2439h ;2a5b c3 39 24 . 9 $ ld hl,(0f4fbh) ;2a5e 2a fb f4 * . . l2a61h: ld (0f4f1h),hl ;2a61 22 f1 f4 " . . ret ;2a64 c9 . l2a65h: ld a,(0f516h) ;2a65 3a 16 f5 : . . cp 0ffh ;2a68 fe ff . . jp nz,l2a73h ;2a6a c2 73 2a . s * ld a,(0f33bh) ;2a6d 3a 3b f3 : ; . jp l2039h ;2a70 c3 39 20 . 9 l2a73h: and 01fh ;2a73 e6 1f . . ld (0f33bh),a ;2a75 32 3b f3 2 ; . ret ;2a78 c9 . call sub_2989h ;2a79 cd 89 29 . . ) jp l28cbh ;2a7c c3 cb 28 . . ( l2a7fh: call sub_2989h ;2a7f cd 89 29 . . ) jp l28d4h ;2a82 c3 d4 28 . . ( call sub_2989h ;2a85 cd 89 29 . . ) jp l290ah ;2a88 c3 0a 29 . . ) ld hl,(0f4efh) ;2a8b 2a ef f4 * . . ld a,l ;2a8e 7d } cpl ;2a8f 2f / ld e,a ;2a90 5f _ ld a,h ;2a91 7c | cpl ;2a92 2f / ld hl,(0f340h) ;2a93 2a 40 f3 * @ . and h ;2a96 a4 . ld d,a ;2a97 57 W ld a,l ;2a98 7d } and e ;2a99 a3 . ld e,a ;2a9a 5f _ ld hl,(0f33eh) ;2a9b 2a 3e f3 * > . ex de,hl ;2a9e eb . ld (0f340h),hl ;2a9f 22 40 f3 " @ . ld a,l ;2aa2 7d } and e ;2aa3 a3 . ld l,a ;2aa4 6f o ld a,h ;2aa5 7c | and d ;2aa6 a2 . ld h,a ;2aa7 67 g ld (0f33eh),hl ;2aa8 22 3e f3 " > . ret ;2aab c9 . l2aach: ld a,(0f51eh) ;2aac 3a 1e f5 : . . or a ;2aaf b7 . jp z,l2ac9h ;2ab0 ca c9 2a . . * ld hl,(0f4efh) ;2ab3 2a ef f4 * . . ld (hl),000h ;2ab6 36 00 6 . ld a,(0f520h) ;2ab8 3a 20 f5 : . or a ;2abb b7 . jp z,l2ac9h ;2abc ca c9 2a . . * ld (hl),a ;2abf 77 w ld a,(0f51fh) ;2ac0 3a 1f f5 : . . ld (0f516h),a ;2ac3 32 16 f5 2 . . call sub_297dh ;2ac6 cd 7d 29 . } ) l2ac9h: ld hl,(0f4edh) ;2ac9 2a ed f4 * . . ld sp,hl ;2acc f9 . ld hl,(0f4f1h) ;2acd 2a f1 f4 * . . ld a,l ;2ad0 7d } ld b,h ;2ad1 44 D ret ;2ad2 c9 . call sub_2989h ;2ad3 cd 89 29 . . ) ld a,002h ;2ad6 3e 02 > . ld (0f515h),a ;2ad8 32 15 f5 2 . . ld c,000h ;2adb 0e 00 . . call sub_283fh ;2add cd 3f 28 . ? ( call z,sub_273bh ;2ae0 cc 3b 27 . ; ' ret ;2ae3 c9 . l2ae4h: call sub_2b18h ;2ae4 cd 18 2b . . + ld c,a ;2ae7 4f O inc hl ;2ae8 23 # push hl ;2ae9 e5 . jp l1f25h ;2aea c3 25 1f . % . sub_2aedh: push bc ;2aed c5 . call sub_2b18h ;2aee cd 18 2b . . + pop bc ;2af1 c1 . dec b ;2af2 05 . dec hl ;2af3 2b + ret ;2af4 c9 . sub_2af5h: inc hl ;2af5 23 # call sub_2b18h ;2af6 cd 18 2b . . + ld c,a ;2af9 4f O dec b ;2afa 05 . ret ;2afb c9 . sub_2afch: push bc ;2afc c5 . inc hl ;2afd 23 # call sub_2b13h ;2afe cd 13 2b . . + pop bc ;2b01 c1 . inc b ;2b02 04 . ret ;2b03 c9 . l2b04h: pop hl ;2b04 e1 . call sub_2b18h ;2b05 cd 18 2b . . + pop bc ;2b08 c1 . jp l1feah ;2b09 c3 ea 1f . . . sub_2b0ch: ld a,b ;2b0c 78 x call sub_2b13h ;2b0d cd 13 2b . . + ld c,00dh ;2b10 0e 0d . . ret ;2b12 c9 . sub_2b13h: ld c,000h ;2b13 0e 00 . . jp 0ecffh ;2b15 c3 ff ec . . . sub_2b18h: ld c,000h ;2b18 0e 00 . . jp 0ecf9h ;2b1a c3 f9 ec . . . sub_2b1dh: ld (0f344h),hl ;2b1d 22 44 f3 " D . ld hl,0f857h ;2b20 21 57 f8 ! W . ld (0f342h),hl ;2b23 22 42 f3 " B . ret ;2b26 c9 . ld hl,(0f1dah) ;2b27 2a da f1 * . . ld (0f33eh),hl ;2b2a 22 3e f3 " > . jp l29bbh ;2b2d c3 bb 29 . . ) l2b30h: ld (hl),a ;2b30 77 w ld a,b ;2b31 78 x ld (0f52eh),a ;2b32 32 2e f5 2 . . jp l2959h ;2b35 c3 59 29 . Y ) sub_2b38h: ld hl,0f33ch ;2b38 21 3c f3 ! < . ld a,(0f07ah) ;2b3b 3a 7a f0 : z . and 020h ;2b3e e6 20 . jr z,l2b45h ;2b40 28 03 ( . ld hl,0f2deh ;2b42 21 de f2 ! . . l2b45h: ld a,(hl) ;2b45 7e ~ ret ;2b46 c9 . rst 38h ;2b47 ff . sub_2b48h: push af ;2b48 f5 . push hl ;2b49 e5 . ld a,0ffh ;2b4a 3e ff > . ld (0f0b9h),a ;2b4c 32 b9 f0 2 . . ld hl,0f0d9h ;2b4f 21 d9 f0 ! . . set 7,(hl) ;2b52 cb fe . . ld hl,0f0dbh ;2b54 21 db f0 ! . . set 7,(hl) ;2b57 cb fe . . pop hl ;2b59 e1 . pop af ;2b5a f1 . ret ;2b5b c9 . rst 38h ;2b5c ff . rst 38h ;2b5d ff . rst 38h ;2b5e ff . rst 38h ;2b5f ff . rst 38h ;2b60 ff . rst 38h ;2b61 ff . rst 38h ;2b62 ff . rst 38h ;2b63 ff . rst 38h ;2b64 ff . rst 38h ;2b65 ff . rst 38h ;2b66 ff . rst 38h ;2b67 ff . sub_2b68h: push af ;2b68 f5 . push bc ;2b69 c5 . push de ;2b6a d5 . push hl ;2b6b e5 . push ix ;2b6c dd e5 . . push iy ;2b6e fd e5 . . call sub_3461h ;2b70 cd 61 34 . a 4 ld a,(0f10ch) ;2b73 3a 0c f1 : . . or a ;2b76 b7 . jr z,l2b8ah ;2b77 28 11 ( . xor a ;2b79 af . ld (0f10ch),a ;2b7a 32 0c f1 2 . . call 0709bh ;2b7d cd 9b 70 . . p ld c,04ah ;2b80 0e 4a . J call sub_4505h ;2b82 cd 05 45 . . E ld c,042h ;2b85 0e 42 . B call sub_4505h ;2b87 cd 05 45 . . E l2b8ah: ld hl,0f0dbh ;2b8a 21 db f0 ! . . res 7,(hl) ;2b8d cb be . . bit 1,(hl) ;2b8f cb 4e . N jr nz,l2ba7h ;2b91 20 14 . ld a,(0f0dch) ;2b93 3a dc f0 : . . or a ;2b96 b7 . jr z,l2ba7h ;2b97 28 0e ( . and 07dh ;2b99 e6 7d . } ld (0f0dch),a ;2b9b 32 dc f0 2 . . or a ;2b9e b7 . call z,sub_0940h ;2b9f cc 40 09 . @ . ld hl,0f0dah ;2ba2 21 da f0 ! . . res 5,(hl) ;2ba5 cb ae . . l2ba7h: ld hl,0f0d9h ;2ba7 21 d9 f0 ! . . res 7,(hl) ;2baa cb be . . ld a,(0f0dah) ;2bac 3a da f0 : . . or a ;2baf b7 . jr z,l2bbbh ;2bb0 28 09 ( . res 7,a ;2bb2 cb bf . . ld (0f0dah),a ;2bb4 32 da f0 2 . . or a ;2bb7 b7 . call z,sub_2e47h ;2bb8 cc 47 2e . G . l2bbbh: xor a ;2bbb af . ld (0f0b9h),a ;2bbc 32 b9 f0 2 . . pop iy ;2bbf fd e1 . . pop ix ;2bc1 dd e1 . . pop hl ;2bc3 e1 . pop de ;2bc4 d1 . pop bc ;2bc5 c1 . pop af ;2bc6 f1 . ret ;2bc7 c9 . l2bc8h: call sub_2c4ah ;2bc8 cd 4a 2c . J , l2bcbh: call sub_2c4ah ;2bcb cd 4a 2c . J , sub_2bceh: call sub_2c4ah ;2bce cd 4a 2c . J , l2bd1h: call sub_2c4ah ;2bd1 cd 4a 2c . J , sub_2bd4h: call sub_2c4ah ;2bd4 cd 4a 2c . J , sub_2bd7h: call sub_2c4ah ;2bd7 cd 4a 2c . J , call sub_2c4ah ;2bda cd 4a 2c . J , sub_2bddh: call sub_2c4ah ;2bdd cd 4a 2c . J , sub_2be0h: call sub_2c4ah ;2be0 cd 4a 2c . J , sub_2be3h: call sub_2c4ah ;2be3 cd 4a 2c . J , sub_2be6h: call sub_2c4ah ;2be6 cd 4a 2c . J , l2be9h: call sub_2c4ah ;2be9 cd 4a 2c . J , l2bech: call sub_2c4ah ;2bec cd 4a 2c . J , sub_2befh: call sub_2c4ah ;2bef cd 4a 2c . J , sub_2bf2h: call sub_2c4ah ;2bf2 cd 4a 2c . J , call sub_2c4ah ;2bf5 cd 4a 2c . J , sub_2bf8h: call sub_2c4ah ;2bf8 cd 4a 2c . J , call sub_2c4ah ;2bfb cd 4a 2c . J , call sub_2c4ah ;2bfe cd 4a 2c . J , sub_2c01h: call sub_2c4ah ;2c01 cd 4a 2c . J , call sub_2c4ah ;2c04 cd 4a 2c . J , call sub_2c4ah ;2c07 cd 4a 2c . J , call sub_2c4ah ;2c0a cd 4a 2c . J , call sub_2c4ah ;2c0d cd 4a 2c . J , call sub_2c4ah ;2c10 cd 4a 2c . J , call sub_2c4ah ;2c13 cd 4a 2c . J , sub_2c16h: call sub_2c4ah ;2c16 cd 4a 2c . J , call sub_2c4ah ;2c19 cd 4a 2c . J , call sub_2c4ah ;2c1c cd 4a 2c . J , call sub_2c4ah ;2c1f cd 4a 2c . J , call sub_2c4ah ;2c22 cd 4a 2c . J , sub_2c25h: call sub_2c4ah ;2c25 cd 4a 2c . J , sub_2c28h: call sub_2c4ah ;2c28 cd 4a 2c . J , sub_2c2bh: call sub_2c4ah ;2c2b cd 4a 2c . J , sub_2c2eh: call sub_2c4ah ;2c2e cd 4a 2c . J , call sub_2c4ah ;2c31 cd 4a 2c . J , call sub_2c4ah ;2c34 cd 4a 2c . J , call sub_2c4ah ;2c37 cd 4a 2c . J , call sub_2c4ah ;2c3a cd 4a 2c . J , call sub_2c4ah ;2c3d cd 4a 2c . J , call sub_2c4ah ;2c40 cd 4a 2c . J , sub_2c43h: call sub_2c4ah ;2c43 cd 4a 2c . J , sub_2c46h: call sub_2c4ah ;2c46 cd 4a 2c . J , ret ;2c49 c9 . sub_2c4ah: push hl ;2c4a e5 . push hl ;2c4b e5 . push de ;2c4c d5 . ld hl,l0006h ;2c4d 21 06 00 ! . . add hl,sp ;2c50 39 9 ld e,(hl) ;2c51 5e ^ inc hl ;2c52 23 # ld d,(hl) ;2c53 56 V ld hl,l00b5h ;2c54 21 b5 00 ! . . add hl,de ;2c57 19 . ex de,hl ;2c58 eb . ld hl,l0003h+1 ;2c59 21 04 00 ! . . add hl,sp ;2c5c 39 9 ld (hl),e ;2c5d 73 s inc hl ;2c5e 23 # ld (hl),d ;2c5f 72 r ld de,l2c75h ;2c60 11 75 2c . u , inc hl ;2c63 23 # ld (hl),e ;2c64 73 s inc hl ;2c65 23 # ld (hl),d ;2c66 72 r ld (0f53fh),ix ;2c67 dd 22 3f f5 . " ? . ld (0f541h),iy ;2c6b fd 22 41 f5 . " A . call sub_2b48h ;2c6f cd 48 2b . H + pop de ;2c72 d1 . pop hl ;2c73 e1 . ret ;2c74 c9 . l2c75h: ld ix,(0f53fh) ;2c75 dd 2a 3f f5 . * ? . ld iy,(0f541h) ;2c79 fd 2a 41 f5 . * A . jp sub_2b68h ;2c7d c3 68 2b . h + l2c80h: jp l2d01h ;2c80 c3 01 2d . . - jp l2d40h ;2c83 c3 40 2d . @ - jp l35ceh ;2c86 c3 ce 35 . . 5 jp l35f4h ;2c89 c3 f4 35 . . 5 jp l362eh ;2c8c c3 2e 36 . . 6 jp l3642h ;2c8f c3 42 36 . B 6 jp l3661h ;2c92 c3 61 36 . a 6 jp l3654h ;2c95 c3 54 36 . T 6 jp l2f61h ;2c98 c3 61 2f . a / jp l2f6dh ;2c9b c3 6d 2f . m / jp l2fe4h ;2c9e c3 e4 2f . . / jp l2feah ;2ca1 c3 ea 2f . . / jp l2fefh ;2ca4 c3 ef 2f . . / jp l2ffdh ;2ca7 c3 fd 2f . . / jp l2ff6h ;2caa c3 f6 2f . . / jp l40dfh ;2cad c3 df 40 . . @ jp l2ff3h ;2cb0 c3 f3 2f . . / jp l41a0h ;2cb3 c3 a0 41 . . A jp l3670h ;2cb6 c3 70 36 . p 6 jp l389bh ;2cb9 c3 9b 38 . . 8 jp l3ca7h ;2cbc c3 a7 3c . . < jp 03cc1h ;2cbf c3 c1 3c . . < jp l3cc5h ;2cc2 c3 c5 3c . . < jp l40b6h ;2cc5 c3 b6 40 . . @ jp 03cc8h ;2cc8 c3 c8 3c . . < jp l40c5h ;2ccb c3 c5 40 . . @ jp l420dh ;2cce c3 0d 42 . . B ret ;2cd1 c9 . nop ;2cd2 00 . nop ;2cd3 00 . jp l3cd6h ;2cd4 c3 d6 3c . . < ret ;2cd7 c9 . nop ;2cd8 00 . nop ;2cd9 00 . jp l4379h ;2cda c3 79 43 . y C jp 0ecf9h ;2cdd c3 f9 ec . . . jp 0ecffh ;2ce0 c3 ff ec . . . jp 0ecf3h ;2ce3 c3 f3 ec . . . jp 0ed0bh ;2ce6 c3 0b ed . . . jp 0ed05h ;2ce9 c3 05 ed . . . jp l4171h ;2cec c3 71 41 . q A jp l4171h+1 ;2cef c3 72 41 . r A jp l4391h ;2cf2 c3 91 43 . . C jp l43b3h ;2cf5 c3 b3 43 . . C jp l5f1dh ;2cf8 c3 1d 5f . . _ jp l6d01h ;2cfb c3 01 6d . . m jp sub_2e61h ;2cfe c3 61 2e . a . l2d01h: di ;2d01 f3 . xor a ;2d02 af . ld c,a ;2d03 4f O ld hl,l0003h+1 ;2d04 21 04 00 ! . . call 0ed47h ;2d07 cd 47 ed . G . ld a,0a9h ;2d0a 3e a9 > . ld (0f534h),a ;2d0c 32 34 f5 2 4 . dec hl ;2d0f 2b + call 0ed47h ;2d10 cd 47 ed . G . ld c,00ch ;2d13 0e 0c . . call sub_4b3dh ;2d15 cd 3d 4b . = K call sub_3839h ;2d18 cd 39 38 . 9 8 ld c,00ah ;2d1b 0e 0a . . call sub_38f9h ;2d1d cd f9 38 . . 8 ld (0f69fh),a ;2d20 32 9f f6 2 . . and 00fh ;2d23 e6 0f . . ld (0f6a0h),a ;2d25 32 a0 f6 2 . . ld (0f6a1h),a ;2d28 32 a1 f6 2 . . call l3af1h ;2d2b cd f1 3a . . : ld hl,l11b0h ;2d2e 21 b0 11 ! . . ld (0f1beh),hl ;2d31 22 be f1 " . . ld hl,l3670h ;2d34 21 70 36 ! p 6 ld (0f1c8h),hl ;2d37 22 c8 f1 " . . call sub_2e21h ;2d3a cd 21 2e . ! . ei ;2d3d fb . jr l2d74h ;2d3e 18 34 . 4 l2d40h: call sub_2e09h ;2d40 cd 09 2e . . . xor a ;2d43 af . ld (l3587h),a ;2d44 32 87 35 2 . 5 ld (0358ah),a ;2d47 32 8a 35 2 . 5 ld a,(0f2e0h) ;2d4a 3a e0 f2 : . . and 08fh ;2d4d e6 8f . . ld (0f78fh),a ;2d4f 32 8f f7 2 . . ld a,(0f07bh) ;2d52 3a 7b f0 : { . ld (0f07ch),a ;2d55 32 7c f0 2 | . ld hl,0f078h ;2d58 21 78 f0 ! x . res 5,(hl) ;2d5b cb ae . . call sub_5bb5h ;2d5d cd b5 5b . . [ ld hl,0f0f1h ;2d60 21 f1 f0 ! . . call sub_051bh ;2d63 cd 1b 05 . . . ld hl,0f11ah ;2d66 21 1a f1 ! . . ld (0f103h),hl ;2d69 22 03 f1 " . . ld a,(0f2d0h) ;2d6c 3a d0 f2 : . . cp 007h ;2d6f fe 07 . . call z,sub_4d0ch ;2d71 cc 0c 4d . . M l2d74h: xor a ;2d74 af . ld (0f4e8h),a ;2d75 32 e8 f4 2 . . ld a,(0f6b8h) ;2d78 3a b8 f6 : . . or a ;2d7b b7 . call z,sub_3e5bh ;2d7c cc 5b 3e . [ > call 03cc1h ;2d7f cd c1 3c . . < di ;2d82 f3 . call sub_3466h ;2d83 cd 66 34 . f 4 ei ;2d86 fb . ld c,000h ;2d87 0e 00 . . ld hl,l0003h ;2d89 21 03 00 ! . . call 0ecf9h ;2d8c cd f9 ec . . . ld (0f534h),a ;2d8f 32 34 f5 2 4 . ld a,0c3h ;2d92 3e c3 > . ld hl,l0003h+2 ;2d94 21 05 00 ! . . call 0ecffh ;2d97 cd ff ec . . . ld l,c ;2d9a 69 i call 0ecffh ;2d9b cd ff ec . . . inc hl ;2d9e 23 # ld de,(0f006h) ;2d9f ed 5b 06 f0 . [ . . inc de ;2da3 13 . inc de ;2da4 13 . inc de ;2da5 13 . call sub_2dc8h ;2da6 cd c8 2d . . - ld hl,(0f004h) ;2da9 2a 04 f0 * . . ld de,l0006h ;2dac 11 06 00 . . . add hl,de ;2daf 19 . ex de,hl ;2db0 eb . call sub_2dc8h ;2db1 cd c8 2d . . - call sub_1c20h ;2db4 cd 20 1c . . ld hl,0f389h ;2db7 21 89 f3 ! . . ld a,(hl) ;2dba 7e ~ ld (hl),000h ;2dbb 36 00 6 . dec a ;2dbd 3d = jr z,l2dd1h ;2dbe 28 11 ( . dec a ;2dc0 3d = jr z,l2dd1h ;2dc1 28 0e ( . dec a ;2dc3 3d = jr z,l2dd6h ;2dc4 28 10 ( . jr l2ddeh ;2dc6 18 16 . . sub_2dc8h: ld a,e ;2dc8 7b { call 0ecffh ;2dc9 cd ff ec . . . inc hl ;2dcc 23 # ld a,d ;2dcd 7a z jp 0ecffh ;2dce c3 ff ec . . . l2dd1h: ld hl,0f3d6h ;2dd1 21 d6 f3 ! . . jr l2dd9h ;2dd4 18 03 . . l2dd6h: ld hl,0f3ffh ;2dd6 21 ff f3 ! . . l2dd9h: ld a,(hl) ;2dd9 7e ~ or a ;2dda b7 . call nz,sub_2e18h ;2ddb c4 18 2e . . . l2ddeh: ld a,(0f02ah) ;2dde 3a 2a f0 : * . or a ;2de1 b7 . jr nz,l2dedh ;2de2 20 09 . ld c,00dh ;2de4 0e 0d . . call 01d3eh ;2de6 cd 3e 1d . > . inc a ;2de9 3c < call nz,sub_0a10h ;2dea c4 10 0a . . . l2dedh: xor a ;2ded af . ld (0f035h),a ;2dee 32 35 f0 2 5 . call sub_1cach ;2df1 cd ac 1c . . . call sub_2e21h ;2df4 cd 21 2e . ! . ld hl,l0003h+1 ;2df7 21 04 00 ! . . call 0ecf9h ;2dfa cd f9 ec . . . ld c,a ;2dfd 4f O xor a ;2dfe af . ld (0f539h),a ;2dff 32 39 f5 2 9 . ld ix,(0f002h) ;2e02 dd 2a 02 f0 . * . . call 0ed0bh ;2e06 cd 0b ed . . . sub_2e09h: ld a,(0f1cbh) ;2e09 3a cb f1 : . . or a ;2e0c b7 . call nz,sub_355bh ;2e0d c4 5b 35 . [ 5 ld a,(0f1cch) ;2e10 3a cc f1 : . . or a ;2e13 b7 . call nz,sub_3566h ;2e14 c4 66 35 . f 5 ret ;2e17 c9 . sub_2e18h: ld a,(hl) ;2e18 7e ~ ld (0f107h),a ;2e19 32 07 f1 2 . . inc hl ;2e1c 23 # ld (0f105h),hl ;2e1d 22 05 f1 " . . ret ;2e20 c9 . sub_2e21h: ld hl,0f11ah ;2e21 21 1a f1 ! . . ld (0f103h),hl ;2e24 22 03 f1 " . . ld hl,0f10eh ;2e27 21 0e f1 ! . . ld de,0f346h ;2e2a 11 46 f3 . F . ld bc,l000ch ;2e2d 01 0c 00 . . . ldir ;2e30 ed b0 . . ld a,(0f6a1h) ;2e32 3a a1 f6 : . . ld (0f6a2h),a ;2e35 32 a2 f6 2 . . call l3af1h ;2e38 cd f1 3a . . : ld hl,0f00fh ;2e3b 21 0f f0 ! . . ld de,0f6a9h ;2e3e 11 a9 f6 . . . ld bc,l0006h ;2e41 01 06 00 . . . ldir ;2e44 ed b0 . . ret ;2e46 c9 . sub_2e47h: ld c,001h ;2e47 0e 01 . . ld a,(0f0d8h) ;2e49 3a d8 f0 : . . or a ;2e4c b7 . jr z,l2e53h ;2e4d 28 04 ( . ld c,000h ;2e4f 0e 00 . . jr l2e5ch ;2e51 18 09 . . l2e53h: ld a,(0f4eah) ;2e53 3a ea f4 : . . cp 002h ;2e56 fe 02 . . jr nz,l2e5ch ;2e58 20 02 . ld c,000h ;2e5a 0e 00 . . l2e5ch: call sub_2e61h ;2e5c cd 61 2e . a . ei ;2e5f fb . ret ;2e60 c9 . sub_2e61h: di ;2e61 f3 . push af ;2e62 f5 . push bc ;2e63 c5 . call sub_09fdh ;2e64 cd fd 09 . . . pop bc ;2e67 c1 . pop af ;2e68 f1 . ld b,a ;2e69 47 G ld a,(0f0b8h) ;2e6a 3a b8 f0 : . . and 021h ;2e6d e6 21 . ! jr z,l2e7bh ;2e6f 28 0a ( . ld a,(0f0b8h) ;2e71 3a b8 f0 : . . and 020h ;2e74 e6 20 . call nz,sub_0592h ;2e76 c4 92 05 . . . jr l2ec8h ;2e79 18 4d . M l2e7bh: ld a,(0f0b8h) ;2e7b 3a b8 f0 : . . and 010h ;2e7e e6 10 . . jr z,l2e89h ;2e80 28 07 ( . push bc ;2e82 c5 . call sub_020bh ;2e83 cd 0b 02 . . . pop bc ;2e86 c1 . ld c,001h ;2e87 0e 01 . . l2e89h: ld a,b ;2e89 78 x inc c ;2e8a 0c . jr z,l2ec8h ;2e8b 28 3b ( ; dec c ;2e8d 0d . push ix ;2e8e dd e5 . . push iy ;2e90 fd e5 . . ex af,af' ;2e92 08 . exx ;2e93 d9 . push af ;2e94 f5 . push bc ;2e95 c5 . push de ;2e96 d5 . push hl ;2e97 e5 . exx ;2e98 d9 . ld (0f383h),sp ;2e99 ed 73 83 f3 . s . . ld hl,0f330h ;2e9d 21 30 f3 ! 0 . ld (hl),0ffh ;2ea0 36 ff 6 . ld a,(0f4e8h) ;2ea2 3a e8 f4 : . . or a ;2ea5 b7 . jr z,l2eaah ;2ea6 28 02 ( . ld c,000h ;2ea8 0e 00 . . l2eaah: inc c ;2eaa 0c . dec c ;2eab 0d . jr nz,l2eb7h ;2eac 20 09 . inc (hl) ;2eae 34 4 ld a,(0f0bah) ;2eaf 3a ba f0 : . . ld (0f385h),a ;2eb2 32 85 f3 2 . . jr l2ec8h ;2eb5 18 11 . . l2eb7h: xor a ;2eb7 af . ld (0f0d9h),a ;2eb8 32 d9 f0 2 . . ld (0f0dbh),a ;2ebb 32 db f0 2 . . ld (0f0b9h),a ;2ebe 32 b9 f0 2 . . ld (0f389h),a ;2ec1 32 89 f3 2 . . dec a ;2ec4 3d = ld (0f0bah),a ;2ec5 32 ba f0 2 . . l2ec8h: xor a ;2ec8 af . ld (0f388h),a ;2ec9 32 88 f3 2 . . ld (0f0dah),a ;2ecc 32 da f0 2 . . ld (0f0dch),a ;2ecf 32 dc f0 2 . . ld hl,0f0dbh ;2ed2 21 db f0 ! . . res 6,(hl) ;2ed5 cb b6 . . call sub_073eh ;2ed7 cd 3e 07 . > . ld hl,0f0d9h ;2eda 21 d9 f0 ! . . ld de,0f4bdh ;2edd 11 bd f4 . . . ld bc,l0003h+1 ;2ee0 01 04 00 . . . ldir ;2ee3 ed b0 . . call sub_3466h ;2ee5 cd 66 34 . f 4 call sub_3e5bh ;2ee8 cd 5b 3e . [ > call sub_2f1bh ;2eeb cd 1b 2f . . / call 07092h ;2eee cd 92 70 . . p ld c,042h ;2ef1 0e 42 . B call sub_4505h ;2ef3 cd 05 45 . . E ld c,04ah ;2ef6 0e 4a . J call sub_4505h ;2ef8 cd 05 45 . . E call sub_454bh ;2efb cd 4b 45 . K E call sub_2f0fh ;2efe cd 0f 2f . . / l2f01h: in a,(005h) ;2f01 db 05 ; GAH40M Status register (r) and 008h ;2f03 e6 08 . . jr z,l2f01h ;2f05 28 fa ( . ld a,001h ;2f07 3e 01 > . out (006h),a ;2f09 d3 06 ; GAH40M Serial I/O register (rw) inc a ;2f0b 3c < out (001h),a ;2f0c d3 01 ; GAH40M Command register (w) halt ;2f0e 76 v sub_2f0fh: ld c,00dh ;2f0f 0e 0d . . call sub_4505h ;2f11 cd 05 45 . . E jr c,sub_2f0fh ;2f14 38 f9 8 . ld a,c ;2f16 79 y or a ;2f17 b7 . jr nz,sub_2f0fh ;2f18 20 f5 . ret ;2f1a c9 . sub_2f1bh: ld a,(0f0d8h) ;2f1b 3a d8 f0 : . . or a ;2f1e b7 . ret z ;2f1f c8 . call sub_5b4fh ;2f20 cd 4f 5b . O [ ld hl,l2f50h ;2f23 21 50 2f Point to "CHARGE BATTERY" call sub_380eh ;2f26 cd 0e 38 . . 8 ld h,01eh ;2f29 26 1e & . ld a,(0f4e9h) ;2f2b 3a e9 f4 : . . ld l,a ;2f2e 6f o l2f2fh: ld c,008h ;2f2f 0e 08 . . call sub_38f9h ;2f31 cd f9 38 . . 8 and 001h ;2f34 e6 01 . . jr z,l2f42h ;2f36 28 0a ( . ld l,0ffh ;2f38 2e ff . . l2f3ah: call sub_3869h ;2f3a cd 69 38 . i 8 dec h ;2f3d 25 % jr z,l2f48h ;2f3e 28 08 ( . jr l2f2fh ;2f40 18 ed . . l2f42h: inc l ;2f42 2c , jr z,l2f48h ;2f43 28 03 ( . dec l ;2f45 2d - jr l2f3ah ;2f46 18 f2 . . l2f48h: ld c,00ch ;2f48 0e 0c . . call sub_4b3dh ;2f4a cd 3d 4b . = K jp sub_5bb5h ;2f4d c3 b5 5b . . [ l2f50h: inc c ;2f50 0c . add hl,bc ;2f51 09 . ld b,e ;2f52 43 C ld c,b ;2f53 48 H ld b,c ;2f54 41 A ld d,d ;2f55 52 R ld b,a ;2f56 47 G ld b,l ;2f57 45 E jr nz,l2f9ch ;2f58 20 42 B ld b,c ;2f5a 41 A ld d,h ;2f5b 54 T ld d,h ;2f5c 54 T ld b,l ;2f5d 45 E ld d,d ;2f5e 52 R ld e,c ;2f5f 59 Y nop ;2f60 00 . l2f61h: call sub_2e09h ;2f61 cd 09 2e . . . call sub_3430h ;2f64 cd 30 34 . 0 4 ld bc,l0000h ;2f67 01 00 00 . . . jp l2fe4h ;2f6a c3 e4 2f . . / l2f6dh: ld hl,l0000h ;2f6d 21 00 00 ! . . ld a,c ;2f70 79 y cp 008h ;2f71 fe 08 . . ret nc ;2f73 d0 . ld b,000h ;2f74 06 00 . . ld c,a ;2f76 4f O ld hl,0f1d2h ;2f77 21 d2 f1 ! . . add hl,bc ;2f7a 09 . ld a,(hl) ;2f7b 7e ~ cp 008h ;2f7c fe 08 . . ld hl,l0000h ;2f7e 21 00 00 ! . . ret nc ;2f81 d0 . ld (0f543h),a ;2f82 32 43 f5 2 C . bit 0,e ;2f85 cb 43 . C jr nz,l2f9bh ;2f87 20 12 . ld hl,l2f94h ;2f89 21 94 2f ! . / push hl ;2f8c e5 . ld hl,0f1dch ;2f8d 21 dc f1 ! . . call sub_6042h ;2f90 cd 42 60 . B ` jp (hl) ;2f93 e9 . l2f94h: ld hl,l0000h ;2f94 21 00 00 ! . . ret c ;2f97 d8 . ld a,(0f543h) ;2f98 3a 43 f5 : C . l2f9bh: ld l,a ;2f9b 6f o l2f9ch: ld h,000h ;2f9c 26 00 & . call sub_3891h ;2f9e cd 91 38 . . 8 ld de,0f20ch ;2fa1 11 0c f2 . . . add hl,de ;2fa4 19 . ret ;2fa5 c9 . call sub_32f3h ;2fa6 cd f3 32 . . 2 ld c,002h ;2fa9 0e 02 . . call sub_3447h ;2fab cd 47 34 . G 4 call sub_44b2h ;2fae cd b2 44 . . D ld d,a ;2fb1 57 W call sub_44b2h ;2fb2 cd b2 44 . . D xor 037h ;2fb5 ee 37 . 7 scf ;2fb7 37 7 ret nz ;2fb8 c0 . ld a,d ;2fb9 7a z xor 0e5h ;2fba ee e5 . . jr l2fe1h ;2fbc 18 23 . # call sub_3c24h ;2fbe cd 24 3c . $ < ret c ;2fc1 d8 . ld a,(0f1cdh) ;2fc2 3a cd f1 : . . or a ;2fc5 b7 . jr nz,l2fcbh ;2fc6 20 03 . jp l3587h ;2fc8 c3 87 35 . . 5 l2fcbh: call sub_355bh ;2fcb cd 5b 35 . [ 5 jr l2fe0h ;2fce 18 10 . . call sub_3c24h ;2fd0 cd 24 3c . $ < ret c ;2fd3 d8 . ld a,(0f1ceh) ;2fd4 3a ce f1 : . . or a ;2fd7 b7 . jr nz,l2fddh ;2fd8 20 03 . jp 0358ah ;2fda c3 8a 35 . . 5 l2fddh: call sub_3566h ;2fdd cd 66 35 . f 5 l2fe0h: or a ;2fe0 b7 . l2fe1h: ret z ;2fe1 c8 . scf ;2fe2 37 7 ret ;2fe3 c9 . l2fe4h: ld h,b ;2fe4 60 ` ld l,c ;2fe5 69 i ld (0f544h),hl ;2fe6 22 44 f5 " D . ret ;2fe9 c9 . l2feah: ld a,c ;2fea 79 y ld (0f546h),a ;2feb 32 46 f5 2 F . ret ;2fee c9 . l2fefh: ld (0f557h),bc ;2fef ed 43 57 f5 . C W . l2ff3h: ld h,b ;2ff3 60 ` ld l,c ;2ff4 69 i ret ;2ff5 c9 . l2ff6h: ld a,002h ;2ff6 3e 02 > . ld hl,0f1fch ;2ff8 21 fc f1 ! . . jr l3002h ;2ffb 18 05 . . l2ffdh: ld a,001h ;2ffd 3e 01 > . ld hl,0f1ech ;2fff 21 ec f1 ! . . l3002h: ld (0f536h),a ;3002 32 36 f5 2 6 . ld a,(0f543h) ;3005 3a 43 f5 : C . cp 008h ;3008 fe 08 . . ret nc ;300a d0 . call sub_6042h ;300b cd 42 60 . B ` jp (hl) ;300e e9 . ld a,0afh ;300f 3e af > . ld (0f6a3h),a ;3011 32 a3 f6 2 . . in a,(081h) ;3014 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information bit 7,a ;3016 cb 7f .  jp z,l31ffh ;3018 ca ff 31 . . 1 in a,(094h) ;301b db 94 ; Non-intelligent RAM disk Command/Status register (r/w) bit 7,a ;301d cb 7f .  jp z,l3263h ;301f ca 63 32 . c 2 ld a,(0f544h) ;3022 3a 44 f5 : D . ld l,a ;3025 6f o ld h,000h ;3026 26 00 & . call sub_388fh ;3028 cd 8f 38 . . 8 ld a,(0f546h) ;302b 3a 46 f5 : F . cp 040h ;302e fe 40 . @ jr nc,l3070h ;3030 30 3e 0 > ld e,a ;3032 5f _ ld d,000h ;3033 16 00 . . add hl,de ;3035 19 . ld (0f6a4h),hl ;3036 22 a4 f6 " . . push hl ;3039 e5 . ld de,(0f6a6h) ;303a ed 5b a6 f6 . [ . . or a ;303e b7 . sbc hl,de ;303f ed 52 . R pop hl ;3041 e1 . jr nc,l3070h ;3042 30 2c 0 , inc hl ;3044 23 # call sub_388eh ;3045 cd 8e 38 . . 8 ex de,hl ;3048 eb . ld hl,(0f076h) ;3049 2a 76 f0 * v . or a ;304c b7 . sbc hl,de ;304d ed 52 . R call sub_35c6h ;304f cd c6 35 . . 5 ld a,(0f6a3h) ;3052 3a a3 f6 : . . or a ;3055 b7 . jr nz,l3062h ;3056 20 0a . ex de,hl ;3058 eb . ldir ;3059 ed b0 . . ex de,hl ;305b eb . call sub_3086h ;305c cd 86 30 . . 0 ld (hl),a ;305f 77 w jr l306bh ;3060 18 09 . . l3062h: ldir ;3062 ed b0 . . call sub_3086h ;3064 cd 86 30 . . 0 cp (hl) ;3067 be . ld a,0ffh ;3068 3e ff > . ret nz ;306a c0 . l306bh: xor a ;306b af . ld (0f536h),a ;306c 32 36 f5 2 6 . ret ;306f c9 . l3070h: ld a,(0f6a3h) ;3070 3a a3 f6 : . . or a ;3073 b7 . ld a,0ffh ;3074 3e ff > . ret z ;3076 c8 . ld hl,(0f557h) ;3077 2a 57 f5 * W . ld d,h ;307a 54 T ld e,l ;307b 5d ] inc de ;307c 13 . ld bc,l007fh ;307d 01 7f 00 .  . ld (hl),011h ;3080 36 11 6 . ldir ;3082 ed b0 . . xor a ;3084 af . ret ;3085 c9 . sub_3086h: ld a,(0f6a4h) ;3086 3a a4 f6 : . . ld d,080h ;3089 16 80 . . l308bh: dec hl ;308b 2b + xor (hl) ;308c ae . rlca ;308d 07 . dec d ;308e 15 . jr nz,l308bh ;308f 20 fa . ld hl,(0f076h) ;3091 2a 76 f0 * v . dec h ;3094 25 % dec h ;3095 25 % ld de,(0f6a4h) ;3096 ed 5b a4 f6 . [ . . or a ;309a b7 . sbc hl,de ;309b ed 52 . R dec hl ;309d 2b + ret ;309e c9 . sub_309fh: in a,(081h) ;309f db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information bit 7,a ;30a1 cb 7f .  jp z,l3189h ;30a3 ca 89 31 . . 1 in a,(094h) ;30a6 db 94 ; Non-intelligent RAM disk Command/Status register (r/w) bit 7,a ;30a8 cb 7f .  jp z,l32b8h ;30aa ca b8 32 . . 2 ld a,(0f009h) ;30ad 3a 09 f0 : . . cp 019h ;30b0 fe 19 . . jr nc,l3105h ;30b2 30 51 0 Q cp 002h ;30b4 fe 02 . . jr c,l30fbh ;30b6 38 43 8 C ld l,a ;30b8 6f o ld h,000h ;30b9 26 00 & . add hl,hl ;30bb 29 ) add hl,hl ;30bc 29 ) add hl,hl ;30bd 29 ) ld b,h ;30be 44 D ld c,l ;30bf 4d M ld (0f6a6h),hl ;30c0 22 a6 f6 " . . call sub_32e0h ;30c3 cd e0 32 . . 2 jr nz,l3105h ;30c6 20 3d = ld hl,l0000h ;30c8 21 00 00 ! . . ld (0f6a4h),hl ;30cb 22 a4 f6 " . . ld hl,(0f076h) ;30ce 2a 76 f0 * v . l30d1h: push hl ;30d1 e5 . call sub_3086h ;30d2 cd 86 30 . . 0 cp (hl) ;30d5 be . pop hl ;30d6 e1 . jr nz,l3105h ;30d7 20 2c , l30d9h: ld de,l0080h ;30d9 11 80 00 . . . or a ;30dc b7 . sbc hl,de ;30dd ed 52 . R ld de,(0f6a4h) ;30df ed 5b a4 f6 . [ . . inc de ;30e3 13 . ld (0f6a4h),de ;30e4 ed 53 a4 f6 . S . . dec bc ;30e8 0b . ld a,d ;30e9 7a z or a ;30ea b7 . jr nz,l30f6h ;30eb 20 09 . ld a,e ;30ed 7b { cp 004h ;30ee fe 04 . . jr c,l30f6h ;30f0 38 04 8 . cp 008h ;30f2 fe 08 . . jr c,l30d9h ;30f4 38 e3 8 . l30f6h: ld a,b ;30f6 78 x or c ;30f7 b1 . jr nz,l30d1h ;30f8 20 d7 . ret ;30fa c9 . l30fbh: xor a ;30fb af . ld h,a ;30fc 67 g ld l,a ;30fd 6f o ld (0f6a6h),hl ;30fe 22 a6 f6 " . . ld (0f009h),a ;3101 32 09 f0 2 . . ret ;3104 c9 . l3105h: call sub_3158h ;3105 cd 58 31 . X 1 ld hl,(0f076h) ;3108 2a 76 f0 * v . dec hl ;310b 2b + ld e,l ;310c 5d ] ld d,h ;310d 54 T dec de ;310e 1b . ld (hl),0e5h ;310f 36 e5 6 . ld a,(0f009h) ;3111 3a 09 f0 : . . add a,a ;3114 87 . add a,a ;3115 87 . ld b,a ;3116 47 G ld c,000h ;3117 0e 00 . . dec bc ;3119 0b . lddr ;311a ed b8 . . ld hl,l0000h ;311c 21 00 00 ! . . ld (0f6a4h),hl ;311f 22 a4 f6 " . . ld hl,(0f076h) ;3122 2a 76 f0 * v . ld bc,(0f6a6h) ;3125 ed 4b a6 f6 . K . . l3129h: push hl ;3129 e5 . call sub_3086h ;312a cd 86 30 . . 0 ld (hl),a ;312d 77 w pop hl ;312e e1 . ld de,(0f6a4h) ;312f ed 5b a4 f6 . [ . . inc de ;3133 13 . ld (0f6a4h),de ;3134 ed 53 a4 f6 . S . . dec bc ;3138 0b . ld a,b ;3139 78 x or c ;313a b1 . jr nz,l3129h ;313b 20 ec . ret ;313d c9 . l313eh: dec c ;313e 0d . ld a,(bc) ;313f 0a . ld d,d ;3140 52 R ld b,c ;3141 41 A ld c,l ;3142 4d M jr nz,l3189h ;3143 20 44 D ld c,c ;3145 49 I ld d,e ;3146 53 S ld c,e ;3147 4b K jr nz,$+72 ;3148 20 46 F ld c,a ;314a 4f O ld d,d ;314b 52 R ld c,l ;314c 4d M ld b,c ;314d 41 A ld d,h ;314e 54 T jr nz,$+42 ;314f 20 28 ( ld e,c ;3151 59 Y cpl ;3152 2f / ld c,(hl) ;3153 4e N add hl,hl ;3154 29 ) jr nz,l3196h ;3155 20 3f ? nop ;3157 00 . sub_3158h: ld hl,l313eh ;3158 21 3e 31 ! > 1 call sub_380eh ;315b cd 0e 38 . . 8 call sub_35feh ;315e cd fe 35 . . 5 cp 020h ;3161 fe 20 . jr c,sub_3158h ;3163 38 f3 8 . push af ;3165 f5 . ld c,a ;3166 4f O call sub_4b3dh ;3167 cd 3d 4b . = K pop af ;316a f1 . and 05fh ;316b e6 5f . _ cp 059h ;316d fe 59 . Y ret z ;316f c8 . cp 04eh ;3170 fe 4e . N jr nz,sub_3158h ;3172 20 e4 . pop hl ;3174 e1 . ret ;3175 c9 . l3176h: in a,(081h) ;3176 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;3178 e6 02 . . jr nz,l3176h ;317a 20 fa . ld a,c ;317c 79 y out (081h),a ;317d d3 81 ; H102A/H103A Intelligent RAM DISK 60/120K Write command l317fh: in a,(081h) ;317f db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 001h ;3181 e6 01 . . jr z,l317fh ;3183 28 fa ( . in a,(080h) ;3185 db 80 ; H102A/H103A Intelligent RAM DISK 60/120K Read data status or a ;3187 b7 . ret ;3188 c9 . l3189h: call sub_32e0h ;3189 cd e0 32 . . 2 jr nz,l31a5h ;318c 20 17 . xor a ;318e af . out (004h),a ;318f d3 04 ; GAH40M Interrupt Enable register (w) ld c,00ah ;3191 0e 0a . . call sub_38f9h ;3193 cd f9 38 . . 8 l3196h: ld c,a ;3196 4f O ld a,(0f0b3h) ;3197 3a b3 f0 : . . out (004h),a ;319a d3 04 ; GAH40M Interrupt Enable register (w) bit 4,c ;319c cb 61 . a ret z ;319e c8 . ld c,005h ;319f 0e 05 . . call l3176h ;31a1 cd 76 31 . v 1 ret z ;31a4 c8 . l31a5h: call sub_3158h ;31a5 cd 58 31 . X 1 ld c,000h ;31a8 0e 00 . . call l3176h ;31aa cd 76 31 . v 1 bit 1,a ;31ad cb 4f . O jr nz,l31a5h ;31af 20 f4 . ld hl,l01dfh+1 ;31b1 21 e0 01 ! . . or a ;31b4 b7 . jr z,l31b8h ;31b5 28 01 ( . add hl,hl ;31b7 29 ) ; H102A/H103A Intelligent RAM DISK 60/120K routines l31b8h: ld de,l0000h ;31b8 11 00 00 . . . l31bbh: in a,(081h) ;31bb db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;31bd e6 02 . . jr nz,l31bbh ;31bf 20 fa . ld a,003h ;31c1 3e 03 > . out (081h),a ;31c3 d3 81 ; H102A/H103A Intelligent RAM DISK 60/120K Write command l31c5h: in a,(081h) ;31c5 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;31c7 e6 02 . . jr nz,l31c5h ;31c9 20 fa . ld a,d ;31cb 7a z out (080h),a ;31cc d3 80 . . l31ceh: in a,(081h) ;31ce db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;31d0 e6 02 . . jr nz,l31ceh ;31d2 20 fa . ld a,e ;31d4 7b { out (080h),a ;31d5 d3 80 . . ld b,080h ;31d7 06 80 . . l31d9h: in a,(081h) ;31d9 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;31db e6 02 . . jr nz,l31d9h ;31dd 20 fa . ld a,0e5h ;31df 3e e5 > . out (080h),a ;31e1 d3 80 ; H102A/H103A Intelligent RAM DISK 60/120K Write data djnz l31d9h ;31e3 10 f4 . . l31e5h: in a,(081h) ;31e5 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 001h ;31e7 e6 01 . . jr z,l31e5h ;31e9 28 fa ( . in a,(080h) ;31eb db 80 ; H102A/H103A Intelligent RAM DISK 60/120K Read data status or a ;31ed b7 . jr nz,l31a5h ;31ee 20 b5 . inc e ;31f0 1c . ld a,e ;31f1 7b { cp 040h ;31f2 fe 40 . @ jr c,l31f9h ;31f4 38 03 8 . ld e,000h ;31f6 1e 00 . . inc d ;31f8 14 . l31f9h: dec hl ;31f9 2b + ld a,h ;31fa 7c | or l ;31fb b5 . jr nz,l31bbh ;31fc 20 bd . ret ;31fe c9 . l31ffh: in a,(081h) ;31ff db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information l3201h: and 002h ;3201 e6 02 . . l3203h: jr nz,l31ffh ;3203 20 fa . l3205h: ld a,(0f6a3h) ;3205 3a a3 f6 : . . or a ;3208 b7 . ld a,001h ;3209 3e 01 > . jr nz,l320fh ;320b 20 02 . ld a,003h ;320d 3e 03 > . l320fh: out (081h),a ;320f d3 81 . . l3211h: in a,(081h) ;3211 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;3213 e6 02 . . jr nz,l3211h ;3215 20 fa . ld a,(0f544h) ;3217 3a 44 f5 : D . out (080h),a ;321a d3 80 ; H102A/H103A Intelligent RAM DISK 60/120K Write data l321ch: in a,(081h) ;321c db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;321e e6 02 . . jr nz,l321ch ;3220 20 fa . ld a,(0f546h) ;3222 3a 46 f5 : F . out (080h),a ;3225 d3 80 ; H102A/H103A Intelligent RAM DISK 60/120K Write data ld hl,(0f557h) ;3227 2a 57 f5 * W . ld bc,08080h ;322a 01 80 80 . . . l322dh: ld a,(0f6a3h) ;322d 3a a3 f6 : . . or a ;3230 b7 . jr z,l324ch ;3231 28 19 ( . l3233h: in a,(081h) ;3233 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 001h ;3235 e6 01 . . jr z,l3233h ;3237 28 fa ( . in a,(080h) ;3239 db 80 . . push af ;323b f5 . l323ch: in a,(081h) ;323c db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information l323eh: and 001h ;323e e6 01 . . jr z,l323ch ;3240 28 fa ( . ini ;3242 ed a2 Read sector? jr nz,l323ch ;3244 20 f6 . pop af ;3246 f1 . or a ;3247 b7 . ret nz ;3248 c0 . jp l306bh ;3249 c3 6b 30 . k 0 l324ch: in a,(081h) ;324c db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 002h ;324e e6 02 . . jr nz,l324ch ;3250 20 fa . outi ;3252 ed a3 Write sector? jr nz,l324ch ;3254 20 f6 . l3256h: in a,(081h) ;3256 db 81 ; H102A/H103A Intelligent RAM DISK 60/120K Read handshake information and 001h ;3258 e6 01 . . jr z,l3256h ;325a 28 fa ( . in a,(080h) ;325c db 80 ; H102A/H103A Intelligent RAM DISK 60/120K Read data or a ;325e b7 . ret nz ;325f c0 . jp l306bh ;3260 c3 6b 30 . k 0 ; Non-intelligent RAM disk routines l3263h: ld h,008h ;3263 26 08 & . bit 2,a ;3265 cb 57 . W jr z,l326bh ;3267 28 02 ( . ld h,010h ;3269 26 10 & . l326bh: ld a,(0f544h) ;326b 3a 44 f5 : D . cp h ;326e bc . ret nc ;326f d0 . ld h,a ;3270 67 g ld a,(0f546h) ;3271 3a 46 f5 : F . cp 040h ;3274 fe 40 . @ ret nc ;3276 d0 . or a ;3277 b7 . rla ;3278 17 . or a ;3279 b7 . rla ;327a 17 . or a ;327b b7 . rr h ;327c cb 1c . . rra ;327e 1f . rr h ;327f cb 1c . . rra ;3281 1f . rr h ;3282 cb 1c . . rra ;3284 1f . ld l,000h ;3285 2e 00 . . rr l ;3287 cb 1d . . out (091h),a ;3289 d3 91 ; Non-intelligent RAM disk Address register 2 (w) ld a,l ;328b 7d } out (090h),a ;328c d3 90 ; Non-intelligent RAM disk Address register 1 (w) (auto increment) ld a,h ;328e 7c | out (092h),a ;328f d3 92 ; Non-intelligent RAM disk Address register 2 (w) ld a,(0f6a3h) ;3291 3a a3 f6 : . . or a ;3294 b7 . jr z,l32aah ;3295 28 13 ( . ld a,003h ;3297 3e 03 > . out (094h),a ;3299 d3 94 ; Non-intelligent RAM disk Command/Status register (r/w) ld hl,(0f557h) ;329b 2a 57 f5 * W . ld bc,08093h ;329e 01 93 80 Read 8 bytes from port 93h inir ;32a1 ed b2 l32a3h: ld a,001h ;32a3 3e 01 > . out (094h),a ;32a5 d3 94 ; Non-intelligent RAM disk Command/Status register (r/w) jp l306bh ;32a7 c3 6b 30 . k 0 l32aah: ld a,002h ;32aa 3e 02 > . out (094h),a ;32ac d3 94 ; Non-intelligent RAM disk Command/Status register (r/w) ld hl,(0f557h) ;32ae 2a 57 f5 * W . ld bc,08093h ;32b1 01 93 80 Write 8 bytes to port 93h otir ;32b4 ed b3 . . jr l32a3h ;32b6 18 eb . . l32b8h: call sub_32e0h ;32b8 cd e0 32 . . 2 ret z ;32bb c8 . call sub_3158h ;32bc cd 58 31 . X 1 xor a ;32bf af Reset addressing Non-intelligent RAM disk out (090h),a ;32c0 d3 90 ; Non-intelligent RAM disk Address register 1 (w) (auto increment) out (091h),a ;32c2 d3 91 ; Non-intelligent RAM disk Address register 2 (w) out (092h),a ;32c4 d3 92 ; Non-intelligent RAM disk Address register 3 (w) ld a,002h ;32c6 3e 02 > . out (094h),a ;32c8 d3 94 ; Non-intelligent RAM disk Command/Status register (r/w) ld bc,l0006h+2 ;32ca 01 08 00 . . . ld d,b ;32cd 50 P l32ceh: ld a,0e5h ;32ce 3e e5 > . l32d0h: out (093h),a ;32d0 d3 93 ; Non-intelligent RAM disk Access port (r/w) djnz l32d0h ;32d2 10 fc . . inc d ;32d4 14 . ld a,d ;32d5 7a z out (091h),a ;32d6 d3 91 ; Non-intelligent RAM disk Address register 2 (w) dec c ;32d8 0d . jr nz,l32ceh ;32d9 20 f3 . ld a,001h ;32db 3e 01 Read out (094h),a ;32dd d3 94 ; Non-intelligent RAM disk Command/Status register (r/w) ret ;32df c9 . sub_32e0h: ld a,(0f075h) ;32e0 3a 75 f0 : u . or a ;32e3 b7 . ret z ;32e4 c8 . ld a,000h ;32e5 3e 00 > . ld (0f075h),a ;32e7 32 75 f0 2 u . ret ;32ea c9 . l32ebh: ld a,003h ;32eb 3e 03 > . ld (0f536h),a ;32ed 32 36 f5 2 6 . or 0ffh ;32f0 f6 ff . . ret ;32f2 c9 . sub_32f3h: ld a,003h ;32f3 3e 03 > . ld (0f333h),a ;32f5 32 33 f3 2 3 . ld a,(0f1cah) ;32f8 3a ca f1 : . . or a ;32fb b7 . jr nz,l3306h ;32fc 20 08 . call sub_3473h ;32fe cd 73 34 . s 4 ld a,0ffh ;3301 3e ff > . ld (0f1cah),a ;3303 32 ca f1 2 . . l3306h: ld hl,l0000h ;3306 21 00 00 ! . . ld a,(0f543h) ;3309 3a 43 f5 : C . dec a ;330c 3d = ret z ;330d c8 . ld h,080h ;330e 26 80 & . ret ;3310 c9 . call sub_32f3h ;3311 cd f3 32 . . 2 ld a,(0f544h) ;3314 3a 44 f5 : D . ld de,l2000h ;3317 11 00 20 . . l331ah: or a ;331a b7 . jr z,l3321h ;331b 28 04 ( . add hl,de ;331d 19 . dec a ;331e 3d = jr l331ah ;331f 18 f9 . . l3321h: ld a,(0f546h) ;3321 3a 46 f5 : F . or a ;3324 b7 . rra ;3325 1f . ld d,a ;3326 57 W ld a,000h ;3327 3e 00 > . rra ;3329 1f . ld e,a ;332a 5f _ add hl,de ;332b 19 . push hl ;332c e5 . ld a,(0f543h) ;332d 3a 43 f5 : C . dec a ;3330 3d = ld hl,0f354h ;3331 21 54 f3 ! T . ld a,(0f352h) ;3334 3a 52 f3 : R . jr z,l333dh ;3337 28 04 ( . ld a,(0f353h) ;3339 3a 53 f3 : S . inc hl ;333c 23 # l333dh: ld c,(hl) ;333d 4e N cp 0ffh ;333e fe ff . . jr nz,l3391h ;3340 20 4f O ld hl,l0000h ;3342 21 00 00 ! . . ld a,(0f543h) ;3345 3a 43 f5 : C . cp 001h ;3348 fe 01 . . jr z,l334eh ;334a 28 02 ( . ld h,080h ;334c 26 80 & . l334eh: ld c,020h ;334e 0e 20 . call sub_3447h ;3350 cd 47 34 . G 4 ld bc,00020h ;3353 01 20 00 . . ld de,(0f557h) ;3356 ed 5b 57 f5 . [ W . call sub_44d2h ;335a cd d2 44 . . D jr c,l334eh ;335d 38 ef 8 . ld ix,(0f557h) ;335f dd 2a 57 f5 . * W . ld h,(ix+000h) ;3363 dd 66 00 . f . ld l,(ix+001h) ;3366 dd 6e 01 . n . ld de,0e537h ;3369 11 37 e5 . 7 . or a ;336c b7 . sbc hl,de ;336d ed 52 . R ld de,l0000h ;336f 11 00 00 . . . jr nz,l33ach ;3372 20 38 8 ld c,(ix+002h) ;3374 dd 4e 02 . N . ld b,(ix+016h) ;3377 dd 46 16 . F . ld a,(0f543h) ;337a 3a 43 f5 : C . dec a ;337d 3d = ld a,b ;337e 78 x jr z,l338ah ;337f 28 09 ( . ld (0f353h),a ;3381 32 53 f3 2 S . ld a,c ;3384 79 y ld (0f355h),a ;3385 32 55 f3 2 U . jr l3391h ;3388 18 07 . . l338ah: ld (0f352h),a ;338a 32 52 f3 2 R . ld a,c ;338d 79 y ld (0f354h),a ;338e 32 54 f3 2 T . l3391h: ld b,a ;3391 47 G ld de,l0000h ;3392 11 00 00 . . . ld a,(0f544h) ;3395 3a 44 f5 : D . or a ;3398 b7 . jr nz,l33a2h ;3399 20 07 . ld a,(0f546h) ;339b 3a 46 f5 : F . cp 008h ;339e fe 08 . . jr c,l33ach ;33a0 38 0a 8 . l33a2h: ld a,020h ;33a2 3e 20 > sub b ;33a4 90 . ld h,000h ;33a5 26 00 & . ld l,a ;33a7 6f o call sub_3890h ;33a8 cd 90 38 . . 8 ex de,hl ;33ab eb . l33ach: pop hl ;33ac e1 . or a ;33ad b7 . sbc hl,de ;33ae ed 52 . R bit 7,c ;33b0 cb 79 . y jr z,l33cah ;33b2 28 16 ( . ld a,c ;33b4 79 y cp 090h ;33b5 fe 90 . . ld b,020h ;33b7 06 20 . jr c,l33bfh ;33b9 38 04 8 . jr nz,l33cah ;33bb 20 0d . ld b,040h ;33bd 06 40 . @ l33bfh: ld a,h ;33bf 7c | and 07fh ;33c0 e6 7f .  cp b ;33c2 b8 . jr c,l33cah ;33c3 38 05 8 . ld a,080h ;33c5 3e 80 > . sub b ;33c7 90 . add a,h ;33c8 84 . ld h,a ;33c9 67 g l33cah: ld c,080h ;33ca 0e 80 . . call sub_3447h ;33cc cd 47 34 . G 4 call sub_35c6h ;33cf cd c6 35 . . 5 call sub_44d2h ;33d2 cd d2 44 . . D jr c,l33cah ;33d5 38 f3 8 . ld a,(0f543h) ;33d7 3a 43 f5 : C . dec a ;33da 3d = ld a,(0f352h) ;33db 3a 52 f3 : R . jr z,l33e3h ;33de 28 03 ( . ld a,(0f353h) ;33e0 3a 53 f3 : S . l33e3h: cp 0ffh ;33e3 fe ff . . jr z,l342dh ;33e5 28 46 ( F ld h,000h ;33e7 26 00 & . ld l,a ;33e9 6f o ld a,(0f544h) ;33ea 3a 44 f5 : D . or a ;33ed b7 . jr nz,l342dh ;33ee 20 3d = ld a,(0f546h) ;33f0 3a 46 f5 : F . cp 008h ;33f3 fe 08 . . jr nc,l342dh ;33f5 30 36 0 6 call sub_3890h ;33f7 cd 90 38 . . 8 or a ;33fa b7 . rra ;33fb 1f . ld d,a ;33fc 57 W ld a,000h ;33fd 3e 00 > . rra ;33ff 1f . ld e,a ;3400 5f _ push hl ;3401 e5 . ld hl,l0080h ;3402 21 80 00 ! . . add hl,de ;3405 19 . ld b,h ;3406 44 D ld c,l ;3407 4d M pop hl ;3408 e1 . push hl ;3409 e5 . or a ;340a b7 . sbc hl,bc ;340b ed 42 . B pop hl ;340d e1 . jr nc,l342dh ;340e 30 1d 0 . or a ;3410 b7 . sbc hl,de ;3411 ed 52 . R jr nc,l3418h ;3413 30 03 0 . ld hl,l0000h ;3415 21 00 00 ! . . l3418h: ex de,hl ;3418 eb . ld hl,l0080h ;3419 21 80 00 ! . . or a ;341c b7 . sbc hl,de ;341d ed 52 . R ld b,h ;341f 44 D ld c,l ;3420 4d M ld hl,(0f557h) ;3421 2a 57 f5 * W . add hl,de ;3424 19 . ld (hl),01fh ;3425 36 1f 6 . ld d,h ;3427 54 T ld e,l ;3428 5d ] inc de ;3429 13 . dec bc ;342a 0b . ldir ;342b ed b0 . . l342dh: jp l306bh ;342d c3 6b 30 . k 0 sub_3430h: ld a,(0f543h) ;3430 3a 43 f5 : C . cp 001h ;3433 fe 01 . . ret c ;3435 d8 . jr z,l3441h ;3436 28 09 ( . cp 003h ;3438 fe 03 . . ret nc ;343a d0 . ld a,0ffh ;343b 3e ff > . ld (0f353h),a ;343d 32 53 f3 2 S . ret ;3440 c9 . l3441h: ld a,0ffh ;3441 3e ff > . ld (0f352h),a ;3443 32 52 f3 2 R . ret ;3446 c9 . sub_3447h: push bc ;3447 c5 . ld c,071h ;3448 0e 71 . q call sub_4488h ;344a cd 88 44 . . D ld c,0ffh ;344d 0e ff . . call sub_44ach ;344f cd ac 44 . . D ld c,h ;3452 4c L call sub_44ach ;3453 cd ac 44 . . D ld c,l ;3456 4d M call sub_44ach ;3457 cd ac 44 . . D pop bc ;345a c1 . call sub_44ach ;345b cd ac 44 . . D jp sub_44b2h ;345e c3 b2 44 . . D sub_3461h: ld a,(0f334h) ;3461 3a 34 f3 : 4 . or a ;3464 b7 . ret z ;3465 c8 . sub_3466h: xor a ;3466 af . ld (0f1cah),a ;3467 32 ca f1 2 . . ld (0f334h),a ;346a 32 34 f3 2 4 . ld (0f333h),a ;346d 32 33 f3 2 3 . ld d,a ;3470 57 W jr l3475h ;3471 18 02 . . sub_3473h: ld d,0ffh ;3473 16 ff . . l3475h: ld c,070h ;3475 0e 70 . p call sub_4535h ;3477 cd 35 45 . 5 E jp sub_387bh ;347a c3 7b 38 . { 8 ld a,0afh ;347d 3e af > . ld (0f1d0h),a ;347f 32 d0 f1 2 . . ld a,c ;3482 79 y ld (0f1cfh),a ;3483 32 cf f1 2 . . call sub_3c24h ;3486 cd 24 3c . $ < ret c ;3489 d8 . ld a,(0f543h) ;348a 3a 43 f5 : C . cp 005h ;348d fe 05 . . jp nc,l349dh ;348f d2 9d 34 . . 4 ld a,031h ;3492 3e 31 > 1 ld (0f1d1h),a ;3494 32 d1 f1 2 . . ld (0f1cbh),a ;3497 32 cb f1 2 . . jp l34a5h ;349a c3 a5 34 . . 4 l349dh: ld a,032h ;349d 3e 32 > 2 ld (0f1d1h),a ;349f 32 d1 f1 2 . . ld (0f1cch),a ;34a2 32 cc f1 2 . . l34a5h: call sub_352fh ;34a5 cd 2f 35 . / 5 call sub_353dh ;34a8 cd 3d 35 . = 5 ld a,(0f1d0h) ;34ab 3a d0 f1 : . . or a ;34ae b7 . jr nz,l34bdh ;34af 20 0c . ld c,078h ;34b1 0e 78 . x call sub_44ach ;34b3 cd ac 44 . . D ld c,083h ;34b6 0e 83 . . call sub_44ach ;34b8 cd ac 44 . . D jr l34c7h ;34bb 18 0a . . l34bdh: ld c,077h ;34bd 0e 77 . w call sub_44ach ;34bf cd ac 44 . . D ld c,002h ;34c2 0e 02 . . call sub_44ach ;34c4 cd ac 44 . . D l34c7h: ld a,(0f543h) ;34c7 3a 43 f5 : C . dec a ;34ca 3d = and 001h ;34cb e6 01 . . inc a ;34cd 3c < ld c,a ;34ce 4f O call sub_44ach ;34cf cd ac 44 . . D ld a,(0f544h) ;34d2 3a 44 f5 : D . ld c,a ;34d5 4f O call sub_44ach ;34d6 cd ac 44 . . D ld a,(0f546h) ;34d9 3a 46 f5 : F . ld c,a ;34dc 4f O inc c ;34dd 0c . call sub_44ach ;34de cd ac 44 . . D ld a,(0f1d0h) ;34e1 3a d0 f1 : . . or a ;34e4 b7 . jp nz,l350dh ;34e5 c2 0d 35 . . 5 ld a,(0f1cfh) ;34e8 3a cf f1 : . . ld c,a ;34eb 4f O call sub_44ach ;34ec cd ac 44 . . D call sub_35c6h ;34ef cd c6 35 . . 5 call sub_44bbh ;34f2 cd bb 44 . . D call sub_44b2h ;34f5 cd b2 44 . . D or a ;34f8 b7 . jr nz,l3529h ;34f9 20 2e . call sub_44b2h ;34fb cd b2 44 . . D or a ;34fe b7 . ret nz ;34ff c0 . call sub_35bbh ;3500 cd bb 35 . . 5 or a ;3503 b7 . jp z,l306bh ;3504 ca 6b 30 . k 0 cp 0fdh ;3507 fe fd . . jp nc,l32ebh ;3509 d2 eb 32 . . 2 ret ;350c c9 . l350dh: call sub_44b2h ;350d cd b2 44 . . D or a ;3510 b7 . jr nz,l3529h ;3511 20 16 . call sub_44b2h ;3513 cd b2 44 . . D or a ;3516 b7 . ret nz ;3517 c0 . call sub_35beh ;3518 cd be 35 . . 5 call sub_35c6h ;351b cd c6 35 . . 5 call sub_44d2h ;351e cd d2 44 . . D call sub_44b2h ;3521 cd b2 44 . . D or a ;3524 b7 . ret nz ;3525 c0 . jp l306bh ;3526 c3 6b 30 . k 0 l3529h: ld a,004h ;3529 3e 04 > . ld (0f536h),a ;352b 32 36 f5 2 6 . ret ;352e c9 . sub_352fh: ld c,064h ;352f 0e 64 . d call sub_4488h ;3531 cd 88 44 . . D ld c,001h ;3534 0e 01 . . call sub_44ach ;3536 cd ac 44 . . D ld c,000h ;3539 0e 00 . . jr l3546h ;353b 18 09 . . sub_353dh: ld a,(0f1d1h) ;353d 3a d1 f1 : . . ld c,a ;3540 4f O call sub_44ach ;3541 cd ac 44 . . D ld c,022h ;3544 0e 22 . " l3546h: jp sub_44ach ;3546 c3 ac 44 . . D sub_3549h: call sub_44ach ;3549 cd ac 44 . . D ld c,000h ;354c 0e 00 . . call sub_44ach ;354e cd ac 44 . . D ld c,000h ;3551 0e 00 . . call sub_44ach ;3553 cd ac 44 . . D call sub_44b2h ;3556 cd b2 44 . . D or a ;3559 b7 . ret ;355a c9 . sub_355bh: ld a,031h ;355b 3e 31 > 1 ld (0f1d1h),a ;355d 32 d1 f1 2 . . xor a ;3560 af . ld (0f1cbh),a ;3561 32 cb f1 2 . . jr l356fh ;3564 18 09 . . sub_3566h: ld a,032h ;3566 3e 32 > 2 ld (0f1d1h),a ;3568 32 d1 f1 2 . . xor a ;356b af . ld (0f1cch),a ;356c 32 cc f1 2 . . l356fh: call sub_3c24h ;356f cd 24 3c . $ < ret c ;3572 d8 . call sub_352fh ;3573 cd 2f 35 . / 5 call sub_353dh ;3576 cd 3d 35 . = 5 ld c,079h ;3579 0e 79 . y call sub_3549h ;357b cd 49 35 . I 5 ret nz ;357e c0 . call sub_44b2h ;357f cd b2 44 . . D or a ;3582 b7 . ret nz ;3583 c0 . jp sub_35bbh ;3584 c3 bb 35 . . 5 l3587h: ld a,031h ;3587 3e 31 > 1 ld hl,l323eh ;3589 21 3e 32 ! > 2 ld (0f1d1h),a ;358c 32 d1 f1 2 . . call sub_352fh ;358f cd 2f 35 . / 5 call sub_353dh ;3592 cd 3d 35 . = 5 ld c,00eh ;3595 0e 0e . . call sub_3549h ;3597 cd 49 35 . I 5 scf ;359a 37 7 ret nz ;359b c0 . call sub_44b2h ;359c cd b2 44 . . D or a ;359f b7 . scf ;35a0 37 7 ret nz ;35a1 c0 . call sub_35bbh ;35a2 cd bb 35 . . 5 or a ;35a5 b7 . scf ;35a6 37 7 ret nz ;35a7 c0 . ld a,(0f1d1h) ;35a8 3a d1 f1 : . . cp 031h ;35ab fe 31 . 1 ld a,0ffh ;35ad 3e ff > . jr nz,l35b6h ;35af 20 05 . ld (0f1cdh),a ;35b1 32 cd f1 2 . . xor a ;35b4 af . ret ;35b5 c9 . l35b6h: ld (0f1ceh),a ;35b6 32 ce f1 2 . . xor a ;35b9 af . ret ;35ba c9 . sub_35bbh: call sub_44b2h ;35bb cd b2 44 . . D sub_35beh: ld b,005h ;35be 06 05 . . l35c0h: call sub_44b2h ;35c0 cd b2 44 . . D djnz l35c0h ;35c3 10 fb . . ret ;35c5 c9 . sub_35c6h: ld de,(0f557h) ;35c6 ed 5b 57 f5 . [ W . ld bc,l0080h ;35ca 01 80 00 . . . ret ;35cd c9 . l35ceh: ld a,(0f534h) ;35ce 3a 34 f5 : 4 . and 003h ;35d1 e6 03 . . cp 002h ;35d3 fe 02 . . jp nc,l3cc5h ;35d5 d2 c5 3c . . < sub_35d8h: ld a,(0f0f7h) ;35d8 3a f7 f0 : . . or a ;35db b7 . jr z,l35e1h ;35dc 28 03 ( . ld a,0ffh ;35de 3e ff > . ret ;35e0 c9 . l35e1h: call sub_394bh ;35e1 cd 4b 39 . K 9 ld b,001h ;35e4 06 01 . . jr c,l35f1h ;35e6 38 09 8 . ld hl,0f0f7h ;35e8 21 f7 f0 ! . . ld (hl),b ;35eb 70 p inc hl ;35ec 23 # ld (hl),a ;35ed 77 w inc hl ;35ee 23 # ld (hl),c ;35ef 71 q dec b ;35f0 05 . l35f1h: dec b ;35f1 05 . ld a,b ;35f2 78 x ret ;35f3 c9 . l35f4h: ld a,(0f534h) ;35f4 3a 34 f5 : 4 . and 003h ;35f7 e6 03 . . cp 002h ;35f9 fe 02 . . jp nc,03cc8h ;35fb d2 c8 3c . . < sub_35feh: ld hl,0f0f7h ;35fe 21 f7 f0 ! . . ld a,(hl) ;3601 7e ~ ld (hl),000h ;3602 36 00 6 . or a ;3604 b7 . inc hl ;3605 23 # ld a,(hl) ;3606 7e ~ inc hl ;3607 23 # ld c,(hl) ;3608 4e N ret nz ;3609 c0 . call sub_3610h ;360a cd 10 36 . . 6 jp l3939h ;360d c3 39 39 . 9 9 sub_3610h: ld hl,(0f027h) ;3610 2a 27 f0 * ' . ld de,(0f071h) ;3613 ed 5b 71 f0 . [ q . add hl,de ;3617 19 . ld (0f6dch),hl ;3618 22 dc f6 " . . ret ;361b c9 . sub_361ch: ld a,(0f026h) ;361c 3a 26 f0 : & . or a ;361f b7 . jr nz,l3624h ;3620 20 02 . dec a ;3622 3d = ret ;3623 c9 . l3624h: ld hl,(0f6dch) ;3624 2a dc f6 * . . ld de,(0f071h) ;3627 ed 5b 71 f0 . [ q . sbc hl,de ;362b ed 52 . R ret ;362d c9 . l362eh: ld a,(0f534h) ;362e 3a 34 f5 : 4 . and 003h ;3631 e6 03 . . jp z,l40c5h ;3633 ca c5 40 . . @ cp 001h ;3636 fe 01 . . jr z,l363fh ;3638 28 05 ( . cp 003h ;363a fe 03 . . jp z,l40c5h ;363c ca c5 40 . . @ l363fh: jp sub_4b3dh ;363f c3 3d 4b . = K l3642h: ld a,(0f534h) ;3642 3a 34 f5 : 4 . and 0c0h ;3645 e6 c0 . . jp z,l4112h ;3647 ca 12 41 . . A cp 080h ;364a fe 80 . . jp z,l4112h ;364c ca 12 41 . . A cp 040h ;364f fe 40 . @ jr z,l363fh ;3651 28 ec ( . ret ;3653 c9 . l3654h: ld a,(0f534h) ;3654 3a 34 f5 : 4 . and 00ch ;3657 e6 0c . . jr z,sub_35feh ;3659 28 a3 ( . cp 008h ;365b fe 08 . . jp z,03cc8h ;365d ca c8 3c . . < ret ;3660 c9 . l3661h: ld a,(0f534h) ;3661 3a 34 f5 : 4 . and 030h ;3664 e6 30 . 0 cp 010h ;3666 fe 10 . . jr z,l363fh ;3668 28 d5 ( . cp 020h ;366a fe 20 . jp z,l40c5h ;366c ca c5 40 . . @ ret ;366f c9 . l3670h: push af ;3670 f5 . push bc ;3671 c5 . push de ;3672 d5 . push hl ;3673 e5 . ld a,(0f357h) ;3674 3a 57 f3 : W . or a ;3677 b7 . jp nz,l37dbh ;3678 c2 db 37 . . 7 ld a,(0f0b8h) ;367b 3a b8 f0 : . . bit 5,a ;367e cb 6f . o jp nz,l37dbh ;3680 c2 db 37 . . 7 ld a,(0f534h) ;3683 3a 34 f5 : 4 . bit 6,a ;3686 cb 77 . w jp nz,l37dbh ;3688 c2 db 37 . . 7 ld a,0ffh ;368b 3e ff > . ld (0f357h),a ;368d 32 57 f3 2 W . call sub_4eb6h ;3690 cd b6 4e . . N ld a,(hl) ;3693 7e ~ bit 0,a ;3694 cb 47 . G push af ;3696 f5 . push hl ;3697 e5 . jr z,l369fh ;3698 28 05 ( . res 0,(hl) ;369a cb 86 . . call sub_4e9dh ;369c cd 9d 4e . . N l369fh: call sub_37f8h ;369f cd f8 37 . . 7 ld a,(0f10bh) ;36a2 3a 0b f1 : . . or a ;36a5 b7 . jp nz,l37e0h ;36a6 c2 e0 37 . . 7 ld hl,0f69bh ;36a9 21 9b f6 ! . . ld (hl),000h ;36ac 36 00 6 . ld a,(0f73bh) ;36ae 3a 3b f7 : ; . dec a ;36b1 3d = jp z,l3728h ;36b2 ca 28 37 . ( 7 inc a ;36b5 3c < ld a,008h ;36b6 3e 08 > . jr z,l36bbh ;36b8 28 01 ( . xor a ;36ba af . l36bbh: inc hl ;36bb 23 # ld (hl),a ;36bc 77 w inc hl ;36bd 23 # ld (hl),001h ;36be 36 01 6 . call sub_5fe0h ;36c0 cd e0 5f . . _ ld a,(0f73bh) ;36c3 3a 3b f7 : ; . or a ;36c6 b7 . ld a,(0f2d0h) ;36c7 3a d0 f2 : . . jr z,l36cfh ;36ca 28 03 ( . ld a,(0f2cfh) ;36cc 3a cf f2 : . . l36cfh: ld b,008h ;36cf 06 08 . . cp b ;36d1 b8 . jr z,l36d5h ;36d2 28 01 ( . dec b ;36d4 05 . l36d5h: push bc ;36d5 c5 . ld b,050h ;36d6 06 50 . P l36d8h: push bc ;36d8 c5 . ld c,034h ;36d9 0e 34 . 4 call sub_4488h ;36db cd 88 44 . . D ld bc,l0003h ;36de 01 03 00 . . . ld de,0f69bh ;36e1 11 9b f6 . . . call sub_44bbh ;36e4 cd bb 44 . . D call sub_44b2h ;36e7 cd b2 44 . . D call sub_44b2h ;36ea cd b2 44 . . D call sub_5fe9h ;36ed cd e9 5f . . _ cp 020h ;36f0 fe 20 . jr c,l3705h ;36f2 38 11 8 . ld c,a ;36f4 4f O cp 07fh ;36f5 fe 7f .  jr c,l3707h ;36f7 38 0e 8 . jr z,l3705h ;36f9 28 0a ( . inc a ;36fb 3c < jr z,l3705h ;36fc 28 07 ( . ld a,(0f69fh) ;36fe 3a 9f f6 : . . bit 5,a ;3701 cb 6f . o jr z,l3707h ;3703 28 02 ( . l3705h: ld c,020h ;3705 0e 20 . l3707h: call l3642h ;3707 cd 42 36 . B 6 ld hl,0f69bh ;370a 21 9b f6 ! . . inc (hl) ;370d 34 4 pop bc ;370e c1 . djnz l36d8h ;370f 10 c7 . . call sub_37fbh ;3711 cd fb 37 . . 7 ld a,(0f10bh) ;3714 3a 0b f1 : . . and a ;3717 a7 . pop bc ;3718 c1 . jp nz,l37e0h ;3719 c2 e0 37 . . 7 xor a ;371c af . ld hl,0f69bh ;371d 21 9b f6 ! . . ld (hl),a ;3720 77 w inc hl ;3721 23 # inc (hl) ;3722 34 4 djnz l36d5h ;3723 10 b0 . . jp l37c3h ;3725 c3 c3 37 . . 7 l3728h: dec a ;3728 3d = ld (0f35ch),a ;3729 32 5c f3 2 \ . xor a ;372c af . ld hl,0f69bh ;372d 21 9b f6 ! . . ld (hl),a ;3730 77 w inc hl ;3731 23 # ld (hl),a ;3732 77 w inc a ;3733 3c < inc hl ;3734 23 # ld (hl),a ;3735 77 w ld e,041h ;3736 1e 41 . A call sub_3806h ;3738 cd 06 38 . . 8 ld c,008h ;373b 0e 08 . . call l3642h ;373d cd 42 36 . B 6 ld a,(0f2d0h) ;3740 3a d0 f2 : . . ld b,008h ;3743 06 08 . . cp b ;3745 b8 . jr z,l3749h ;3746 28 01 ( . dec b ;3748 05 . l3749h: push bc ;3749 c5 . ld e,04bh ;374a 1e 4b . K call sub_3806h ;374c cd 06 38 . . 8 ld c,0e0h ;374f 0e e0 . . call l3642h ;3751 cd 42 36 . B 6 ld c,001h ;3754 0e 01 . . call l3642h ;3756 cd 42 36 . B 6 ld b,03ch ;3759 06 3c . < l375bh: push bc ;375b c5 . ld hl,0f6deh ;375c 21 de f6 ! . . ld b,008h ;375f 06 08 . . l3761h: push bc ;3761 c5 . push hl ;3762 e5 . ld c,024h ;3763 0e 24 . $ call sub_4488h ;3765 cd 88 44 . . D ld bc,l0003h ;3768 01 03 00 . . . ld de,0f69bh ;376b 11 9b f6 . . . call sub_44bbh ;376e cd bb 44 . . D call sub_44b2h ;3771 cd b2 44 . . D call sub_44b2h ;3774 cd b2 44 . . D pop hl ;3777 e1 . ld (hl),a ;3778 77 w inc hl ;3779 23 # ld a,(0f69ch) ;377a 3a 9c f6 : . . inc a ;377d 3c < ld (0f69ch),a ;377e 32 9c f6 2 . . pop bc ;3781 c1 . djnz l3761h ;3782 10 dd . . ld b,008h ;3784 06 08 . . l3786h: push bc ;3786 c5 . ld hl,0f6deh ;3787 21 de f6 ! . . ld b,008h ;378a 06 08 . . l378ch: ld a,(hl) ;378c 7e ~ rlca ;378d 07 . ld (hl),a ;378e 77 w rl c ;378f cb 11 . . inc hl ;3791 23 # djnz l378ch ;3792 10 f8 . . call l3642h ;3794 cd 42 36 . B 6 pop bc ;3797 c1 . djnz l3786h ;3798 10 ec . . ld hl,0f69bh ;379a 21 9b f6 ! . . inc (hl) ;379d 34 4 inc hl ;379e 23 # ld a,(hl) ;379f 7e ~ sub 008h ;37a0 d6 08 . . ld (hl),a ;37a2 77 w pop bc ;37a3 c1 . djnz l375bh ;37a4 10 b5 . . call sub_37f8h ;37a6 cd f8 37 . . 7 ld a,(0f10bh) ;37a9 3a 0b f1 : . . and a ;37ac a7 . pop bc ;37ad c1 . jp nz,l37e0h ;37ae c2 e0 37 . . 7 ld hl,0f69bh ;37b1 21 9b f6 ! . . ld (hl),a ;37b4 77 w inc hl ;37b5 23 # ld a,(hl) ;37b6 7e ~ add a,008h ;37b7 c6 08 . . ld (hl),a ;37b9 77 w dec b ;37ba 05 . jp nz,l3749h ;37bb c2 49 37 . I 7 ld e,032h ;37be 1e 32 . 2 call sub_3806h ;37c0 cd 06 38 . . 8 l37c3h: xor a ;37c3 af . ld (0f69eh),a ;37c4 32 9e f6 2 . . l37c7h: call sub_37f8h ;37c7 cd f8 37 . . 7 xor a ;37ca af . ld (0f35ch),a ;37cb 32 5c f3 2 \ . pop hl ;37ce e1 . pop af ;37cf f1 . jr z,l37d7h ;37d0 28 05 ( . set 0,(hl) ;37d2 cb c6 . . call sub_4e26h ;37d4 cd 26 4e . & N l37d7h: xor a ;37d7 af . ld (0f357h),a ;37d8 32 57 f3 2 W . l37dbh: pop hl ;37db e1 . pop de ;37dc d1 . pop bc ;37dd c1 . pop af ;37de f1 . ret ;37df c9 . l37e0h: call sub_3881h ;37e0 cd 81 38 . . 8 call l40dfh ;37e3 cd df 40 . . @ inc a ;37e6 3c < jr nz,l37f1h ;37e7 20 08 . ld e,032h ;37e9 1e 32 . 2 call sub_3806h ;37eb cd 06 38 . . 8 call sub_37f8h ;37ee cd f8 37 . . 7 l37f1h: ld a,0ffh ;37f1 3e ff > . ld (0f69eh),a ;37f3 32 9e f6 2 . . jr l37c7h ;37f6 18 cf . . sub_37f8h: call 037feh ;37f8 cd fe 37 . . 7 sub_37fbh: ld c,00ah ;37fb 0e 0a . . ld a,(00d0eh) ;37fd 3a 0e 0d : . . ld a,(l1b0eh) ;3800 3a 0e 1b : . . jp l3642h ;3803 c3 42 36 . B 6 sub_3806h: push de ;3806 d5 . call 03801h ;3807 cd 01 38 . . 8 pop bc ;380a c1 . jp l3642h ;380b c3 42 36 . B 6 sub_380eh: ld a,(hl) ;380e 7e ~ or a ;380f b7 . ret z ;3810 c8 . push hl ;3811 e5 . ld c,a ;3812 4f O call sub_4b3dh ;3813 cd 3d 4b . = K pop hl ;3816 e1 . inc hl ;3817 23 # jr sub_380eh ;3818 18 f4 . . sub_381ah: push af ;381a f5 . ld b,000h ;381b 06 00 . . ld c,a ;381d 4f O l381eh: sub 00ah ;381e d6 0a . . jr c,l3826h ;3820 38 04 8 . inc b ;3822 04 . ld c,a ;3823 4f O jr l381eh ;3824 18 f8 . . l3826h: push bc ;3826 c5 . ld c,b ;3827 48 H call sub_3832h ;3828 cd 32 38 . 2 8 pop bc ;382b c1 . pop af ;382c f1 . jr nc,sub_3832h ;382d 30 03 0 . inc c ;382f 0c . dec c ;3830 0d . ret z ;3831 c8 . sub_3832h: ld a,030h ;3832 3e 30 > 0 add a,c ;3834 81 . ld c,a ;3835 4f O jp sub_4b3dh ;3836 c3 3d 4b . = K sub_3839h: ld hl,(0f004h) ;3839 2a 04 f0 * . . ld de,l1400h ;383c 11 00 14 . . . add hl,de ;383f 19 . ld a,h ;3840 7c | srl h ;3841 cb 3c . < srl h ;3843 cb 3c . < and 003h ;3845 e6 03 . . jr z,l384fh ;3847 28 06 ( . ld b,a ;3849 47 G xor a ;384a af . l384bh: add a,019h ;384b c6 19 . . djnz l384bh ;384d 10 fc . . l384fh: push af ;384f f5 . ld a,h ;3850 7c | or a ;3851 b7 . call sub_381ah ;3852 cd 1a 38 . . 8 pop af ;3855 f1 . or a ;3856 b7 . jr z,l3864h ;3857 28 0b ( . push af ;3859 f5 . ld c,02eh ;385a 0e 2e . . call sub_4b3dh ;385c cd 3d 4b . = K pop af ;385f f1 . scf ;3860 37 7 call sub_381ah ;3861 cd 1a 38 . . 8 l3864h: ld hl,l7fd7h ;3864 21 d7 7f ! .  jr sub_380eh ;3867 18 a5 . . sub_3869h: push bc ;3869 c5 . ld bc,l0000h ;386a 01 00 00 . . . jr l3885h ;386d 18 16 . . sub_386fh: push bc ;386f c5 . ld bc,l0064h ;3870 01 64 00 . d . jr l3885h ;3873 18 10 . . sub_3875h: push bc ;3875 c5 . ld bc,l03e8h ;3876 01 e8 03 . . . jr l3885h ;3879 18 0a . . sub_387bh: push bc ;387b c5 . ld bc,l1716h ;387c 01 16 17 . . . jr l3885h ;387f 18 04 . . sub_3881h: push bc ;3881 c5 . ld bc,l2710h ;3882 01 10 27 . . ' l3885h: push af ;3885 f5 . l3886h: dec bc ;3886 0b . ld a,b ;3887 78 x or c ;3888 b1 . jr nz,l3886h ;3889 20 fb . pop af ;388b f1 . pop bc ;388c c1 . ret ;388d c9 . sub_388eh: add hl,hl ;388e 29 ) sub_388fh: add hl,hl ;388f 29 ) sub_3890h: add hl,hl ;3890 29 ) sub_3891h: add hl,hl ;3891 29 ) add hl,hl ;3892 29 ) add hl,hl ;3893 29 ) add hl,hl ;3894 29 ) ret ;3895 c9 . sub_3896h: ld c,00ah ;3896 0e 0a . . ld de,l02c6h ;3898 11 c6 02 . . . l389bh: ld a,(0f10bh) ;389b 3a 0b f1 : . . or a ;389e b7 . jr nz,l38ceh ;389f 20 2d - ld a,c ;38a1 79 y or a ;38a2 b7 . jr z,l38d1h ;38a3 28 2c ( , ld a,d ;38a5 7a z or e ;38a6 b3 . jr z,l38dbh ;38a7 28 32 ( 2 ld hl,0f6deh ;38a9 21 de f6 ! . . ld (hl),d ;38ac 72 r inc hl ;38ad 23 # ld (hl),e ;38ae 73 s inc hl ;38af 23 # ld (hl),c ;38b0 71 q ld c,073h ;38b1 0e 73 . s call sub_4488h ;38b3 cd 88 44 . . D ld bc,l0003h ;38b6 01 03 00 . . . ld de,0f6deh ;38b9 11 de f6 . . . call sub_44bbh ;38bc cd bb 44 . . D l38bfh: call sub_6d59h ;38bf cd 59 6d . Y m jr nz,l38ceh ;38c2 20 0a . call sub_456bh ;38c4 cd 6b 45 . k E jr z,l38bfh ;38c7 28 f6 ( . call sub_44b2h ;38c9 cd b2 44 . . D or a ;38cc b7 . ret z ;38cd c8 . l38ceh: ld a,0ffh ;38ce 3e ff > . ret ;38d0 c9 . l38d1h: ld c,075h ;38d1 0e 75 . u call sub_4505h ;38d3 cd 05 45 . . E ld a,c ;38d6 79 y or a ;38d7 b7 . jr nz,l38d1h ;38d8 20 f7 . ret ;38da c9 . l38dbh: ld b,c ;38db 41 A l38dch: push bc ;38dc c5 . ld a,(0f0dah) ;38dd 3a da f0 : . . or a ;38e0 b7 . call nz,sub_2c46h ;38e1 c4 46 2c . F , pop bc ;38e4 c1 . ld a,(0f10bh) ;38e5 3a 0b f1 : . . or a ;38e8 b7 . ret nz ;38e9 c0 . call sub_3881h ;38ea cd 81 38 . . 8 djnz l38dch ;38ed 10 ed . . ret ;38ef c9 . nop ;38f0 00 . rst 38h ;38f1 ff . rst 38h ;38f2 ff . rst 38h ;38f3 ff . rst 38h ;38f4 ff . rst 38h ;38f5 ff . rst 38h ;38f6 ff . rst 38h ;38f7 ff . ret ;38f8 c9 . sub_38f9h: in a,(005h) ;38f9 db 05 ; GAH40M Status register (r) and 008h ;38fb e6 08 . . jr z,sub_38f9h ;38fd 28 fa ( . ld a,c ;38ff 79 y out (006h),a ;3900 d3 06 ; GAH40M Serial I/O register (rw) sub_3902h: ld a,002h ;3902 3e 02 > . out (001h),a ;3904 d3 01 . . l3906h: in a,(005h) ;3906 db 05 ; GAH40M Status register (r) and 008h ;3908 e6 08 . . jr z,l3906h ;390a 28 fa ( . in a,(006h) ;390c db 06 ; GAH40M Serial I/O register (rw) ret ;390e c9 . sub_390fh: push bc ;390f c5 . call sub_3461h ;3910 cd 61 34 . a 4 ld a,(0f0dah) ;3913 3a da f0 : . . or a ;3916 b7 . call nz,sub_2e47h ;3917 c4 47 2e . G . ld a,(0f0d9h) ;391a 3a d9 f0 : . . set 7,a ;391d cb ff . . ld (0f0d9h),a ;391f 32 d9 f0 2 . . ld a,(0f357h) ;3922 3a 57 f3 : W . or a ;3925 b7 . jr nz,l3937h ;3926 20 0f . ld a,(0f0dch) ;3928 3a dc f0 : . . or a ;392b b7 . call nz,sub_0940h ;392c c4 40 09 . @ . ld a,(0f0dbh) ;392f 3a db f0 : . . set 7,a ;3932 cb ff . . ld (0f0dbh),a ;3934 32 db f0 2 . . l3937h: pop bc ;3937 c1 . ret ;3938 c9 . l3939h: call sub_394bh ;3939 cd 4b 39 . K 9 ret nc ;393c d0 . halt ;393d 76 v call sub_390fh ;393e cd 0f 39 . . 9 call sub_361ch ;3941 cd 1c 36 . . 6 ld c,000h ;3944 0e 00 . . call z,sub_2e61h ;3946 cc 61 2e . a . jr l3939h ;3949 18 ee . . sub_394bh: call sub_3951h ;394b cd 51 39 . Q 9 ret nc ;394e d0 . jr l3965h ;394f 18 14 . . sub_3951h: ld a,(0f107h) ;3951 3a 07 f1 : . . sub 001h ;3954 d6 01 . . ret c ;3956 d8 . ld (0f107h),a ;3957 32 07 f1 2 . . ld hl,(0f105h) ;395a 2a 05 f1 * . . ld a,(hl) ;395d 7e ~ inc hl ;395e 23 # ld (0f105h),hl ;395f 22 05 f1 " . . ld c,000h ;3962 0e 00 . . ret ;3964 c9 . l3965h: di ;3965 f3 . ld a,(0f0fah) ;3966 3a fa f0 : . . ld hl,(0f0fch) ;3969 2a fc f0 * . . cp l ;396c bd . jp z,l3beah ;396d ca ea 3b . . ; ld b,(hl) ;3970 46 F inc hl ;3971 23 # ld a,l ;3972 7d } cp 027h ;3973 fe 27 . ' jr nz,l397ah ;3975 20 03 . ld hl,0f806h ;3977 21 06 f8 ! . . l397ah: ld (0f0fch),hl ;397a 22 fc f0 " . . ei ;397d fb . ld a,b ;397e 78 x cp 090h ;397f fe 90 . . jp nc,l3a60h ;3981 d2 60 3a . ` : ld a,(0f0feh) ;3984 3a fe f0 : . . and 0c0h ;3987 e6 c0 . . jr z,l3996h ;3989 28 0b ( . ld a,b ;398b 78 x and 0f0h ;398c e6 f0 . . srl a ;398e cb 3f . ? ld c,a ;3990 4f O ld a,b ;3991 78 x and 00fh ;3992 e6 0f . . add a,c ;3994 81 . ld b,a ;3995 47 G l3996h: ld hl,(0f0ffh) ;3996 2a ff f0 * . . ld d,000h ;3999 16 00 . . ld e,b ;399b 58 X add hl,de ;399c 19 . ld de,(0f101h) ;399d ed 5b 01 f1 . [ . . add hl,de ;39a1 19 . ld de,l4576h ;39a2 11 76 45 . v E add hl,de ;39a5 19 . ld a,(hl) ;39a6 7e ~ cp 0ffh ;39a7 fe ff . . scf ;39a9 37 7 ret z ;39aa c8 . cp 0e0h ;39ab fe e0 . . jr nc,l39b3h ;39ad 30 04 0 . cp 0a0h ;39af fe a0 . . jr nc,l39dbh ;39b1 30 28 0 ( l39b3h: ld b,a ;39b3 47 G ld a,(0f6a0h) ;39b4 3a a0 f6 : . . cp 00bh ;39b7 fe 0b . . jr z,l39c3h ;39b9 28 08 ( . cp 00dh ;39bb fe 0d . . ld a,b ;39bd 78 x call z,sub_4a8ch ;39be cc 8c 4a . . J jr l39d7h ;39c1 18 14 . . l39c3h: ld a,b ;39c3 78 x cp 05bh ;39c4 fe 5b . [ jr z,$+16 ;39c6 28 0e ( . cp 05ch ;39c8 fe 5c . \ jr z,l39d4h ;39ca 28 08 ( . cp 07bh ;39cc fe 7b . { jr z,$+8 ;39ce 28 06 ( . cp 07ch ;39d0 fe 7c . | jr nz,l39d7h ;39d2 20 03 . l39d4h: dec a ;39d4 3d = ld b,03ch ;39d5 06 3c . < l39d7h: ld c,000h ;39d7 0e 00 . . or a ;39d9 b7 . ret ;39da c9 . l39dbh: cp 0cbh ;39db fe cb . . jr c,l39feh ;39dd 38 1f 8 . sub 0cbh ;39df d6 cb . . ld b,a ;39e1 47 G ld a,(0f0feh) ;39e2 3a fe f0 : . . and 003h ;39e5 e6 03 . . ld de,l0000h ;39e7 11 00 00 . . . jr z,l39efh ;39ea 28 03 ( . ld de,l000fh+1 ;39ec 11 10 00 . . . l39efh: ld hl,04b00h ;39ef 21 00 4b ! . K add hl,de ;39f2 19 . ld e,b ;39f3 58 X add hl,de ;39f4 19 . ld a,(hl) ;39f5 7e ~ cp 0e0h ;39f6 fe e0 . . jr nc,l39b3h ;39f8 30 b9 0 . cp 0a0h ;39fa fe a0 . . jr c,l39b3h ;39fc 38 b5 8 . l39feh: cp 0c0h ;39fe fe c0 . . jr c,l3a26h ;3a00 38 24 8 $ l3a02h: ld c,a ;3a02 4f O ld a,(0f108h) ;3a03 3a 08 f1 : . . inc a ;3a06 3c < ld a,c ;3a07 79 y jr nz,l3a10h ;3a08 20 06 . add a,020h ;3a0a c6 20 . or a ;3a0c b7 . ld c,0ffh ;3a0d 0e ff . . ret ;3a0f c9 . l3a10h: add a,a ;3a10 87 . add a,a ;3a11 87 . add a,a ;3a12 87 . add a,a ;3a13 87 . ld b,000h ;3a14 06 00 . . l3a16h: ld c,a ;3a16 4f O ld hl,(0f103h) ;3a17 2a 03 f1 * . . add hl,bc ;3a1a 09 . ld a,(hl) ;3a1b 7e ~ ld (0f107h),a ;3a1c 32 07 f1 2 . . inc hl ;3a1f 23 # ld (0f105h),hl ;3a20 22 05 f1 " . . jp sub_3951h ;3a23 c3 51 39 . Q 9 l3a26h: cp 0a9h ;3a26 fe a9 . . jr c,l3a49h ;3a28 38 1f 8 . cp 0b6h ;3a2a fe b6 . . jr nc,l3a40h ;3a2c 30 12 0 . ld c,a ;3a2e 4f O ld a,(0f330h) ;3a2f 3a 30 f3 : 0 . or a ;3a32 b7 . scf ;3a33 37 7 ret z ;3a34 c8 . ld a,(0f109h) ;3a35 3a 09 f1 : . . inc a ;3a38 3c < ld a,c ;3a39 79 y jr nz,l3a40h ;3a3a 20 04 . or a ;3a3c b7 . ld c,0ffh ;3a3d 0e ff . . ret ;3a3f c9 . l3a40h: sub 0ach ;3a40 d6 ac . . ld hl,03bcch ;3a42 21 cc 3b ! . ; l3a45h: call sub_6042h ;3a45 cd 42 60 . B ` jp (hl) ;3a48 e9 . l3a49h: sub 0a1h ;3a49 d6 a1 . . ld hl,0f1bah ;3a4b 21 ba f1 ! . . add a,a ;3a4e 87 . ld b,000h ;3a4f 06 00 . . ld c,a ;3a51 4f O add hl,bc ;3a52 09 . ld a,(hl) ;3a53 7e ~ inc hl ;3a54 23 # ld h,(hl) ;3a55 66 f ld l,a ;3a56 6f o ld de,l3a5ch ;3a57 11 5c 3a . \ : push de ;3a5a d5 . jp (hl) ;3a5b e9 . l3a5ch: ei ;3a5c fb . jp l3965h ;3a5d c3 65 39 . e 9 l3a60h: cp 0a2h ;3a60 fe a2 . . ret c ;3a62 d8 . cp 0a8h ;3a63 fe a8 . . jr c,l3a70h ;3a65 38 09 8 . cp 0b2h ;3a67 fe b2 . . ret c ;3a69 d8 . cp 0b8h ;3a6a fe b8 . . ccf ;3a6c 3f ? ret c ;3a6d d8 . sub 009h ;3a6e d6 09 . . l3a70h: sub 0a2h ;3a70 d6 a2 . . ld e,a ;3a72 5f _ ld a,b ;3a73 78 x and 007h ;3a74 e6 07 . . cp 007h ;3a76 fe 07 . . jr nz,l3a82h ;3a78 20 08 . ld a,(0f0feh) ;3a7a 3a fe f0 : . . and 003h ;3a7d e6 03 . . jr z,l3a82h ;3a7f 28 01 ( . inc e ;3a81 1c . l3a82h: ld a,e ;3a82 7b { ld hl,l3bb0h ;3a83 21 b0 3b ! . ; call sub_6042h ;3a86 cd 42 60 . B ` ld de,l3a91h ;3a89 11 91 3a . . : push de ;3a8c d5 . ld a,(0f0feh) ;3a8d 3a fe f0 : . . jp (hl) ;3a90 e9 . l3a91h: ld (0f0feh),a ;3a91 32 fe f0 2 . . call sub_3a9dh ;3a94 cd 9d 3a . . : call l3af1h ;3a97 cd f1 3a . . : jp l3965h ;3a9a c3 65 39 . e 9 sub_3a9dh: ld a,(0f0feh) ;3a9d 3a fe f0 : . . ld b,a ;3aa0 47 G and 0c0h ;3aa1 e6 c0 . . jr nz,l3addh ;3aa3 20 38 8 bit 5,b ;3aa5 cb 68 . h jr nz,l3ad1h ;3aa7 20 28 ( bit 4,b ;3aa9 cb 60 . ` jr nz,l3ad6h ;3aab 20 29 ) bit 2,b ;3aad cb 50 . P jr nz,l3ac0h ;3aaf 20 0f . ld a,b ;3ab1 78 x and 003h ;3ab2 e6 03 . . jr nz,l3abbh ;3ab4 20 05 . ld hl,00042h ;3ab6 21 42 00 ! B . jr l3ae0h ;3ab9 18 25 . % l3abbh: ld hl,l004ah ;3abb 21 4a 00 ! J . jr l3ae0h ;3abe 18 20 . l3ac0h: ld a,b ;3ac0 78 x and 003h ;3ac1 e6 03 . . jr nz,l3acah ;3ac3 20 05 . ld hl,l00cah+2 ;3ac5 21 cc 00 ! . . jr l3acdh ;3ac8 18 03 . . l3acah: ld hl,000d4h ;3aca 21 d4 00 ! . . l3acdh: ld e,001h ;3acd 1e 01 . . jr l3ae2h ;3acf 18 11 . . l3ad1h: ld hl,00156h ;3ad1 21 56 01 ! V . jr l3ae0h ;3ad4 18 0a . . l3ad6h: ld hl,0015eh ;3ad6 21 5e 01 ! ^ . ld e,002h ;3ad9 1e 02 . . jr l3ae2h ;3adb 18 05 . . l3addh: ld hl,l0000h ;3add 21 00 00 ! . . l3ae0h: ld e,000h ;3ae0 1e 00 . . l3ae2h: ld (0f0ffh),hl ;3ae2 22 ff f0 " . . ld a,(0f0b2h) ;3ae5 3a b2 f0 : . . and 0fch ;3ae8 e6 fc . . or e ;3aea b3 . ld (0f0b2h),a ;3aeb 32 b2 f0 2 . . out (002h),a ;3aee d3 02 . . ret ;3af0 c9 . l3af1h: ld a,(0f6a0h) ;3af1 3a a0 f6 : . . ld de,l0000h ;3af4 11 00 00 . . . cp 00fh ;3af7 fe 0f . . jr z,l3b24h ;3af9 28 29 ( ) cp 00ch ;3afb fe 0c . . jr z,l3b24h ;3afd 28 25 ( % cp 009h ;3aff fe 09 . . jr z,l3b24h ;3b01 28 21 ( ! cp 008h ;3b03 fe 08 . . jr z,l3b24h ;3b05 28 1d ( . ld de,l01dfh+1 ;3b07 11 e0 01 . . . cp 00ah ;3b0a fe 0a . . jr z,l3b24h ;3b0c 28 16 ( . cp 006h ;3b0e fe 06 . . jr z,l3b24h ;3b10 28 12 ( . cp 00bh ;3b12 fe 0b . . jr z,l3b24h ;3b14 28 0e ( . cp 00dh ;3b16 fe 0d . . jr z,l3b24h ;3b18 28 0a ( . ld de,l03c0h ;3b1a 11 c0 03 . . . cp 00eh ;3b1d fe 0e . . jr z,l3b29h ;3b1f 28 08 ( . ld de,l0000h ;3b21 11 00 00 . . . l3b24h: ld (0f101h),de ;3b24 ed 53 01 f1 . S . . ret ;3b28 c9 . l3b29h: ld a,(0f0feh) ;3b29 3a fe f0 : . . ld b,a ;3b2c 47 G and 0c0h ;3b2d e6 c0 . . jr nz,l3b24h ;3b2f 20 f3 . bit 5,b ;3b31 cb 68 . h jr nz,l3b39h ;3b33 20 04 . bit 4,b ;3b35 cb 60 . ` jr z,l3b24h ;3b37 28 eb ( . l3b39h: ld de,l01dfh+1 ;3b39 11 e0 01 . . . jr l3b24h ;3b3c 18 e6 . . ld a,(0f34fh) ;3b3e 3a 4f f3 : O . jr l3b84h ;3b41 18 41 . A ld a,(0f34eh) ;3b43 3a 4e f3 : N . jr l3b84h ;3b46 18 3c . < ld a,(0f34bh) ;3b48 3a 4b f3 : K . jr l3b84h ;3b4b 18 37 . 7 ld a,(0f34ah) ;3b4d 3a 4a f3 : J . jr l3b84h ;3b50 18 32 . 2 ld a,(0f350h) ;3b52 3a 50 f3 : P . jr l3b84h ;3b55 18 2d . - ld a,(0f351h) ;3b57 3a 51 f3 : Q . jr l3b84h ;3b5a 18 28 . ( call sub_54e2h ;3b5c cd e2 54 . . T jp l3965h ;3b5f c3 65 39 . e 9 ld a,(0f34ch) ;3b62 3a 4c f3 : L . jr l3b84h ;3b65 18 1d . . ld a,(0f34dh) ;3b67 3a 4d f3 : M . jr l3b84h ;3b6a 18 18 . . call sub_54b3h ;3b6c cd b3 54 . . T jp l3965h ;3b6f c3 65 39 . e 9 ld a,(0f348h) ;3b72 3a 48 f3 : H . jr l3b84h ;3b75 18 0d . . ld a,(0f349h) ;3b77 3a 49 f3 : I . jr l3b84h ;3b7a 18 08 . . ld a,(0f347h) ;3b7c 3a 47 f3 : G . jr l3b84h ;3b7f 18 03 . . ld a,(0f346h) ;3b81 3a 46 f3 : F . l3b84h: cp 0f8h ;3b84 fe f8 . . jr nc,l3b94h ;3b86 30 0c 0 . cp 080h ;3b88 fe 80 . . scf ;3b8a 37 7 ret z ;3b8b c8 . jr l3b90h ;3b8c 18 02 . . ld a,003h ;3b8e 3e 03 > . l3b90h: ld c,000h ;3b90 0e 00 . . or a ;3b92 b7 . ret ;3b93 c9 . l3b94h: sub 0f8h ;3b94 d6 f8 . . ld hl,l3965h ;3b96 21 65 39 ! e 9 push hl ;3b99 e5 . ld hl,l3ba0h ;3b9a 21 a0 3b ! . ; jp l3a45h ;3b9d c3 45 3a . E : l3ba0h: ld c,(hl) ;3ba0 4e N ld d,e ;3ba1 53 S ld d,(hl) ;3ba2 56 V ld d,e ;3ba3 53 S sbc a,l ;3ba4 9d . ld d,c ;3ba5 51 Q or e ;3ba6 b3 . ld d,c ;3ba7 51 Q jp (hl) ;3ba8 e9 . ld d,c ;3ba9 51 Q ei ;3baa fb . ld d,c ;3bab 51 Q adc a,h ;3bac 8c . ld e,(hl) ;3bad 5e ^ sub b ;3bae 90 . ld e,(hl) ;3baf 5e ^ l3bb0h: rst 30h ;3bb0 f7 . dec sp ;3bb1 3b ; inc bc ;3bb2 03 . inc a ;3bb3 3c < ld c,03ch ;3bb4 0e 3c . < jp m,l063bh ;3bb6 fa 3b 06 . ; . inc a ;3bb9 3c < dec de ;3bba 1b . inc a ;3bbb 3c < dec de ;3bbc 1b . inc a ;3bbd 3c < defb 0fdh,03bh,009h ;illegal sequence ;3bbe fd 3b 09 . ; . inc a ;3bc1 3c < rrca ;3bc2 0f . inc a ;3bc3 3c < nop ;3bc4 00 . inc a ;3bc5 3c < inc c ;3bc6 0c . inc a ;3bc7 3c < ld e,03ch ;3bc8 1e 3c . < ld hl,l3e3ch ;3bca 21 3c 3e ! < > dec sp ;3bcd 3b ; ld b,e ;3bce 43 C dec sp ;3bcf 3b ; ld c,b ;3bd0 48 H dec sp ;3bd1 3b ; ld c,l ;3bd2 4d M dec sp ;3bd3 3b ; ld d,d ;3bd4 52 R dec sp ;3bd5 3b ; ld d,a ;3bd6 57 W dec sp ;3bd7 3b ; ld e,h ;3bd8 5c \ dec sp ;3bd9 3b ; ld h,d ;3bda 62 b dec sp ;3bdb 3b ; ld h,a ;3bdc 67 g dec sp ;3bdd 3b ; ld l,h ;3bde 6c l dec sp ;3bdf 3b ; ld (hl),d ;3be0 72 r dec sp ;3be1 3b ; ld (hl),a ;3be2 77 w dec sp ;3be3 3b ; ld a,h ;3be4 7c | dec sp ;3be5 3b ; add a,c ;3be6 81 . dec sp ;3be7 3b ; adc a,(hl) ;3be8 8e . dec sp ;3be9 3b ; l3beah: ei ;3bea fb . xor a ;3beb af . ld (0f10ah),a ;3bec 32 0a f1 2 . . ld (0f10bh),a ;3bef 32 0b f1 2 . . ld (0f10ch),a ;3bf2 32 0c f1 2 . . scf ;3bf5 37 7 ret ;3bf6 c9 . res 7,a ;3bf7 cb bf . . ret ;3bf9 c9 . res 6,a ;3bfa cb b7 . . ret ;3bfc c9 . set 7,a ;3bfd cb ff . . ret ;3bff c9 . l3c00h: set 6,a ;3c00 cb f7 . . ret ;3c02 c9 . res 1,a ;3c03 cb 8f . . ret ;3c05 c9 . res 0,a ;3c06 cb 87 . . ret ;3c08 c9 . l3c09h: set 1,a ;3c09 cb cf . . ret ;3c0b c9 . set 0,a ;3c0c cb c7 . . ret ;3c0e c9 . xor 004h ;3c0f ee 04 . . ld b,a ;3c11 47 G and 018h ;3c12 e6 18 . . ld a,b ;3c14 78 x ret z ;3c15 c8 . and 0e7h ;3c16 e6 e7 . . set 2,a ;3c18 cb d7 . . ret ;3c1a c9 . res 5,a ;3c1b cb af . . ret ;3c1d c9 . set 5,a ;3c1e cb ef . . l3c20h: ret ;3c20 c9 . xor 010h ;3c21 ee 10 . . ret ;3c23 c9 . sub_3c24h: ld a,(0f35ah) ;3c24 3a 5a f3 : Z . or a ;3c27 b7 . jr nz,l3c2fh ;3c28 20 05 . call sub_3c63h ;3c2a cd 63 3c . c < jr l3c34h ;3c2d 18 05 . . l3c2fh: ld a,(0f6dbh) ;3c2f 3a db f6 : . . or a ;3c32 b7 . ret z ;3c33 c8 . l3c34h: xor a ;3c34 af . ld (0f6dbh),a ;3c35 32 db f6 2 . . jr l3c52h ;3c38 18 18 . . l3c3ah: ld a,(0f35ah) ;3c3a 3a 5a f3 : Z . l3c3dh: or a ;3c3d b7 . jr nz,l3c45h ;3c3e 20 05 . call sub_3c63h ;3c40 cd 63 3c . c < jr l3c4ah ;3c43 18 05 . . l3c45h: ld a,(0f6dbh) ;3c45 3a db f6 : . . or a ;3c48 b7 . ret nz ;3c49 c0 . l3c4ah: ld a,001h ;3c4a 3e 01 > . ld (0f6dbh),a ;3c4c 32 db f6 2 . . ld a,(0f6aeh) ;3c4f 3a ae f6 : . . l3c52h: ld c,061h ;3c52 0e 61 . a ld d,a ;3c54 57 W call sub_4535h ;3c55 cd 35 45 . 5 E ld a,c ;3c58 79 y or a ;3c59 b7 . scf ;3c5a 37 7 ret nz ;3c5b c0 . ld a,0ffh ;3c5c 3e ff > . ld (0f35ah),a ;3c5e 32 5a f3 2 Z . xor a ;3c61 af . ret ;3c62 c9 . sub_3c63h: ld a,(0f2c8h) ;3c63 3a c8 f2 : . . or a ;3c66 b7 . ret z ;3c67 c8 . di ;3c68 f3 . call sub_3c8ch ;3c69 cd 8c 3c . . < ei ;3c6c fb . ret ;3c6d c9 . l3c6eh: call sub_4161h ;3c6e cd 61 41 . a A ret nz ;3c71 c0 . push bc ;3c72 c5 . ld c,060h ;3c73 0e 60 . ` call sub_4514h ;3c75 cd 14 45 . . E ld a,c ;3c78 79 y or a ;3c79 b7 . pop bc ;3c7a c1 . jr nz,l3c6eh ;3c7b 20 f1 . bit 5,d ;3c7d cb 6a . j jr z,l3c6eh ;3c7f 28 ed ( . ld d,c ;3c81 51 Q l3c82h: ld c,063h ;3c82 0e 63 . c call sub_4535h ;3c84 cd 35 45 . 5 E ld a,c ;3c87 79 y or a ;3c88 b7 . jr nz,l3c82h ;3c89 20 f7 . ret ;3c8b c9 . sub_3c8ch: ld a,(0f0b2h) ;3c8c 3a b2 f0 : . . set 4,a ;3c8f cb e7 . . out (002h),a ;3c91 d3 02 . . call sub_386fh ;3c93 cd 6f 38 . o 8 set 3,a ;3c96 cb df . . out (002h),a ;3c98 d3 02 . . call sub_3881h ;3c9a cd 81 38 . . 8 res 4,a ;3c9d cb a7 . . set 5,a ;3c9f cb ef . . out (002h),a ;3ca1 d3 02 . . ld (0f0b2h),a ;3ca3 32 b2 f0 2 . . ret ;3ca6 c9 . l3ca7h: ld hl,0fb90h ;3ca7 21 90 fb ! . . ld (0f6d2h),hl ;3caa 22 d2 f6 " . . ld hl,00106h ;3cad 21 06 01 ! . . ld (0f6d4h),hl ;3cb0 22 d4 f6 " . . ld hl,0f6a9h ;3cb3 21 a9 f6 ! . . ld de,0f6d6h ;3cb6 11 d6 f6 . . . ld bc,l0003h+2 ;3cb9 01 05 00 . . . ldir ;3cbc ed b0 . . ld b,010h ;3cbe 06 10 . . ld de,l2006h ;3cc0 11 06 20 . . jr l3cd3h ;3cc3 18 0e . . l3cc5h: ld b,030h ;3cc5 06 30 . 0 ld de,l5006h ;3cc7 11 06 50 . . P push bc ;3cca c5 . ld a,(0f6b8h) ;3ccb 3a b8 f6 : . . or a ;3cce b7 . call z,l3ca7h ;3ccf cc a7 3c . . < l3cd2h: pop bc ;3cd2 c1 . l3cd3h: ld hl,0f6d2h ;3cd3 21 d2 f6 ! . . l3cd6h: ei ;3cd6 fb . ld (0f6ceh),hl ;3cd7 22 ce f6 " . . ld a,b ;3cda 78 x and 0f0h ;3cdb e6 f0 . . cp 0f0h ;3cdd fe f0 . . jp z,l4055h ;3cdf ca 55 40 . U @ rrca ;3ce2 0f . rrca ;3ce3 0f . rrca ;3ce4 0f . dec a ;3ce5 3d = dec a ;3ce6 3d = cp 012h ;3ce7 fe 12 . . jp nc,03eefh ;3ce9 d2 ef 3e . . > push hl ;3cec e5 . ld hl,l3cfah ;3ced 21 fa 3c ! . < ld d,000h ;3cf0 16 00 . . ld e,a ;3cf2 5f _ add hl,de ;3cf3 19 . ld e,(hl) ;3cf4 5e ^ inc hl ;3cf5 23 # ld d,(hl) ;3cf6 56 V ex de,hl ;3cf7 eb . ex (sp),hl ;3cf8 e3 . ret ;3cf9 c9 . l3cfah: ld e,03dh ;3cfa 1e 3d . = ld (hl),h ;3cfc 74 t ld a,0aah ;3cfd 3e aa > . ld a,0bbh ;3cff 3e bb > . l3d01h: ld a,0f6h ;3d01 3e f6 > . l3d03h: ld a,0a1h ;3d03 3e a1 > . l3d05h: ccf ;3d05 3f ? ld a,(bc) ;3d06 0a . ld b,b ;3d07 40 @ jr z,$+66 ;3d08 28 40 ( @ ld b,(hl) ;3d0a 46 F ld b,b ;3d0b 40 @ l3d0ch: rst 38h ;3d0c ff . rst 38h ;3d0d ff . nop ;3d0e 00 . rst 38h ;3d0f ff . djnz l3cd2h ;3d10 10 c0 . . jr nz,$+1 ;3d12 20 ff . jr nc,$+1 ;3d14 30 ff 0 . ld b,b ;3d16 40 @ rst 38h ;3d17 ff . ld d,b ;3d18 50 P ld h,b ;3d19 60 ` ld (hl),b ;3d1a 70 p l3d1bh: and b ;3d1b a0 . add a,b ;3d1c 80 . sub b ;3d1d 90 . call sub_405fh ;3d1e cd 5f 40 . _ @ ld a,002h ;3d21 3e 02 > . jp nz,l3ef2h ;3d23 c2 f2 3e . . > ld a,0ffh ;3d26 3e ff > . ld hl,(0f6ceh) ;3d28 2a ce f6 * . . ld de,0f6afh ;3d2b 11 af f6 . . . ld bc,l0009h ;3d2e 01 09 00 . . . call 0ecf3h ;3d31 cd f3 ec . . . xor a ;3d34 af . ld (0f6cah),a ;3d35 32 ca f6 2 . . ld h,a ;3d38 67 g ld l,a ;3d39 6f o ld (0f6cch),hl ;3d3a 22 cc f6 " . . dec a ;3d3d 3d = ld (0f6cbh),a ;3d3e 32 cb f6 2 . . ld hl,(0f6afh) ;3d41 2a af f6 * . . ld bc,(0f6b1h) ;3d44 ed 4b b1 f6 . K . . ld (0f6b9h),hl ;3d48 22 b9 f6 " . . ld (0f6bbh),hl ;3d4b 22 bb f6 " . . ld (0f6bdh),hl ;3d4e 22 bd f6 " . . ld (0f6bfh),bc ;3d51 ed 43 bf f6 . C . . add hl,bc ;3d55 09 . ld (0f6c1h),hl ;3d56 22 c1 f6 " . . ld a,(0f6b3h) ;3d59 3a b3 f6 : . . bit 7,a ;3d5c cb 7f .  jr z,l3d64h ;3d5e 28 04 ( . res 7,a ;3d60 cb bf . . set 4,a ;3d62 cb e7 . . l3d64h: cp 012h ;3d64 fe 12 . . jp nc,03eefh ;3d66 d2 ef 3e . . > ld hl,l3d0ch ;3d69 21 0c 3d ! . = ld d,000h ;3d6c 16 00 . . ld e,a ;3d6e 5f _ add hl,de ;3d6f 19 . ld b,(hl) ;3d70 46 F inc b ;3d71 04 . jp z,03eefh ;3d72 ca ef 3e . . > dec b ;3d75 05 . ld a,(0f6b6h) ;3d76 3a b6 f6 : . . ld c,a ;3d79 4f O ld a,(0f6b5h) ;3d7a 3a b5 f6 : . . or c ;3d7d b1 . ld c,a ;3d7e 4f O ld a,(0f6b4h) ;3d7f 3a b4 f6 : . . or c ;3d82 b1 . cp 004h ;3d83 fe 04 . . jp nc,03eefh ;3d85 d2 ef 3e . . > ld a,0feh ;3d88 3e fe > . ld (0f6b8h),a ;3d8a 32 b8 f6 2 . . ld a,(0f0b0h) ;3d8d 3a b0 f0 : . . and 00fh ;3d90 e6 0f . . or b ;3d92 b0 . ld (0f0b0h),a ;3d93 32 b0 f0 2 . . out (000h),a ;3d96 d3 00 . . ld a,(0f6b4h) ;3d98 3a b4 f6 : . . ld b,a ;3d9b 47 G ld c,a ;3d9c 4f O inc c ;3d9d 0c . ld a,00fh ;3d9e 3e 0f > . l3da0h: rlca ;3da0 07 . dec c ;3da1 0d . jr nz,l3da0h ;3da2 20 fc . or 00fh ;3da4 f6 0f . . ld (0f6c9h),a ;3da6 32 c9 f6 2 . . ld a,b ;3da9 78 x cp 002h ;3daa fe 02 . . ld a,(0f6b7h) ;3dac 3a b7 f6 : . . jr z,$+5 ;3daf 28 03 ( . or 00ch ;3db1 f6 0c . . ld hl,l08f5h+1 ;3db3 21 f6 08 ! . . and 01ch ;3db6 e6 1c . . xor 01ch ;3db8 ee 1c . . ld (0f6c4h),a ;3dba 32 c4 f6 2 . . bit 4,a ;3dbd cb 67 . g jr z,l3de6h ;3dbf 28 25 ( % ld de,(0f6bfh) ;3dc1 ed 5b bf f6 . [ . . ld hl,0fff0h ;3dc5 21 f0 ff ! . . add hl,de ;3dc8 19 . jr c,l3dd2h ;3dc9 38 07 8 . ld hl,0f6c4h ;3dcb 21 c4 f6 ! . . res 4,(hl) ;3dce cb a6 . . jr l3de6h ;3dd0 18 14 . . l3dd2h: ld l,e ;3dd2 6b k ld h,d ;3dd3 62 b srl d ;3dd4 cb 3a . : rr e ;3dd6 cb 1b . . srl d ;3dd8 cb 3a . : rr e ;3dda cb 1b . . ld (0f6c7h),de ;3ddc ed 53 c7 f6 . S . . or a ;3de0 b7 . sbc hl,de ;3de1 ed 52 . R ld (0f6c5h),hl ;3de3 22 c5 f6 " . . l3de6h: ld a,b ;3de6 78 x or a ;3de7 b7 . rra ;3de8 1f . jr nc,l3dedh ;3de9 30 02 0 . or 002h ;3deb f6 02 . . l3dedh: ld (0f6c3h),a ;3ded 32 c3 f6 2 . . ld a,(0f6b6h) ;3df0 3a b6 f6 : . . rrca ;3df3 0f . rrca ;3df4 0f . ld b,a ;3df5 47 G ld a,(0f6b5h) ;3df6 3a b5 f6 : . . rrca ;3df9 0f . rrca ;3dfa 0f . rrca ;3dfb 0f . rrca ;3dfc 0f . or b ;3dfd b0 . ld b,a ;3dfe 47 G ld a,(0f6b4h) ;3dff 3a b4 f6 : . . l3e02h: rlca ;3e02 07 . rlca ;3e03 07 . or b ;3e04 b0 . l3e05h: or 002h ;3e05 f6 02 . . ld (0f6d0h),a ;3e07 32 d0 f6 2 . . ld c,037h ;3e0a 0e 37 . 7 ld a,(0f6b7h) ;3e0c 3a b7 f6 : . . bit 0,a ;3e0f cb 47 . G jr nz,l3e15h ;3e11 20 02 . res 1,c ;3e13 cb 89 . . l3e15h: bit 1,a ;3e15 cb 4f . O l3e17h: jr nz,l3e1bh ;3e17 20 02 . res 5,c ;3e19 cb a9 . . l3e1bh: ld a,c ;3e1b 79 y ld (0f6d1h),a ;3e1c 32 d1 f6 2 . . di ;3e1f f3 . call sub_3e3eh ;3e20 cd 3e 3e . > > ei ;3e23 fb . ld hl,0f6b8h ;3e24 21 b8 f6 ! . . ld (hl),001h ;3e27 36 01 6 . xor a ;3e29 af . ld (0f2c8h),a ;3e2a 32 c8 f2 2 . . call sub_3ed8h ;3e2d cd d8 3e . . > out (004h),a ;3e30 d3 04 ; GAH40M Interrupt Enable register (w) ld a,(0f0b3h) ;3e32 3a b3 f0 : . . set 1,a ;3e35 cb cf . . ld (0f0b3h),a ;3e37 32 b3 f0 2 . . out (004h),a ;3e3a d3 04 ; GAH40M Interrupt Enable register (w) l3e3ch: xor a ;3e3c af . ret ;3e3d c9 . sub_3e3eh: ld a,(0f35ah) ;3e3e 3a 5a f3 : Z . or a ;3e41 b7 . call z,sub_3c8ch ;3e42 cc 8c 3c . . < ld a,0beh ;3e45 3e be > . out (00dh),a ;3e47 d3 0d . . ld a,040h ;3e49 3e 40 > @ out (00dh),a ;3e4b d3 0d . . call sub_3881h ;3e4d cd 81 38 . . 8 ld a,(0f6d0h) ;3e50 3a d0 f6 : . . out (00dh),a ;3e53 d3 0d . . ld a,(0f6d1h) ;3e55 3a d1 f6 : . . out (00dh),a ;3e58 d3 0d . . ret ;3e5a c9 . sub_3e5bh: ld a,(0f0b2h) ;3e5b 3a b2 f0 : . . set 4,a ;3e5e cb e7 . . out (002h),a ;3e60 d3 02 . . call sub_386fh ;3e62 cd 6f 38 . o 8 res 3,a ;3e65 cb 9f . . out (002h),a ;3e67 d3 02 . . call sub_3881h ;3e69 cd 81 38 . . 8 res 4,a ;3e6c cb a7 . . ld (0f0b2h),a ;3e6e 32 b2 f0 2 . . out (002h),a ;3e71 d3 02 . . ret ;3e73 c9 . call sub_405fh ;3e74 cd 5f 40 . _ @ jr z,l3e8dh ;3e77 28 14 ( . in a,(00dh) ;3e79 db 0d ; 82C51 Data (rw) and 005h ;3e7b e6 05 . . cp 005h ;3e7d fe 05 . . jr z,l3e84h ;3e7f 28 03 ( . call sub_3869h ;3e81 cd 69 38 . i 8 l3e84h: ld a,(0f35ah) ;3e84 3a 5a f3 : Z . inc a ;3e87 3c < jr z,l3e8dh ;3e88 28 03 ( . call sub_3e5bh ;3e8a cd 5b 3e . [ > l3e8dh: xor a ;3e8d af . ld (hl),a ;3e8e 77 w out (004h),a ;3e8f d3 04 ; GAH40M Interrupt Enable register (w) dec a ;3e91 3d = ld (0f2c8h),a ;3e92 32 c8 f2 2 . . ld a,(0f0b3h) ;3e95 3a b3 f0 : . . res 1,a ;3e98 cb 8f . . ld (0f0b3h),a ;3e9a 32 b3 f0 2 . . out (004h),a ;3e9d d3 04 ; GAH40M Interrupt Enable register (w) ld a,0beh ;3e9f 3e be > . out (00dh),a ;3ea1 d3 0d . . ld a,040h ;3ea3 3e 40 > @ out (00dh),a ;3ea5 d3 0d . . jp sub_3881h ;3ea7 c3 81 38 . . 8 call sub_405fh ;3eaa cd 5f 40 . _ @ jr z,l3eech ;3ead 28 3d ( = ld bc,(0f6cch) ;3eaf ed 4b cc f6 . K . . ld a,c ;3eb3 79 y or b ;3eb4 b0 . jr z,l3ef2h ;3eb5 28 3b ( ; ld a,0ffh ;3eb7 3e ff > . jr sub_3ed8h ;3eb9 18 1d . . call sub_405fh ;3ebb cd 5f 40 . _ @ jr z,l3eech ;3ebe 28 2c ( , xor a ;3ec0 af . ld hl,0f6c4h ;3ec1 21 c4 f6 ! . . bit 4,(hl) ;3ec4 cb 66 . f jr z,l3ecfh ;3ec6 28 07 ( . bit 7,(hl) ;3ec8 cb 7e . ~ jr z,l3ecfh ;3eca 28 03 ( . xor a ;3ecc af . jr l3ef2h ;3ecd 18 23 . # l3ecfh: ld hl,0f6b8h ;3ecf 21 b8 f6 ! . . call sub_4065h ;3ed2 cd 65 40 . e @ jr nz,sub_3ed8h ;3ed5 20 01 . dec a ;3ed7 3d = sub_3ed8h: cp a ;3ed8 bf . push af ;3ed9 f5 . push bc ;3eda c5 . xor a ;3edb af . ld de,(0f6ceh) ;3edc ed 5b ce f6 . [ . . ld bc,l0009h ;3ee0 01 09 00 . . . di ;3ee3 f3 . call 0edc7h ;3ee4 cd c7 ed . . . ei ;3ee7 fb . pop bc ;3ee8 c1 . pop af ;3ee9 f1 . jr l3ef2h ;3eea 18 06 . . l3eech: ld a,003h ;3eec 3e 03 > . ld bc,l043eh ;3eee 01 3e 04 . > . and a ;3ef1 a7 . l3ef2h: ld hl,(0f6ceh) ;3ef2 2a ce f6 * . . ret ;3ef5 c9 . call sub_405fh ;3ef6 cd 5f 40 . _ @ jr z,l3eech ;3ef9 28 f1 ( . l3efbh: call sub_407bh ;3efb cd 7b 40 . { @ jr nz,l3f07h ;3efe 20 07 . l3f00h: call sub_4161h ;3f00 cd 61 41 . a A jr nz,$-20 ;3f03 20 ea . jr l3efbh ;3f05 18 f4 . . l3f07h: ld hl,(0f6b9h) ;3f07 2a b9 f6 * . . ld c,000h ;3f0a 0e 00 . . call 0ecf9h ;3f0c cd f9 ec . . . inc hl ;3f0f 23 # ld d,h ;3f10 54 T ld e,l ;3f11 5d ] ld bc,(0f6c1h) ;3f12 ed 4b c1 f6 . K . . or a ;3f16 b7 . sbc hl,bc ;3f17 ed 42 . B ex de,hl ;3f19 eb . jr nz,l3f1fh ;3f1a 20 03 . ld hl,(0f6bdh) ;3f1c 2a bd f6 * . . l3f1fh: di ;3f1f f3 . ld (0f6b9h),hl ;3f20 22 b9 f6 " . . ld hl,0f6b8h ;3f23 21 b8 f6 ! . . res 1,(hl) ;3f26 cb 8e . . ei ;3f28 fb . ld hl,0f6c4h ;3f29 21 c4 f6 ! . . bit 4,(hl) ;3f2c cb 66 . f jr z,l3f5dh ;3f2e 28 2d ( - bit 6,(hl) ;3f30 cb 76 . v jr z,l3f5dh ;3f32 28 29 ( ) di ;3f34 f3 . call sub_4093h ;3f35 cd 93 40 . . @ ei ;3f38 fb . ld hl,(0f6c7h) ;3f39 2a c7 f6 * . . or a ;3f3c b7 . sbc hl,bc ;3f3d ed 42 . B jr c,l3f5dh ;3f3f 38 1c 8 . l3f41h: call sub_4065h ;3f41 cd 65 40 . e @ jr z,l3f4fh ;3f44 28 09 ( . ld b,a ;3f46 47 G call sub_4161h ;3f47 cd 61 41 . a A ld a,b ;3f4a 78 x jr nz,$-92 ;3f4b 20 a2 . jr l3f41h ;3f4d 18 f2 . . l3f4fh: ld b,a ;3f4f 47 G ld a,(0f00dh) ;3f50 3a 0d f0 : . . di ;3f53 f3 . out (00ch),a ;3f54 d3 0c ; 82C51 Command (w) ld hl,0f6c4h ;3f56 21 c4 f6 ! . . res 6,(hl) ;3f59 cb b6 . . ei ;3f5b fb . ld a,b ;3f5c 78 x l3f5dh: ld c,a ;3f5d 4f O ld a,(0f6c9h) ;3f5e 3a c9 f6 : . . and c ;3f61 a1 . ld c,a ;3f62 4f O ld a,(0f6c4h) ;3f63 3a c4 f6 : . . and 004h ;3f66 e6 04 . . jr z,$+41 ;3f68 28 27 ( ' ld a,c ;3f6a 79 y cp 00eh ;3f6b fe 0e . . jr z,l3f84h ;3f6d 28 15 ( . cp 00fh ;3f6f fe 0f . . jr z,l3f7dh ;3f71 28 0a ( . cp 020h ;3f73 fe 20 . jr c,$+28 ;3f75 38 1a 8 . cp 07fh ;3f77 fe 7f .  jr z,$+24 ;3f79 28 16 ( . jr l3f8ch ;3f7b 18 0f . . l3f7dh: xor a ;3f7d af . ld (0f6cah),a ;3f7e 32 ca f6 2 . . jp l3efbh ;3f81 c3 fb 3e . . > l3f84h: ld a,080h ;3f84 3e 80 > . ld (0f6cah),a ;3f86 32 ca f6 2 . . jp l3efbh ;3f89 c3 fb 3e . . > l3f8ch: ld a,(0f6cah) ;3f8c 3a ca f6 : . . or c ;3f8f b1 . cp 079h ;3f90 fe 79 . y di ;3f92 f3 . ld hl,(0f6cch) ;3f93 2a cc f6 * . . dec hl ;3f96 2b + ld (0f6cch),hl ;3f97 22 cc f6 " . . ei ;3f9a fb . ld hl,0f6b8h ;3f9b 21 b8 f6 ! . . jp sub_3ed8h ;3f9e c3 d8 3e . . > call sub_405fh ;3fa1 cd 5f 40 . _ @ jp z,l3eech ;3fa4 ca ec 3e . . > ld a,(0f6c4h) ;3fa7 3a c4 f6 : . . and 004h ;3faa e6 04 . . jr z,l3fe1h ;3fac 28 33 ( 3 ld a,c ;3fae 79 y cp 080h ;3faf fe 80 . . jr nc,l3fc6h ;3fb1 30 13 0 . l3fb3h: ld a,(0f6cbh) ;3fb3 3a cb f6 : . . and a ;3fb6 a7 . jr z,l3fe1h ;3fb7 28 28 ( ( xor a ;3fb9 af . ld (0f6cbh),a ;3fba 32 cb f6 2 . . push bc ;3fbd c5 . ld a,00fh ;3fbe 3e 0f > . call sub_3febh ;3fc0 cd eb 3f . . ? pop bc ;3fc3 c1 . jr l3fe1h ;3fc4 18 1b . . l3fc6h: ld a,(0f6c9h) ;3fc6 3a c9 f6 : . . and c ;3fc9 a1 . ld c,a ;3fca 4f O cp 020h ;3fcb fe 20 . jr c,l3fb3h ;3fcd 38 e4 8 . ld a,(0f6cbh) ;3fcf 3a cb f6 : . . dec a ;3fd2 3d = jr z,l3fe1h ;3fd3 28 0c ( . ld a,001h ;3fd5 3e 01 > . ld (0f6cbh),a ;3fd7 32 cb f6 2 . . push bc ;3fda c5 . ld a,00eh ;3fdb 3e 0e > . call sub_3febh ;3fdd cd eb 3f . . ? pop bc ;3fe0 c1 . l3fe1h: ld a,c ;3fe1 79 y call sub_3febh ;3fe2 cd eb 3f . . ? ld hl,0f6b8h ;3fe5 21 b8 f6 ! . . jp sub_3ed8h ;3fe8 c3 d8 3e . . > sub_3febh: call sub_4065h ;3feb cd 65 40 . e @ jr z,l3ffbh ;3fee 28 0b ( . ld b,a ;3ff0 47 G call sub_4161h ;3ff1 cd 61 41 . a A ld a,b ;3ff4 78 x jr z,sub_3febh ;3ff5 28 f4 ( . pop af ;3ff7 f1 . jp 03eefh ;3ff8 c3 ef 3e . . > l3ffbh: di ;3ffb f3 . out (00ch),a ;3ffc d3 0c ; 82C51 Command (w) call sub_4015h ;3ffe cd 15 40 . . @ ei ;4001 fb . and 088h ;4002 e6 88 . . ld hl,0f6b8h ;4004 21 b8 f6 ! . . or (hl) ;4007 b6 . ld (hl),a ;4008 77 w ret ;4009 c9 . call sub_405fh ;400a cd 5f 40 . _ @ jr z,l4024h ;400d 28 15 ( . di ;400f f3 . call sub_4015h ;4010 cd 15 40 . . @ ei ;4013 fb . ret ;4014 c9 . sub_4015h: in a,(00dh) ;4015 db 0d ; 82C51 Data (rw) and 080h ;4017 e6 80 . . ld b,a ;4019 47 G in a,(004h) ;401a db 04 . . rlca ;401c 07 . and 008h ;401d e6 08 . . or b ;401f b0 . xor 088h ;4020 ee 88 . . cp a ;4022 bf . ret ;4023 c9 . l4024h: ld a,003h ;4024 3e 03 > . and a ;4026 a7 . ret ;4027 c9 . call sub_405fh ;4028 cd 5f 40 . _ @ l402bh: jr z,l4024h ;402b 28 f7 ( . ld a,c ;402d 79 y ld c,037h ;402e 0e 37 . 7 bit 0,a ;4030 cb 47 . G jr nz,l4036h ;4032 20 02 . res 1,c ;4034 cb 89 . . l4036h: bit 1,a ;4036 cb 4f . O jr nz,l403ch ;4038 20 02 . res 5,c ;403a cb a9 . . l403ch: ld a,c ;403c 79 y ld (0f6d1h),a ;403d 32 d1 f6 2 . . di ;4040 f3 . out (00dh),a ;4041 d3 0d . . ei ;4043 fb . cp a ;4044 bf . ret ;4045 c9 . call sub_405fh ;4046 cd 5f 40 . _ @ ld a,(hl) ;4049 7e ~ jr z,l4024h ;404a 28 d8 ( . ld e,a ;404c 5f _ and 003h ;404d e6 03 . . ld (hl),a ;404f 77 w ld a,e ;4050 7b { and 0fch ;4051 e6 fc . . cp a ;4053 bf . ret ;4054 c9 . l4055h: call sub_405fh ;4055 cd 5f 40 . _ @ xor a ;4058 af . cp (hl) ;4059 be . ret z ;405a c8 . ld a,002h ;405b 3e 02 > . and a ;405d a7 . ret ;405e c9 . sub_405fh: ld hl,0f6b8h ;405f 21 b8 f6 ! . . bit 0,(hl) ;4062 cb 46 . F ret ;4064 c9 . sub_4065h: push hl ;4065 e5 . ld hl,0f6c4h ;4066 21 c4 f6 ! . . bit 4,(hl) ;4069 cb 66 . f jr z,l4071h ;406b 28 04 ( . bit 7,(hl) ;406d cb 7e . ~ jr nz,l4079h ;406f 20 08 . l4071h: ld b,a ;4071 47 G in a,(00dh) ;4072 db 0d ; 82C51 Data (rw) and 005h ;4074 e6 05 . . cp 005h ;4076 fe 05 . . ld a,b ;4078 78 x l4079h: pop hl ;4079 e1 . ret ;407a c9 . sub_407bh: push de ;407b d5 . push hl ;407c e5 . ld hl,0f6b8h ;407d 21 b8 f6 ! . . bit 1,(hl) ;4080 cb 4e . N jr nz,l4090h ;4082 20 0c . di ;4084 f3 . ld hl,(0f6bbh) ;4085 2a bb f6 * . . ld de,(0f6b9h) ;4088 ed 5b b9 f6 . [ . . ei ;408c fb . or a ;408d b7 . sbc hl,de ;408e ed 52 . R l4090h: pop hl ;4090 e1 . pop de ;4091 d1 . ret ;4092 c9 . sub_4093h: push de ;4093 d5 . push hl ;4094 e5 . ld hl,0f6b8h ;4095 21 b8 f6 ! . . bit 1,(hl) ;4098 cb 4e . N jr z,l40a1h ;409a 28 05 ( . ld hl,(0f6bfh) ;409c 2a bf f6 * . . jr l40b2h ;409f 18 11 . . l40a1h: ld hl,(0f6bbh) ;40a1 2a bb f6 * . . ld de,(0f6b9h) ;40a4 ed 5b b9 f6 . [ . . or a ;40a8 b7 . sbc hl,de ;40a9 ed 52 . R jr nc,l40b2h ;40ab 30 05 0 . ld de,(0f6bfh) ;40ad ed 5b bf f6 . [ . . add hl,de ;40b1 19 . l40b2h: ld b,h ;40b2 44 D ld c,l ;40b3 4d M jr l4090h ;40b4 18 da . . l40b6h: ld a,(0f6b8h) ;40b6 3a b8 f6 : . . or a ;40b9 b7 . call z,l3ca7h ;40ba cc a7 3c . . < call sub_4065h ;40bd cd 65 40 . e @ ld a,000h ;40c0 3e 00 > . ret nz ;40c2 c0 . dec a ;40c3 3d = ret ;40c4 c9 . l40c5h: push bc ;40c5 c5 . ld a,(0f6b8h) ;40c6 3a b8 f6 : . . or a ;40c9 b7 . call z,l3ca7h ;40ca cc a7 3c . . < l40cdh: call sub_4065h ;40cd cd 65 40 . e @ jr z,l40d9h ;40d0 28 07 ( . call sub_4161h ;40d2 cd 61 41 . a A jr z,l40cdh ;40d5 28 f6 ( . pop bc ;40d7 c1 . ret ;40d8 c9 . l40d9h: pop bc ;40d9 c1 . ld a,c ;40da 79 y out (00ch),a ;40db d3 0c ; 82C51 Command (w) cp a ;40dd bf . ret ;40de c9 . l40dfh: ld a,(0f534h) ;40df 3a 34 f5 : 4 . and 0c0h ;40e2 e6 c0 . . jr z,l40fdh ;40e4 28 17 ( . cp 080h ;40e6 fe 80 . . jr z,l40f0h ;40e8 28 06 ( . cp 040h ;40ea fe 40 . @ ret nz ;40ec c0 . ld a,0ffh ;40ed 3e ff > . ret ;40ef c9 . l40f0h: ld a,(0f2c8h) ;40f0 3a c8 f2 : . . or a ;40f3 b7 . call nz,l3ca7h ;40f4 c4 a7 3c . . < in a,(00dh) ;40f7 db 0d ; 82C51 Data (rw) bit 7,a ;40f9 cb 7f .  jr l410dh ;40fb 18 10 . . l40fdh: call l3c3ah ;40fd cd 3a 3c . : < l4100h: ld c,060h ;4100 0e 60 . ` call sub_4514h ;4102 cd 14 45 . . E ld a,c ;4105 79 y or a ;4106 b7 . jr nz,l4100h ;4107 20 f7 . ld a,d ;4109 7a z cpl ;410a 2f / bit 3,a ;410b cb 5f . _ l410dh: ld a,0ffh ;410d 3e ff > . ret nz ;410f c0 . xor a ;4110 af . ret ;4111 c9 . l4112h: ld a,(0f35bh) ;4112 3a 5b f3 : [ . or a ;4115 b7 . jr z,l4121h ;4116 28 09 ( . ld b,a ;4118 47 G ld a,(0f534h) ;4119 3a 34 f5 : 4 . or 03fh ;411c f6 3f . ? cp b ;411e b8 . jr z,l414ah ;411f 28 29 ( ) l4121h: push bc ;4121 c5 . ld c,01bh ;4122 0e 1b . . call l414ah ;4124 cd 4a 41 . J A ld c,052h ;4127 0e 52 . R call l414ah ;4129 cd 4a 41 . J A ld a,(0f6a2h) ;412c 3a a2 f6 : . . cp 00bh ;412f fe 0b . . ld c,00ah ;4131 0e 0a . . jr z,l413eh ;4133 28 09 ( . sub 005h ;4135 d6 05 . . ld b,a ;4137 47 G ld a,00ah ;4138 3e 0a > . l413ah: dec a ;413a 3d = djnz l413ah ;413b 10 fd . . ld c,a ;413d 4f O l413eh: call l414ah ;413e cd 4a 41 . J A pop bc ;4141 c1 . ld a,(0f534h) ;4142 3a 34 f5 : 4 . or 03fh ;4145 f6 3f . ? ld (0f35bh),a ;4147 32 5b f3 2 [ . l414ah: call sub_4161h ;414a cd 61 41 . a A ret nz ;414d c0 . push bc ;414e c5 . call l40dfh ;414f cd df 40 . . @ pop bc ;4152 c1 . inc a ;4153 3c < jr nz,l414ah ;4154 20 f4 . ld a,(0f534h) ;4156 3a 34 f5 : 4 . bit 7,a ;4159 cb 7f .  jp z,l3c6eh ;415b ca 6e 3c . n < jp l40c5h ;415e c3 c5 40 . . @ sub_4161h: call sub_390fh ;4161 cd 0f 39 . . 9 ld a,(0f35ch) ;4164 3a 5c f3 : \ . or a ;4167 b7 . jr nz,l416fh ;4168 20 05 . ld a,(0f10bh) ;416a 3a 0b f1 : . . or a ;416d b7 . ret nz ;416e c0 . l416fh: xor a ;416f af . ret ;4170 c9 . l4171h: or 037h ;4171 f6 37 . 7 push hl ;4173 e5 . push af ;4174 f5 . ld hl,(0f103h) ;4175 2a 03 f1 * . . ld a,c ;4178 79 y cp 00ah ;4179 fe 0a . . jr nc,$+34 ;417b 30 20 0 rlca ;417d 07 . rlca ;417e 07 . rlca ;417f 07 . rlca ;4180 07 . ld e,a ;4181 5f _ ld d,000h ;4182 16 00 . . add hl,de ;4184 19 . pop af ;4185 f1 . pop de ;4186 d1 . push de ;4187 d5 . ld bc,l000fh+1 ;4188 01 10 00 . . . ld a,000h ;418b 3e 00 > . jr nc,l4191h ;418d 30 02 0 . ex de,hl ;418f eb . dec a ;4190 3d = l4191h: call 0ecf3h ;4191 cd f3 ec . . . ld a,(0f2d0h) ;4194 3a d0 f2 : . . cp 007h ;4197 fe 07 . . call z,sub_4d0ch ;4199 cc 0c 4d . . M or 0f1h ;419c f6 f1 . . pop hl ;419e e1 . ret ;419f c9 . l41a0h: ld a,(0f73bh) ;41a0 3a 3b f7 : ; . dec a ;41a3 3d = ld a,0ffh ;41a4 3e ff > . ret nz ;41a6 c0 . push hl ;41a7 e5 . ld de,l0f00h ;41a8 11 00 0f . . . or a ;41ab b7 . sbc hl,de ;41ac ed 52 . R pop hl ;41ae e1 . ld a,001h ;41af 3e 01 > . ret nc ;41b1 d0 . push hl ;41b2 e5 . push bc ;41b3 c5 . xor a ;41b4 af . l41b5h: push hl ;41b5 e5 . ld de,l003ch ;41b6 11 3c 00 . < . or a ;41b9 b7 . sbc hl,de ;41ba ed 52 . R pop de ;41bc d1 . jr c,l41c2h ;41bd 38 03 8 . inc a ;41bf 3c < jr l41b5h ;41c0 18 f3 . . l41c2h: ld d,e ;41c2 53 S ld e,a ;41c3 5f _ ld hl,0f6deh ;41c4 21 de f6 ! . . ld (hl),d ;41c7 72 r inc hl ;41c8 23 # ld (hl),e ;41c9 73 s inc hl ;41ca 23 # ld (hl),001h ;41cb 36 01 6 . inc hl ;41cd 23 # ld (hl),001h ;41ce 36 01 6 . inc hl ;41d0 23 # ld a,c ;41d1 79 y or a ;41d2 b7 . jr z,l41f0h ;41d3 28 1b ( . cp 004h ;41d5 fe 04 . . jr nc,l41f0h ;41d7 30 17 0 . ld (hl),c ;41d9 71 q inc hl ;41da 23 # ld (hl),b ;41db 70 p l41dch: ld c,025h ;41dc 0e 25 . % call sub_4488h ;41de cd 88 44 . . D ld bc,l0006h ;41e1 01 06 00 . . . ld de,0f6deh ;41e4 11 de f6 . . . call sub_44bbh ;41e7 cd bb 44 . . D call sub_44b2h ;41ea cd b2 44 . . D or a ;41ed b7 . jr nz,l41dch ;41ee 20 ec . l41f0h: ld c,024h ;41f0 0e 24 . $ call sub_4488h ;41f2 cd 88 44 . . D ld bc,l0003h ;41f5 01 03 00 . . . ld de,0f6deh ;41f8 11 de f6 . . . call sub_44bbh ;41fb cd bb 44 . . D call sub_44b2h ;41fe cd b2 44 . . D or a ;4201 b7 . jr nz,l41f0h ;4202 20 ec . call sub_44b2h ;4204 cd b2 44 . . D ld a,c ;4207 79 y pop bc ;4208 c1 . pop hl ;4209 e1 . ld c,a ;420a 4f O xor a ;420b af . ret ;420c c9 . l420dh: ld a,c ;420d 79 y l420eh: inc a ;420e 3c < jp z,l4290h ;420f ca 90 42 . . B dec a ;4212 3d = jr z,l4252h ;4213 28 3d ( = sub 080h ;4215 d6 80 . . ret c ;4217 d8 . cp 007h ;4218 fe 07 . . ret nc ;421a d0 . push de ;421b d5 . ld hl,l4224h ;421c 21 24 42 ! $ B call sub_6042h ;421f cd 42 60 . B ` pop de ;4222 d1 . jp (hl) ;4223 e9 . l4224h: ld (03542h),a ;4224 32 42 35 2 B 5 ld b,d ;4227 42 B inc h ;4228 24 $ ld b,e ;4229 43 C xor l ;422a ad . rst 28h ;422b ef . cp l ;422c bd . ld b,d ;422d 42 B or b ;422e b0 . rst 28h ;422f ef . or e ;4230 b3 . rst 28h ;4231 ef . ld c,039h ;4232 0e 39 . 9 ld hl,0290eh ;4234 21 0e 29 ! . ) sub_4237h: in a,(005h) ;4237 db 05 . . and 008h ;4239 e6 08 . . jr z,sub_4237h ;423b 28 fa ( . ld a,c ;423d 79 y out (006h),a ;423e d3 06 . . ld a,002h ;4240 3e 02 > . out (001h),a ;4242 d3 01 . . ret ;4244 c9 . l4245h: call sub_4286h ;4245 cd 86 42 . . B ld c,a ;4248 4f O set 7,c ;4249 cb f9 . . call sub_4237h ;424b cd 37 42 . 7 B inc de ;424e 13 . djnz l4245h ;424f 10 f4 . . ret ;4251 c9 . l4252h: call sub_4314h ;4252 cd 14 43 . . C ld c,007h ;4255 0e 07 . . call sub_38f9h ;4257 cd f9 38 . . 8 add a,a ;425a 87 . add a,a ;425b 87 . add a,a ;425c 87 . add a,a ;425d 87 . ld b,a ;425e 47 G call sub_3902h ;425f cd 02 39 . . 9 or b ;4262 b0 . call sub_427ah ;4263 cd 7a 42 . z B ld b,006h ;4266 06 06 . . push de ;4268 d5 . call sub_430ah ;4269 cd 0a 43 . . C ld a,0ffh ;426c 3e ff > . ld b,004h ;426e 06 04 . . l4270h: inc de ;4270 13 . call sub_427ah ;4271 cd 7a 42 . z B djnz l4270h ;4274 10 fa . . pop de ;4276 d1 . jp l43a2h ;4277 c3 a2 43 . . C sub_427ah: push af ;427a f5 . push bc ;427b c5 . ex de,hl ;427c eb . ld c,000h ;427d 0e 00 . . call 0ecffh ;427f cd ff ec . . . ex de,hl ;4282 eb . pop bc ;4283 c1 . pop af ;4284 f1 . ret ;4285 c9 . sub_4286h: push bc ;4286 c5 . ex de,hl ;4287 eb . ld c,000h ;4288 0e 00 . . call 0ecf9h ;428a cd f9 ec . . . ex de,hl ;428d eb . pop bc ;428e c1 . ret ;428f c9 . l4290h: call sub_4314h ;4290 cd 14 43 . . C ld c,017h ;4293 0e 17 . . call sub_4237h ;4295 cd 37 42 . 7 B push de ;4298 d5 . call sub_4286h ;4299 cd 86 42 . . B rra ;429c 1f . rra ;429d 1f . rra ;429e 1f . rra ;429f 1f . and 00fh ;42a0 e6 0f . . ld c,a ;42a2 4f O set 7,c ;42a3 cb f9 . . call sub_4237h ;42a5 cd 37 42 . 7 B call sub_4286h ;42a8 cd 86 42 . . B and 00fh ;42ab e6 0f . . ld c,a ;42ad 4f O set 7,c ;42ae cb f9 . . call sub_4237h ;42b0 cd 37 42 . 7 B ld b,006h ;42b3 06 06 . . inc de ;42b5 13 . call l4245h ;42b6 cd 45 42 . E B pop de ;42b9 d1 . jp l43a2h ;42ba c3 a2 43 . . C call sub_4314h ;42bd cd 14 43 . . C ld a,0ffh ;42c0 3e ff > . call sub_427ah ;42c2 cd 7a 42 . z B push de ;42c5 d5 . inc de ;42c6 13 . ld c,009h ;42c7 0e 09 . . call sub_38f9h ;42c9 cd f9 38 . . 8 call sub_427ah ;42cc cd 7a 42 . z B ld b,003h ;42cf 06 03 . . call sub_430ah ;42d1 cd 0a 43 . . C call sub_3902h ;42d4 cd 02 39 . . 9 add a,a ;42d7 87 . add a,a ;42d8 87 . add a,a ;42d9 87 . add a,a ;42da 87 . inc de ;42db 13 . call sub_427ah ;42dc cd 7a 42 . z B call sub_3902h ;42df cd 02 39 . . 9 inc de ;42e2 13 . call sub_427ah ;42e3 cd 7a 42 . z B ld a,(0f06ch) ;42e6 3a 6c f0 : l . inc de ;42e9 13 . call sub_427ah ;42ea cd 7a 42 . z B ld a,(0f06dh) ;42ed 3a 6d f0 : m . inc de ;42f0 13 . call sub_427ah ;42f1 cd 7a 42 . z B ld a,(0f06eh) ;42f4 3a 6e f0 : n . inc de ;42f7 13 . call sub_427ah ;42f8 cd 7a 42 . z B ld a,(0f06fh) ;42fb 3a 6f f0 : o . inc de ;42fe 13 . call sub_427ah ;42ff cd 7a 42 . z B xor a ;4302 af . ld (0f06fh),a ;4303 32 6f f0 2 o . pop de ;4306 d1 . jp l43a2h ;4307 c3 a2 43 . . C sub_430ah: call sub_3902h ;430a cd 02 39 . . 9 inc de ;430d 13 . call sub_427ah ;430e cd 7a 42 . z B djnz sub_430ah ;4311 10 f7 . . ret ;4313 c9 . sub_4314h: xor a ;4314 af . out (004h),a ;4315 d3 04 ; GAH40M Interrupt Enable register (w) ld a,(0f0b3h) ;4317 3a b3 f0 : . . pop hl ;431a e1 . push af ;431b f5 . res 0,a ;431c cb 87 . . ld (0f0b3h),a ;431e 32 b3 f0 2 . . out (004h),a ;4321 d3 04 ; GAH40M Interrupt Enable register (w) jp (hl) ;4323 e9 . call sub_4314h ;4324 cd 14 43 . . C ld c,019h ;4327 0e 19 . . call sub_4237h ;4329 cd 37 42 . 7 B push de ;432c d5 . inc de ;432d 13 . ld b,004h ;432e 06 04 . . call l4245h ;4330 cd 45 42 . E B call sub_4286h ;4333 cd 86 42 . . B rra ;4336 1f . rra ;4337 1f . rra ;4338 1f . rra ;4339 1f . and 00fh ;433a e6 0f . . ld c,a ;433c 4f O set 7,c ;433d cb f9 . . call sub_4237h ;433f cd 37 42 . 7 B inc de ;4342 13 . call sub_4286h ;4343 cd 86 42 . . B ld c,a ;4346 4f O set 7,c ;4347 cb f9 . . call sub_4237h ;4349 cd 37 42 . 7 B inc de ;434c 13 . call sub_4286h ;434d cd 86 42 . . B ld (0f06ch),a ;4350 32 6c f0 2 l . inc de ;4353 13 . call sub_4286h ;4354 cd 86 42 . . B ld (0f06dh),a ;4357 32 6d f0 2 m . inc de ;435a 13 . call sub_4286h ;435b cd 86 42 . . B ld (0f06eh),a ;435e 32 6e f0 2 n . xor a ;4361 af . ld (0f06fh),a ;4362 32 6f f0 2 o . ld (0f0dch),a ;4365 32 dc f0 2 . . ld hl,(0f06dh) ;4368 2a 6d f0 * m . ld de,0f3ffh ;436b 11 ff f3 . . . ld bc,sub_0027h+2 ;436e 01 29 00 . ) . ld a,0ffh ;4371 3e ff > . call 0ecf3h ;4373 cd f3 ec . . . pop de ;4376 d1 . jr l43a2h ;4377 18 29 . ) l4379h: xor a ;4379 af . out (004h),a ;437a d3 04 ; GAH40M Interrupt Enable register (w) ld a,(0f0b3h) ;437c 3a b3 f0 : . . dec b ;437f 05 . jr z,$+10 ;4380 28 08 ( . inc b ;4382 04 . jr nz,l438eh ;4383 20 09 . ld b,a ;4385 47 G ld a,c ;4386 79 y cpl ;4387 2f / and b ;4388 a0 . ld c,0b1h ;4389 0e b1 . . ld (0f0b3h),a ;438b 32 b3 f0 2 . . l438eh: out (004h),a ;438e d3 04 ; GAH40M Interrupt Enable register (w) ret ;4390 c9 . l4391h: ld a,c ;4391 79 y cp 005h ;4392 fe 05 . . ret nc ;4394 d0 . ld b,000h ;4395 06 00 . . ld hl,l43aeh ;4397 21 ae 43 ! . C add hl,bc ;439a 09 . ld c,(hl) ;439b 4e N call sub_4314h ;439c cd 14 43 . . C call sub_38f9h ;439f cd f9 38 . . 8 l43a2h: ld b,a ;43a2 47 G xor a ;43a3 af . out (004h),a ;43a4 d3 04 ; GAH40M Interrupt Enable register (w) pop af ;43a6 f1 . ld (0f0b3h),a ;43a7 32 b3 f0 2 . . out (004h),a ;43aa d3 04 ; GAH40M Interrupt Enable register (w) ld a,b ;43ac 78 x ret ;43ad c9 . l43aeh: inc l ;43ae 2c , inc a ;43af 3c < ld a,(bc) ;43b0 0a . inc c ;43b1 0c . ex af,af' ;43b2 08 . l43b3h: push de ;43b3 d5 . call sub_4444h ;43b4 cd 44 44 . D D push de ;43b7 d5 . push hl ;43b8 e5 . push bc ;43b9 c5 . ld a,(0f358h) ;43ba 3a 58 f3 : X . ld b,a ;43bd 47 G bit 7,b ;43be cb 78 . x jr z,l43ebh ;43c0 28 29 ( ) call sub_4463h ;43c2 cd 63 44 . c D cp 003h ;43c5 fe 03 . . jr nc,l43f2h ;43c7 30 29 0 ) bit 6,b ;43c9 cb 70 . p jr z,l43ebh ;43cb 28 1e ( . cp 001h ;43cd fe 01 . . jr nz,l43f2h ;43cf 20 21 ! inc hl ;43d1 23 # call sub_4463h ;43d2 cd 63 44 . c D ld e,a ;43d5 5f _ inc hl ;43d6 23 # call sub_4463h ;43d7 cd 63 44 . c D ld d,a ;43da 57 W ld hl,0ff80h ;43db 21 80 ff ! . . add hl,de ;43de 19 . jr nc,l43f2h ;43df 30 11 0 . ld hl,0ff53h ;43e1 21 53 ff ! S . add hl,de ;43e4 19 . jr c,l43f2h ;43e5 38 0b 8 . bit 5,b ;43e7 cb 68 . h jr nz,l43f2h ;43e9 20 07 . l43ebh: pop bc ;43eb c1 . pop hl ;43ec e1 . pop de ;43ed d1 . pop de ;43ee d1 . ld a,0ffh ;43ef 3e ff > . ret ;43f1 c9 . l43f2h: cp 061h ;43f2 fe 61 . a jr nz,l43f9h ;43f4 20 03 . call sub_3c63h ;43f6 cd 63 3c . c < l43f9h: pop bc ;43f9 c1 . ld a,b ;43fa 78 x or c ;43fb b1 . pop hl ;43fc e1 . jr z,l441bh ;43fd 28 1c ( . push bc ;43ff c5 . ld c,000h ;4400 0e 00 . . call 0ecf9h ;4402 cd f9 ec . . . ld c,a ;4405 4f O call sub_4488h ;4406 cd 88 44 . . D pop bc ;4409 c1 . l440ah: inc hl ;440a 23 # dec bc ;440b 0b . ld a,b ;440c 78 x or c ;440d b1 . jr z,l441bh ;440e 28 0b ( . call sub_4463h ;4410 cd 63 44 . c D push bc ;4413 c5 . ld c,a ;4414 4f O call sub_44ach ;4415 cd ac 44 . . D pop bc ;4418 c1 . jr l440ah ;4419 18 ef . . l441bh: pop de ;441b d1 . call sub_4444h ;441c cd 44 44 . D D ld a,b ;441f 78 x or c ;4420 b1 . jr z,l4442h ;4421 28 1f ( . push bc ;4423 c5 . call sub_44b2h ;4424 cd b2 44 . . D ld a,c ;4427 79 y pop bc ;4428 c1 . push af ;4429 f5 . call sub_445bh ;442a cd 5b 44 . [ D or a ;442d b7 . jr nz,l4441h ;442e 20 11 . l4430h: inc hl ;4430 23 # dec bc ;4431 0b . ld a,b ;4432 78 x or c ;4433 b1 . jr z,l4441h ;4434 28 0b ( . push bc ;4436 c5 . call sub_44b2h ;4437 cd b2 44 . . D ld a,c ;443a 79 y pop bc ;443b c1 . call sub_445bh ;443c cd 5b 44 . [ D jr l4430h ;443f 18 ef . . l4441h: pop af ;4441 f1 . l4442h: pop de ;4442 d1 . ret ;4443 c9 . sub_4444h: ex de,hl ;4444 eb . call sub_4463h ;4445 cd 63 44 . c D ld e,a ;4448 5f _ inc hl ;4449 23 # call sub_4463h ;444a cd 63 44 . c D ld d,a ;444d 57 W inc hl ;444e 23 # call sub_4463h ;444f cd 63 44 . c D ld c,a ;4452 4f O inc hl ;4453 23 # call sub_4463h ;4454 cd 63 44 . c D ld b,a ;4457 47 G inc hl ;4458 23 # ex de,hl ;4459 eb . ret ;445a c9 . sub_445bh: push bc ;445b c5 . ld c,000h ;445c 0e 00 . . call 0ecffh ;445e cd ff ec . . . pop bc ;4461 c1 . ret ;4462 c9 . sub_4463h: push bc ;4463 c5 . ld c,000h ;4464 0e 00 . . call 0ecf9h ;4466 cd f9 ec . . . pop bc ;4469 c1 . ret ;446a c9 . l446bh: dec de ;446b 1b . or 00ch ;446c f6 0c . . dec de ;446e 1b . dec a ;446f 3d = ld hl,05020h ;4470 21 20 50 ! P ld b,c ;4473 41 A ld d,e ;4474 53 S ld d,e ;4475 53 S ld d,a ;4476 57 W ld c,a ;4477 4f O ld d,d ;4478 52 R ld b,h ;4479 44 D dec de ;447a 1b . sub 000h ;447b d6 00 . . dec de ;447d 1b . inc sp ;447e 33 3 rst 38h ;447f ff . nop ;4480 00 . rst 38h ;4481 ff . rst 38h ;4482 ff . rst 38h ;4483 ff . rst 38h ;4484 ff . rst 38h ;4485 ff . rst 38h ;4486 ff . rst 38h ;4487 ff . sub_4488h: push bc ;4488 c5 . ld b,c ;4489 41 A ld c,00fh ;448a 0e 0f . . call sub_44a3h ;448c cd a3 44 . . D l448fh: in a,(00eh) ;448f db 0e ; SED 1320 Status (r) and 002h ;4491 e6 02 . . jr nz,l44a0h ;4493 20 0b . in a,(00eh) ;4495 db 0e ; SED 1320 Status (r) and 005h ;4497 e6 05 . . jr nz,l448fh ;4499 20 f4 . out (c),b ;449b ed 41 . A pop bc ;449d c1 . or a ;449e b7 . ret ;449f c9 . l44a0h: pop bc ;44a0 c1 . scf ;44a1 37 7 ret ;44a2 c9 . sub_44a3h: push af ;44a3 f5 . ld a,(0f359h) ;44a4 3a 59 f3 : Y . l44a7h: dec a ;44a7 3d = jr nz,l44a7h ;44a8 20 fd . pop af ;44aa f1 . ret ;44ab c9 . sub_44ach: push bc ;44ac c5 . ld b,c ;44ad 41 A ld c,00eh ;44ae 0e 0e . . jr l448fh ;44b0 18 dd . . sub_44b2h: call sub_456bh ;44b2 cd 6b 45 . k E jr z,sub_44b2h ;44b5 28 fb ( . in a,(00fh) ;44b7 db 0f ; SED 1320 Data (r) (Communication to 6303 and indirectly VRAM) ld c,a ;44b9 4f O ret ;44ba c9 . sub_44bbh: push de ;44bb d5 . push de ;44bc d5 . push bc ;44bd c5 . ld h,d ;44be 62 b ld l,e ;44bf 6b k ld d,b ;44c0 50 P ld e,c ;44c1 59 Y l44c2h: ld c,(hl) ;44c2 4e N call sub_44ach ;44c3 cd ac 44 . . D jr c,l44ceh ;44c6 38 06 8 . inc hl ;44c8 23 # dec de ;44c9 1b . ld a,d ;44ca 7a z or e ;44cb b3 . jr nz,l44c2h ;44cc 20 f4 . l44ceh: pop bc ;44ce c1 . pop hl ;44cf e1 . pop de ;44d0 d1 . ret ;44d1 c9 . sub_44d2h: push de ;44d2 d5 . push bc ;44d3 c5 . ld h,d ;44d4 62 b ld l,e ;44d5 6b k ld d,b ;44d6 50 P ld e,c ;44d7 59 Y l44d8h: call sub_44b2h ;44d8 cd b2 44 . . D jr c,l44e4h ;44db 38 07 8 . ld (hl),c ;44dd 71 q inc hl ;44de 23 # dec de ;44df 1b . ld a,d ;44e0 7a z or e ;44e1 b3 . jr nz,l44d8h ;44e2 20 f4 . l44e4h: pop bc ;44e4 c1 . pop de ;44e5 d1 . ld h,d ;44e6 62 b ld l,e ;44e7 6b k ret ;44e8 c9 . sub_44e9h: push de ;44e9 d5 . push bc ;44ea c5 . ld h,d ;44eb 62 b ld l,e ;44ec 6b k ld d,b ;44ed 50 P ld e,c ;44ee 59 Y l44efh: call sub_44b2h ;44ef cd b2 44 . . D jr c,l4500h ;44f2 38 0c 8 . ld a,c ;44f4 79 y ld c,000h ;44f5 0e 00 . . call 0ecffh ;44f7 cd ff ec . . . inc hl ;44fa 23 # dec de ;44fb 1b . ld a,d ;44fc 7a z or e ;44fd b3 . jr nz,l44efh ;44fe 20 ef . l4500h: pop bc ;4500 c1 . pop de ;4501 d1 . ld h,d ;4502 62 b ld l,e ;4503 6b k ret ;4504 c9 . sub_4505h: call sub_4488h ;4505 cd 88 44 . . D jr c,l4513h ;4508 38 09 8 . l450ah: call sub_44b2h ;450a cd b2 44 . . D jr c,l4512h ;450d 38 03 8 . scf ;450f 37 7 jr l4513h ;4510 18 01 . . l4512h: or a ;4512 b7 . l4513h: ret ;4513 c9 . sub_4514h: call sub_4505h ;4514 cd 05 45 . . E jr c,l451fh ;4517 38 06 8 . push bc ;4519 c5 . call sub_44b2h ;451a cd b2 44 . . D ld d,c ;451d 51 Q pop bc ;451e c1 . l451fh: ret ;451f c9 . l4520h: call sub_4514h ;4520 cd 14 45 . . E jr c,l452bh ;4523 38 06 8 . push bc ;4525 c5 . call sub_44b2h ;4526 cd b2 44 . . D ld e,c ;4529 59 Y pop bc ;452a c1 . l452bh: ret ;452b c9 . sub_452ch: call sub_4488h ;452c cd 88 44 . . D jr c,l4513h ;452f 38 e2 8 . ld c,d ;4531 4a J jp sub_44ach ;4532 c3 ac 44 . . D sub_4535h: call sub_452ch ;4535 cd 2c 45 . , E jr c,l452bh ;4538 38 f1 8 . jp l450ah ;453a c3 0a 45 . . E l453dh: call sub_452ch ;453d cd 2c 45 . , E jr c,l452bh ;4540 38 e9 8 . ld c,e ;4542 4b K call sub_44ach ;4543 cd ac 44 . . D jr c,l452bh ;4546 38 e3 8 . jp l450ah ;4548 c3 0a 45 . . E sub_454bh: push af ;454b f5 . push bc ;454c c5 . l454dh: ld a,00ch ;454d 3e 0c > . out (00fh),a ;454f d3 0f ; SED 1320 Command register (w) (Communication to 6303 and indirectly VRAM) ld b,000h ;4551 06 00 . . l4553h: call sub_456bh ;4553 cd 6b 45 jr nz,l455ch ;4556 20 04 . djnz l4553h ;4558 10 f9 . . jr l454dh ;455a 18 f1 . . l455ch: call sub_44b2h ;455c cd b2 44 . . D jp nc,l454dh ;455f d2 4d 45 . M E ld a,c ;4562 79 y cp 001h ;4563 fe 01 . . jp nz,l454dh ;4565 c2 4d 45 . M E pop bc ;4568 c1 . pop af ;4569 f1 . ret ;456a c9 . sub_456bh: in a,(00eh) ;456b db 0e ; SED 1320 Status (r) bit 1,a ;456d cb 4f . O in a,(00eh) ;456f db 0e ; SED 1320 Status (r) rra ;4571 1f Place Most Significant Nibble in Least Significant Nibble rra ;4572 1f . rra ;4573 1f . rra ;4574 1f . ret ;4575 c9 l4576h: and c ;4576 a1 . and d ;4577 a2 . and e ;4578 a3 . and h ;4579 a4 . and l ;457a a5 . and (hl) ;457b a6 . and a ;457c a7 . xor b ;457d a8 . cp d ;457e ba . pop af ;457f f1 . jp p,0f4f3h ;4580 f2 f3 f4 . . . push af ;4583 f5 . or 0f7h ;4584 f6 f7 . . ld de,l0517h ;4586 11 17 05 . . . ld (de),a ;4589 12 . inc d ;458a 14 . add hl,de ;458b 19 . dec d ;458c 15 . add hl,bc ;458d 09 . inc b ;458e 04 . ld b,007h ;458f 06 07 . . ex af,af' ;4591 08 . ld a,(bc) ;4592 0a . dec bc ;4593 0b . inc c ;4594 0c . ei ;4595 fb . ld (bc),a ;4596 02 . ld c,00dh ;4597 0e 0d . . defb 0fdh,0d3h,01fh ;illegal sequence ;4599 fd d3 1f . . . dec de ;459c 1b . dec e ;459d 1d . ret m ;459e f8 . ld sp,hl ;459f f9 . ret p ;45a0 f0 . jp m,0b01eh ;45a1 fa 1e b0 . . . call nc,sub_0f09h ;45a4 d4 09 0f . . . djnz l45a9h ;45a7 10 00 . . l45a9h: xor h ;45a9 ac . or c ;45aa b1 . xor l ;45ab ad . ld bc,0fc13h ;45ac 01 13 fc . . . dec c ;45af 0d . inc e ;45b0 1c . jr nz,l45cdh ;45b1 20 1a . jr $+5 ;45b3 18 03 . . ld d,0b2h ;45b5 16 b2 . . sub 01bh ;45b7 d6 1b . . inc de ;45b9 13 . nop ;45ba 00 . ret nz ;45bb c0 . pop bc ;45bc c1 . jp nz,0c4c3h ;45bd c2 c3 c4 . . . dec de ;45c0 1b . inc de ;45c1 13 . nop ;45c2 00 . push bc ;45c3 c5 . add a,0c7h ;45c4 c6 c7 . . ret z ;45c6 c8 . ret ;45c7 c9 . cp d ;45c8 ba . ld sp,03332h ;45c9 31 32 33 1 2 3 inc (hl) ;45cc 34 4 l45cdh: dec (hl) ;45cd 35 5 ld (hl),037h ;45ce 36 37 6 7 cp d ;45d0 ba . ld hl,l2321h+1 ;45d1 21 22 23 ! " # inc h ;45d4 24 $ dec h ;45d5 25 % ld h,027h ;45d6 26 27 & ' ld (hl),c ;45d8 71 q ld (hl),a ;45d9 77 w ld h,l ;45da 65 e ld (hl),d ;45db 72 r ld (hl),h ;45dc 74 t ld a,c ;45dd 79 y ld (hl),l ;45de 75 u ld l,c ;45df 69 i ld d,c ;45e0 51 Q ld d,a ;45e1 57 W ld b,l ;45e2 45 E ld d,d ;45e3 52 R ld d,h ;45e4 54 T ld e,c ;45e5 59 Y ld d,l ;45e6 55 U ld c,c ;45e7 49 I ld h,h ;45e8 64 d ld h,(hl) ;45e9 66 f ld h,a ;45ea 67 g ld l,b ;45eb 68 h ld l,d ;45ec 6a j ld l,e ;45ed 6b k ld l,h ;45ee 6c l dec sp ;45ef 3b ; ld b,h ;45f0 44 D ld b,(hl) ;45f1 46 F ld b,a ;45f2 47 G ld c,b ;45f3 48 H ld c,d ;45f4 4a J ld c,e ;45f5 4b K ld c,h ;45f6 4c L dec hl ;45f7 2b + ld h,d ;45f8 62 b ld l,(hl) ;45f9 6e n ld l,l ;45fa 6d m inc l ;45fb 2c , ld l,02fh ;45fc 2e 2f . / ld e,e ;45fe 5b [ ld e,l ;45ff 5d ] ld b,d ;4600 42 B ld c,(hl) ;4601 4e N ld c,l ;4602 4d M inc a ;4603 3c < ld a,03fh ;4604 3e 3f > ? ld a,e ;4606 7b { ld a,l ;4607 7d } jr c,l4643h ;4608 38 39 8 9 jr nc,l4639h ;460a 30 2d 0 - ld e,(hl) ;460c 5e ^ or (hl) ;460d b6 . l460eh: ex af,af' ;460e 08 . add hl,bc ;460f 09 . jr z,l463bh ;4610 28 29 ( ) ld e,a ;4612 5f _ dec a ;4613 3d = ld a,(hl) ;4614 7e ~ or e ;4615 b3 . dec bc ;4616 0b . add hl,bc ;4617 09 . ld l,a ;4618 6f o ld (hl),b ;4619 70 p ld b,b ;461a 40 @ cp b ;461b b8 . or a ;461c b7 . cp c ;461d b9 . ld h,c ;461e 61 a ld (hl),e ;461f 73 s ld c,a ;4620 4f O ld d,b ;4621 50 P ld h,b ;4622 60 ` xor (hl) ;4623 ae . or h ;4624 b4 . xor a ;4625 af . ld b,c ;4626 41 A ld d,e ;4627 53 S ld a,(05c0dh) ;4628 3a 0d 5c : . \ jr nz,l46a7h ;462b 20 7a z ld a,b ;462d 78 x ld h,e ;462e 63 c halt ;462f 76 v ld hl,(07c0dh) ;4630 2a 0d 7c * . | jr nz,$+92 ;4633 20 5a Z ld e,b ;4635 58 X ld b,e ;4636 43 C ld d,(hl) ;4637 56 V ld (de),a ;4638 12 . l4639h: ld a,a ;4639 7f  rst 38h ;463a ff . l463bh: rst 38h ;463b ff . rst 38h ;463c ff . rst 38h ;463d ff . rst 38h ;463e ff . rst 38h ;463f ff . or l ;4640 b5 . inc c ;4641 0c . dec de ;4642 1b . l4643h: inc de ;4643 13 . nop ;4644 00 . ret nz ;4645 c0 . pop bc ;4646 c1 . jp nz,0c4c3h ;4647 c2 c3 c4 . . . dec de ;464a 1b . inc de ;464b 13 . nop ;464c 00 . push bc ;464d c5 . add a,0c7h ;464e c6 c7 . . ret z ;4650 c8 . ret ;4651 c9 . cp d ;4652 ba . ld sp,03332h ;4653 31 32 33 1 2 3 inc (hl) ;4656 34 4 dec (hl) ;4657 35 5 ld (hl),037h ;4658 36 37 6 7 cp d ;465a ba . ld hl,l2321h+1 ;465b 21 22 23 ! " # inc h ;465e 24 $ dec h ;465f 25 % ld h,027h ;4660 26 27 & ' ld d,c ;4662 51 Q ld d,a ;4663 57 W ld b,l ;4664 45 E ld d,d ;4665 52 R ld d,h ;4666 54 T ld e,c ;4667 59 Y ld d,l ;4668 55 U ld c,c ;4669 49 I ld (hl),c ;466a 71 q ld (hl),a ;466b 77 w ld h,l ;466c 65 e ld (hl),d ;466d 72 r ld (hl),h ;466e 74 t ld a,c ;466f 79 y ld (hl),l ;4670 75 u ld l,c ;4671 69 i ld b,h ;4672 44 D ld b,(hl) ;4673 46 F ld b,a ;4674 47 G ld c,b ;4675 48 H ld c,d ;4676 4a J ld c,e ;4677 4b K ld c,h ;4678 4c L dec sp ;4679 3b ; ld h,h ;467a 64 d ld h,(hl) ;467b 66 f ld h,a ;467c 67 g ld l,b ;467d 68 h ld l,d ;467e 6a j ld l,e ;467f 6b k ld l,h ;4680 6c l dec hl ;4681 2b + ld b,d ;4682 42 B ld c,(hl) ;4683 4e N ld c,l ;4684 4d M inc l ;4685 2c , ld l,02fh ;4686 2e 2f . / ld e,e ;4688 5b [ ld e,l ;4689 5d ] ld h,d ;468a 62 b ld l,(hl) ;468b 6e n ld l,l ;468c 6d m inc a ;468d 3c < ld a,03fh ;468e 3e 3f > ? ld a,e ;4690 7b { ld a,l ;4691 7d } jr c,l46cdh ;4692 38 39 8 9 jr nc,l46c3h ;4694 30 2d 0 - ld e,(hl) ;4696 5e ^ or (hl) ;4697 b6 . ex af,af' ;4698 08 . add hl,bc ;4699 09 . jr z,l46c5h ;469a 28 29 ( ) ld e,a ;469c 5f _ dec a ;469d 3d = ld a,(hl) ;469e 7e ~ or e ;469f b3 . dec bc ;46a0 0b . add hl,bc ;46a1 09 . ld c,a ;46a2 4f O ld d,b ;46a3 50 P ld b,b ;46a4 40 @ cp b ;46a5 b8 . or a ;46a6 b7 . l46a7h: cp c ;46a7 b9 . ld b,c ;46a8 41 A ld d,e ;46a9 53 S ld l,a ;46aa 6f o ld (hl),b ;46ab 70 p ld h,b ;46ac 60 ` xor (hl) ;46ad ae . or h ;46ae b4 . xor a ;46af af . ld h,c ;46b0 61 a ld (hl),e ;46b1 73 s ld a,(05c0dh) ;46b2 3a 0d 5c : . \ jr nz,l4711h ;46b5 20 5a Z ld e,b ;46b7 58 X ld b,e ;46b8 43 C ld d,(hl) ;46b9 56 V ld hl,(07c0dh) ;46ba 2a 0d 7c * . | jr nz,l4739h ;46bd 20 7a z ld a,b ;46bf 78 x ld h,e ;46c0 63 c halt ;46c1 76 v ld (de),a ;46c2 12 . l46c3h: ld a,a ;46c3 7f  rst 38h ;46c4 ff . l46c5h: rst 38h ;46c5 ff . rst 38h ;46c6 ff . rst 38h ;46c7 ff . rst 38h ;46c8 ff . rst 38h ;46c9 ff . l46cah: or l ;46ca b5 . inc c ;46cb 0c . dec de ;46cc 1b . l46cdh: inc de ;46cd 13 . nop ;46ce 00 . set 1,h ;46cf cb cc . . call 0cfceh ;46d1 cd ce cf . . . dec de ;46d4 1b . inc de ;46d5 13 . nop ;46d6 00 . set 1,h ;46d7 cb cc . . call 0cfceh ;46d9 cd ce cf . . . cp d ;46dc ba . pop hl ;46dd e1 . jp po,0e4e3h ;46de e2 e3 e4 . . . push hl ;46e1 e5 . and 0e7h ;46e2 e6 e7 . . cp d ;46e4 ba . ld sp,03332h ;46e5 31 32 33 1 2 3 inc (hl) ;46e8 34 4 dec (hl) ;46e9 35 5 ld (hl),037h ;46ea 36 37 6 7 add a,a ;46ec 87 . add a,d ;46ed 82 . adc a,b ;46ee 88 . add a,(hl) ;46ef 86 . add a,l ;46f0 85 . adc a,a ;46f1 8f . sub b ;46f2 90 . sub c ;46f3 91 . rst 38h ;46f4 ff . rst 38h ;46f5 ff . rst 38h ;46f6 ff . rst 38h ;46f7 ff . rst 38h ;46f8 ff . rst 38h ;46f9 ff . inc (hl) ;46fa 34 4 dec (hl) ;46fb 35 5 add a,e ;46fc 83 . adc a,h ;46fd 8c . adc a,l ;46fe 8d . adc a,(hl) ;46ff 8e . adc a,e ;4700 8b . l4701h: sub l ;4701 95 . sbc a,a ;4702 9f . sbc a,e ;4703 9b . rst 38h ;4704 ff . rst 38h ;4705 ff . rst 38h ;4706 ff . rst 38h ;4707 ff . ld sp,03332h ;4708 31 32 33 1 2 3 dec hl ;470b 2b + sbc a,d ;470c 9a . sbc a,c ;470d 99 . l470eh: sbc a,b ;470e 98 . sub a ;470f 97 . sbc a,h ;4710 9c . l4711h: sbc a,(hl) ;4711 9e . call pe,0ffd1h ;4712 ec d1 ff . . . rst 38h ;4715 ff . jr nc,l4744h ;4716 30 2c 0 , ld l,02fh ;4718 2e 2f . / jr z,$+43 ;471a 28 29 ( ) ret pe ;471c e8 . jp (hl) ;471d e9 . ret po ;471e e0 . jp pe,0d7ebh ;471f ea eb d7 . . . call nc,03809h ;4722 d4 09 38 . . 8 add hl,sp ;4725 39 9 jr nc,l4755h ;4726 30 2d 0 - ld e,(hl) ;4728 5e ^ rst 10h ;4729 d7 . call nc,09209h ;472a d4 09 92 . . . sub e ;472d 93 . sub h ;472e 94 . exx ;472f d9 . ret c ;4730 d8 . jp c,08084h ;4731 da 84 80 . . . ld (hl),0ffh ;4734 36 ff 6 . ccf ;4736 3f ? exx ;4737 d9 . ret c ;4738 d8 . l4739h: jp c,0ffffh ;4739 da ff ff . . . sbc a,l ;473c 9d . dec c ;473d 0d . defb 0edh;next byte illegal after ed ;473e ed . jr nz,l46cah ;473f 20 89 . add a,c ;4741 81 . adc a,d ;4742 8a . sub (hl) ;4743 96 . l4744h: ld hl,(0ff0dh) ;4744 2a 0d ff * . . jr nz,$+1 ;4747 20 ff . rst 38h ;4749 ff . rst 38h ;474a ff . rst 38h ;474b ff . push de ;474c d5 . sub 0ffh ;474d d6 ff . . rst 38h ;474f ff . rst 38h ;4750 ff . rst 38h ;4751 ff . rst 38h ;4752 ff . rst 38h ;4753 ff . push de ;4754 d5 . l4755h: sub 0a1h ;4755 d6 a1 . . and d ;4757 a2 . and e ;4758 a3 . and h ;4759 a4 . and l ;475a a5 . and (hl) ;475b a6 . and a ;475c a7 . xor b ;475d a8 . cp d ;475e ba . pop af ;475f f1 . jp p,0f4f3h ;4760 f2 f3 f4 . . . push af ;4763 f5 . or 0f7h ;4764 f6 f7 . . ld de,l0517h ;4766 11 17 05 . . . ld (de),a ;4769 12 . inc d ;476a 14 . add hl,de ;476b 19 . dec d ;476c 15 . add hl,bc ;476d 09 . inc b ;476e 04 . ld b,007h ;476f 06 07 . . ex af,af' ;4771 08 . ld a,(bc) ;4772 0a . dec bc ;4773 0b . inc c ;4774 0c . inc e ;4775 1c . ld (bc),a ;4776 02 . ld c,00dh ;4777 0e 0d . . defb 0fdh,0d3h,01fh ;illegal sequence ;4779 fd d3 1f . . . jp m,0f81eh ;477c fa 1e f8 . . . ld sp,hl ;477f f9 . ret p ;4780 f0 . ei ;4781 fb . nop ;4782 00 . or b ;4783 b0 . call nc,sub_0f09h ;4784 d4 09 0f . . . djnz l47a6h ;4787 10 1d . . xor h ;4789 ac . or c ;478a b1 . xor l ;478b ad . ld bc,l1b13h ;478c 01 13 1b . . . dec c ;478f 0d . call m,sub_1a20h ;4790 fc 20 1a . . jr $+5 ;4793 18 03 . . ld d,0b2h ;4795 16 b2 . . sub 01bh ;4797 d6 1b . . inc de ;4799 13 . nop ;479a 00 . ret nz ;479b c0 . pop bc ;479c c1 . jp nz,0c4c3h ;479d c2 c3 c4 . . . dec de ;47a0 1b . inc de ;47a1 13 . nop ;47a2 00 . push bc ;47a3 c5 . add a,0c7h ;47a4 c6 c7 . . l47a6h: ret z ;47a6 c8 . ret ;47a7 c9 . cp d ;47a8 ba . ld sp,03332h ;47a9 31 32 33 1 2 3 inc (hl) ;47ac 34 4 dec (hl) ;47ad 35 5 ld (hl),037h ;47ae 36 37 6 7 cp d ;47b0 ba . ld hl,l2321h+1 ;47b1 21 22 23 ! " # inc h ;47b4 24 $ dec h ;47b5 25 % ld h,02fh ;47b6 26 2f & / ld (hl),c ;47b8 71 q ld (hl),a ;47b9 77 w ld h,l ;47ba 65 e ld (hl),d ;47bb 72 r ld (hl),h ;47bc 74 t ld a,c ;47bd 79 y ld (hl),l ;47be 75 u ld l,c ;47bf 69 i ld d,c ;47c0 51 Q ld d,a ;47c1 57 W ld b,l ;47c2 45 E ld d,d ;47c3 52 R ld d,h ;47c4 54 T ld e,c ;47c5 59 Y ld d,l ;47c6 55 U ld c,c ;47c7 49 I ld h,h ;47c8 64 d ld h,(hl) ;47c9 66 f ld h,a ;47ca 67 g ld l,b ;47cb 68 h ld l,d ;47cc 6a j ld l,e ;47cd 6b k ld l,h ;47ce 6c l ld a,h ;47cf 7c | ld b,h ;47d0 44 D ld b,(hl) ;47d1 46 F ld b,a ;47d2 47 G ld c,b ;47d3 48 H ld c,d ;47d4 4a J ld c,e ;47d5 4b K ld c,h ;47d6 4c L ld e,h ;47d7 5c \ ld h,d ;47d8 62 b ld l,(hl) ;47d9 6e n ld l,l ;47da 6d m inc l ;47db 2c , ld l,02dh ;47dc 2e 2d . - inc a ;47de 3c < ld a,(hl) ;47df 7e ~ ld b,d ;47e0 42 B ld c,(hl) ;47e1 4e N ld c,l ;47e2 4d M dec sp ;47e3 3b ; ld a,(03e5fh) ;47e4 3a 5f 3e : _ > ld e,(hl) ;47e7 5e ^ jr c,l4823h ;47e8 38 39 8 9 jr nc,l4817h ;47ea 30 2b 0 + ld h,b ;47ec 60 ` or (hl) ;47ed b6 . ex af,af' ;47ee 08 . add hl,bc ;47ef 09 . jr z,l481bh ;47f0 28 29 ( ) dec a ;47f2 3d = ccf ;47f3 3f ? ld b,b ;47f4 40 @ or e ;47f5 b3 . dec bc ;47f6 0b . add hl,bc ;47f7 09 . ld l,a ;47f8 6f o ld (hl),b ;47f9 70 p ld a,l ;47fa 7d } cp b ;47fb b8 . or a ;47fc b7 . cp c ;47fd b9 . ld h,c ;47fe 61 a ld (hl),e ;47ff 73 s ld c,a ;4800 4f O ld d,b ;4801 50 P ld e,l ;4802 5d ] xor (hl) ;4803 ae . or h ;4804 b4 . xor a ;4805 af . ld b,c ;4806 41 A ld d,e ;4807 53 S ld a,e ;4808 7b { dec c ;4809 0d . daa ;480a 27 ' jr nz,l4887h ;480b 20 7a z ld a,b ;480d 78 x ld h,e ;480e 63 c halt ;480f 76 v ld e,e ;4810 5b [ dec c ;4811 0d . ld hl,(l5a20h) ;4812 2a 20 5a * Z ld e,b ;4815 58 X ld b,e ;4816 43 C l4817h: ld d,(hl) ;4817 56 V ld (de),a ;4818 12 . ld a,a ;4819 7f  rst 38h ;481a ff . l481bh: rst 38h ;481b ff . rst 38h ;481c ff . rst 38h ;481d ff . rst 38h ;481e ff . rst 38h ;481f ff . or l ;4820 b5 . inc c ;4821 0c . dec de ;4822 1b . l4823h: inc de ;4823 13 . nop ;4824 00 . ret nz ;4825 c0 . pop bc ;4826 c1 . jp nz,0c4c3h ;4827 c2 c3 c4 . . . dec de ;482a 1b . inc de ;482b 13 . nop ;482c 00 . push bc ;482d c5 . add a,0c7h ;482e c6 c7 . . ret z ;4830 c8 . ret ;4831 c9 . cp d ;4832 ba . ld sp,03332h ;4833 31 32 33 1 2 3 inc (hl) ;4836 34 4 dec (hl) ;4837 35 5 ld (hl),037h ;4838 36 37 6 7 cp d ;483a ba . ld hl,l2321h+1 ;483b 21 22 23 ! " # inc h ;483e 24 $ dec h ;483f 25 % ld h,02fh ;4840 26 2f & / ld d,c ;4842 51 Q ld d,a ;4843 57 W ld b,l ;4844 45 E ld d,d ;4845 52 R ld d,h ;4846 54 T ld e,c ;4847 59 Y ld d,l ;4848 55 U ld c,c ;4849 49 I ld (hl),c ;484a 71 q ld (hl),a ;484b 77 w ld h,l ;484c 65 e ld (hl),d ;484d 72 r ld (hl),h ;484e 74 t ld a,c ;484f 79 y ld (hl),l ;4850 75 u ld l,c ;4851 69 i ld b,h ;4852 44 D ld b,(hl) ;4853 46 F ld b,a ;4854 47 G ld c,b ;4855 48 H ld c,d ;4856 4a J ld c,e ;4857 4b K ld c,h ;4858 4c L ld e,h ;4859 5c \ ld h,h ;485a 64 d ld h,(hl) ;485b 66 f ld h,a ;485c 67 g ld l,b ;485d 68 h ld l,d ;485e 6a j ld l,e ;485f 6b k ld l,h ;4860 6c l ld a,h ;4861 7c | ld b,d ;4862 42 B ld c,(hl) ;4863 4e N ld c,l ;4864 4d M inc l ;4865 2c , ld l,02dh ;4866 2e 2d . - inc a ;4868 3c < ld e,(hl) ;4869 5e ^ ld h,d ;486a 62 b ld l,(hl) ;486b 6e n ld l,l ;486c 6d m dec sp ;486d 3b ; ld a,(03e5fh) ;486e 3a 5f 3e : _ > ld a,(hl) ;4871 7e ~ jr c,l48adh ;4872 38 39 8 9 jr nc,l48a1h ;4874 30 2b 0 + ld b,b ;4876 40 @ or (hl) ;4877 b6 . ex af,af' ;4878 08 . add hl,bc ;4879 09 . jr z,l48a5h ;487a 28 29 ( ) dec a ;487c 3d = ccf ;487d 3f ? ld h,b ;487e 60 ` or e ;487f b3 . dec bc ;4880 0b . add hl,bc ;4881 09 . ld c,a ;4882 4f O ld d,b ;4883 50 P ld e,l ;4884 5d ] cp b ;4885 b8 . or a ;4886 b7 . l4887h: cp c ;4887 b9 . ld b,c ;4888 41 A ld d,e ;4889 53 S ld l,a ;488a 6f o ld (hl),b ;488b 70 p ld a,l ;488c 7d } xor (hl) ;488d ae . or h ;488e b4 . xor a ;488f af . ld h,c ;4890 61 a ld (hl),e ;4891 73 s ld e,e ;4892 5b [ dec c ;4893 0d . daa ;4894 27 ' jr nz,l48f1h ;4895 20 5a Z ld e,b ;4897 58 X ld b,e ;4898 43 C ld d,(hl) ;4899 56 V ld a,e ;489a 7b { dec c ;489b 0d . ld hl,(l7a20h) ;489c 2a 20 7a * z ld a,b ;489f 78 x ld h,e ;48a0 63 c l48a1h: halt ;48a1 76 v ld (de),a ;48a2 12 . ld a,a ;48a3 7f  rst 38h ;48a4 ff . l48a5h: rst 38h ;48a5 ff . rst 38h ;48a6 ff . rst 38h ;48a7 ff . rst 38h ;48a8 ff . rst 38h ;48a9 ff . l48aah: or l ;48aa b5 . inc c ;48ab 0c . dec de ;48ac 1b . l48adh: inc de ;48ad 13 . nop ;48ae 00 . set 1,h ;48af cb cc . . call 0cfceh ;48b1 cd ce cf . . . dec de ;48b4 1b . inc de ;48b5 13 . nop ;48b6 00 . set 1,h ;48b7 cb cc . . call 0cfceh ;48b9 cd ce cf . . . cp d ;48bc ba . pop hl ;48bd e1 . jp po,0e4e3h ;48be e2 e3 e4 . . . push hl ;48c1 e5 . and 0e7h ;48c2 e6 e7 . . cp d ;48c4 ba . ld sp,03332h ;48c5 31 32 33 1 2 3 inc (hl) ;48c8 34 4 dec (hl) ;48c9 35 5 ld (hl),037h ;48ca 36 37 6 7 add a,a ;48cc 87 . l48cdh: add a,d ;48cd 82 . adc a,b ;48ce 88 . add a,(hl) ;48cf 86 . add a,l ;48d0 85 . adc a,a ;48d1 8f . sub b ;48d2 90 . sub c ;48d3 91 . rst 38h ;48d4 ff . rst 38h ;48d5 ff . rst 38h ;48d6 ff . rst 38h ;48d7 ff . rst 38h ;48d8 ff . rst 38h ;48d9 ff . inc (hl) ;48da 34 4 dec (hl) ;48db 35 5 add a,e ;48dc 83 . adc a,h ;48dd 8c . adc a,l ;48de 8d . adc a,(hl) ;48df 8e . adc a,e ;48e0 8b . sub l ;48e1 95 . sbc a,a ;48e2 9f . sbc a,e ;48e3 9b . rst 38h ;48e4 ff . rst 38h ;48e5 ff . rst 38h ;48e6 ff . rst 38h ;48e7 ff . ld sp,03332h ;48e8 31 32 33 1 2 3 ld hl,(0999ah) ;48eb 2a 9a 99 * . . sbc a,b ;48ee 98 . sub a ;48ef 97 . sbc a,h ;48f0 9c . l48f1h: sbc a,(hl) ;48f1 9e . call pe,0ffd1h ;48f2 ec d1 ff . . . rst 38h ;48f5 ff . jr nc,l4924h ;48f6 30 2c 0 , ld l,03fh ;48f8 2e 3f . ? rst 38h ;48fa ff . ld e,(hl) ;48fb 5e ^ ret pe ;48fc e8 . jp (hl) ;48fd e9 . ret po ;48fe e0 . jp pe,0d7ebh ;48ff ea eb d7 . . . call nc,03809h ;4902 d4 09 38 . . 8 add hl,sp ;4905 39 9 jr nc,l4930h ;4906 30 28 0 ( add hl,hl ;4908 29 ) rst 10h ;4909 d7 . call nc,09209h ;490a d4 09 92 . . . sub e ;490d 93 . l490eh: sub h ;490e 94 . exx ;490f d9 . ret c ;4910 d8 . jp c,08084h ;4911 da 84 80 . . . ld (hl),02bh ;4914 36 2b 6 + dec l ;4916 2d - exx ;4917 d9 . ret c ;4918 d8 . jp c,0ffffh ;4919 da ff ff . . . sbc a,l ;491c 9d . dec c ;491d 0d . defb 0edh;next byte illegal after ed ;491e ed . jr nz,l48aah ;491f 20 89 . add a,c ;4921 81 . adc a,d ;4922 8a . sub (hl) ;4923 96 . l4924h: cpl ;4924 2f / dec c ;4925 0d . rst 38h ;4926 ff . jr nz,$+1 ;4927 20 ff . rst 38h ;4929 ff . rst 38h ;492a ff . rst 38h ;492b ff . push de ;492c d5 . sub 0ffh ;492d d6 ff . . rst 38h ;492f ff . l4930h: rst 38h ;4930 ff . rst 38h ;4931 ff . rst 38h ;4932 ff . rst 38h ;4933 ff . push de ;4934 d5 . sub 0a1h ;4935 d6 a1 . . and d ;4937 a2 . and e ;4938 a3 . and h ;4939 a4 . and l ;493a a5 . and (hl) ;493b a6 . and a ;493c a7 . xor b ;493d a8 . cp d ;493e ba . di ;493f f3 . call p,0f6f5h ;4940 f4 f5 f6 . . . rst 30h ;4943 f7 . dec e ;4944 1d . ret m ;4945 f8 . ld bc,l051ah ;4946 01 1a 05 . . . ld (de),a ;4949 12 . inc d ;494a 14 . add hl,de ;494b 19 . dec d ;494c 15 . add hl,bc ;494d 09 . inc b ;494e 04 . ld b,007h ;494f 06 07 . . ex af,af' ;4951 08 . ld a,(bc) ;4952 0a . dec bc ;4953 0b . inc c ;4954 0c . dec c ;4955 0d . ld (bc),a ;4956 02 . ld c,0fbh ;4957 0e fb . . call m,0d3fdh ;4959 fc fd d3 . . . pop af ;495c f1 . jp p,01cf9h ;495d f2 f9 1c . . . nop ;4960 00 . dec de ;4961 1b . rra ;4962 1f . or b ;4963 b0 . call nc,sub_0f09h ;4964 d4 09 0f . . . djnz l4987h ;4967 10 1e . . xor h ;4969 ac . or c ;496a b1 . xor l ;496b ad . ld de,0f013h ;496c 11 13 f0 . . . dec c ;496f 0d . jp m,01720h ;4970 fa 20 17 . . jr $+5 ;4973 18 03 . . ld d,0b2h ;4975 16 b2 . . sub 01bh ;4977 d6 1b . . inc de ;4979 13 . nop ;497a 00 . ret nz ;497b c0 . pop bc ;497c c1 . jp nz,0c4c3h ;497d c2 c3 c4 . . . dec de ;4980 1b . inc de ;4981 13 . nop ;4982 00 . push bc ;4983 c5 . add a,0c7h ;4984 c6 c7 . . ret z ;4986 c8 . l4987h: ret ;4987 c9 . cp d ;4988 ba . ld h,07bh ;4989 26 7b & { ld (l2827h),hl ;498b 22 27 28 " ' ( ld e,l ;498e 5d ] ld a,l ;498f 7d } cp d ;4990 ba . ld sp,03332h ;4991 31 32 33 1 2 3 inc (hl) ;4994 34 4 dec (hl) ;4995 35 5 ld (hl),037h ;4996 36 37 6 7 ld h,c ;4998 61 a ld a,d ;4999 7a z ld h,l ;499a 65 e ld (hl),d ;499b 72 r ld (hl),h ;499c 74 t ld a,c ;499d 79 y ld (hl),l ;499e 75 u ld l,c ;499f 69 i ld b,c ;49a0 41 A ld e,d ;49a1 5a Z ld b,l ;49a2 45 E ld d,d ;49a3 52 R ld d,h ;49a4 54 T ld e,c ;49a5 59 Y ld d,l ;49a6 55 U ld c,c ;49a7 49 I ld h,h ;49a8 64 d ld h,(hl) ;49a9 66 f ld h,a ;49aa 67 g ld l,b ;49ab 68 h ld l,d ;49ac 6a j ld l,e ;49ad 6b k ld l,h ;49ae 6c l ld l,l ;49af 6d m ld b,h ;49b0 44 D ld b,(hl) ;49b1 46 F ld b,a ;49b2 47 G ld c,b ;49b3 48 H ld c,d ;49b4 4a J ld c,e ;49b5 4b K ld c,h ;49b6 4c L ld c,l ;49b7 4d M ld h,d ;49b8 62 b ld l,(hl) ;49b9 6e n inc l ;49ba 2c , dec sp ;49bb 3b ; ld a,(l3c3dh) ;49bc 3a 3d 3c : = < inc hl ;49bf 23 # ld b,d ;49c0 42 B ld c,(hl) ;49c1 4e N ccf ;49c2 3f ? l49c3h: ld l,02fh ;49c3 2e 2f . / dec hl ;49c5 2b + ld a,024h ;49c6 3e 24 > $ ld hl,0405ch ;49c8 21 5c 40 ! \ @ add hl,hl ;49cb 29 ) dec l ;49cc 2d - or (hl) ;49cd b6 . ex af,af' ;49ce 08 . add hl,bc ;49cf 09 . jr c,l4a0bh ;49d0 38 39 8 9 jr nc,l4a2fh ;49d2 30 5b 0 [ ld e,a ;49d4 5f _ or e ;49d5 b3 . dec bc ;49d6 0b . add hl,bc ;49d7 09 . ld l,a ;49d8 6f o ld (hl),b ;49d9 70 p ld e,(hl) ;49da 5e ^ cp b ;49db b8 . or a ;49dc b7 . cp c ;49dd b9 . ld (hl),c ;49de 71 q ld (hl),e ;49df 73 s ld c,a ;49e0 4f O ld d,b ;49e1 50 P ld a,(hl) ;49e2 7e ~ xor (hl) ;49e3 ae . or h ;49e4 b4 . xor a ;49e5 af . ld d,c ;49e6 51 Q ld d,e ;49e7 53 S ld a,h ;49e8 7c | dec c ;49e9 0d . ld h,b ;49ea 60 ` jr nz,l4a64h ;49eb 20 77 w ld a,b ;49ed 78 x ld h,e ;49ee 63 c halt ;49ef 76 v dec h ;49f0 25 % dec c ;49f1 0d . ld hl,(l5720h) ;49f2 2a 20 57 * W ld e,b ;49f5 58 X ld b,e ;49f6 43 C ld d,(hl) ;49f7 56 V ld (de),a ;49f8 12 . ld a,a ;49f9 7f  rst 38h ;49fa ff . rst 38h ;49fb ff . rst 38h ;49fc ff . rst 38h ;49fd ff . rst 38h ;49fe ff . rst 38h ;49ff ff . or l ;4a00 b5 . inc c ;4a01 0c . dec de ;4a02 1b . inc de ;4a03 13 . nop ;4a04 00 . ret nz ;4a05 c0 . pop bc ;4a06 c1 . jp nz,0c4c3h ;4a07 c2 c3 c4 . . . dec de ;4a0a 1b . l4a0bh: ; AZERTYUIOP inc de ;4a0b 13 . nop ;4a0c 00 . push bc ;4a0d c5 . add a,0c7h ;4a0e c6 c7 . . ret z ;4a10 c8 . ret ;4a11 c9 . cp d ;4a12 ba . ld h,07bh ;4a13 26 7b & { ld (l2827h),hl ;4a15 22 27 28 " ' ( ld e,l ;4a18 5d ] ld a,l ;4a19 7d } cp d ;4a1a ba . ld sp,03332h ;4a1b 31 32 33 1 2 3 inc (hl) ;4a1e 34 4 dec (hl) ;4a1f 35 5 ld (hl),037h ;4a20 36 37 6 7 ld b,c ;4a22 41 A ld e,d ;4a23 5a Z ld b,l ;4a24 45 E ld d,d ;4a25 52 R ld d,h ;4a26 54 T ld e,c ;4a27 59 Y ld d,l ;4a28 55 U ld c,c ;4a29 49 I ld h,c ;4a2a 61 a ld a,d ;4a2b 7a z ld h,l ;4a2c 65 e ld (hl),d ;4a2d 72 r ld (hl),h ;4a2e 74 t l4a2fh: ld a,c ;4a2f 79 y ld (hl),l ;4a30 75 u ld l,c ;4a31 69 i ld b,h ;4a32 44 D ld b,(hl) ;4a33 46 F ld b,a ;4a34 47 G ld c,b ;4a35 48 H ld c,d ;4a36 4a J ld c,e ;4a37 4b K ld c,h ;4a38 4c L ld c,l ;4a39 4d M ld h,h ;4a3a 64 d ld h,(hl) ;4a3b 66 f ld h,a ;4a3c 67 g ld l,b ;4a3d 68 h ld l,d ;4a3e 6a j ld l,e ;4a3f 6b k ld l,h ;4a40 6c l ld l,l ;4a41 6d m ld b,d ;4a42 42 B ld c,(hl) ;4a43 4e N inc l ;4a44 2c , dec sp ;4a45 3b ; ld a,(l3c3dh) ;4a46 3a 3d 3c : = < inc hl ;4a49 23 # ld h,d ;4a4a 62 b ld l,(hl) ;4a4b 6e n ccf ;4a4c 3f ? ld l,02fh ;4a4d 2e 2f . / dec hl ;4a4f 2b + ld a,024h ;4a50 3e 24 > $ ld hl,0405ch ;4a52 21 5c 40 ! \ @ add hl,hl ;4a55 29 ) dec l ;4a56 2d - or (hl) ;4a57 b6 . ex af,af' ;4a58 08 . add hl,bc ;4a59 09 . jr c,l4a95h ;4a5a 38 39 8 9 jr nc,$+93 ;4a5c 30 5b 0 [ ld e,a ;4a5e 5f _ or e ;4a5f b3 . dec bc ;4a60 0b . add hl,bc ;4a61 09 . ld c,a ;4a62 4f O ld d,b ;4a63 50 P l4a64h: ld e,(hl) ;4a64 5e ^ cp b ;4a65 b8 . or a ;4a66 b7 . cp c ;4a67 b9 . ld d,c ;4a68 51 Q ld d,e ;4a69 53 S ld l,a ;4a6a 6f o ld (hl),b ;4a6b 70 p ld a,(hl) ;4a6c 7e ~ xor (hl) ;4a6d ae . or h ;4a6e b4 . xor a ;4a6f af . ld (hl),c ;4a70 71 q ld (hl),e ;4a71 73 s ld a,h ;4a72 7c | dec c ;4a73 0d . ld h,b ;4a74 60 ` jr nz,l4aceh ;4a75 20 57 W ld e,b ;4a77 58 X ld b,e ;4a78 43 C ld d,(hl) ;4a79 56 V dec h ;4a7a 25 % dec c ;4a7b 0d . ld hl,(l7720h) ;4a7c 2a 20 77 * w ld a,b ;4a7f 78 x ld h,e ;4a80 63 c halt ;4a81 76 v ld (de),a ;4a82 12 . ld a,a ;4a83 7f  rst 38h ;4a84 ff . rst 38h ;4a85 ff . rst 38h ;4a86 ff . rst 38h ;4a87 ff . rst 38h ;4a88 ff . rst 38h ;4a89 ff . or l ;4a8a b5 . inc c ;4a8b 0c . sub_4a8ch: ld hl,l4adch ;4a8c 21 dc 4a ! . J ld de,04aeeh ;4a8f 11 ee 4a . . J ld b,012h ;4a92 06 12 . . l4a94h: ld c,(hl) ;4a94 4e N l4a95h: cp c ;4a95 b9 . jr z,l4a9dh ;4a96 28 05 ( . inc hl ;4a98 23 # inc de ;4a99 13 . djnz l4a94h ;4a9a 10 f8 . . ret ;4a9c c9 . l4a9dh: cp 02ah ;4a9d fe 2a . * jr z,l4aa9h ;4a9f 28 08 ( . cp 02bh ;4aa1 fe 2b . + jr z,l4aa9h ;4aa3 28 04 ( . cp 05eh ;4aa5 fe 5e . ^ jr nz,l4ab1h ;4aa7 20 08 . l4aa9h: ld b,a ;4aa9 47 G ld a,(0f0feh) ;4aaa 3a fe f0 : . . bit 4,a ;4aad cb 67 . g jr nz,l4adah ;4aaf 20 29 ) l4ab1h: ld a,(de) ;4ab1 1a . cp 0fch ;4ab2 fe fc . . jr z,l4ac4h ;4ab4 28 0e ( . cp 02ah ;4ab6 fe 2a . * jr z,l4aceh ;4ab8 28 14 ( . cp 027h ;4aba fe 27 . ' ret nz ;4abc c0 . call sub_4ad4h ;4abd cd d4 4a . . J ret nz ;4ac0 c0 . ld a,023h ;4ac1 3e 23 > # ret ;4ac3 c9 . l4ac4h: ld b,a ;4ac4 47 G ld a,(0f0feh) ;4ac5 3a fe f0 : . . and 0c0h ;4ac8 e6 c0 . . ld a,b ;4aca 78 x ret nz ;4acb c0 . xor a ;4acc af . ret ;4acd c9 . l4aceh: call sub_4ad4h ;4ace cd d4 4a . . J ret nz ;4ad1 c0 . inc a ;4ad2 3c < ret ;4ad3 c9 . sub_4ad4h: ld b,a ;4ad4 47 G ld a,(0f0feh) ;4ad5 3a fe f0 : . . and 003h ;4ad8 e6 03 . . l4adah: ld a,b ;4ada 78 x ret ;4adb c9 . l4adch: nop ;4adc 00 . add hl,de ;4add 19 . ld a,(de) ;4ade 1a . ld e,023h ;4adf 1e 23 . # daa ;4ae1 27 ' ld hl,(l402bh) ;4ae2 2a 2b 40 * + @ ld e,c ;4ae5 59 Y ld e,d ;4ae6 5a Z ld e,(hl) ;4ae7 5e ^ ld h,b ;4ae8 60 ` ld a,c ;4ae9 79 y ld a,d ;4aea 7a z ld a,(hl) ;4aeb 7e ~ ei ;4aec fb . call m,sub_1afch ;4aed fc fc 1a . . . add hl,de ;4af0 19 . ei ;4af1 fb . ld b,b ;4af2 40 @ ld e,(hl) ;4af3 5e ^ ld h,b ;4af4 60 ` ld a,(hl) ;4af5 7e ~ ld hl,(l595ah) ;4af6 2a 5a 59 * Z Y daa ;4af9 27 ' ld hl,(0797ah) ;4afa 2a 7a 79 * z y daa ;4afd 27 ' nop ;4afe 00 . ld e,0c0h ;4aff 1e c0 . . pop bc ;4b01 c1 . jp nz,0c4c3h ;4b02 c2 c3 c4 . . . call pe,0fceeh ;4b05 ec ee fc . . . cp 008h ;4b08 fe 08 . . ld (de),a ;4b0a 12 . ld a,a ;4b0b 7f  or (hl) ;4b0c b6 . or a ;4b0d b7 . cp b ;4b0e b8 . cp c ;4b0f b9 . push bc ;4b10 c5 . add a,0c7h ;4b11 c6 c7 . . ret z ;4b13 c8 . ret ;4b14 c9 . defb 0edh;next byte illegal after ed ;4b15 ed . rst 28h ;4b16 ef . defb 0fdh,0ffh,00bh ;illegal sequence ;4b17 fd ff 0b . . . or l ;4b1a b5 . inc c ;4b1b 0c . or e ;4b1c b3 . or h ;4b1d b4 . xor (hl) ;4b1e ae . xor a ;4b1f af . sub_4b20h: call sub_5bfah ;4b20 cd fa 5b . . [ xor a ;4b23 af . ld (0f2d4h),a ;4b24 32 d4 f2 2 . . ld hl,l4b38h ;4b27 21 38 4b ! 8 K ld b,005h ;4b2a 06 05 . . l4b2ch: push hl ;4b2c e5 . push bc ;4b2d c5 . ld c,(hl) ;4b2e 4e N call sub_4b3dh ;4b2f cd 3d 4b . = K pop bc ;4b32 c1 . pop hl ;4b33 e1 . inc hl ;4b34 23 # djnz l4b2ch ;4b35 10 f5 . . ret ;4b37 c9 . l4b38h: dec de ;4b38 1b . ret nc ;4b39 d0 . nop ;4b3a 00 . add hl,de ;4b3b 19 . rla ;4b3c 17 . sub_4b3dh: ld hl,(0f709h) ;4b3d 2a 09 f7 * . . ld a,(hl) ;4b40 7e ~ and a ;4b41 a7 . jr nz,l4b8ah ;4b42 20 46 F ld a,c ;4b44 79 y cp 020h ;4b45 fe 20 . jp nc,l560bh ;4b47 d2 0b 56 . . V ld hl,l4b59h ;4b4a 21 59 4b ! Y K ld ix,l4b6ah ;4b4d dd 21 6a 4b . ! j K call sub_4c85h ;4b51 cd 85 4c . . L ret c ;4b54 d8 . call sub_4e7bh ;4b55 cd 7b 4e . { N jp (hl) ;4b58 e9 . l4b59h: djnz l4b76h ;4b59 10 1b . . dec b ;4b5b 05 . ex af,af' ;4b5c 08 . add hl,bc ;4b5d 09 . ld a,(bc) ;4b5e 0a . dec bc ;4b5f 0b . inc c ;4b60 0c . dec c ;4b61 0d . djnz l4b75h ;4b62 10 11 . . ld a,(de) ;4b64 1a . inc e ;4b65 1c . dec e ;4b66 1d . ld e,01fh ;4b67 1e 1f . . rlca ;4b69 07 . l4b6ah: and b ;4b6a a0 . ld c,h ;4b6b 4c L dec c ;4b6c 0d . ld d,c ;4b6d 51 Q push bc ;4b6e c5 . ld c,(hl) ;4b6f 4e N sbc a,h ;4b70 9c . ld c,a ;4b71 4f O ld d,l ;4b72 55 U ld d,b ;4b73 50 P halt ;4b74 76 v l4b75h: ld d,c ;4b75 51 Q l4b76h: ld c,e ;4b76 4b K ld d,c ;4b77 51 Q ld b,d ;4b78 42 B ld d,b ;4b79 50 P sbc a,b ;4b7a 98 . ld d,c ;4b7b 51 Q xor (hl) ;4b7c ae . ld d,c ;4b7d 51 Q ld (de),a ;4b7e 12 . ld d,c ;4b7f 51 Q ld (0c54fh),hl ;4b80 22 4f c5 " O . ld c,(hl) ;4b83 4e N and 04eh ;4b84 e6 4e . N ld e,d ;4b86 5a Z ld c,a ;4b87 4f O ld a,(hl) ;4b88 7e ~ ld e,b ;4b89 58 X l4b8ah: inc a ;4b8a 3c < ld (hl),a ;4b8b 77 w ld hl,(0f70bh) ;4b8c 2a 0b f7 * . . ld a,(hl) ;4b8f 7e ~ and a ;4b90 a7 . jp nz,l4bf4h ;4b91 c2 f4 4b . . K ld hl,l4bb1h ;4b94 21 b1 4b ! . K ld ix,04bc8h ;4b97 dd 21 c8 4b . ! . K call sub_4c85h ;4b9b cd 85 4c . . L jr c,l4ba1h ;4b9e 38 01 8 . jp (hl) ;4ba0 e9 . l4ba1h: ld hl,l4c05h ;4ba1 21 05 4c ! . L ld b,(hl) ;4ba4 46 F inc hl ;4ba5 23 # ld a,c ;4ba6 79 y l4ba7h: cp (hl) ;4ba7 be . jp z,l4ca6h ;4ba8 ca a6 4c . . L inc hl ;4bab 23 # djnz l4ba7h ;4bac 10 f9 . . jp l4ce6h ;4bae c3 e6 4c . . L l4bb1h: ld d,02ah ;4bb1 16 2a . * ld (05433h),a ;4bb3 32 33 54 2 3 T ld e,c ;4bb6 59 Y sub (hl) ;4bb7 96 . sub a ;4bb8 97 . call nc,sub_50d5h ;4bb9 d4 d5 50 . . P ld a,e ;4bbc 7b { ld a,l ;4bbd 7d } and b ;4bbe a0 . and c ;4bbf a1 . and d ;4bc0 a2 . and e ;4bc1 a3 . and h ;4bc2 a4 . and l ;4bc3 a5 . or b ;4bc4 b0 . or c ;4bc5 b1 . rst 10h ;4bc6 d7 . or 04bh ;4bc7 f6 4b . K ld d,c ;4bc9 51 Q ld (bc),a ;4bca 02 . ld d,c ;4bcb 51 Q ret m ;4bcc f8 . ld d,b ;4bcd 50 P dec c ;4bce 0d . ld d,c ;4bcf 51 Q ld (de),a ;4bd0 12 . ld d,c ;4bd1 51 Q call nz,0d251h ;4bd2 c4 51 d2 . Q . ld d,c ;4bd5 51 Q call po,0f651h ;4bd6 e4 51 f6 . Q . ld d,c ;4bd9 51 Q add a,h ;4bda 84 . ld e,b ;4bdb 58 X ld h,(hl) ;4bdc 66 f ld e,b ;4bdd 58 X ld l,d ;4bde 6a j ld e,b ;4bdf 58 X xor c ;4be0 a9 . ld e,b ;4be1 58 X xor l ;4be2 ad . ld e,b ;4be3 58 X or c ;4be4 b1 . ld e,b ;4be5 58 X or l ;4be6 b5 . ld e,b ;4be7 58 X cp c ;4be8 b9 . ld e,b ;4be9 58 X cp l ;4bea bd . ld e,b ;4beb 58 X sbc a,a ;4bec 9f . ld e,b ;4bed 58 X and e ;4bee a3 . ld e,b ;4bef 58 X call c,0d054h ;4bf0 dc 54 d0 . T . ld e,b ;4bf3 58 X l4bf4h: push bc ;4bf4 c5 . ld c,a ;4bf5 4f O ld hl,l4c05h ;4bf6 21 05 4c ! . L ld ix,04c27h ;4bf9 dd 21 27 4c . ! ' L call sub_4c85h ;4bfd cd 85 4c . . L pop bc ;4c00 c1 . jp c,l4ce6h ;4c01 da e6 4c . . L jp (hl) ;4c04 e9 . l4c05h: ld hl,03d25h ;4c05 21 25 3d ! % = sub 043h ;4c08 d6 43 . C sub b ;4c0a 90 . sub c ;4c0b 91 . out (094h),a ;4c0c d3 94 . . sub l ;4c0e 95 . add a,0c7h ;4c0f c6 c7 . . ret nc ;4c11 d0 . pop de ;4c12 d1 . jp nc,0f0e0h ;4c13 d2 e0 f0 . . . pop af ;4c16 f1 . jp p,0f4f3h ;4c17 f2 f3 f4 . . . push af ;4c1a f5 . rst 30h ;4c1b f7 . ld c,h ;4c1c 4c L add a,b ;4c1d 80 . add a,c ;4c1e 81 . add a,d ;4c1f 82 . sub d ;4c20 92 . sub e ;4c21 93 . jp nz,0c4c3h ;4c22 c2 c3 c4 . . . push bc ;4c25 c5 . jp z,l5608h ;4c26 ca 08 56 . . V rst 0 ;4c29 c7 . ld c,a ;4c2a 4f O ld b,050h ;4c2b 06 50 . P dec (hl) ;4c2d 35 5 ld e,c ;4c2e 59 Y inc c ;4c2f 0c . ld d,d ;4c30 52 R ld d,h ;4c31 54 T ld d,d ;4c32 52 R jp nc,09e5ch ;4c33 d2 5c 9e . \ . ld d,h ;4c36 54 T bit 2,h ;4c37 cb 54 . T call p,02357h ;4c39 f4 57 23 . W # ld e,b ;4c3c 58 X sub a ;4c3d 97 . ld e,c ;4c3e 59 Y ld b,d ;4c3f 42 B ld e,(hl) ;4c40 5e ^ ld h,l ;4c41 65 e ld d,a ;4c42 57 W jp z,01657h ;4c43 ca 57 16 . W . ld e,c ;4c46 59 Y dec h ;4c47 25 % ld e,c ;4c48 59 Y ld hl,(0ec59h) ;4c49 2a 59 ec * Y . ld e,b ;4c4c 58 X pop af ;4c4d f1 . ld e,b ;4c4e 58 X or 058h ;4c4f f6 58 . X ld a,(bc) ;4c51 0a . ld e,c ;4c52 59 Y adc a,l ;4c53 8d . ld e,b ;4c54 58 X adc a,c ;4c55 89 . ld e,b ;4c56 58 X adc a,c ;4c57 89 . ld e,b ;4c58 58 X adc a,l ;4c59 8d . ld e,b ;4c5a 58 X adc a,c ;4c5b 89 . ld e,b ;4c5c 58 X adc a,c ;4c5d 89 . ld e,b ;4c5e 58 X sub l ;4c5f 95 . ld e,b ;4c60 58 X sub l ;4c61 95 . ld e,b ;4c62 58 X sub c ;4c63 91 . ld e,b ;4c64 58 X sub c ;4c65 91 . ld e,b ;4c66 58 X adc a,c ;4c67 89 . ld e,b ;4c68 58 X push hl ;4c69 e5 . pop de ;4c6a d1 . inc de ;4c6b 13 . ld (hl),000h ;4c6c 36 00 6 . ldir ;4c6e ed b0 . . ret ;4c70 c9 . sub_4c71h: push de ;4c71 d5 . ld hl,(0f70dh) ;4c72 2a 0d f7 * . . dec hl ;4c75 2b + dec hl ;4c76 2b + dec hl ;4c77 2b + push hl ;4c78 e5 . ld hl,(0f709h) ;4c79 2a 09 f7 * . . ld a,(hl) ;4c7c 7e ~ ld e,a ;4c7d 5f _ pop hl ;4c7e e1 . ld d,000h ;4c7f 16 00 . . add hl,de ;4c81 19 . ld (hl),c ;4c82 71 q pop de ;4c83 d1 . ret ;4c84 c9 . sub_4c85h: ld de,l0000h ;4c85 11 00 00 . . . ld a,c ;4c88 79 y ld b,(hl) ;4c89 46 F inc hl ;4c8a 23 # l4c8bh: cp (hl) ;4c8b be . jr z,l4c94h ;4c8c 28 06 ( . inc hl ;4c8e 23 # inc e ;4c8f 1c . djnz l4c8bh ;4c90 10 f9 . . scf ;4c92 37 7 ret ;4c93 c9 . l4c94h: sla e ;4c94 cb 23 . # add ix,de ;4c96 dd 19 . . ld h,(ix+001h) ;4c98 dd 66 01 . f . ld l,(ix+000h) ;4c9b dd 6e 00 . n . or a ;4c9e b7 . ret ;4c9f c9 . ld hl,(0f709h) ;4ca0 2a 09 f7 * . . ld (hl),001h ;4ca3 36 01 6 . ret ;4ca5 c9 . l4ca6h: ld hl,(0f70bh) ;4ca6 2a 0b f7 * . . ld (hl),c ;4ca9 71 q ret ;4caa c9 . sub_4cabh: ld ix,(0f701h) ;4cab dd 2a 01 f7 . * . . jr l4cb5h ;4caf 18 04 . . sub_4cb1h: ld ix,(0f703h) ;4cb1 dd 2a 03 f7 . * . . l4cb5h: ld iy,(0f705h) ;4cb5 fd 2a 05 f7 . * . . ret ;4cb9 c9 . sub_4cbah: ld ix,(0f701h) ;4cba dd 2a 01 f7 . * . . ld iy,(0f703h) ;4cbe fd 2a 03 f7 . * . . ret ;4cc2 c9 . sub_4cc3h: ld c,022h ;4cc3 0e 22 . " jr l4cc9h ;4cc5 18 02 . . sub_4cc7h: ld c,035h ;4cc7 0e 35 . 5 l4cc9h: ld hl,l0003h+1 ;4cc9 21 04 00 ! . . sub_4ccch: push de ;4ccc d5 . push hl ;4ccd e5 . call sub_4488h ;4cce cd 88 44 . . D pop bc ;4cd1 c1 . ld de,0f748h ;4cd2 11 48 f7 . H . call sub_44bbh ;4cd5 cd bb 44 . . D call sub_44b2h ;4cd8 cd b2 44 . . D pop de ;4cdb d1 . ret ;4cdc c9 . sub_4cddh: ld hl,(0f707h) ;4cdd 2a 07 f7 * . . ld (hl),000h ;4ce0 36 00 6 . ret ;4ce2 c9 . l4ce3h: call sub_53c1h ;4ce3 cd c1 53 . . S l4ce6h: xor a ;4ce6 af . ld hl,(0f70bh) ;4ce7 2a 0b f7 * . . ld (hl),a ;4cea 77 w ld hl,(0f709h) ;4ceb 2a 09 f7 * . . ld (hl),a ;4cee 77 w jr l4cf4h ;4cef 18 03 . . call sub_53c1h ;4cf1 cd c1 53 . . S l4cf4h: call sub_4e8eh ;4cf4 cd 8e 4e . . N xor a ;4cf7 af . ld (0f70fh),a ;4cf8 32 0f f7 2 . . ret ;4cfb c9 . sub_4cfch: ld l,a ;4cfc 6f o ld h,000h ;4cfd 26 00 & . add hl,hl ;4cff 29 ) push hl ;4d00 e5 . pop de ;4d01 d1 . add hl,hl ;4d02 29 ) add hl,de ;4d03 19 . ret ;4d04 c9 . sub_4d05h: ld l,a ;4d05 6f o ld h,000h ;4d06 26 00 & . add hl,hl ;4d08 29 ) add hl,hl ;4d09 29 ) add hl,hl ;4d0a 29 ) ret ;4d0b c9 . sub_4d0ch: push bc ;4d0c c5 . push de ;4d0d d5 . push hl ;4d0e e5 . ld b,00ah ;4d0f 06 0a . . ld ix,(0f103h) ;4d11 dd 2a 03 f1 . * . . ld a,(0f73bh) ;4d15 3a 3b f7 : ; . cp 001h ;4d18 fe 01 . . jr z,l4d54h ;4d1a 28 38 ( 8 ld c,000h ;4d1c 0e 00 . . ld d,007h ;4d1e 16 07 . . cp 002h ;4d20 fe 02 . . jr z,l4d26h ;4d22 28 02 ( . ld d,00fh ;4d24 16 0f . . l4d26h: call sub_4da4h ;4d26 cd a4 4d . . M ld hl,0f748h ;4d29 21 48 f7 ! H . ld (hl),c ;4d2c 71 q inc hl ;4d2d 23 # ld (hl),d ;4d2e 72 r inc hl ;4d2f 23 # ld (hl),008h ;4d30 36 08 6 . push bc ;4d32 c5 . push de ;4d33 d5 . push hl ;4d34 e5 . pop de ;4d35 d1 . inc de ;4d36 13 . ld hl,0f781h ;4d37 21 81 f7 ! . . ld bc,l0006h+2 ;4d3a 01 08 00 . . . ldir ;4d3d ed b0 . . ld c,035h ;4d3f 0e 35 . 5 ld hl,l0009h+2 ;4d41 21 0b 00 ! . . call sub_4ccch ;4d44 cd cc 4c . . L pop de ;4d47 d1 . pop bc ;4d48 c1 . call sub_4d8ah ;4d49 cd 8a 4d . . M ld a,008h ;4d4c 3e 08 > . add a,c ;4d4e 81 . ld c,a ;4d4f 4f O djnz l4d26h ;4d50 10 d4 . . jr l4d86h ;4d52 18 32 . 2 l4d54h: ld de,l0000h ;4d54 11 00 00 . . . ld c,038h ;4d57 0e 38 . 8 l4d59h: call sub_4da4h ;4d59 cd a4 4d . . M ld iy,0f781h ;4d5c fd 21 81 f7 . ! . . push bc ;4d60 c5 . ld b,008h ;4d61 06 08 . . l4d63h: ld hl,0f748h ;4d63 21 48 f7 ! H . ld (hl),d ;4d66 72 r inc hl ;4d67 23 # ld (hl),e ;4d68 73 s inc hl ;4d69 23 # ld (hl),c ;4d6a 71 q inc hl ;4d6b 23 # ld a,(iy+000h) ;4d6c fd 7e 00 . ~ . ld (hl),a ;4d6f 77 w inc iy ;4d70 fd 23 . # push bc ;4d72 c5 . push de ;4d73 d5 . call sub_4cc3h ;4d74 cd c3 4c . . L pop de ;4d77 d1 . ld hl,l0006h ;4d78 21 06 00 ! . . add hl,de ;4d7b 19 . ex de,hl ;4d7c eb . pop bc ;4d7d c1 . djnz l4d63h ;4d7e 10 e3 . . pop bc ;4d80 c1 . call sub_4d8ah ;4d81 cd 8a 4d . . M djnz l4d59h ;4d84 10 d3 . . l4d86h: pop hl ;4d86 e1 . pop de ;4d87 d1 . pop bc ;4d88 c1 . ret ;4d89 c9 . sub_4d8ah: push de ;4d8a d5 . bit 0,b ;4d8b cb 40 . @ jr nz,l4d96h ;4d8d 20 07 . ld de,00050h ;4d8f 11 50 00 . P . add ix,de ;4d92 dd 19 . . pop de ;4d94 d1 . ret ;4d95 c9 . l4d96h: push ix ;4d96 dd e5 . . pop hl ;4d98 e1 . ld de,00040h ;4d99 11 40 00 . @ . or a ;4d9c b7 . sbc hl,de ;4d9d ed 52 . R push hl ;4d9f e5 . pop ix ;4da0 dd e1 . . pop de ;4da2 d1 . ret ;4da3 c9 . sub_4da4h: push bc ;4da4 c5 . push de ;4da5 d5 . push hl ;4da6 e5 . push bc ;4da7 c5 . ld hl,0f781h ;4da8 21 81 f7 ! . . ld de,0f782h ;4dab 11 82 f7 . . . ld bc,l0006h+1 ;4dae 01 07 00 . . . ld (hl),020h ;4db1 36 20 6 ldir ;4db3 ed b0 . . ; Fill with spaces pop bc ;4db5 c1 . bit 0,b ;4db6 cb 40 . @ jr nz,l4dbch ;4db8 20 02 . ld (hl),02fh ;4dba 36 2f 6 / l4dbch: ld de,0f781h ;4dbc 11 81 f7 . . . ld a,(ix+000h) ;4dbf dd 7e 00 . ~ . and a ;4dc2 a7 . jr z,l4df4h ;4dc3 28 2f ( / cp 008h ;4dc5 fe 08 . . jr c,l4dcbh ;4dc7 38 02 8 . ld a,007h ;4dc9 3e 07 > . l4dcbh: bit 0,b ;4dcb cb 40 . @ jr nz,l4ddbh ;4dcd 20 0c . push af ;4dcf f5 . ld b,a ;4dd0 47 G ld a,007h ;4dd1 3e 07 > . sub b ;4dd3 90 . jr z,l4ddah ;4dd4 28 04 ( . ld b,a ;4dd6 47 G l4dd7h: inc de ;4dd7 13 . djnz l4dd7h ;4dd8 10 fd . . l4ddah: pop af ;4dda f1 . l4ddbh: ld b,a ;4ddb 47 G push ix ;4ddc dd e5 . . pop hl ;4dde e1 . l4ddfh: inc hl ;4ddf 23 # ld a,(hl) ;4de0 7e ~ cp 00dh ;4de1 fe 0d . . jr nz,l4de9h ;4de3 20 04 . ld a,0e1h ;4de5 3e e1 > . jr l4defh ;4de7 18 06 . . l4de9h: cp 020h ;4de9 fe 20 . jr nc,l4defh ;4deb 30 02 0 . ld a,020h ;4ded 3e 20 > l4defh: ld (de),a ;4def 12 . inc de ;4df0 13 . dec b ;4df1 05 . jr nz,l4ddfh ;4df2 20 eb . l4df4h: pop hl ;4df4 e1 . pop de ;4df5 d1 . pop bc ;4df6 c1 . ret ;4df7 c9 . sub_4df8h: ld d,007h ;4df8 16 07 . . ld hl,0f748h ;4dfa 21 48 f7 ! H . ld a,(0f73bh) ;4dfd 3a 3b f7 : ; . cp 001h ;4e00 fe 01 . . jr z,l4e19h ;4e02 28 15 ( . and a ;4e04 a7 . jr nz,l4e09h ;4e05 20 02 . ld d,00fh ;4e07 16 0f . . l4e09h: ld (hl),001h ;4e09 36 01 6 . inc hl ;4e0b 23 # ld (hl),020h ;4e0c 36 20 6 inc hl ;4e0e 23 # ld (hl),d ;4e0f 72 r inc hl ;4e10 23 # ld (hl),001h ;4e11 36 01 6 . l4e13h: ld c,01ah ;4e13 0e 1a . . call l4cc9h ;4e15 cd c9 4c . . L ret ;4e18 c9 . l4e19h: ld (hl),000h ;4e19 36 00 6 . inc hl ;4e1b 23 # ld (hl),000h ;4e1c 36 00 6 . inc hl ;4e1e 23 # ld (hl),038h ;4e1f 36 38 6 8 inc hl ;4e21 23 # ld (hl),008h ;4e22 36 08 6 . jr l4e13h ;4e24 18 ed . . sub_4e26h: ld ix,(0f705h) ;4e26 dd 2a 05 f7 . * . . ld a,(ix+002h) ;4e2a dd 7e 02 . ~ . and a ;4e2d a7 . ret nz ;4e2e c0 . call sub_4eb6h ;4e2f cd b6 4e . . N bit 0,a ;4e32 cb 47 . G ret z ;4e34 c8 . ld b,a ;4e35 47 G ld a,(0f73bh) ;4e36 3a 3b f7 : ; . cp 001h ;4e39 fe 01 . . jp z,l4e58h ;4e3b ca 58 4e . X N ld a,b ;4e3e 78 x call sub_5034h ;4e3f cd 34 50 . 4 P sub_4e42h: ld a,(0f710h) ;4e42 3a 10 f7 : . . dec a ;4e45 3d = ld (0f748h),a ;4e46 32 48 f7 2 H . ld a,(0f711h) ;4e49 3a 11 f7 : . . dec a ;4e4c 3d = ld (0f749h),a ;4e4d 32 49 f7 2 I . ld c,018h ;4e50 0e 18 . . ld hl,l0000h+2 ;4e52 21 02 00 ! . . jp sub_4ccch ;4e55 c3 cc 4c . . L l4e58h: ld c,002h ;4e58 0e 02 . . jr l4e5eh ;4e5a 18 02 . . sub_4e5ch: ld c,001h ;4e5c 0e 01 . . l4e5eh: push bc ;4e5e c5 . ld de,0f748h ;4e5f 11 48 f7 . H . ld hl,0f713h ;4e62 21 13 f7 ! . . ld bc,l0006h+2 ;4e65 01 08 00 . . . ldir ;4e68 ed b0 . . ld a,0ffh ;4e6a 3e ff > . ld (de),a ;4e6c 12 . inc de ;4e6d 13 . ld (de),a ;4e6e 12 . pop bc ;4e6f c1 . inc de ;4e70 13 . ld a,c ;4e71 79 y ld (de),a ;4e72 12 . ld c,029h ;4e73 0e 29 . ) ld hl,l0009h+2 ;4e75 21 0b 00 ! . . jp sub_4ccch ;4e78 c3 cc 4c . . L sub_4e7bh: ld a,(0f73bh) ;4e7b 3a 3b f7 : ; . cp 001h ;4e7e fe 01 . . ret nz ;4e80 c0 . push bc ;4e81 c5 . push hl ;4e82 e5 . call sub_4eb6h ;4e83 cd b6 4e . . N bit 0,a ;4e86 cb 47 . G call nz,sub_4e5ch ;4e88 c4 5c 4e . \ N pop hl ;4e8b e1 . pop bc ;4e8c c1 . ret ;4e8d c9 . sub_4e8eh: ld a,(0f73bh) ;4e8e 3a 3b f7 : ; . cp 001h ;4e91 fe 01 . . ret nz ;4e93 c0 . call sub_4eb6h ;4e94 cd b6 4e . . N bit 0,a ;4e97 cb 47 . G call nz,l4e58h ;4e99 c4 58 4e . X N ret ;4e9c c9 . sub_4e9dh: push hl ;4e9d e5 . push bc ;4e9e c5 . ld a,(0f73bh) ;4e9f 3a 3b f7 : ; . cp 001h ;4ea2 fe 01 . . jr z,l4eb0h ;4ea4 28 0a ( . call sub_4eb6h ;4ea6 cd b6 4e . . N res 0,a ;4ea9 cb 87 . . call sub_5034h ;4eab cd 34 50 . 4 P jr l4eb3h ;4eae 18 03 . . l4eb0h: call sub_4e5ch ;4eb0 cd 5c 4e . \ N l4eb3h: pop bc ;4eb3 c1 . pop hl ;4eb4 e1 . ret ;4eb5 c9 . sub_4eb6h: ld a,(0f73bh) ;4eb6 3a 3b f7 : ; . ld hl,0f2d7h ;4eb9 21 d7 f2 ! . . cp 002h ;4ebc fe 02 . . jr nz,l4ec3h ;4ebe 20 03 . ld hl,0f2d6h ;4ec0 21 d6 f2 ! . . l4ec3h: ld a,(hl) ;4ec3 7e ~ ret ;4ec4 c9 . call sub_4cddh ;4ec5 cd dd 4c . . L call sub_4cb1h ;4ec8 cd b1 4c . . L ld a,(iy+000h) ;4ecb fd 7e 00 . ~ . dec a ;4ece 3d = and a ;4ecf a7 . jr z,l4ed7h ;4ed0 28 05 ( . ld (iy+000h),a ;4ed2 fd 77 00 . w . jr l4ef7h ;4ed5 18 20 . l4ed7h: ld a,(iy+001h) ;4ed7 fd 7e 01 . ~ . cp 001h ;4eda fe 01 . . jr z,l4ef7h ;4edc 28 19 ( . ld b,(ix+004h) ;4ede dd 46 04 . F . ld (iy+000h),b ;4ee1 fd 70 00 . p . jr l4ef3h ;4ee4 18 0d . . l4ee6h: call sub_4cddh ;4ee6 cd dd 4c . . L call sub_4cb1h ;4ee9 cd b1 4c . . L ld a,(iy+001h) ;4eec fd 7e 01 . ~ . cp 001h ;4eef fe 01 . . jr z,l4ef7h ;4ef1 28 04 ( . l4ef3h: dec a ;4ef3 3d = ld (iy+001h),a ;4ef4 fd 77 01 . w . l4ef7h: call sub_4f94h ;4ef7 cd 94 4f . . O jr z,l4f1fh ;4efa 28 23 ( # ld a,(0f2d4h) ;4efc 3a d4 f2 : . . and a ;4eff a7 . jr nz,l4f1fh ;4f00 20 1d . ld a,(iy+001h) ;4f02 fd 7e 01 . ~ . l4f05h: call sub_4cbah ;4f05 cd ba 4c . . L ld d,a ;4f08 57 W ld b,(iy+005h) ;4f09 fd 46 05 . F . ld c,(ix+005h) ;4f0c dd 4e 05 . N . add a,b ;4f0f 80 . dec a ;4f10 3d = dec a ;4f11 3d = cp c ;4f12 b9 . ld a,d ;4f13 7a z jr c,l4f19h ;4f14 38 03 8 . ld a,c ;4f16 79 y sub b ;4f17 90 . inc a ;4f18 3c < l4f19h: call sub_5315h ;4f19 cd 15 53 . . S l4f1ch: jp l4ce3h ;4f1c c3 e3 4c . . L l4f1fh: jp l4ce6h ;4f1f c3 e6 4c . . L l4f22h: call sub_4cddh ;4f22 cd dd 4c . . L call sub_4cb1h ;4f25 cd b1 4c . . L ld b,(iy+000h) ;4f28 fd 46 00 . F . inc b ;4f2b 04 . ld a,(ix+004h) ;4f2c dd 7e 04 . ~ . cp b ;4f2f b8 . jr c,l4f37h ;4f30 38 05 8 . ld (iy+000h),b ;4f32 fd 70 00 . p . jr l4f6ch ;4f35 18 35 . 5 l4f37h: ld a,(0f70fh) ;4f37 3a 0f f7 : . . and a ;4f3a a7 . jr z,l4f42h ;4f3b 28 05 ( . ld hl,(0f707h) ;4f3d 2a 07 f7 * . . ld (hl),001h ;4f40 36 01 6 . l4f42h: call sub_4f89h ;4f42 cd 89 4f . . O jr nz,l4f54h ;4f45 20 0d . ld a,(0f70fh) ;4f47 3a 0f f7 : . . and a ;4f4a a7 . jr z,l4f6ch ;4f4b 28 1f ( . ld (iy+000h),001h ;4f4d fd 36 00 01 . 6 . . jp l505eh ;4f51 c3 5e 50 . ^ P l4f54h: ld (iy+000h),001h ;4f54 fd 36 00 01 . 6 . . jr l4f65h ;4f58 18 0b . . call sub_4cddh ;4f5a cd dd 4c . . L call sub_4f89h ;4f5d cd 89 4f . . O jr z,l4f6ch ;4f60 28 0a ( . l4f62h: call sub_4cabh ;4f62 cd ab 4c . . L l4f65h: ld c,(iy+001h) ;4f65 fd 4e 01 . N . inc c ;4f68 0c . ld (iy+001h),c ;4f69 fd 71 01 . q . l4f6ch: call sub_4f94h ;4f6c cd 94 4f . . O jr z,l4f1fh ;4f6f 28 ae ( . ld a,(0f2d4h) ;4f71 3a d4 f2 : . . and a ;4f74 a7 . jr nz,l4f1fh ;4f75 20 a8 . ld a,(iy+001h) ;4f77 fd 7e 01 . ~ . call sub_4cbah ;4f7a cd ba 4c . . L ld b,(iy+005h) ;4f7d fd 46 05 . F . cp b ;4f80 b8 . jr nc,l4f84h ;4f81 30 01 0 . ld a,b ;4f83 78 x l4f84h: call sub_533dh ;4f84 cd 3d 53 . = S jr l4f1ch ;4f87 18 93 . . sub_4f89h: call sub_4cabh ;4f89 cd ab 4c . . L ld a,(ix+005h) ;4f8c dd 7e 05 . ~ . ld b,(iy+001h) ;4f8f fd 46 01 . F . sub b ;4f92 90 . ret ;4f93 c9 . sub_4f94h: call sub_53c1h ;4f94 cd c1 53 . . S ld a,(iy+002h) ;4f97 fd 7e 02 . ~ . and a ;4f9a a7 . ret ;4f9b c9 . call sub_4cddh ;4f9c cd dd 4c . . L call sub_4cb1h ;4f9f cd b1 4c . . L ld a,(iy+000h) ;4fa2 fd 7e 00 . ~ . dec a ;4fa5 3d = and 0f8h ;4fa6 e6 f8 . . add a,008h ;4fa8 c6 08 . . inc a ;4faa 3c < ld b,(ix+004h) ;4fab dd 46 04 . F . cp b ;4fae b8 . jr nc,l4fb7h ;4faf 30 06 0 . ld (iy+000h),a ;4fb1 fd 77 00 . w . jp l4ef7h ;4fb4 c3 f7 4e . . N l4fb7h: ld (iy+000h),001h ;4fb7 fd 36 00 01 . 6 . . call sub_4f89h ;4fbb cd 89 4f . . O jp z,l5055h ;4fbe ca 55 50 . U P inc b ;4fc1 04 . ld (iy+001h),b ;4fc2 fd 70 01 . p . jr l4f6ch ;4fc5 18 a5 . . call sub_4c71h ;4fc7 cd 71 4c . q L cp 004h ;4fca fe 04 . . ret c ;4fcc d8 . call sub_4cddh ;4fcd cd dd 4c . . L ld hl,(0f70dh) ;4fd0 2a 0d f7 * . . ld a,(hl) ;4fd3 7e ~ sub 020h ;4fd4 d6 20 . inc a ;4fd6 3c < jr c,l5031h ;4fd7 38 58 8 X call sub_4cabh ;4fd9 cd ab 4c . . L ld b,(ix+005h) ;4fdc dd 46 05 . F . inc b ;4fdf 04 . cp b ;4fe0 b8 . jr nc,l5031h ;4fe1 30 4e 0 N ld d,a ;4fe3 57 W inc hl ;4fe4 23 # ld a,(hl) ;4fe5 7e ~ sub 020h ;4fe6 d6 20 . inc a ;4fe8 3c < jr c,l5031h ;4fe9 38 46 8 F ld b,(ix+004h) ;4feb dd 46 04 . F . inc b ;4fee 04 . cp b ;4fef b8 . jr nc,l5031h ;4ff0 30 3f 0 ? ld (iy+000h),a ;4ff2 fd 77 00 . w . ld (iy+001h),d ;4ff5 fd 72 01 . r . call sub_4f94h ;4ff8 cd 94 4f . . O jr z,l5031h ;4ffb 28 34 ( 4 ld a,(0f2d4h) ;4ffd 3a d4 f2 : . . and a ;5000 a7 . l5001h: jr nz,l5031h ;5001 20 2e . jp l54dch ;5003 c3 dc 54 . . T l5006h: ld a,(0f73bh) ;5006 3a 3b f7 : ; . l5009h: cp 001h ;5009 fe 01 . . jr z,l5031h ;500b 28 24 ( $ ld a,c ;500d 79 y and a ;500e a7 . jr nz,l5015h ;500f 20 04 . ld c,006h ;5011 0e 06 . . jr l5027h ;5013 18 12 . . l5015h: cp 001h ;5015 fe 01 . . jr nz,l501dh ;5017 20 04 . ld c,004h ;5019 0e 04 . . jr l5027h ;501b 18 0a . . l501dh: cp 002h ;501d fe 02 . . jr nz,l5025h ;501f 20 04 . ld c,002h ;5021 0e 02 . . jr l5027h ;5023 18 02 . . l5025h: ld c,000h ;5025 0e 00 . . l5027h: call sub_4eb6h ;5027 cd b6 4e . . N and 001h ;502a e6 01 . . or c ;502c b1 . ld (hl),a ;502d 77 w call sub_5034h ;502e cd 34 50 . 4 P l5031h: jp l4ce3h ;5031 c3 e3 4c . . L sub_5034h: push af ;5034 f5 . ld c,016h ;5035 0e 16 . . call sub_4488h ;5037 cd 88 44 . . D pop af ;503a f1 . ld c,a ;503b 4f O call sub_44ach ;503c cd ac 44 . . D jp sub_44b2h ;503f c3 b2 44 . . D call sub_4cb1h ;5042 cd b1 4c . . L ld a,001h ;5045 3e 01 > . ld (iy+000h),a ;5047 fd 77 00 . w . ld hl,(0f707h) ;504a 2a 07 f7 * . . ld a,(hl) ;504d 7e ~ and a ;504e a7 . jp z,l4ef7h ;504f ca f7 4e . . N jp l4ee6h ;5052 c3 e6 4e . . N l5055h: call sub_4cddh ;5055 cd dd 4c . . L call sub_4f89h ;5058 cd 89 4f . . O jp nz,l4f62h ;505b c2 62 4f . b O l505eh: ld a,(0f73bh) ;505e 3a 3b f7 : ; . cp 001h ;5061 fe 01 . . jr z,l50a7h ;5063 28 42 ( B call sub_4cbah ;5065 cd ba 4c . . L ld b,(ix+001h) ;5068 dd 46 01 . F . dec b ;506b 05 . ld a,(0f73bh) ;506c 3a 3b f7 : ; . and a ;506f a7 . ld a,b ;5070 78 x jr nz,l5075h ;5071 20 02 . add a,010h ;5073 c6 10 . . l5075h: ld (0f74dh),a ;5075 32 4d f7 2 M . inc a ;5078 3c < ld (0f749h),a ;5079 32 49 f7 2 I . ld a,(iy+000h) ;507c fd 7e 00 . ~ . ld b,(ix+000h) ;507f dd 46 00 . F . dec b ;5082 05 . add a,b ;5083 80 . dec a ;5084 3d = ld (0f748h),a ;5085 32 48 f7 2 H . ld (0f74ch),a ;5088 32 4c f7 2 L . ld a,(ix+004h) ;508b dd 7e 04 . ~ . ld (0f74ah),a ;508e 32 4a f7 2 J . ld a,(ix+005h) ;5091 dd 7e 05 . ~ . dec a ;5094 3d = ld (0f74bh),a ;5095 32 4b f7 2 K . call sub_53b9h ;5098 cd b9 53 . . S call sub_50d2h ;509b cd d2 50 . . P ld a,(0f73bh) ;509e 3a 3b f7 : ; . and a ;50a1 a7 . call z,sub_535eh ;50a2 cc 5e 53 . ^ S jr l50adh ;50a5 18 06 . . l50a7h: call sub_50b0h ;50a7 cd b0 50 . . P call sub_50d2h ;50aa cd d2 50 . . P l50adh: jp l4ce3h ;50ad c3 e3 4c . . L sub_50b0h: xor a ;50b0 af . ld (0f748h),a ;50b1 32 48 f7 2 H . ld (0f74ch),a ;50b4 32 4c f7 2 L . ld (0f74dh),a ;50b7 32 4d f7 2 M . ld a,008h ;50ba 3e 08 > . ld (0f749h),a ;50bc 32 49 f7 2 I . ld a,03ch ;50bf 3e 3c > < ld (0f74ah),a ;50c1 32 4a f7 2 J . ld a,(0f2d0h) ;50c4 3a d0 f2 : . . dec a ;50c7 3d = call sub_4d05h ;50c8 cd 05 4d . . M ld a,l ;50cb 7d } ld (0f74bh),a ;50cc 32 4b f7 2 K . jp l50f0h ;50cf c3 f0 50 . . P sub_50d2h: call sub_50d8h ;50d2 cd d8 50 . . P sub_50d5h: jp l5575h ;50d5 c3 75 55 . u U sub_50d8h: ld a,001h ;50d8 3e 01 > . ld (0f73fh),a ;50da 32 3f f7 2 ? . ld a,(ix+003h) ;50dd dd 7e 03 . ~ . ld (0f73dh),a ;50e0 32 3d f7 2 = . ld a,(ix+000h) ;50e3 dd 7e 00 . ~ . ld (0f73ch),a ;50e6 32 3c f7 2 < . ld a,(ix+004h) ;50e9 dd 7e 04 . ~ . ld (0f73eh),a ;50ec 32 3e f7 2 > . ret ;50ef c9 . l50f0h: ld c,026h ;50f0 0e 26 . & ld hl,l0006h ;50f2 21 06 00 ! . . jp sub_4ccch ;50f5 c3 cc 4c . . L call sub_4eb6h ;50f8 cd b6 4e . . N set 0,(hl) ;50fb cb c6 . . call sub_4e26h ;50fd cd 26 4e . & N jr l510ah ;5100 18 08 . . call sub_4eb6h ;5102 cd b6 4e . . N res 0,(hl) ;5105 cb 86 . . call sub_4e9dh ;5107 cd 9d 4e . . N l510ah: jp l4ce6h ;510a c3 e6 4c . . L call sub_513dh ;510d cd 3d 51 . = Q jr l5133h ;5110 18 21 . ! call sub_513dh ;5112 cd 3d 51 . = Q call sub_4f89h ;5115 cd 89 4f . . O jr z,l5133h ;5118 28 19 ( . ld (0f73fh),a ;511a 32 3f f7 2 ? . ld a,(ix+001h) ;511d dd 7e 01 . ~ . add a,b ;5120 80 . ld (0f73dh),a ;5121 32 3d f7 2 = . ld a,(ix+000h) ;5124 dd 7e 00 . ~ . ld (0f73ch),a ;5127 32 3c f7 2 < . ld a,(ix+004h) ;512a dd 7e 04 . ~ . ld (0f73eh),a ;512d 32 3e f7 2 > . call l5575h ;5130 cd 75 55 . u U l5133h: ld a,(0f73bh) ;5133 3a 3b f7 : ; . and a ;5136 a7 . call z,sub_535eh ;5137 cc 5e 53 . ^ S jp l4ce6h ;513a c3 e6 4c . . L sub_513dh: call sub_548fh ;513d cd 8f 54 . . T ld a,(0f73bh) ;5140 3a 3b f7 : ; . cp 001h ;5143 fe 01 . . jp z,l553bh ;5145 ca 3b 55 . ; U jp l5516h ;5148 c3 16 55 . . U call sub_4cabh ;514b cd ab 4c . . L ld a,(ix+001h) ;514e dd 7e 01 . ~ . ld (0f73dh),a ;5151 32 3d f7 2 = . ld a,(ix+000h) ;5154 dd 7e 00 . ~ . ld (0f73ch),a ;5157 32 3c f7 2 < . ld a,(ix+005h) ;515a dd 7e 05 . ~ . ld (0f73fh),a ;515d 32 3f f7 2 ? . ld a,(ix+004h) ;5160 dd 7e 04 . ~ . ld (0f73eh),a ;5163 32 3e f7 2 > . call l5575h ;5166 cd 75 55 . u U ld a,(0f73bh) ;5169 3a 3b f7 : ; . and a ;516c a7 . jr nz,l5176h ;516d 20 07 . ld a,(0f2d4h) ;516f 3a d4 f2 : . . and a ;5172 a7 . call nz,sub_535eh ;5173 c4 5e 53 . ^ S l5176h: call sub_4cddh ;5176 cd dd 4c . . L call sub_4cb1h ;5179 cd b1 4c . . L ld (iy+001h),001h ;517c fd 36 01 01 . 6 . . ld (iy+000h),001h ;5180 fd 36 00 01 . 6 . . ld a,(0f73bh) ;5184 3a 3b f7 : ; . and a ;5187 a7 . jr nz,l5195h ;5188 20 0b . ld a,(0f2d4h) ;518a 3a d4 f2 : . . and a ;518d a7 . jr nz,l5195h ;518e 20 05 . ld a,001h ;5190 3e 01 > . call sub_5315h ;5192 cd 15 53 . . S l5195h: jp l4ce3h ;5195 c3 e3 4c . . L call sub_519dh ;5198 cd 9d 51 . . Q jr l51e1h ;519b 18 44 . D sub_519dh: ld a,(0f73bh) ;519d 3a 3b f7 : ; . and a ;51a0 a7 . ret nz ;51a1 c0 . call sub_4cbah ;51a2 cd ba 4c . . L ld a,(iy+005h) ;51a5 fd 7e 05 . ~ . call sub_5307h ;51a8 cd 07 53 . . S jp sub_53c1h ;51ab c3 c1 53 . . S call sub_51b3h ;51ae cd b3 51 . . Q jr l51e1h ;51b1 18 2e . . sub_51b3h: ld a,(0f73bh) ;51b3 3a 3b f7 : ; . and a ;51b6 a7 . ret nz ;51b7 c0 . call sub_4cbah ;51b8 cd ba 4c . . L ld a,(iy+005h) ;51bb fd 7e 05 . ~ . call sub_5326h ;51be cd 26 53 . & S jp sub_53c1h ;51c1 c3 c1 53 . . S ld a,(0f73bh) ;51c4 3a 3b f7 : ; . and a ;51c7 a7 . jr nz,l51e1h ;51c8 20 17 . ld a,(0f2d3h) ;51ca 3a d3 f2 : . . call sub_5307h ;51cd cd 07 53 . . S jr l51deh ;51d0 18 0c . . ld a,(0f73bh) ;51d2 3a 3b f7 : ; . and a ;51d5 a7 . jr nz,l51e1h ;51d6 20 09 . ld a,(0f2d3h) ;51d8 3a d3 f2 : . . call sub_5326h ;51db cd 26 53 . & S l51deh: jp l4ce3h ;51de c3 e3 4c . . L l51e1h: jp l4ce6h ;51e1 c3 e6 4c . . L call sub_51e9h ;51e4 cd e9 51 . . Q jr l51e1h ;51e7 18 f8 . . sub_51e9h: ld a,(0f73bh) ;51e9 3a 3b f7 : ; . and a ;51ec a7 . ret nz ;51ed c0 . ld a,001h ;51ee 3e 01 > . call sub_5315h ;51f0 cd 15 53 . . S jp sub_53c1h ;51f3 c3 c1 53 . . S call sub_51fbh ;51f6 cd fb 51 . . Q jr l51e1h ;51f9 18 e6 . . sub_51fbh: ld a,(0f73bh) ;51fb 3a 3b f7 : ; . and a ;51fe a7 . ret nz ;51ff c0 . call sub_4cbah ;5200 cd ba 4c . . L ld a,(ix+005h) ;5203 dd 7e 05 . ~ . call sub_533dh ;5206 cd 3d 53 . = S jp sub_53c1h ;5209 c3 c1 53 . . S call sub_4c71h ;520c cd 71 4c . q L cp 004h ;520f fe 04 . . ret c ;5211 d8 . ld a,(0f73bh) ;5212 3a 3b f7 : ; . cp 002h ;5215 fe 02 . . jr z,l5251h ;5217 28 38 ( 8 call sub_527eh ;5219 cd 7e 52 . ~ R jr c,l5251h ;521c 38 33 8 3 ld a,e ;521e 7b { cp 001h ;521f fe 01 . . jr z,l523ah ;5221 28 17 ( . dec e ;5223 1d . ld a,(0f73bh) ;5224 3a 3b f7 : ; . and a ;5227 a7 . jr nz,l5233h ;5228 20 09 . push bc ;522a c5 . push de ;522b d5 . call sub_529ch ;522c cd 9c 52 . . R pop de ;522f d1 . pop bc ;5230 c1 . jr l523ah ;5231 18 07 . . l5233h: push bc ;5233 c5 . push de ;5234 d5 . call sub_52d1h ;5235 cd d1 52 . . R pop de ;5238 d1 . pop bc ;5239 c1 . l523ah: call sub_4cabh ;523a cd ab 4c . . L call sub_50d8h ;523d cd d8 50 . . P ld a,(ix+001h) ;5240 dd 7e 01 . ~ . add a,b ;5243 80 . ld (0f73dh),a ;5244 32 3d f7 2 = . call l5575h ;5247 cd 75 55 . u U ld a,(0f73bh) ;524a 3a 3b f7 : ; . and a ;524d a7 . call z,sub_535eh ;524e cc 5e 53 . ^ S l5251h: jp l4ce3h ;5251 c3 e3 4c . . L call sub_4c71h ;5254 cd 71 4c . q L cp 004h ;5257 fe 04 . . ret c ;5259 d8 . call sub_527eh ;525a cd 7e 52 . ~ R jr c,l5251h ;525d 38 f2 8 . ld a,e ;525f 7b { cp 001h ;5260 fe 01 . . jr z,l523ah ;5262 28 d6 ( . dec e ;5264 1d . ld a,(0f73bh) ;5265 3a 3b f7 : ; . and a ;5268 a7 . jr nz,l5274h ;5269 20 09 . push bc ;526b c5 . push de ;526c d5 . call sub_52a3h ;526d cd a3 52 . . R pop de ;5270 d1 . pop bc ;5271 c1 . jr l527bh ;5272 18 07 . . l5274h: push bc ;5274 c5 . push de ;5275 d5 . call sub_52d9h ;5276 cd d9 52 . . R pop de ;5279 d1 . pop bc ;527a c1 . l527bh: ld b,d ;527b 42 B jr l523ah ;527c 18 bc . . sub_527eh: call sub_4cabh ;527e cd ab 4c . . L ld hl,(0f70dh) ;5281 2a 0d f7 * . . ld a,(hl) ;5284 7e ~ ld b,(ix+005h) ;5285 dd 46 05 . F . cp b ;5288 b8 . jr nc,l529ah ;5289 30 0f 0 . ld d,a ;528b 57 W inc hl ;528c 23 # ld a,(hl) ;528d 7e ~ and a ;528e a7 . jr z,l529ah ;528f 28 09 ( . ld e,a ;5291 5f _ add a,d ;5292 82 . dec a ;5293 3d = cp b ;5294 b8 . jr nc,l529ah ;5295 30 03 0 . ld b,a ;5297 47 G or a ;5298 b7 . ret ;5299 c9 . l529ah: scf ;529a 37 7 ret ;529b c9 . sub_529ch: inc d ;529c 14 . call sub_52b0h ;529d cd b0 52 . . R dec d ;52a0 15 . jr l52a7h ;52a1 18 04 . . sub_52a3h: call sub_52b0h ;52a3 cd b0 52 . . R inc d ;52a6 14 . l52a7h: ld (hl),d ;52a7 72 r push bc ;52a8 c5 . push de ;52a9 d5 . call sub_53b9h ;52aa cd b9 53 . . S pop de ;52ad d1 . pop bc ;52ae c1 . ret ;52af c9 . sub_52b0h: ld hl,0f748h ;52b0 21 48 f7 ! H . ld ix,(0f701h) ;52b3 dd 2a 01 f7 . * . . ld a,(ix+000h) ;52b7 dd 7e 00 . ~ . dec a ;52ba 3d = ld (hl),a ;52bb 77 w ld c,a ;52bc 4f O inc hl ;52bd 23 # ld a,(ix+001h) ;52be dd 7e 01 . ~ . add a,00fh ;52c1 c6 0f . . add a,d ;52c3 82 . ld (hl),a ;52c4 77 w inc hl ;52c5 23 # ld d,a ;52c6 57 W ld a,(ix+004h) ;52c7 dd 7e 04 . ~ . ld (hl),a ;52ca 77 w inc hl ;52cb 23 # ld (hl),e ;52cc 73 s inc hl ;52cd 23 # ld (hl),c ;52ce 71 q inc hl ;52cf 23 # ret ;52d0 c9 . sub_52d1h: inc d ;52d1 14 . call sub_52e7h ;52d2 cd e7 52 . . R sub 008h ;52d5 d6 08 . . jr l52deh ;52d7 18 05 . . sub_52d9h: call sub_52e7h ;52d9 cd e7 52 . . R add a,008h ;52dc c6 08 . . l52deh: push bc ;52de c5 . push de ;52df d5 . ld (hl),a ;52e0 77 w call l50f0h ;52e1 cd f0 50 . . P pop de ;52e4 d1 . pop bc ;52e5 c1 . ret ;52e6 c9 . sub_52e7h: ld hl,0f748h ;52e7 21 48 f7 ! H . ld (hl),000h ;52ea 36 00 6 . inc hl ;52ec 23 # ld a,d ;52ed 7a z push hl ;52ee e5 . call sub_4d05h ;52ef cd 05 4d . . M ld d,l ;52f2 55 U pop hl ;52f3 e1 . ld (hl),d ;52f4 72 r inc hl ;52f5 23 # ld (hl),03ch ;52f6 36 3c 6 < inc hl ;52f8 23 # ld a,e ;52f9 7b { push hl ;52fa e5 . call sub_4d05h ;52fb cd 05 4d . . M ld a,l ;52fe 7d } pop hl ;52ff e1 . ld (hl),a ;5300 77 w inc hl ;5301 23 # ld (hl),000h ;5302 36 00 6 . inc hl ;5304 23 # ld a,d ;5305 7a z ret ;5306 c9 . sub_5307h: ld d,a ;5307 57 W call sub_4cbah ;5308 cd ba 4c . . L ld a,(iy+001h) ;530b fd 7e 01 . ~ . sub d ;530e 92 . jr z,l5313h ;530f 28 02 ( . jr nc,sub_5315h ;5311 30 02 0 . l5313h: ld a,001h ;5313 3e 01 > . sub_5315h: call sub_4cbah ;5315 cd ba 4c . . L ld (iy+001h),a ;5318 fd 77 01 . w . ld c,(iy+005h) ;531b fd 4e 05 . N . add a,c ;531e 81 . dec a ;531f 3d = ld (iy+003h),a ;5320 fd 77 03 . w . jp sub_535eh ;5323 c3 5e 53 . ^ S sub_5326h: ld d,a ;5326 57 W call sub_4cbah ;5327 cd ba 4c . . L ld b,(iy+003h) ;532a fd 46 03 . F . ld a,(ix+005h) ;532d dd 7e 05 . ~ . ld c,a ;5330 4f O inc a ;5331 3c < sub b ;5332 90 . sub d ;5333 92 . jr z,l5338h ;5334 28 02 ( . jr nc,l533bh ;5336 30 03 0 . l5338h: ld a,c ;5338 79 y jr sub_533dh ;5339 18 02 . . l533bh: ld a,b ;533b 78 x add a,d ;533c 82 . sub_533dh: call sub_4cbah ;533d cd ba 4c . . L ld (iy+003h),a ;5340 fd 77 03 . w . ld c,(iy+005h) ;5343 fd 4e 05 . N . sub c ;5346 91 . inc a ;5347 3c < ld (iy+001h),a ;5348 fd 77 01 . w . jp sub_535eh ;534b c3 5e 53 . ^ S ld a,001h ;534e 3e 01 > . call sub_5307h ;5350 cd 07 53 . . S jp sub_53c1h ;5353 c3 c1 53 . . S ld a,001h ;5356 3e 01 > . call sub_5326h ;5358 cd 26 53 . & S jp sub_53c1h ;535b c3 c1 53 . . S sub_535eh: call sub_4cbah ;535e cd ba 4c . . L ld a,(iy+001h) ;5361 fd 7e 01 . ~ . ld b,(ix+001h) ;5364 dd 46 01 . F . dec b ;5367 05 . add a,b ;5368 80 . add a,00fh ;5369 c6 0f . . ld (0f749h),a ;536b 32 49 f7 2 I . ld a,(iy+000h) ;536e fd 7e 00 . ~ . ld b,(ix+000h) ;5371 dd 46 00 . F . dec b ;5374 05 . add a,b ;5375 80 . dec a ;5376 3d = ld (0f748h),a ;5377 32 48 f7 2 H . ld (0f74ch),a ;537a 32 4c f7 2 L . ld a,(iy+004h) ;537d fd 7e 04 . ~ . ld (0f74ah),a ;5380 32 4a f7 2 J . ld e,(iy+005h) ;5383 fd 5e 05 . ^ . ld a,(0f2c9h) ;5386 3a c9 f2 : . . ld d,a ;5389 57 W cp 001h ;538a fe 01 . . jr nz,l539ah ;538c 20 0c . srl e ;538e cb 3b . ; ld a,(0f2cah) ;5390 3a ca f2 : . . and a ;5393 a7 . jr z,l539ah ;5394 28 04 ( . xor a ;5396 af . ld (0f74ch),a ;5397 32 4c f7 2 L . l539ah: ld a,e ;539a 7b { ld (0f74bh),a ;539b 32 4b f7 2 K . ld a,008h ;539e 3e 08 > . ld (0f74dh),a ;53a0 32 4d f7 2 M . call sub_53b9h ;53a3 cd b9 53 . . S ld a,d ;53a6 7a z cp 001h ;53a7 fe 01 . . ret nz ;53a9 c0 . ld a,(0f749h) ;53aa 3a 49 f7 : I . add a,e ;53ad 83 . ld (0f749h),a ;53ae 32 49 f7 2 I . ld a,029h ;53b1 3e 29 > ) ld (0f74ch),a ;53b3 32 4c f7 2 L . jp sub_53b9h ;53b6 c3 b9 53 . . S sub_53b9h: ld hl,l0006h ;53b9 21 06 00 ! . . ld c,036h ;53bc 0e 36 . 6 jp sub_4ccch ;53be c3 cc 4c . . L sub_53c1h: call sub_4cabh ;53c1 cd ab 4c . . L ld a,(iy+000h) ;53c4 fd 7e 00 . ~ . ld b,(ix+000h) ;53c7 dd 46 00 . F . add a,b ;53ca 80 . dec a ;53cb 3d = ld (0f739h),a ;53cc 32 39 f7 2 9 . ld (0f710h),a ;53cf 32 10 f7 2 . . ld a,(iy+001h) ;53d2 fd 7e 01 . ~ . ld b,(ix+001h) ;53d5 dd 46 01 . F . add a,b ;53d8 80 . dec a ;53d9 3d = ld b,a ;53da 47 G ld a,(0f700h) ;53db 3a 00 f7 : . . add a,b ;53de 80 . ld (0f73ah),a ;53df 32 3a f7 2 : . ld (0f711h),a ;53e2 32 11 f7 2 . . ld b,a ;53e5 47 G ld a,(0f73bh) ;53e6 3a 3b f7 : ; . and a ;53e9 a7 . jr nz,l5430h ;53ea 20 44 D ld a,008h ;53ec 3e 08 > . add a,b ;53ee 80 . ld (0f73ah),a ;53ef 32 3a f7 2 : . call sub_4cb1h ;53f2 cd b1 4c . . L ld b,(ix+001h) ;53f5 dd 46 01 . F . ld a,(iy+001h) ;53f8 fd 7e 01 . ~ . sub b ;53fb 90 . jr c,l5439h ;53fc 38 3b 8 ; inc a ;53fe 3c < ld b,a ;53ff 47 G ld a,(ix+005h) ;5400 dd 7e 05 . ~ . sub b ;5403 90 . ld a,b ;5404 78 x jr c,l5439h ;5405 38 32 8 2 ld a,(0f2c9h) ;5407 3a c9 f2 : . . cp 001h ;540a fe 01 . . jr nz,l5434h ;540c 20 26 & ld a,(0f2cah) ;540e 3a ca f2 : . . and a ;5411 a7 . jr z,l541ch ;5412 28 08 ( . ld a,(0f710h) ;5414 3a 10 f7 : . . sub 029h ;5417 d6 29 . ) ld (0f710h),a ;5419 32 10 f7 2 . . l541ch: ld a,(0f2d0h) ;541c 3a d0 f2 : . . cp b ;541f b8 . jr nc,l5434h ;5420 30 12 0 . ld c,a ;5422 4f O ld a,b ;5423 78 x sub c ;5424 91 . ld (0f711h),a ;5425 32 11 f7 2 . . ld a,(0f710h) ;5428 3a 10 f7 : . . add a,029h ;542b c6 29 . ) ld (0f710h),a ;542d 32 10 f7 2 . . l5430h: ld b,000h ;5430 06 00 . . jr l543fh ;5432 18 0b . . l5434h: ld a,b ;5434 78 x ld b,000h ;5435 06 00 . . jr l543ch ;5437 18 03 . . l5439h: xor a ;5439 af . ld b,001h ;543a 06 01 . . l543ch: ld (0f711h),a ;543c 32 11 f7 2 . . l543fh: ld c,(iy+002h) ;543f fd 4e 02 . N . ld (iy+002h),b ;5442 fd 70 02 . p . ld a,(0f73bh) ;5445 3a 3b f7 : ; . cp 001h ;5448 fe 01 . . jr z,l5465h ;544a 28 19 ( . ld a,b ;544c 78 x and a ;544d a7 . ld a,c ;544e 79 y jr nz,l5460h ;544f 20 0f . and a ;5451 a7 . jr z,l5457h ;5452 28 03 ( . jp sub_4e26h ;5454 c3 26 4e . & N l5457h: call sub_4eb6h ;5457 cd b6 4e . . N bit 0,a ;545a cb 47 . G call nz,sub_4e42h ;545c c4 42 4e . B N ret ;545f c9 . l5460h: and a ;5460 a7 . call z,sub_4e9dh ;5461 cc 9d 4e . . N ret ;5464 c9 . l5465h: ld a,(0f710h) ;5465 3a 10 f7 : . . dec a ;5468 3d = call sub_4cfch ;5469 cd fc 4c . . L push hl ;546c e5 . ld a,h ;546d 7c | ld h,l ;546e 65 e ld l,a ;546f 6f o ld (0f713h),hl ;5470 22 13 f7 " . . pop hl ;5473 e1 . ld de,l0003h+2 ;5474 11 05 00 . . . add hl,de ;5477 19 . ld a,h ;5478 7c | ld h,l ;5479 65 e ld l,a ;547a 6f o ld (0f717h),hl ;547b 22 17 f7 " . . ld a,(0f711h) ;547e 3a 11 f7 : . . call sub_4d05h ;5481 cd 05 4d . . M dec hl ;5484 2b + ld a,h ;5485 7c | ld h,l ;5486 65 e ld l,a ;5487 6f o ld (0f715h),hl ;5488 22 15 f7 " . . ld (0f719h),hl ;548b 22 19 f7 " . . ret ;548e c9 . sub_548fh: call sub_4cabh ;548f cd ab 4c . . L ld a,(ix+004h) ;5492 dd 7e 04 . ~ . ld b,(iy+000h) ;5495 fd 46 00 . F . inc a ;5498 3c < sub b ;5499 90 . ld (0f712h),a ;549a 32 12 f7 2 . . ret ;549d c9 . ld a,(0f73bh) ;549e 3a 3b f7 : ; . and a ;54a1 a7 . jr nz,l54d9h ;54a2 20 35 5 ld a,(0f2d0h) ;54a4 3a d0 f2 : . . cp c ;54a7 b9 . jr c,l54d9h ;54a8 38 2f 8 / ld a,c ;54aa 79 y and a ;54ab a7 . jr z,l54d9h ;54ac 28 2b ( + ld (0f2d3h),a ;54ae 32 d3 f2 2 . . jr l54d9h ;54b1 18 26 . & sub_54b3h: ld a,(0f73bh) ;54b3 3a 3b f7 : ; . and a ;54b6 a7 . ret nz ;54b7 c0 . ld a,(0f2d4h) ;54b8 3a d4 f2 : . . and a ;54bb a7 . jr nz,l54c4h ;54bc 20 06 . ld a,001h ;54be 3e 01 > . ld (0f2d4h),a ;54c0 32 d4 f2 2 . . ret ;54c3 c9 . l54c4h: xor a ;54c4 af . ld (0f2d4h),a ;54c5 32 d4 f2 2 . . jp sub_54e2h ;54c8 c3 e2 54 . . T ld a,(0f73bh) ;54cb 3a 3b f7 : ; . and a ;54ce a7 . jr nz,l54d9h ;54cf 20 08 . ld a,c ;54d1 79 y ld (0f2d4h),a ;54d2 32 d4 f2 2 . . and a ;54d5 a7 . call z,sub_54e2h ;54d6 cc e2 54 . . T l54d9h: jp l4ce6h ;54d9 c3 e6 4c . . L l54dch: call sub_54e2h ;54dc cd e2 54 . . T jp l4ce3h ;54df c3 e3 4c . . L sub_54e2h: call sub_4cb1h ;54e2 cd b1 4c . . L ld a,(iy+002h) ;54e5 fd 7e 02 . ~ . and a ;54e8 a7 . ret z ;54e9 c8 . ld a,(iy+001h) ;54ea fd 7e 01 . ~ . cp 004h ;54ed fe 04 . . jp c,sub_51e9h ;54ef da e9 51 . . Q ld b,a ;54f2 47 G ld d,004h ;54f3 16 04 . . ld a,(0f2c9h) ;54f5 3a c9 f2 : . . cp 001h ;54f8 fe 01 . . ld a,b ;54fa 78 x jr nz,l54ffh ;54fb 20 02 . ld d,00ch ;54fd 16 0c . . l54ffh: add a,d ;54ff 82 . call sub_4cabh ;5500 cd ab 4c . . L ld c,(ix+005h) ;5503 dd 4e 05 . N . cp c ;5506 b9 . jp nc,sub_51fbh ;5507 d2 fb 51 . . Q call sub_4cb1h ;550a cd b1 4c . . L ld a,b ;550d 78 x sub 003h ;550e d6 03 . . call sub_5315h ;5510 cd 15 53 . . S jp sub_53c1h ;5513 c3 c1 53 . . S l5516h: ld de,(0f739h) ;5516 ed 5b 39 f7 . [ 9 . sub_551ah: ld c,035h ;551a 0e 35 . 5 call sub_4488h ;551c cd 88 44 . . D ld c,e ;551f 4b K dec c ;5520 0d . call sub_44ach ;5521 cd ac 44 . . D ld c,d ;5524 4a J dec c ;5525 0d . call sub_44ach ;5526 cd ac 44 . . D ld a,(0f712h) ;5529 3a 12 f7 : . . ld b,a ;552c 47 G ld c,a ;552d 4f O call sub_44ach ;552e cd ac 44 . . D l5531h: ld c,020h ;5531 0e 20 . call sub_44ach ;5533 cd ac 44 . . D djnz l5531h ;5536 10 f9 . . jp sub_44b2h ;5538 c3 b2 44 . . D l553bh: ld a,(0f716h) ;553b 3a 16 f7 : . . sub 007h ;553e d6 07 . . ld (0f74ah),a ;5540 32 4a f7 2 J . ld a,020h ;5543 3e 20 > ld (0f74bh),a ;5545 32 4b f7 2 K . ld a,(0f713h) ;5548 3a 13 f7 : . . ld h,a ;554b 67 g ld a,(0f714h) ;554c 3a 14 f7 : . . ld l,a ;554f 6f o call sub_556ch ;5550 cd 6c 55 . l U ld a,(0f712h) ;5553 3a 12 f7 : . . ld b,a ;5556 47 G ld c,022h ;5557 0e 22 . " ld de,l0006h ;5559 11 06 00 . . . l555ch: push bc ;555c c5 . push de ;555d d5 . push hl ;555e e5 . call l4cc9h ;555f cd c9 4c . . L pop hl ;5562 e1 . pop de ;5563 d1 . pop bc ;5564 c1 . add hl,de ;5565 19 . call sub_556ch ;5566 cd 6c 55 . l U djnz l555ch ;5569 10 f1 . . ret ;556b c9 . sub_556ch: ld a,h ;556c 7c | ld (0f748h),a ;556d 32 48 f7 2 H . ld a,l ;5570 7d } ld (0f749h),a ;5571 32 49 f7 2 I . ret ;5574 c9 . l5575h: ld hl,0f748h ;5575 21 48 f7 ! H . ld a,(0f73bh) ;5578 3a 3b f7 : ; . and a ;557b a7 . jr nz,l55a2h ;557c 20 24 $ ld a,(0f73dh) ;557e 3a 3d f7 : = . add a,010h ;5581 c6 10 . . ld d,a ;5583 57 W ld a,(0f2c9h) ;5584 3a c9 f2 : . . and a ;5587 a7 . jr z,l55aah ;5588 28 20 ( ld a,(0f73ch) ;558a 3a 3c f7 : < . ld e,a ;558d 5f _ ld a,(0f73eh) ;558e 3a 3e f7 : > . ld (0f712h),a ;5591 32 12 f7 2 . . call sub_551ah ;5594 cd 1a 55 . . U ld a,(0f73fh) ;5597 3a 3f f7 : ? . dec a ;559a 3d = ret z ;559b c8 . ld (0f73fh),a ;559c 32 3f f7 2 ? . jp l55d8h ;559f c3 d8 55 . . U l55a2h: cp 002h ;55a2 fe 02 . . ld a,(0f73dh) ;55a4 3a 3d f7 : = . jr nz,l55bdh ;55a7 20 14 . ld d,a ;55a9 57 W l55aah: ld a,001h ;55aa 3e 01 > . ld (hl),a ;55ac 77 w inc hl ;55ad 23 # ld (hl),020h ;55ae 36 20 6 inc hl ;55b0 23 # dec d ;55b1 15 . ld (hl),d ;55b2 72 r inc hl ;55b3 23 # ld a,(0f73fh) ;55b4 3a 3f f7 : ? . ld (hl),a ;55b7 77 w l55b8h: ld c,01ah ;55b8 0e 1a . . jp l4cc9h ;55ba c3 c9 4c . . L l55bdh: dec a ;55bd 3d = push hl ;55be e5 . call sub_4d05h ;55bf cd 05 4d . . M ld d,l ;55c2 55 U pop hl ;55c3 e1 . ld (hl),000h ;55c4 36 00 6 . inc hl ;55c6 23 # ld (hl),000h ;55c7 36 00 6 . inc hl ;55c9 23 # ld (hl),d ;55ca 72 r inc hl ;55cb 23 # ld a,(0f73fh) ;55cc 3a 3f f7 : ? . push hl ;55cf e5 . call sub_4d05h ;55d0 cd 05 4d . . M ld a,l ;55d3 7d } pop hl ;55d4 e1 . ld (hl),a ;55d5 77 w jr l55b8h ;55d6 18 e0 . . l55d8h: ld hl,0f748h ;55d8 21 48 f7 ! H . ld a,(0f73ch) ;55db 3a 3c f7 : < . dec a ;55de 3d = ld b,a ;55df 47 G ld (hl),a ;55e0 77 w inc hl ;55e1 23 # ld a,(0f73dh) ;55e2 3a 3d f7 : = . add a,00fh ;55e5 c6 0f . . ld d,a ;55e7 57 W ld (hl),a ;55e8 77 w inc hl ;55e9 23 # ld a,(0f73eh) ;55ea 3a 3e f7 : > . ld (hl),a ;55ed 77 w inc hl ;55ee 23 # ld (hl),001h ;55ef 36 01 6 . inc hl ;55f1 23 # ld (hl),b ;55f2 70 p inc hl ;55f3 23 # inc d ;55f4 14 . ld (hl),d ;55f5 72 r ld a,(0f73fh) ;55f6 3a 3f f7 : ? . ld b,a ;55f9 47 G l55fah: push bc ;55fa c5 . push de ;55fb d5 . push hl ;55fc e5 . call sub_53b9h ;55fd cd b9 53 . . S pop hl ;5600 e1 . pop de ;5601 d1 . pop bc ;5602 c1 . inc d ;5603 14 . ld (hl),d ;5604 72 r djnz l55fah ;5605 10 f3 . . ret ;5607 c9 . l5608h: ld a,c ;5608 79 y jr l5625h ;5609 18 1a . . l560bh: call sub_4e7bh ;560b cd 7b 4e . { N l560eh: ld a,c ;560e 79 y ld (0f768h),a ;560f 32 68 f7 2 h . cp 080h ;5612 fe 80 . . jr c,l5622h ;5614 38 0c 8 . cp 0e0h ;5616 fe e0 . . jr nc,l5664h ;5618 30 4a 0 J cp 0a0h ;561a fe a0 . . jr c,l5664h ;561c 38 46 8 F ld a,020h ;561e 3e 20 > jr l5625h ;5620 18 03 . . l5622h: call sub_5651h ;5622 cd 51 56 . Q V l5625h: ld (0f768h),a ;5625 32 68 f7 2 h . jr l5664h ;5628 18 3a . : l562ah: dec bc ;562a 0b . dec c ;562b 0d . ld c,006h ;562c 0e 06 . . ld a,(bc) ;562e 0a . ex af,af' ;562f 08 . add hl,bc ;5630 09 . inc c ;5631 0c . rrca ;5632 0f . sub_5633h: ld a,(0f6a2h) ;5633 3a a2 f6 : . . ld hl,l562ah ;5636 21 2a 56 ! * V ld b,008h ;5639 06 08 . . l563bh: cp (hl) ;563b be . jr z,l5641h ;563c 28 03 ( . inc hl ;563e 23 # djnz l563bh ;563f 10 fa . . l5641h: ld a,b ;5641 78 x add a,a ;5642 87 . add a,a ;5643 87 . ld l,a ;5644 6f o add a,a ;5645 87 . add a,l ;5646 85 . add a,b ;5647 80 . add a,d ;5648 82 . ld hl,l56f0h ;5649 21 f0 56 ! . V ld d,000h ;564c 16 00 . . ld e,a ;564e 5f _ add hl,de ;564f 19 . ret ;5650 c9 . sub_5651h: ld hl,l56e3h ;5651 21 e3 56 ! . V ld b,00dh ;5654 06 0d . . l5656h: cp (hl) ;5656 be . jr z,l565dh ;5657 28 04 ( . inc hl ;5659 23 # djnz l5656h ;565a 10 fa . . ret ;565c c9 . l565dh: dec b ;565d 05 . ld d,b ;565e 50 P call sub_5633h ;565f cd 33 56 . 3 V ld a,(hl) ;5662 7e ~ ret ;5663 c9 . l5664h: ld a,001h ;5664 3e 01 > . ld (0f70fh),a ;5666 32 0f f7 2 . . ld a,(0f73bh) ;5669 3a 3b f7 : ; . ld b,a ;566c 47 G cp 002h ;566d fe 02 . . ld a,(0f2d2h) ;566f 3a d2 f2 : . . jr nz,l5677h ;5672 20 03 . ld a,(0f2d1h) ;5674 3a d1 f2 : . . l5677h: and a ;5677 a7 . jr z,l567fh ;5678 28 05 ( . ld a,020h ;567a 3e 20 > ld (0f768h),a ;567c 32 68 f7 2 h . l567fh: ld a,b ;567f 78 x cp 001h ;5680 fe 01 . . jr z,l56c4h ;5682 28 40 ( @ ld a,(0f739h) ;5684 3a 39 f7 : 9 . dec a ;5687 3d = ld (0f748h),a ;5688 32 48 f7 2 H . ld a,(0f73ah) ;568b 3a 3a f7 : : . dec a ;568e 3d = ld (0f749h),a ;568f 32 49 f7 2 I . ld a,001h ;5692 3e 01 > . ld (0f74ah),a ;5694 32 4a f7 2 J . ld a,(0f768h) ;5697 3a 68 f7 : h . ld (0f74bh),a ;569a 32 4b f7 2 K . call sub_4cc7h ;569d cd c7 4c . . L ld a,(0f73bh) ;56a0 3a 3b f7 : ; . and a ;56a3 a7 . jr nz,l56c1h ;56a4 20 1b . call sub_4cb1h ;56a6 cd b1 4c . . L ld a,(iy+002h) ;56a9 fd 7e 02 . ~ . and a ;56ac a7 . jr nz,l56c1h ;56ad 20 12 . ld a,(0f710h) ;56af 3a 10 f7 : . . dec a ;56b2 3d = ld (0f748h),a ;56b3 32 48 f7 2 H . ld a,(0f711h) ;56b6 3a 11 f7 : . . add a,007h ;56b9 c6 07 . . ld (0f749h),a ;56bb 32 49 f7 2 I . call sub_4cc7h ;56be cd c7 4c . . L l56c1h: jp l4f22h ;56c1 c3 22 4f . " O l56c4h: ld a,(0f713h) ;56c4 3a 13 f7 : . . ld (0f748h),a ;56c7 32 48 f7 2 H . ld a,(0f714h) ;56ca 3a 14 f7 : . . ld (0f749h),a ;56cd 32 49 f7 2 I . ld a,(0f716h) ;56d0 3a 16 f7 : . . sub 007h ;56d3 d6 07 . . ld (0f74ah),a ;56d5 32 4a f7 2 J . ld a,(0f768h) ;56d8 3a 68 f7 : h . ld (0f74bh),a ;56db 32 4b f7 2 K . call sub_4cc3h ;56de cd c3 4c . . L jr l56c1h ;56e1 18 de . . l56e3h: ld a,a ;56e3 7f  ld a,(hl) ;56e4 7e ~ ld a,l ;56e5 7d } ld a,h ;56e6 7c | ld a,e ;56e7 7b { ld h,b ;56e8 60 ` ld e,(hl) ;56e9 5e ^ ld e,l ;56ea 5d ] ld e,h ;56eb 5c \ ld e,e ;56ec 5b [ ld b,b ;56ed 40 @ inc h ;56ee 24 $ inc hl ;56ef 23 # l56f0h: inc hl ;56f0 23 # inc h ;56f1 24 $ ld b,b ;56f2 40 @ ld e,e ;56f3 5b [ ld a,a ;56f4 7f  ld e,l ;56f5 5d ] ld e,(hl) ;56f6 5e ^ ld h,b ;56f7 60 ` ld a,e ;56f8 7b { ld a,h ;56f9 7c | ld a,l ;56fa 7d } ld a,(hl) ;56fb 7e ~ ret po ;56fc e0 . rrca ;56fd 0f . inc h ;56fe 24 $ ld b,b ;56ff 40 @ ld e,e ;5700 5b [ ld a,a ;5701 7f  ld e,l ;5702 5d ] ld e,(hl) ;5703 5e ^ ld h,b ;5704 60 ` ld a,e ;5705 7b { ld a,h ;5706 7c | ld a,l ;5707 7d } ld a,(hl) ;5708 7e ~ ret po ;5709 e0 . inc hl ;570a 23 # inc h ;570b 24 $ ld b,b ;570c 40 @ ld bc,0047fh ;570d 01 7f 04 .  . ld e,(hl) ;5710 5e ^ dec b ;5711 05 . nop ;5712 00 . add hl,de ;5713 19 . ld b,01ah ;5714 06 1a . . ret po ;5716 e0 . dec de ;5717 1b . inc h ;5718 24 $ ld b,b ;5719 40 @ inc e ;571a 1c . dec e ;571b 1d . ld e,05eh ;571c 1e 5e . ^ ld h,b ;571e 60 ` rlca ;571f 07 . l5720h: rra ;5720 1f . ld a,l ;5721 7d } ld a,(hl) ;5722 7e ~ ret po ;5723 e0 . inc hl ;5724 23 # jr l573dh ;5725 18 16 . . ex af,af' ;5727 08 . add hl,bc ;5728 09 . ld (de),a ;5729 12 . ld a,(bc) ;572a 0a . inc b ;572b 04 . dec bc ;572c 0b . inc c ;572d 0c . dec d ;572e 15 . dec c ;572f 0d . ret po ;5730 e0 . inc hl ;5731 23 # jr l574ah ;5732 18 16 . . djnz l5747h ;5734 10 11 . . ld (de),a ;5736 12 . ld a,(bc) ;5737 0a . inc b ;5738 04 . inc de ;5739 13 . inc d ;573a 14 . dec d ;573b 15 . dec c ;573c 0d . l573dh: ret po ;573d e0 . inc hl ;573e 23 # inc h ;573f 24 $ nop ;5740 00 . ld bc,00302h ;5741 01 02 03 . . . ld e,(hl) ;5744 5e ^ ld h,b ;5745 60 ` inc b ;5746 04 . l5747h: dec b ;5747 05 . ld b,007h ;5748 06 07 . . l574ah: ret po ;574a e0 . inc hl ;574b 23 # inc h ;574c 24 $ inc bc ;574d 03 . ex af,af' ;574e 08 . add hl,bc ;574f 09 . ld a,(bc) ;5750 0a . ld e,(hl) ;5751 5e ^ ld h,b ;5752 60 ` dec bc ;5753 0b . inc c ;5754 0c . dec c ;5755 0d . ld c,0e0h ;5756 0e e0 . . inc hl ;5758 23 # inc h ;5759 24 $ ld d,010h ;575a 16 10 . . ld de,sub_0a10h+2 ;575c 11 12 0a . . . inc b ;575f 04 . inc de ;5760 13 . inc d ;5761 14 . dec d ;5762 15 . dec c ;5763 0d . ret po ;5764 e0 . call sub_4c71h ;5765 cd 71 4c . q L cp 005h ;5768 fe 05 . . ret c ;576a d8 . ld ix,(0f70dh) ;576b dd 2a 0d f7 . * . . ld a,(ix+000h) ;576f dd 7e 00 . ~ . and a ;5772 a7 . jr z,l57c7h ;5773 28 52 ( R cp 009h ;5775 fe 09 . . jr nc,l57c7h ;5777 30 4e 0 N dec a ;5779 3d = ld b,a ;577a 47 G ld a,(ix+001h) ;577b dd 7e 01 . ~ . and a ;577e a7 . jr z,l57c7h ;577f 28 46 ( F cp 051h ;5781 fe 51 . Q jr nc,l57c7h ;5783 30 42 0 B dec a ;5785 3d = ld c,a ;5786 4f O ld a,(0f73bh) ;5787 3a 3b f7 : ; . cp 001h ;578a fe 01 . . jr z,l57a9h ;578c 28 1b ( . cp 002h ;578e fe 02 . . jr z,l5796h ;5790 28 04 ( . ld a,008h ;5792 3e 08 > . add a,b ;5794 80 . ld b,a ;5795 47 G l5796h: ld hl,0f748h ;5796 21 48 f7 ! H . ld (hl),c ;5799 71 q inc hl ;579a 23 # ld (hl),b ;579b 70 p inc hl ;579c 23 # ld (hl),001h ;579d 36 01 6 . inc hl ;579f 23 # ld a,(ix+002h) ;57a0 dd 7e 02 . ~ . ld (hl),a ;57a3 77 w call sub_4cc7h ;57a4 cd c7 4c . . L jr l57c7h ;57a7 18 1e . . l57a9h: ld iy,0f748h ;57a9 fd 21 48 f7 . ! H . ld a,c ;57ad 79 y call sub_4cfch ;57ae cd fc 4c . . L ld (iy+000h),h ;57b1 fd 74 00 . t . ld (iy+001h),l ;57b4 fd 75 01 . u . ld a,b ;57b7 78 x call sub_4d05h ;57b8 cd 05 4d . . M ld (iy+002h),l ;57bb fd 75 02 . u . ld a,(ix+002h) ;57be dd 7e 02 . ~ . ld (iy+003h),a ;57c1 fd 77 03 . w . call sub_4cc3h ;57c4 cd c3 4c . . L l57c7h: jp l4ce6h ;57c7 c3 e6 4c . . L call sub_4c71h ;57ca cd 71 4c . q L cp 00bh ;57cd fe 0b . . ret c ;57cf d8 . ld a,(0f73bh) ;57d0 3a 3b f7 : ; . cp 002h ;57d3 fe 02 . . jr z,l57c7h ;57d5 28 f0 ( . ld hl,(0f70dh) ;57d7 2a 0d f7 * . . ld a,(hl) ;57da 7e ~ cp 0e0h ;57db fe e0 . . jr c,l57c7h ;57dd 38 e8 8 . call sub_57e4h ;57df cd e4 57 . . W jr l57c7h ;57e2 18 e3 . . sub_57e4h: ld de,0f748h ;57e4 11 48 f7 . H . ld bc,l0009h ;57e7 01 09 00 . . . ldir ;57ea ed b0 . . ld c,030h ;57ec 0e 30 . 0 ld hl,l0009h ;57ee 21 09 00 ! . . jp sub_4ccch ;57f1 c3 cc 4c . . L call sub_4c71h ;57f4 cd 71 4c . q L cp 00dh ;57f7 fe 0d . . ret c ;57f9 d8 . ld a,(0f73bh) ;57fa 3a 3b f7 : ; . cp 001h ;57fd fe 01 . . jr nz,l57c7h ;57ff 20 c6 . ld hl,(0f70dh) ;5801 2a 0d f7 * . . push hl ;5804 e5 . pop ix ;5805 dd e1 . . ld a,(ix+00ah) ;5807 dd 7e 0a . ~ . and a ;580a a7 . jr z,l57c7h ;580b 28 ba ( . cp 004h ;580d fe 04 . . jr nc,l57c7h ;580f 30 b6 0 . ld de,0f748h ;5811 11 48 f7 . H . ld bc,l0009h+2 ;5814 01 0b 00 . . . ldir ;5817 ed b0 . . ld c,029h ;5819 0e 29 . ) ld hl,l0009h+2 ;581b 21 0b 00 ! . . call sub_4ccch ;581e cd cc 4c . . L jr l57c7h ;5821 18 a4 . . call sub_4c71h ;5823 cd 71 4c . q L cp 006h ;5826 fe 06 . . ret c ;5828 d8 . ld a,(0f73bh) ;5829 3a 3b f7 : ; . cp 001h ;582c fe 01 . . jr nz,l5863h ;582e 20 33 3 ld hl,(0f70dh) ;5830 2a 0d f7 * . . ld a,(hl) ;5833 7e ~ and a ;5834 a7 . ld a,001h ;5835 3e 01 > . jr z,l583bh ;5837 28 02 ( . ld a,002h ;5839 3e 02 > . l583bh: ld (0f74bh),a ;583b 32 4b f7 2 K . inc hl ;583e 23 # ld a,(hl) ;583f 7e ~ cp 040h ;5840 fe 40 . @ jr nc,l5863h ;5842 30 1f 0 . ld (0f74ah),a ;5844 32 4a f7 2 J . inc hl ;5847 23 # ld a,(hl) ;5848 7e ~ ld (0f748h),a ;5849 32 48 f7 2 H . ld b,a ;584c 47 G inc hl ;584d 23 # ld a,(hl) ;584e 7e ~ ld (0f749h),a ;584f 32 49 f7 2 I . ld c,a ;5852 4f O ld hl,l01dfh ;5853 21 df 01 ! . . and a ;5856 a7 . sbc hl,bc ;5857 ed 42 . B jr c,l5863h ;5859 38 08 8 . ld c,027h ;585b 0e 27 . ' ld hl,l0003h+1 ;585d 21 04 00 ! . . call sub_4ccch ;5860 cd cc 4c . . L l5863h: jp l4ce6h ;5863 c3 e6 4c . . L ld b,001h ;5866 06 01 . . jr l586ch ;5868 18 02 . . ld b,000h ;586a 06 00 . . l586ch: ld a,(0f73bh) ;586c 3a 3b f7 : ; . cp 002h ;586f fe 02 . . ld a,b ;5871 78 x jr nz,l5879h ;5872 20 05 . ld (0f2d1h),a ;5874 32 d1 f2 2 . . jr l5863h ;5877 18 ea . . l5879h: ld (0f2d2h),a ;5879 32 d2 f2 2 . . jr l5863h ;587c 18 e5 . . call sub_3896h ;587e cd 96 38 . . 8 jp l5907h ;5881 c3 07 59 . . Y call l3670h ;5884 cd 70 36 . p 6 jr l5907h ;5887 18 7e . ~ ld b,003h ;5889 06 03 . . jr l5897h ;588b 18 0a . . ld b,004h ;588d 06 04 . . jr l5897h ;588f 18 06 . . ld b,006h ;5891 06 06 . . jr l5897h ;5893 18 02 . . ld b,007h ;5895 06 07 . . l5897h: ld hl,(0f709h) ;5897 2a 09 f7 * . . ld a,(hl) ;589a 7e ~ cp b ;589b b8 . ret c ;589c d8 . jr l5907h ;589d 18 68 . h ld a,0ffh ;589f 3e ff > . jr l58a4h ;58a1 18 01 . . xor a ;58a3 af . l58a4h: ld (0f108h),a ;58a4 32 08 f1 2 . . jr l5907h ;58a7 18 5e . ^ ld b,004h ;58a9 06 04 . . jr l58c5h ;58ab 18 18 . . ld b,0fbh ;58ad 06 fb . . jr l58bfh ;58af 18 0e . . ld b,001h ;58b1 06 01 . . jr l58c5h ;58b3 18 10 . . ld b,0feh ;58b5 06 fe . . jr l58bfh ;58b7 18 06 . . ld b,002h ;58b9 06 02 . . jr l58c5h ;58bb 18 08 . . ld b,0fdh ;58bd 06 fd . . l58bfh: ld a,(0f0b2h) ;58bf 3a b2 f0 : . . and b ;58c2 a0 . jr l58c9h ;58c3 18 04 . . l58c5h: ld a,(0f0b2h) ;58c5 3a b2 f0 : . . or b ;58c8 b0 . l58c9h: out (002h),a ;58c9 d3 02 . . ld (0f0b2h),a ;58cb 32 b2 f0 2 . . jr l5907h ;58ce 18 37 . 7 xor a ;58d0 af . out (004h),a ;58d1 d3 04 ; GAH40M Interrupt Enable register (w) ld a,(0f0b3h) ;58d3 3a b3 f0 : . . push af ;58d6 f5 . xor a ;58d7 af . ld (0f0f7h),a ;58d8 32 f7 f0 2 . . ld (0f107h),a ;58db 32 07 f1 2 . . ld hl,0f806h ;58de 21 06 f8 ! . . ld (0f0fah),hl ;58e1 22 fa f0 " . . ld (0f0fch),hl ;58e4 22 fc f0 " . . pop af ;58e7 f1 . out (004h),a ;58e8 d3 04 ; GAH40M Interrupt Enable register (w) jr l5907h ;58ea 18 1b . . ld de,0f346h ;58ec 11 46 f3 . F . jr l58f9h ;58ef 18 08 . . ld de,0f34ah ;58f1 11 4a f3 . J . jr l58f9h ;58f4 18 03 . . ld de,0f34eh ;58f6 11 4e f3 . N . l58f9h: call sub_4c71h ;58f9 cd 71 4c . q L cp 006h ;58fc fe 06 . . ret c ;58fe d8 . ld hl,(0f70dh) ;58ff 2a 0d f7 * . . ld bc,l0003h+1 ;5902 01 04 00 . . . ldir ;5905 ed b0 . . l5907h: jp l4ce6h ;5907 c3 e6 4c . . L ld a,c ;590a 79 y ld (0f0feh),a ;590b 32 fe f0 2 . . call sub_3a9dh ;590e cd 9d 3a . . : call l3af1h ;5911 cd f1 3a . . : jr l5907h ;5914 18 f1 . . ld a,c ;5916 79 y and a ;5917 a7 . ld de,l1501h ;5918 11 01 15 . . . jr nz,l5920h ;591b 20 03 . ld de,l0500h+1 ;591d 11 01 05 . . . l5920h: call sub_5960h ;5920 cd 60 59 . ` Y jr l5907h ;5923 18 e2 . . ld de,l0402h ;5925 11 02 04 . . . jr l592dh ;5928 18 03 . . ld de,l1400h+2 ;592a 11 02 14 . . . l592dh: ld a,c ;592d 79 y cp 080h ;592e fe 80 . . call c,sub_5960h ;5930 dc 60 59 . ` Y jr l5907h ;5933 18 d2 . . ld a,c ;5935 79 y ld hl,l5957h ;5936 21 57 59 ! W Y ld b,009h ;5939 06 09 . . l593bh: cp (hl) ;593b be . jr z,l5943h ;593c 28 05 ( . inc hl ;593e 23 # djnz l593bh ;593f 10 fa . . jr l5907h ;5941 18 c4 . . l5943h: ld a,b ;5943 78 x add a,006h ;5944 c6 06 . . cp 007h ;5946 fe 07 . . jr nz,l594bh ;5948 20 01 . dec a ;594a 3d = l594bh: ld (0f6a2h),a ;594b 32 a2 f6 2 . . call l3af1h ;594e cd f1 3a . . : xor a ;5951 af . ld (0f35bh),a ;5952 32 5b f3 2 [ . jr l5907h ;5955 18 b0 . . l5957h: ld d,l ;5957 55 U ld b,(hl) ;5958 46 F ld b,a ;5959 47 G l595ah: ld b,l ;595a 45 E ld b,h ;595b 44 D ld d,a ;595c 57 W ld c,c ;595d 49 I ld d,e ;595e 53 S ld c,(hl) ;595f 4e N sub_5960h: xor a ;5960 af . out (004h),a ;5961 d3 04 ; GAH40M Interrupt Enable register (w) ld a,(0f0b3h) ;5963 3a b3 f0 : . . push af ;5966 f5 . res 0,a ;5967 cb 87 . . ld (0f0b3h),a ;5969 32 b3 f0 2 . . out (004h),a ;596c d3 04 ; GAH40M Interrupt Enable register (w) l596eh: in a,(005h) ;596e db 05 . . and 008h ;5970 e6 08 . . jr z,l596eh ;5972 28 fa ( . ld a,d ;5974 7a z out (006h),a ;5975 d3 06 . . ld a,002h ;5977 3e 02 > . out (001h),a ;5979 d3 01 . . dec e ;597b 1d . jr z,l598dh ;597c 28 0f ( . l597eh: in a,(005h) ;597e db 05 . . and 008h ;5980 e6 08 . . jr z,l597eh ;5982 28 fa ( . ld a,c ;5984 79 y or 080h ;5985 f6 80 . . out (006h),a ;5987 d3 06 . . ld a,002h ;5989 3e 02 > . out (001h),a ;598b d3 01 . . l598dh: xor a ;598d af . out (004h),a ;598e d3 04 ; GAH40M Interrupt Enable register (w) pop af ;5990 f1 . ld (0f0b3h),a ;5991 32 b3 f0 2 . . out (004h),a ;5994 d3 04 ; GAH40M Interrupt Enable register (w) ret ;5996 c9 . call sub_4c71h ;5997 cd 71 4c . q L cp 003h ;599a fe 03 . . ld hl,(0f70dh) ;599c 2a 0d f7 * . . jr nz,l59c0h ;599f 20 1f . ld a,(hl) ;59a1 7e ~ cp 003h ;59a2 fe 03 . . jr z,l59aah ;59a4 28 04 ( . jp nc,l4ce6h ;59a6 d2 e6 4c . . L ret ;59a9 c9 . l59aah: ld hl,l5f11h ;59aa 21 11 5f ! . _ call sub_5c39h ;59ad cd 39 5c . 9 \ call sub_5c86h ;59b0 cd 86 5c . . \ call sub_5c0fh ;59b3 cd 0f 5c . . \ xor a ;59b6 af . ld (0f700h),a ;59b7 32 00 f7 2 . . ld hl,l5f01h ;59ba 21 01 5f ! . _ jp l5ae9h ;59bd c3 e9 5a . . Z l59c0h: cp 004h ;59c0 fe 04 . . jr nz,l5a1ch ;59c2 20 58 X ld a,(hl) ;59c4 7e ~ cp 001h ;59c5 fe 01 . . ret nz ;59c7 c0 . inc hl ;59c8 23 # ld a,(hl) ;59c9 7e ~ cp 010h ;59ca fe 10 . . jp c,l4ce6h ;59cc da e6 4c . . L cp 031h ;59cf fe 31 . 1 jp nc,l5a79h ;59d1 d2 79 5a . y Z call sub_5c55h ;59d4 cd 55 5c . U \ call sub_59efh ;59d7 cd ef 59 . . Y call sub_5c4ch ;59da cd 4c 5c . L \ ld a,(0f2d0h) ;59dd 3a d0 f2 : . . add a,a ;59e0 87 . call sub_59efh ;59e1 cd ef 59 . . Y ld (iy+000h),001h ;59e4 fd 36 00 01 . 6 . . ld (iy+002h),027h ;59e8 fd 36 02 27 . 6 . ' jp l5ae1h ;59ec c3 e1 5a . . Z sub_59efh: ld (ix+001h),001h ;59ef dd 36 01 01 . 6 . . ld (ix+000h),001h ;59f3 dd 36 00 01 . 6 . . ld (ix+003h),a ;59f7 dd 77 03 . w . ld (ix+002h),027h ;59fa dd 36 02 27 . 6 . ' ld (ix+004h),027h ;59fe dd 36 04 27 . 6 . ' ld (ix+005h),a ;5a02 dd 77 05 . w . ld (iy+001h),001h ;5a05 fd 36 01 01 . 6 . . ld (iy+000h),02ah ;5a09 fd 36 00 2a . 6 . * ld (iy+003h),a ;5a0d fd 77 03 . w . ld (iy+002h),050h ;5a10 fd 36 02 50 . 6 . P ld (iy+004h),027h ;5a14 fd 36 04 27 . 6 . ' ld (iy+005h),a ;5a18 fd 77 05 . w . ret ;5a1b c9 . l5a1ch: cp 005h ;5a1c fe 05 . . jr nz,l5a7ch ;5a1e 20 5c \ l5a20h: ld a,(hl) ;5a20 7e ~ and a ;5a21 a7 . ret nz ;5a22 c0 . inc hl ;5a23 23 # ld a,(hl) ;5a24 7e ~ cp 008h ;5a25 fe 08 . . jr c,l5a79h ;5a27 38 50 8 P cp 029h ;5a29 fe 29 . ) jr nc,l5a79h ;5a2b 30 4c 0 L ld b,a ;5a2d 47 G inc hl ;5a2e 23 # ld a,(hl) ;5a2f 7e ~ cp 008h ;5a30 fe 08 . . jr c,l5a79h ;5a32 38 45 8 E cp 029h ;5a34 fe 29 . ) jr nc,l5a79h ;5a36 30 41 0 A ld c,a ;5a38 4f O add a,b ;5a39 80 . cp 031h ;5a3a fe 31 . 1 jr nc,l5a79h ;5a3c 30 3b 0 ; ld d,a ;5a3e 57 W call sub_5c55h ;5a3f cd 55 5c . U \ ld (ix+001h),001h ;5a42 dd 36 01 01 . 6 . . ld (ix+000h),001h ;5a46 dd 36 00 01 . 6 . . ld (ix+003h),b ;5a4a dd 70 03 . p . ld (ix+002h),050h ;5a4d dd 36 02 50 . 6 . P ld (ix+004h),050h ;5a51 dd 36 04 50 . 6 . P ld (ix+005h),b ;5a55 dd 70 05 . p . inc b ;5a58 04 . ld (iy+001h),b ;5a59 fd 70 01 . p . ld (iy+000h),001h ;5a5c fd 36 00 01 . 6 . . ld (iy+003h),d ;5a60 fd 72 03 . r . ld (iy+002h),050h ;5a63 fd 36 02 50 . 6 . P ld (iy+004h),050h ;5a67 fd 36 04 50 . 6 . P ld (iy+005h),c ;5a6b fd 71 05 . q . ld hl,l5f11h ;5a6e 21 11 5f ! . _ call sub_5c39h ;5a71 cd 39 5c . 9 \ call sub_5c86h ;5a74 cd 86 5c . . \ jr l5ae1h ;5a77 18 68 . h l5a79h: jp l4ce6h ;5a79 c3 e6 4c . . L l5a7ch: cp 006h ;5a7c fe 06 . . ret c ;5a7e d8 . inc hl ;5a7f 23 # ld a,(hl) ;5a80 7e ~ cp 008h ;5a81 fe 08 . . jr c,l5a79h ;5a83 38 f4 8 . cp 031h ;5a85 fe 31 . 1 jr nc,l5a79h ;5a87 30 f0 0 . ld b,a ;5a89 47 G inc hl ;5a8a 23 # ld a,(hl) ;5a8b 7e ~ and a ;5a8c a7 . jr z,l5a79h ;5a8d 28 ea ( . ld c,a ;5a8f 4f O ld a,04eh ;5a90 3e 4e > N sub c ;5a92 91 . jr c,l5a79h ;5a93 38 e4 8 . inc a ;5a95 3c < ld d,a ;5a96 57 W inc hl ;5a97 23 # ld a,(hl) ;5a98 7e ~ ld (0f2d9h),a ;5a99 32 d9 f2 2 . . call sub_5c55h ;5a9c cd 55 5c . U \ call sub_5ab5h ;5a9f cd b5 5a . . Z call sub_5c4ch ;5aa2 cd 4c 5c . L \ ld a,(0f2d0h) ;5aa5 3a d0 f2 : . . ld b,a ;5aa8 47 G call sub_5ab5h ;5aa9 cd b5 5a . . Z ld (iy+000h),001h ;5aac fd 36 00 01 . 6 . . ld (iy+002h),d ;5ab0 fd 72 02 . r . jr l5ae1h ;5ab3 18 2c . , sub_5ab5h: ld (ix+001h),001h ;5ab5 dd 36 01 01 . 6 . . ld (ix+000h),001h ;5ab9 dd 36 00 01 . 6 . . ld (ix+003h),b ;5abd dd 70 03 . p . ld (ix+002h),c ;5ac0 dd 71 02 . q . ld (ix+004h),c ;5ac3 dd 71 04 . q . ld (ix+005h),b ;5ac6 dd 70 05 . p . ld (iy+001h),001h ;5ac9 fd 36 01 01 . 6 . . ld e,c ;5acd 59 Y inc e ;5ace 1c . inc e ;5acf 1c . ld (iy+000h),e ;5ad0 fd 73 00 . s . ld (iy+003h),b ;5ad3 fd 70 03 . p . ld (iy+002h),050h ;5ad6 fd 36 02 50 . 6 . P ld (iy+004h),d ;5ada fd 72 04 . r . ld (iy+005h),b ;5add fd 70 05 . p . ret ;5ae0 c9 . l5ae1h: ld a,008h ;5ae1 3e 08 > . ld (0f700h),a ;5ae3 32 00 f7 2 . . ld hl,l5ef1h ;5ae6 21 f1 5e ! . ^ l5ae9h: xor a ;5ae9 af . ld (0f2cah),a ;5aea 32 ca f2 2 . . push hl ;5aed e5 . call sub_5c65h ;5aee cd 65 5c . e \ call sub_5c5eh ;5af1 cd 5e 5c . ^ \ call sub_5c72h ;5af4 cd 72 5c . r \ pop hl ;5af7 e1 . ld de,0f748h ;5af8 11 48 f7 . H . ld bc,l000fh+1 ;5afb 01 10 00 . . . ldir ;5afe ed b0 . . ld hl,0f756h ;5b00 21 56 f7 ! V . ld a,0f8h ;5b03 3e f8 > . and (hl) ;5b05 a6 . ld (hl),a ;5b06 77 w ld a,(0f2d7h) ;5b07 3a d7 f2 : . . or (hl) ;5b0a b6 . ld (hl),a ;5b0b 77 w ld c,010h ;5b0c 0e 10 . . ld hl,l000fh+1 ;5b0e 21 10 00 ! . . call sub_4ccch ;5b11 cd cc 4c . . L call sub_5c1bh ;5b14 cd 1b 5c . . \ call sub_5cc1h ;5b17 cd c1 5c . . \ call sub_4cddh ;5b1a cd dd 4c . . L ld hl,(0f70dh) ;5b1d 2a 0d f7 * . . ld a,(hl) ;5b20 7e ~ ld (0f2c9h),a ;5b21 32 c9 f2 2 . . cp 003h ;5b24 fe 03 . . jr nz,l5b2fh ;5b26 20 07 . call sub_5cbeh ;5b28 cd be 5c . . \ ld a,001h ;5b2b 3e 01 > . jr l5b41h ;5b2d 18 12 . . l5b2fh: cp 002h ;5b2f fe 02 . . jr nz,l5b38h ;5b31 20 05 . call sub_5e95h ;5b33 cd 95 5e . . ^ jr l5b3dh ;5b36 18 05 . . l5b38h: cp 001h ;5b38 fe 01 . . call z,sub_5ec0h ;5b3a cc c0 5e . . ^ l5b3dh: call sub_5c99h ;5b3d cd 99 5c . . \ xor a ;5b40 af . l5b41h: ld (0f73bh),a ;5b41 32 3b f7 2 ; . ld a,(0f2d0h) ;5b44 3a d0 f2 : . . cp 007h ;5b47 fe 07 . . call z,sub_4d0ch ;5b49 cc 0c 4d . . M jp l4ce3h ;5b4c c3 e3 4c . . L sub_5b4fh: ld a,(0f73bh) ;5b4f 3a 3b f7 : ; . cp 002h ;5b52 fe 02 . . jr z,l5b66h ;5b54 28 10 ( . ld a,002h ;5b56 3e 02 > . ld (0f73bh),a ;5b58 32 3b f7 2 ; . ld hl,0f701h ;5b5b 21 01 f7 ! . . ld de,0f740h ;5b5e 11 40 f7 . @ . ld bc,l0006h+2 ;5b61 01 08 00 . . . ldir ;5b64 ed b0 . . l5b66h: xor a ;5b66 af . ld (0f700h),a ;5b67 32 00 f7 2 . . ld hl,l5f11h ;5b6a 21 11 5f ! . _ ld de,0f727h ;5b6d 11 27 f7 . ' . ld bc,l0006h ;5b70 01 06 00 . . . ldir ;5b73 ed b0 . . ld a,(0f2cfh) ;5b75 3a cf f2 : . . ld ix,0f727h ;5b78 dd 21 27 f7 . ! ' . ld (ix+003h),a ;5b7c dd 77 03 . w . ld (ix+005h),a ;5b7f dd 77 05 . w . ld (0f701h),ix ;5b82 dd 22 01 f7 . " . . ld (0f703h),ix ;5b86 dd 22 03 f7 . " . . ld hl,0f6f7h ;5b8a 21 f7 f6 ! . . ld (0f705h),hl ;5b8d 22 05 f7 " . . ld hl,0f6f9h ;5b90 21 f9 f6 ! . . call sub_5c7eh ;5b93 cd 7e 5c . ~ \ call sub_5befh ;5b96 cd ef 5b . . [ ld a,(0f2c9h) ;5b99 3a c9 f2 : . . cp 003h ;5b9c fe 03 . . jr z,l5ba5h ;5b9e 28 05 ( . call sub_5c9eh ;5ba0 cd 9e 5c . . \ jr l5ba8h ;5ba3 18 03 . . l5ba5h: call sub_5cbah ;5ba5 cd ba 5c . . \ l5ba8h: ld a,(0f2cfh) ;5ba8 3a cf f2 : . . cp 007h ;5bab fe 07 . . call z,sub_4d0ch ;5bad cc 0c 4d . . M call sub_5ccbh ;5bb0 cd cb 5c . . \ jr l5be6h ;5bb3 18 31 . 1 sub_5bb5h: ld a,(0f73bh) ;5bb5 3a 3b f7 : ; . cp 002h ;5bb8 fe 02 . . jr nz,l5be6h ;5bba 20 2a * ld hl,0f740h ;5bbc 21 40 f7 ! @ . ld de,0f701h ;5bbf 11 01 f7 . . . ld bc,l0006h+2 ;5bc2 01 08 00 . . . ldir ;5bc5 ed b0 . . call sub_5bfah ;5bc7 cd fa 5b . . [ ld a,(0f2c9h) ;5bca 3a c9 f2 : . . cp 003h ;5bcd fe 03 . . jr c,l5bdah ;5bcf 38 09 8 . call sub_5cbeh ;5bd1 cd be 5c . . \ ld a,001h ;5bd4 3e 01 > . ld (0f73bh),a ;5bd6 32 3b f7 2 ; . ret ;5bd9 c9 . l5bdah: call sub_5c99h ;5bda cd 99 5c . . \ ld a,008h ;5bdd 3e 08 > . ld (0f700h),a ;5bdf 32 00 f7 2 . . xor a ;5be2 af . ld (0f73bh),a ;5be3 32 3b f7 2 ; . l5be6h: call sub_4e9dh ;5be6 cd 9d 4e . . N call sub_53c1h ;5be9 cd c1 53 . . S jp sub_4e26h ;5bec c3 26 4e . & N sub_5befh: ld bc,0f2cbh ;5bef 01 cb f2 . . . ld de,0f2cdh ;5bf2 11 cd f2 . . . ld hl,0f769h ;5bf5 21 69 f7 ! i . jr l5c03h ;5bf8 18 09 . . sub_5bfah: ld bc,0f2cch ;5bfa 01 cc f2 . . . ld de,0f2ceh ;5bfd 11 ce f2 . . . ld hl,0f775h ;5c00 21 75 f7 ! u . l5c03h: ld (0f709h),bc ;5c03 ed 43 09 f7 . C . . ld (0f70bh),de ;5c07 ed 53 0b f7 . S . . ld (0f70dh),hl ;5c0b 22 0d f7 " . . ret ;5c0e c9 . sub_5c0fh: ld hl,0f72dh ;5c0f 21 2d f7 ! - . ld de,0f71bh ;5c12 11 1b f7 . . . ld bc,l0006h ;5c15 01 06 00 . . . ldir ;5c18 ed b0 . . ret ;5c1a c9 . sub_5c1bh: ld hl,l5c27h ;5c1b 21 27 5c ! ' \ call sub_57e4h ;5c1e cd e4 57 . . W ld hl,l5c30h ;5c21 21 30 5c ! 0 \ jp sub_57e4h ;5c24 c3 e4 57 . . W l5c27h: ret po ;5c27 e0 . nop ;5c28 00 . nop ;5c29 00 . nop ;5c2a 00 . ex af,af' ;5c2b 08 . inc d ;5c2c 14 . ld (l003ch+2),hl ;5c2d 22 3e 00 " > . l5c30h: pop hl ;5c30 e1 . ld (bc),a ;5c31 02 . ld (bc),a ;5c32 02 . ld a,(bc) ;5c33 0a . ld (de),a ;5c34 12 . ld a,010h ;5c35 3e 10 > . ex af,af' ;5c37 08 . nop ;5c38 00 . sub_5c39h: push hl ;5c39 e5 . ld de,0f72dh ;5c3a 11 2d f7 . - . ld bc,l0006h ;5c3d 01 06 00 . . . ldir ;5c40 ed b0 . . pop hl ;5c42 e1 . ld de,0f733h ;5c43 11 33 f7 . 3 . ld bc,l0006h ;5c46 01 06 00 . . . ldir ;5c49 ed b0 . . ret ;5c4b c9 . sub_5c4ch: ld ix,0f72dh ;5c4c dd 21 2d f7 . ! - . ld iy,0f733h ;5c50 fd 21 33 f7 . ! 3 . ret ;5c54 c9 . sub_5c55h: ld ix,0f71bh ;5c55 dd 21 1b f7 . ! . . ld iy,0f721h ;5c59 fd 21 21 f7 . ! ! . ret ;5c5d c9 . sub_5c5eh: ld hl,0f72dh ;5c5e 21 2d f7 ! - . ld (0f703h),hl ;5c61 22 03 f7 " . . ret ;5c64 c9 . sub_5c65h: ld hl,0f71bh ;5c65 21 1b f7 ! . . ld (0f701h),hl ;5c68 22 01 f7 " . . ld hl,0f6fah ;5c6b 21 fa f6 ! . . ld (0f705h),hl ;5c6e 22 05 f7 " . . ret ;5c71 c9 . sub_5c72h: ld hl,0f6fch ;5c72 21 fc f6 ! . . call sub_5c7eh ;5c75 cd 7e 5c . ~ \ ld hl,0f6ffh ;5c78 21 ff f6 ! . . jp sub_5c7eh ;5c7b c3 7e 5c . ~ \ sub_5c7eh: xor a ;5c7e af . ld (hl),a ;5c7f 77 w dec hl ;5c80 2b + inc a ;5c81 3c < ld (hl),a ;5c82 77 w dec hl ;5c83 2b + ld (hl),a ;5c84 77 w ret ;5c85 c9 . sub_5c86h: ld a,(0f2d0h) ;5c86 3a d0 f2 : . . call sub_5c4ch ;5c89 cd 4c 5c . L \ ld (ix+003h),a ;5c8c dd 77 03 . w . ld (ix+005h),a ;5c8f dd 77 05 . w . ld (iy+003h),a ;5c92 fd 77 03 . w . ld (iy+005h),a ;5c95 fd 77 05 . w . ret ;5c98 c9 . sub_5c99h: ld hl,08083h ;5c99 21 83 80 ! . . jr l5ca1h ;5c9c 18 03 . . sub_5c9eh: ld hl,l0080h+1 ;5c9e 21 81 00 ! . . l5ca1h: ld (0f748h),hl ;5ca1 22 48 f7 " H . ld c,014h ;5ca4 0e 14 . . ld hl,l0000h+2 ;5ca6 21 02 00 ! . . jp sub_4ccch ;5ca9 c3 cc 4c . . L l5cach: push af ;5cac f5 . ld c,012h ;5cad 0e 12 . . call sub_4488h ;5caf cd 88 44 . . D pop af ;5cb2 f1 . ld c,a ;5cb3 4f O call sub_44ach ;5cb4 cd ac 44 . . D jp sub_44b2h ;5cb7 c3 b2 44 . . D sub_5cbah: ld a,0ffh ;5cba 3e ff > . jr l5cach ;5cbc 18 ee . . sub_5cbeh: xor a ;5cbe af . jr l5cach ;5cbf 18 eb . . sub_5cc1h: ld hl,0f2dbh ;5cc1 21 db f2 ! . . jr l5cceh ;5cc4 18 08 . . sub_5cc6h: ld hl,0f2dch ;5cc6 21 dc f2 ! . . jr l5cceh ;5cc9 18 03 . . sub_5ccbh: ld hl,0f2dah ;5ccb 21 da f2 ! . . l5cceh: ld (0f707h),hl ;5cce 22 07 f7 " . . ret ;5cd1 c9 . ld a,c ;5cd2 79 y and a ;5cd3 a7 . ld a,007h ;5cd4 3e 07 > . jr z,l5cd9h ;5cd6 28 01 ( . inc a ;5cd8 3c < l5cd9h: push af ;5cd9 f5 . ld hl,0f2d0h ;5cda 21 d0 f2 ! . . ld a,(0f73bh) ;5cdd 3a 3b f7 : ; . cp 002h ;5ce0 fe 02 . . jr nz,l5ce7h ;5ce2 20 03 . ld hl,0f2cfh ;5ce4 21 cf f2 ! . . l5ce7h: pop af ;5ce7 f1 . ld b,(hl) ;5ce8 46 F cp b ;5ce9 b8 . jr z,l5d54h ;5cea 28 68 ( h ld (hl),a ;5cec 77 w call sub_4cb1h ;5ced cd b1 4c . . L ld d,(ix+003h) ;5cf0 dd 56 03 . V . ld e,(iy+001h) ;5cf3 fd 5e 01 . ^ . ld b,a ;5cf6 47 G ld a,(0f73bh) ;5cf7 3a 3b f7 : ; . and a ;5cfa a7 . jr z,l5d57h ;5cfb 28 5a ( Z cp 002h ;5cfd fe 02 . . jr z,l5d31h ;5cff 28 30 ( 0 push bc ;5d01 c5 . push de ;5d02 d5 . call sub_5c86h ;5d03 cd 86 5c . . \ call sub_5c0fh ;5d06 cd 0f 5c . . \ pop de ;5d09 d1 . pop bc ;5d0a c1 . ld a,b ;5d0b 78 x cp 007h ;5d0c fe 07 . . jr nz,l5d51h ;5d0e 20 41 A call sub_4cb1h ;5d10 cd b1 4c . . L ld a,(iy+001h) ;5d13 fd 7e 01 . ~ . cp 008h ;5d16 fe 08 . . jr nz,l5d2bh ;5d18 20 11 . ld (iy+001h),007h ;5d1a fd 36 01 07 . 6 . . ld a,008h ;5d1e 3e 08 > . ld (0f2d0h),a ;5d20 32 d0 f2 2 . . call sub_50b0h ;5d23 cd b0 50 . . P ld a,007h ;5d26 3e 07 > . ld (0f2d0h),a ;5d28 32 d0 f2 2 . . l5d2bh: call sub_4d0ch ;5d2b cd 0c 4d . . M jp l4ce3h ;5d2e c3 e3 4c . . L l5d31h: ld ix,0f727h ;5d31 dd 21 27 f7 . ! ' . ld (ix+003h),b ;5d35 dd 70 03 . p . ld (ix+005h),b ;5d38 dd 70 05 . p . ld a,b ;5d3b 78 x cp 007h ;5d3c fe 07 . . jr nz,l5d51h ;5d3e 20 11 . call sub_4d0ch ;5d40 cd 0c 4d . . M ld a,d ;5d43 7a z cp e ;5d44 bb . jr nz,l5d54h ;5d45 20 0d . call sub_4cb1h ;5d47 cd b1 4c . . L ld (iy+001h),007h ;5d4a fd 36 01 07 . 6 . . jp l5055h ;5d4e c3 55 50 . U P l5d51h: call sub_4df8h ;5d51 cd f8 4d . . M l5d54h: jp l4ce6h ;5d54 c3 e6 4c . . L l5d57h: ld a,(0f2c9h) ;5d57 3a c9 f2 : . . and a ;5d5a a7 . jr nz,l5d68h ;5d5b 20 0b . call sub_5df5h ;5d5d cd f5 5d . . ] ld a,b ;5d60 78 x cp 007h ;5d61 fe 07 . . jr z,l5d9eh ;5d63 28 39 ( 9 jp l5dech ;5d65 c3 ec 5d . . ] l5d68h: cp 001h ;5d68 fe 01 . . jr nz,l5d96h ;5d6a 20 2a * sla b ;5d6c cb 20 . call sub_5df5h ;5d6e cd f5 5d . . ] ld a,b ;5d71 78 x cp 00eh ;5d72 fe 0e . . jr nz,l5d8bh ;5d74 20 15 . call sub_4d0ch ;5d76 cd 0c 4d . . M call sub_5dffh ;5d79 cd ff 5d . . ] call sub_5dffh ;5d7c cd ff 5d . . ] ld a,d ;5d7f 7a z cp e ;5d80 bb . jr nz,l5defh ;5d81 20 6c l ld a,(0f2d4h) ;5d83 3a d4 f2 : . . and a ;5d86 a7 . jr nz,l5defh ;5d87 20 66 f jr l5daeh ;5d89 18 23 . # l5d8bh: call sub_5e16h ;5d8b cd 16 5e . . ^ call sub_5e16h ;5d8e cd 16 5e . . ^ call sub_5ec0h ;5d91 cd c0 5e . . ^ jr l5defh ;5d94 18 59 . Y l5d96h: call sub_5df5h ;5d96 cd f5 5d . . ] ld a,b ;5d99 78 x cp 007h ;5d9a fe 07 . . jr nz,l5db4h ;5d9c 20 16 . l5d9eh: call sub_4d0ch ;5d9e cd 0c 4d . . M call sub_5dffh ;5da1 cd ff 5d . . ] ld a,d ;5da4 7a z cp e ;5da5 bb . jr nz,l5d54h ;5da6 20 ac . ld a,(0f2d4h) ;5da8 3a d4 f2 : . . and a ;5dab a7 . jr nz,l5df2h ;5dac 20 44 D l5daeh: ld a,d ;5dae 7a z call sub_533dh ;5daf cd 3d 53 . = S jr l5df2h ;5db2 18 3e . > l5db4h: call sub_5e16h ;5db4 cd 16 5e . . ^ ld hl,(0f701h) ;5db7 2a 01 f7 * . . ld de,(0f703h) ;5dba ed 5b 03 f7 . [ . . push hl ;5dbe e5 . push de ;5dbf d5 . ld hl,0f71bh ;5dc0 21 1b f7 ! . . ld (0f701h),hl ;5dc3 22 01 f7 " . . ld hl,0f72dh ;5dc6 21 2d f7 ! - . ld (0f703h),hl ;5dc9 22 03 f7 " . . call sub_535eh ;5dcc cd 5e 53 . ^ S ld hl,0f721h ;5dcf 21 21 f7 ! ! . ld (0f701h),hl ;5dd2 22 01 f7 " . . ld hl,0f733h ;5dd5 21 33 f7 ! 3 . ld (0f703h),hl ;5dd8 22 03 f7 " . . call sub_535eh ;5ddb cd 5e 53 . ^ S pop de ;5dde d1 . pop hl ;5ddf e1 . ld (0f703h),de ;5de0 ed 53 03 f7 . S . . ld (0f701h),hl ;5de4 22 01 f7 " . . call sub_5e95h ;5de7 cd 95 5e . . ^ jr l5df2h ;5dea 18 06 . . l5dech: call sub_5e16h ;5dec cd 16 5e . . ^ l5defh: call sub_535eh ;5def cd 5e 53 . ^ S l5df2h: jp l4ce3h ;5df2 c3 e3 4c . . L sub_5df5h: call sub_5c4ch ;5df5 cd 4c 5c . L \ ld (ix+005h),b ;5df8 dd 70 05 . p . ld (iy+005h),b ;5dfb fd 70 05 . p . ret ;5dfe c9 . sub_5dffh: ld ix,0f72dh ;5dff dd 21 2d f7 . ! - . ld iy,0f733h ;5e03 fd 21 33 f7 . ! 3 . ld a,(ix+003h) ;5e07 dd 7e 03 . ~ . dec a ;5e0a 3d = ld (ix+003h),a ;5e0b dd 77 03 . w . ld a,(iy+003h) ;5e0e fd 7e 03 . ~ . dec a ;5e11 3d = ld (iy+003h),a ;5e12 fd 77 03 . w . ret ;5e15 c9 . sub_5e16h: ld ix,0f72dh ;5e16 dd 21 2d f7 . ! - . ld iy,0f71bh ;5e1a fd 21 1b f7 . ! . . call sub_5e2ch ;5e1e cd 2c 5e . , ^ ld ix,0f733h ;5e21 dd 21 33 f7 . ! 3 . ld iy,0f721h ;5e25 fd 21 21 f7 . ! ! . jp sub_5e2ch ;5e29 c3 2c 5e . , ^ sub_5e2ch: ld a,(ix+003h) ;5e2c dd 7e 03 . ~ . ld b,(iy+005h) ;5e2f fd 46 05 . F . cp b ;5e32 b8 . jr nz,l5e3dh ;5e33 20 08 . ld a,(ix+001h) ;5e35 dd 7e 01 . ~ . dec a ;5e38 3d = ld (ix+001h),a ;5e39 dd 77 01 . w . ret ;5e3c c9 . l5e3dh: inc a ;5e3d 3c < ld (ix+003h),a ;5e3e dd 77 03 . w . ret ;5e41 c9 . call sub_5e48h ;5e42 cd 48 5e . H ^ jp l4ce6h ;5e45 c3 e6 4c . . L sub_5e48h: ld a,(0f73bh) ;5e48 3a 3b f7 : ; . and a ;5e4b a7 . ret nz ;5e4c c0 . ld a,(0f2cah) ;5e4d 3a ca f2 : . . and a ;5e50 a7 . ld a,c ;5e51 79 y ld (0f2cah),a ;5e52 32 ca f2 2 . . jr nz,l5e67h ;5e55 20 10 . and a ;5e57 a7 . ret z ;5e58 c8 . call sub_5cc6h ;5e59 cd c6 5c . . \ ld hl,0f721h ;5e5c 21 21 f7 ! ! . ld de,0f6fdh ;5e5f 11 fd f6 . . . ld bc,0f733h ;5e62 01 33 f7 . 3 . jr l5e75h ;5e65 18 0e . . l5e67h: and a ;5e67 a7 . ret nz ;5e68 c0 . call sub_5cc1h ;5e69 cd c1 5c . . \ ld hl,0f71bh ;5e6c 21 1b f7 ! . . ld de,0f6fah ;5e6f 11 fa f6 . . . ld bc,0f72dh ;5e72 01 2d f7 . - . l5e75h: ld (0f701h),hl ;5e75 22 01 f7 " . . ld (0f705h),de ;5e78 ed 53 05 f7 . S . . ld (0f703h),bc ;5e7c ed 43 03 f7 . C . . call sub_535eh ;5e80 cd 5e 53 . ^ S call sub_4e9dh ;5e83 cd 9d 4e . . N call sub_4e26h ;5e86 cd 26 4e . & N jp sub_53c1h ;5e89 c3 c1 53 . . S ld c,000h ;5e8c 0e 00 . . jr l5e92h ;5e8e 18 02 . . ld c,001h ;5e90 0e 01 . . l5e92h: jp sub_5e48h ;5e92 c3 48 5e . H ^ sub_5e95h: ld ix,0f72dh ;5e95 dd 21 2d f7 . ! - . ld b,(ix+005h) ;5e99 dd 46 05 . F . ld a,(ix+004h) ;5e9c dd 7e 04 . ~ . ld (0f748h),a ;5e9f 32 48 f7 2 H . ld a,001h ;5ea2 3e 01 > . ld (0f74ah),a ;5ea4 32 4a f7 2 J . ld a,(0f2d9h) ;5ea7 3a d9 f2 : . . ld (0f74bh),a ;5eaa 32 4b f7 2 K . ld a,008h ;5ead 3e 08 > . ld (0f749h),a ;5eaf 32 49 f7 2 I . l5eb2h: push af ;5eb2 f5 . push bc ;5eb3 c5 . call sub_4cc7h ;5eb4 cd c7 4c . . L pop bc ;5eb7 c1 . pop af ;5eb8 f1 . inc a ;5eb9 3c < ld (0f749h),a ;5eba 32 49 f7 2 I . djnz l5eb2h ;5ebd 10 f3 . . ret ;5ebf c9 . sub_5ec0h: ld ix,(0f703h) ;5ec0 dd 2a 03 f7 . * . . ld c,027h ;5ec4 0e 27 . ' ld d,002h ;5ec6 16 02 . . l5ec8h: ld b,(ix+005h) ;5ec8 dd 46 05 . F . srl b ;5ecb cb 38 . 8 ld hl,0f748h ;5ecd 21 48 f7 ! H . ld (hl),c ;5ed0 71 q inc hl ;5ed1 23 # ld e,008h ;5ed2 1e 08 . . ld (hl),e ;5ed4 73 s inc hl ;5ed5 23 # ld (hl),001h ;5ed6 36 01 6 . inc hl ;5ed8 23 # ld a,(0f2d8h) ;5ed9 3a d8 f2 : . . ld (hl),a ;5edc 77 w dec hl ;5edd 2b + dec hl ;5ede 2b + l5edfh: push bc ;5edf c5 . push de ;5ee0 d5 . push hl ;5ee1 e5 . call sub_4cc7h ;5ee2 cd c7 4c . . L pop hl ;5ee5 e1 . pop de ;5ee6 d1 . pop bc ;5ee7 c1 . inc e ;5ee8 1c . ld (hl),e ;5ee9 73 s djnz l5edfh ;5eea 10 f3 . . inc c ;5eec 0c . dec d ;5eed 15 . jr nz,l5ec8h ;5eee 20 d8 . ret ;5ef0 c9 . l5ef1h: add a,c ;5ef1 81 . nop ;5ef2 00 . sub l ;5ef3 95 . nop ;5ef4 00 . sub (hl) ;5ef5 96 . ld c,096h ;5ef6 0e 96 . . add a,a ;5ef8 87 . sub (hl) ;5ef9 96 . add a,a ;5efa 87 . ld b,b ;5efb 40 @ ret po ;5efc e0 . sub l ;5efd 95 . nop ;5efe 00 . rst 18h ;5eff df . and b ;5f00 a0 . l5f01h: add a,c ;5f01 81 . nop ;5f02 00 . add a,e ;5f03 83 . add a,b ;5f04 80 . sub e ;5f05 93 . adc a,(hl) ;5f06 8e . sub e ;5f07 93 . sub b ;5f08 90 . sub l ;5f09 95 . ld b,c ;5f0a 41 A ex af,af' ;5f0b 08 . ret po ;5f0c e0 . sub d ;5f0d 92 . add a,b ;5f0e 80 . rst 18h ;5f0f df . ld h,b ;5f10 60 ` l5f11h: ld bc,l5001h ;5f11 01 01 50 . . P ex af,af' ;5f14 08 . ld d,b ;5f15 50 P ex af,af' ;5f16 08 . ld bc,l5009h ;5f17 01 09 50 . . P djnz l5f6ch ;5f1a 10 50 . P ex af,af' ;5f1c 08 . l5f1dh: ld a,(0f73bh) ;5f1d 3a 3b f7 : ; . cp 001h ;5f20 fe 01 . . jr z,l5f6fh ;5f22 28 4b ( K ld ix,(0f701h) ;5f24 dd 2a 01 f7 . * . . l5f28h: push hl ;5f28 e5 . push bc ;5f29 c5 . push de ;5f2a d5 . call sub_5fe0h ;5f2b cd e0 5f . . _ pop de ;5f2e d1 . pop bc ;5f2f c1 . ld hl,0f789h ;5f30 21 89 f7 ! . . ld (hl),000h ;5f33 36 00 6 . call sub_5f72h ;5f35 cd 72 5f . r _ pop hl ;5f38 e1 . jr c,l5f6fh ;5f39 38 34 8 4 push hl ;5f3b e5 . ld hl,0f789h ;5f3c 21 89 f7 ! . . call sub_5f7fh ;5f3f cd 7f 5f .  _ call sub_5f8dh ;5f42 cd 8d 5f . . _ call sub_5f96h ;5f45 cd 96 5f . . _ pop hl ;5f48 e1 . call sub_5fb3h ;5f49 cd b3 5f . . _ ld a,(0f789h) ;5f4c 3a 89 f7 : . . bit 1,a ;5f4f cb 4f . O jr nz,l5f6dh ;5f51 20 1a . bit 0,a ;5f53 cb 47 . G jr nz,l5f5ch ;5f55 20 05 . ld b,001h ;5f57 06 01 . . inc c ;5f59 0c . jr l5f28h ;5f5a 18 cc . . l5f5ch: push de ;5f5c d5 . pop bc ;5f5d c1 . push hl ;5f5e e5 . pop de ;5f5f d1 . ld (hl),000h ;5f60 36 00 6 . inc de ;5f62 13 . dec bc ;5f63 0b . ld a,b ;5f64 78 x and c ;5f65 a1 . jr z,l5f6ah ;5f66 28 02 ( . ldir ;5f68 ed b0 . . l5f6ah: ld a,001h ;5f6a 3e 01 > . l5f6ch: ret ;5f6c c9 . l5f6dh: xor a ;5f6d af . ret ;5f6e c9 . l5f6fh: ld a,0ffh ;5f6f 3e ff > . ret ;5f71 c9 . sub_5f72h: ld a,(ix+004h) ;5f72 dd 7e 04 . ~ . cp b ;5f75 b8 . ret c ;5f76 d8 . ld a,(ix+005h) ;5f77 dd 7e 05 . ~ . cp c ;5f7a b9 . ret nz ;5f7b c0 . set 0,(hl) ;5f7c cb c6 . . ret ;5f7e c9 . sub_5f7fh: ld a,d ;5f7f 7a z and a ;5f80 a7 . ld a,(ix+004h) ;5f81 dd 7e 04 . ~ . ret nz ;5f84 c0 . sub b ;5f85 90 . inc a ;5f86 3c < cp e ;5f87 bb . ret c ;5f88 d8 . set 1,(hl) ;5f89 cb ce . . ld a,e ;5f8b 7b { ret ;5f8c c9 . sub_5f8dh: ex de,hl ;5f8d eb . ld d,000h ;5f8e 16 00 . . ld e,a ;5f90 5f _ and a ;5f91 a7 . sbc hl,de ;5f92 ed 52 . R ex de,hl ;5f94 eb . ret ;5f95 c9 . sub_5f96h: ld hl,0f74ah ;5f96 21 4a f7 ! J . ld (hl),a ;5f99 77 w dec hl ;5f9a 2b + ld a,(0f73bh) ;5f9b 3a 3b f7 : ; . and a ;5f9e a7 . ld a,(ix+001h) ;5f9f dd 7e 01 . ~ . jr nz,l5fa6h ;5fa2 20 02 . add a,010h ;5fa4 c6 10 . . l5fa6h: add a,c ;5fa6 81 . dec a ;5fa7 3d = dec a ;5fa8 3d = ld (hl),a ;5fa9 77 w dec hl ;5faa 2b + ld a,(ix+000h) ;5fab dd 7e 00 . ~ . add a,b ;5fae 80 . dec a ;5faf 3d = dec a ;5fb0 3d = ld (hl),a ;5fb1 77 w ret ;5fb2 c9 . sub_5fb3h: push bc ;5fb3 c5 . push de ;5fb4 d5 . push hl ;5fb5 e5 . ld c,034h ;5fb6 0e 34 . 4 ld hl,l0003h ;5fb8 21 03 00 ! . . call sub_4ccch ;5fbb cd cc 4c . . L pop de ;5fbe d1 . ld b,000h ;5fbf 06 00 . . ld a,(0f74ah) ;5fc1 3a 4a f7 : J . ld c,a ;5fc4 4f O call sub_44e9h ;5fc5 cd e9 44 . . D ld b,c ;5fc8 41 A l5fc9h: push bc ;5fc9 c5 . ld c,000h ;5fca 0e 00 . . call 0ecf9h ;5fcc cd f9 ec . . . push hl ;5fcf e5 . call sub_5fe9h ;5fd0 cd e9 5f . . _ pop hl ;5fd3 e1 . ld c,000h ;5fd4 0e 00 . . call 0ecffh ;5fd6 cd ff ec . . . pop bc ;5fd9 c1 . inc hl ;5fda 23 # djnz l5fc9h ;5fdb 10 ec . . pop de ;5fdd d1 . pop bc ;5fde c1 . ret ;5fdf c9 . sub_5fe0h: ld d,000h ;5fe0 16 00 . . call sub_5633h ;5fe2 cd 33 56 . 3 V ld (0f78ah),hl ;5fe5 22 8a f7 " . . ret ;5fe8 c9 . sub_5fe9h: ld hl,(0f78ah) ;5fe9 2a 8a f7 * . . ld b,00dh ;5fec 06 0d . . l5feeh: cp (hl) ;5fee be . jr z,l5ff5h ;5fef 28 04 ( . inc hl ;5ff1 23 # djnz l5feeh ;5ff2 10 fa . . ret ;5ff4 c9 . l5ff5h: dec b ;5ff5 05 . ld d,000h ;5ff6 16 00 . . ld e,b ;5ff8 58 X ld hl,l56e3h ;5ff9 21 e3 56 ! . V add hl,de ;5ffc 19 . ld a,(hl) ;5ffd 7e ~ ret ;5ffe c9 . nop ;5fff 00 . l6000h: ld a,(0f078h) ;6000 3a 78 f0 : x . and 001h ;6003 e6 01 . . jr nz,l603fh ;6005 20 38 8 ld a,c ;6007 79 y sub 00dh ;6008 d6 0d . . jr c,l603fh ;600a 38 33 8 3 cp 021h ;600c fe 21 . ! jr nc,l603fh ;600e 30 2f 0 / ld (0f7b0h),bc ;6010 ed 43 b0 f7 . C . . ld (0f7b2h),de ;6014 ed 53 b2 f7 . S . . ld hl,l0000h ;6018 21 00 00 ! . . ld (0f78ch),hl ;601b 22 8c f7 " . . ex de,hl ;601e eb . ld hl,l6cach ;601f 21 ac 6c ! . l push hl ;6022 e5 . ld hl,l604ch ;6023 21 4c 60 ! L ` call sub_6042h ;6026 cd 42 60 . B ` ld de,(0f4efh) ;6029 ed 5b ef f4 . [ . . ld a,(0f07ah) ;602d 3a 7a f0 : z . and 097h ;6030 e6 97 . . ld (0f07ah),a ;6032 32 7a f0 2 z . jp (hl) ;6035 e9 . l6036h: pop bc ;6036 c1 . ld bc,(0f7b0h) ;6037 ed 4b b0 f7 . K . . ld de,(0f7b2h) ;603b ed 5b b2 f7 . [ . . l603fh: jp l1d5fh ;603f c3 5f 1d . _ . sub_6042h: ld e,a ;6042 5f _ sub_6043h: ld d,000h ;6043 16 00 . . add hl,de ;6045 19 . add hl,de ;6046 19 . ld e,(hl) ;6047 5e ^ inc hl ;6048 23 # ld d,(hl) ;6049 56 V ex de,hl ;604a eb . ret ;604b c9 . l604ch: halt ;604c 76 v ld l,e ;604d 6b k ld a,a ;604e 7f  ld l,e ;604f 6b k sub (hl) ;6050 96 . ld l,e ;6051 6b k sbc a,h ;6052 9c . ld l,e ;6053 6b k and d ;6054 a2 . ld l,e ;6055 6b k push bc ;6056 c5 . ld l,e ;6057 6b k pop de ;6058 d1 . ld l,e ;6059 6b k jp po,0e86bh ;605a e2 6b e8 . k . ld l,e ;605d 6b k xor 06bh ;605e ee 6b . k call p,0fa6bh ;6060 f4 6b fa . k . ld l,e ;6063 6b k ld c,06ch ;6064 0e 6c . l ld (hl),060h ;6066 36 60 6 ` inc d ;6068 14 . ld l,h ;6069 6c l rra ;606a 1f . ld l,h ;606b 6c l jr z,l60dah ;606c 28 6c ( l ld (0386ch),a ;606e 32 6c 38 2 l 8 ld l,h ;6071 6c l ld (hl),060h ;6072 36 60 6 ` ld b,d ;6074 42 B ld l,h ;6075 6c l ld c,b ;6076 48 H ld l,h ;6077 6c l ld c,(hl) ;6078 4e N ld l,h ;6079 6c l ld d,h ;607a 54 T ld l,h ;607b 6c l ld e,d ;607c 5a Z ld l,h ;607d 6c l ld (hl),060h ;607e 36 60 6 ` ld (hl),060h ;6080 36 60 6 ` ld (hl),060h ;6082 36 60 6 ` ld a,(de) ;6084 1a . ld l,e ;6085 6b k ld l,(hl) ;6086 6e n ld h,a ;6087 67 g exx ;6088 d9 . ld h,(hl) ;6089 66 f ld a,e ;608a 7b { ld l,h ;608b 6c l xor (hl) ;608c ae . ld h,(hl) ;608d 66 f sub_608eh: ld b,000h ;608e 06 00 . . ld a,(00106h) ;6090 3a 06 01 : . . ld a,(00206h) ;6093 3a 06 02 : . . ld a,(l0306h) ;6096 3a 06 03 : . . ld a,(l0506h) ;6099 3a 06 05 : . . ld a,(00a06h) ;609c 3a 06 0a : . . ld a,(00b06h) ;609f 3a 06 0b : . . ld a,(l0c06h) ;60a2 3a 06 0c : . . ld a,(00d06h) ;60a5 3a 06 0d : . . ld a,(l0e06h) ;60a8 3a 06 0e : . . ld a,(l1106h) ;60ab 3a 06 11 : . . ld a,(l1406h) ;60ae 3a 06 14 : . . ld a,(l1006h) ;60b1 3a 06 10 : . . jp sub_2c43h ;60b4 c3 43 2c . C , l60b7h: nop ;60b7 00 . nop ;60b8 00 . rst 38h ;60b9 ff . dec b ;60ba 05 . rst 38h ;60bb ff . dec b ;60bc 05 . rst 38h ;60bd ff . dec b ;60be 05 . rst 38h ;60bf ff . dec b ;60c0 05 . rst 38h ;60c1 ff . nop ;60c2 00 . rst 38h ;60c3 ff . nop ;60c4 00 . rst 38h ;60c5 ff . dec b ;60c6 05 . rst 38h ;60c7 ff . nop ;60c8 00 . rst 38h ;60c9 ff . dec b ;60ca 05 . ld bc,0ff00h ;60cb 01 00 ff . . . dec b ;60ce 05 . ld bc,l0400h ;60cf 01 00 04 . . . nop ;60d2 00 . rst 38h ;60d3 ff . dec b ;60d4 05 . rst 38h ;60d5 ff . nop ;60d6 00 . rst 38h ;60d7 ff . nop ;60d8 00 . rst 38h ;60d9 ff . l60dah: dec b ;60da 05 . rst 38h ;60db ff . dec b ;60dc 05 . l60ddh: ld c,001h ;60dd 0e 01 . . ld a,(l020eh) ;60df 3a 0e 02 : . . ld a,(l030dh+1) ;60e2 3a 0e 03 : . . ld a,(l040dh+1) ;60e5 3a 0e 04 : . . ld a,(l050eh) ;60e8 3a 0e 05 : . . ld a,(l060eh) ;60eb 3a 0e 06 : . . ld a,(l070dh+1) ;60ee 3a 0e 07 : . . ld a,(l080eh) ;60f1 3a 0e 08 : . . ld a,(0090eh) ;60f4 3a 0e 09 : . . ld a,(l0a0eh) ;60f7 3a 0e 0a : . . ld a,(l0b0eh) ;60fa 3a 0e 0b : . . ld a,(00c0eh) ;60fd 3a 0e 0c : . . ld a,(00d0eh) ;6100 3a 0e 0d : . . ld a,(l0e0eh) ;6103 3a 0e 0e : . . ld a,(l0f0eh) ;6106 3a 0e 0f : . . ld a,(l100eh) ;6109 3a 0e 10 : . . ld a,(l110eh) ;610c 3a 0e 11 : . . ld a,(0120eh) ;610f 3a 0e 12 : . . ld a,c ;6112 79 y ld (0f78ch),a ;6113 32 8c f7 2 . . ld a,(0f07ah) ;6116 3a 7a f0 : z . and 040h ;6119 e6 40 . @ ret nz ;611b c0 . jp sub_63b9h ;611c c3 b9 63 . . c sub_611fh: ld hl,(0f35dh) ;611f 2a 5d f3 * ] . ld (hl),c ;6122 71 q ld bc,(0f791h) ;6123 ed 4b 91 f7 . K . . call sub_617fh ;6127 cd 7f 61 .  a ld (hl),0ffh ;612a 36 ff 6 . ld h,b ;612c 60 ` ld l,c ;612d 69 i ret ;612e c9 . sub_612fh: ld hl,l7ff8h ;612f 21 f8 7f ! .  jr l6137h ;6132 18 03 . . sub_6134h: ld hl,0f01eh ;6134 21 1e f0 ! . . l6137h: ld bc,l0006h+2 ;6137 01 08 00 . . . ldir ;613a ed b0 . . ret ;613c c9 . sub_613dh: ld de,0f828h ;613d 11 28 f8 . ( . push hl ;6140 e5 . push de ;6141 d5 . ld c,000h ;6142 0e 00 . . call l420dh ;6144 cd 0d 42 . . B pop hl ;6147 e1 . ld a,(hl) ;6148 7e ~ inc hl ;6149 23 # ld b,(hl) ;614a 46 F inc hl ;614b 23 # ld c,(hl) ;614c 4e N ld (hl),a ;614d 77 w dec hl ;614e 2b + ld (hl),c ;614f 71 q dec hl ;6150 2b + ld (hl),b ;6151 70 p ex de,hl ;6152 eb . pop hl ;6153 e1 . ld b,006h ;6154 06 06 . . l6156h: ld a,(de) ;6156 1a . call sub_6162h ;6157 cd 62 61 . b a ld (hl),c ;615a 71 q inc hl ;615b 23 # ld (hl),a ;615c 77 w inc hl ;615d 23 # inc de ;615e 13 . djnz l6156h ;615f 10 f5 . . ret ;6161 c9 . sub_6162h: push af ;6162 f5 . rra ;6163 1f . rra ;6164 1f . rra ;6165 1f . rra ;6166 1f . call sub_616ch ;6167 cd 6c 61 . l a ld c,a ;616a 4f O pop af ;616b f1 . sub_616ch: and 00fh ;616c e6 0f . . or 030h ;616e f6 30 . 0 ret ;6170 c9 . sub_6171h: xor a ;6171 af . l6172h: ld (hl),a ;6172 77 w ld d,h ;6173 54 T ld e,l ;6174 5d ] inc de ;6175 13 . ldir ;6176 ed b0 . . ret ;6178 c9 . sub_6179h: push hl ;6179 e5 . call sub_6425h ;617a cd 25 64 . % d pop hl ;617d e1 . dec hl ;617e 2b + sub_617fh: inc hl ;617f 23 # sub_6180h: ld (hl),b ;6180 70 p inc hl ;6181 23 # ld (hl),c ;6182 71 q inc hl ;6183 23 # ret ;6184 c9 . sub_6185h: ld de,l0000h ;6185 11 00 00 . . . ld a,(0f2ddh) ;6188 3a dd f2 : . . or a ;618b b7 . ret z ;618c c8 . ld a,(0f2deh) ;618d 3a de f2 : . . ld b,a ;6190 47 G inc b ;6191 04 . and 00fh ;6192 e6 0f . . scf ;6194 37 7 ld a,b ;6195 78 x l6196h: ret z ;6196 c8 . rl e ;6197 cb 13 . . rl d ;6199 cb 12 . . dec a ;619b 3d = jr l6196h ;619c 18 f8 . . sub_619eh: ld a,(0f790h) ;619e 3a 90 f7 : . . l61a1h: ld de,00104h ;61a1 11 04 01 . . . ld c,03fh ;61a4 0e 3f . ? call sub_611fh ;61a6 cd 1f 61 . . a ld c,a ;61a9 4f O ld a,001h ;61aa 3e 01 > . call 060b2h ;61ac cd b2 60 . . ` or a ;61af b7 . ret ;61b0 c9 . sub_61b1h: ld a,(0f790h) ;61b1 3a 90 f7 : . . sub_61b4h: ld c,044h ;61b4 0e 44 . D l61b6h: ld de,00104h ;61b6 11 04 01 . . . call sub_611fh ;61b9 cd 1f 61 . . a ld c,a ;61bc 4f O call 060ach ;61bd cd ac 60 . . ` or a ;61c0 b7 . ret ;61c1 c9 . sub_61c2h: call sub_61d8h ;61c2 cd d8 61 . . a ld a,(0f2e2h) ;61c5 3a e2 f2 : . . and 07fh ;61c8 e6 7f .  jr l61a1h ;61ca 18 d5 . . sub_61cch: ldir ;61cc ed b0 . . xor a ;61ce af . call sub_61b4h ;61cf cd b4 61 . . a jr sub_61d8h ;61d2 18 04 . . sub_61d4h: ld a,080h ;61d4 3e 80 > . jr l61b6h ;61d6 18 de . . sub_61d8h: ld hl,(0f795h) ;61d8 2a 95 f7 * . . inc hl ;61db 23 # inc hl ;61dc 23 # ld (0f795h),hl ;61dd 22 95 f7 " . . sub_61e0h: ld hl,(0f791h) ;61e0 2a 91 f7 * . . inc hl ;61e3 23 # ld (0f791h),hl ;61e4 22 91 f7 " . . ret ;61e7 c9 . sub_61e8h: ld hl,(0f79dh) ;61e8 2a 9d f7 * . . inc hl ;61eb 23 # ld (0f79dh),hl ;61ec 22 9d f7 " . . ret ;61ef c9 . sub_61f0h: ld hl,(0f795h) ;61f0 2a 95 f7 * . . ld d,h ;61f3 54 T ld e,l ;61f4 5d ] inc hl ;61f5 23 # inc hl ;61f6 23 # ld a,h ;61f7 7c | or l ;61f8 b5 . ret z ;61f9 c8 . ld hl,(0f793h) ;61fa 2a 93 f7 * . . push hl ;61fd e5 . sbc hl,de ;61fe ed 52 . R pop hl ;6200 e1 . ret c ;6201 d8 . inc de ;6202 13 . inc de ;6203 13 . inc de ;6204 13 . inc de ;6205 13 . sbc hl,de ;6206 ed 52 . R ccf ;6208 3f ? ret c ;6209 d8 . ld de,l0003h+2 ;620a 11 05 00 . . . add hl,de ;620d 19 . ld a,l ;620e 7d } ld b,a ;620f 47 G cp 003h ;6210 fe 03 . . jp nc,l62bch ;6212 d2 bc 62 . . b l6215h: ld hl,(0f35dh) ;6215 2a 5d f3 * ] . ld de,l0003h+1 ;6218 11 04 00 . . . dec a ;621b 3d = jr z,l6221h ;621c 28 03 ( . ld de,00084h ;621e 11 84 00 . . . l6221h: add hl,de ;6221 19 . ex de,hl ;6222 eb . ld a,b ;6223 78 x or a ;6224 b7 . ret ;6225 c9 . sub_6226h: ld a,001h ;6226 3e 01 > . jr l6215h ;6228 18 eb . . l622ah: call sub_61f0h ;622a cd f0 61 . . a jr c,l626dh ;622d 38 3e 8 > jr nz,l624fh ;622f 20 1e . call sub_667dh ;6231 cd 7d 66 . } f jr nc,l626ah ;6234 30 34 0 4 call sub_61d8h ;6236 cd d8 61 . . a ld hl,(0f791h) ;6239 2a 91 f7 * . . ld de,(0f79dh) ;623c ed 5b 9d f7 . [ . . sbc hl,de ;6240 ed 52 . R jr nc,l626dh ;6242 30 29 0 ) call sub_619eh ;6244 cd 9e 61 . . a ret nz ;6247 c0 . ld a,003h ;6248 3e 03 > . ld (0f797h),a ;624a 32 97 f7 2 . . jr l622ah ;624d 18 db . . l624fh: ld a,(0f797h) ;624f 3a 97 f7 : . . and b ;6252 a0 . jr z,l626ah ;6253 28 15 ( . ld hl,(0f793h) ;6255 2a 93 f7 * . . ld bc,(0f79fh) ;6258 ed 4b 9f f7 . K . . or a ;625c b7 . sbc hl,bc ;625d ed 42 . B jr nc,l626dh ;625f 30 0c 0 . ld hl,(0f342h) ;6261 2a 42 f3 * B . ex de,hl ;6264 eb . jr l62b7h ;6265 18 50 . P l6267h: jp 060fbh ;6267 c3 fb 60 . . ` l626ah: jp 060feh ;626a c3 fe 60 . . ` l626dh: ld a,(0f7a7h) ;626d 3a a7 f7 : . . and 080h ;6270 e6 80 . . jr z,l626ah ;6272 28 f6 ( . jp 06101h ;6274 c3 01 61 . . a sub_6277h: call sub_667dh ;6277 cd 7d 66 . } f jr c,l6267h ;627a 38 eb 8 . l627ch: call sub_61f0h ;627c cd f0 61 . . a jr c,l6267h ;627f 38 e6 8 . jr nz,l629ah ;6281 20 17 . ld a,(0f797h) ;6283 3a 97 f7 : . . sub 003h ;6286 d6 03 . . jr nz,l6267h ;6288 20 dd . call sub_61b1h ;628a cd b1 61 . . a ret nz ;628d c0 . call sub_61d8h ;628e cd d8 61 . . a call sub_61e8h ;6291 cd e8 61 . . a xor a ;6294 af . ld (0f797h),a ;6295 32 97 f7 2 . . jr l627ch ;6298 18 e2 . . l629ah: ld a,(0f797h) ;629a 3a 97 f7 : . . ld c,a ;629d 4f O and b ;629e a0 . jr nz,l62b4h ;629f 20 13 . ld hl,(0f79fh) ;62a1 2a 9f f7 * . . inc hl ;62a4 23 # ld (0f79fh),hl ;62a5 22 9f f7 " . . ld hl,(0f905h) ;62a8 2a 05 f9 * . . inc hl ;62ab 23 # ld (0f905h),hl ;62ac 22 05 f9 " . . ld a,c ;62af 79 y or b ;62b0 b0 . ld (0f797h),a ;62b1 32 97 f7 2 . . l62b4h: ld hl,(0f342h) ;62b4 2a 42 f3 * B . l62b7h: ld bc,l0080h ;62b7 01 80 00 . . . ldir ;62ba ed b0 . . l62bch: xor a ;62bc af . ret ;62bd c9 . sub_62beh: ld hl,0f0dbh ;62be 21 db f0 ! . . set 1,(hl) ;62c1 cb ce . . ret ;62c3 c9 . sub_62c4h: call sub_62beh ;62c4 cd be 62 . . b call sub_63ebh ;62c7 cd eb 63 . . c or a ;62ca b7 . ret nz ;62cb c0 . ld hl,(0f2e3h) ;62cc 2a e3 f2 * . . call sub_63e5h ;62cf cd e5 63 . . c ret nz ;62d2 c0 . sub_62d3h: ld hl,l0000h ;62d3 21 00 00 ! . . ld (0f791h),hl ;62d6 22 91 f7 " . . ld c,048h ;62d9 0e 48 . H ld a,(0450eh) ;62db 3a 0e 45 : . E ld a,(0f2e2h) ;62de 3a e2 f2 : . . or 080h ;62e1 f6 80 . . push bc ;62e3 c5 . call l61a1h ;62e4 cd a1 61 . . a pop bc ;62e7 c1 . ret nz ;62e8 c0 . ld a,c ;62e9 79 y sub 045h ;62ea d6 45 . E ret z ;62ec c8 . ld hl,(0f35dh) ;62ed 2a 5d f3 * ] . ld de,00042h ;62f0 11 42 00 . B . add hl,de ;62f3 19 . ex de,hl ;62f4 eb . call sub_669dh ;62f5 cd 9d 66 . . f jp nz,06104h ;62f8 c2 04 61 . . a call sub_637dh ;62fb cd 7d 63 . } c dec hl ;62fe 2b + ld (0f791h),hl ;62ff 22 91 f7 " . . dec hl ;6302 2b + dec hl ;6303 2b + ld (0f795h),hl ;6304 22 95 f7 " . . ret ;6307 c9 . sub_6308h: ld hl,(0f35dh) ;6308 2a 5d f3 * ] . ld de,00040h ;630b 11 40 00 . @ . add hl,de ;630e 19 . ld a,(hl) ;630f 7e ~ xor b ;6310 a8 . ret nz ;6311 c0 . inc hl ;6312 23 # ld a,(hl) ;6313 7e ~ xor c ;6314 a9 . ret ;6315 c9 . sub_6316h: push bc ;6316 c5 . push de ;6317 d5 . push af ;6318 f5 . push hl ;6319 e5 . call sub_6226h ;631a cd 26 62 . & b ex de,hl ;631d eb . ld (hl),048h ;631e 36 48 6 H inc hl ;6320 23 # ld (hl),044h ;6321 36 44 6 D inc hl ;6323 23 # ld (hl),052h ;6324 36 52 6 R inc hl ;6326 23 # ld (hl),031h ;6327 36 31 6 1 inc hl ;6329 23 # pop de ;632a d1 . ex de,hl ;632b eb . ld bc,l000fh+1 ;632c 01 10 00 . . . ldir ;632f ed b0 . . ex de,hl ;6331 eb . ld a,(0f363h) ;6332 3a 63 f3 : c . call sub_616ch ;6335 cd 6c 61 . l a ld (hl),a ;6338 77 w inc hl ;6339 23 # pop af ;633a f1 . ld (hl),a ;633b 77 w inc hl ;633c 23 # ld (hl),030h ;633d 36 30 6 0 inc hl ;633f 23 # ld (hl),030h ;6340 36 30 6 0 inc hl ;6342 23 # ld (hl),032h ;6343 36 32 6 2 inc hl ;6345 23 # ld (hl),035h ;6346 36 35 6 5 inc hl ;6348 23 # ld (hl),036h ;6349 36 36 6 6 inc hl ;634b 23 # call sub_6179h ;634c cd 79 61 . y a pop bc ;634f c1 . call sub_6180h ;6350 cd 80 61 . . a inc hl ;6353 23 # call sub_613dh ;6354 cd 3d 61 . = a ld de,l0006h ;6357 11 06 00 . . . add hl,de ;635a 19 . ld bc,(0f8dfh) ;635b ed 4b df f8 . K . . call sub_6180h ;635f cd 80 61 . . a ex de,hl ;6362 eb . call sub_612fh ;6363 cd 2f 61 . / a ex de,hl ;6366 eb . pop bc ;6367 c1 . call sub_6180h ;6368 cd 80 61 . . a ex de,hl ;636b eb . call sub_6134h ;636c cd 34 61 . 4 a ld c,048h ;636f 0e 48 . H ld hl,l0000h ;6371 21 00 00 ! . . ld (0f791h),hl ;6374 22 91 f7 " . . call sub_61d4h ;6377 cd d4 61 . . a jp nz,sub_63b9h ;637a c2 b9 63 . . c sub_637dh: ld h,a ;637d 67 g ld l,a ;637e 6f o ld (0f793h),hl ;637f 22 93 f7 " . . ld (0f795h),hl ;6382 22 95 f7 " . . ld (0f79dh),hl ;6385 22 9d f7 " . . ld (0f79fh),hl ;6388 22 9f f7 " . . ld (0f797h),a ;638b 32 97 f7 2 . . inc hl ;638e 23 # ld (0f791h),hl ;638f 22 91 f7 " . . ret ;6392 c9 . sub_6393h: push bc ;6393 c5 . push de ;6394 d5 . call sub_6226h ;6395 cd 26 62 . & b ex de,hl ;6398 eb . ld (hl),045h ;6399 36 45 6 E inc hl ;639b 23 # ld (hl),04fh ;639c 36 4f 6 O inc hl ;639e 23 # ld (hl),046h ;639f 36 46 6 F inc hl ;63a1 23 # ld (hl),020h ;63a2 36 20 6 inc hl ;63a4 23 # pop de ;63a5 d1 . ex de,hl ;63a6 eb . ld bc,l000fh+1 ;63a7 01 10 00 . . . ldir ;63aa ed b0 . . ex de,hl ;63ac eb . pop bc ;63ad c1 . call sub_6180h ;63ae cd 80 61 . . a call sub_6179h ;63b1 cd 79 61 . y a ld c,045h ;63b4 0e 45 . E jp sub_61d4h ;63b6 c3 d4 61 . . a sub_63b9h: push af ;63b9 f5 . ld hl,(0f78ch) ;63ba 2a 8c f7 * . . push hl ;63bd e5 . ld a,(0f536h) ;63be 3a 36 f5 : 6 . push af ;63c1 f5 . call 06097h ;63c2 cd 97 60 . . ` call 060a3h ;63c5 cd a3 60 . . ` pop af ;63c8 f1 . ld (0f536h),a ;63c9 32 36 f5 2 6 . pop hl ;63cc e1 . ld (0f78ch),hl ;63cd 22 8c f7 " . . pop af ;63d0 f1 . ret ;63d1 c9 . sub_63d2h: call sub_640fh ;63d2 cd 0f 64 . . d ld a,(0f79ah) ;63d5 3a 9a f7 : . . call sub_648dh ;63d8 cd 8d 64 . . d ld d,(hl) ;63db 56 V inc hl ;63dc 23 # ld e,(hl) ;63dd 5e ^ ld hl,(0f2edh) ;63de 2a ed f2 * . . ex de,hl ;63e1 eb . xor a ;63e2 af . sbc hl,de ;63e3 ed 52 . R sub_63e5h: ex de,hl ;63e5 eb . sub_63e6h: ld hl,060a6h ;63e6 21 a6 60 ! . ` jr l63f1h ;63e9 18 06 . . sub_63ebh: ld hl,0609dh ;63eb 21 9d 60 ! . ` call sub_641eh ;63ee cd 1e 64 . . d l63f1h: ld a,003h ;63f1 3e 03 > . l63f3h: ld (0f7a2h),a ;63f3 32 a2 f7 2 . . push hl ;63f6 e5 . push de ;63f7 d5 . ld bc,l63fdh ;63f8 01 fd 63 . . c push bc ;63fb c5 . jp (hl) ;63fc e9 . l63fdh: pop de ;63fd d1 . pop hl ;63fe e1 . or a ;63ff b7 . ret z ;6400 c8 . cp 007h ;6401 fe 07 . . jr nz,l640dh ;6403 20 08 . ld a,(0f7a2h) ;6405 3a a2 f7 : . . dec a ;6408 3d = jr nz,l63f3h ;6409 20 e8 . ld a,007h ;640b 3e 07 > . l640dh: or a ;640d b7 . ret ;640e c9 . sub_640fh: ld a,(0f078h) ;640f 3a 78 f0 : x . and 040h ;6412 e6 40 . @ ret z ;6414 c8 . ld a,(0f2f8h) ;6415 3a f8 f2 : . . dec a ;6418 3d = jr nz,l6421h ;6419 20 06 . call sub_63ebh ;641b cd eb 63 . . c sub_641eh: ld a,(0f2f7h) ;641e 3a f7 f2 : . . l6421h: ld (0f2f8h),a ;6421 32 f8 f2 2 . . ret ;6424 c9 . sub_6425h: call 06091h ;6425 cd 91 60 . . ` ld b,h ;6428 44 D ld c,l ;6429 4d M ret ;642a c9 . sub_642bh: ld de,l0000h ;642b 11 00 00 . . . jp 06094h ;642e c3 94 60 . . ` sub_6431h: ex de,hl ;6431 eb . call 060a9h ;6432 cd a9 60 . . ` call sub_6441h ;6435 cd 41 64 . A d l6438h: call sub_608eh ;6438 cd 8e 60 . . ` ld a,h ;643b 7c | and 040h ;643c e6 40 . @ jr nz,l6438h ;643e 20 f8 . ret ;6440 c9 . sub_6441h: call 060a0h ;6441 cd a0 60 . . ` call 0609ah ;6444 cd 9a 60 . . ` or a ;6447 b7 . call nz,sub_63b9h ;6448 c4 b9 63 . . c ret ;644b c9 . sub_644ch: call 060afh ;644c cd af 60 . . ` or a ;644f b7 . ret ;6450 c9 . sub_6451h: push de ;6451 d5 . ld hl,0f8d7h ;6452 21 d7 f8 ! . . ld bc,l0034h ;6455 01 34 00 . 4 . call sub_6171h ;6458 cd 71 61 . q a ld de,0f8d7h ;645b 11 d7 f8 . . . pop hl ;645e e1 . call sub_65f2h ;645f cd f2 65 . . e ld de,0f8e1h ;6462 11 e1 f8 . . . call sub_6134h ;6465 cd 34 61 . 4 a ld hl,0f8e9h ;6468 21 e9 f8 ! . . jp sub_613dh ;646b c3 3d 61 . = a sub_646eh: ld hl,0f90ch ;646e 21 0c f9 ! . . ld bc,0017fh ;6471 01 7f 01 .  . ld a,0ffh ;6474 3e ff > . jp l6172h ;6476 c3 72 61 . r a sub_6479h: ld hl,l0000h ;6479 21 00 00 ! . . jr l64aeh ;647c 18 30 . 0 sub_647eh: ld hl,l0003h ;647e 21 03 00 ! . . jr l64aeh ;6481 18 2b . + sub_6483h: ld hl,l0018h ;6483 21 18 00 ! . . jr l64aeh ;6486 18 26 . & sub_6488h: ld hl,l000fh ;6488 21 0f 00 ! . . jr l64aeh ;648b 18 21 . ! sub_648dh: ld hl,l0009h ;648d 21 09 00 ! . . jr l64aeh ;6490 18 1c . . sub_6492h: ld hl,l0009h+2 ;6492 21 0b 00 ! . . jr l64aeh ;6495 18 17 . . sub_6497h: ld hl,l0003h+2 ;6497 21 05 00 ! . . jr l64aeh ;649a 18 12 . . sub_649ch: ld hl,l000fh+1 ;649c 21 10 00 ! . . jr l64aeh ;649f 18 0d . . sub_64a1h: ld hl,l000ch+1 ;64a1 21 0d 00 ! . . jr l64aeh ;64a4 18 08 . . sub_64a6h: ld hl,l0006h+1 ;64a6 21 07 00 ! . . jr l64aeh ;64a9 18 03 . . sub_64abh: ld hl,l0000h+2 ;64ab 21 02 00 ! . . l64aeh: push de ;64ae d5 . push af ;64af f5 . ld de,0f90ch ;64b0 11 0c f9 . . . add hl,de ;64b3 19 . dec a ;64b4 3d = ld e,a ;64b5 5f _ ld d,000h ;64b6 16 00 . . ld a,005h ;64b8 3e 05 > . l64bah: sla e ;64ba cb 23 . # rl d ;64bc cb 12 . . dec a ;64be 3d = jr nz,l64bah ;64bf 20 f9 . add hl,de ;64c1 19 . pop af ;64c2 f1 . pop de ;64c3 d1 . ret ;64c4 c9 . sub_64c5h: push hl ;64c5 e5 . ld hl,(0f79bh) ;64c6 2a 9b f7 * . . push hl ;64c9 e5 . call sub_64d3h ;64ca cd d3 64 . . d pop hl ;64cd e1 . ld (0f79bh),hl ;64ce 22 9b f7 " . . pop hl ;64d1 e1 . ret ;64d2 c9 . sub_64d3h: push hl ;64d3 e5 . ld hl,(0f4efh) ;64d4 2a ef f4 * . . ld (0f79bh),hl ;64d7 22 9b f7 " . . pop hl ;64da e1 . ld a,00dh ;64db 3e 0d > . ld (0f799h),a ;64dd 32 99 f7 2 . . sub_64e0h: push hl ;64e0 e5 . push de ;64e1 d5 . push bc ;64e2 c5 . l64e3h: ld a,(0f799h) ;64e3 3a 99 f7 : . . dec a ;64e6 3d = jr z,l6502h ;64e7 28 19 ( . ld (0f799h),a ;64e9 32 99 f7 2 . . call sub_64abh ;64ec cd ab 64 . . d ld b,(hl) ;64ef 46 F inc b ;64f0 04 . jr z,l64e3h ;64f1 28 f0 ( . ld c,a ;64f3 4f O ld hl,(0f79bh) ;64f4 2a 9b f7 * . . ld a,(hl) ;64f7 7e ~ cp 03fh ;64f8 fe 3f . ? ld a,c ;64fa 79 y jr z,l6502h ;64fb 28 05 ( . call sub_6507h ;64fd cd 07 65 . . e l6500h: jr nz,l64e3h ;6500 20 e1 . l6502h: or a ;6502 b7 . pop bc ;6503 c1 . pop de ;6504 d1 . pop hl ;6505 e1 . ret ;6506 c9 . sub_6507h: call sub_6488h ;6507 cd 88 64 . . d ld b,(hl) ;650a 46 F ld c,a ;650b 4f O ld a,(0f33bh) ;650c 3a 3b f3 : ; . cp b ;650f b8 . ld a,c ;6510 79 y ret nz ;6511 c0 . inc hl ;6512 23 # ld de,(0f79bh) ;6513 ed 5b 9b f7 . [ . . inc de ;6517 13 . ld b,00bh ;6518 06 0b . . sub_651ah: push af ;651a f5 . l651bh: ld a,(de) ;651b 1a . and 07fh ;651c e6 7f .  cp 03fh ;651e fe 3f . ? jr z,l6529h ;6520 28 07 ( . ld c,a ;6522 4f O ld a,(hl) ;6523 7e ~ and 07fh ;6524 e6 7f .  cp c ;6526 b9 . jr nz,l652dh ;6527 20 04 . l6529h: inc hl ;6529 23 # inc de ;652a 13 . djnz l651bh ;652b 10 ee . . l652dh: pop af ;652d f1 . inc b ;652e 04 . dec b ;652f 05 . ret ;6530 c9 . sub_6531h: ld a,(0f908h) ;6531 3a 08 f9 : . . and 040h ;6534 e6 40 . @ jr z,l653dh ;6536 28 05 ( . ld de,(0f7a5h) ;6538 ed 5b a5 f7 . [ . . ret ;653c c9 . l653dh: ld a,00dh ;653d 3e 0d > . ld hl,(0f2e7h) ;653f 2a e7 f2 * . . ld de,(0f2e9h) ;6542 ed 5b e9 f2 . [ . . add hl,de ;6546 19 . l6547h: ld (0f7a3h),hl ;6547 22 a3 f7 " . . l654ah: dec a ;654a 3d = jr z,l6565h ;654b 28 18 ( . call sub_64abh ;654d cd ab 64 . . d ld c,(hl) ;6550 4e N inc c ;6551 0c . jr z,l654ah ;6552 28 f6 ( . call sub_6492h ;6554 cd 92 64 . . d ld d,(hl) ;6557 56 V inc hl ;6558 23 # ld e,(hl) ;6559 5e ^ ld hl,(0f7a3h) ;655a 2a a3 f7 * . . or a ;655d b7 . sbc hl,de ;655e ed 52 . R jr nc,l654ah ;6560 30 e8 0 . ex de,hl ;6562 eb . jr l6547h ;6563 18 e2 . . l6565h: ld hl,(0f7a3h) ;6565 2a a3 f7 * . . ld bc,(0f2ebh) ;6568 ed 4b eb f2 . K . . add hl,bc ;656c 09 . ex de,hl ;656d eb . ret ;656e c9 . sub_656fh: ld a,00dh ;656f 3e 0d > . l6571h: dec a ;6571 3d = ret z ;6572 c8 . call sub_64abh ;6573 cd ab 64 . . d ld c,(hl) ;6576 4e N inc c ;6577 0c . ret z ;6578 c8 . jr l6571h ;6579 18 f6 . . sub_657bh: ld b,0ffh ;657b 06 ff . . ld hl,(l0006h) ;657d 2a 06 00 * . . push bc ;6580 c5 . call sub_649ch ;6581 cd 9c 64 . . d ld de,(0f4efh) ;6584 ed 5b ef f4 . [ . . inc de ;6588 13 . pop bc ;6589 c1 . inc b ;658a 04 . jr z,l658eh ;658b 28 01 ( . ex de,hl ;658d eb . l658eh: ld bc,l0009h+2 ;658e 01 0b 00 . . . ldir ;6591 ed b0 . . ret ;6593 c9 . sub_6594h: push hl ;6594 e5 . ld a,(0f79ah) ;6595 3a 9a f7 : . . call sub_6479h ;6598 cd 79 64 . y d ld bc,(0f90ah) ;659b ed 4b 0a f9 . K . . call sub_6180h ;659f cd 80 61 . . a ld (hl),000h ;65a2 36 00 6 . ld de,(0f78fh) ;65a4 ed 5b 8f f7 . [ . . inc hl ;65a8 23 # ld (hl),e ;65a9 73 s inc hl ;65aa 23 # call sub_648dh ;65ab cd 8d 64 . . d pop bc ;65ae c1 . call sub_6180h ;65af cd 80 61 . . a xor a ;65b2 af . inc hl ;65b3 23 # inc hl ;65b4 23 # ld (hl),a ;65b5 77 w inc hl ;65b6 23 # ld (hl),a ;65b7 77 w ld a,(0f33bh) ;65b8 3a 3b f3 : ; . inc hl ;65bb 23 # ld (hl),a ;65bc 77 w sub_65bdh: call sub_6425h ;65bd cd 25 64 . % d ex de,hl ;65c0 eb . ld a,(0f79ah) ;65c1 3a 9a f7 : . . call sub_6497h ;65c4 cd 97 64 . . d ld bc,(0f79dh) ;65c7 ed 4b 9d f7 . K . . call sub_6180h ;65cb cd 80 61 . . a ld bc,(0f79fh) ;65ce ed 4b 9f f7 . K . . call sub_6180h ;65d2 cd 80 61 . . a inc hl ;65d5 23 # inc hl ;65d6 23 # ld (hl),d ;65d7 72 r inc hl ;65d8 23 # ld (hl),e ;65d9 73 s sub_65dah: ld a,(0f79ah) ;65da 3a 9a f7 : . . sub_65ddh: ld de,(0f4efh) ;65dd ed 5b ef f4 . [ . . ld hl,l000ch+1 ;65e1 21 0d 00 ! . . add hl,de ;65e4 19 . ld (hl),000h ;65e5 36 00 6 . inc hl ;65e7 23 # ld (hl),000h ;65e8 36 00 6 . ld hl,l0015h ;65ea 21 15 00 ! . . add hl,de ;65ed 19 . ex de,hl ;65ee eb . call sub_647eh ;65ef cd 7e 64 . ~ d sub_65f2h: ld bc,l0009h+1 ;65f2 01 0a 00 . . . ldir ;65f5 ed b0 . . ret ;65f7 c9 . l65f8h: ld bc,(0f793h) ;65f8 ed 4b 93 f7 . K . . inc bc ;65fc 03 . l65fdh: ld a,c ;65fd 79 y and 07fh ;65fe e6 7f .  sla c ;6600 cb 21 . ! rl b ;6602 cb 10 . . l6604h: call sub_6638h ;6604 cd 38 66 . 8 f ld (hl),a ;6607 77 w sub_6608h: call sub_663dh ;6608 cd 3d 66 . = f ld (hl),b ;660b 70 p inc hl ;660c 23 # inc hl ;660d 23 # inc hl ;660e 23 # ld (hl),a ;660f 77 w ret ;6610 c9 . sub_6611h: ld a,(0f7a7h) ;6611 3a a7 f7 : . . and 080h ;6614 e6 80 . . jr z,l6621h ;6616 28 09 ( . call sub_6638h ;6618 cd 38 66 . 8 f inc hl ;661b 23 # ld c,(hl) ;661c 4e N inc hl ;661d 23 # ld b,(hl) ;661e 46 F jr l662fh ;661f 18 0e . . l6621h: call sub_663dh ;6621 cd 3d 66 . = f ld b,(hl) ;6624 46 F call sub_6638h ;6625 cd 38 66 . 8 f ld c,(hl) ;6628 4e N rlc c ;6629 cb 01 . . rr b ;662b cb 18 . . rr c ;662d cb 19 . . l662fh: ld (0f793h),bc ;662f ed 43 93 f7 . C . . ret ;6633 c9 . l6634h: xor a ;6634 af . ld b,a ;6635 47 G jr l6604h ;6636 18 cc . . sub_6638h: ld de,00020h ;6638 11 20 00 . . jr l6640h ;663b 18 03 . . sub_663dh: ld de,l000ch ;663d 11 0c 00 . . . l6640h: ld hl,(0f4efh) ;6640 2a ef f4 * . . add hl,de ;6643 19 . ret ;6644 c9 . l6645h: call sub_6488h ;6645 cd 88 64 . . d ld b,(hl) ;6648 46 F ld hl,(0f342h) ;6649 2a 42 f3 * B . ld (hl),b ;664c 70 p ex de,hl ;664d eb . call sub_649ch ;664e cd 9c 64 . . d inc de ;6651 13 . call l658eh ;6652 cd 8e 65 . . e ld hl,(0f4efh) ;6655 2a ef f4 * . . push hl ;6658 e5 . ld hl,(0f342h) ;6659 2a 42 f3 * B . ld (0f4efh),hl ;665c 22 ef f4 " . . call sub_65ddh ;665f cd dd 65 . . e call sub_64a6h ;6662 cd a6 64 . . d ld b,(hl) ;6665 46 F inc hl ;6666 23 # ld a,(hl) ;6667 7e ~ or a ;6668 b7 . rl a ;6669 cb 17 . . rl b ;666b cb 10 . . rrc a ;666d cb 0f . . call sub_6608h ;666f cd 08 66 . . f pop hl ;6672 e1 . ld (0f4efh),hl ;6673 22 ef f4 " . . xor a ;6676 af . ret ;6677 c9 . sub_6678h: ld a,(0f2ddh) ;6678 3a dd f2 : . . or a ;667b b7 . ret ;667c c9 . sub_667dh: ld a,(0f361h) ;667d 3a 61 f3 : a . or a ;6680 b7 . rra ;6681 1f . ret ;6682 c9 . sub_6683h: ld hl,(0f4efh) ;6683 2a ef f4 * . . ld (0f79bh),hl ;6686 22 9b f7 " . . ld a,(0f79ah) ;6689 3a 9a f7 : . . jp sub_6507h ;668c c3 07 65 . . e sub_668fh: push hl ;668f e5 . call sub_6483h ;6690 cd 83 64 . . d ld a,(hl) ;6693 7e ~ cpl ;6694 2f / and 080h ;6695 e6 80 . . ld a,(0f2dfh) ;6697 3a df f2 : . . rra ;669a 1f . pop hl ;669b e1 . ret ;669c c9 . sub_669dh: ld a,(0f078h) ;669d 3a 78 f0 : x . and 080h ;66a0 e6 80 . . ret z ;66a2 c8 . ld hl,0f01eh ;66a3 21 1e f0 ! . . ld b,008h ;66a6 06 08 . . call sub_651ah ;66a8 cd 1a 65 . . e ld a,b ;66ab 78 x or a ;66ac b7 . ret ;66ad c9 . l66aeh: call sub_6678h ;66ae cd 78 66 . x f jp nz,l60ddh ;66b1 c2 dd 60 . . ` call sub_6451h ;66b4 cd 51 64 . Q d call sub_646eh ;66b7 cd 6e 64 . n d call sub_6788h ;66ba cd 88 67 . . g ret nz ;66bd c0 . ld h,a ;66be 67 g ld l,a ;66bf 6f o ld (0f90ah),hl ;66c0 22 0a f9 " . . jp l673ah ;66c3 c3 3a 67 . : g sub_66c6h: call sub_6678h ;66c6 cd 78 66 . x f ret z ;66c9 c8 . ld hl,0f8d7h ;66ca 21 d7 f8 ! . . ld de,(0f342h) ;66cd ed 5b 42 f3 . [ B . ld bc,l0034h+1 ;66d1 01 35 00 . 5 . ldir ;66d4 ed b0 . . ld a,0ffh ;66d6 3e ff > . ret ;66d8 c9 . l66d9h: call sub_6678h ;66d9 cd 78 66 . x f jp nz,l60ddh ;66dc c2 dd 60 . . ` sub_66dfh: call sub_62c4h ;66df cd c4 62 . . b jr nz,l6758h ;66e2 20 74 t ld bc,0ffffh ;66e4 01 ff ff . . . call sub_6308h ;66e7 cd 08 63 . . c jp nz,l6758h ;66ea c2 58 67 . X g call sub_61c2h ;66ed cd c2 61 . . a jr nz,l6758h ;66f0 20 66 f call sub_6226h ;66f2 cd 26 62 . & b ld hl,0f8d7h ;66f5 21 d7 f8 ! . . ex de,hl ;66f8 eb . ld bc,l0034h+1 ;66f9 01 35 00 . 5 . ldir ;66fc ed b0 . . call sub_61c2h ;66fe cd c2 61 . . a jr nz,l6758h ;6701 20 55 U call sub_6226h ;6703 cd 26 62 . & b ld hl,0f90ch ;6706 21 0c f9 ! . . ex de,hl ;6709 eb . ld bc,l0100h ;670a 01 00 01 . . . ldir ;670d ed b0 . . call sub_61c2h ;670f cd c2 61 . . a jr nz,l6758h ;6712 20 44 D call sub_6226h ;6714 cd 26 62 . & b ld hl,0fa0ch ;6717 21 0c fa ! . . ex de,hl ;671a eb . ld bc,l0080h ;671b 01 80 00 . . . ldir ;671e ed b0 . . ld hl,(0f901h) ;6720 2a 01 f9 * . . inc hl ;6723 23 # ld (0f901h),hl ;6724 22 01 f9 " . . ld b,050h ;6727 06 50 . P ld a,(0f908h) ;6729 3a 08 f9 : . . and 080h ;672c e6 80 . . ld a,b ;672e 78 x jr z,l6734h ;672f 28 03 ( . ld a,(0f909h) ;6731 3a 09 f9 : . . l6734h: ld (0f078h),a ;6734 32 78 f0 2 x . sub_6737h: call sub_63b9h ;6737 cd b9 63 . . c l673ah: xor a ;673a af . ld (0f361h),a ;673b 32 61 f3 2 a . ld (0f7a1h),a ;673e 32 a1 f7 2 . . inc a ;6741 3c < ld (0f2ddh),a ;6742 32 dd f2 2 . . xor a ;6745 af . ret ;6746 c9 . sub_6747h: ld a,(0f078h) ;6747 3a 78 f0 : x . and 010h ;674a e6 10 . . ret z ;674c c8 . call sub_6678h ;674d cd 78 66 . x f ret nz ;6750 c0 . call sub_66dfh ;6751 cd df 66 . . f or a ;6754 b7 . ret z ;6755 c8 . pop hl ;6756 e1 . ret ;6757 c9 . l6758h: call 060e6h ;6758 cd e6 60 . . ` ld a,(0f07ah) ;675b 3a 7a f0 : z . and 008h ;675e e6 08 . . ret nz ;6760 c0 . call sub_6cf5h ;6761 cd f5 6c . . l jp 02063h ;6764 c3 63 20 . c sub_6767h: call sub_6678h ;6767 cd 78 66 . x f ret nz ;676a c0 . jp sub_66dfh ;676b c3 df 66 . . f l676eh: call sub_6678h ;676e cd 78 66 . x f jp z,060e0h ;6771 ca e0 60 . . ` ld a,(0f361h) ;6774 3a 61 f3 : a . dec a ;6777 3d = dec a ;6778 3d = jp z,060e3h ;6779 ca e3 60 . . ` ld a,(0f7a1h) ;677c 3a a1 f7 : . . or a ;677f b7 . jr z,l67f0h ;6780 28 6e ( n call sub_67f7h ;6782 cd f7 67 . . g jp nz,06110h ;6785 c2 10 61 . . a sub_6788h: call sub_62beh ;6788 cd be 62 . . b call sub_63ebh ;678b cd eb 63 . . c or a ;678e b7 . ret nz ;678f c0 . ld hl,(0f2e3h) ;6790 2a e3 f2 * . . ld de,l0006h+1 ;6793 11 07 00 . . . or a ;6796 b7 . sbc hl,de ;6797 ed 52 . R push hl ;6799 e5 . call sub_63e5h ;679a cd e5 63 . . c pop de ;679d d1 . or a ;679e b7 . ret nz ;679f c0 . ld hl,(0f2e5h) ;67a0 2a e5 f2 * . . sbc hl,de ;67a3 ed 52 . R call sub_6431h ;67a5 cd 31 64 . 1 d ret nz ;67a8 c0 . ld de,04200h ;67a9 11 00 42 . . B ld hl,l7fe8h ;67ac 21 e8 7f ! .  ld bc,0ffffh ;67af 01 ff ff . . . ld a,053h ;67b2 3e 53 > S call sub_6316h ;67b4 cd 16 63 . . c or a ;67b7 b7 . ret nz ;67b8 c0 . ld hl,0f8f5h ;67b9 21 f5 f8 ! . . call sub_613dh ;67bc cd 3d 61 . = a call sub_6226h ;67bf cd 26 62 . & b ld hl,0f8d7h ;67c2 21 d7 f8 ! . . ld bc,l0034h+1 ;67c5 01 35 00 . 5 . call sub_61cch ;67c8 cd cc 61 . . a ret nz ;67cb c0 . call sub_6226h ;67cc cd 26 62 . & b ld hl,0f90ch ;67cf 21 0c f9 ! . . ld bc,l0100h ;67d2 01 00 01 . . . call sub_61cch ;67d5 cd cc 61 . . a ret nz ;67d8 c0 . call sub_6226h ;67d9 cd 26 62 . & b ld hl,0fa0ch ;67dc 21 0c fa ! . . ld bc,l0080h ;67df 01 80 00 . . . call sub_61cch ;67e2 cd cc 61 . . a ret nz ;67e5 c0 . ld de,l7fe8h ;67e6 11 e8 7f . .  ld bc,0ffffh ;67e9 01 ff ff . . . call sub_6393h ;67ec cd 93 63 . . c ret nz ;67ef c0 . l67f0h: call sub_6737h ;67f0 cd 37 67 . 7 g ld (0f2ddh),a ;67f3 32 dd f2 2 . . ret ;67f6 c9 . sub_67f7h: ld a,(0f078h) ;67f7 3a 78 f0 : x . and 008h ;67fa e6 08 . . ret z ;67fc c8 . call sub_62c4h ;67fd cd c4 62 . . b ret nz ;6800 c0 . call sub_61c2h ;6801 cd c2 61 . . a ret nz ;6804 c0 . ld hl,(0f35dh) ;6805 2a 5d f3 * ] . ld de,l0015h+1 ;6808 11 16 00 . . . add hl,de ;680b 19 . ex de,hl ;680c eb . ld hl,0f8e9h ;680d 21 e9 f8 ! . . ld b,00ch ;6810 06 0c . . jp sub_651ah ;6812 c3 1a 65 . . e sub_6815h: call sub_6747h ;6815 cd 47 67 . G g call sub_667dh ;6818 cd 7d 66 . } f jr z,l6820h ;681b 28 03 ( . jp nc,060f5h ;681d d2 f5 60 . . ` l6820h: call sub_64c5h ;6820 cd c5 64 . . d jp z,060f2h ;6823 ca f2 60 . . ` ld (0f79ah),a ;6826 32 9a f7 2 . . call sub_63d2h ;6829 cd d2 63 . . c or a ;682c b7 . jr nz,l6833h ;682d 20 04 . call sub_62d3h ;682f cd d3 62 . . b or a ;6832 b7 . l6833h: jp nz,060f2h ;6833 c2 f2 60 . . ` ld a,(0f79ah) ;6836 3a 9a f7 : . . call sub_6479h ;6839 cd 79 64 . y d ld b,(hl) ;683c 46 F inc hl ;683d 23 # ld c,(hl) ;683e 4e N call sub_6308h ;683f cd 08 63 . . c jp nz,0610dh ;6842 c2 0d 61 . . a ld a,(0f79ah) ;6845 3a 9a f7 : . . call sub_64a1h ;6848 cd a1 64 . . d ld b,(hl) ;684b 46 F inc hl ;684c 23 # ld c,(hl) ;684d 4e N inc bc ;684e 03 . ld (hl),c ;684f 71 q dec hl ;6850 2b + ld (hl),b ;6851 70 p call sub_6497h ;6852 cd 97 64 . . d ld b,(hl) ;6855 46 F inc hl ;6856 23 # ld c,(hl) ;6857 4e N ld (0f79dh),bc ;6858 ed 43 9d f7 . C . . inc hl ;685c 23 # ld a,(hl) ;685d 7e ~ inc hl ;685e 23 # ld l,(hl) ;685f 6e n ld h,a ;6860 67 g ld (0f79fh),hl ;6861 22 9f f7 " . . ld a,(0f078h) ;6864 3a 78 f0 : x . and 020h ;6867 e6 20 . ld a,(0f78fh) ;6869 3a 8f f7 : . . jr nz,l6875h ;686c 20 07 . ld a,(0f79ah) ;686e 3a 9a f7 : . . call sub_647eh ;6871 cd 7e 64 . ~ d ld a,(hl) ;6874 7e ~ l6875h: ld (0f790h),a ;6875 32 90 f7 2 . . call sub_65dah ;6878 cd da 65 . . e call sub_657bh ;687b cd 7b 65 . { e ld de,(0f4efh) ;687e ed 5b ef f4 . [ . . ld hl,l000ch ;6882 21 0c 00 ! . . add hl,de ;6885 19 . ld bc,(0f79fh) ;6886 ed 4b 9f f7 . K . . ld a,b ;688a 78 x rlc c ;688b cb 01 . . rla ;688d 17 . srl c ;688e cb 39 . 9 cp (hl) ;6890 be . ld a,c ;6891 79 y jr z,l689ah ;6892 28 06 ( . ld a,000h ;6894 3e 00 > . jr c,l689ah ;6896 38 02 8 . ld a,080h ;6898 3e 80 > . l689ah: ld hl,l000fh ;689a 21 0f 00 ! . . add hl,de ;689d 19 . ld (hl),a ;689e 77 w ld a,001h ;689f 3e 01 > . ld (0f361h),a ;68a1 32 61 f3 2 a . xor a ;68a4 af . ret ;68a5 c9 . l68a6h: call sub_6678h ;68a6 cd 78 66 . x f jp z,060e0h ;68a9 ca e0 60 . . ` call sub_667dh ;68ac cd 7d 66 . } f jp z,060f2h ;68af ca f2 60 . . ` call sub_6683h ;68b2 cd 83 66 . . f jp nz,060f2h ;68b5 c2 f2 60 . . ` call sub_667dh ;68b8 cd 7d 66 . } f jr c,l68eah ;68bb 38 2d 8 - ld a,(0f797h) ;68bd 3a 97 f7 : . . or a ;68c0 b7 . jr z,l68cch ;68c1 28 09 ( . call sub_61b1h ;68c3 cd b1 61 . . a call sub_61e0h ;68c6 cd e0 61 . . a call sub_61e8h ;68c9 cd e8 61 . . a l68cch: ld a,(0f79ah) ;68cc 3a 9a f7 : . . call sub_649ch ;68cf cd 9c 64 . . d ex de,hl ;68d2 eb . call sub_6479h ;68d3 cd 79 64 . y d ld b,(hl) ;68d6 46 F inc hl ;68d7 23 # ld c,(hl) ;68d8 4e N call sub_6393h ;68d9 cd 93 63 . . c or a ;68dc b7 . ret nz ;68dd c0 . call sub_65bdh ;68de cd bd 65 . . e ld hl,(0f2f1h) ;68e1 2a f1 f2 * . . call sub_6431h ;68e4 cd 31 64 . 1 d call sub_6b00h ;68e7 cd 00 6b . . k l68eah: call sub_63b9h ;68ea cd b9 63 . . c sub_68edh: xor a ;68ed af . ld (0f361h),a ;68ee 32 61 f3 2 a . ld (0f79ah),a ;68f1 32 9a f7 2 . . ret ;68f4 c9 . sub_68f5h: ld (0f79bh),de ;68f5 ed 53 9b f7 . S . . call sub_6747h ;68f9 cd 47 67 . G g call sub_64d3h ;68fc cd d3 64 . . d jr l6907h ;68ff 18 06 . . sub_6901h: call sub_6747h ;6901 cd 47 67 . G g call sub_64e0h ;6904 cd e0 64 . . d l6907h: push af ;6907 f5 . ld hl,(0f342h) ;6908 2a 42 f3 * B . ld bc,l007fh ;690b 01 7f 00 .  . ld a,0e5h ;690e 3e e5 > . call l6172h ;6910 cd 72 61 . r a pop af ;6913 f1 . jp nz,l6645h ;6914 c2 45 66 . E f ld a,0ffh ;6917 3e ff > . ret ;6919 c9 . sub_691ah: call sub_6747h ;691a cd 47 67 . G g call sub_644ch ;691d cd 4c 64 . L d ret nz ;6920 c0 . ld a,0ffh ;6921 3e ff > . l6923h: ld (0f4f1h),a ;6923 32 f1 f4 2 . . call sub_64c5h ;6926 cd c5 64 . . d ret z ;6929 c8 . ld b,a ;692a 47 G call sub_668fh ;692b cd 8f 66 . . f jp z,060ech ;692e ca ec 60 . . ` jp c,06107h ;6931 da 07 61 . . a ld a,b ;6934 78 x call sub_6497h ;6935 cd 97 64 . . d ld d,(hl) ;6938 56 V inc hl ;6939 23 # ld e,(hl) ;693a 5e ^ or a ;693b b7 . ld hl,(0f903h) ;693c 2a 03 f9 * . . sbc hl,de ;693f ed 52 . R ld (0f903h),hl ;6941 22 03 f9 " . . call sub_64a6h ;6944 cd a6 64 . . d ld d,(hl) ;6947 56 V inc hl ;6948 23 # ld e,(hl) ;6949 5e ^ or a ;694a b7 . ld hl,(0f905h) ;694b 2a 05 f9 * . . sbc hl,de ;694e ed 52 . R ld (0f905h),hl ;6950 22 05 f9 " . . call sub_64abh ;6953 cd ab 64 . . d ld a,0ffh ;6956 3e ff > . ld (hl),a ;6958 77 w ld (0f7a1h),a ;6959 32 a1 f7 2 . . ld hl,0f907h ;695c 21 07 f9 ! . . dec (hl) ;695f 35 5 xor a ;6960 af . jr l6923h ;6961 18 c0 . . sub_6963h: xor a ;6963 af . ld hl,(0013eh) ;6964 2a 3e 01 * > . ld hl,(0803eh) ;6967 2a 3e 80 * > . ld hl,(0813eh) ;696a 2a 3e 81 * > . ld (0f7a7h),a ;696d 32 a7 f7 2 . . call sub_6747h ;6970 cd 47 67 . G g call sub_667dh ;6973 cd 7d 66 . } f jp z,060f8h ;6976 ca f8 60 . . ` call sub_6683h ;6979 cd 83 66 . . f jp nz,060f5h ;697c c2 f5 60 . . ` call sub_6611h ;697f cd 11 66 . . f ld a,(0f7a7h) ;6982 3a a7 f7 : . . and 07fh ;6985 e6 7f .  jr z,l699fh ;6987 28 16 ( . ld a,(0f79ah) ;6989 3a 9a f7 : . . call sub_668fh ;698c cd 8f 66 . . f jp z,060ech ;698f ca ec 60 . . ` jp c,06107h ;6992 da 07 61 . . a call sub_6277h ;6995 cd 77 62 . w b or a ;6998 b7 . ret nz ;6999 c0 . call sub_65bdh ;699a cd bd 65 . . e jr l69a4h ;699d 18 05 . . l699fh: call l622ah ;699f cd 2a 62 . * b or a ;69a2 b7 . ret nz ;69a3 c0 . l69a4h: ld a,(0f7a7h) ;69a4 3a a7 f7 : . . and 080h ;69a7 e6 80 . . jp z,l65f8h ;69a9 ca f8 65 . . e ld bc,(0f793h) ;69ac ed 4b 93 f7 . K . . jp l65fdh ;69b0 c3 fd 65 . . e ld a,(0f7a0h) ;69b3 3a a0 f7 : . . srl b ;69b6 cb 38 . 8 sub b ;69b8 90 . ret z ;69b9 c8 . ld (hl),07fh ;69ba 36 7f 6  xor a ;69bc af . ret ;69bd c9 . l69beh: call sub_6747h ;69be cd 47 67 . G g call sub_668fh ;69c1 cd 8f 66 . . f jp c,06107h ;69c4 da 07 61 . . a call sub_667dh ;69c7 cd 7d 66 . } f jr z,l69d2h ;69ca 28 06 ( . jp nc,060f5h ;69cc d2 f5 60 . . ` call sub_68edh ;69cf cd ed 68 . . h l69d2h: ld a,(0f907h) ;69d2 3a 07 f9 : . . cp 00ch ;69d5 fe 0c . . jp z,060e9h ;69d7 ca e9 60 . . ` call sub_64c5h ;69da cd c5 64 . . d jp nz,060efh ;69dd c2 ef 60 . . ` call sub_656fh ;69e0 cd 6f 65 . o e ld (0f79ah),a ;69e3 32 9a f7 2 . . call sub_640fh ;69e6 cd 0f 64 . . d call sub_6531h ;69e9 cd 31 65 . 1 e ld hl,(0f2efh) ;69ec 2a ef f2 * . . ex de,hl ;69ef eb . or a ;69f0 b7 . sbc hl,de ;69f1 ed 52 . R ex de,hl ;69f3 eb . call sub_63e6h ;69f4 cd e6 63 . . c or a ;69f7 b7 . ret nz ;69f8 c0 . ld hl,(0f2efh) ;69f9 2a ef f2 * . . call sub_6431h ;69fc cd 31 64 . 1 d ret nz ;69ff c0 . call sub_6425h ;6a00 cd 25 64 . % d push bc ;6a03 c5 . ld a,(0f79ah) ;6a04 3a 9a f7 : . . call 0657eh ;6a07 cd 7e 65 . ~ e inc hl ;6a0a 23 # inc hl ;6a0b 23 # inc hl ;6a0c 23 # ld bc,l0003h+2 ;6a0d 01 05 00 . . . ldir ;6a10 ed b0 . . ld bc,(0f90ah) ;6a12 ed 4b 0a f9 . K . . call sub_649ch ;6a16 cd 9c 64 . . d ld a,(0f78fh) ;6a19 3a 8f f7 : . . ld (0f790h),a ;6a1c 32 90 f7 2 . . ld e,a ;6a1f 5f _ and 080h ;6a20 e6 80 . . ld a,020h ;6a22 3e 20 > jr nz,l6a28h ;6a24 20 02 . ld a,053h ;6a26 3e 53 > S l6a28h: call sub_6316h ;6a28 cd 16 63 . . c pop hl ;6a2b e1 . or a ;6a2c b7 . ret nz ;6a2d c0 . call sub_6594h ;6a2e cd 94 65 . . e ld hl,(0f90ah) ;6a31 2a 0a f9 * . . inc hl ;6a34 23 # inc hl ;6a35 23 # ld a,h ;6a36 7c | or l ;6a37 b5 . jr z,l6a3bh ;6a38 28 01 ( . l6a3ah: dec hl ;6a3a 2b + l6a3bh: ld (0f90ah),hl ;6a3b 22 0a f9 " . . ld hl,0f907h ;6a3e 21 07 f9 ! . . inc (hl) ;6a41 34 4 ld a,002h ;6a42 3e 02 > . ld (0f361h),a ;6a44 32 61 f3 2 a . ld (0f7a1h),a ;6a47 32 a1 f7 2 . . jp l6634h ;6a4a c3 34 66 . 4 f l6a4dh: call sub_6747h ;6a4d cd 47 67 . G g call sub_644ch ;6a50 cd 4c 64 . L d ret nz ;6a53 c0 . call sub_64c5h ;6a54 cd c5 64 . . d jp z,060f2h ;6a57 ca f2 60 . . ` ld b,a ;6a5a 47 G call sub_668fh ;6a5b cd 8f 66 . . f jp z,060ech ;6a5e ca ec 60 . . ` jp c,06107h ;6a61 da 07 61 . . a ld a,b ;6a64 78 x ld (0f7a1h),a ;6a65 32 a1 f7 2 . . ld hl,(0f4efh) ;6a68 2a ef f4 * . . ld de,l000fh+1 ;6a6b 11 10 00 . . . push hl ;6a6e e5 . add hl,de ;6a6f 19 . ld (0f4efh),hl ;6a70 22 ef f4 " . . call 0657eh ;6a73 cd 7e 65 . ~ e pop hl ;6a76 e1 . ld (0f4efh),hl ;6a77 22 ef f4 " . . xor a ;6a7a af . ret ;6a7b c9 . sub_6a7ch: call sub_6767h ;6a7c cd 67 67 . g g ld hl,(0f35fh) ;6a7f 2a 5f f3 * _ . ld bc,l0006h+2 ;6a82 01 08 00 . . . call sub_6171h ;6a85 cd 71 61 . q a ld d,a ;6a88 57 W ld bc,(0f905h) ;6a89 ed 4b 05 f9 . K . . ld e,006h ;6a8d 1e 06 . . l6a8fh: srl b ;6a8f cb 38 . 8 rr c ;6a91 cb 19 . . rra ;6a93 1f . dec e ;6a94 1d . jr nz,l6a8fh ;6a95 20 f8 . rra ;6a97 1f . rra ;6a98 1f . rra ;6a99 1f . rra ;6a9a 1f . rra ;6a9b 1f . and 007h ;6a9c e6 07 . . ld e,a ;6a9e 5f _ ld hl,l6abah ;6a9f 21 ba 6a ! . j add hl,de ;6aa2 19 . ld a,(hl) ;6aa3 7e ~ push af ;6aa4 f5 . ld hl,(0f35fh) ;6aa5 2a 5f f3 * _ . ld b,000h ;6aa8 06 00 . . ld a,c ;6aaa 79 y and 007h ;6aab e6 07 . . jr z,l6ab7h ;6aad 28 08 ( . ld c,a ;6aaf 4f O ld a,0ffh ;6ab0 3e ff > . call l6172h ;6ab2 cd 72 61 . r a ex de,hl ;6ab5 eb . dec hl ;6ab6 2b + l6ab7h: pop af ;6ab7 f1 . ld (hl),a ;6ab8 77 w ret ;6ab9 c9 . l6abah: add a,b ;6aba 80 . ret nz ;6abb c0 . ret po ;6abc e0 . ret p ;6abd f0 . ret m ;6abe f8 . call m,0fffeh ;6abf fc fe ff . . . l6ac2h: call sub_6747h ;6ac2 cd 47 67 . G g call sub_644ch ;6ac5 cd 4c 64 . L d ret nz ;6ac8 c0 . call sub_64c5h ;6ac9 cd c5 64 . . d jp z,060f2h ;6acc ca f2 60 . . ` ld (0f7a1h),a ;6acf 32 a1 f7 2 . . jp 0657eh ;6ad2 c3 7e 65 . ~ e l6ad5h: ld a,0afh ;6ad5 3e af > . ld hl,(0f4efh) ;6ad7 2a ef f4 * . . ld de,l0021h ;6ada 11 21 00 . ! . add hl,de ;6add 19 . ld (hl),d ;6ade 72 r inc hl ;6adf 23 # ld (hl),d ;6ae0 72 r inc hl ;6ae1 23 # ld (hl),d ;6ae2 72 r ld bc,(0f793h) ;6ae3 ed 4b 93 f7 . K . . inc bc ;6ae7 03 . or a ;6ae8 b7 . jr nz,l6af5h ;6ae9 20 0a . call sub_64c5h ;6aeb cd c5 64 . . d ret z ;6aee c8 . call sub_64a6h ;6aef cd a6 64 . . d ld b,(hl) ;6af2 46 F inc hl ;6af3 23 # ld c,(hl) ;6af4 4e N l6af5h: ld hl,(0f4efh) ;6af5 2a ef f4 * . . ld de,l0021h ;6af8 11 21 00 . ! . add hl,de ;6afb 19 . ld (hl),c ;6afc 71 q inc hl ;6afd 23 # ld (hl),b ;6afe 70 p ret ;6aff c9 . sub_6b00h: ld a,(0f07ch) ;6b00 3a 7c f0 : | . or a ;6b03 b7 . ret z ;6b04 c8 . ld a,(0f79ah) ;6b05 3a 9a f7 : . . call sub_64abh ;6b08 cd ab 64 . . d ld (hl),000h ;6b0b 36 00 6 . push hl ;6b0d e5 . call sub_68edh ;6b0e cd ed 68 . . h call sub_6b1ah ;6b11 cd 1a 6b . . k pop hl ;6b14 e1 . or a ;6b15 b7 . ret z ;6b16 c8 . ld (hl),0ffh ;6b17 36 ff 6 . ret ;6b19 c9 . sub_6b1ah: call sub_6815h ;6b1a cd 15 68 . . h ld hl,(0f78ch) ;6b1d 2a 8c f7 * . . ld a,h ;6b20 7c | or l ;6b21 b5 . ret nz ;6b22 c0 . ld a,(0f07ah) ;6b23 3a 7a f0 : z . or 040h ;6b26 f6 40 . @ ld (0f07ah),a ;6b28 32 7a f0 2 z . ld de,(0f4efh) ;6b2b ed 5b ef f4 . [ . . ld hl,l000ch ;6b2f 21 0c 00 ! . . add hl,de ;6b32 19 . l6b33h: ld (hl),000h ;6b33 36 00 6 . ld hl,00020h ;6b35 21 20 00 ! . add hl,de ;6b38 19 . ld (hl),000h ;6b39 36 00 6 . l6b3bh: call sub_6963h ;6b3b cd 63 69 . c i ld hl,(0f78ch) ;6b3e 2a 8c f7 * . . ld a,h ;6b41 7c | or a ;6b42 b7 . ret nz ;6b43 c0 . or l ;6b44 b5 . jr z,l6b3bh ;6b45 28 f4 ( . sub 00ch ;6b47 d6 0c . . jp nz,0610ah ;6b49 c2 0a 61 . . a ld (0f78ch),a ;6b4c 32 8c f7 2 . . ld (0f4f1h),a ;6b4f 32 f1 f4 2 . . ret ;6b52 c9 . sub_6b53h: ld a,(0f2deh) ;6b53 3a de f2 : . . ld c,a ;6b56 4f O inc c ;6b57 0c . ld hl,(0f4efh) ;6b58 2a ef f4 * . . ld a,(hl) ;6b5b 7e ~ and 01fh ;6b5c e6 1f . . cp 01fh ;6b5e fe 1f . . jr z,l6b6fh ;6b60 28 0d ( . or a ;6b62 b7 . jr nz,l6b69h ;6b63 20 04 . ld a,(0f78eh) ;6b65 3a 8e f7 : . . inc a ;6b68 3c < l6b69h: sub c ;6b69 91 . ret z ;6b6a c8 . l6b6bh: pop hl ;6b6b e1 . l6b6ch: jp l6036h ;6b6c c3 36 60 . 6 ` l6b6fh: ld a,(0f78eh) ;6b6f 3a 8e f7 : . . or a ;6b72 b7 . jr z,l6b6bh ;6b73 28 f6 ( . ret ;6b75 c9 . xor a ;6b76 af . ld (0f2dfh),a ;6b77 32 df f2 2 . . ld (0f78eh),a ;6b7a 32 8e f7 2 . . jr l6b6ch ;6b7d 18 ed . . ld a,(0f2deh) ;6b7f 3a de f2 : . . ld c,a ;6b82 4f O ld a,(0f516h) ;6b83 3a 16 f5 : . . cp c ;6b86 b9 . jp nz,l6b90h ;6b87 c2 90 6b . . k ld (0f78eh),a ;6b8a 32 8e f7 2 . . jp sub_6767h ;6b8d c3 67 67 . g g l6b90h: xor a ;6b90 af . ld (0f78eh),a ;6b91 32 8e f7 2 . . jr l6b6ch ;6b94 18 d6 . . call sub_6b53h ;6b96 cd 53 6b . S k jp sub_6815h ;6b99 c3 15 68 . . h call sub_6b53h ;6b9c cd 53 6b . S k jp l68a6h ;6b9f c3 a6 68 . . h ld hl,0f07ah ;6ba2 21 7a f0 ! z . res 7,(hl) ;6ba5 cb be . . call sub_6b53h ;6ba7 cd 53 6b . S k call sub_68f5h ;6baa cd f5 68 . . h push af ;6bad f5 . ld hl,(0f4efh) ;6bae 2a ef f4 * . . ld a,(hl) ;6bb1 7e ~ cp 03fh ;6bb2 fe 3f . ? jr nz,l6bbch ;6bb4 20 06 . ld hl,l6bc4h ;6bb6 21 c4 6b ! . k ld (0f79bh),hl ;6bb9 22 9b f7 " . . l6bbch: pop af ;6bbc f1 . l6bbdh: ld hl,0f07ah ;6bbd 21 7a f0 ! z . set 7,(hl) ;6bc0 cb fe . . jr l6c11h ;6bc2 18 4d . M l6bc4h: ccf ;6bc4 3f ? ld a,(0f07ah) ;6bc5 3a 7a f0 : z . and 080h ;6bc8 e6 80 . . jr z,l6b6ch ;6bca 28 a0 ( . call sub_6901h ;6bcc cd 01 69 . . i jr l6bbdh ;6bcf 18 ec . . call sub_6b53h ;6bd1 cd 53 6b . S k call sub_691ah ;6bd4 cd 1a 69 . . i ld hl,(0f78ch) ;6bd7 2a 8c f7 * . . ld a,h ;6bda 7c | or a ;6bdb b7 . ret nz ;6bdc c0 . or l ;6bdd b5 . jp z,l6cefh ;6bde ca ef 6c . . l ret ;6be1 c9 . call sub_6b53h ;6be2 cd 53 6b . S k jp sub_6963h ;6be5 c3 63 69 . c i call sub_6b53h ;6be8 cd 53 6b . S k jp 06965h ;6beb c3 65 69 . e i call sub_6b53h ;6bee cd 53 6b . S k jp l69beh ;6bf1 c3 be 69 . . i call sub_6b53h ;6bf4 cd 53 6b . S k jp l6a4dh ;6bf7 c3 4d 6a . M j ld hl,(0f340h) ;6bfa 2a 40 f3 * @ . ld a,(0f2ddh) ;6bfd 3a dd f2 : . . dec a ;6c00 3d = jr nz,l6c0ch ;6c01 20 09 . l6c03h: call sub_6185h ;6c03 cd 85 61 . . a ld a,d ;6c06 7a z or h ;6c07 b4 . ld h,a ;6c08 67 g ld a,e ;6c09 7b { or l ;6c0a b5 . ld l,a ;6c0b 6f o l6c0ch: jr l6c3eh ;6c0c 18 30 . 0 call l6b6fh ;6c0e cd 6f 6b . o k l6c11h: jp l6cech ;6c11 c3 ec 6c . . l call l6b6fh ;6c14 cd 6f 6b . o k call sub_6a7ch ;6c17 cd 7c 6a . | j ld hl,(0f35fh) ;6c1a 2a 5f f3 * _ . jr l6c3eh ;6c1d 18 1f . . call l6b6fh ;6c1f cd 6f 6b . o k ld a,001h ;6c22 3e 01 > . ld (0f2dfh),a ;6c24 32 df f2 2 . . ret ;6c27 c9 . ld hl,(0f33eh) ;6c28 2a 3e f3 * > . call sub_668fh ;6c2b cd 8f 66 . . f jr c,l6c03h ;6c2e 38 d3 8 . jr l6c0ch ;6c30 18 da . . call sub_6b53h ;6c32 cd 53 6b . S k jp l6ac2h ;6c35 c3 c2 6a . . j call l6b6fh ;6c38 cd 6f 6b . o k ld hl,0f2b9h ;6c3b 21 b9 f2 ! . . l6c3eh: pop af ;6c3e f1 . jp l6ce6h ;6c3f c3 e6 6c . . l call sub_6b53h ;6c42 cd 53 6b . S k jp 06968h ;6c45 c3 68 69 . h i call sub_6b53h ;6c48 cd 53 6b . S k jp 0696bh ;6c4b c3 6b 69 . k i call sub_6b53h ;6c4e cd 53 6b . S k jp l6ad5h+1 ;6c51 c3 d6 6a . . j call sub_6b53h ;6c54 cd 53 6b . S k jp l6ad5h ;6c57 c3 d5 6a . . j call sub_6185h ;6c5a cd 85 61 . . a ld hl,(0f4efh) ;6c5d 2a ef f4 * . . ld a,d ;6c60 7a z and h ;6c61 a4 . jr nz,l6c6ch ;6c62 20 08 . ld a,e ;6c64 7b { and l ;6c65 a5 . jr z,l6c78h ;6c66 28 10 ( . xor l ;6c68 ad . ld l,a ;6c69 6f o jr l6c6eh ;6c6a 18 02 . . l6c6ch: xor h ;6c6c ac . ld h,a ;6c6d 67 g l6c6eh: xor a ;6c6e af . ld (0f2dfh),a ;6c6f 32 df f2 2 . . ld (0f78eh),a ;6c72 32 8e f7 2 . . ld (0f4efh),hl ;6c75 22 ef f4 " . . l6c78h: jp l6036h ;6c78 c3 36 60 . 6 ` call sub_66c6h ;6c7b cd c6 66 . . f jp l6cech ;6c7e c3 ec 6c . . l l6c81h: ld hl,l66aeh ;6c81 21 ae 66 ! . f jr l6c8eh ;6c84 18 08 . . l6c86h: ld hl,l66d9h ;6c86 21 d9 66 ! . f jr l6c8eh ;6c89 18 03 . . l6c8bh: ld hl,l676eh ;6c8b 21 6e 67 ! n g l6c8eh: ld bc,l0000h ;6c8e 01 00 00 . . . ld (0f78ch),bc ;6c91 ed 43 8c f7 . C . . ld a,(0f07ah) ;6c95 3a 7a f0 : z . or 008h ;6c98 f6 08 . . ld (0f07ah),a ;6c9a 32 7a f0 2 z . ld bc,l6ca2h ;6c9d 01 a2 6c . . l push bc ;6ca0 c5 . jp (hl) ;6ca1 e9 . l6ca2h: ld hl,0f0dbh ;6ca2 21 db f0 ! . . res 1,(hl) ;6ca5 cb 8e . . ld hl,(0f78ch) ;6ca7 2a 8c f7 * . . ld a,l ;6caa 7d } ret ;6cab c9 . l6cach: call l6ca2h ;6cac cd a2 6c . . l ld hl,l6ce9h ;6caf 21 e9 6c ! . l push hl ;6cb2 e5 . ld hl,sub_00feh+1 ;6cb3 21 ff 00 ! . . inc h ;6cb6 24 $ ld a,(0f78dh) ;6cb7 3a 8d f7 : . . or a ;6cba b7 . jr z,l6cc7h ;6cbb 28 0a ( . call sub_6cf2h ;6cbd cd f2 6c . . l xor a ;6cc0 af . ld (0f361h),a ;6cc1 32 61 f3 2 a . jp l205fh ;6cc4 c3 5f 20 . _ l6cc7h: inc h ;6cc7 24 $ ld a,(0f78ch) ;6cc8 3a 8c f7 : . . cp 00fh ;6ccb fe 0f . . jr nz,l6cd5h ;6ccd 20 06 . call sub_6cf2h ;6ccf cd f2 6c . . l jp 02067h ;6cd2 c3 67 20 . g l6cd5h: inc h ;6cd5 24 $ cp 006h ;6cd6 fe 06 . . jr nz,l6ce0h ;6cd8 20 06 . call sub_6cf2h ;6cda cd f2 6c . . l jp 0206bh ;6cdd c3 6b 20 . k l6ce0h: ld hl,l60b7h ;6ce0 21 b7 60 ! . ` call sub_6042h ;6ce3 cd 42 60 . B ` l6ce6h: ld (0f4f1h),hl ;6ce6 22 f1 f4 " . . l6ce9h: jp l2ac9h ;6ce9 c3 c9 2a . . * l6cech: ld (0f4f1h),a ;6cec 32 f1 f4 2 . . l6cefh: pop hl ;6cef e1 . jr l6ce9h ;6cf0 18 f7 . . sub_6cf2h: ld (0f4f1h),hl ;6cf2 22 f1 f4 " . . sub_6cf5h: ld hl,0f07ah ;6cf5 21 7a f0 ! z . set 5,(hl) ;6cf8 cb ee . . ret ;6cfa c9 . ld d,h ;6cfb 54 T ld b,l ;6cfc 45 E jr nz,l6d22h ;6cfd 20 23 # jr nz,$+38 ;6cff 20 24 $ l6d01h: push hl ;6d01 e5 . push de ;6d02 d5 . ld h,a ;6d03 67 g ld a,b ;6d04 78 x cp 016h ;6d05 fe 16 . . jr nc,l6d14h ;6d07 30 0b 0 . ld e,a ;6d09 5f _ ld a,h ;6d0a 7c | ld hl,l6d17h ;6d0b 21 17 6d ! . m call sub_6043h ;6d0e cd 43 60 . C ` pop de ;6d11 d1 . ex (sp),hl ;6d12 e3 . ret ;6d13 c9 . l6d14h: pop de ;6d14 d1 . pop hl ;6d15 e1 . ret ;6d16 c9 . l6d17h: rst 8 ;6d17 cf . ld l,l ;6d18 6d m sub 06dh ;6d19 d6 6d . m sbc a,06dh ;6d1b de 6d . m push hl ;6d1d e5 . ld l,l ;6d1e 6d m call pe,0ef6dh ;6d1f ec 6d ef . m . l6d22h: ld l,l ;6d22 6d m jp p,0f56dh ;6d23 f2 6d f5 . m . ld l,l ;6d26 6d m ret m ;6d27 f8 . ld l,l ;6d28 6d m rra ;6d29 1f . ld l,(hl) ;6d2a 6e n ld d,b ;6d2b 50 P ld l,(hl) ;6d2c 6e n cp 06dh ;6d2d fe 6d . m ld bc,05b6eh ;6d2f 01 6e 5b . n [ ld l,(hl) ;6d32 6e n adc a,a ;6d33 8f . ld l,(hl) ;6d34 6e n ei ;6d35 fb . ld l,l ;6d36 6d m sub h ;6d37 94 . ld l,(hl) ;6d38 6e n ld h,h ;6d39 64 d ld l,a ;6d3a 6f o or (hl) ;6d3b b6 . ld l,a ;6d3c 6f o jp pe,l136fh ;6d3d ea 6f 13 . o . ld (hl),b ;6d40 70 p l6d41h: call sub_6d59h ;6d41 cd 59 6d . Y m jr nz,l6d76h ;6d44 20 30 0 call sub_456bh ;6d46 cd 6b 45 . k E jr z,l6d41h ;6d49 28 f6 ( . xor a ;6d4b af . ret ;6d4c c9 . l6d4dh: call sub_6d61h ;6d4d cd 61 6d . a m jr nz,l6d76h ;6d50 20 24 $ call sub_456bh ;6d52 cd 6b 45 . k E jr z,l6d4dh ;6d55 28 f6 ( . xor a ;6d57 af . ret ;6d58 c9 . sub_6d59h: ld b,007h ;6d59 06 07 . . ld a,(0f0dah) ;6d5b 3a da f0 : . . or a ;6d5e b7 . jr nz,l6d68h ;6d5f 20 07 . sub_6d61h: ld b,006h ;6d61 06 06 . . ld a,(0f10bh) ;6d63 3a 0b f1 : . . or a ;6d66 b7 . ret z ;6d67 c8 . l6d68h: ld a,(0f0b8h) ;6d68 3a b8 f0 : . . and 004h ;6d6b e6 04 . . jr z,l6d71h ;6d6d 28 02 ( . ld b,006h ;6d6f 06 06 . . l6d71h: push bc ;6d71 c5 . call sub_454bh ;6d72 cd 4b 45 . K E pop af ;6d75 f1 . l6d76h: push af ;6d76 f5 . call sub_6de5h ;6d77 cd e5 6d . . m call 06e01h ;6d7a cd 01 6e . . n pop af ;6d7d f1 . ld (0f78dh),a ;6d7e 32 8d f7 2 . . or a ;6d81 b7 . ret ;6d82 c9 . sub_6d83h: ld a,d ;6d83 7a z xor h ;6d84 ac . rla ;6d85 17 . ld a,000h ;6d86 3e 00 > . jr c,l6d98h ;6d88 38 0e 8 . sbc hl,de ;6d8a ed 52 . R jr z,l6da9h ;6d8c 28 1b ( . inc a ;6d8e 3c < jr nc,l6da8h ;6d8f 30 17 0 . add hl,de ;6d91 19 . ex de,hl ;6d92 eb . or a ;6d93 b7 . sbc hl,de ;6d94 ed 52 . R jr l6da9h ;6d96 18 11 . . l6d98h: inc a ;6d98 3c < bit 7,d ;6d99 cb 7a . z jr nz,l6d9fh ;6d9b 20 02 . ex de,hl ;6d9d eb . dec a ;6d9e 3d = l6d9fh: push hl ;6d9f e5 . ld hl,l0000h ;6da0 21 00 00 ! . . sbc hl,de ;6da3 ed 52 . R pop de ;6da5 d1 . adc hl,de ;6da6 ed 5a . Z l6da8h: inc a ;6da8 3c < l6da9h: or a ;6da9 b7 . ret ;6daa c9 . sub_6dabh: call sub_44b2h ;6dab cd b2 44 . . D ld b,c ;6dae 41 A call sub_44b2h ;6daf cd b2 44 . . D ld (0f7b4h),bc ;6db2 ed 43 b4 f7 . C . . ret ;6db6 c9 . sub_6db7h: ld c,a ;6db7 4f O jp sub_44ach ;6db8 c3 ac 44 . . D sub_6dbbh: ld a,(0f362h) ;6dbb 3a 62 f3 : b . and 080h ;6dbe e6 80 . . ret z ;6dc0 c8 . ld c,055h ;6dc1 0e 55 . U ld de,(0f366h) ;6dc3 ed 5b 66 f3 . [ f . jp l453dh ;6dc7 c3 3d 45 . = E l6dcah: ld c,056h ;6dca 0e 56 . V jp sub_4505h ;6dcc c3 05 45 . . E sub_6dcfh: ld c,040h ;6dcf 0e 40 . @ call sub_4514h ;6dd1 cd 14 45 . . E jr l6ddbh ;6dd4 18 05 . . sub_6dd6h: ld c,04ch ;6dd6 0e 4c . L call l4520h ;6dd8 cd 20 45 . E l6ddbh: ex de,hl ;6ddb eb . jr l6e06h ;6ddc 18 28 . ( l6ddeh: ld c,04dh ;6dde 0e 4d . M l6de0h: call l453dh ;6de0 cd 3d 45 . = E jr l6e06h ;6de3 18 21 . ! sub_6de5h: ld c,04ah ;6de5 0e 4a . J call sub_6e03h ;6de7 cd 03 6e . . n jr l6dcah ;6dea 18 de . . ld c,048h ;6dec 0e 48 . H ld a,(l490eh) ;6dee 3a 0e 49 : . I ld a,(l460eh) ;6df1 3a 0e 46 : . F ld a,(l470eh) ;6df4 3a 0e 47 : . G ld a,(0450eh) ;6df7 3a 0e 45 : . E ld a,(l560eh) ;6dfa 3a 0e 56 : . V ld a,(l410dh+1) ;6dfd 3a 0e 41 : . A ld a,(l420eh) ;6e00 3a 0e 42 : . B sub_6e03h: call sub_4505h ;6e03 cd 05 45 . . E l6e06h: ld a,c ;6e06 79 y or a ;6e07 b7 . jr z,l6e0fh ;6e08 28 05 ( . sub 040h ;6e0a d6 40 . @ ld c,a ;6e0c 4f O ld a,0feh ;6e0d 3e fe > . l6e0fh: push af ;6e0f f5 . ld a,c ;6e10 79 y ld (0f78dh),a ;6e11 32 8d f7 2 . . pop af ;6e14 f1 . l6e15h: ld (0f536h),a ;6e15 32 36 f5 2 6 . or a ;6e18 b7 . ret ;6e19 c9 . sub_6e1ah: call sub_44b2h ;6e1a cd b2 44 . . D jr l6e06h ;6e1d 18 e7 . . ld c,046h ;6e1f 0e 46 . F sub_6e21h: push bc ;6e21 c5 . call 06dfbh ;6e22 cd fb 6d . . m pop bc ;6e25 c1 . call sub_4505h ;6e26 cd 05 45 . . E ld hl,sub_00efh+1 ;6e29 21 f0 00 ! . . ld (0f073h),hl ;6e2c 22 73 f0 " s . l6e2fh: call sub_6d59h ;6e2f cd 59 6d . Y m ret nz ;6e32 c0 . ld hl,(0f073h) ;6e33 2a 73 f0 * s . rlc h ;6e36 cb 04 . . jr c,l6e47h ;6e38 38 0d 8 . call sub_3461h ;6e3a cd 61 34 . a 4 call sub_6dcfh ;6e3d cd cf 6d . . m ld a,h ;6e40 7c | and 040h ;6e41 e6 40 . @ jr nz,l6e2fh ;6e43 20 ea . l6e45h: jr l6e06h ;6e45 18 bf . . l6e47h: call sub_6de5h ;6e47 cd e5 6d . . m ld c,007h ;6e4a 0e 07 . . l6e4ch: ld a,005h ;6e4c 3e 05 > . jr l6e0fh ;6e4e 18 bf . . l6e50h: ld c,045h ;6e50 0e 45 . E call sub_6e21h ;6e52 cd 21 6e . ! n ret nz ;6e55 c0 . ld d,a ;6e56 57 W ld e,a ;6e57 5f _ jp l6ddeh ;6e58 c3 de 6d . . m sub_6e5bh: ld (0f6f3h),de ;6e5b ed 53 f3 f6 . S . . call sub_6de5h ;6e5f cd e5 6d . . m jr nz,l6e4ch ;6e62 20 e8 . call sub_6dd6h ;6e64 cd d6 6d . . m jr nz,l6e4ch ;6e67 20 e3 . ld de,(0f6f3h) ;6e69 ed 5b f3 f6 . [ . . ex de,hl ;6e6d eb . call sub_6d83h ;6e6e cd 83 6d . . m jp z,l6e06h ;6e71 ca 06 6e . . n ld c,043h ;6e74 0e 43 . C dec a ;6e76 3d = jr z,l6e7bh ;6e77 28 02 ( . ld c,044h ;6e79 0e 44 . D l6e7bh: call sub_4488h ;6e7b cd 88 44 . . D ld c,h ;6e7e 4c L call sub_44ach ;6e7f cd ac 44 . . D ld c,l ;6e82 4d M call sub_44ach ;6e83 cd ac 44 . . D call l6d41h ;6e86 cd 41 6d . A m ret nz ;6e89 c0 . call sub_44b2h ;6e8a cd b2 44 . . D jr l6e45h ;6e8d 18 b6 . . ld c,055h ;6e8f 0e 55 . U jp l6de0h ;6e91 c3 e0 6d . . m ld (0f6e7h),a ;6e94 32 e7 f6 2 . . ld a,c ;6e97 79 y ld (0f6e8h),a ;6e98 32 e8 f6 2 . . ld (0f6e9h),de ;6e9b ed 53 e9 f6 . S . . ld (0f6ebh),hl ;6e9f 22 eb f6 " . . and 00fh ;6ea2 e6 0f . . ld (0f6edh),a ;6ea4 32 ed f6 2 . . ld a,(0f363h) ;6ea7 3a 63 f3 : c . ld (0f6eeh),a ;6eaa 32 ee f6 2 . . ld hl,(0f35dh) ;6ead 2a 5d f3 * ] . ld a,(hl) ;6eb0 7e ~ ld (0f6f1h),a ;6eb1 32 f1 f6 2 . . l6eb4h: call sub_6dd6h ;6eb4 cd d6 6d . . m ld (0f6efh),hl ;6eb7 22 ef f6 " . . xor a ;6eba af . l6ebbh: ld (0f6f2h),a ;6ebb 32 f2 f6 2 . . call sub_6dbbh ;6ebe cd bb 6d . . m call sub_6f3fh ;6ec1 cd 3f 6f . ? o call l6d4dh ;6ec4 cd 4d 6d . M m ret nz ;6ec7 c0 . call sub_6e1ah ;6ec8 cd 1a 6e . . n jr nz,l6effh ;6ecb 20 32 2 call sub_6dabh ;6ecd cd ab 6d . . m ld bc,(0f6e9h) ;6ed0 ed 4b e9 f6 . K . . ld de,(0f35dh) ;6ed4 ed 5b 5d f3 . [ ] . call sub_44d2h ;6ed8 cd d2 44 . . D ld hl,(0f35dh) ;6edb 2a 5d f3 * ] . ld a,(0f6e7h) ;6ede 3a e7 f6 : . . add a,l ;6ee1 85 . ld l,a ;6ee2 6f o ld a,000h ;6ee3 3e 00 > . adc a,h ;6ee5 8c . ld de,(0f6ebh) ;6ee6 ed 5b eb f6 . [ . . ld a,(hl) ;6eea 7e ~ inc hl ;6eeb 23 # ld l,(hl) ;6eec 6e n ld h,a ;6eed 67 g or a ;6eee b7 . sbc hl,de ;6eef ed 52 . R jp z,l6f62h ;6ef1 ca 62 6f . b o jr nc,l6f35h ;6ef4 30 3f 0 ? inc hl ;6ef6 23 # inc hl ;6ef7 23 # inc hl ;6ef8 23 # ld a,h ;6ef9 7c | or a ;6efa b7 . jr nz,l6f35h ;6efb 20 38 8 jr l6eb4h ;6efd 18 b5 . . l6effh: ld a,c ;6eff 79 y cp 002h ;6f00 fe 02 . . jr z,l6f30h ;6f02 28 2c ( , cp 006h ;6f04 fe 06 . . jr nz,l6f10h ;6f06 20 08 . ld hl,0f6eeh ;6f08 21 ee f6 ! . . dec (hl) ;6f0b 35 5 jr nz,l6eb4h ;6f0c 20 a6 . jr l6f2dh ;6f0e 18 1d . . l6f10h: ld a,(0f6f2h) ;6f10 3a f2 f6 : . . inc a ;6f13 3c < ld hl,0f363h ;6f14 21 63 f3 ! c . cp (hl) ;6f17 be . jr nz,l6ebbh ;6f18 20 a1 . ld a,(0f6edh) ;6f1a 3a ed f6 : . . dec a ;6f1d 3d = ld (0f6edh),a ;6f1e 32 ed f6 2 . . rla ;6f21 17 . jr c,l6f35h ;6f22 38 11 8 . ld de,(0f6efh) ;6f24 ed 5b ef f6 . [ . . call sub_6e5bh ;6f28 cd 5b 6e . [ n jr z,l6eb4h ;6f2b 28 87 ( . l6f2dh: call sub_6de5h ;6f2d cd e5 6d . . m l6f30h: ld a,001h ;6f30 3e 01 > . jp l6e15h ;6f32 c3 15 6e . . n l6f35h: call sub_6de5h ;6f35 cd e5 6d . . m ld a,001h ;6f38 3e 01 > . ld c,080h ;6f3a 0e 80 . . jp l6e0fh ;6f3c c3 0f 6e . . n sub_6f3fh: ld a,(0f6e8h) ;6f3f 3a e8 f6 : . . ld c,053h ;6f42 0e 53 . S rla ;6f44 17 . jp nc,l6f4ah ;6f45 d2 4a 6f . J o ld c,054h ;6f48 0e 54 . T l6f4ah: call sub_4488h ;6f4a cd 88 44 . . D ld a,(0f6eah) ;6f4d 3a ea f6 : . . call sub_6db7h ;6f50 cd b7 6d . . m ld a,(0f6e9h) ;6f53 3a e9 f6 : . . call sub_6db7h ;6f56 cd b7 6d . . m ld a,(0f6f1h) ;6f59 3a f1 f6 : . . jp sub_6db7h ;6f5c c3 b7 6d . . m l6f5fh: call sub_6dabh ;6f5f cd ab 6d . . m l6f62h: xor a ;6f62 af . ret ;6f63 c9 . push bc ;6f64 c5 . push de ;6f65 d5 . call sub_6dbbh ;6f66 cd bb 6d . . m pop de ;6f69 d1 . pop bc ;6f6a c1 . ld (0f6e7h),de ;6f6b ed 53 e7 f6 . S . . ld a,c ;6f6f 79 y ld b,004h ;6f70 06 04 . . l6f72h: ld c,051h ;6f72 0e 51 . Q rla ;6f74 17 . jr nc,l6f79h ;6f75 30 02 0 . ld c,052h ;6f77 0e 52 . R l6f79h: ld a,b ;6f79 78 x ld (0f6eah),a ;6f7a 32 ea f6 2 . . call sub_4488h ;6f7d cd 88 44 . . D ld a,(0f6e8h) ;6f80 3a e8 f6 : . . call sub_6db7h ;6f83 cd b7 6d . . m ld a,(0f6e7h) ;6f86 3a e7 f6 : . . call sub_6db7h ;6f89 cd b7 6d . . m ld a,(0f6eah) ;6f8c 3a ea f6 : . . call sub_6db7h ;6f8f cd b7 6d . . m ld bc,(0f6e7h) ;6f92 ed 4b e7 f6 . K . . ld de,(0f35dh) ;6f96 ed 5b 5d f3 . [ ] . call sub_44bbh ;6f9a cd bb 44 . . D call l6d4dh ;6f9d cd 4d 6d . M m ret nz ;6fa0 c0 . call sub_44b2h ;6fa1 cd b2 44 . . D call l6e06h ;6fa4 cd 06 6e . . n jr z,l6f5fh ;6fa7 28 b6 ( . ld a,c ;6fa9 79 y ld c,003h ;6faa 0e 03 . . cp 01bh ;6fac fe 1b . . ld a,c ;6fae 79 y jr z,l6fb3h ;6faf 28 02 ( . ld a,002h ;6fb1 3e 02 > . l6fb3h: jp l6e15h ;6fb3 c3 15 6e . . n call sub_7001h ;6fb6 cd 01 70 . . p ret nz ;6fb9 c0 . ld a,(0f362h) ;6fba 3a 62 f3 : b . ld (0f6e8h),a ;6fbd 32 e8 f6 2 . . ld a,(0f364h) ;6fc0 3a 64 f3 : d . ld (0f6f1h),a ;6fc3 32 f1 f6 2 . . ld hl,(0f7b6h) ;6fc6 2a b6 f7 * . . ld (0f6e9h),hl ;6fc9 22 e9 f6 " . . call sub_6f3fh ;6fcc cd 3f 6f . ? o call l6d4dh ;6fcf cd 4d 6d . M m ret nz ;6fd2 c0 . call sub_44b2h ;6fd3 cd b2 44 . . D call l6e06h ;6fd6 cd 06 6e . . n jp nz,l6f2dh ;6fd9 c2 2d 6f . - o call sub_6dabh ;6fdc cd ab 6d . . m ld bc,(0f7b6h) ;6fdf ed 4b b6 f7 . K . . ld de,(0f35dh) ;6fe3 ed 5b 5d f3 . [ ] . jp sub_44d2h ;6fe7 c3 d2 44 . . D call sub_7001h ;6fea cd 01 70 . . p ret nz ;6fed c0 . ld bc,(0f7b6h) ;6fee ed 4b b6 f7 . K . . ld (0f6e7h),bc ;6ff2 ed 43 e7 f6 . C . . ld a,(0f365h) ;6ff6 3a 65 f3 : e . ld b,a ;6ff9 47 G ld a,(0f362h) ;6ffa 3a 62 f3 : b . rla ;6ffd 17 . jp l6f72h ;6ffe c3 72 6f . r o sub_7001h: ld a,(0f362h) ;7001 3a 62 f3 : b . and 020h ;7004 e6 20 . ret z ;7006 c8 . ld de,(0f7b8h) ;7007 ed 5b b8 f7 . [ . . ld a,d ;700b 7a z or e ;700c b3 . jp z,l6e50h ;700d ca 50 6e . P n jp sub_6e5bh ;7010 c3 5b 6e . [ n ld c,04bh ;7013 0e 4b . K call sub_4514h ;7015 cd 14 45 . . E ld a,d ;7018 7a z or a ;7019 b7 . jp nz,l6f62h ;701a c2 62 6f . b o ld a,003h ;701d 3e 03 > . ld c,a ;701f 4f O jp l6e0fh ;7020 c3 0f 6e . . n rst 38h ;7023 ff . rst 38h ;7024 ff . rst 38h ;7025 ff . rst 38h ;7026 ff . rst 38h ;7027 ff . rst 38h ;7028 ff . rst 38h ;7029 ff . rst 38h ;702a ff . rst 38h ;702b ff . rst 38h ;702c ff . rst 38h ;702d ff . rst 38h ;702e ff . rst 38h ;702f ff . l7030h: jp 0035ch ;7030 c3 5c 03 . \ . jp l0358h ;7033 c3 58 03 . X . ld a,a ;7036 7f  nop ;7037 00 . jr nz,l705ah ;7038 20 20 jr nz,$+34 ;703a 20 20 jr nz,l705eh ;703c 20 20 jr nz,l7060h ;703e 20 20 jr nz,l7062h ;7040 20 20 jr nz,$+34 ;7042 20 20 jr nz,l7066h ;7044 20 20 jr nz,l7068h ;7046 20 20 ld b,e ;7048 43 C ld c,a ;7049 4f O ld d,b ;704a 50 P ld e,c ;704b 59 Y ld d,d ;704c 52 R ld c,c ;704d 49 I ld b,a ;704e 47 G ld c,b ;704f 48 H ld d,h ;7050 54 T jr nz,$+42 ;7051 20 28 ( ld b,e ;7053 43 C add hl,hl ;7054 29 ) jr nz,$+51 ;7055 20 31 1 add hl,sp ;7057 39 9 scf ;7058 37 7 add hl,sp ;7059 39 9 l705ah: inc l ;705a 2c , jr nz,$+70 ;705b 20 44 D ld c,c ;705d 49 I l705eh: ld b,a ;705e 47 G ld c,c ;705f 49 I l7060h: ld d,h ;7060 54 T ld b,c ;7061 41 A l7062h: ld c,h ;7062 4c L jr nz,l70b7h ;7063 20 52 R ld b,l ;7065 45 E l7066h: ld d,e ;7066 53 S ld b,l ;7067 45 E l7068h: ld b,c ;7068 41 A ld d,d ;7069 52 R ld b,e ;706a 43 C ld c,b ;706b 48 H jr nz,$+34 ;706c 20 20 sub_706eh: ld c,001h ;706e 0e 01 . . l7070h: ld (0f6e7h),hl ;7070 22 e7 f6 " . . l7073h: ld a,(hl) ;7073 7e ~ or a ;7074 b7 . jr nz,l707eh ;7075 20 07 . dec c ;7077 0d . ret z ;7078 c8 . ld hl,(0f6e7h) ;7079 2a e7 f6 * . . jr l7073h ;707c 18 f5 . . l707eh: push bc ;707e c5 . ld c,a ;707f 4f O inc hl ;7080 23 # ld e,(hl) ;7081 5e ^ inc hl ;7082 23 # ld d,(hl) ;7083 56 V inc hl ;7084 23 # push hl ;7085 e5 . call sub_2c01h ;7086 cd 01 2c . . , pop hl ;7089 e1 . pop bc ;708a c1 . or a ;708b b7 . ret nz ;708c c0 . jr l7073h ;708d 18 e4 . . sub_708fh: ld d,001h ;708f 16 01 . . ld a,(l0015h+1) ;7091 3a 16 00 : . . ld c,011h ;7094 0e 11 . . jr l709fh ;7096 18 07 . . sub_7098h: ld d,080h ;7098 16 80 . . ld a,(l0015h+1) ;709a 3a 16 00 : . . ld c,072h ;709d 0e 72 . r l709fh: call sub_4535h ;709f cd 35 45 . 5 E ret ;70a2 c9 . ld bc,l018fh ;70a3 01 8f 01 . . . nop ;70a6 00 . inc bc ;70a7 03 . adc a,a ;70a8 8f . ld bc,l0100h ;70a9 01 00 01 . . . dec hl ;70ac 2b + ld bc,0ed01h ;70ad 01 01 ed . . . nop ;70b0 00 . nop ;70b1 00 . rst 38h ;70b2 ff . rst 38h ;70b3 ff . rst 38h ;70b4 ff . rst 38h ;70b5 ff . rst 38h ;70b6 ff . l70b7h: rst 38h ;70b7 ff . ex af,af' ;70b8 08 . nop ;70b9 00 . ld (05f3dh),a ;70ba 32 3d 5f 2 = _ ld c,002h ;70bd 0e 02 . . jp l0003h+2 ;70bf c3 05 00 . . . push bc ;70c2 c5 . call sub_008ch ;70c3 cd 8c 00 . . . pop bc ;70c6 c1 . ret ;70c7 c9 . ld a,00dh ;70c8 3e 0d > . call sub_0092h ;70ca cd 92 00 . . . ld a,00ah ;70cd 3e 0a > . jp sub_0092h ;70cf c3 92 00 . . . ld a,020h ;70d2 3e 20 > jp sub_0092h ;70d4 c3 92 00 . . . push bc ;70d7 c5 . call 00098h ;70d8 cd 98 00 . . . pop hl ;70db e1 . ld a,(hl) ;70dc 7e ~ or a ;70dd b7 . ret z ;70de c8 . inc hl ;70df 23 # push hl ;70e0 e5 . call sub_008ch ;70e1 cd 8c 00 . . . pop hl ;70e4 e1 . jp 000ach ;70e5 c3 ac 00 . . . ld c,00dh ;70e8 0e 0d . . jp l0003h+2 ;70ea c3 05 00 . . . ld e,a ;70ed 5f _ ld c,00eh ;70ee 0e 0e . . jp l0003h+2 ;70f0 c3 05 00 . . . call l0003h+2 ;70f3 cd 05 00 . . . ld (l07edh+1),a ;70f6 32 ee 07 2 . . inc a ;70f9 3c < ret ;70fa c9 . ld c,00fh ;70fb 0e 0f . . jp 000c3h ;70fd c3 c3 00 . . . xor a ;7100 af . ld (l07edh),a ;7101 32 ed 07 2 . . ld de,l07cdh ;7104 11 cd 07 . . . jp l00cah+1 ;7107 c3 cb 00 . . . ld c,010h ;710a 0e 10 . . jp 000c3h ;710c c3 c3 00 . . . ld c,011h ;710f 0e 11 . . jp 000c3h ;7111 c3 c3 00 . . . ld c,012h ;7114 0e 12 . . jp 000c3h ;7116 c3 c3 00 . . . ld de,l07cdh ;7119 11 cd 07 . . . jp l00dfh ;711c c3 df 00 . . . ld c,013h ;711f 0e 13 . . jp l0003h+2 ;7121 c3 05 00 . . . call l0003h+2 ;7124 cd 05 00 . . . or a ;7127 b7 . ret ;7128 c9 . ld c,014h ;7129 0e 14 . . jp 000f4h ;712b c3 f4 00 . . . ld de,l07cdh ;712e 11 cd 07 . . . jp 000f9h ;7131 c3 f9 00 . . . ld c,015h ;7134 0e 15 . . jp 000f4h ;7136 c3 f4 00 . . . ld c,016h ;7139 0e 16 . . jp 000c3h ;713b c3 c3 00 . . . ld c,017h ;713e 0e 17 . . jp l0003h+2 ;7140 c3 05 00 . . . ld e,0ffh ;7143 1e ff . . ld c,020h ;7145 0e 20 . jp l0003h+2 ;7147 c3 05 00 . . . call 00113h ;714a cd 13 01 . . . add a,a ;714d 87 . add a,a ;714e 87 . add a,a ;714f 87 . add a,a ;7150 87 . ld hl,l07efh ;7151 21 ef 07 ! . . or (hl) ;7154 b6 . ld (l0003h+1),a ;7155 32 04 00 2 . . ret ;7158 c9 . ld a,(l07efh) ;7159 3a ef 07 : . . ld (l0003h+1),a ;715c 32 04 00 2 . . ret ;715f c9 . cp 061h ;7160 fe 61 . a ret c ;7162 d8 . cp 07bh ;7163 fe 7b . { ret nc ;7165 d0 . and 05fh ;7166 e6 5f . _ ret ;7168 c9 . ld a,(007abh) ;7169 3a ab 07 : . . or a ;716c b7 . jp z,00196h ;716d ca 96 01 . . . ld a,(l07efh) ;7170 3a ef 07 : . . or a ;7173 b7 . ld a,000h ;7174 3e 00 > . call nz,000bdh ;7176 c4 bd 00 . . . ld de,l07ach ;7179 11 ac 07 . . . call l00cah+1 ;717c cd cb 00 . . . jp z,00196h ;717f ca 96 01 . . . ld a,(l07bbh) ;7182 3a bb 07 : . . dec a ;7185 3d = ld (007cch),a ;7186 32 cc 07 2 . . ld de,l07ach ;7189 11 ac 07 . . . call 000f9h ;718c cd f9 00 . . . jp nz,00196h ;718f c2 96 01 . . . ld de,l0006h+1 ;7192 11 07 00 . . . ld hl,l0080h ;7195 21 80 00 ! . . ld b,080h ;7198 06 80 . . call 00442h ;719a cd 42 04 . B . ld hl,l07bah ;719d 21 ba 07 ! . . ld (hl),000h ;71a0 36 00 6 . inc hl ;71a2 23 # dec (hl) ;71a3 35 5 ld de,l07ach ;71a4 11 ac 07 . . . call sub_00dah ;71a7 cd da 00 . . . jp z,00196h ;71aa ca 96 01 . . . ld a,(l07efh) ;71ad 3a ef 07 : . . or a ;71b0 b7 . call nz,000bdh ;71b1 c4 bd 00 . . . ld hl,l0006h+2 ;71b4 21 08 00 ! . . call 000ach ;71b7 cd ac 00 . . . call sub_01c2h ;71ba cd c2 01 . . . jp z,l01a7h ;71bd ca a7 01 . . . call 001ddh ;71c0 cd dd 01 . . . jp l0381h+1 ;71c3 c3 82 03 . . . call 001ddh ;71c6 cd dd 01 . . . call l011ah ;71c9 cd 1a 01 . . . ld c,00ah ;71cc 0e 0a . . ld de,l0006h ;71ce 11 06 00 . . . call l0003h+2 ;71d1 cd 05 00 . . . call 00129h ;71d4 cd 29 01 . ) . ld hl,l0006h+1 ;71d7 21 07 00 ! . . ld b,(hl) ;71da 46 F inc hl ;71db 23 # ld a,b ;71dc 78 x or a ;71dd b7 . jp z,l01bah ;71de ca ba 01 . . . ld a,(hl) ;71e1 7e ~ call 00130h ;71e2 cd 30 01 . 0 . ld (hl),a ;71e5 77 w dec b ;71e6 05 . jp l01abh ;71e7 c3 ab 01 . . . ld (hl),a ;71ea 77 w ld hl,l0006h+2 ;71eb 21 08 00 ! . . ld (l0088h),hl ;71ee 22 88 00 " . . ret ;71f1 c9 . ld c,00bh ;71f2 0e 0b . . call l0003h+2 ;71f4 cd 05 00 . . . or a ;71f7 b7 . ret z ;71f8 c8 . ld c,001h ;71f9 0e 01 . . call l0003h+2 ;71fb cd 05 00 . . . or a ;71fe b7 . ret ;71ff c9 . ld c,019h ;7200 0e 19 . . jp l0003h+2 ;7202 c3 05 00 . . . ld de,l0080h ;7205 11 80 00 . . . ld c,01ah ;7208 0e 1a . . jp l0003h+2 ;720a c3 05 00 . . . ld hl,007abh ;720d 21 ab 07 ! . . ld a,(hl) ;7210 7e ~ or a ;7211 b7 . ret z ;7212 c8 . ld (hl),000h ;7213 36 00 6 . xor a ;7215 af . call 000bdh ;7216 cd bd 00 . . . ld de,l07ach ;7219 11 ac 07 . . . call sub_00efh ;721c cd ef 00 . . . ld a,(l07efh) ;721f 3a ef 07 : . . jp 000bdh ;7222 c3 bd 00 . . . ld de,l0327h+1 ;7225 11 28 03 . ( . ld hl,00800h ;7228 21 00 08 ! . . ld b,006h ;722b 06 06 . . ld a,(de) ;722d 1a . cp (hl) ;722e be . jp nz,l03cfh ;722f c2 cf 03 . . . inc de ;7232 13 . inc hl ;7233 23 # dec b ;7234 05 . jp nz,001fdh ;7235 c2 fd 01 . . . ret ;7238 c9 . call 00098h ;7239 cd 98 00 . . . ld hl,(0008ah) ;723c 2a 8a 00 * . . ld a,(hl) ;723f 7e ~ cp 020h ;7240 fe 20 . jp z,l0222h ;7242 ca 22 02 . " . or a ;7245 b7 . jp z,l0222h ;7246 ca 22 02 . " . push hl ;7249 e5 . call sub_008ch ;724a cd 8c 00 . . . pop hl ;724d e1 . inc hl ;724e 23 # jp l020eh+1 ;724f c3 0f 02 . . . ld a,03fh ;7252 3e 3f > ? call sub_008ch ;7254 cd 8c 00 . . . call 00098h ;7257 cd 98 00 . . . call 001ddh ;725a cd dd 01 . . . jp l0381h+1 ;725d c3 82 03 . . . ld a,(de) ;7260 1a . or a ;7261 b7 . ret z ;7262 c8 . cp 020h ;7263 fe 20 . jp c,00209h ;7265 da 09 02 . . . ret z ;7268 c8 . cp 03dh ;7269 fe 3d . = ret z ;726b c8 . cp 05fh ;726c fe 5f . _ ret z ;726e c8 . cp 02eh ;726f fe 2e . . ret z ;7271 c8 . cp 03ah ;7272 fe 3a . : ret z ;7274 c8 . cp 03bh ;7275 fe 3b . ; ret z ;7277 c8 . cp 03ch ;7278 fe 3c . < ret z ;727a c8 . cp 03eh ;727b fe 3e . > ret z ;727d c8 . ret ;727e c9 . ld a,(de) ;727f 1a . or a ;7280 b7 . ret z ;7281 c8 . cp 020h ;7282 fe 20 . ret nz ;7284 c0 . inc de ;7285 13 . jp 0024fh ;7286 c3 4f 02 . O . add a,l ;7289 85 . ld l,a ;728a 6f o ret nc ;728b d0 . inc h ;728c 24 $ ret ;728d c9 . ld a,000h ;728e 3e 00 > . ld hl,l07cdh ;7290 21 cd 07 ! . . call l0259h ;7293 cd 59 02 . Y . push hl ;7296 e5 . push hl ;7297 e5 . xor a ;7298 af . ld (l07efh+1),a ;7299 32 f0 07 2 . . ld hl,(l0088h) ;729c 2a 88 00 * . . ex de,hl ;729f eb . call 0024fh ;72a0 cd 4f 02 . O . ex de,hl ;72a3 eb . ld (0008ah),hl ;72a4 22 8a 00 " . . ex de,hl ;72a7 eb . pop hl ;72a8 e1 . ld a,(de) ;72a9 1a . or a ;72aa b7 . jp z,l0289h ;72ab ca 89 02 . . . sbc a,040h ;72ae de 40 . @ ld b,a ;72b0 47 G inc de ;72b1 13 . ld a,(de) ;72b2 1a . cp 03ah ;72b3 fe 3a . : jp z,00290h ;72b5 ca 90 02 . . . dec de ;72b8 1b . ld a,(l07efh) ;72b9 3a ef 07 : . . ld (hl),a ;72bc 77 w jp 00296h ;72bd c3 96 02 . . . ld a,b ;72c0 78 x ld (l07efh+1),a ;72c1 32 f0 07 2 . . ld (hl),b ;72c4 70 p inc de ;72c5 13 . ld b,008h ;72c6 06 08 . . call 00230h ;72c8 cd 30 02 . 0 . jp z,l02b9h ;72cb ca b9 02 . . . inc hl ;72ce 23 # cp 02ah ;72cf fe 2a . * jp nz,002a9h ;72d1 c2 a9 02 . . . ld (hl),03fh ;72d4 36 3f 6 ? jp l02abh ;72d6 c3 ab 02 . . . ld (hl),a ;72d9 77 w inc de ;72da 13 . dec b ;72db 05 . jp nz,l0298h ;72dc c2 98 02 . . . call 00230h ;72df cd 30 02 . 0 . jp z,002c0h ;72e2 ca c0 02 . . . inc de ;72e5 13 . jp 002afh ;72e6 c3 af 02 . . . inc hl ;72e9 23 # ld (hl),020h ;72ea 36 20 6 dec b ;72ec 05 . jp nz,l02b9h ;72ed c2 b9 02 . . . ld b,003h ;72f0 06 03 . . cp 02eh ;72f2 fe 2e . . jp nz,l02e9h ;72f4 c2 e9 02 . . . inc de ;72f7 13 . call 00230h ;72f8 cd 30 02 . 0 . jp z,l02e9h ;72fb ca e9 02 . . . inc hl ;72fe 23 # cp 02ah ;72ff fe 2a . * jp nz,l02d9h ;7301 c2 d9 02 . . . ld (hl),03fh ;7304 36 3f 6 ? jp l02d9h+2 ;7306 c3 db 02 . . . ld (hl),a ;7309 77 w inc de ;730a 13 . dec b ;730b 05 . jp nz,l02c6h+2 ;730c c2 c8 02 . . . call 00230h ;730f cd 30 02 . 0 . jp z,002f0h ;7312 ca f0 02 . . . inc de ;7315 13 . jp 002dfh ;7316 c3 df 02 . . . inc hl ;7319 23 # ld (hl),020h ;731a 36 20 6 dec b ;731c 05 . jp nz,l02e9h ;731d c2 e9 02 . . . ld b,003h ;7320 06 03 . . inc hl ;7322 23 # ld (hl),000h ;7323 36 00 6 . dec b ;7325 05 . jp nz,l02f2h ;7326 c2 f2 02 . . . ex de,hl ;7329 eb . ld (l0088h),hl ;732a 22 88 00 " . . pop hl ;732d e1 . ld bc,l0009h+2 ;732e 01 0b 00 . . . inc hl ;7331 23 # ld a,(hl) ;7332 7e ~ cp 03fh ;7333 fe 3f . ? jp nz,l0309h ;7335 c2 09 03 . . . inc b ;7338 04 . dec c ;7339 0d . jp nz,00301h ;733a c2 01 03 . . . ld a,b ;733d 78 x or a ;733e b7 . ret ;733f c9 . ; CP/M internal commands ld b,h ;7340 44 D ; DIR ld c,c ;7341 49 I ld d,d ;7342 52 R jr nz,$+71 ;7343 20 45 E : ERA ld d,d ;7345 52 R ld b,c ;7346 41 A jr nz,$+86 ;7347 20 54 T ; TYPE ld e,c ;7349 59 Y ld d,b ;734a 50 P ld b,l ;734b 45 E ld d,e ;734c 53 S ; SAVE ld b,c ;734d 41 A ld d,(hl) ;734e 56 V ld b,l ;734f 45 E ld d,d ;7350 52 R ; REN ld b,l ;7351 45 E ld c,(hl) ;7352 4e N jr nz,$+87 ;7353 20 55 U : USER ld d,e ;7355 53 S ld b,l ;7356 45 E ld d,d ;7357 52 R call c,00316h ;7358 dc 16 03 . . . nop ;735b 00 . nop ;735c 00 . ld bc,01021h ;735d 01 21 10 . ! . inc bc ;7360 03 . ld c,000h ;7361 0e 00 . . ld a,c ;7363 79 y cp 006h ;7364 fe 06 . . ret nc ;7366 d0 . ld de,l07ceh ;7367 11 ce 07 . . . ld b,004h ;736a 06 04 . . ld a,(de) ;736c 1a . cp (hl) ;736d be . jp nz,l034eh+1 ;736e c2 4f 03 . O . inc de ;7371 13 . inc hl ;7372 23 # dec b ;7373 05 . jp nz,l033ch ;7374 c2 3c 03 . < . ld a,(de) ;7377 1a . cp 020h ;7378 fe 20 . jp nz,l0354h ;737a c2 54 03 . T . ld a,c ;737d 79 y ret ;737e c9 . inc hl ;737f 23 # dec b ;7380 05 . jp nz,l034eh+1 ;7381 c2 4f 03 . O . inc c ;7384 0c . jp 00333h ;7385 c3 33 03 . 3 . xor a ;7388 af . ld (l0006h+1),a ;7389 32 07 00 2 . . ;* C C P - C o n s o l e C o m m a n d P r o c e s s o r ld sp,007abh ;738c 31 ab 07 1 . . ; Start CCP Command routine push bc ;738f c5 . ld a,c ;7390 79 y rra ;7391 1f . rra ;7392 1f . rra ;7393 1f . rra ;7394 1f . and 00fh ;7395 e6 0f . . ld e,a ;7397 5f _ call 00115h ;7398 cd 15 01 . . . call sub_00b8h ;739b cd b8 00 . . . ld (007abh),a ;739e 32 ab 07 2 . . pop bc ;73a1 c1 . ld a,c ;73a2 79 y and 00fh ;73a3 e6 0f . . ld (l07efh),a ;73a5 32 ef 07 2 . . call 000bdh ;73a8 cd bd 00 . . . ld a,(l0006h+1) ;73ab 3a 07 00 : . . or a ;73ae b7 . jp nz,l0398h ;73af c2 98 03 . . . ld sp,007abh ;73b2 31 ab 07 1 . . ; Start CCP CMMND1 routine call 00098h ;73b5 cd 98 00 . . . call l01cfh+1 ;73b8 cd d0 01 . . . add a,041h ;73bb c6 41 . A call sub_008ch ;73bd cd 8c 00 . . . ld a,03eh ;73c0 3e 3e > > call sub_008ch ;73c2 cd 8c 00 . . . call 00139h ;73c5 cd 39 01 . 9 . ld de,l0080h ;73c8 11 80 00 . . . ; Start CCP CMMND2 routine call 001d8h ;73cb cd d8 01 . . . call l01cfh+1 ;73ce cd d0 01 . . . ld (l07efh),a ;73d1 32 ef 07 2 . . call 0025eh ;73d4 cd 5e 02 . ^ . call nz,00209h ;73d7 c4 09 02 . . . ld a,(l07efh+1) ;73da 3a f0 07 : . . or a ;73dd b7 . jp nz,l06a5h ;73de c2 a5 06 . . . call 0032eh ;73e1 cd 2e 03 . . . ld hl,l03c0h+1 ;73e4 21 c1 03 ! . . ld e,a ;73e7 5f _ ld d,000h ;73e8 16 00 . . add hl,de ;73ea 19 . add hl,de ;73eb 19 . ld a,(hl) ;73ec 7e ~ inc hl ;73ed 23 # ld h,(hl) ;73ee 66 f ld l,a ;73ef 6f o jp (hl) ;73f0 e9 . ld (hl),a ;73f1 77 w inc b ;73f2 04 . rra ;73f3 1f . dec b ;73f4 05 . ld e,l ;73f5 5d ] dec b ;73f6 05 . xor l ;73f7 ad . dec b ;73f8 05 . djnz l7401h ;73f9 10 06 . . adc a,(hl) ;73fb 8e . ld b,0a5h ;73fc 06 a5 . . ld b,021h ;73fe 06 21 . ! di ;7400 f3 . l7401h: halt ;7401 76 v ld (l0000h),hl ;7402 22 00 00 " . . ld hl,l0000h ;7405 21 00 00 ! . . jp (hl) ;7408 e9 . ld bc,l03dfh ;7409 01 df 03 . . . ; CCP RDERROR routine jp 000a7h ;740c c3 a7 00 . . . ld d,d ;740f 52 R ld b,l ;7410 45 E ld b,c ;7411 41 A ld b,h ;7412 44 D jr nz,l745ah ;7413 20 45 E ld d,d ;7415 52 R ld d,d ;7416 52 R ld c,a ;7417 4f O ld d,d ;7418 52 R nop ;7419 00 . ld bc,003f0h ;741a 01 f0 03 . . . ; CCP NONE routine jp 000a7h ;741d c3 a7 00 . . . ld c,(hl) ;7420 4e N ld c,a ;7421 4f O jr nz,l746ah ;7422 20 46 F ld c,c ;7424 49 I ld c,h ;7425 4c L ld b,l ;7426 45 E nop ;7427 00 . call 0025eh ;7428 cd 5e 02 . ^ . ; CCP DECODE routine ld a,(l07efh+1) ;742b 3a f0 07 : . . or a ;742e b7 . jp nz,00209h ;742f c2 09 02 . . . ld hl,l07ceh ;7432 21 ce 07 ! . . ld bc,l0009h+2 ;7435 01 0b 00 . . . ld a,(hl) ;7438 7e ~ ; CCP DECODE1 routine cp 020h ;7439 fe 20 . jp z,00433h ;743b ca 33 04 . 3 . inc hl ;743e 23 # sub 030h ;743f d6 30 . 0 cp 00ah ;7441 fe 0a . . jp nc,00209h ;7443 d2 09 02 . . . ld d,a ;7446 57 W ld a,b ;7447 78 x and 0e0h ;7448 e6 e0 . . jp nz,00209h ;744a c2 09 02 . . . ld a,b ;744d 78 x rlca ;744e 07 . rlca ;744f 07 . rlca ;7450 07 . add a,b ;7451 80 . jp c,00209h ;7452 da 09 02 . . . add a,b ;7455 80 . jp c,00209h ;7456 da 09 02 . . . add a,d ;7459 82 . l745ah: jp c,00209h ;745a da 09 02 . . . ; CCP DECODE2 routine ld b,a ;745d 47 G dec c ;745e 0d . jp nz,l0406h+2 ;745f c2 08 04 . . . ret ;7462 c9 . ld a,(hl) ;7463 7e ~ ; CCP DECODE3 routine cp 020h ;7464 fe 20 . jp nz,00209h ;7466 c2 09 02 . . . inc hl ;7469 23 # l746ah: dec c ;746a 0d . ; CCP DECODE4 routine jp nz,00433h ;746b c2 33 04 . 3 . ld a,b ;746e 78 x ret ;746f c9 . ld b,003h ;7470 06 03 . . ; CCP MOVE3 routine ld a,(hl) ;7472 7e ~ ; CCP HL2DE routine ld (de),a ;7473 12 . inc hl ;7474 23 # inc de ;7475 13 . dec b ;7476 05 . jp nz,00442h ;7477 c2 42 04 . B . ret ;747a c9 . ld hl,l0080h ;747b 21 80 00 ! . . ; CCP EXTRACT routine add a,c ;747e 81 . call l0259h ;747f cd 59 02 . Y . ld a,(hl) ;7482 7e ~ ret ;7483 c9 . xor a ;7484 af . ; CCP DSELECT routine ld (l07cdh),a ;7485 32 cd 07 2 . . ld a,(l07efh+1) ;7488 3a f0 07 : . . or a ;748b b7 . ret z ;748c c8 . dec a ;748d 3d = ld hl,l07efh ;748e 21 ef 07 ! . . cp (hl) ;7491 be . ret z ;7492 c8 . jp 000bdh ;7493 c3 bd 00 . . . ld a,(l07efh+1) ;7496 3a f0 07 : . . ; CCP RESETDR routine or a ;7499 b7 . ret z ;749a c8 . dec a ;749b 3d = ld hl,l07efh ;749c 21 ef 07 ! . . cp (hl) ;749f be . ret z ;74a0 c8 . ld a,(l07efh) ;74a1 3a ef 07 : . . jp 000bdh ;74a4 c3 bd 00 . . . ;* CCP D I R E C T O R Y C O M M A N D call 0025eh ;74a7 cd 5e 02 . ^ . ; CCP DIRECT routine call 00454h ;74aa cd 54 04 . T . ld hl,l07ceh ;74ad 21 ce 07 ! . . ld a,(hl) ;74b0 7e ~ cp 020h ;74b1 fe 20 . jp nz,l048fh ;74b3 c2 8f 04 . . . ld b,00bh ;74b6 06 0b . . ld (hl),03fh ;74b8 36 3f 6 ? ; CCP DIRECT1 routine inc hl ;74ba 23 # dec b ;74bb 05 . jp nz,l0488h ;74bc c2 88 04 . . . ld e,000h ;74bf 1e 00 . . ; CCP DIRECT2 routine push de ;74c1 d5 . call sub_00e9h ;74c2 cd e9 00 . . . call z,003eah ;74c5 cc ea 03 . . . jp z,sub_051bh ;74c8 ca 1b 05 . . . ; CCP DIRECT3 routine ld a,(l07edh+1) ;74cb 3a ee 07 : . . rrca ;74ce 0f . rrca ;74cf 0f . rrca ;74d0 0f . and 060h ;74d1 e6 60 . ` ld c,a ;74d3 4f O ld a,00ah ;74d4 3e 0a > . call 0044bh ;74d6 cd 4b 04 . K . rla ;74d9 17 . jp c,l050eh+1 ;74da da 0f 05 . . . pop de ;74dd d1 . ld a,e ;74de 7b { inc e ;74df 1c . push de ;74e0 d5 . and 003h ;74e1 e6 03 . . push af ;74e3 f5 . jp nz,l04cch ;74e4 c2 cc 04 . . . call 00098h ;74e7 cd 98 00 . . . push bc ;74ea c5 . call l01cfh+1 ;74eb cd d0 01 . . . pop bc ;74ee c1 . add a,041h ;74ef c6 41 . A call sub_0092h ;74f1 cd 92 00 . . . ld a,03ah ;74f4 3e 3a > : call sub_0092h ;74f6 cd 92 00 . . . jp 004d4h ;74f9 c3 d4 04 . . . call 000a2h ;74fc cd a2 00 . . . ; CCP DIRECT4 routine ld a,03ah ;74ff 3e 3a > : call sub_0092h ;7501 cd 92 00 . . . call 000a2h ;7504 cd a2 00 . . . ; CCP DIRECT5 routine ld b,001h ;7507 06 01 . . ld a,b ;7509 78 x ; CCP DIRECT6 routine call 0044bh ;750a cd 4b 04 . K . and 07fh ;750d e6 7f .  cp 020h ;750f fe 20 . jp nz,004f9h ;7511 c2 f9 04 . . . pop af ;7514 f1 . push af ;7515 f5 . cp 003h ;7516 fe 03 . . jp nz,004f7h ;7518 c2 f7 04 . . . ld a,009h ;751b 3e 09 > . call 0044bh ;751d cd 4b 04 . K . and 07fh ;7520 e6 7f .  cp 020h ;7522 fe 20 . jp z,l050eh ;7524 ca 0e 05 . . . ld a,020h ;7527 3e 20 > ; CCP DIRECT63 routine call sub_0092h ;7529 cd 92 00 . . . ; CCP DIRECT65 routine inc b ;752c 04 . ld a,b ;752d 78 x cp 00ch ;752e fe 0c . . jp nc,l050eh ;7530 d2 0e 05 . . . cp 009h ;7533 fe 09 . . jp nz,004d9h ;7535 c2 d9 04 . . . call 000a2h ;7538 cd a2 00 . . . jp 004d9h ;753b c3 d9 04 . . . pop af ;753e f1 . ; CCP DIRECT7 routine call sub_01c2h ;753f cd c2 01 . . . ; CCP DIRECT8 routine jp nz,sub_051bh ;7542 c2 1b 05 . . . call 000e4h ;7545 cd e4 00 . . . jp l0498h ;7548 c3 98 04 . . . pop de ;754b d1 . ; CCP DIRECT9 routine jp 00786h ;754c c3 86 07 . . . ;* E R A S E C O M M A N D call 0025eh ;754f cd 5e 02 . ^ . ; CCP ERASE routine cp 00bh ;7552 fe 0b . . jp nz,00542h ;7554 c2 42 05 . B . ld bc,00552h ;7557 01 52 05 . R . call 000a7h ;755a cd a7 00 . . . call 00139h ;755d cd 39 01 . 9 . ld hl,l0006h+1 ;7560 21 07 00 ! . . dec (hl) ;7563 35 5 jp nz,l0381h+1 ;7564 c2 82 03 . . . inc hl ;7567 23 # ld a,(hl) ;7568 7e ~ cp 059h ;7569 fe 59 . Y jp nz,l0381h+1 ;756b c2 82 03 . . . inc hl ;756e 23 # ld (l0088h),hl ;756f 22 88 00 " . . call 00454h ;7572 cd 54 04 . T . ; CCP ERASE1 routine ld de,l07cdh ;7575 11 cd 07 . . . call sub_00efh ;7578 cd ef 00 . . . inc a ;757b 3c < call z,003eah ;757c cc ea 03 . . . jp 00786h ;757f c3 86 07 . . . ld b,c ;7582 41 A ; CCP ALL (Y/N)? ld c,h ;7583 4c L ld c,h ;7584 4c L jr nz,$+42 ;7585 20 28 ( ld e,c ;7587 59 Y cpl ;7588 2f / ld c,(hl) ;7589 4e N add hl,hl ;758a 29 ) ccf ;758b 3f ? nop ;758c 00 . ;* T Y P E C O M M A N D call 0025eh ;758d cd 5e 02 . ^ . ; CCP TYPE routine jp nz,00209h ;7590 c2 09 02 . . . call 00454h ;7593 cd 54 04 . T . call 000d0h ;7596 cd d0 00 . . . jp z,005a7h ;7599 ca a7 05 . . . call 00098h ;759c cd 98 00 . . . ld hl,l07efh+2 ;759f 21 f1 07 ! . . ld (hl),0ffh ;75a2 36 ff 6 . ld hl,l07efh+2 ;75a4 21 f1 07 ! . . ; CCP TYPE1 routine ld a,(hl) ;75a7 7e ~ ; CCP TYPE2 routine cp 080h ;75a8 fe 80 . . jp c,00587h ;75aa da 87 05 . . . push hl ;75ad e5 . call sub_00feh ;75ae cd fe 00 . . . pop hl ;75b1 e1 . jp nz,l05a0h ;75b2 c2 a0 05 . . . xor a ;75b5 af . ld (hl),a ;75b6 77 w inc (hl) ;75b7 34 4 ; CCP TYPE3 routine ld hl,l0080h ;75b8 21 80 00 ! . . call l0259h ;75bb cd 59 02 . Y . ld a,(hl) ;75be 7e ~ cp 01ah ;75bf fe 1a . . jp z,00786h ;75c1 ca 86 07 . . . call sub_008ch ;75c4 cd 8c 00 . . . call sub_01c2h ;75c7 cd c2 01 . . . jp nz,00786h ;75ca c2 86 07 . . . jp 00574h ;75cd c3 74 05 . t . ; Back to TYPE1 dec a ;75d0 3d = ; CCP TYPE4 routine jp z,00786h ;75d1 ca 86 07 . . . call l03d8h+1 ;75d4 cd d9 03 . . . call l0464h+2 ;75d7 cd 66 04 . f . ; CCP TYPE5 routine jp 00209h ;75da c3 09 02 . . . ;* S A V E C O M M A N D call 003f8h ;75dd cd f8 03 . . . ; CCP SAVE routine push af ;75e0 f5 . call 0025eh ;75e1 cd 5e 02 . ^ . jp nz,00209h ;75e4 c2 09 02 . . . call 00454h ;75e7 cd 54 04 . T . ld de,l07cdh ;75ea 11 cd 07 . . . push de ;75ed d5 . call sub_00efh ;75ee cd ef 00 . . . pop de ;75f1 d1 . call 00109h ;75f2 cd 09 01 . . . jp z,l05fbh ;75f5 ca fb 05 . . . xor a ;75f8 af . ld (l07edh),a ;75f9 32 ed 07 2 . . pop af ;75fc f1 . ld l,a ;75fd 6f o ld h,000h ;75fe 26 00 & . add hl,hl ;7600 29 ) ld de,l0100h ;7601 11 00 01 . . . ld a,h ;7604 7c | ; CCP SAVE1 routine or l ;7605 b5 . jp z,l05f1h ;7606 ca f1 05 . . . dec hl ;7609 2b + push hl ;760a e5 . ld hl,l0080h ;760b 21 80 00 ! . . add hl,de ;760e 19 . push hl ;760f e5 . call 001d8h ;7610 cd d8 01 . . . ld de,l07cdh ;7613 11 cd 07 . . . call 00104h ;7616 cd 04 01 . . . pop de ;7619 d1 . pop hl ;761a e1 . jp nz,l05fbh ;761b c2 fb 05 . . . jp l05d4h ;761e c3 d4 05 . . . ld de,l07cdh ;7621 11 cd 07 . . . ; CCP SAVE2 routine call sub_00dah ;7624 cd da 00 . . . inc a ;7627 3c < jp nz,l0601h ;7628 c2 01 06 . . . ld bc,l0607h ;762b 01 07 06 . . . ; CCP SAVE3 routine call 000a7h ;762e cd a7 00 . . . call sub_01d5h ;7631 cd d5 01 . . . ; CCP SAVE4 routine jp 00786h ;7634 c3 86 07 . . . ld c,(hl) ;7637 4e N ; CCP 'NO SPACE' ld c,a ;7638 4f O jr nz,l768eh ;7639 20 53 S ld d,b ;763b 50 P ld b,c ;763c 41 A ld b,e ;763d 43 C ld b,l ;763e 45 E nop ;763f 00 . ;* R E N A M E C O M M A N D call 0025eh ;7640 cd 5e 02 . ^ . ; CCP RENAME routine jp nz,00209h ;7643 c2 09 02 . . . ld a,(l07efh+1) ;7646 3a f0 07 : . . push af ;7649 f5 . call 00454h ;764a cd 54 04 . T . call sub_00e9h ;764d cd e9 00 . . . jp nz,l0679h ;7650 c2 79 06 . y . ld hl,l07cdh ;7653 21 cd 07 ! . . ld de,l07ddh ;7656 11 dd 07 . . . ld b,010h ;7659 06 10 . . call 00442h ;765b cd 42 04 . B . ld hl,(l0088h) ;765e 2a 88 00 * . . ex de,hl ;7661 eb . call 0024fh ;7662 cd 4f 02 . O . cp 03dh ;7665 fe 3d . = jp z,l063fh ;7667 ca 3f 06 . ? . cp 05fh ;766a fe 5f . _ jp nz,l0673h ;766c c2 73 06 . s . ex de,hl ;766f eb . ; CCP RENAME1 routine inc hl ;7670 23 # ld (l0088h),hl ;7671 22 88 00 " . . call 0025eh ;7674 cd 5e 02 . ^ . jp nz,l0673h ;7677 c2 73 06 . s . pop af ;767a f1 . ld b,a ;767b 47 G ld hl,l07efh+1 ;767c 21 f0 07 ! . . ld a,(hl) ;767f 7e ~ or a ;7680 b7 . jp z,l0659h ;7681 ca 59 06 . Y . cp b ;7684 b8 . ld (hl),b ;7685 70 p jp nz,l0673h ;7686 c2 73 06 . s . ld (hl),b ;7689 70 p ; CCP RENAME2 routine xor a ;768a af . ld (l07cdh),a ;768b 32 cd 07 2 . . l768eh: call sub_00e9h ;768e cd e9 00 . . . ; CCP RENAME3 routine jp z,l066dh ;7691 ca 6d 06 . m . ld de,l07cdh ;7694 11 cd 07 . . . call l010dh+1 ;7697 cd 0e 01 . . . jp 00786h ;769a c3 86 07 . . . call 003eah ;769d cd ea 03 . . . ; CCP RENAME4 routine jp 00786h ;76a0 c3 86 07 . . . call l0464h+2 ;76a3 cd 66 04 . f . ; CCP RENAME5 routine jp 00209h ;76a6 c3 09 02 . . . ld bc,l0682h ;76a9 01 82 06 . . . ; CCP RENAME6 routine call 000a7h ;76ac cd a7 00 . . . jp 00786h ;76af c3 86 07 . . . ld b,(hl) ;76b2 46 F ; CCP 'FILE EXISTS' ld c,c ;76b3 49 I ld c,h ;76b4 4c L ld b,l ;76b5 45 E jr nz,l76fdh ;76b6 20 45 E ld e,b ;76b8 58 X ld c,c ;76b9 49 I ld d,e ;76ba 53 S ld d,h ;76bb 54 T ld d,e ;76bc 53 S nop ;76bd 00 . ;* U S E R C O M M A N D call 003f8h ;76be cd f8 03 . . . ; CCP USER routine cp 010h ;76c1 fe 10 . . jp nc,00209h ;76c3 d2 09 02 . . . ld e,a ;76c6 5f _ ld a,(l07ceh) ;76c7 3a ce 07 : . . cp 020h ;76ca fe 20 . jp z,00209h ;76cc ca 09 02 . . . call 00115h ;76cf cd 15 01 . . . jp 00789h ;76d2 c3 89 07 . . . ;* T R A N S I E N T P R O G R A M C O M M A N D call 001f5h ;76d5 cd f5 01 . . . ; CCP UNKNOWN routine ld a,(l07ceh) ;76d8 3a ce 07 : . . cp 020h ;76db fe 20 . jp nz,006c4h ;76dd c2 c4 06 . . . ld a,(l07efh+1) ;76e0 3a f0 07 : . . or a ;76e3 b7 . jp z,00789h ;76e4 ca 89 07 . . . dec a ;76e7 3d = ld (l07efh),a ;76e8 32 ef 07 2 . . call 00129h ;76eb cd 29 01 . ) . call 000bdh ;76ee cd bd 00 . . . jp 00789h ;76f1 c3 89 07 . . . ld de,l07d6h ;76f4 11 d6 07 . . . ; CCP UNKWN1 routine ld a,(de) ;76f7 1a . cp 020h ;76f8 fe 20 . jp nz,00209h ;76fa c2 09 02 . . . l76fdh: push de ;76fd d5 . ; CCP UNKWN2 routine call 00454h ;76fe cd 54 04 . T . pop de ;7701 d1 . l7702h: ld hl,00783h ;7702 21 83 07 ! . . call l043eh+2 ;7705 cd 40 04 . @ . call 000d0h ;7708 cd d0 00 . . . jp z,l076bh ;770b ca 6b 07 . k . ld hl,l0100h ;770e 21 00 01 ! . . push hl ;7711 e5 . ; CCP UNKWN3 routine ex de,hl ;7712 eb . call 001d8h ;7713 cd d8 01 . . . ld de,l07cdh ;7716 11 cd 07 . . . call 000f9h ;7719 cd f9 00 . . . jp nz,l0700h+1 ;771c c2 01 07 . . . pop hl ;771f e1 . l7720h: ld de,l0080h ;7720 11 80 00 . . . add hl,de ;7723 19 . ld de,l0000h ;7724 11 00 00 . . . ld a,l ;7727 7d } sub e ;7728 93 . ld a,h ;7729 7c | sbc a,d ;772a 9a . jp nc,l0771h ;772b d2 71 07 . q . jp l06e1h ;772e c3 e1 06 . . . pop hl ;7731 e1 . ; CCP UNKWN4 routine dec a ;7732 3d = jp nz,l0771h ;7733 c2 71 07 . q . call l0464h+2 ;7736 cd 66 04 . f . call 0025eh ;7739 cd 5e 02 . ^ . ld hl,l07efh+1 ;773c 21 f0 07 ! . . push hl ;773f e5 . ld a,(hl) ;7740 7e ~ ld (l07cdh),a ;7741 32 cd 07 2 . . ld a,010h ;7744 3e 10 > . call sub_0260h ;7746 cd 60 02 . ` . pop hl ;7749 e1 . ld a,(hl) ;774a 7e ~ ld (l07ddh),a ;774b 32 dd 07 2 . . xor a ;774e af . ld (l07edh),a ;774f 32 ed 07 2 . . ld de,0005ch ;7752 11 5c 00 . \ . ld hl,l07cdh ;7755 21 cd 07 ! . . ld b,021h ;7758 06 21 . ! call 00442h ;775a cd 42 04 . B . ld hl,l0006h+2 ;775d 21 08 00 ! . . ld a,(hl) ;7760 7e ~ ; CCP UNKWN5 routine or a ;7761 b7 . jp z,sub_073eh ;7762 ca 3e 07 . > . cp 020h ;7765 fe 20 . jp z,sub_073eh ;7767 ca 3e 07 . > . inc hl ;776a 23 # jp l072fh+1 ;776b c3 30 07 . 0 . ld b,000h ;776e 06 00 . . ; CCP UNKWN6 routine ld de,l0080h+1 ;7770 11 81 00 . . . ld a,(hl) ;7773 7e ~ ; CCP UNKWN7 routine ld (de),a ;7774 12 . or a ;7775 b7 . jp z,0074fh ;7776 ca 4f 07 . O . inc b ;7779 04 . inc hl ;777a 23 # inc de ;777b 13 . jp l0743h ;777c c3 43 07 . C . ld a,b ;777f 78 x ; CCP UNKWN8 routine ld (l0080h),a ;7780 32 80 00 2 . . call 00098h ;7783 cd 98 00 . . . call sub_01d5h ;7786 cd d5 01 . . . call l011ah ;7789 cd 1a 01 . . . call l0100h ;778c cd 00 01 . . . ; Transient programs return here (or reboot). ld sp,007abh ;778f 31 ab 07 1 . . call 00129h ;7792 cd 29 01 . ) . call 000bdh ;7795 cd bd 00 . . . jp l0381h+1 ;7798 c3 82 03 . . . l779bh: ; Get here if some error occured. call l0464h+2 ;779b cd 66 04 . f . ; CCP UNKWN9 routine jp 00209h ;779e c3 09 02 . . . ld bc,0077ah ;77a1 01 7a 07 . z . ; CCP UNKWN0 routine call 000a7h ;77a4 cd a7 00 . . . jp 00786h ;77a7 c3 86 07 . . . ld b,d ;77aa 42 B ; CCP 'BAD LOAD' ld b,c ;77ab 41 A ld b,h ;77ac 44 D jr nz,l77fbh ;77ad 20 4c L ld c,a ;77af 4f O ld b,c ;77b0 41 A ld b,h ;77b1 44 D nop ;77b2 00 . ld b,e ;77b3 43 C ; CCP 'COM' (command file extension) ld c,a ;77b4 4f O ld c,l ;77b5 4d M call l0464h+2 ;77b6 cd 66 04 . f . ; CCP GETBACK routine call 0025eh ;77b9 cd 5e 02 . ^ . ; CCP GETBACK1 routine ld a,(l07ceh) ;77bc 3a ce 07 : . . sub 020h ;77bf d6 20 . ld hl,l07efh+1 ;77c1 21 f0 07 ! . . or (hl) ;77c4 b6 . jp nz,00209h ;77c5 c2 09 02 . . . jp l0381h+1 ;77c8 c3 82 03 . . . ; ccp stack area l77cbh: ld b,l ;77cb 45 E ld d,b ;77cc 50 P ld d,e ;77cd 53 S ld c,a ;77ce 4f O ld c,(hl) ;77cf 4e N jr nz,l7825h ;77d0 20 53 S ld b,h ;77d2 44 D jr nc,l7806h ;77d3 30 31 0 1 jr nz,l77f7h ;77d5 20 20 ld sp,sub_3839h ;77d7 31 39 38 1 9 8 inc sp ;77da 33 3 ; CCP CCPSTACK ;end of ccp stack area. nop ;77db 00 . ; CCP BATCH ;batch mode flag (0=not active). nop ;77dc 00 . ; CCP BATCHFCB inc h ;77dd 24 $ inc h ;77de 24 $ inc h ;77df 24 $ jr nz,l7802h ;77e0 20 20 jr nz,l7804h ;77e2 20 20 jr nz,l7839h ;77e4 20 53 S ld d,l ;77e6 55 U ld b,d ;77e7 42 B nop ;77e8 00 . nop ;77e9 00 . nop ;77ea 00 . inc h ;77eb 24 $ nop ;77ec 00 . nop ;77ed 00 . nop ;77ee 00 . nop ;77ef 00 . nop ;77f0 00 . nop ;77f1 00 . nop ;77f2 00 . nop ;77f3 00 . nop ;77f4 00 . nop ;77f5 00 . nop ;77f6 00 . l77f7h: nop ;77f7 00 . nop ;77f8 00 . nop ;77f9 00 . nop ;77fa 00 . l77fbh: nop ;77fb 00 . l77fch: ld b,b ;77fc 40 @ ; (* serial number bytes *). inc b ;77fd 04 . ex af,af' ;77fe 08 . ld b,d ;77ff 42 B jr nz,$+19 ;7800 20 11 . l7802h: nop ;7802 00 . nop ;7803 00 . l7804h: add a,c ;7804 81 . l7805h: ld (de),a ;7805 12 . l7806h: ld b,d ;7806 42 B djnz l779bh ;7807 10 92 . . nop ;7809 00 . inc b ;780a 04 . sub b ;780b 90 . add a,h ;780c 84 . nop ;780d 00 . ex af,af' ;780e 08 . djnz l7821h ;780f 10 10 . . nop ;7811 00 . ld de,09220h ;7812 11 20 92 . . ld c,b ;7815 48 H sub d ;7816 92 . l7817h: ld c,b ;7817 48 H add hl,bc ;7818 09 . ld (bc),a ;7819 02 . ld c,c ;781a 49 I ld (de),a ;781b 12 . ld c,c ;781c 49 I inc h ;781d 24 $ sub b ;781e 90 . add a,d ;781f 82 . ld b,b ;7820 40 @ l7821h: adc a,b ;7821 88 . ld b,h ;7822 44 D add a,b ;7823 80 . nop ;7824 00 . l7825h: nop ;7825 00 . ld bc,09200h ;7826 01 00 92 . . . ld c,c ;7829 49 I jr nz,l786dh ;782a 20 41 A ld (de),a ;782c 12 . ex af,af' ;782d 08 . adc a,b ;782e 88 . ld b,d ;782f 42 B ld c,c ;7830 49 I ld bc,l0000h ;7831 01 00 00 . . . nop ;7834 00 . nop ;7835 00 . add a,b ;7836 80 . inc h ;7837 24 $ ld (de),a ;7838 12 . l7839h: ld (00104h),hl ;7839 22 04 01 " . . ld de,02410h ;783c 11 10 24 . . $ djnz $-124 ;783f 10 82 . . ld c,b ;7841 48 H add a,c ;7842 81 . ld (bc),a ;7843 02 . inc h ;7844 24 $ djnz $-124 ;7845 10 82 . . ld c,b ;7847 48 H add a,c ;7848 81 . nop ;7849 00 . adc a,b ;784a 88 . ld bc,l0006h+2 ;784b 01 08 00 . . . nop ;784e 00 . nop ;784f 00 . nop ;7850 00 . add a,b ;7851 80 . ld b,b ;7852 40 @ l7853h: add a,d ;7853 82 . ex af,af' ;7854 08 . ld de,l0012h ;7855 11 12 00 . . . inc h ;7858 24 $ add a,c ;7859 81 . inc h ;785a 24 $ ld c,c ;785b 49 I ld hl,l0409h ;785c 21 09 04 ! . . sub d ;785f 92 . ld c,b ;7860 48 H sub d ;7861 92 . nop ;7862 00 . ld hl,(l09aah) ;7863 2a aa 09 * . . ld (de),a ;7866 12 . nop ;7867 00 . add hl,bc ;7868 09 . nop ;7869 00 . inc h ;786a 24 $ ld c,b ;786b 48 H inc b ;786c 04 . l786dh: inc b ;786d 04 . ex af,af' ;786e 08 . ex af,af' ;786f 08 . adc a,b ;7870 88 . ld b,b ;7871 40 @ add a,h ;7872 84 . nop ;7873 00 . ld b,b ;7874 40 @ ld b,c ;7875 41 A jr nz,l77fch ;7876 20 84 . add a,d ;7878 82 . ld (de),a ;7879 12 . ld c,c ;787a 49 I inc b ;787b 04 . ld (bc),a ;787c 02 . add hl,bc ;787d 09 . inc h ;787e 24 $ nop ;787f 00 . adc a,b ;7880 88 . ld (bc),a ;7881 02 . ld b,h ;7882 44 D djnz l7817h ;7883 10 92 . . ld (de),a ;7885 12 . ex af,af' ;7886 08 . djnz l78aah ;7887 10 21 . ! ld (bc),a ;7889 02 . djnz l78adh ;788a 10 21 . ! inc h ;788c 24 $ ld c,c ;788d 49 I ld (04942h),hl ;788e 22 42 49 " B I ld (04904h),hl ;7891 22 04 49 " . I ld (00140h),hl ;7894 22 40 01 " @ . inc h ;7897 24 $ sub d ;7898 92 . ld b,d ;7899 42 B ex af,af' ;789a 08 . adc a,b ;789b 88 . inc b ;789c 04 . ld (de),a ;789d 12 . ld c,c ;789e 49 I ld (de),a ;789f 12 . ld c,c ;78a0 49 I ld (de),a ;78a1 12 . ld c,b ;78a2 48 H adc a,c ;78a3 89 . djnz l78a6h ;78a4 10 00 . . l78a6h: add a,b ;78a6 80 . inc h ;78a7 24 $ add a,h ;78a8 84 . sub d ;78a9 92 . l78aah: inc h ;78aa 24 $ sub d ;78ab 92 . nop ;78ac 00 . l78adh: inc h ;78ad 24 $ adc a,c ;78ae 89 . inc h ;78af 24 $ add a,h ;78b0 84 . adc a,b ;78b1 88 . ld b,d ;78b2 42 B ld (de),a ;78b3 12 . ld b,d ;78b4 42 B djnz $-122 ;78b5 10 84 . . sub d ;78b7 92 . ld c,c ;78b8 49 I inc h ;78b9 24 $ sub d ;78ba 92 . ld b,b ;78bb 40 @ nop ;78bc 00 . add a,h ;78bd 84 . ld b,d ;78be 42 B ld c,c ;78bf 49 I ld hl,l2420h+2 ;78c0 21 22 24 ! " $ sub d ;78c3 92 . ex af,af' ;78c4 08 . adc a,c ;78c5 89 . inc h ;78c6 24 $ inc b ;78c7 04 . sub d ;78c8 92 . ld (bc),a ;78c9 02 . inc b ;78ca 04 . add a,h ;78cb 84 . sub d ;78cc 92 . djnz l7853h ;78cd 10 84 . . ld b,c ;78cf 41 A add hl,bc ;78d0 09 . ex af,af' ;78d1 08 . ld b,h ;78d2 44 D nop ;78d3 00 . add a,d ;78d4 82 . inc b ;78d5 04 . sub b ;78d6 90 . ld c,c ;78d7 49 I inc h ;78d8 24 $ sub d ;78d9 92 . ld b,b ;78da 40 @ nop ;78db 00 . sub d ;78dc 92 . ld de,00020h ;78dd 11 20 00 . . nop ;78e0 00 . nop ;78e1 00 . nop ;78e2 00 . rst 38h ;78e3 ff . rst 38h ;78e4 ff . rst 38h ;78e5 ff . rst 38h ;78e6 ff . rst 38h ;78e7 ff . rst 38h ;78e8 ff . rst 38h ;78e9 ff . rst 38h ;78ea ff . rst 38h ;78eb ff . rst 38h ;78ec ff . rst 38h ;78ed ff . rst 38h ;78ee ff . rst 38h ;78ef ff . l78f0h: call c,00316h ;78f0 dc 16 03 . . . nop ;78f3 00 . nop ;78f4 00 . ld bc,l11c3h ;78f5 01 c3 11 . . . nop ;78f8 00 . l78f9h: rst 20h ;78f9 e7 . defb 0edh;next byte illegal after ed ;78fa ed . call pe,0f1edh ;78fb ec ed f1 . . . defb 0edh;next byte illegal after ed ;78fe ed . or 0edh ;78ff f6 ed . . ld (0f52fh),sp ;7901 ed 73 2f f5 . s / . ld sp,l0000h ;7905 31 00 00 1 . . ld (0f531h),de ;7908 ed 53 31 f5 . S 1 . ld a,(l0003h) ;790c 3a 03 00 : . . ld (0f534h),a ;790f 32 34 f5 2 4 . ld a,c ;7912 79 y cp 009h ;7913 fe 09 . . jr nz,l792eh ;7915 20 17 . ex de,hl ;7917 eb . l7918h: ld a,(hl) ;7918 7e ~ cp 024h ;7919 fe 24 . $ jr z,l7961h ;791b 28 44 ( D inc hl ;791d 23 # push af ;791e f5 . call 0ed17h ;791f cd 17 ed . . . pop af ;7922 f1 . ld c,a ;7923 4f O push hl ;7924 e5 . call sub_1ec8h ;7925 cd c8 1e . . . pop hl ;7928 e1 . call 0ed1dh ;7929 cd 1d ed . . . jr l7918h ;792c 18 ea . . l792eh: cp 029h ;792e fe 29 . ) jr c,l7938h ;7930 38 06 8 . cp 0fbh ;7932 fe fb . . jr c,l795ch ;7934 38 26 8 & sub 0d2h ;7936 d6 d2 . . l7938h: ld (0f533h),a ;7938 32 33 f5 2 3 . ld c,a ;793b 4f O push bc ;793c c5 . call 0ee86h ;793d cd 86 ee . . . call 0ee9bh ;7940 cd 9b ee . . . call 0ed17h ;7943 cd 17 ed . . . pop bc ;7946 c1 . jr nc,l794ch ;7947 30 03 0 . ld de,0f833h ;7949 11 33 f8 . 3 . l794ch: call 01d3eh ;794c cd 3e 1d . > . push bc ;794f c5 . push af ;7950 f5 . call 0ed1dh ;7951 cd 1d ed . . . call 0ee9ch ;7954 cd 9c ee . . . call 0ee87h ;7957 cd 87 ee . . . pop af ;795a f1 . pop bc ;795b c1 . l795ch: ld sp,(0f52fh) ;795c ed 7b 2f f5 . { / . ret ;7960 c9 . l7961h: ld hl,l0000h ;7961 21 00 00 ! . . ld (0f4f1h),hl ;7964 22 f1 f4 " . . ld a,l ;7967 7d } ld b,h ;7968 44 D jr l795ch ;7969 18 f1 . . rst 38h ;796b ff . rst 38h ;796c ff . rst 38h ;796d ff . rst 38h ;796e ff . rst 38h ;796f ff . l7970h: ; Copy 348h bytes from 7970h - 7cb7h to ec81h - efc9h ld (0f53bh),sp ;7970 ed 73 3b f5 . s ; . ld sp,0ff90h ;7974 31 90 ff 1 . . push hl ;7977 e5 . ld sp,(0f53bh) ;7978 ed 7b 3b f5 . { ; . pop hl ;797c e1 . ld (0f53bh),sp ;797d ed 73 3b f5 . s ; . ld sp,0ff8eh ;7981 31 8e ff 1 . . push de ;7984 d5 . push af ;7985 f5 . push bc ;7986 c5 . ld de,0ec03h ;7987 11 03 ec . . . xor a ;798a af . sbc hl,de ;798b ed 52 . R ld a,h ;798d 7c | or a ;798e b7 . jr nz,l79dbh ;798f 20 4a J ld a,l ;7991 7d } cp 082h ;7992 fe 82 . . jr nc,l79dbh ;7994 30 45 0 E ld (0f53dh),hl ;7996 22 3d f5 " = . cp 024h ;7999 fe 24 . $ jr nz,l79a5h ;799b 20 08 . pop hl ;799d e1 . ld (0f344h),hl ;799e 22 44 f3 " D . ld hl,0f857h ;79a1 21 57 f8 ! W . push hl ;79a4 e5 . l79a5h: cp 02ah ;79a5 fe 2a . * call z,0ee8eh ;79a7 cc 8e ee . . . ld a,(l0003h) ;79aa 3a 03 00 : . . ld (0f534h),a ;79ad 32 34 f5 2 4 . call 0ed17h ;79b0 cd 17 ed . . . ld a,c ;79b3 79 y ld (0f537h),a ;79b4 32 37 f5 2 7 . ld hl,(0f53dh) ;79b7 2a 3d f5 * = . ld de,l2bc8h ;79ba 11 c8 2b . . + add hl,de ;79bd 19 . ld (0ecd7h),hl ;79be 22 d7 ec " . . pop bc ;79c1 c1 . pop af ;79c2 f1 . pop de ;79c3 d1 . pop hl ;79c4 e1 . call l0000h ;79c5 cd 00 00 . . . push bc ;79c8 c5 . push af ;79c9 f5 . ld bc,(0f537h) ;79ca ed 4b 37 f5 . K 7 . call 0ed11h ;79ce cd 11 ed . . . ld a,(0f53dh) ;79d1 3a 3d f5 : = . cp 027h ;79d4 fe 27 . ' ld c,000h ;79d6 0e 00 . . call z,0ee8dh ;79d8 cc 8d ee . . . l79dbh: pop af ;79db f1 . pop bc ;79dc c1 . ld sp,(0f53bh) ;79dd ed 7b 3b f5 . { ; . ret ;79e1 c9 . di ;79e2 f3 . call 0ed51h ;79e3 cd 51 ed . Q . ei ;79e6 fb . ret ;79e7 c9 . di ;79e8 f3 . call 0ed40h ;79e9 cd 40 ed . @ . ei ;79ec fb . ret ;79ed c9 . di ;79ee f3 . call 0ed47h ;79ef cd 47 ed . G . ei ;79f2 fb . ret ;79f3 c9 . di ;79f4 f3 . call 0ed94h ;79f5 cd 94 ed . . . ei ;79f8 fb . ret ;79f9 c9 . di ;79fa f3 . call 0ed89h ;79fb cd 89 ed . . . ei ;79fe fb . ret ;79ff c9 . di ;7a00 f3 . call 0ed29h ;7a01 cd 29 ed . ) . ei ;7a04 fb . ret ;7a05 c9 . di ;7a06 f3 . call 0ed23h ;7a07 cd 23 ed . # . ei ;7a0a fb . ret ;7a0b c9 . di ;7a0c f3 . call 0ed27h ;7a0d cd 27 ed . ' . ei ;7a10 fb . ret ;7a11 c9 . ld c,0ffh ;7a12 0e ff . . jr l7a18h ;7a14 18 02 . . ld c,000h ;7a16 0e 00 . . l7a18h: push af ;7a18 f5 . ld a,(0f0b0h) ;7a19 3a b0 f0 : . . push af ;7a1c f5 . and 0feh ;7a1d e6 fe . . inc c ;7a1f 0c . l7a20h: jr z,l7a23h ;7a20 28 01 ( . inc a ;7a22 3c < l7a23h: ld (0f0b0h),a ;7a23 32 b0 f0 2 . . out (000h),a ;7a26 d3 00 ; GAH40M Control1 register (w) (bit0=BANK0) pop af ;7a28 f1 . and 001h ;7a29 e6 01 . . dec a ;7a2b 3d = ld c,a ;7a2c 4f O pop af ;7a2d f1 . ret ;7a2e c9 . push bc ;7a2f c5 . call 0ed29h ;7a30 cd 29 ed . ) . ld a,(hl) ;7a33 7e ~ jr l7a3bh ;7a34 18 05 . . push bc ;7a36 c5 . call 0ed29h ;7a37 cd 29 ed . ) . ld (hl),a ;7a3a 77 w l7a3bh: call 0ed29h ;7a3b cd 29 ed . ) . pop bc ;7a3e c1 . ret ;7a3f c9 . push af ;7a40 f5 . ld (0f538h),a ;7a41 32 38 f5 2 8 . in a,(005h) ;7a44 db 05 GAH40M Status register (r) and 001h ;7a46 e6 01 . . dec a ;7a48 3d = push af ;7a49 f5 . l7a4ah: push bc ;7a4a c5 . ld c,000h ;7a4b 0e 00 . . ld a,(0f538h) ;7a4d 3a 38 f5 : 8 . inc a ;7a50 3c < jr z,l7a54h ;7a51 28 01 ( . dec c ;7a53 0d . l7a54h: call 0ed40h ;7a54 cd 40 ed . @ . ld bc,(0f538h) ;7a57 ed 4b 38 f5 . K 8 . ex de,hl ;7a5b eb . call 0ed47h ;7a5c cd 47 ed . G . ex de,hl ;7a5f eb . inc de ;7a60 13 . inc hl ;7a61 23 # pop bc ;7a62 c1 . dec bc ;7a63 0b . ld a,b ;7a64 78 x or c ;7a65 b1 . jr nz,l7a4ah ;7a66 20 e2 . pop af ;7a68 f1 . ld c,a ;7a69 4f O call 0ed29h ;7a6a cd 29 ed . ) . pop bc ;7a6d c1 . ld a,c ;7a6e 79 y and 0c1h ;7a6f e6 c1 . . ld c,a ;7a71 4f O ld b,000h ;7a72 06 00 . . push bc ;7a74 c5 . pop af ;7a75 f1 . ld c,a ;7a76 4f O ret ;7a77 c9 . push bc ;7a78 c5 . ld bc,(0f539h) ;7a79 ed 4b 39 f5 . K 9 . call 0ed29h ;7a7d cd 29 ed . ) . pop bc ;7a80 c1 . jp (ix) ;7a81 dd e9 . . push bc ;7a83 c5 . push af ;7a84 f5 . ld bc,(0f539h) ;7a85 ed 4b 39 f5 . K 9 . call 0ed29h ;7a89 cd 29 ed . ) . ld a,c ;7a8c 79 y ld (0f53ah),a ;7a8d 32 3a f5 2 : . ld (0eda8h),ix ;7a90 dd 22 a8 ed . " . . pop af ;7a94 f1 . pop bc ;7a95 c1 . call l0000h ;7a96 cd 00 00 . . . push bc ;7a99 c5 . ld bc,(0f53ah) ;7a9a ed 4b 3a f5 . K : . jr l7a3bh ;7a9e 18 9b . . call 0ed27h ;7aa0 cd 27 ed . ' . ld bc,0ed23h ;7aa3 01 23 ed . # . push bc ;7aa6 c5 . jp (ix) ;7aa7 dd e9 . . ld a,(0f0b0h) ;7aa9 3a b0 f0 : . . ld c,a ;7aac 4f O or 001h ;7aad f6 01 . . out (000h),a ;7aaf d3 00 ; GAH40M Control1 register (w) (bit0=BANK0) ld (hl),b ;7ab1 70 p ld a,c ;7ab2 79 y out (000h),a ;7ab3 d3 00 ; GAH40M Control1 register (w) (bit0=BANK0) ret ;7ab5 c9 . ld a,(0f0b0h) ;7ab6 3a b0 f0 : . . push af ;7ab9 f5 . or 001h ;7aba f6 01 . . out (000h),a ;7abc d3 00 ; GAH40M Control1 register (w) (bit0=BANK0) ldir ;7abe ed b0 . . pop af ;7ac0 f1 . out (000h),a ;7ac1 d3 00 ; GAH40M Control1 register (w) (bit0=BANK0) ret ;7ac3 c9 . push de ;7ac4 d5 . call 0ed1dh ;7ac5 cd 1d ed . . . ld hl,(0f004h) ;7ac8 2a 04 f0 * . . ld de,l0009h ;7acb 11 09 00 . . . add hl,de ;7ace 19 . pop de ;7acf d1 . add hl,de ;7ad0 19 . ld a,(hl) ;7ad1 7e ~ inc hl ;7ad2 23 # ld h,(hl) ;7ad3 66 f ld l,a ;7ad4 6f o jp (hl) ;7ad5 e9 . ld hl,01dd1h ;7ad6 21 d1 1d ! . . jr l7ae8h ;7ad9 18 0d . . ld hl,l2042h ;7adb 21 42 20 ! B jr l7ae8h ;7ade 18 08 . . ld hl,l1de3h ;7ae0 21 e3 1d ! . . jr l7ae8h ;7ae3 18 03 . . ld hl,l1de9h ;7ae5 21 e9 1d ! . . l7ae8h: call 0ed17h ;7ae8 cd 17 ed . . . jp (hl) ;7aeb e9 . ld h,001h ;7aec 26 01 & . ld a,(l0226h) ;7aee 3a 26 02 : & . ld a,(00326h) ;7af1 3a 26 03 : & . ld a,(l0426h) ;7af4 3a 26 04 : & . ld l,0ffh ;7af7 2e ff . . ld (0f4f1h),hl ;7af9 22 f1 f4 " . . call 0ed17h ;7afc cd 17 ed . . . jp l2aach ;7aff c3 ac 2a . . * nop ;7b02 00 . nop ;7b03 00 . nop ;7b04 00 . nop ;7b05 00 . nop ;7b06 00 . nop ;7b07 00 . nop ;7b08 00 . nop ;7b09 00 . nop ;7b0a 00 . nop ;7b0b 00 . nop ;7b0c 00 . nop ;7b0d 00 . nop ;7b0e 00 . nop ;7b0f 00 . nop ;7b10 00 . ld bc,l0100h+1 ;7b11 01 01 01 . . . nop ;7b14 00 . ld bc,l0100h+1 ;7b15 01 01 01 . . . ld bc,l0000h+1 ;7b18 01 01 00 . . . nop ;7b1b 00 . nop ;7b1c 00 . nop ;7b1d 00 . nop ;7b1e 00 . nop ;7b1f 00 . ld bc,l0000h ;7b20 01 00 00 . . . ld bc,l0100h+1 ;7b23 01 01 01 . . . ld bc,l0000h ;7b26 01 00 00 . . . nop ;7b29 00 . ld bc,l0000h+1 ;7b2a 01 01 00 . . . nop ;7b2d 00 . nop ;7b2e 00 . ld bc,l0000h ;7b2f 01 00 00 . . . nop ;7b32 00 . nop ;7b33 00 . nop ;7b34 00 . nop ;7b35 00 . nop ;7b36 00 . nop ;7b37 00 . nop ;7b38 00 . nop ;7b39 00 . nop ;7b3a 00 . nop ;7b3b 00 . nop ;7b3c 00 . nop ;7b3d 00 . nop ;7b3e 00 . nop ;7b3f 00 . nop ;7b40 00 . ld bc,l0000h+1 ;7b41 01 01 00 . . . ld bc,l0000h+1 ;7b44 01 01 00 . . . nop ;7b47 00 . nop ;7b48 00 . nop ;7b49 00 . nop ;7b4a 00 . nop ;7b4b 00 . nop ;7b4c 00 . nop ;7b4d 00 . nop ;7b4e 00 . nop ;7b4f 00 . nop ;7b50 00 . ld bc,l0000h+1 ;7b51 01 01 00 . . . nop ;7b54 00 . nop ;7b55 00 . nop ;7b56 00 . nop ;7b57 00 . ld bc,l0000h ;7b58 01 00 00 . . . nop ;7b5b 00 . ld bc,0e500h ;7b5c 01 00 e5 . . . ld hl,0ee41h ;7b5f 21 41 ee ! A . jr l7b68h ;7b62 18 04 . . push hl ;7b64 e5 . ld hl,0ee13h ;7b65 21 13 ee ! . . l7b68h: ld a,(0f533h) ;7b68 3a 33 f5 : 3 . add a,l ;7b6b 85 . ld l,a ;7b6c 6f o ld a,000h ;7b6d 3e 00 > . adc a,h ;7b6f 8c . ld h,a ;7b70 67 g ld a,(hl) ;7b71 7e ~ rra ;7b72 1f . pop hl ;7b73 e1 . ret ;7b74 c9 . ld bc,l000ch+2 ;7b75 01 0e 00 . . . call 0ee6fh ;7b78 cd 6f ee . o . ret nc ;7b7b d0 . ld a,c ;7b7c 79 y push hl ;7b7d e5 . push de ;7b7e d5 . ld hl,(0f344h) ;7b7f 2a 44 f3 * D . ld de,0f857h ;7b82 11 57 f8 . W . ld bc,l0080h ;7b85 01 80 00 . . . jr l7b9dh ;7b88 18 13 . . ld bc,l000ch+2 ;7b8a 01 0e 00 . . . call 0ee75h ;7b8d cd 75 ee . u . ret nc ;7b90 d0 . push hl ;7b91 e5 . push de ;7b92 d5 . ld a,c ;7b93 79 y ld hl,(0f531h) ;7b94 2a 31 f5 * 1 . ld de,0f833h ;7b97 11 33 f8 . 3 . ld bc,sub_0024h ;7b9a 01 24 00 . $ . l7b9dh: inc a ;7b9d 3c < dec a ;7b9e 3d = jr nz,l7ba2h ;7b9f 20 01 . ex de,hl ;7ba1 eb . l7ba2h: ldir ;7ba2 ed b0 . . pop de ;7ba4 d1 . pop hl ;7ba5 e1 . ret ;7ba6 c9 . push af ;7ba7 f5 . ld (0f4d6h),sp ;7ba8 ed 73 d6 f4 . s . . ld a,(0f0bah) ;7bac 3a ba f0 : . . inc a ;7baf 3c < ld (0f0bah),a ;7bb0 32 ba f0 2 . . jr nz,l7bb9h ;7bb3 20 04 . ld sp,(0f0bch) ;7bb5 ed 7b bc f0 . { . . l7bb9h: push bc ;7bb9 c5 . push de ;7bba d5 . push hl ;7bbb e5 . ld hl,(0f4d6h) ;7bbc 2a d6 f4 * . . push hl ;7bbf e5 . call 0ed23h ;7bc0 cd 23 ed . # . push bc ;7bc3 c5 . call sub_0670h ;7bc4 cd 70 06 . p . pop bc ;7bc7 c1 . call 0ed29h ;7bc8 cd 29 ed . ) . pop hl ;7bcb e1 . ld (0f4d6h),hl ;7bcc 22 d6 f4 " . . ld hl,0f0bah ;7bcf 21 ba f0 ! . . dec (hl) ;7bd2 35 5 pop hl ;7bd3 e1 . pop de ;7bd4 d1 . pop bc ;7bd5 c1 . ld sp,(0f4d6h) ;7bd6 ed 7b d6 f4 . { . . pop af ;7bda f1 . ei ;7bdb fb . reti ;7bdc ed 4d . M ld (0f4d8h),sp ;7bde ed 73 d8 f4 . s . . ld sp,(0f0beh) ;7be2 ed 7b be f0 . { . . push af ;7be6 f5 . push bc ;7be7 c5 . push de ;7be8 d5 . push hl ;7be9 e5 . ld hl,0f0b0h ;7bea 21 b0 f0 ! . . ld a,(hl) ;7bed 7e ~ push af ;7bee f5 . and 0feh ;7bef e6 fe . . ld (hl),a ;7bf1 77 w out (000h),a ;7bf2 d3 00 ; GAH40M Control1 register (w) (bit0=BANK0) call sub_088dh ;7bf4 cd 8d 08 . . . pop af ;7bf7 f1 . ld (0f0b0h),a ;7bf8 32 b0 f0 2 . . out (000h),a ;7bfb d3 00 . . pop hl ;7bfd e1 . pop de ;7bfe d1 . pop bc ;7bff c1 . pop af ;7c00 f1 . ld sp,(0f4d8h) ;7c01 ed 7b d8 f4 . { . . l7c05h: ei ;7c05 fb . reti ;7c06 ed 4d . M ld (0f4dah),sp ;7c08 ed 73 da f4 . s . . ld sp,(0f0c0h) ;7c0c ed 7b c0 f0 . { . . push af ;7c10 f5 . push hl ;7c11 e5 . ld hl,0f0bbh ;7c12 21 bb f0 ! . . set 5,(hl) ;7c15 cb ee . . ld a,(0f0b3h) ;7c17 3a b3 f0 : . . res 2,a ;7c1a cb 97 . . ld (0f0b3h),a ;7c1c 32 b3 f0 2 . . out (004h),a ;7c1f d3 04 GAH40M Interrupt Enable register (w) call 0efa1h ;7c21 cd a1 ef . . . pop hl ;7c24 e1 . pop af ;7c25 f1 . ld sp,(0f4dah) ;7c26 ed 7b da f4 . { . . jr l7c05h ;7c2a 18 d9 . . ld (0f4dch),sp ;7c2c ed 73 dc f4 . s . . ld sp,(0f0c2h) ;7c30 ed 7b c2 f0 . { . . push hl ;7c34 e5 . ld hl,0f0bbh ;7c35 21 bb f0 ! . . set 4,(hl) ;7c38 cb e6 . . call 0efa4h ;7c3a cd a4 ef . . . pop hl ;7c3d e1 . ld sp,(0f4dch) ;7c3e ed 7b dc f4 . { . . jr l7c05h ;7c42 18 c1 . . ld (0f4deh),sp ;7c44 ed 73 de f4 . s . . ld sp,(0f0c4h) ;7c48 ed 7b c4 f0 . { . . push af ;7c4c f5 . push hl ;7c4d e5 . ld hl,0f0bbh ;7c4e 21 bb f0 ! . . set 3,(hl) ;7c51 cb de . . ld a,004h ;7c53 3e 04 > . out (001h),a ;7c55 d3 01 ; GAH40M Command register call 0efa7h ;7c57 cd a7 ef . . . pop hl ;7c5a e1 . pop af ;7c5b f1 . ld sp,(0f4deh) ;7c5c ed 7b de f4 . { . . jr l7c05h ;7c60 18 a3 . . ld (0f4e0h),sp ;7c62 ed 73 e0 f4 . s . . ld sp,(0f0c6h) ;7c66 ed 7b c6 f0 . { . . push hl ;7c6a e5 . ld hl,0f0bbh ;7c6b 21 bb f0 ! . . set 2,(hl) ;7c6e cb d6 . . call 0efaah ;7c70 cd aa ef . . . pop hl ;7c73 e1 . ld sp,(0f4e0h) ;7c74 ed 7b e0 f4 . { . . ei ;7c78 fb . reti ;7c79 ed 4d . M jp 0eeb7h ;7c7b c3 b7 ee . . . jp 0eeb7h ;7c7e c3 b7 ee . . . jp 0eeb7h ;7c81 c3 b7 ee . . . jp 0eeb7h ;7c84 c3 b7 ee . . . jp 0eeb7h ;7c87 c3 b7 ee . . . jp 0eeb7h ;7c8a c3 b7 ee . . . jp 0eeb7h ;7c8d c3 b7 ee . . . jp 0eeb7h ;7c90 c3 b7 ee . . . jp 0eeb7h ;7c93 c3 b7 ee . . . jp 0eeb7h ;7c96 c3 b7 ee . . . jp 0eeb7h ;7c99 c3 b7 ee . . . jp 0eeb7h ;7c9c c3 b7 ee . . . jp 0eeb7h ;7c9f c3 b7 ee . . . jp 0eeb7h ;7ca2 c3 b7 ee . . . cp b ;7ca5 b8 . xor 0efh ;7ca6 ee ef . . xor 019h ;7ca8 ee 19 . . rst 28h ;7caa ef . dec a ;7cab 3d = rst 28h ;7cac ef . ld d,l ;7cad 55 U rst 28h ;7cae ef . ld (hl),e ;7caf 73 s rst 28h ;7cb0 ef . rst 38h ;7cb1 ff . rst 38h ;7cb2 ff . rst 38h ;7cb3 ff . rst 38h ;7cb4 ff . rst 38h ;7cb5 ff . rst 38h ;7cb6 ff . rst 38h ;7cb7 ff . ; End of copy 348h bytes from 7970h - 7cb7h to ec81h - efc9h l7cb8h: ; ; Copy 88h bytes from 7cb8h - 7d40h to f000h - f088h nop ;7cb8 00 . rst 0 ;7cb9 c7 . nop ;7cba 00 . cp (hl) ;7cbb be . nop ;7cbc 00 . add a,000h ;7cbd c6 00 . . rst 0 ;7cbf c7 . add hl,bc ;7cc0 09 . add hl,bc ;7cc1 09 . nop ;7cc2 00 . nop ;7cc3 00 . inc de ;7cc4 13 . ld de,00d00h ;7cc5 11 00 0d . . . inc bc ;7cc8 03 . nop ;7cc9 00 . inc bc ;7cca 03 . rst 38h ;7ccb ff . ld bc,070abh ;7ccc 01 ab 70 . . p and e ;7ccf a3 . ld (hl),b ;7cd0 70 p and a ;7cd1 a7 . ld (hl),b ;7cd2 70 p xor e ;7cd3 ab . ld (hl),b ;7cd4 70 p nop ;7cd5 00 . ccf ;7cd6 3f ? ccf ;7cd7 3f ? ccf ;7cd8 3f ? ccf ;7cd9 3f ? ccf ;7cda 3f ? ccf ;7cdb 3f ? ccf ;7cdc 3f ? ccf ;7cdd 3f ? ld a,(bc) ;7cde 0a . ld e,b ;7cdf 58 X ld (bc),a ;7ce0 02 . nop ;7ce1 00 . nop ;7ce2 00 . ld b,e ;7ce3 43 C ld b,d ;7ce4 42 B ld b,c ;7ce5 41 A jr nz,$+34 ;7ce6 20 20 jr nz,$+34 ;7ce8 20 20 jr nz,l7cf1h ;7cea 20 05 . ld a,b ;7cec 78 x nop ;7ced 00 . ld b,e ;7cee 43 C ld c,a ;7cef 4f O ld c,l ;7cf0 4d M l7cf1h: jr nz,l7d13h ;7cf1 20 20 jr nz,l7d15h ;7cf3 20 20 jr nz,l7d17h ;7cf5 20 20 jr nz,l7d19h ;7cf7 20 20 jr nz,l7d1bh ;7cf9 20 20 jr nz,l7d1dh ;7cfb 20 20 jr nz,l7d1fh ;7cfd 20 20 jr nz,l7d21h ;7cff 20 20 jr nz,l7d23h ;7d01 20 20 jr nz,l7d25h ;7d03 20 20 jr nz,l7d27h ;7d05 20 20 jr nz,l7d29h ;7d07 20 20 jr nz,l7d2bh ;7d09 20 20 jr nz,l7d2dh ;7d0b 20 20 jr nz,l7d2fh ;7d0d 20 20 jr nz,$+34 ;7d0f 20 20 jr nz,l7d33h ;7d11 20 20 l7d13h: jr nz,l7d35h ;7d13 20 20 l7d15h: jr nz,l7d37h ;7d15 20 20 l7d17h: jr nz,l7d39h ;7d17 20 20 l7d19h: jr nz,l7d3bh ;7d19 20 20 l7d1bh: jr nz,l7d3dh ;7d1b 20 20 l7d1dh: jr nz,l7d3fh ;7d1d 20 20 l7d1fh: jr nz,l7d41h ;7d1f 20 20 l7d21h: jr nz,l7d26h ;7d21 20 03 . l7d23h: nop ;7d23 00 . nop ;7d24 00 . l7d25h: rst 38h ;7d25 ff . l7d26h: di ;7d26 f3 . l7d27h: nop ;7d27 00 . nop ;7d28 00 . l7d29h: nop ;7d29 00 . nop ;7d2a 00 . l7d2bh: nop ;7d2b 00 . nop ;7d2c 00 . l7d2dh: rst 38h ;7d2d ff . nop ;7d2e 00 . l7d2fh: call pe,00050h ;7d2f ec 50 00 . P . nop ;7d32 00 . l7d33h: nop ;7d33 00 . nop ;7d34 00 . l7d35h: rst 38h ;7d35 ff . rst 38h ;7d36 ff . l7d37h: rst 38h ;7d37 ff . rst 38h ;7d38 ff . l7d39h: rst 38h ;7d39 ff . rst 38h ;7d3a ff . l7d3bh: rst 38h ;7d3b ff . rst 38h ;7d3c ff . l7d3dh: rst 38h ;7d3d ff . rst 38h ;7d3e ff . l7d3fh: rst 38h ;7d3f ff . ; End of copy 88h bytes from 7cb8h - 7d40h to f000h - f088h l7d40h: ; Copy 250h bytes from 7d40h - 7f90h to f0b0h - f3000h ld h,b ;7d40 60 ` l7d41h: nop ;7d41 00 . jr nz,l7d45h ;7d42 20 01 . nop ;7d44 00 . l7d45h: nop ;7d45 00 . nop ;7d46 00 . scf ;7d47 37 7 nop ;7d48 00 . nop ;7d49 00 . rst 38h ;7d4a ff . nop ;7d4b 00 . jr nc,$+1 ;7d4c 30 ff 0 . ret nz ;7d4e c0 . cp 090h ;7d4f fe 90 . . cp 088h ;7d51 fe 88 . . cp 080h ;7d53 fe 80 . . cp 078h ;7d55 fe 78 . x cp 000h ;7d57 fe 00 . . djnz l7d5fh ;7d59 10 04 . . nop ;7d5b 00 . ld (bc),a ;7d5c 02 . ld (de),a ;7d5d 12 . inc b ;7d5e 04 . l7d5fh: ld (bc),a ;7d5f 02 . ex af,af' ;7d60 08 . djnz l7d6bh ;7d61 10 08 . . ex af,af' ;7d63 08 . ex af,af' ;7d64 08 . djnz l7d6fh ;7d65 10 08 . . ex af,af' ;7d67 08 . nop ;7d68 00 . nop ;7d69 00 . nop ;7d6a 00 . l7d6bh: nop ;7d6b 00 . nop ;7d6c 00 . dec de ;7d6d 1b . ret nc ;7d6e d0 . l7d6fh: nop ;7d6f 00 . add hl,de ;7d70 19 . rla ;7d71 17 . dec de ;7d72 1b . pop de ;7d73 d1 . nop ;7d74 00 . dec de ;7d75 1b . sub l ;7d76 95 . nop ;7d77 00 . dec de ;7d78 1b . out (001h),a ;7d79 d3 01 GAH40M Command register rst 38h ;7d7b ff . rst 38h ;7d7c ff . rst 38h ;7d7d ff . rst 38h ;7d7e ff . rst 38h ;7d7f ff . rst 38h ;7d80 ff . dec de ;7d81 1b . inc sp ;7d82 33 3 dec de ;7d83 1b . sub 000h ;7d84 d6 00 . . rst 38h ;7d86 ff . nop ;7d87 00 . nop ;7d88 00 . nop ;7d89 00 . ld b,0f8h ;7d8a 06 f8 . . ld b,0f8h ;7d8c 06 f8 . . nop ;7d8e 00 . ld b,d ;7d8f 42 B nop ;7d90 00 . nop ;7d91 00 . nop ;7d92 00 . ld a,(de) ;7d93 1a . pop af ;7d94 f1 . nop ;7d95 00 . nop ;7d96 00 . nop ;7d97 00 . nop ;7d98 00 . nop ;7d99 00 . nop ;7d9a 00 . nop ;7d9b 00 . nop ;7d9c 00 . rst 38h ;7d9d ff . inc e ;7d9e 1c . dec e ;7d9f 1d . ld e,01fh ;7da0 1e 1f . . add a,b ;7da2 80 . add a,b ;7da3 80 . ret m ;7da4 f8 . ld sp,hl ;7da5 f9 . rst 38h ;7da6 ff . cp 0fah ;7da7 fe fa . . ei ;7da9 fb . inc b ;7daa 04 . ld h,h ;7dab 64 d ld l,c ;7dac 69 i ld (hl),d ;7dad 72 r jr nz,$+1 ;7dae 20 ff . ld b,e ;7db0 43 C ; COPYRIGHT ld c,a ;7db1 4f O ld d,b ;7db2 50 P ld e,c ;7db3 59 Y ld d,d ;7db4 52 R ld c,c ;7db5 49 I ld b,a ;7db6 47 G ld c,b ;7db7 48 H ld d,h ;7db8 54 T jr nz,$+7 ;7db9 20 05 . ld (hl),h ;7dbb 74 t ; type ld a,c ;7dbc 79 y ld (hl),b ;7dbd 70 p ld h,l ;7dbe 65 e jr nz,$+1 ;7dbf 20 ff . jr z,l7e06h ;7dc1 28 43 ( C ; (C) 1983 add hl,hl ;7dc3 29 ) jr nz,l7df7h ;7dc4 20 31 1 add hl,sp ;7dc6 39 9 jr c,l7dfch ;7dc7 38 33 8 3 jr nz,$+7 ;7dc9 20 05 . ld (hl),e ;7dcb 73 s ; stat ld (hl),h ;7dcc 74 t ld h,c ;7dcd 61 a ld (hl),h ;7dce 74 t jr nz,$+1 ;7dcf 20 ff . jr nz,l7e18h ;7dd1 20 45 E ; EPSON ld d,b ;7dd3 50 P ld d,e ;7dd4 53 S ld c,a ;7dd5 4f O ld c,(hl) ;7dd6 4e N jr nz,l7df9h ;7dd7 20 20 jr nz,$+6 ;7dd9 20 04 . ld (hl),b ;7ddb 70 p ; pip ld l,c ;7ddc 69 i ld (hl),b ;7ddd 70 p jr nz,$+1 ;7dde 20 ff . jr nz,$+34 ;7de0 20 20 jr nz,l7e04h ;7de2 20 20 jr nz,l7e06h ;7de4 20 20 jr nz,l7e08h ;7de6 20 20 jr nz,l7e0ah ;7de8 20 20 rlca ;7dea 07 . ld h,e ;7deb 63 c ld l,a ;7dec 6f o ld l,(hl) ;7ded 6e n ld h,(hl) ;7dee 66 f ld l,c ;7def 69 i ld h,a ;7df0 67 g dec c ;7df1 0d . rst 38h ;7df2 ff . inc sp ;7df3 33 3 add hl,sp ;7df4 39 9 add hl,sp ;7df5 39 9 dec l ;7df6 2d - l7df7h: jr nc,l7e30h ;7df7 30 37 0 7 l7df9h: jr nz,$+7 ;7df9 20 05 . ld h,h ;7dfb 64 d l7dfch: ld (hl),l ;7dfc 75 u ld l,l ;7dfd 6d m ld (hl),b ;7dfe 70 p jr nz,$+1 ;7dff 20 ff . jr nz,$+85 ;7e01 20 53 S ld c,b ;7e03 48 H l7e04h: ld c,c ;7e04 49 I ld c,a ;7e05 4f O l7e06h: ld c,d ;7e06 4a J ld c,c ;7e07 49 I l7e08h: ld d,d ;7e08 52 R ld c,c ;7e09 49 I l7e0ah: rlca ;7e0a 07 . ld (hl),e ;7e0b 73 s ld (hl),l ;7e0c 75 u ld h,d ;7e0d 62 b ld l,l ;7e0e 6d m ld l,c ;7e0f 69 i ld (hl),h ;7e10 74 t jr nz,$+1 ;7e11 20 ff . ld c,d ;7e13 4a J ld b,c ;7e14 41 A l7e15h: ld d,b ;7e15 50 P ld b,c ;7e16 41 A ld c,(hl) ;7e17 4e N l7e18h: jr nz,$+34 ;7e18 20 20 inc b ;7e1a 04 . ld h,h ;7e1b 64 d ld h,h ;7e1c 64 d ld (hl),h ;7e1d 74 t jr nz,$+1 ;7e1e 20 ff . jr nz,l7e42h ;7e20 20 20 ld (hl),h ;7e22 74 t ld h,l ;7e23 65 e ld l,h ;7e24 6c l jr nz,l7e47h ;7e25 20 20 jr nz,$+34 ;7e27 20 20 jr nz,l7e30h ;7e29 20 05 . ld (hl),h ;7e2b 74 t ld h,l ;7e2c 65 e ld (hl),d ;7e2d 72 r ld l,l ;7e2e 6d m dec c ;7e2f 0d . l7e30h: rst 38h ;7e30 ff . jr nc,l7e65h ;7e31 30 32 0 2 ld (hl),033h ;7e33 36 33 6 3 dec (hl) ;7e35 35 5 dec l ;7e36 2d - jr nz,l7e59h ;7e37 20 20 jr nz,l7e42h ;7e39 20 07 . ld h,(hl) ;7e3b 66 f ld l,c ;7e3c 69 i ld l,h ;7e3d 6c l ld l,c ;7e3e 69 i ld l,(hl) ;7e3f 6e n ld l,e ;7e40 6b k dec c ;7e41 0d . l7e42h: rst 38h ;7e42 ff . ld (l322dh),a ;7e43 32 2d 32 2 - 2 dec (hl) ;7e46 35 5 l7e47h: dec (hl) ;7e47 35 5 ld (0f820h),a ;7e48 32 20 f8 2 . l7e4bh: jr c,$-6 ;7e4b 38 f8 8 . l7e4dh: jr c,l7e47h ;7e4d 38 f8 8 . l7e4fh: jr c,$-6 ;7e4f 38 f8 8 . l7e51h: jr c,l7e4bh ;7e51 38 f8 8 . jr c,l7e4dh ;7e53 38 f8 8 . jr c,l7e4fh ;7e55 38 f8 8 . jr c,l7e51h ;7e57 38 f8 8 . l7e59h: jr c,l7e5bh ;7e59 38 00 8 . l7e5bh: nop ;7e5b 00 . nop ;7e5c 00 . nop ;7e5d 00 . nop ;7e5e 00 . nop ;7e5f 00 . nop ;7e60 00 . ld sp,l0100h ;7e61 31 00 01 1 . . ld (bc),a ;7e64 02 . l7e65h: inc bc ;7e65 03 . inc b ;7e66 04 . dec b ;7e67 05 . ld b,007h ;7e68 06 07 . . ld b,000h ;7e6a 06 00 . . add a,h ;7e6c 84 . jr nc,l7e15h ;7e6d 30 a6 0 . cpl ;7e6f 2f / and (hl) ;7e70 a6 . cpl ;7e71 2f / cp (hl) ;7e72 be . cpl ;7e73 2f / cp (hl) ;7e74 be . cpl ;7e75 2f / ret nc ;7e76 d0 . cpl ;7e77 2f / ret nc ;7e78 d0 . cpl ;7e79 2f / add a,h ;7e7a 84 . jr nc,$+17 ;7e7b 30 0f 0 . jr nc,$+19 ;7e7d 30 11 0 . inc sp ;7e7f 33 3 ld de,l7d33h ;7e80 11 33 7d . 3 } inc (hl) ;7e83 34 4 ld a,l ;7e84 7d } inc (hl) ;7e85 34 4 ld a,l ;7e86 7d } inc (hl) ;7e87 34 4 ld a,l ;7e88 7d } inc (hl) ;7e89 34 4 ret p ;7e8a f0 . ld (03010h),a ;7e8b 32 10 30 2 . 0 ex de,hl ;7e8e eb . ld (l32ebh),a ;7e8f 32 eb 32 2 . 2 ld a,(hl) ;7e92 7e ~ inc (hl) ;7e93 34 4 ld a,(hl) ;7e94 7e ~ inc (hl) ;7e95 34 4 ld a,(hl) ;7e96 7e ~ inc (hl) ;7e97 34 4 ld a,(hl) ;7e98 7e ~ inc (hl) ;7e99 34 4 ex de,hl ;7e9a eb . ld (l0000h),a ;7e9b 32 00 00 2 . . nop ;7e9e 00 . nop ;7e9f 00 . nop ;7ea0 00 . nop ;7ea1 00 . nop ;7ea2 00 . nop ;7ea3 00 . ld e,c ;7ea4 59 Y push af ;7ea5 f5 . adc a,h ;7ea6 8c . jp p,0f5f9h ;7ea7 f2 f9 f5 . . . exx ;7eaa d9 . push af ;7eab f5 . nop ;7eac 00 . nop ;7ead 00 . nop ;7eae 00 . nop ;7eaf 00 . nop ;7eb0 00 . nop ;7eb1 00 . nop ;7eb2 00 . nop ;7eb3 00 . ld e,c ;7eb4 59 Y push af ;7eb5 f5 . sbc a,e ;7eb6 9b . jp p,0f602h ;7eb7 f2 02 f6 . . . ld sp,hl ;7eba f9 . push af ;7ebb f5 . nop ;7ebc 00 . nop ;7ebd 00 . nop ;7ebe 00 . nop ;7ebf 00 . nop ;7ec0 00 . nop ;7ec1 00 . nop ;7ec2 00 . nop ;7ec3 00 . ld e,c ;7ec4 59 Y push af ;7ec5 f5 . sbc a,e ;7ec6 9b . jp p,0f60bh ;7ec7 f2 0b f6 . . . ld (bc),a ;7eca 02 . or 000h ;7ecb f6 00 . . nop ;7ecd 00 . nop ;7ece 00 . nop ;7ecf 00 . nop ;7ed0 00 . nop ;7ed1 00 . nop ;7ed2 00 . nop ;7ed3 00 . ld e,c ;7ed4 59 Y push af ;7ed5 f5 . xor d ;7ed6 aa . jp p,0f61dh ;7ed7 f2 1d f6 . . . dec bc ;7eda 0b . or 000h ;7edb f6 00 . . l7eddh: nop ;7edd 00 . nop ;7ede 00 . nop ;7edf 00 . nop ;7ee0 00 . nop ;7ee1 00 . nop ;7ee2 00 . nop ;7ee3 00 . ld e,c ;7ee4 59 Y push af ;7ee5 f5 . xor d ;7ee6 aa . jp p,0f63fh ;7ee7 f2 3f f6 . ? . dec l ;7eea 2d - or 000h ;7eeb f6 00 . . nop ;7eed 00 . nop ;7eee 00 . nop ;7eef 00 . nop ;7ef0 00 . nop ;7ef1 00 . nop ;7ef2 00 . nop ;7ef3 00 . ld e,c ;7ef4 59 Y push af ;7ef5 f5 . xor d ;7ef6 aa . jp p,0f661h ;7ef7 f2 61 f6 . a . ld c,a ;7efa 4f O or 000h ;7efb f6 00 . . nop ;7efd 00 . nop ;7efe 00 . nop ;7eff 00 . nop ;7f00 00 . nop ;7f01 00 . nop ;7f02 00 . nop ;7f03 00 . ld e,c ;7f04 59 Y push af ;7f05 f5 . xor d ;7f06 aa . jp p,0f683h ;7f07 f2 83 f6 . . . ld (hl),c ;7f0a 71 q or 000h ;7f0b f6 00 . . nop ;7f0d 00 . nop ;7f0e 00 . nop ;7f0f 00 . nop ;7f10 00 . nop ;7f11 00 . nop ;7f12 00 . nop ;7f13 00 . ld e,c ;7f14 59 Y push af ;7f15 f5 . cp c ;7f16 b9 . jp p,0f69bh ;7f17 f2 9b f6 . . . sub e ;7f1a 93 . or 040h ;7f1b f6 40 . @ nop ;7f1d 00 . inc bc ;7f1e 03 . rlca ;7f1f 07 . nop ;7f20 00 . ex af,af' ;7f21 08 . nop ;7f22 00 . rrca ;7f23 0f . nop ;7f24 00 . add a,b ;7f25 80 . nop ;7f26 00 . nop ;7f27 00 . nop ;7f28 00 . nop ;7f29 00 . nop ;7f2a 00 . ld b,b ;7f2b 40 @ nop ;7f2c 00 . inc bc ;7f2d 03 . rlca ;7f2e 07 . nop ;7f2f 00 . ld b,b ;7f30 40 @ nop ;7f31 00 . rra ;7f32 1f . nop ;7f33 00 . add a,b ;7f34 80 . nop ;7f35 00 . nop ;7f36 00 . nop ;7f37 00 . nop ;7f38 00 . nop ;7f39 00 . ld b,b ;7f3a 40 @ nop ;7f3b 00 . inc b ;7f3c 04 . rrca ;7f3d 0f . ld bc,l008bh ;7f3e 01 8b 00 . . . ccf ;7f41 3f ? nop ;7f42 00 . add a,b ;7f43 80 . nop ;7f44 00 . djnz l7f47h ;7f45 10 00 . . l7f47h: inc b ;7f47 04 . nop ;7f48 00 . ld b,b ;7f49 40 @ nop ;7f4a 00 . inc bc ;7f4b 03 . rlca ;7f4c 07 . nop ;7f4d 00 . dec e ;7f4e 1d . nop ;7f4f 00 . dec bc ;7f50 0b . nop ;7f51 00 . add a,b ;7f52 80 . nop ;7f53 00 . nop ;7f54 00 . nop ;7f55 00 . nop ;7f56 00 . nop ;7f57 00 . rst 38h ;7f58 ff . nop ;7f59 00 . nop ;7f5a 00 . nop ;7f5b 00 . nop ;7f5c 00 . nop ;7f5d 00 . nop ;7f5e 00 . ex af,af' ;7f5f 08 . ex af,af' ;7f60 08 . nop ;7f61 00 . nop ;7f62 00 . ld bc,l0000h ;7f63 01 00 00 . . . rlca ;7f66 07 . rlca ;7f67 07 . adc a,e ;7f68 8b . adc a,e ;7f69 8b . nop ;7f6a 00 . nop ;7f6b 00 . nop ;7f6c 00 . nop ;7f6d 00 . rlca ;7f6e 07 . nop ;7f6f 00 . jp nz,0c2c2h ;7f70 c2 c2 c2 . . . inc a ;7f73 3c < nop ;7f74 00 . ld c,l ;7f75 4d M nop ;7f76 00 . exx ;7f77 d9 . nop ;7f78 00 . ld l,b ;7f79 68 h nop ;7f7a 00 . ld l,b ;7f7b 68 h nop ;7f7c 00 . inc (hl) ;7f7d 34 4 nop ;7f7e 00 . inc (hl) ;7f7f 34 4 nop ;7f80 00 . ld c,(hl) ;7f81 4e N nop ;7f82 00 . ld (bc),a ;7f83 02 . nop ;7f84 00 . inc b ;7f85 04 . nop ;7f86 00 . dec b ;7f87 05 . dec b ;7f88 05 . rst 38h ;7f89 ff . rst 38h ;7f8a ff . rst 38h ;7f8b ff . rst 38h ;7f8c ff . rst 38h ;7f8d ff . rst 38h ;7f8e ff . rst 38h ;7f8f ff . ; End of copy 250h bytes from 7d40h - 7f90h to f0b0h - f3000h l7f90h: ; Copy 40h bytes from 7f90h - 7fcfh to f330h -f370h rst 38h ;7f90 ff . nop ;7f91 00 . nop ;7f92 00 . nop ;7f93 00 . nop ;7f94 00 . nop ;7f95 00 . nop ;7f96 00 . nop ;7f97 00 . nop ;7f98 00 . nop ;7f99 00 . nop ;7f9a 00 . nop ;7f9b 00 . nop ;7f9c 00 . push hl ;7f9d e5 . nop ;7f9e 00 . nop ;7f9f 00 . nop ;7fa0 00 . nop ;7fa1 00 . nop ;7fa2 00 . nop ;7fa3 00 . add a,b ;7fa4 80 . nop ;7fa5 00 . l7fa6h: inc e ;7fa6 1c . ; Copy ch bytes from 7fa6h - 7fb2h to f346h - f352h dec e ;7fa7 1d . ld e,01fh ;7fa8 1e 1f . . ld b,002h ;7faa 06 02 . . djnz $+19 ;7fac 10 11 . . ld d,017h ;7fae 16 17 . . inc d ;7fb0 14 . dec d ;7fb1 15 . rst 38h ;7fb2 ff . ; End of copy ch bytes from 7fa6h - 7fb2h to f346h - f352h rst 38h ;7fb3 ff . nop ;7fb4 00 . nop ;7fb5 00 . jr nz,l7fb8h ;7fb6 20 00 . l7fb8h: nop ;7fb8 00 . inc bc ;7fb9 03 . nop ;7fba 00 . nop ;7fbb 00 . nop ;7fbc 00 . adc a,h ;7fbd 8c . jp m,0f693h ;7fbe fa 93 f6 . . . nop ;7fc1 00 . ret po ;7fc2 e0 . ld (bc),a ;7fc3 02 . ccf ;7fc4 3f ? nop ;7fc5 00 . ret z ;7fc6 c8 . nop ;7fc7 00 . rst 38h ;7fc8 ff . rst 38h ;7fc9 ff . rst 38h ;7fca ff . rst 38h ;7fcb ff . rst 38h ;7fcc ff . rst 38h ;7fcd ff . rst 38h ;7fce ff . rst 38h ;7fcf ff . ; End of copy 40h bytes from 7f90h - 7fcfh to f330h - f370h add hl,sp ;7fd0 39 9 ; ROM date 9/13/83 cpl ;7fd1 2f / ld sp,02f33h ;7fd2 31 33 2f 1 3 / jr c,$+53 ;7fd5 38 33 8 3 l7fd7h: ld l,e ;7fd7 6b k jr nz,$+69 ;7fd8 20 43 C ; CP/M ver 2.2 ld d,b ;7fda 50 P cpl ;7fdb 2f / ld c,l ;7fdc 4d M jr nz,l7fffh ;7fdd 20 20 halt ;7fdf 76 v ld h,l ;7fe0 65 e ld (hl),d ;7fe1 72 r jr nz,$+52 ;7fe2 20 32 2 ld l,032h ;7fe4 2e 32 . 2 jr nz,l7fe8h ;7fe6 20 00 . l7fe8h: ld c,l ;7fe8 4d M ld d,b ;7fe9 50 P ld c,h ;7fea 4c L ld b,h ;7feb 44 D ld c,c ;7fec 49 I ld d,d ;7fed 52 R ld b,l ;7fee 45 E ld b,e ;7fef 43 C ld d,e ;7ff0 53 S ld e,c ;7ff1 59 Y ld d,e ;7ff2 53 S ld b,l ;7ff3 45 E ld d,b ;7ff4 50 P ld d,e ;7ff5 53 S ld c,a ;7ff6 4f O ld c,(hl) ;7ff7 4e N l7ff8h: ld c,l ;7ff8 4d M ld d,b ;7ff9 50 P ld c,h ;7ffa 4c L ld e,b ;7ffb 58 X ld sp,03131h ;7ffc 31 31 31 1 1 1 l7fffh: defb 030h ;7fff 30 0 ; 348h bytes from 7970h - 7cb7h to ec81h - efc9h ; z80dasm 1.1.0 ; command line: z80dasm -a -l -g 0xec81 -t PX8OS1_ROM_EC81-EFC9.bin org 0ec81h ld (0f53bh),sp ;ec81 ed 73 3b f5 . s ; . ld sp,0ff90h ;ec85 31 90 ff 1 . . push hl ;ec88 e5 . ld sp,(0f53bh) ;ec89 ed 7b 3b f5 . { ; . pop hl ;ec8d e1 . ld (0f53bh),sp ;ec8e ed 73 3b f5 . s ; . ld sp,0ff8eh ;ec92 31 8e ff 1 . . push de ;ec95 d5 . push af ;ec96 f5 . push bc ;ec97 c5 . ld de,0ec03h ;ec98 11 03 ec . . . xor a ;ec9b af . sbc hl,de ;ec9c ed 52 . R ld a,h ;ec9e 7c | or a ;ec9f b7 . jr nz,lecech ;eca0 20 4a J ld a,l ;eca2 7d } cp 082h ;eca3 fe 82 . . jr nc,lecech ;eca5 30 45 0 E ld (0f53dh),hl ;eca7 22 3d f5 " = . cp 024h ;ecaa fe 24 . $ jr nz,lecb6h ;ecac 20 08 . pop hl ;ecae e1 . ld (0f344h),hl ;ecaf 22 44 f3 " D . ld hl,0f857h ;ecb2 21 57 f8 ! W . push hl ;ecb5 e5 . lecb6h: cp 02ah ;ecb6 fe 2a . * call z,sub_ee8eh ;ecb8 cc 8e ee . . . ld a,(00003h) ;ecbb 3a 03 00 : . . ld (0f534h),a ;ecbe 32 34 f5 2 4 . call sub_ed17h ;ecc1 cd 17 ed . . . ld a,c ;ecc4 79 y ld (0f537h),a ;ecc5 32 37 f5 2 7 . ld hl,(0f53dh) ;ecc8 2a 3d f5 * = . ld de,02bc8h ;eccb 11 c8 2b . . + add hl,de ;ecce 19 . ld (0ecd7h),hl ;eccf 22 d7 ec " . . pop bc ;ecd2 c1 . pop af ;ecd3 f1 . pop de ;ecd4 d1 . pop hl ;ecd5 e1 . call 00000h ;ecd6 cd 00 00 . . . push bc ;ecd9 c5 . push af ;ecda f5 . ld bc,(0f537h) ;ecdb ed 4b 37 f5 . K 7 . call sub_ed11h ;ecdf cd 11 ed . . . ld a,(0f53dh) ;ece2 3a 3d f5 : = . cp 027h ;ece5 fe 27 . ' ld c,000h ;ece7 0e 00 . . call z,sub_ee8dh ;ece9 cc 8d ee . . . lecech: pop af ;ecec f1 . pop bc ;eced c1 . ld sp,(0f53bh) ;ecee ed 7b 3b f5 . { ; . ret ;ecf2 c9 . di ;ecf3 f3 . call sub_ed51h ;ecf4 cd 51 ed . Q . ei ;ecf7 fb . ret ;ecf8 c9 . di ;ecf9 f3 . call sub_ed40h ;ecfa cd 40 ed . @ . ei ;ecfd fb . ret ;ecfe c9 . di ;ecff f3 . call sub_ed47h ;ed00 cd 47 ed . G . ei ;ed03 fb . ret ;ed04 c9 . di ;ed05 f3 . call sub_ed94h ;ed06 cd 94 ed . . . ei ;ed09 fb . ret ;ed0a c9 . di ;ed0b f3 . call sub_ed89h ;ed0c cd 89 ed . . . ei ;ed0f fb . ret ;ed10 c9 . sub_ed11h: di ;ed11 f3 . call sub_ed29h ;ed12 cd 29 ed . ) . ei ;ed15 fb . ret ;ed16 c9 . sub_ed17h: di ;ed17 f3 . call sub_ed23h ;ed18 cd 23 ed . # . ei ;ed1b fb . ret ;ed1c c9 . sub_ed1dh: di ;ed1d f3 . call sub_ed27h ;ed1e cd 27 ed . ' . ei ;ed21 fb . ret ;ed22 c9 . sub_ed23h: ld c,0ffh ;ed23 0e ff . . jr sub_ed29h ;ed25 18 02 . . sub_ed27h: ld c,000h ;ed27 0e 00 . . sub_ed29h: push af ;ed29 f5 . ld a,(0f0b0h) ;ed2a 3a b0 f0 : . . push af ;ed2d f5 . and 0feh ;ed2e e6 fe . . inc c ;ed30 0c . jr z,led34h ;ed31 28 01 ( . inc a ;ed33 3c < led34h: ld (0f0b0h),a ;ed34 32 b0 f0 2 . . out (000h),a ;ed37 d3 00 . . pop af ;ed39 f1 . and 001h ;ed3a e6 01 . . dec a ;ed3c 3d = ld c,a ;ed3d 4f O pop af ;ed3e f1 . ret ;ed3f c9 . sub_ed40h: push bc ;ed40 c5 . call sub_ed29h ;ed41 cd 29 ed . ) . ld a,(hl) ;ed44 7e ~ jr led4ch ;ed45 18 05 . . sub_ed47h: push bc ;ed47 c5 . call sub_ed29h ;ed48 cd 29 ed . ) . ld (hl),a ;ed4b 77 w led4ch: call sub_ed29h ;ed4c cd 29 ed . ) . pop bc ;ed4f c1 . ret ;ed50 c9 . sub_ed51h: push af ;ed51 f5 . ld (0f538h),a ;ed52 32 38 f5 2 8 . in a,(005h) ;ed55 db 05 . . and 001h ;ed57 e6 01 . . dec a ;ed59 3d = push af ;ed5a f5 . led5bh: push bc ;ed5b c5 . ld c,000h ;ed5c 0e 00 . . ld a,(0f538h) ;ed5e 3a 38 f5 : 8 . inc a ;ed61 3c < jr z,led65h ;ed62 28 01 ( . dec c ;ed64 0d . led65h: call sub_ed40h ;ed65 cd 40 ed . @ . ld bc,(0f538h) ;ed68 ed 4b 38 f5 . K 8 . ex de,hl ;ed6c eb . call sub_ed47h ;ed6d cd 47 ed . G . ex de,hl ;ed70 eb . inc de ;ed71 13 . inc hl ;ed72 23 # pop bc ;ed73 c1 . dec bc ;ed74 0b . ld a,b ;ed75 78 x or c ;ed76 b1 . jr nz,led5bh ;ed77 20 e2 . pop af ;ed79 f1 . ld c,a ;ed7a 4f O call sub_ed29h ;ed7b cd 29 ed . ) . pop bc ;ed7e c1 . ld a,c ;ed7f 79 y and 0c1h ;ed80 e6 c1 . . ld c,a ;ed82 4f O ld b,000h ;ed83 06 00 . . push bc ;ed85 c5 . pop af ;ed86 f1 . ld c,a ;ed87 4f O ret ;ed88 c9 . sub_ed89h: push bc ;ed89 c5 . ld bc,(0f539h) ;ed8a ed 4b 39 f5 . K 9 . call sub_ed29h ;ed8e cd 29 ed . ) . pop bc ;ed91 c1 . jp (ix) ;ed92 dd e9 . . sub_ed94h: push bc ;ed94 c5 . push af ;ed95 f5 . ld bc,(0f539h) ;ed96 ed 4b 39 f5 . K 9 . call sub_ed29h ;ed9a cd 29 ed . ) . ld a,c ;ed9d 79 y ld (0f53ah),a ;ed9e 32 3a f5 2 : . ld (0eda8h),ix ;eda1 dd 22 a8 ed . " . . pop af ;eda5 f1 . pop bc ;eda6 c1 . call 00000h ;eda7 cd 00 00 . . . push bc ;edaa c5 . ld bc,(0f53ah) ;edab ed 4b 3a f5 . K : . jr led4ch ;edaf 18 9b . . call sub_ed27h ;edb1 cd 27 ed . ' . ld bc,sub_ed23h ;edb4 01 23 ed . # . push bc ;edb7 c5 . jp (ix) ;edb8 dd e9 . . ld a,(0f0b0h) ;edba 3a b0 f0 : . . ld c,a ;edbd 4f O or 001h ;edbe f6 01 . . out (000h),a ;edc0 d3 00 . . ld (hl),b ;edc2 70 p ld a,c ;edc3 79 y out (000h),a ;edc4 d3 00 . . ret ;edc6 c9 . ld a,(0f0b0h) ;edc7 3a b0 f0 : . . push af ;edca f5 . or 001h ;edcb f6 01 . . out (000h),a ;edcd d3 00 . . ldir ;edcf ed b0 . . pop af ;edd1 f1 . out (000h),a ;edd2 d3 00 . . ret ;edd4 c9 . push de ;edd5 d5 . call sub_ed1dh ;edd6 cd 1d ed . . . ld hl,(0f004h) ;edd9 2a 04 f0 * . . ld de,00009h ;eddc 11 09 00 . . . add hl,de ;eddf 19 . pop de ;ede0 d1 . add hl,de ;ede1 19 . ld a,(hl) ;ede2 7e ~ inc hl ;ede3 23 # ld h,(hl) ;ede4 66 f ld l,a ;ede5 6f o jp (hl) ;ede6 e9 . ld hl,01dd1h ;ede7 21 d1 1d ! . . jr ledf9h ;edea 18 0d . . ld hl,02042h ;edec 21 42 20 ! B jr ledf9h ;edef 18 08 . . ld hl,01de3h ;edf1 21 e3 1d ! . . jr ledf9h ;edf4 18 03 . . ld hl,01de9h ;edf6 21 e9 1d ! . . ledf9h: call sub_ed17h ;edf9 cd 17 ed . . . jp (hl) ;edfc e9 . ld h,001h ;edfd 26 01 & . ld a,(00226h) ;edff 3a 26 02 : & . ld a,(00326h) ;ee02 3a 26 03 : & . ld a,(00426h) ;ee05 3a 26 04 : & . ld l,0ffh ;ee08 2e ff . . ld (0f4f1h),hl ;ee0a 22 f1 f4 " . . call sub_ed17h ;ee0d cd 17 ed . . . jp 02aach ;ee10 c3 ac 2a . . * lee13h: nop ;ee13 00 . nop ;ee14 00 . nop ;ee15 00 . nop ;ee16 00 . nop ;ee17 00 . nop ;ee18 00 . nop ;ee19 00 . nop ;ee1a 00 . nop ;ee1b 00 . nop ;ee1c 00 . nop ;ee1d 00 . nop ;ee1e 00 . nop ;ee1f 00 . nop ;ee20 00 . nop ;ee21 00 . ld bc,00101h ;ee22 01 01 01 . . . nop ;ee25 00 . ld bc,00101h ;ee26 01 01 01 . . . ld bc,00001h ;ee29 01 01 00 . . . nop ;ee2c 00 . nop ;ee2d 00 . nop ;ee2e 00 . nop ;ee2f 00 . nop ;ee30 00 . ld bc,00000h ;ee31 01 00 00 . . . ld bc,00101h ;ee34 01 01 01 . . . ld bc,00000h ;ee37 01 00 00 . . . nop ;ee3a 00 . ld bc,00001h ;ee3b 01 01 00 . . . nop ;ee3e 00 . nop ;ee3f 00 . ld bc,00000h ;ee40 01 00 00 . . . nop ;ee43 00 . nop ;ee44 00 . nop ;ee45 00 . nop ;ee46 00 . nop ;ee47 00 . nop ;ee48 00 . nop ;ee49 00 . nop ;ee4a 00 . nop ;ee4b 00 . nop ;ee4c 00 . nop ;ee4d 00 . nop ;ee4e 00 . nop ;ee4f 00 . nop ;ee50 00 . nop ;ee51 00 . ld bc,00001h ;ee52 01 01 00 . . . ld bc,00001h ;ee55 01 01 00 . . . nop ;ee58 00 . nop ;ee59 00 . nop ;ee5a 00 . nop ;ee5b 00 . nop ;ee5c 00 . nop ;ee5d 00 . nop ;ee5e 00 . nop ;ee5f 00 . nop ;ee60 00 . nop ;ee61 00 . ld bc,00001h ;ee62 01 01 00 . . . nop ;ee65 00 . nop ;ee66 00 . nop ;ee67 00 . nop ;ee68 00 . ld bc,00000h ;ee69 01 00 00 . . . nop ;ee6c 00 . ld bc,0e500h ;ee6d 01 00 e5 . . . ld hl,0ee41h ;ee70 21 41 ee ! A . jr lee79h ;ee73 18 04 . . sub_ee75h: push hl ;ee75 e5 . ld hl,lee13h ;ee76 21 13 ee ! . . lee79h: ld a,(0f533h) ;ee79 3a 33 f5 : 3 . add a,l ;ee7c 85 . ld l,a ;ee7d 6f o ld a,000h ;ee7e 3e 00 > . adc a,h ;ee80 8c . ld h,a ;ee81 67 g ld a,(hl) ;ee82 7e ~ rra ;ee83 1f . pop hl ;ee84 e1 . ret ;ee85 c9 . ld bc,0000eh ;ee86 01 0e 00 . . . call 0ee6fh ;ee89 cd 6f ee . o . ret nc ;ee8c d0 . sub_ee8dh: ld a,c ;ee8d 79 y sub_ee8eh: push hl ;ee8e e5 . push de ;ee8f d5 . ld hl,(0f344h) ;ee90 2a 44 f3 * D . ld de,0f857h ;ee93 11 57 f8 . W . ld bc,00080h ;ee96 01 80 00 . . . jr leeaeh ;ee99 18 13 . . ld bc,0000eh ;ee9b 01 0e 00 . . . call sub_ee75h ;ee9e cd 75 ee . u . ret nc ;eea1 d0 . push hl ;eea2 e5 . push de ;eea3 d5 . ld a,c ;eea4 79 y ld hl,(0f531h) ;eea5 2a 31 f5 * 1 . ld de,0f833h ;eea8 11 33 f8 . 3 . ld bc,00024h ;eeab 01 24 00 . $ . leeaeh: inc a ;eeae 3c < dec a ;eeaf 3d = jr nz,leeb3h ;eeb0 20 01 . ex de,hl ;eeb2 eb . leeb3h: ldir ;eeb3 ed b0 . . pop de ;eeb5 d1 . pop hl ;eeb6 e1 . leeb7h: ret ;eeb7 c9 . push af ;eeb8 f5 . ld (0f4d6h),sp ;eeb9 ed 73 d6 f4 . s . . ld a,(0f0bah) ;eebd 3a ba f0 : . . inc a ;eec0 3c < ld (0f0bah),a ;eec1 32 ba f0 2 . . jr nz,leecah ;eec4 20 04 . ld sp,(0f0bch) ;eec6 ed 7b bc f0 . { . . leecah: push bc ;eeca c5 . push de ;eecb d5 . push hl ;eecc e5 . ld hl,(0f4d6h) ;eecd 2a d6 f4 * . . push hl ;eed0 e5 . call sub_ed23h ;eed1 cd 23 ed . # . push bc ;eed4 c5 . call 00670h ;eed5 cd 70 06 . p . pop bc ;eed8 c1 . call sub_ed29h ;eed9 cd 29 ed . ) . pop hl ;eedc e1 . ld (0f4d6h),hl ;eedd 22 d6 f4 " . . ld hl,0f0bah ;eee0 21 ba f0 ! . . dec (hl) ;eee3 35 5 pop hl ;eee4 e1 . pop de ;eee5 d1 . pop bc ;eee6 c1 . ld sp,(0f4d6h) ;eee7 ed 7b d6 f4 . { . . pop af ;eeeb f1 . ei ;eeec fb . reti ;eeed ed 4d . M ld (0f4d8h),sp ;eeef ed 73 d8 f4 . s . . ld sp,(0f0beh) ;eef3 ed 7b be f0 . { . . push af ;eef7 f5 . push bc ;eef8 c5 . push de ;eef9 d5 . push hl ;eefa e5 . ld hl,0f0b0h ;eefb 21 b0 f0 ! . . ld a,(hl) ;eefe 7e ~ push af ;eeff f5 . and 0feh ;ef00 e6 fe . . ld (hl),a ;ef02 77 w out (000h),a ;ef03 d3 00 . . call 0088dh ;ef05 cd 8d 08 . . . pop af ;ef08 f1 . ld (0f0b0h),a ;ef09 32 b0 f0 2 . . out (000h),a ;ef0c d3 00 . . pop hl ;ef0e e1 . pop de ;ef0f d1 . pop bc ;ef10 c1 . pop af ;ef11 f1 . ld sp,(0f4d8h) ;ef12 ed 7b d8 f4 . { . . lef16h: ei ;ef16 fb . reti ;ef17 ed 4d . M ld (0f4dah),sp ;ef19 ed 73 da f4 . s . . ld sp,(0f0c0h) ;ef1d ed 7b c0 f0 . { . . push af ;ef21 f5 . push hl ;ef22 e5 . ld hl,0f0bbh ;ef23 21 bb f0 ! . . set 5,(hl) ;ef26 cb ee . . ld a,(0f0b3h) ;ef28 3a b3 f0 : . . res 2,a ;ef2b cb 97 . . ld (0f0b3h),a ;ef2d 32 b3 f0 2 . . out (004h),a ;ef30 d3 04 . . call sub_efa1h ;ef32 cd a1 ef . . . pop hl ;ef35 e1 . pop af ;ef36 f1 . ld sp,(0f4dah) ;ef37 ed 7b da f4 . { . . jr lef16h ;ef3b 18 d9 . . ld (0f4dch),sp ;ef3d ed 73 dc f4 . s . . ld sp,(0f0c2h) ;ef41 ed 7b c2 f0 . { . . push hl ;ef45 e5 . ld hl,0f0bbh ;ef46 21 bb f0 ! . . set 4,(hl) ;ef49 cb e6 . . call sub_efa4h ;ef4b cd a4 ef . . . pop hl ;ef4e e1 . ld sp,(0f4dch) ;ef4f ed 7b dc f4 . { . . jr lef16h ;ef53 18 c1 . . ld (0f4deh),sp ;ef55 ed 73 de f4 . s . . ld sp,(0f0c4h) ;ef59 ed 7b c4 f0 . { . . push af ;ef5d f5 . push hl ;ef5e e5 . ld hl,0f0bbh ;ef5f 21 bb f0 ! . . set 3,(hl) ;ef62 cb de . . ld a,004h ;ef64 3e 04 > . out (001h),a ;ef66 d3 01 . . call sub_efa7h ;ef68 cd a7 ef . . . pop hl ;ef6b e1 . pop af ;ef6c f1 . ld sp,(0f4deh) ;ef6d ed 7b de f4 . { . . jr lef16h ;ef71 18 a3 . . ld (0f4e0h),sp ;ef73 ed 73 e0 f4 . s . . ld sp,(0f0c6h) ;ef77 ed 7b c6 f0 . { . . push hl ;ef7b e5 . ld hl,0f0bbh ;ef7c 21 bb f0 ! . . set 2,(hl) ;ef7f cb d6 . . call sub_efaah ;ef81 cd aa ef . . . pop hl ;ef84 e1 . ld sp,(0f4e0h) ;ef85 ed 7b e0 f4 . { . . ei ;ef89 fb . reti ;ef8a ed 4d . M jp leeb7h ;ef8c c3 b7 ee . . . jp leeb7h ;ef8f c3 b7 ee . . . jp leeb7h ;ef92 c3 b7 ee . . . jp leeb7h ;ef95 c3 b7 ee . . . jp leeb7h ;ef98 c3 b7 ee . . . jp leeb7h ;ef9b c3 b7 ee . . . jp leeb7h ;ef9e c3 b7 ee . . . sub_efa1h: jp leeb7h ;efa1 c3 b7 ee . . . sub_efa4h: jp leeb7h ;efa4 c3 b7 ee . . . sub_efa7h: jp leeb7h ;efa7 c3 b7 ee . . . sub_efaah: jp leeb7h ;efaa c3 b7 ee . . . jp leeb7h ;efad c3 b7 ee . . . jp leeb7h ;efb0 c3 b7 ee . . . jp leeb7h ;efb3 c3 b7 ee . . . cp b ;efb6 b8 . xor 0efh ;efb7 ee ef . . xor 019h ;efb9 ee 19 . . rst 28h ;efbb ef . dec a ;efbc 3d = rst 28h ;efbd ef . ld d,l ;efbe 55 U rst 28h ;efbf ef . ld (hl),e ;efc0 73 s rst 28h ;efc1 ef . rst 38h ;efc2 ff . rst 38h ;efc3 ff . rst 38h ;efc4 ff . rst 38h ;efc5 ff . rst 38h ;efc6 ff . rst 38h ;efc7 ff . rst 38h ;efc8 ff . ; 250h bytes from 7d40h - 7f90h to f0b0h - f3000h ; z80dasm 1.1.0 ; command line: z80dasm -a -l -g 0xf000 -t PX8OS1_ROM_F000-F087.bin org 0f000h nop ;f000 00 . rst 0 ;f001 c7 . nop ;f002 00 . cp (hl) ;f003 be . nop ;f004 00 . add a,000h ;f005 c6 00 . . rst 0 ;f007 c7 . add hl,bc ;f008 09 . add hl,bc ;f009 09 . nop ;f00a 00 . nop ;f00b 00 . inc de ;f00c 13 . ld de,00d00h ;f00d 11 00 0d . . . inc bc ;f010 03 . nop ;f011 00 . inc bc ;f012 03 . rst 38h ;f013 ff . ld bc,070abh ;f014 01 ab 70 . . p and e ;f017 a3 . ld (hl),b ;f018 70 p and a ;f019 a7 . ld (hl),b ;f01a 70 p xor e ;f01b ab . ld (hl),b ;f01c 70 p nop ;f01d 00 . ccf ;f01e 3f ? ccf ;f01f 3f ? ccf ;f020 3f ? ccf ;f021 3f ? ccf ;f022 3f ? ccf ;f023 3f ? ccf ;f024 3f ? ccf ;f025 3f ? ld a,(bc) ;f026 0a . ld e,b ;f027 58 X ld (bc),a ;f028 02 . nop ;f029 00 . nop ;f02a 00 . ld b,e ;f02b 43 C ld b,d ;f02c 42 B ld b,c ;f02d 41 A jr nz,$+34 ;f02e 20 20 jr nz,$+34 ;f030 20 20 jr nz,lf039h ;f032 20 05 . ld a,b ;f034 78 x nop ;f035 00 . ld b,e ;f036 43 C ld c,a ;f037 4f O ld c,l ;f038 4d M lf039h: jr nz,lf05bh ;f039 20 20 jr nz,lf05dh ;f03b 20 20 jr nz,lf05fh ;f03d 20 20 jr nz,lf061h ;f03f 20 20 jr nz,lf063h ;f041 20 20 jr nz,lf065h ;f043 20 20 jr nz,lf067h ;f045 20 20 jr nz,lf069h ;f047 20 20 jr nz,lf06bh ;f049 20 20 jr nz,lf06dh ;f04b 20 20 jr nz,lf06fh ;f04d 20 20 jr nz,lf071h ;f04f 20 20 jr nz,lf073h ;f051 20 20 jr nz,lf075h ;f053 20 20 jr nz,lf077h ;f055 20 20 jr nz,$+34 ;f057 20 20 jr nz,lf07bh ;f059 20 20 lf05bh: jr nz,lf07dh ;f05b 20 20 lf05dh: jr nz,lf07fh ;f05d 20 20 lf05fh: jr nz,lf081h ;f05f 20 20 lf061h: jr nz,lf083h ;f061 20 20 lf063h: jr nz,lf085h ;f063 20 20 lf065h: jr nz,lf087h ;f065 20 20 lf067h: jr nz,$+34 ;f067 20 20 lf069h: jr nz,lf06eh ;f069 20 03 . lf06bh: nop ;f06b 00 . nop ;f06c 00 . lf06dh: rst 38h ;f06d ff . lf06eh: di ;f06e f3 . lf06fh: nop ;f06f 00 . nop ;f070 00 . lf071h: nop ;f071 00 . nop ;f072 00 . lf073h: nop ;f073 00 . nop ;f074 00 . lf075h: rst 38h ;f075 ff . nop ;f076 00 . lf077h: call pe,00050h ;f077 ec 50 00 . P . nop ;f07a 00 . lf07bh: nop ;f07b 00 . nop ;f07c 00 . lf07dh: rst 38h ;f07d ff . rst 38h ;f07e ff . lf07fh: rst 38h ;f07f ff . rst 38h ;f080 ff . lf081h: rst 38h ;f081 ff . rst 38h ;f082 ff . lf083h: rst 38h ;f083 ff . rst 38h ;f084 ff . lf085h: rst 38h ;f085 ff . rst 38h ;f086 ff . lf087h: rst 38h ;f087 ff . ; 250h bytes from 7d40h - 7f90h to f0b0h - f3000h ; z80dasm 1.1.0 ; command line: z80dasm -a -l -g 0xf0b0 -t PX8OS1_ROM_F0B0-F300.bin org 0f0b0h ld h,b ;f0b0 60 ` nop ;f0b1 00 . jr nz,lf0b5h ;f0b2 20 01 . nop ;f0b4 00 . lf0b5h: nop ;f0b5 00 . nop ;f0b6 00 . scf ;f0b7 37 7 nop ;f0b8 00 . nop ;f0b9 00 . rst 38h ;f0ba ff . nop ;f0bb 00 . jr nc,$+1 ;f0bc 30 ff 0 . ret nz ;f0be c0 . cp 090h ;f0bf fe 90 . . cp 088h ;f0c1 fe 88 . . cp 080h ;f0c3 fe 80 . . cp 078h ;f0c5 fe 78 . x cp 000h ;f0c7 fe 00 . . djnz lf0cfh ;f0c9 10 04 . . nop ;f0cb 00 . ld (bc),a ;f0cc 02 . ld (de),a ;f0cd 12 . inc b ;f0ce 04 . lf0cfh: ld (bc),a ;f0cf 02 . ex af,af' ;f0d0 08 . djnz lf0dbh ;f0d1 10 08 . . ex af,af' ;f0d3 08 . ex af,af' ;f0d4 08 . djnz lf0dfh ;f0d5 10 08 . . ex af,af' ;f0d7 08 . nop ;f0d8 00 . nop ;f0d9 00 . nop ;f0da 00 . lf0dbh: nop ;f0db 00 . nop ;f0dc 00 . dec de ;f0dd 1b . ret nc ;f0de d0 . lf0dfh: nop ;f0df 00 . add hl,de ;f0e0 19 . rla ;f0e1 17 . dec de ;f0e2 1b . pop de ;f0e3 d1 . nop ;f0e4 00 . dec de ;f0e5 1b . sub l ;f0e6 95 . nop ;f0e7 00 . dec de ;f0e8 1b . out (001h),a ;f0e9 d3 01 . . rst 38h ;f0eb ff . rst 38h ;f0ec ff . rst 38h ;f0ed ff . rst 38h ;f0ee ff . rst 38h ;f0ef ff . rst 38h ;f0f0 ff . dec de ;f0f1 1b . inc sp ;f0f2 33 3 dec de ;f0f3 1b . sub 000h ;f0f4 d6 00 . . rst 38h ;f0f6 ff . nop ;f0f7 00 . nop ;f0f8 00 . nop ;f0f9 00 . ld b,0f8h ;f0fa 06 f8 . . ld b,0f8h ;f0fc 06 f8 . . nop ;f0fe 00 . ld b,d ;f0ff 42 B nop ;f100 00 . nop ;f101 00 . nop ;f102 00 . ld a,(de) ;f103 1a . pop af ;f104 f1 . nop ;f105 00 . nop ;f106 00 . nop ;f107 00 . nop ;f108 00 . nop ;f109 00 . nop ;f10a 00 . nop ;f10b 00 . nop ;f10c 00 . rst 38h ;f10d ff . inc e ;f10e 1c . dec e ;f10f 1d . ld e,01fh ;f110 1e 1f . . add a,b ;f112 80 . add a,b ;f113 80 . ret m ;f114 f8 . ld sp,hl ;f115 f9 . rst 38h ;f116 ff . cp 0fah ;f117 fe fa . . ei ;f119 fb . inc b ;f11a 04 . ld h,h ;f11b 64 d ld l,c ;f11c 69 i ld (hl),d ;f11d 72 r jr nz,$+1 ;f11e 20 ff . ld b,e ;f120 43 C ld c,a ;f121 4f O ld d,b ;f122 50 P ld e,c ;f123 59 Y ld d,d ;f124 52 R ld c,c ;f125 49 I ld b,a ;f126 47 G ld c,b ;f127 48 H ld d,h ;f128 54 T jr nz,$+7 ;f129 20 05 . ld (hl),h ;f12b 74 t ld a,c ;f12c 79 y ld (hl),b ;f12d 70 p ld h,l ;f12e 65 e jr nz,$+1 ;f12f 20 ff . jr z,lf176h ;f131 28 43 ( C add hl,hl ;f133 29 ) jr nz,lf167h ;f134 20 31 1 add hl,sp ;f136 39 9 jr c,lf16ch ;f137 38 33 8 3 jr nz,$+7 ;f139 20 05 . ld (hl),e ;f13b 73 s ld (hl),h ;f13c 74 t ld h,c ;f13d 61 a ld (hl),h ;f13e 74 t jr nz,$+1 ;f13f 20 ff . jr nz,lf188h ;f141 20 45 E ld d,b ;f143 50 P ld d,e ;f144 53 S ld c,a ;f145 4f O ld c,(hl) ;f146 4e N jr nz,lf169h ;f147 20 20 jr nz,$+6 ;f149 20 04 . ld (hl),b ;f14b 70 p ld l,c ;f14c 69 i ld (hl),b ;f14d 70 p jr nz,$+1 ;f14e 20 ff . jr nz,$+34 ;f150 20 20 jr nz,lf174h ;f152 20 20 jr nz,lf176h ;f154 20 20 jr nz,lf178h ;f156 20 20 jr nz,lf17ah ;f158 20 20 rlca ;f15a 07 . ld h,e ;f15b 63 c ld l,a ;f15c 6f o ld l,(hl) ;f15d 6e n ld h,(hl) ;f15e 66 f ld l,c ;f15f 69 i ld h,a ;f160 67 g dec c ;f161 0d . rst 38h ;f162 ff . inc sp ;f163 33 3 add hl,sp ;f164 39 9 add hl,sp ;f165 39 9 dec l ;f166 2d - lf167h: jr nc,lf1a0h ;f167 30 37 0 7 lf169h: jr nz,$+7 ;f169 20 05 . ld h,h ;f16b 64 d lf16ch: ld (hl),l ;f16c 75 u ld l,l ;f16d 6d m ld (hl),b ;f16e 70 p jr nz,$+1 ;f16f 20 ff . jr nz,$+85 ;f171 20 53 S ld c,b ;f173 48 H lf174h: ld c,c ;f174 49 I ld c,a ;f175 4f O lf176h: ld c,d ;f176 4a J ld c,c ;f177 49 I lf178h: ld d,d ;f178 52 R ld c,c ;f179 49 I lf17ah: rlca ;f17a 07 . ld (hl),e ;f17b 73 s ld (hl),l ;f17c 75 u ld h,d ;f17d 62 b ld l,l ;f17e 6d m ld l,c ;f17f 69 i ld (hl),h ;f180 74 t jr nz,$+1 ;f181 20 ff . ld c,d ;f183 4a J ld b,c ;f184 41 A lf185h: ld d,b ;f185 50 P ld b,c ;f186 41 A ld c,(hl) ;f187 4e N lf188h: jr nz,$+34 ;f188 20 20 inc b ;f18a 04 . ld h,h ;f18b 64 d ld h,h ;f18c 64 d ld (hl),h ;f18d 74 t jr nz,$+1 ;f18e 20 ff . jr nz,lf1b2h ;f190 20 20 ld (hl),h ;f192 74 t ld h,l ;f193 65 e ld l,h ;f194 6c l jr nz,lf1b7h ;f195 20 20 jr nz,$+34 ;f197 20 20 jr nz,lf1a0h ;f199 20 05 . ld (hl),h ;f19b 74 t ld h,l ;f19c 65 e ld (hl),d ;f19d 72 r ld l,l ;f19e 6d m dec c ;f19f 0d . lf1a0h: rst 38h ;f1a0 ff . jr nc,lf1d5h ;f1a1 30 32 0 2 ld (hl),033h ;f1a3 36 33 6 3 dec (hl) ;f1a5 35 5 dec l ;f1a6 2d - jr nz,lf1c9h ;f1a7 20 20 jr nz,lf1b2h ;f1a9 20 07 . ld h,(hl) ;f1ab 66 f ld l,c ;f1ac 69 i ld l,h ;f1ad 6c l ld l,c ;f1ae 69 i ld l,(hl) ;f1af 6e n ld l,e ;f1b0 6b k dec c ;f1b1 0d . lf1b2h: rst 38h ;f1b2 ff . ld (0322dh),a ;f1b3 32 2d 32 2 - 2 dec (hl) ;f1b6 35 5 lf1b7h: dec (hl) ;f1b7 35 5 ld (0f820h),a ;f1b8 32 20 f8 2 . lf1bbh: jr c,$-6 ;f1bb 38 f8 8 . lf1bdh: jr c,lf1b7h ;f1bd 38 f8 8 . lf1bfh: jr c,$-6 ;f1bf 38 f8 8 . lf1c1h: jr c,lf1bbh ;f1c1 38 f8 8 . jr c,lf1bdh ;f1c3 38 f8 8 . jr c,lf1bfh ;f1c5 38 f8 8 . jr c,lf1c1h ;f1c7 38 f8 8 . lf1c9h: jr c,lf1cbh ;f1c9 38 00 8 . lf1cbh: nop ;f1cb 00 . nop ;f1cc 00 . nop ;f1cd 00 . nop ;f1ce 00 . nop ;f1cf 00 . nop ;f1d0 00 . ld sp,00100h ;f1d1 31 00 01 1 . . ld (bc),a ;f1d4 02 . lf1d5h: inc bc ;f1d5 03 . inc b ;f1d6 04 . dec b ;f1d7 05 . ld b,007h ;f1d8 06 07 . . ld b,000h ;f1da 06 00 . . add a,h ;f1dc 84 . jr nc,lf185h ;f1dd 30 a6 0 . cpl ;f1df 2f / and (hl) ;f1e0 a6 . cpl ;f1e1 2f / cp (hl) ;f1e2 be . cpl ;f1e3 2f / cp (hl) ;f1e4 be . cpl ;f1e5 2f / ret nc ;f1e6 d0 . cpl ;f1e7 2f / ret nc ;f1e8 d0 . cpl ;f1e9 2f / add a,h ;f1ea 84 . jr nc,$+17 ;f1eb 30 0f 0 . jr nc,$+19 ;f1ed 30 11 0 . inc sp ;f1ef 33 3 ld de,07d33h ;f1f0 11 33 7d . 3 } inc (hl) ;f1f3 34 4 ld a,l ;f1f4 7d } inc (hl) ;f1f5 34 4 ld a,l ;f1f6 7d } inc (hl) ;f1f7 34 4 ld a,l ;f1f8 7d } inc (hl) ;f1f9 34 4 ret p ;f1fa f0 . ld (03010h),a ;f1fb 32 10 30 2 . 0 ex de,hl ;f1fe eb . ld (032ebh),a ;f1ff 32 eb 32 2 . 2 ld a,(hl) ;f202 7e ~ inc (hl) ;f203 34 4 ld a,(hl) ;f204 7e ~ inc (hl) ;f205 34 4 ld a,(hl) ;f206 7e ~ inc (hl) ;f207 34 4 ld a,(hl) ;f208 7e ~ inc (hl) ;f209 34 4 ex de,hl ;f20a eb . ld (00000h),a ;f20b 32 00 00 2 . . nop ;f20e 00 . nop ;f20f 00 . nop ;f210 00 . nop ;f211 00 . nop ;f212 00 . nop ;f213 00 . ld e,c ;f214 59 Y push af ;f215 f5 . adc a,h ;f216 8c . jp p,0f5f9h ;f217 f2 f9 f5 . . . exx ;f21a d9 . push af ;f21b f5 . nop ;f21c 00 . nop ;f21d 00 . nop ;f21e 00 . nop ;f21f 00 . nop ;f220 00 . nop ;f221 00 . nop ;f222 00 . nop ;f223 00 . ld e,c ;f224 59 Y push af ;f225 f5 . sbc a,e ;f226 9b . jp p,0f602h ;f227 f2 02 f6 . . . ld sp,hl ;f22a f9 . push af ;f22b f5 . nop ;f22c 00 . nop ;f22d 00 . nop ;f22e 00 . nop ;f22f 00 . nop ;f230 00 . nop ;f231 00 . nop ;f232 00 . nop ;f233 00 . ld e,c ;f234 59 Y push af ;f235 f5 . sbc a,e ;f236 9b . jp p,0f60bh ;f237 f2 0b f6 . . . ld (bc),a ;f23a 02 . or 000h ;f23b f6 00 . . nop ;f23d 00 . nop ;f23e 00 . nop ;f23f 00 . nop ;f240 00 . nop ;f241 00 . nop ;f242 00 . nop ;f243 00 . ld e,c ;f244 59 Y push af ;f245 f5 . xor d ;f246 aa . jp p,0f61dh ;f247 f2 1d f6 . . . dec bc ;f24a 0b . or 000h ;f24b f6 00 . . nop ;f24d 00 . nop ;f24e 00 . nop ;f24f 00 . nop ;f250 00 . nop ;f251 00 . nop ;f252 00 . nop ;f253 00 . ld e,c ;f254 59 Y push af ;f255 f5 . xor d ;f256 aa . jp p,0f63fh ;f257 f2 3f f6 . ? . dec l ;f25a 2d - or 000h ;f25b f6 00 . . nop ;f25d 00 . nop ;f25e 00 . nop ;f25f 00 . nop ;f260 00 . nop ;f261 00 . nop ;f262 00 . nop ;f263 00 . ld e,c ;f264 59 Y push af ;f265 f5 . xor d ;f266 aa . jp p,0f661h ;f267 f2 61 f6 . a . ld c,a ;f26a 4f O or 000h ;f26b f6 00 . . nop ;f26d 00 . nop ;f26e 00 . nop ;f26f 00 . nop ;f270 00 . nop ;f271 00 . nop ;f272 00 . nop ;f273 00 . ld e,c ;f274 59 Y push af ;f275 f5 . xor d ;f276 aa . jp p,0f683h ;f277 f2 83 f6 . . . ld (hl),c ;f27a 71 q or 000h ;f27b f6 00 . . nop ;f27d 00 . nop ;f27e 00 . nop ;f27f 00 . nop ;f280 00 . nop ;f281 00 . nop ;f282 00 . nop ;f283 00 . ld e,c ;f284 59 Y push af ;f285 f5 . cp c ;f286 b9 . jp p,0f69bh ;f287 f2 9b f6 . . . sub e ;f28a 93 . or 040h ;f28b f6 40 . @ nop ;f28d 00 . inc bc ;f28e 03 . rlca ;f28f 07 . nop ;f290 00 . ex af,af' ;f291 08 . nop ;f292 00 . rrca ;f293 0f . nop ;f294 00 . add a,b ;f295 80 . nop ;f296 00 . nop ;f297 00 . nop ;f298 00 . nop ;f299 00 . nop ;f29a 00 . ld b,b ;f29b 40 @ nop ;f29c 00 . inc bc ;f29d 03 . rlca ;f29e 07 . nop ;f29f 00 . ld b,b ;f2a0 40 @ nop ;f2a1 00 . rra ;f2a2 1f . nop ;f2a3 00 . add a,b ;f2a4 80 . nop ;f2a5 00 . nop ;f2a6 00 . nop ;f2a7 00 . nop ;f2a8 00 . nop ;f2a9 00 . ld b,b ;f2aa 40 @ nop ;f2ab 00 . inc b ;f2ac 04 . rrca ;f2ad 0f . ld bc,0008bh ;f2ae 01 8b 00 . . . ccf ;f2b1 3f ? nop ;f2b2 00 . add a,b ;f2b3 80 . nop ;f2b4 00 . djnz lf2b7h ;f2b5 10 00 . . lf2b7h: inc b ;f2b7 04 . nop ;f2b8 00 . ld b,b ;f2b9 40 @ nop ;f2ba 00 . inc bc ;f2bb 03 . rlca ;f2bc 07 . nop ;f2bd 00 . dec e ;f2be 1d . nop ;f2bf 00 . dec bc ;f2c0 0b . nop ;f2c1 00 . add a,b ;f2c2 80 . nop ;f2c3 00 . nop ;f2c4 00 . nop ;f2c5 00 . nop ;f2c6 00 . nop ;f2c7 00 . rst 38h ;f2c8 ff . nop ;f2c9 00 . nop ;f2ca 00 . nop ;f2cb 00 . nop ;f2cc 00 . nop ;f2cd 00 . nop ;f2ce 00 . ex af,af' ;f2cf 08 . ex af,af' ;f2d0 08 . nop ;f2d1 00 . nop ;f2d2 00 . ld bc,00000h ;f2d3 01 00 00 . . . rlca ;f2d6 07 . rlca ;f2d7 07 . adc a,e ;f2d8 8b . adc a,e ;f2d9 8b . nop ;f2da 00 . nop ;f2db 00 . nop ;f2dc 00 . nop ;f2dd 00 . rlca ;f2de 07 . nop ;f2df 00 . jp nz,0c2c2h ;f2e0 c2 c2 c2 . . . inc a ;f2e3 3c < nop ;f2e4 00 . ld c,l ;f2e5 4d M nop ;f2e6 00 . exx ;f2e7 d9 . nop ;f2e8 00 . ld l,b ;f2e9 68 h nop ;f2ea 00 . ld l,b ;f2eb 68 h nop ;f2ec 00 . inc (hl) ;f2ed 34 4 nop ;f2ee 00 . inc (hl) ;f2ef 34 4 nop ;f2f0 00 . ld c,(hl) ;f2f1 4e N nop ;f2f2 00 . ld (bc),a ;f2f3 02 . nop ;f2f4 00 . inc b ;f2f5 04 . nop ;f2f6 00 . dec b ;f2f7 05 . dec b ;f2f8 05 . rst 38h ;f2f9 ff . rst 38h ;f2fa ff . rst 38h ;f2fb ff . rst 38h ;f2fc ff . rst 38h ;f2fd ff . rst 38h ;f2fe ff . rst 38h ;f2ff ff .