; z80dasm 1.1.6 ; command line: z80dasm -a -g 0xc000 -o sgb-mpf.asm -l -t sgb-mpf.bin ; an out(0c3h) is 'always' followed by a in(0c1h) or out(0c2h), ; making the 0c3h the address register. SGBIN EQU 0c1h ; 1100 0001 read SGBOUT EQU 0c2h ; 1100 0010 write SGBREG EQU 0c3h ; 1100 0011 write ; Monitor routines SCAN1 EQU 0624h SCAN EQU 05FEh ; AY-3-8910 registers ATONF EQU 00h ; R0 Ch.A Tone period 8 bit Fine Tune ATONC EQU 01h ; R1 Ch.A Tone period 4 bit Coarse Tune BTONF EQU 02h ; R2 Ch.B Tone period 8 bit Fine Tune BTONC EQU 03h ; R3 Ch.B Tone period 4 bit Coarse Tune CTONF EQU 04h ; R4 Ch.C Tone period 8 bit Fine Tune CTONC EQU 05h ; R5 Ch.C Tone period 4 bit Coarse Tune NOISE EQU 06h ; R6 Noise Period 5 bit ENABL EQU 07h ; R7 /Enable (I/O DDR B,A, Noise C,B,A, Tone C,B,A) ; 7654 3210 ; |||| |||| ; |||| |+++--- Tone CBA ; ||++-+------ Noise CBA ; ++---------- DDR BA AAMP EQU 08h ; R10 Ch.A Amplitude 5 bit BAMP EQU 09h ; R11 Ch.B Amplitude 5 bit CAMP EQU 0Ah ; R12 Ch.C Amplitude 5 bit ENVPF EQU 0Bh ; R13 Envelope Period 8 bit Fine Tune ENVPC EQU 0Ch ; R14 Envelope Period 8 bit Coarse Tune ENVSP EQU 0Dh ; R15 Envelope Shape Cycle 4 bit IOPLA EQU 0Eh ; R16 8 bit Parallel I/O Port A IOPLB EQU 0Fh ; R17 8 bit Parallel I/O Port B org 0c000h call sub_c004h ;c000 cd 04 c0 . . . halt ;c003 76 v sub_c004h: ld ix,0cec0h ;c004 dd 21 c0 ce . ! . . ld iy,0cec0h ;c008 fd 21 c0 ce . ! . . call sub_ce51h ;c00c cd 51 ce . Q . push bc ;c00f c5 . ld d,0feh ;c010 16 fe . . call sub_cd2dh ;c012 cd 2d cd . - . ld d,001h ;c015 16 01 . . call sub_cd25h ;c017 cd 25 cd . % . call sub_cdefh ;c01a cd ef cd . . . ld hl,01800h ;c01d 21 00 18 ! . . ld a,(hl) ;c020 7e ~ cp 006h ;c021 fe 06 . . jr z,lc041h ;c023 28 1c ( . add a,0fah ;c025 c6 fa . . jr c,lc044h ;c027 38 1b 8 . ld d,0dah ;c029 16 da . . call sub_cd2dh ;c02b cd 2d cd . - . ld d,010h ;c02e 16 10 . . call sub_cd1dh ;c030 cd 1d cd . . . ld l,(hl) ;c033 6e n rlc l ;c034 cb 05 . . ld h,0cch ;c036 26 cc & . ld d,(hl) ;c038 56 V inc hl ;c039 23 # ld e,(hl) ;c03a 5e ^ push de ;c03b d5 . pop iy ;c03c fd e1 . . call sub_c360h ;c03e cd 60 c3 . ` . lc041h: ld hl,01801h ;c041 21 01 18 ! . . lc044h: ld a,(hl) ;c044 7e ~ cp 07fh ;c045 fe 7f .  jr z,lc06ch ;c047 28 23 ( # and 0f0h ;c049 e6 f0 . . cp 080h ;c04b fe 80 . . jr z,lc053h ;c04d 28 04 ( . cp 090h ;c04f fe 90 . . jr nz,lc06dh ;c051 20 1a . lc053h: ld e,(hl) ;c053 5e ^ sla e ;c054 cb 23 . # sla e ;c056 cb 23 . # sla e ;c058 cb 23 . # ld d,0cfh ;c05a 16 cf . . push de ;c05c d5 . pop ix ;c05d dd e1 . . ld a,ENABL ;c05f 3e 07 > . out (SGBREG),a ;c061 d3 c3 . . in a,(SGBIN) ;c063 db c1 . . and 0fdh ;c065 e6 fd . . ; 1111 1101b ? Disable Tone Ch.B ? out (SGBOUT),a ;c067 d3 c2 . . call sub_c3a0h ;c069 cd a0 c3 . . . lc06ch: inc hl ;c06c 23 # lc06dh: ld a,(hl) ;c06d 7e ~ add a,060h ;c06e c6 60 . ` jp nc,lc1d7h ;c070 d2 d7 c1 . . . and 00fh ;c073 e6 0f . . ; 0000 1111b jp z,lc1d7h ;c075 ca d7 c1 . . . ld a,(hl) ;c078 7e ~ cp 0ffh ;c079 fe ff . . jp z,lc1d7h ;c07b ca d7 c1 . . . cp 0feh ;c07e fe fe . . jr nz,lc08eh ;c080 20 0c . exx ;c082 d9 . ld h,000h ;c083 26 00 & . exx ;c085 d9 . ld d,000h ;c086 16 00 . . call sub_cd0dh ;c088 cd 0d cd . . . jp lc09dh ;c08b c3 9d c0 . . . lc08eh: call sub_cd91h ;c08e cd 91 cd . . . call SETATONE ;c091 cd 9e cd . . . exx ;c094 d9 . ld h,00ch ;c095 26 0c & . exx ;c097 d9 . ld d,00fh ;c098 16 0f . . call sub_cd0dh ;c09a cd 0d cd . . . lc09dh: inc hl ;c09d 23 # ld a,(hl) ;c09e 7e ~ exx ;c09f d9 . ld c,a ;c0a0 4f O lc0a1h: push bc ;c0a1 c5 . push de ;c0a2 d5 . push hl ;c0a3 e5 . exx ;c0a4 d9 . push ix ;c0a5 dd e5 . . ld ix,lcd6dh ;c0a7 dd 21 6d cd . ! m . call SCAN1 ;c0ab cd 24 06 . $ . pop ix ;c0ae dd e1 . . exx ;c0b0 d9 . pop hl ;c0b1 e1 . pop de ;c0b2 d1 . pop bc ;c0b3 c1 . exx ;c0b4 d9 . jr c,lc0e3h ;c0b5 38 2c 8 , cp 022h ;c0b7 fe 22 . " jr nz,lc0c2h ;c0b9 20 07 . ld iy,0cec0h ;c0bb fd 21 c0 ce . ! . . jp lc0e3h ;c0bf c3 e3 c0 . . . lc0c2h: ld e,a ;c0c2 5f _ ld d,0cbh ;c0c3 16 cb . . ld a,(de) ;c0c5 1a . bit 7,a ;c0c6 cb 7f .  jr nz,lc0e3h ;c0c8 20 19 . push hl ;c0ca e5 . rlca ;c0cb 07 . ld l,a ;c0cc 6f o ld h,0cch ;c0cd 26 cc & . ld d,(hl) ;c0cf 56 V inc hl ;c0d0 23 # ld e,(hl) ;c0d1 5e ^ push de ;c0d2 d5 . pop iy ;c0d3 fd e1 . . pop hl ;c0d5 e1 . ld d,010h ;c0d6 16 10 . . call sub_cd1dh ;c0d8 cd 1d cd . . . ld d,0dah ;c0db 16 da . . call sub_cd2dh ;c0dd cd 2d cd . - . call sub_c360h ;c0e0 cd 60 c3 . ` . lc0e3h: exx ;c0e3 d9 . dec h ;c0e4 25 % jr nz,lc0f6h ;c0e5 20 0f . ld h,00ch ;c0e7 26 0c & . ld a,AAMP ;c0e9 3e 08 > . out (SGBREG),a ;c0eb d3 c3 . . in a,(SGBIN) ;c0ed db c1 . . cp 000h ;c0ef fe 00 . . jr z,lc0f6h ;c0f1 28 03 ( . dec a ;c0f3 3d = out (SGBOUT),a ;c0f4 d3 c2 . . lc0f6h: dec l ;c0f6 2d - jr nz,lc108h ;c0f7 20 0f . ld l,00ch ;c0f9 2e 0c . . ld a,BAMP ;c0fb 3e 09 > . out (SGBREG),a ;c0fd d3 c3 . . in a,(SGBIN) ;c0ff db c1 . . cp 000h ;c101 fe 00 . . jr z,lc108h ;c103 28 03 ( . dec a ;c105 3d = out (SGBOUT),a ;c106 d3 c2 . . lc108h: exx ;c108 d9 . dec b ;c109 05 . exx ;c10a d9 . jr nz,lc0a1h ;c10b 20 94 . exx ;c10d d9 . pop bc ;c10e c1 . push bc ;c10f c5 . lc110h: exx ;c110 d9 . dec c ;c111 0d . jr z,lc13ch ;c112 28 28 ( ( ld a,(iy+000h) ;c114 fd 7e 00 . ~ . cp 0ffh ;c117 fe ff . . jr z,lc125h ;c119 28 0a ( . dec b ;c11b 05 . jr nz,lc125h ;c11c 20 07 . inc iy ;c11e fd 23 . # exx ;c120 d9 . call sub_c360h ;c121 cd 60 c3 . ` . exx ;c124 d9 . lc125h: ld a,(ix+000h) ;c125 dd 7e 00 . ~ . cp 0ffh ;c128 fe ff . . jp z,lc0a1h ;c12a ca a1 c0 . . . dec d ;c12d 15 . jp nz,lc0a1h ;c12e c2 a1 c0 . . . exx ;c131 d9 . call sub_ce60h ;c132 cd 60 ce . ` . call sub_c3a0h ;c135 cd a0 c3 . . . exx ;c138 d9 . jp lc0a1h ;c139 c3 a1 c0 . . . lc13ch: exx ;c13c d9 . inc hl ;c13d 23 # ld a,(hl) ;c13e 7e ~ cp 006h ;c13f fe 06 . . jr nz,lc155h ;c141 20 12 . ld iy,0cec0h ;c143 fd 21 c0 ce . ! . . ld a,ENABL ;c147 3e 07 > . out (SGBREG),a ;c149 d3 c3 . . in a,(SGBIN) ;c14b db c1 . . or 024h ;c14d f6 24 . $ out (SGBOUT),a ;c14f d3 c2 . . inc hl ;c151 23 # jp lc18eh ;c152 c3 8e c1 . . . lc155h: cp 0ffh ;c155 fe ff . . jr z,lc1d7h ;c157 28 7e ( ~ add a,0fah ;c159 c6 fa . . jr c,lc17dh ;c15b 38 20 8 ld d,010h ;c15d 16 10 . . call sub_cd1dh ;c15f cd 1d cd . . . ld a,ENABL ;c162 3e 07 > . out (SGBREG),a ;c164 d3 c3 . . in a,(SGBIN) ;c166 db c1 . . and 0dbh ;c168 e6 db . . ; 1101 1011b out (SGBOUT),a ;c16a d3 c2 . . push hl ;c16c e5 . ld l,(hl) ;c16d 6e n rlc l ;c16e cb 05 . . ld h,0cch ;c170 26 cc & . ld d,(hl) ;c172 56 V inc hl ;c173 23 # ld e,(hl) ;c174 5e ^ pop hl ;c175 e1 . inc hl ;c176 23 # push de ;c177 d5 . pop iy ;c178 fd e1 . . jp lce80h ;c17a c3 80 ce . . . lc17dh: ld a,(iy+000h) ;c17d fd 7e 00 . ~ . cp 0ffh ;c180 fe ff . . jr z,lc18eh ;c182 28 0a ( . exx ;c184 d9 . dec b ;c185 05 . exx ;c186 d9 . jr nz,lc18eh ;c187 20 05 . inc iy ;c189 fd 23 . # call sub_c360h ;c18b cd 60 c3 . ` . lc18eh: ld a,(hl) ;c18e 7e ~ cp 07fh ;c18f fe 7f .  jr nz,lc19ah ;c191 20 07 . ld ix,0cec0h ;c193 dd 21 c0 ce . ! . . jp lc06ch ;c197 c3 6c c0 . l . lc19ah: and 0f0h ;c19a e6 f0 . . cp 080h ;c19c fe 80 . . jr z,lc1a4h ;c19e 28 04 ( . cp 090h ;c1a0 fe 90 . . jr nz,lc1c0h ;c1a2 20 1c . lc1a4h: ld e,(hl) ;c1a4 5e ^ sla e ;c1a5 cb 23 . # sla e ;c1a7 cb 23 . # sla e ;c1a9 cb 23 . # ld d,0cfh ;c1ab 16 cf . . push de ;c1ad d5 . pop ix ;c1ae dd e1 . . ld a,ENABL ;c1b0 3e 07 > . out (SGBREG),a ;c1b2 d3 c3 . . in a,(SGBIN) ;c1b4 db c1 . . lc1b6h: and 0fdh ;c1b6 e6 fd . . ; 1111 1101b out (SGBOUT),a ;c1b8 d3 c2 . . call sub_c3a0h ;c1ba cd a0 c3 . . . jp lc06ch ;c1bd c3 6c c0 . l . lc1c0h: ld a,(ix+000h) ;c1c0 dd 7e 00 . ~ . cp 0ffh ;c1c3 fe ff . . jp z,lc06dh ;c1c5 ca 6d c0 . m . exx ;c1c8 d9 . dec d ;c1c9 15 . exx ;c1ca d9 . jp nz,lc06dh ;c1cb c2 6d c0 . m . call sub_ce60h ;c1ce cd 60 ce . ` . call sub_c3a0h ;c1d1 cd a0 c3 . . . jp lc06dh ;c1d4 c3 6d c0 . m . lc1d7h: call sub_cdefh ;c1d7 cd ef cd . . . pop bc ;c1da c1 . ret ;c1db c9 . nop ;c1dc 00 . nop ;c1dd 00 . nop ;c1de 00 . nop ;c1df 00 . nop ;c1e0 00 . nop ;c1e1 00 . nop ;c1e2 00 . nop ;c1e3 00 . nop ;c1e4 00 . nop ;c1e5 00 . nop ;c1e6 00 . nop ;c1e7 00 . lc1e8h: call sub_c330h ;c1e8 cd 30 c3 . 0 . halt ;c1eb 76 v lc1ech: call sub_cc27h ;c1ec cd 27 cc . ' . halt ;c1ef 76 v lc1f0h: call sub_cc54h ;c1f0 cd 54 cc . T . halt ;c1f3 76 v lc1f4h: call sub_cccch ;c1f4 cd cc cc . . . halt ;c1f7 76 v lc1f8h: call sub_cb24h ;c1f8 cd 24 cb . $ . halt ;c1fb 76 v nop ;c1fc 00 . nop ;c1fd 00 . nop ;c1fe 00 . nop ;c1ff 00 . PIANO call sub_ce51h ;c200 cd 51 ce . Q . push bc ;c203 c5 . ld c,081h ;c204 0e 81 . . exx ;c206 d9 . ld hl,01800h ;c207 21 00 18 ! . . exx ;c20a d9 . lc20bh: ld hl,01800h ;c20b 21 00 18 ! . . lc20eh: ld ix,lcc0ch ;c20e dd 21 0c cc . ! . . ld iy,0cec0h ;c212 fd 21 c0 ce . ! . . call sub_cdefh ;c216 cd ef cd . . . ld d,001h ;c219 16 01 . . call sub_cd25h ;c21b cd 25 cd . % . ld d,0feh ;c21e 16 fe . . lc220h: call sub_cd2dh ;c220 cd 2d cd . - . exx ;c223 d9 . ld d,0ffh ;c224 16 ff . . lc226h: push bc ;c226 c5 . push de ;c227 d5 . push hl ;c228 e5 . exx ;c229 d9 . call SCAN1 ;c22a cd 24 06 . $ . exx ;c22d d9 . pop hl ;c22e e1 . pop de ;c22f d1 . pop bc ;c230 c1 . exx ;c231 d9 . jr nc,lc23fh ;c232 30 0b 0 . exx ;c234 d9 . ld a,e ;c235 7b { cp 0ffh ;c236 fe ff . . jr z,lc23bh ;c238 28 01 ( . inc e ;c23a 1c . lc23bh: exx ;c23b d9 . jp lc2f2h ;c23c c3 f2 c2 . . . lc23fh: cp 023h ;c23f fe 23 . # jr nz,lc25bh ;c241 20 18 . ld ix,0cec0h ;c243 dd 21 c0 ce . ! . . ld iy,0cec0h ;c247 fd 21 c0 ce . ! . . ld (hl),0ffh ;c24b 36 ff 6 . pop bc ;c24d c1 . push bc ;c24e c5 . push hl ;c24f e5 . call sub_c004h ;c250 cd 04 c0 . . . ld c,081h ;c253 0e 81 . . exx ;c255 d9 . pop hl ;c256 e1 . exx ;c257 d9 . jp lc20eh ;c258 c3 0e c2 . . . lc25bh: cp 01dh ;c25b fe 1d . . jr nz,lc264h ;c25d 20 05 . ld c,001h ;c25f 0e 01 . . jp lc20bh ;c261 c3 0b c2 . . . lc264h: cp 017h ;c264 fe 17 . . jr nz,lc275h ;c266 20 0d . exx ;c268 d9 . push hl ;c269 e5 . exx ;c26a d9 . pop hl ;c26b e1 . ld c,001h ;c26c 0e 01 . . lc26eh: exx ;c26e d9 . lc26fh: ld d,0ffh ;c26f 16 ff . . exx ;c271 d9 . jp lc2f2h ;c272 c3 f2 c2 . . . lc275h: cp 011h ;c275 fe 11 . . jr nz,lc283h ;c277 20 0a . ld c,081h ;c279 0e 81 . . ld (hl),0ffh ;c27b 36 ff 6 . push hl ;c27d e5 . exx ;c27e d9 . pop hl ;c27f e1 . jp lc26fh ;c280 c3 6f c2 . o . lc283h: cp 022h ;c283 fe 22 . " jr nz,lc28eh ;c285 20 07 . ld iy,0cec0h ;c287 fd 21 c0 ce . ! . . jp lc26eh ;c28b c3 6e c2 . n . lc28eh: push hl ;c28e e5 . ld l,a ;c28f 6f o ld h,0cbh ;c290 26 cb & . ld a,(hl) ;c292 7e ~ bit 7,a ;c293 cb 7f .  jr nz,lc2b2h ;c295 20 1b . rlca ;c297 07 . ld l,a ;c298 6f o ld h,0cch ;c299 26 cc & . ld d,(hl) ;c29b 56 V inc hl ;c29c 23 # ld e,(hl) ;c29d 5e ^ push de ;c29e d5 . pop iy ;c29f fd e1 . . pop hl ;c2a1 e1 . ld d,010h ;c2a2 16 10 . . call sub_cd1dh ;c2a4 cd 1d cd . . . ld d,0dah ;c2a7 16 da . . call sub_cd2dh ;c2a9 cd 2d cd . - . call sub_c360h ;c2ac cd 60 c3 . ` . jp lc26eh ;c2af c3 6e c2 . n . lc2b2h: ld l,a ;c2b2 6f o call sub_cd91h ;c2b3 cd 91 cd . . . call SETATONE ;c2b6 cd 9e cd . . . exx ;c2b9 d9 . ld c,00ch ;c2ba 0e 0c . . exx ;c2bc d9 . ld d,00fh ;c2bd 16 0f . . call sub_cd0dh ;c2bf cd 0d cd . . . ld a,l ;c2c2 7d } pop hl ;c2c3 e1 . exx ;c2c4 d9 . cp d ;c2c5 ba . jr z,lc2cch ;c2c6 28 04 ( . ld d,a ;c2c8 57 W jp lc2d1h ;c2c9 c3 d1 c2 . . . lc2cch: ld a,e ;c2cc 7b { add a,0f0h ;c2cd c6 f0 . . jr nc,lc2ebh ;c2cf 30 1a 0 . lc2d1h: exx ;c2d1 d9 . ld a,h ;c2d2 7c | cp 01ch ;c2d3 fe 1c . . jr nz,lc2deh ;c2d5 20 07 . ld ix,lcc12h ;c2d7 dd 21 12 cc . ! . . jp lc2eah ;c2db c3 ea c2 . . . lc2deh: exx ;c2de d9 . ld a,d ;c2df 7a z exx ;c2e0 d9 . ld (hl),a ;c2e1 77 w inc hl ;c2e2 23 # ld (hl),000h ;c2e3 36 00 6 . ld a,c ;c2e5 79 y pop bc ;c2e6 c1 . push bc ;c2e7 c5 . ld c,a ;c2e8 4f O inc hl ;c2e9 23 # lc2eah: exx ;c2ea d9 . lc2ebh: ld e,000h ;c2eb 1e 00 . . exx ;c2ed d9 . ld a,c ;c2ee 79 y and 0feh ;c2ef e6 fe . . ld c,a ;c2f1 4f O lc2f2h: dec b ;c2f2 05 . jr nz,lc316h ;c2f3 20 21 ! ld a,c ;c2f5 79 y pop bc ;c2f6 c1 . push bc ;c2f7 c5 . ld c,a ;c2f8 4f O cp 000h ;c2f9 fe 00 . . jr nz,lc305h ;c2fb 20 08 . dec hl ;c2fd 2b + ld a,(hl) ;c2fe 7e ~ cp 0ffh ;c2ff fe ff . . lc301h: jr z,lc304h ;c301 28 01 ( . inc (hl) ;c303 34 4 lc304h: inc hl ;c304 23 # lc305h: exx ;c305 d9 . ld a,(iy+000h) ;c306 fd 7e 00 . ~ . cp 0ffh ;c309 fe ff . . jr z,lc317h ;c30b 28 0a ( . dec b ;c30d 05 . jr nz,lc317h ;c30e 20 07 . sub_c310h: inc iy ;c310 fd 23 . # exx ;c312 d9 . call sub_c360h ;c313 cd 60 c3 . ` . lc316h: exx ;c316 d9 . lc317h: dec c ;c317 0d . lc318h: jr nz,lc329h ;c318 20 0f . ld c,00ch ;c31a 0e 0c . . ld a,AAMP ;c31c 3e 08 > . out (SGBREG),a ;c31e d3 c3 . . lc320h: in a,(SGBIN) ;c320 db c1 . . cp 000h ;c322 fe 00 . . jr z,lc329h ;c324 28 03 ( . dec a ;c326 3d = out (SGBOUT),a ;c327 d3 c2 . . lc329h: jp lc226h ;c329 c3 26 c2 . & . rst 38h ;c32c ff . rst 38h ;c32d ff . rst 38h ;c32e ff . rst 38h ;c32f ff . sub_c330h: ld de,00000h ;c330 11 00 00 . . . call SETATONE ;c333 cd 9e cd . . . call SETBTONE ;c336 cd ad cd . . . call SETCTONE ;c339 cd d5 cd . . . ld d,00fh ;c33c 16 0f . . call sub_cd25h ;c33e cd 25 cd . % . ld d,007h ;c341 16 07 . . call sub_cd2dh ;c343 cd 2d cd . - . ld d,010h ;c346 16 10 . . call sub_cd0dh ;c348 cd 0d cd . . . call sub_cd15h ;c34b cd 15 cd . . . call sub_cd1dh ;c34e cd 1d cd . . . ld de,01000h ;c351 11 00 10 . . . call SETENVP ;c354 cd 18 cc . . . ld d,000h ;c357 16 00 . . call sub_cd35h ;c359 cd 35 cd . 5 . ret ;c35c c9 . rst 38h ;c35d ff . rst 38h ;c35e ff . rst 38h ;c35f ff . sub_c360h: ld a,(iy+000h) ;c360 fd 7e 00 . ~ . cp 0ffh ;c363 fe ff . . jr nz,lc371h ;c365 20 0a . push iy ;c367 fd e5 . . pop de ;c369 d1 . ld a,e ;c36a 7b { and 0c0h ;c36b e6 c0 . . ld e,a ;c36d 5f _ push de ;c36e d5 . pop iy ;c36f fd e1 . . lc371h: ld d,(iy+000h) ;c371 fd 56 00 . V . ld e,000h ;c374 1e 00 . . call SETENVP ;c376 cd 18 cc . . . inc iy ;c379 fd 23 . # ld e,(iy+000h) ;c37b fd 5e 00 . ^ . inc iy ;c37e fd 23 . # ld d,(iy+000h) ;c380 fd 56 00 . V . call SETCTONE ;c383 cd d5 cd . . . ld d,000h ;c386 16 00 . . call sub_cd35h ;c388 cd 35 cd . 5 . inc iy ;c38b fd 23 . # exx ;c38d d9 . ld b,(iy+000h) ;c38e fd 46 00 . F . exx ;c391 d9 . ret ;c392 c9 . rst 38h ;c393 ff . rst 38h ;c394 ff . rst 38h ;c395 ff . rst 38h ;c396 ff . rst 38h ;c397 ff . rst 38h ;c398 ff . rst 38h ;c399 ff . rst 38h ;c39a ff . rst 38h ;c39b ff . rst 38h ;c39c ff . rst 38h ;c39d ff . rst 38h ;c39e ff . rst 38h ;c39f ff . sub_c3a0h: ld a,(ix+000h) ;c3a0 dd 7e 00 . ~ . cp 0ffh ;c3a3 fe ff . . jr nz,lc3b4h ;c3a5 20 0d . push ix ;c3a7 dd e5 . . pop de ;c3a9 d1 . ld a,e ;c3aa 7b { and 0f8h ;c3ab e6 f8 . . ; 1111 1000b ld e,a ;c3ad 5f _ push de ;c3ae d5 . pop ix ;c3af dd e1 . . ld a,(ix+000h) ;c3b1 dd 7e 00 . ~ . lc3b4h: call sub_cd91h ;c3b4 cd 91 cd . . . call SETBTONE ;c3b7 cd ad cd . . . exx ;c3ba d9 . ld d,008h ;c3bb 16 08 . . ld l,00ch ;c3bd 2e 0c . . exx ;c3bf d9 . ld d,00fh ;c3c0 16 0f . . call sub_cd15h ;c3c2 cd 15 cd . . . ret ;c3c5 c9 . inc b ;c3c6 04 . ret nz ;c3c7 c0 . ld b,003h ;c3c8 06 03 . . call sub_c004h ;c3ca cd 04 c0 . . . ld b,002h ;c3cd 06 02 . . call sub_c004h ;c3cf cd 04 c0 . . . ld de,lc800h ;c3d2 11 00 c8 . . . lc3d5h: ld hl,01800h ;c3d5 21 00 18 ! . . call sub_cbe3h ;c3d8 cd e3 cb . . . ld b,003h ;c3db 06 03 . . call sub_c004h ;c3dd cd 04 c0 . . . jp lcb60h ;c3e0 c3 60 cb . ` . lc3e3h: ld a,(de) ;c3e3 1a . ld (hl),a ;c3e4 77 w lc3e5h: inc de ;c3e5 13 . inc hl ;c3e6 23 # ld a,h ;c3e7 7c | cp 01bh ;c3e8 fe 1b . . jr nz,lc3e3h ;c3ea 20 f7 . ret ;c3ec c9 . ld de,00200h ;c3ed 11 00 02 . . . lc3f0h: call sub_cd65h ;c3f0 cd 65 cd . e . dec e ;c3f3 1d . jr nz,lc3f0h ;c3f4 20 fa . dec d ;c3f6 15 . jr nz,lc3f0h ;c3f7 20 f7 . ret ;c3f9 c9 . nop ;c3fa 00 . nop ;c3fb 00 . nop ;c3fc 00 . nop ;c3fd 00 . nop ;c3fe 00 . nop ;c3ff 00 . lc400h: ld b,07fh ;c400 06 7f .  cp 004h ;c402 fe 04 . . cp 004h ;c404 fe 04 . . cp 004h ;c406 fe 04 . . lc408h: cp 004h ;c408 fe 04 . . or e ;c40a b3 . ex af,af' ;c40b 08 . or h ;c40c b4 . ex af,af' ;c40d 08 . lc40eh: ld (bc),a ;c40e 02 . sbc a,c ;c40f 99 . or l ;c410 b5 . djnz $-59 ;c411 10 c3 . . djnz $-61 ;c413 10 c1 . . lc415h: djnz $-60 ;c415 10 c2 . . ex af,af' ;c417 08 . lc418h: pop bc ;c418 c1 . ex af,af' ;c419 08 . sbc a,e ;c41a 9b . pop bc ;c41b c1 . djnz lc3d5h ;c41c 10 b7 . . lc41eh: djnz $-71 ;c41e 10 b7 . . djnz $-76 ;c420 10 b2 . . ex af,af' ;c422 08 . or e ;c423 b3 . ex af,af' ;c424 08 . lc425h: sub b ;c425 90 . or h ;c426 b4 . djnz $-60 ;c427 10 c2 . . djnz $-71 ;c429 10 b7 . . djnz $-61 ;c42b 10 c1 . . ex af,af' ;c42d 08 . or a ;c42e b7 . ex af,af' ;c42f 08 . sbc a,c ;c430 99 . or (hl) ;c431 b6 . djnz $-73 ;c432 10 b5 . . djnz $-73 ;c434 10 b5 . . djnz $-75 ;c436 10 b3 . . ex af,af' ;c438 08 . or h ;c439 b4 . ex af,af' ;c43a 08 . sub e ;c43b 93 . or l ;c43c b5 . djnz lc400h ;c43d 10 c1 . . ex af,af' ;c43f 08 . jp nz,0c308h ;c440 c2 08 c3 . . . djnz $-60 ;c443 10 c2 . . lc445h: ex af,af' ;c445 08 . pop bc ;c446 c1 . ex af,af' ;c447 08 . sub b ;c448 90 . lc449h: or (hl) ;c449 b6 . djnz lc40eh ;c44a 10 c2 . . ex af,af' ;c44c 08 . lc44dh: jp lc408h ;c44d c3 08 c4 . . . djnz lc415h ;c450 10 c3 . . ex af,af' ;c452 08 . jp nz,09b08h ;c453 c2 08 9b . . . or l ;c456 b5 . djnz $-58 ;c457 10 c4 . . lc459h: djnz lc41eh ;c459 10 c3 . . djnz $-60 ;c45b 10 c2 . . djnz $-101 ;c45d 10 99 . . pop bc ;c45f c1 . ld b,b ;c460 40 @ pop bc ;c461 c1 . jr lc425h ;c462 18 c1 . . ex af,af' ;c464 08 . jp lc110h ;c465 c3 10 c1 . . . djnz $-99 ;c468 10 9b . . jp nz,0c218h ;c46a c2 18 c2 . . . lc46dh: ex af,af' ;c46d 08 . lc46eh: jp nz,lc220h ;c46e c2 20 c2 . . jr $-60 ;c471 18 c2 . . ex af,af' ;c473 08 . call nz,lc20eh+2 ;c474 c4 10 c2 . . . djnz $-101 ;c477 10 99 . . jp lc318h ;c479 c3 18 c3 . . . ex af,af' ;c47c 08 . jp lc320h ;c47d c3 20 c3 . . jr lc445h ;c480 18 c3 . . lc482h: ex af,af' ;c482 08 . push bc ;c483 c5 . lc484h: djnz lc449h ;c484 10 c3 . . djnz lc418h ;c486 10 90 . . call nz,lc418h ;c488 c4 18 c4 . . . ex af,af' ;c48b 08 . call nz,sub_c310h ;c48c c4 10 c3 . . . ex af,af' ;c48f 08 . jp nz,09d08h ;c490 c2 08 9d . . . or l ;c493 b5 . jr nz,lc44dh ;c494 20 b7 . jr nz,lc459h ;c496 20 c1 . ld b,b ;c498 40 @ lc499h: ld b,07fh ;c499 06 7f .  cp 004h ;c49b fe 04 . . cp 004h ;c49d fe 04 . . cp 004h ;c49f fe 04 . . cp 004h ;c4a1 fe 04 . . or e ;c4a3 b3 . ex af,af' ;c4a4 08 . or h ;c4a5 b4 . ex af,af' ;c4a6 08 . lc4a7h: ld (bc),a ;c4a7 02 . sbc a,c ;c4a8 99 . or l ;c4a9 b5 . djnz $-59 ;c4aa 10 c3 . . djnz $-61 ;c4ac 10 c1 . . lc4aeh: djnz $-60 ;c4ae 10 c2 . . ex af,af' ;c4b0 08 . lc4b1h: pop bc ;c4b1 c1 . ex af,af' ;c4b2 08 . sbc a,e ;c4b3 9b . pop bc ;c4b4 c1 . djnz lc46eh ;c4b5 10 b7 . . lc4b7h: djnz $-71 ;c4b7 10 b7 . . djnz lc46dh ;c4b9 10 b2 . . ex af,af' ;c4bb 08 . or e ;c4bc b3 . ex af,af' ;c4bd 08 . lc4beh: sub b ;c4be 90 . or h ;c4bf b4 . djnz lc484h ;c4c0 10 c2 . . djnz $-71 ;c4c2 10 b7 . . djnz $-61 ;c4c4 10 c1 . . ex af,af' ;c4c6 08 . or a ;c4c7 b7 . ex af,af' ;c4c8 08 . sbc a,c ;c4c9 99 . or (hl) ;c4ca b6 . djnz lc482h ;c4cb 10 b5 . . djnz lc484h ;c4cd 10 b5 . . djnz lc484h ;c4cf 10 b3 . . ex af,af' ;c4d1 08 . or h ;c4d2 b4 . ex af,af' ;c4d3 08 . sub e ;c4d4 93 . or l ;c4d5 b5 . djnz lc499h ;c4d6 10 c1 . . ex af,af' ;c4d8 08 . jp nz,0c308h ;c4d9 c2 08 c3 . . . djnz $-60 ;c4dc 10 c2 . . lc4deh: ex af,af' ;c4de 08 . pop bc ;c4df c1 . ex af,af' ;c4e0 08 . sub b ;c4e1 90 . lc4e2h: or (hl) ;c4e2 b6 . djnz lc4a7h ;c4e3 10 c2 . . ex af,af' ;c4e5 08 . lc4e6h: jp lc408h ;c4e6 c3 08 c4 . . . djnz lc4aeh ;c4e9 10 c3 . . ex af,af' ;c4eb 08 . jp nz,09b08h ;c4ec c2 08 9b . . . or l ;c4ef b5 . djnz $-58 ;c4f0 10 c4 . . lc4f2h: djnz lc4b7h ;c4f2 10 c3 . . djnz $-60 ;c4f4 10 c2 . . djnz $-101 ;c4f6 10 99 . . pop bc ;c4f8 c1 . ld b,b ;c4f9 40 @ pop bc ;c4fa c1 . jr lc4beh ;c4fb 18 c1 . . ex af,af' ;c4fd 08 . jp lc110h ;c4fe c3 10 c1 . . . djnz $-99 ;c501 10 9b . . jp nz,0c218h ;c503 c2 18 c2 . . . ex af,af' ;c506 08 . jp nz,lc220h ;c507 c2 20 c2 . . jr $-60 ;c50a 18 c2 . . ex af,af' ;c50c 08 . call nz,lc20eh+2 ;c50d c4 10 c2 . . . djnz $-101 ;c510 10 99 . . jp lc318h ;c512 c3 18 c3 . . . ex af,af' ;c515 08 . jp lc320h ;c516 c3 20 c3 . . jr lc4deh ;c519 18 c3 . . ex af,af' ;c51b 08 . push bc ;c51c c5 . djnz lc4e2h ;c51d 10 c3 . . djnz lc4b1h ;c51f 10 90 . . call nz,lc418h ;c521 c4 18 c4 . . . ex af,af' ;c524 08 . call nz,sub_c310h ;c525 c4 10 c3 . . . ex af,af' ;c528 08 . jp nz,09d08h ;c529 c2 08 9d . . . or l ;c52c b5 . jr nz,lc4e6h ;c52d 20 b7 . jr nz,lc4f2h ;c52f 20 c1 . ld b,b ;c531 40 @ ld b,07fh ;c532 06 7f .  cp 060h ;c534 fe 60 . ` and c ;c536 a1 . inc b ;c537 04 . and d ;c538 a2 . inc b ;c539 04 . and e ;c53a a3 . inc b ;c53b 04 . and h ;c53c a4 . inc b ;c53d 04 . and l ;c53e a5 . inc b ;c53f 04 . and (hl) ;c540 a6 . inc b ;c541 04 . and a ;c542 a7 . inc b ;c543 04 . or c ;c544 b1 . inc b ;c545 04 . or d ;c546 b2 . inc b ;c547 04 . or e ;c548 b3 . inc b ;c549 04 . or h ;c54a b4 . inc b ;c54b 04 . or l ;c54c b5 . inc b ;c54d 04 . or (hl) ;c54e b6 . inc b ;c54f 04 . or a ;c550 b7 . inc b ;c551 04 . pop bc ;c552 c1 . inc b ;c553 04 . jp nz,lc304h ;c554 c2 04 c3 . . . inc b ;c557 04 . call nz,0c504h ;c558 c4 04 c5 . . . inc b ;c55b 04 . add a,004h ;c55c c6 04 . . rst 0 ;c55e c7 . lc55fh: jr nc,lc55fh ;c55f 30 fe 0 . djnz $-55 ;c561 10 c7 . . inc b ;c563 04 . add a,004h ;c564 c6 04 . . push bc ;c566 c5 . inc b ;c567 04 . call nz,lc304h ;c568 c4 04 c3 . . . inc b ;c56b 04 . jp nz,0c104h ;c56c c2 04 c1 . . . inc b ;c56f 04 . or a ;c570 b7 . inc b ;c571 04 . or (hl) ;c572 b6 . inc b ;c573 04 . or l ;c574 b5 . inc b ;c575 04 . or h ;c576 b4 . inc b ;c577 04 . or e ;c578 b3 . inc b ;c579 04 . or d ;c57a b2 . inc b ;c57b 04 . or c ;c57c b1 . inc b ;c57d 04 . and a ;c57e a7 . inc b ;c57f 04 . and (hl) ;c580 a6 . inc b ;c581 04 . and l ;c582 a5 . inc b ;c583 04 . and h ;c584 a4 . inc b ;c585 04 . and e ;c586 a3 . inc b ;c587 04 . and d ;c588 a2 . inc b ;c589 04 . and c ;c58a a1 . lc58bh: jr nc,lc58bh ;c58b 30 fe 0 . jr nc,$-126 ;c58d 30 80 0 . cp 030h ;c58f fe 30 . 0 add a,c ;c591 81 . cp 030h ;c592 fe 30 . 0 add a,d ;c594 82 . cp 030h ;c595 fe 30 . 0 add a,e ;c597 83 . cp 030h ;c598 fe 30 . 0 add a,h ;c59a 84 . cp 030h ;c59b fe 30 . 0 add a,l ;c59d 85 . cp 030h ;c59e fe 30 . 0 add a,(hl) ;c5a0 86 . cp 030h ;c5a1 fe 30 . 0 add a,a ;c5a3 87 . cp 030h ;c5a4 fe 30 . 0 adc a,b ;c5a6 88 . cp 030h ;c5a7 fe 30 . 0 adc a,c ;c5a9 89 . cp 030h ;c5aa fe 30 . 0 adc a,d ;c5ac 8a . cp 030h ;c5ad fe 30 . 0 adc a,e ;c5af 8b . cp 030h ;c5b0 fe 30 . 0 adc a,h ;c5b2 8c . cp 030h ;c5b3 fe 30 . 0 adc a,l ;c5b5 8d . cp 030h ;c5b6 fe 30 . 0 adc a,(hl) ;c5b8 8e . cp 030h ;c5b9 fe 30 . 0 adc a,a ;c5bb 8f . cp 030h ;c5bc fe 30 . 0 ld a,a ;c5be 7f  cp 030h ;c5bf fe 30 . 0 sub b ;c5c1 90 . cp 040h ;c5c2 fe 40 . @ sub c ;c5c4 91 . cp 040h ;c5c5 fe 40 . @ sub d ;c5c7 92 . cp 040h ;c5c8 fe 40 . @ sub e ;c5ca 93 . cp 040h ;c5cb fe 40 . @ sub h ;c5cd 94 . cp 040h ;c5ce fe 40 . @ lc5d0h: sub l ;c5d0 95 . cp 040h ;c5d1 fe 40 . @ sub (hl) ;c5d3 96 . cp 040h ;c5d4 fe 40 . @ sub a ;c5d6 97 . cp 040h ;c5d7 fe 40 . @ sbc a,b ;c5d9 98 . cp 040h ;c5da fe 40 . @ sbc a,c ;c5dc 99 . cp 040h ;c5dd fe 40 . @ sbc a,d ;c5df 9a . cp 040h ;c5e0 fe 40 . @ sbc a,e ;c5e2 9b . cp 040h ;c5e3 fe 40 . @ sbc a,h ;c5e5 9c . cp 040h ;c5e6 fe 40 . @ sbc a,l ;c5e8 9d . cp 040h ;c5e9 fe 40 . @ sbc a,(hl) ;c5eb 9e . cp 040h ;c5ec fe 40 . @ lc5eeh: sbc a,a ;c5ee 9f . cp 040h ;c5ef fe 40 . @ ld a,a ;c5f1 7f  cp 030h ;c5f2 fe 30 . 0 nop ;c5f4 00 . cp 090h ;c5f5 fe 90 . . ld bc,0c0feh ;c5f7 01 fe c0 . . . ld (bc),a ;c5fa 02 . cp 080h ;c5fb fe 80 . . inc bc ;c5fd 03 . cp 0c0h ;c5fe fe c0 . . inc b ;c600 04 . cp 0c0h ;c601 fe c0 . . dec b ;c603 05 . lc604h: cp 0bch ;c604 fe bc . . ld b,0feh ;c606 06 fe . . ld h,b ;c608 60 ` rst 38h ;c609 ff . rst 38h ;c60a ff . rst 38h ;c60b ff . rst 38h ;c60c ff . rst 38h ;c60d ff . ex af,af' ;c60e 08 . or d ;c60f b2 . jr $-77 ;c610 18 b1 . . ex af,af' ;c612 08 . sub b ;c613 90 . or e ;c614 b3 . jr nc,$-73 ;c615 30 b5 0 . ld c,b ;c617 48 H pop bc ;c618 c1 . ex af,af' ;c619 08 . jp nz,0c308h ;c61a c2 08 c3 . . . ex af,af' ;c61d 08 . jp nz,0c118h ;c61e c2 18 c1 . . . ex af,af' ;c621 08 . lc622h: jp 0b550h ;c622 c3 50 b5 . P . ex af,af' ;c625 08 . or e ;c626 b3 . ex af,af' ;c627 08 . or l ;c628 b5 . djnz lc5eeh ;c629 10 c3 . . djnz $-107 ;c62b 10 93 . . lc62dh: jp nz,0b718h ;c62d c2 18 b7 . . . ex af,af' ;c630 08 . or l ;c631 b5 . jr $-72 ;c632 18 b6 . . lc634h: ex af,af' ;c634 08 . or a ;c635 b7 . ex af,af' ;c636 08 . jp 0b510h ;c637 c3 10 b5 . . . ex af,af' ;c63a 08 . call po,0b510h ;c63b e4 10 b5 . . . djnz lc5d0h ;c63e 10 90 . . or e ;c640 b3 . ld d,b ;c641 50 P or l ;c642 b5 . ex af,af' ;c643 08 . or l ;c644 b5 . ex af,af' ;c645 08 . or (hl) ;c646 b6 . jr $-75 ;c647 18 b3 . . ex af,af' ;c649 08 . or l ;c64a b5 . ld c,b ;c64b 48 H pop bc ;c64c c1 . lc64dh: ex af,af' ;c64d 08 . jp nz,0cd08h ;c64e c2 08 cd . . . nop ;c651 00 . rst 0 ;c652 c7 . halt ;c653 76 v pop bc ;c654 c1 . ex af,af' ;c655 08 . jp 0b550h ;c656 c3 50 b5 . P . ex af,af' ;c659 08 . or e ;c65a b3 . ex af,af' ;c65b 08 . or l ;c65c b5 . djnz lc622h ;c65d 10 c3 . . djnz $-49 ;c65f 10 cd . . djnz lc62dh ;c661 10 ca . . ld b,0ffh ;c663 06 ff . . call sub_cde4h ;c665 cd e4 cd . . . call sub_c700h ;c668 cd 00 c7 . . . lc66bh: halt ;c66b 76 v djnz $-73 ;c66c 10 b5 . . ex af,af' ;c66e 08 . or h ;c66f b4 . djnz lc634h ;c670 10 c2 . . lc672h: djnz lc604h ;c672 10 90 . . pop bc ;c674 c1 . ld c,b ;c675 48 H pop bc ;c676 c1 . ex af,af' ;c677 08 . pop bc ;c678 c1 . ex af,af' ;c679 08 . pop bc ;c67a c1 . lc67bh: ex af,af' ;c67b 08 . pop bc ;c67c c1 . ex af,af' ;c67d 08 . jp nz,0cd10h ;c67e c2 10 cd . . . djnz lc64dh ;c681 10 ca . . ld b,0ffh ;c683 06 ff . . call sub_cde4h ;c685 cd e4 cd . . . call sub_c700h ;c688 cd 00 c7 . . . ld b,0ffh ;c68b 06 ff . . call sub_cde4h ;c68d cd e4 cd . . . ld b,0ffh ;c690 06 ff . . call sub_cde4h ;c692 cd e4 cd . . . lc695h: call lc800h ;c695 cd 00 c8 . . . jp lcb60h ;c698 c3 60 cb . ` . ex af,af' ;c69b 08 . jp nz,0c208h ;c69c c2 08 c2 . . . ex af,af' ;c69f 08 . jp nz,0c308h ;c6a0 c2 08 c3 . . . djnz $-61 ;c6a3 10 c1 . . ex af,af' ;c6a5 08 . sub d ;c6a6 92 . jp nz,0b620h ;c6a7 c2 20 b6 . . jr z,$-72 ;c6aa 28 b6 ( . ex af,af' ;c6ac 08 . or a ;c6ad b7 . ex af,af' ;c6ae 08 . pop bc ;c6af c1 . ex af,af' ;c6b0 08 . jp 0c118h ;c6b1 c3 18 c1 . . . ex af,af' ;c6b4 08 . sub d ;c6b5 92 . jp nz,0b550h ;c6b6 c2 50 b5 . P . ex af,af' ;c6b9 08 . or l ;c6ba b5 . ex af,af' ;c6bb 08 . or (hl) ;c6bc b6 . jr lc672h ;c6bd 18 b3 . . ex af,af' ;c6bf 08 . sub b ;c6c0 90 . or l ;c6c1 b5 . ld c,b ;c6c2 48 H pop bc ;c6c3 c1 . ex af,af' ;c6c4 08 . jp nz,0c308h ;c6c5 c2 08 c3 . . . ex af,af' ;c6c8 08 . jp nz,0c118h ;c6c9 c2 18 c1 . . . ex af,af' ;c6cc 08 . jp 0b550h ;c6cd c3 50 b5 . P . ex af,af' ;c6d0 08 . or e ;c6d1 b3 . ex af,af' ;c6d2 08 . or l ;c6d3 b5 . djnz $-59 ;c6d4 10 c3 . . djnz lc66bh ;c6d6 10 93 . . jp nz,0b718h ;c6d8 c2 18 b7 . . . ex af,af' ;c6db 08 . or l ;c6dc b5 . jr lc695h ;c6dd 18 b6 . . ex af,af' ;c6df 08 . or a ;c6e0 b7 . ex af,af' ;c6e1 08 . jp 0b510h ;c6e2 c3 10 b5 . . . ex af,af' ;c6e5 08 . or h ;c6e6 b4 . djnz $-60 ;c6e7 10 c2 . . djnz lc67bh ;c6e9 10 90 . . pop bc ;c6eb c1 . inc a ;c6ec 3c < ld b,07fh ;c6ed 06 7f .  cp 060h ;c6ef fe 60 . ` rst 38h ;c6f1 ff . rst 38h ;c6f2 ff . rst 38h ;c6f3 ff . rst 38h ;c6f4 ff . rst 38h ;c6f5 ff . rst 38h ;c6f6 ff . rst 38h ;c6f7 ff . rst 38h ;c6f8 ff . rst 38h ;c6f9 ff . ld b,0d5h ;c6fa 06 d5 . . inc c ;c6fc 0c . and (hl) ;c6fd a6 . inc b ;c6fe 04 . or d ;c6ff b2 . sub_c700h: call sub_cdefh ;c700 cd ef cd . . . ld hl,lc750h ;c703 21 50 c7 ! P . ld d,0feh ;c706 16 fe . . call sub_cd2dh ;c708 cd 2d cd . - . ld d,00fh ;c70b 16 0f . . call sub_cd0dh ;c70d cd 0d cd . . . ld d,000h ;c710 16 00 . . lc712h: ld a,(hl) ;c712 7e ~ cp 000h ;c713 fe 00 . . jr z,lc725h ;c715 28 0e ( . ld e,a ;c717 5f _ inc hl ;c718 23 # ld b,(hl) ;c719 46 F call sub_c728h ;c71a cd 28 c7 . ( . ld b,(hl) ;c71d 46 F call sub_c733h ;c71e cd 33 c7 . 3 . inc hl ;c721 23 # jp lc712h ;c722 c3 12 c7 . . . lc725h: jp lc770h ;c725 c3 70 c7 . p . sub_c728h: call SETATONE ;c728 cd 9e cd . . . call sub_c73eh ;c72b cd 3e c7 . > . dec e ;c72e 1d . dec b ;c72f 05 . jr nz,sub_c728h ;c730 20 f6 . ret ;c732 c9 . sub_c733h: call SETATONE ;c733 cd 9e cd . . . call sub_c73eh ;c736 cd 3e c7 . > . inc e ;c739 1c . dec b ;c73a 05 . jr nz,sub_c733h ;c73b 20 f6 . ret ;c73d c9 . sub_c73eh: ld c,070h ;c73e 0e 70 . p lc740h: dec c ;c740 0d . jr nz,lc740h ;c741 20 fd . ret ;c743 c9 . or d ;c744 b2 . inc b ;c745 04 . or e ;c746 b3 . ex af,af' ;c747 08 . or l ;c748 b5 . ex af,af' ;c749 08 . or l ;c74a b5 . inc c ;c74b 0c . or (hl) ;c74c b6 . inc b ;c74d 04 . or l ;c74e b5 . ex af,af' ;c74f 08 . lc750h: ld (hl),b ;c750 70 p ld c,b ;c751 48 H add a,b ;c752 80 . ld c,b ;c753 48 H sub b ;c754 90 . ld c,b ;c755 48 H and b ;c756 a0 . ld c,b ;c757 48 H or b ;c758 b0 . ld c,b ;c759 48 H ret nz ;c75a c0 . ld c,b ;c75b 48 H ret nc ;c75c d0 . ld c,b ;c75d 48 H ret po ;c75e e0 . ld c,b ;c75f 48 H nop ;c760 00 . cp 008h ;c761 fe 08 . . or c ;c763 b1 . inc b ;c764 04 . or d ;c765 b2 . inc b ;c766 04 . or e ;c767 b3 . ex af,af' ;c768 08 . or l ;c769 b5 . ex af,af' ;c76a 08 . or l ;c76b b5 . ex af,af' ;c76c 08 . or (hl) ;c76d b6 . ex af,af' ;c76e 08 . sub b ;c76f 90 . lc770h: call sub_cdefh ;c770 cd ef cd . . . ld h,002h ;c773 26 02 & . lc775h: ld b,040h ;c775 06 40 . @ call sub_cde4h ;c777 cd e4 cd . . . ld d,0feh ;c77a 16 fe . . call sub_cd2dh ;c77c cd 2d cd . - . ld d,00fh ;c77f 16 0f . . call sub_cd0dh ;c781 cd 0d cd . . . ld d,000h ;c784 16 00 . . ld e,0e0h ;c786 1e e0 . . ld b,030h ;c788 06 30 . 0 ld c,000h ;c78a 0e 00 . . lc78ch: call SETATONE ;c78c cd 9e cd . . . call sub_cd65h ;c78f cd 65 cd . e . inc c ;c792 0c . sbc a,e ;c793 9b . sub c ;c794 91 . ld e,a ;c795 5f _ dec b ;c796 05 . jr nz,lc78ch ;c797 20 f3 . call sub_cdefh ;c799 cd ef cd . . . dec h ;c79c 25 % jr nz,lc775h ;c79d 20 d6 . ret ;c79f c9 . inc b ;c7a0 04 . sub b ;c7a1 90 . or e ;c7a2 b3 . ex af,af' ;c7a3 08 . or l ;c7a4 b5 . ex af,af' ;c7a5 08 . or l ;c7a6 b5 . inc c ;c7a7 0c . or (hl) ;c7a8 b6 . inc b ;c7a9 04 . or l ;c7aa b5 . ex af,af' ;c7ab 08 . or e ;c7ac b3 . ex af,af' ;c7ad 08 . or c ;c7ae b1 . ex af,af' ;c7af 08 . or d ;c7b0 b2 . ex af,af' ;c7b1 08 . lc7b2h: or e ;c7b2 b3 . ex af,af' ;c7b3 08 . or e ;c7b4 b3 . ex af,af' ;c7b5 08 . or d ;c7b6 b2 . inc c ;c7b7 0c . or d ;c7b8 b2 . inc b ;c7b9 04 . or c ;c7ba b1 . lc7bbh: djnz lc7bbh ;c7bb 10 fe . . djnz $+1 ;c7bd 10 ff . . jr lc7c9h ;c7bf 18 08 . . cp 008h ;c7c1 fe 08 . . or l ;c7c3 b5 . ex af,af' ;c7c4 08 . ld b,0b1h ;c7c5 06 b1 . . ld b,b ;c7c7 40 @ rst 38h ;c7c8 ff . lc7c9h: ld b,07fh ;c7c9 06 7f .  cp 060h ;c7cb fe 60 . ` rst 38h ;c7cd ff . rst 38h ;c7ce ff . rst 38h ;c7cf ff . ld (bc),a ;c7d0 02 . sbc a,l ;c7d1 9d . or e ;c7d2 b3 . ex af,af' ;c7d3 08 . or e ;c7d4 b3 . ex af,af' ;c7d5 08 . or e ;c7d6 b3 . ex af,af' ;c7d7 08 . or e ;c7d8 b3 . ex af,af' ;c7d9 08 . sbc a,d ;c7da 9a . or l ;c7db b5 . inc b ;c7dc 04 . or h ;c7dd b4 . inc b ;c7de 04 . or h ;c7df b4 . inc b ;c7e0 04 . or e ;c7e1 b3 . inc b ;c7e2 04 . or d ;c7e3 b2 . djnz $-76 ;c7e4 10 b2 . . ex af,af' ;c7e6 08 . or d ;c7e7 b2 . ex af,af' ;c7e8 08 . or e ;c7e9 b3 . ex af,af' ;c7ea 08 . or h ;c7eb b4 . ex af,af' ;c7ec 08 . sbc a,l ;c7ed 9d . or l ;c7ee b5 . djnz lc7b2h ;c7ef 10 c1 . . ex af,af' ;c7f1 08 . cp 008h ;c7f2 fe 08 . . or e ;c7f4 b3 . ex af,af' ;c7f5 08 . or e ;c7f6 b3 . ex af,af' ;c7f7 08 . or e ;c7f8 b3 . ex af,af' ;c7f9 08 . or e ;c7fa b3 . ex af,af' ;c7fb 08 . sbc a,d ;c7fc 9a . or l ;c7fd b5 . lc7feh: cp 040h ;c7fe fe 40 . @ lc800h: call sub_cdefh ;c800 cd ef cd . . . ld d,0f7h ;c803 16 f7 . . call sub_cd2dh ;c805 cd 2d cd . - . ld d,00fh ;c808 16 0f . . call sub_cd0dh ;c80a cd 0d cd . . . ld d,01fh ;c80d 16 1f . . ld b,0a0h ;c80f 06 a0 . . lc811h: call sub_cd25h ;c811 cd 25 cd . % . call sub_cde4h ;c814 cd e4 cd . . . dec b ;c817 05 . dec d ;c818 15 . ld a,d ;c819 7a z cp 002h ;c81a fe 02 . . jr nz,lc811h ;c81c 20 f3 . call sub_cdefh ;c81e cd ef cd . . . ld d,002h ;c821 16 02 . . call sub_cd25h ;c823 cd 25 cd . % . ld d,0f6h ;c826 16 f6 . . call sub_cd2dh ;c828 cd 2d cd . - . ld d,010h ;c82b 16 10 . . call sub_cd0dh ;c82d cd 0d cd . . . ld de,00030h ;c830 11 30 00 . 0 . call SETATONE ;c833 cd 9e cd . . . ld de,0e000h ;c836 11 00 e0 . . . call SETENVP ;c839 cd 18 cc . . . ld d,000h ;c83c 16 00 . . call sub_cd35h ;c83e cd 35 cd . 5 . ld de,00030h ;c841 11 30 00 . 0 . lc844h: call SETATONE ;c844 cd 9e cd . . . ld b,024h ;c847 06 24 . $ call sub_cde4h ;c849 cd e4 cd . . . inc de ;c84c 13 . ld a,e ;c84d 7b { cp 090h ;c84e fe 90 . . jr nz,lc844h ;c850 20 f2 . ret ;c852 c9 . or d ;c853 b2 . inc b ;c854 04 . or c ;c855 b1 . ex af,af' ;c856 08 . or d ;c857 b2 . ex af,af' ;c858 08 . or e ;c859 b3 . djnz $-76 ;c85a 10 b2 . . ex af,af' ;c85c 08 . or e ;c85d b3 . ex af,af' ;c85e 08 . or d ;c85f b2 . lc860h: ld hl,01b00h ;c860 21 00 1b ! . . ld ix,lc8f0h ;c863 dd 21 f0 c8 . ! . . lc867h: push hl ;c867 e5 . call SCAN ;c868 cd fe 05 . . . pop hl ;c86b e1 . cp 000h ;c86c fe 00 . . jr z,lc867h ;c86e 28 f7 ( . cp 012h ;c870 fe 12 . . jr z,lc880h ;c872 28 0c ( . lc874h: ld b,a ;c874 47 G add a,0f0h ;c875 c6 f0 . . jr c,lc867h ;c877 38 ee 8 . ld (hl),b ;c879 70 p inc hl ;c87a 23 # ld a,h ;c87b 7c | cp 01ch ;c87c fe 1c . . jr nz,lc867h ;c87e 20 e7 . lc880h: ld (hl),0ffh ;c880 36 ff 6 . ld hl,01b00h ;c882 21 00 1b ! . . lc885h: ld a,(hl) ;c885 7e ~ cp 0ffh ;c886 fe ff . . jr z,lc860h ;c888 28 d6 ( . ld c,a ;c88a 4f O rlca ;c88b 07 . rlca ;c88c 07 . sub c ;c88d 91 . sub 003h ;c88e d6 03 . . ld e,a ;c890 5f _ ld d,0d0h ;c891 16 d0 . . inc hl ;c893 23 # lc894h: ld a,(de) ;c894 1a . cp 0ffh ;c895 fe ff . . jr z,lc885h ;c897 28 ec ( . push hl ;c899 e5 . ld h,a ;c89a 67 g inc de ;c89b 13 . ld a,(de) ;c89c 1a . ld l,a ;c89d 6f o inc de ;c89e 13 . ld a,(de) ;c89f 1a . lc8a0h: ld b,a ;c8a0 47 G ex de,hl ;c8a1 eb . ld hl,01800h ;c8a2 21 00 18 ! . . call sub_cbe3h ;c8a5 cd e3 cb . . . call sub_c004h ;c8a8 cd 04 c0 . . . pop hl ;c8ab e1 . jp lc885h ;c8ac c3 85 c8 . . . inc b ;c8af 04 . or c ;c8b0 b1 . ex af,af' ;c8b1 08 . and (hl) ;c8b2 a6 . ex af,af' ;c8b3 08 . and l ;c8b4 a5 . inc c ;c8b5 0c . and (hl) ;c8b6 a6 . inc b ;c8b7 04 . and l ;c8b8 a5 . inc b ;c8b9 04 . and (hl) ;c8ba a6 . inc b ;c8bb 04 . and l ;c8bc a5 . lc8bdh: inc b ;c8bd 04 . and (hl) ;c8be a6 . inc b ;c8bf 04 . and l ;c8c0 a5 . jr nz,lc874h ;c8c1 20 b1 . inc c ;c8c3 0c . or d ;c8c4 b2 . inc b ;c8c5 04 . or e ;c8c6 b3 . ex af,af' ;c8c7 08 . cp 008h ;c8c8 fe 08 . . or d ;c8ca b2 . inc c ;c8cb 0c . lc8cch: or e ;c8cc b3 . inc b ;c8cd 04 . or c ;c8ce b1 . ex af,af' ;c8cf 08 . or d ;c8d0 b2 . ex af,af' ;c8d1 08 . or e ;c8d2 b3 . lc8d3h: jr lc8d3h ;c8d3 18 fe . . ex af,af' ;c8d5 08 . lc8d6h: or l ;c8d6 b5 . inc c ;c8d7 0c . or (hl) ;c8d8 b6 . inc b ;c8d9 04 . lc8dah: or l ;c8da b5 . ex af,af' ;c8db 08 . or e ;c8dc b3 . ex af,af' ;c8dd 08 . or d ;c8de b2 . jr lc894h ;c8df 18 b3 . . ex af,af' ;c8e1 08 . sub e ;c8e2 93 . or d ;c8e3 b2 . inc c ;c8e4 0c . or e ;c8e5 b3 . lc8e6h: inc b ;c8e6 04 . or l ;c8e7 b5 . ex af,af' ;c8e8 08 . cp 008h ;c8e9 fe 08 . . or l ;c8eb b5 . ex af,af' ;c8ec 08 . or (hl) ;c8ed b6 . ex af,af' ;c8ee 08 . lc8efh: or e ;c8ef b3 . lc8f0h: adc a,a ;c8f0 8f . xor (hl) ;c8f1 ae . cp l ;c8f2 bd . cp l ;c8f3 bd . scf ;c8f4 37 7 adc a,l ;c8f5 8d . rst 38h ;c8f6 ff . rst 38h ;c8f7 ff . rst 38h ;c8f8 ff . inc c ;c8f9 0c . and (hl) ;c8fa a6 . inc b ;c8fb 04 . and l ;c8fc a5 . ex af,af' ;c8fd 08 . and (hl) ;c8fe a6 . lc8ffh: ex af,af' ;c8ff 08 . call lc800h ;c900 cd 00 c8 . . . halt ;c903 76 v or e ;c904 b3 . ex af,af' ;c905 08 . or l ;c906 b5 . ex af,af' ;c907 08 . sub d ;c908 92 . or d ;c909 b2 . jr lc8bdh ;c90a 18 b1 . . ex af,af' ;c90c 08 . or c ;c90d b1 . jr nz,lc8a0h ;c90e 20 90 . or c ;c910 b1 . inc c ;c911 0c . or d ;c912 b2 . inc b ;c913 04 . or c ;c914 b1 . ex af,af' ;c915 08 . and (hl) ;c916 a6 . ex af,af' ;c917 08 . and l ;c918 a5 . djnz lc8cch ;c919 10 b1 . . ex af,af' ;c91b 08 . or e ;c91c b3 . ex af,af' ;c91d 08 . or l ;c91e b5 . jr lc8d6h ;c91f 18 b5 . . ex af,af' ;c921 08 . lc922h: or (hl) ;c922 b6 . inc b ;c923 04 . pop bc ;c924 c1 . inc b ;c925 04 . or (hl) ;c926 b6 . inc b ;c927 04 . or l ;c928 b5 . inc d ;c929 14 . or e ;c92a b3 . inc c ;c92b 0c . or h ;c92c b4 . inc b ;c92d 04 . lc92eh: or l ;c92e b5 . ex af,af' ;c92f 08 . or (hl) ;c930 b6 . ex af,af' ;c931 08 . or l ;c932 b5 . djnz lc8e6h ;c933 10 b1 . . ex af,af' ;c935 08 . or d ;c936 b2 . ex af,af' ;c937 08 . lc938h: or e ;c938 b3 . jr lc8efh ;c939 18 b4 . . inc b ;c93b 04 . or e ;c93c b3 . inc b ;c93d 04 . or d ;c93e b2 . jr nz,lc8dah ;c93f 20 99 . or l ;c941 b5 . ex af,af' ;c942 08 . or l ;c943 b5 . ex af,af' ;c944 08 . cp 008h ;c945 fe 08 . . or (hl) ;c947 b6 . ex af,af' ;c948 08 . or l ;c949 b5 . ex af,af' ;c94a 08 . or e ;c94b b3 . ex af,af' ;c94c 08 . or c ;c94d b1 . inc c ;c94e 0c . or d ;c94f b2 . inc b ;c950 04 . sub e ;c951 93 . or e ;c952 b3 . ex af,af' ;c953 08 . cp 008h ;c954 fe 08 . . or d ;c956 b2 . inc c ;c957 0c . or e ;c958 b3 . inc b ;c959 04 . or l ;c95a b5 . ex af,af' ;c95b 08 . or l ;c95c b5 . ex af,af' ;c95d 08 . or (hl) ;c95e b6 . ex af,af' ;c95f 08 . cp 008h ;c960 fe 08 . . sub b ;c962 90 . or l ;c963 b5 . ex af,af' ;c964 08 . or e ;c965 b3 . ex af,af' ;c966 08 . or c ;c967 b1 . ex af,af' ;c968 08 . or d ;c969 b2 . ex af,af' ;c96a 08 . or e ;c96b b3 . jr nz,lc8ffh ;c96c 20 91 . and (hl) ;c96e a6 . jr nz,lc922h ;c96f 20 b1 . inc c ;c971 0c . and (hl) ;c972 a6 . inc b ;c973 04 . and l ;c974 a5 . ex af,af' ;c975 08 . and (hl) ;c976 a6 . ex af,af' ;c977 08 . sub b ;c978 90 . or c ;c979 b1 . djnz lc92eh ;c97a 10 b2 . . ex af,af' ;c97c 08 . or e ;c97d b3 . ex af,af' ;c97e 08 . or l ;c97f b5 . jr lc938h ;c980 18 b6 . . ex af,af' ;c982 08 . or c ;c983 b1 . inc c ;c984 0c . or d ;c985 b2 . inc b ;c986 04 . or c ;c987 b1 . inc b ;c988 04 . or d ;c989 b2 . inc b ;c98a 04 . or c ;c98b b1 . inc b ;c98c 04 . or d ;c98d b2 . inc b ;c98e 04 . or c ;c98f b1 . jr nz,lc922h ;c990 20 90 . lc992h: or c ;c992 b1 . inc c ;c993 0c . and l ;c994 a5 . inc b ;c995 04 . or c ;c996 b1 . ex af,af' ;c997 08 . or e ;c998 b3 . ex af,af' ;c999 08 . or l ;c99a b5 . ex af,af' ;c99b 08 . or (hl) ;c99c b6 . ex af,af' ;c99d 08 . lc99eh: or l ;c99e b5 . ex af,af' ;c99f 08 . cp 008h ;c9a0 fe 08 . . or l ;c9a2 b5 . ex af,af' ;c9a3 08 . or l ;c9a4 b5 . inc b ;c9a5 04 . or (hl) ;c9a6 b6 . inc b ;c9a7 04 . or l ;c9a8 b5 . ex af,af' ;c9a9 08 . or e ;c9aa b3 . ex af,af' ;c9ab 08 . or c ;c9ac b1 . ex af,af' ;c9ad 08 . or (hl) ;c9ae b6 . ex af,af' ;c9af 08 . lc9b0h: or l ;c9b0 b5 . ex af,af' ;c9b1 08 . cp 008h ;c9b2 fe 08 . . or e ;c9b4 b3 . ex af,af' ;c9b5 08 . or e ;c9b6 b3 . inc b ;c9b7 04 . or h ;c9b8 b4 . inc b ;c9b9 04 . or e ;c9ba b3 . ex af,af' ;c9bb 08 . or d ;c9bc b2 . ex af,af' ;c9bd 08 . or c ;c9be b1 . ex af,af' ;c9bf 08 . and (hl) ;c9c0 a6 . ex af,af' ;c9c1 08 . and l ;c9c2 a5 . ex af,af' ;c9c3 08 . cp 008h ;c9c4 fe 08 . . or c ;c9c6 b1 . inc c ;c9c7 0c . and l ;c9c8 a5 . inc b ;c9c9 04 . or c ;c9ca b1 . ex af,af' ;c9cb 08 . or e ;c9cc b3 . lc9cdh: ex af,af' ;c9cd 08 . lc9ceh: or l ;c9ce b5 . inc c ;c9cf 0c . or (hl) ;c9d0 b6 . inc b ;c9d1 04 . or l ;c9d2 b5 . inc b ;c9d3 04 . or (hl) ;c9d4 b6 . inc b ;c9d5 04 . or l ;c9d6 b5 . inc b ;c9d7 04 . or (hl) ;c9d8 b6 . inc b ;c9d9 04 . sub e ;c9da 93 . or l ;c9db b5 . jr lc992h ;c9dc 18 b4 . . ex af,af' ;c9de 08 . or e ;c9df b3 . ex af,af' ;c9e0 08 . lc9e1h: or e ;c9e1 b3 . inc b ;c9e2 04 . or d ;c9e3 b2 . inc b ;c9e4 04 . or c ;c9e5 b1 . ex af,af' ;c9e6 08 . or d ;c9e7 b2 . ex af,af' ;c9e8 08 . or e ;c9e9 b3 . djnz lc99eh ;c9ea 10 b2 . . ex af,af' ;c9ec 08 . or e ;c9ed b3 . ex af,af' ;c9ee 08 . or d ;c9ef b2 . ex af,af' ;c9f0 08 . or c ;c9f1 b1 . inc b ;c9f2 04 . and (hl) ;c9f3 a6 . inc b ;c9f4 04 . and l ;c9f5 a5 . ex af,af' ;c9f6 08 . or d ;c9f7 b2 . ex af,af' ;c9f8 08 . sub b ;c9f9 90 . or c ;c9fa b1 . jr lc9b0h ;c9fb 18 b3 . . ex af,af' ;c9fd 08 . or l ;c9fe b5 . jr lc9ceh ;c9ff 18 cd . . djnz lc9cdh ;ca01 10 ca . . halt ;ca03 76 v ld b,07fh ;ca04 06 7f .  cp 060h ;ca06 fe 60 . ` and c ;ca08 a1 . inc b ;ca09 04 . and d ;ca0a a2 . inc b ;ca0b 04 . and e ;ca0c a3 . inc b ;ca0d 04 . and h ;ca0e a4 . inc b ;ca0f 04 . ld b,003h ;ca10 06 03 . . ld hl,01800h ;ca12 21 00 18 ! . . ld de,lca70h ;ca15 11 70 ca . p . lca18h: ld a,(de) ;ca18 1a . ld (hl),a ;ca19 77 w inc de ;ca1a 13 . inc hl ;ca1b 23 # ld a,h ;ca1c 7c | cp 019h ;ca1d fe 19 . . jr nz,lca18h ;ca1f 20 f7 . call sub_c004h ;ca21 cd 04 c0 . . . ret ;ca24 c9 . inc b ;ca25 04 . jp nz,lc304h ;ca26 c2 04 c3 . . . inc b ;ca29 04 . call nz,0c504h ;ca2a c4 04 c5 . . . inc b ;ca2d 04 . add a,004h ;ca2e c6 04 . . rst 0 ;ca30 c7 . lca31h: jr nc,lca31h ;ca31 30 fe 0 . djnz $-55 ;ca33 10 c7 . . inc b ;ca35 04 . add a,004h ;ca36 c6 04 . . push bc ;ca38 c5 . inc b ;ca39 04 . call nz,lc304h ;ca3a c4 04 c3 . . . inc b ;ca3d 04 . jp nz,0c104h ;ca3e c2 04 c1 . . . inc b ;ca41 04 . or a ;ca42 b7 . inc b ;ca43 04 . or (hl) ;ca44 b6 . inc b ;ca45 04 . or l ;ca46 b5 . inc b ;ca47 04 . or h ;ca48 b4 . inc b ;ca49 04 . or e ;ca4a b3 . inc b ;ca4b 04 . or d ;ca4c b2 . inc b ;ca4d 04 . or c ;ca4e b1 . inc b ;ca4f 04 . and a ;ca50 a7 . inc b ;ca51 04 . and (hl) ;ca52 a6 . inc b ;ca53 04 . and l ;ca54 a5 . inc b ;ca55 04 . and h ;ca56 a4 . inc b ;ca57 04 . and e ;ca58 a3 . inc b ;ca59 04 . and d ;ca5a a2 . inc b ;ca5b 04 . and c ;ca5c a1 . lca5dh: jr nc,lca5dh ;ca5d 30 fe 0 . jr nc,lc9e1h ;ca5f 30 80 0 . cp 030h ;ca61 fe 30 . 0 add a,c ;ca63 81 . cp 030h ;ca64 fe 30 . 0 add a,d ;ca66 82 . cp 030h ;ca67 fe 30 . 0 add a,e ;ca69 83 . cp 030h ;ca6a fe 30 . 0 add a,h ;ca6c 84 . cp 030h ;ca6d fe 30 . 0 add a,l ;ca6f 85 . lca70h: or l ;ca70 b5 . inc b ;ca71 04 . push bc ;ca72 c5 . inc b ;ca73 04 . jp nz,0b704h ;ca74 c2 04 b7 . . . inc b ;ca77 04 . push bc ;ca78 c5 . inc b ;ca79 04 . jp nz,0b704h ;ca7a c2 04 b7 . . . ld b,0e5h ;ca7d 06 e5 . . inc b ;ca7f 04 . push bc ;ca80 c5 . inc b ;ca81 04 . lca82h: jp p,0e704h ;ca82 f2 04 e7 . . . inc b ;ca85 04 . push bc ;ca86 c5 . inc b ;ca87 04 . jp nz,0b704h ;ca88 c2 04 b7 . . . ld b,0b5h ;ca8b 06 b5 . . inc b ;ca8d 04 . push bc ;ca8e c5 . inc b ;ca8f 04 . jp nz,0b704h ;ca90 c2 04 b7 . . . inc b ;ca93 04 . push bc ;ca94 c5 . lca95h: inc b ;ca95 04 . jp nz,0b704h ;ca96 c2 04 b7 . . . ld b,0b6h ;ca99 06 b6 . . ld bc,001b7h ;ca9b 01 b7 01 . . . pop bc ;ca9e c1 . ld bc,004c2h ;ca9f 01 c2 04 . . . or a ;caa2 b7 . ld bc,001c1h ;caa3 01 c1 01 . . . jp nz,lc301h ;caa6 c2 01 c3 . . . inc b ;caa9 04 . pop bc ;caaa c1 . ld bc,001c2h ;caab 01 c2 01 . . . lcaaeh: jp lc400h+1 ;caae c3 01 c4 . . . inc b ;cab1 04 . jp nz,lc301h ;cab2 c2 01 c3 . . . ld bc,001c4h ;cab5 01 c4 01 . . . push bc ;cab8 c5 . ex af,af' ;cab9 08 . rst 38h ;caba ff . cp 040h ;cabb fe 40 . @ sbc a,(hl) ;cabd 9e . cp 040h ;cabe fe 40 . @ sbc a,a ;cac0 9f . cp 040h ;cac1 fe 40 . @ ld a,a ;cac3 7f  cp 030h ;cac4 fe 30 . 0 nop ;cac6 00 . cp 090h ;cac7 fe 90 . . ld bc,0c0feh ;cac9 01 fe c0 . . . ld (bc),a ;cacc 02 . cp 080h ;cacd fe 80 . . inc bc ;cacf 03 . cp 0c0h ;cad0 fe c0 . . inc b ;cad2 04 . cp 0c0h ;cad3 fe c0 . . dec b ;cad5 05 . cp 0bch ;cad6 fe bc . . ld b,0feh ;cad8 06 fe . . ld h,b ;cada 60 ` rst 38h ;cadb ff . rst 38h ;cadc ff . rst 38h ;cadd ff . rst 38h ;cade ff . rst 38h ;cadf ff . ex af,af' ;cae0 08 . or d ;cae1 b2 . jr lca95h ;cae2 18 b1 . . ex af,af' ;cae4 08 . sub b ;cae5 90 . or e ;cae6 b3 . lcae7h: jr nc,lcae7h ;cae7 30 fe 0 . djnz lca82h ;cae9 10 97 . . and (hl) ;caeb a6 . ex af,af' ;caec 08 . or c ;caed b1 . ex af,af' ;caee 08 . or c ;caef b1 . ex af,af' ;caf0 08 . or d ;caf1 b2 . ex af,af' ;caf2 08 . or c ;caf3 b1 . jr $-88 ;caf4 18 a6 . . ex af,af' ;caf6 08 . sub b ;caf7 90 . and l ;caf8 a5 . djnz lcaaeh ;caf9 10 b3 . . lcafbh: jr nz,lcafbh ;cafb 20 fe . djnz $-77 ;cafd 10 b1 . . ex af,af' ;caff 08 . and a ;cb00 a7 . or a ;cb01 b7 . rst 0 ;cb02 c7 . nop ;cb03 00 . rst 38h ;cb04 ff . rst 38h ;cb05 ff . and (hl) ;cb06 a6 . or (hl) ;cb07 b6 . add a,005h ;cb08 c6 05 . . rst 38h ;cb0a ff . rst 38h ;cb0b ff . and l ;cb0c a5 . or l ;cb0d b5 . push bc ;cb0e c5 . ld (bc),a ;cb0f 02 . or c ;cb10 b1 . rst 38h ;cb11 ff . and h ;cb12 a4 . or h ;cb13 b4 . call nz,0a101h ;cb14 c4 01 a1 . . . rst 38h ;cb17 ff . jp nz,lc304h ;cb18 c2 04 c3 . . . and e ;cb1b a3 . pop bc ;cb1c c1 . rst 38h ;cb1d ff . inc bc ;cb1e 03 . or d ;cb1f b2 . or e ;cb20 b3 . and d ;cb21 a2 . rst 38h ;cb22 ff . rst 38h ;cb23 ff . sub_cb24h: ld de,00000h ;cb24 11 00 00 . . . call SETATONE ;cb27 cd 9e cd . . . call sub_cd15h ;cb2a cd 15 cd . . . call sub_cd1dh ;cb2d cd 1d cd . . . ld d,03eh ;cb30 16 3e . > call sub_cd2dh ;cb32 cd 2d cd . - . ld d,00fh ;cb35 16 0f . . call sub_cd0dh ;cb37 cd 0d cd . . . ld de,00030h ;cb3a 11 30 00 . 0 . lcb3dh: call SETATONE ;cb3d cd 9e cd . . . exx ;cb40 d9 . ld d,002h ;cb41 16 02 . . lcb43h: call sub_cd65h ;cb43 cd 65 cd . e . dec d ;cb46 15 . jr nz,lcb43h ;cb47 20 fa . exx ;cb49 d9 . inc e ;cb4a 1c . ld a,e ;cb4b 7b { cp 071h ;cb4c fe 71 . q jr nz,lcb3dh ;cb4e 20 ed . ld d,000h ;cb50 16 00 . . call sub_cd0dh ;cb52 cd 0d cd . . . ret ;cb55 c9 . rst 38h ;cb56 ff . rst 38h ;cb57 ff . rst 38h ;cb58 ff . rst 38h ;cb59 ff . rst 38h ;cb5a ff . rst 38h ;cb5b ff . rst 38h ;cb5c ff . rst 38h ;cb5d ff . rst 38h ;cb5e ff . rst 38h ;cb5f ff . lcb60h: ld h,002h ;cb60 26 02 & . lcb62h: call sub_cccch ;cb62 cd cc cc . . . call sub_cbedh ;cb65 cd ed cb . . . call sub_cc27h ;cb68 cd 27 cc . ' . call sub_cbedh ;cb6b cd ed cb . . . call sub_c330h ;cb6e cd 30 c3 . 0 . call sub_cbedh ;cb71 cd ed cb . . . call sub_c330h ;cb74 cd 30 c3 . 0 . call sub_cbedh ;cb77 cd ed cb . . . call sub_cb24h ;cb7a cd 24 cb . $ . call sub_cb24h ;cb7d cd 24 cb . $ . ld d,0ffh ;cb80 16 ff . . lcb82h: call sub_cd65h ;cb82 cd 65 cd . e . dec d ;cb85 15 . jr nz,lcb82h ;cb86 20 fa . call sub_cb24h ;cb88 cd 24 cb . $ . call sub_c330h ;cb8b cd 30 c3 . 0 . call sub_cbedh ;cb8e cd ed cb . . . call sub_cb24h ;cb91 cd 24 cb . $ . call sub_cc27h ;cb94 cd 27 cc . ' . call sub_cbedh ;cb97 cd ed cb . . . dec h ;cb9a 25 % jr nz,lcb62h ;cb9b 20 c5 . call sub_cc54h ;cb9d cd 54 cc . T . ld de,00400h ;cba0 11 00 04 . . . lcba3h: call sub_cd65h ;cba3 cd 65 cd . e . dec de ;cba6 1b . jr nz,lcba3h ;cba7 20 fa . call sub_cc54h ;cba9 cd 54 cc . T . ld de,lc400h ;cbac 11 00 c4 . . . ld hl,01800h ;cbaf 21 00 18 ! . . call sub_cbe3h ;cbb2 cd e3 cb . . . ld b,003h ;cbb5 06 03 . . call sub_c004h ;cbb7 cd 04 c0 . . . jp 0c680h ;cbba c3 80 c6 . . . ld hl,01800h ;cbbd 21 00 18 ! . . call sub_cbe3h ;cbc0 cd e3 cb . . . ld b,004h ;cbc3 06 04 . . call sub_c004h ;cbc5 cd 04 c0 . . . ld b,003h ;cbc8 06 03 . . call sub_c004h ;cbca cd 04 c0 . . . ld b,002h ;cbcd 06 02 . . call sub_c004h ;cbcf cd 04 c0 . . . ld de,lc7feh ;cbd2 11 fe c7 . . . ld hl,01800h ;cbd5 21 00 18 ! . . call sub_cbe3h ;cbd8 cd e3 cb . . . ld b,003h ;cbdb 06 03 . . call sub_c004h ;cbdd cd 04 c0 . . . jp 0c680h ;cbe0 c3 80 c6 . . . sub_cbe3h: ld a,(de) ;cbe3 1a . ld (hl),a ;cbe4 77 w inc de ;cbe5 13 . inc hl ;cbe6 23 # ld a,h ;cbe7 7c | cp 01bh ;cbe8 fe 1b . . jr nz,sub_cbe3h ;cbea 20 f7 . ret ;cbec c9 . sub_cbedh: ld de,00200h ;cbed 11 00 02 . . . lcbf0h: call sub_cd65h ;cbf0 cd 65 cd . e . dec e ;cbf3 1d . jr nz,lcbf0h ;cbf4 20 fa . dec d ;cbf6 15 . jr nz,lcbf0h ;cbf7 20 f7 . ret ;cbf9 c9 . nop ;cbfa 00 . nop ;cbfb 00 . nop ;cbfc 00 . nop ;cbfd 00 . nop ;cbfe 00 . nop ;cbff 00 . call sub_cd00h ;cc00 cd 00 cd . . . ld b,b ;cc03 40 @ call sub_cd80h ;cc04 cd 80 cd . . . ret nz ;cc07 c0 . adc a,000h ;cc08 ce 00 . . adc a,040h ;cc0a ce 40 . @ lcc0ch: cp l ;cc0c bd . inc hl ;cc0d 23 # ccf ;cc0e 3f ? jr nc,lcc30h ;cc0f 30 1f 0 . nop ;cc11 00 . lcc12h: inc bc ;cc12 03 . and e ;cc13 a3 . inc bc ;cc14 03 . inc bc ;cc15 03 . adc a,a ;cc16 8f . nop ;cc17 00 . sub_cc18h: SETENVP: ld a,ENVPF ;cc18 3e 0b > . out (SGBREG),a ;cc1a d3 c3 . . ld a,e ;cc1c 7b { out (SGBOUT),a ;cc1d d3 c2 . . ld a,ENVPC ;cc1f 3e 0c > . out (SGBREG),a ;cc21 d3 c3 . . ld a,d ;cc23 7a z out (SGBOUT),a ;cc24 d3 c2 . . ret ;cc26 c9 . sub_cc27h: ld de,00000h ;cc27 11 00 00 . . . call SETATONE ;cc2a cd 9e cd . . . call SETBTONE ;cc2d cd ad cd . . . lcc30h: call SETCTONE ;cc30 cd d5 cd . . . ld d,01fh ;cc33 16 1f . . call sub_cd25h ;cc35 cd 25 cd . % . ld d,007h ;cc38 16 07 . . call sub_cd2dh ;cc3a cd 2d cd . - . ld d,010h ;cc3d 16 10 . . call sub_cd0dh ;cc3f cd 0d cd . . . call sub_cd15h ;cc42 cd 15 cd . . . call sub_cd1dh ;cc45 cd 1d cd . . . ld de,03800h ;cc48 11 00 38 . . 8 call SETENVP ;cc4b cd 18 cc . . . ld d,000h ;cc4e 16 00 . . call sub_cd35h ;cc50 cd 35 cd . 5 . ret ;cc53 c9 . sub_cc54h: ld de,00000h ;cc54 11 00 00 . . . call SETATONE ;cc57 cd 9e cd . . . call SETBTONE ;cc5a cd ad cd . . . call SETCTONE ;cc5d cd d5 cd . . . call sub_cd1dh ;cc60 cd 1d cd . . . ld d,001h ;cc63 16 01 . . call sub_cd25h ;cc65 cd 25 cd . % . ld d,02eh ;cc68 16 2e . . call sub_cd2dh ;cc6a cd 2d cd . - . ld d,00fh ;cc6d 16 0f . . call sub_cd0dh ;cc6f cd 0d cd . . . ld d,009h ;cc72 16 09 . . call sub_cd15h ;cc74 cd 15 cd . . . ld de,00040h ;cc77 11 40 00 . @ . lcc7ah: call SETATONE ;cc7a cd 9e cd . . . exx ;cc7d d9 . ld d,006h ;cc7e 16 06 . . lcc80h: call sub_cd65h ;cc80 cd 65 cd . e . dec d ;cc83 15 . jr nz,lcc80h ;cc84 20 fa . exx ;cc86 d9 . dec e ;cc87 1d . ld a,e ;cc88 7b { cp 01fh ;cc89 fe 1f . . jr nz,lcc7ah ;cc8b 20 ed . exx ;cc8d d9 . ld d,04bh ;cc8e 16 4b . K lcc90h: call sub_cd65h ;cc90 cd 65 cd . e . dec d ;cc93 15 . jr nz,lcc90h ;cc94 20 fa . exx ;cc96 d9 . ld de,00040h ;cc97 11 40 00 . @ . lcc9ah: call SETATONE ;cc9a cd 9e cd . . . exx ;cc9d d9 . ld d,00ch ;cc9e 16 0c . . lcca0h: call sub_cd65h ;cca0 cd 65 cd . e . dec d ;cca3 15 . jr nz,lcca0h ;cca4 20 fa . exx ;cca6 d9 . dec e ;cca7 1d . ld a,e ;cca8 7b { cp 02fh ;cca9 fe 2f . / jr nz,lcc9ah ;ccab 20 ed . ld de,00030h ;ccad 11 30 00 . 0 . lccb0h: call SETATONE ;ccb0 cd 9e cd . . . exx ;ccb3 d9 . ld d,003h ;ccb4 16 03 . . lccb6h: call sub_cd65h ;ccb6 cd 65 cd . e . dec d ;ccb9 15 . jr nz,lccb6h ;ccba 20 fa . exx ;ccbc d9 . inc e ;ccbd 1c . ld a,e ;ccbe 7b { cp 069h ;ccbf fe 69 . i jr nz,lccb0h ;ccc1 20 ed . ld d,000h ;ccc3 16 00 . . call sub_cd0dh ;ccc5 cd 0d cd . . . call sub_cd15h ;ccc8 cd 15 cd . . . ret ;cccb c9 . sub_cccch: ld de,00000h ;cccc 11 00 00 . . . call SETATONE ;cccf cd 9e cd . . . call sub_cd15h ;ccd2 cd 15 cd . . . call sub_cd1dh ;ccd5 cd 1d cd . . . ld d,03eh ;ccd8 16 3e . > call sub_cd2dh ;ccda cd 2d cd . - . ld d,00fh ;ccdd 16 0f . . call sub_cd0dh ;ccdf cd 0d cd . . . ld de,00030h ;cce2 11 30 00 . 0 . lcce5h: call SETATONE ;cce5 cd 9e cd . . . exx ;cce8 d9 . ld d,00ch ;cce9 16 0c . . lccebh: call sub_cd65h ;cceb cd 65 cd . e . dec d ;ccee 15 . jr nz,lccebh ;ccef 20 fa . exx ;ccf1 d9 . inc e ;ccf2 1c . ld a,e ;ccf3 7b { cp 0c1h ;ccf4 fe c1 . . jr nz,lcce5h ;ccf6 20 ed . call sub_cc27h ;ccf8 cd 27 cc . ' . ret ;ccfb c9 . nop ;ccfc 00 . nop ;ccfd 00 . nop ;ccfe 00 . nop ;ccff 00 . sub_cd00h: jr lcd02h ;cd00 18 00 . . lcd02h: ld b,010h ;cd02 06 10 . . ex af,af' ;cd04 08 . cp 000h ;cd05 fe 00 . . djnz lcd11h ;cd07 10 08 . . cp 000h ;cd09 fe 00 . . djnz $+1 ;cd0b 10 ff . . sub_cd0dh: ld a,AAMP ;cd0d 3e 08 > . out (SGBREG),a ;cd0f d3 c3 . . lcd11h: ld a,d ;cd11 7a z out (SGBOUT),a ;cd12 d3 c2 . . ret ;cd14 c9 . sub_cd15h: ld a,BAMP ;cd15 3e 09 > . out (SGBREG),a ;cd17 d3 c3 . . ld a,d ;cd19 7a z out (SGBOUT),a ;cd1a d3 c2 . . ret ;cd1c c9 . sub_cd1dh: ld a,AAMP ;cd1d 3e 0a > . out (SGBREG),a ;cd1f d3 c3 . . ld a,d ;cd21 7a z out (SGBOUT),a ;cd22 d3 c2 . . ret ;cd24 c9 . sub_cd25h: ld a,CTONF ;cd25 3e 06 > . out (SGBREG),a ;cd27 d3 c3 . . ld a,d ;cd29 7a z out (SGBOUT),a ;cd2a d3 c2 . . ret ;cd2c c9 . sub_cd2dh: ld a,ENABL ;cd2d 3e 07 > . out (SGBREG),a ;cd2f d3 c3 . . ld a,d ;cd31 7a z out (SGBOUT),a ;cd32 d3 c2 . . ret ;cd34 c9 . sub_cd35h: ld a,ENVSP ;cd35 3e 0d > . out (SGBREG),a ;cd37 d3 c3 . . ld a,d ;cd39 7a z out (SGBOUT),a ;cd3a d3 c2 . . ret ;cd3c c9 . rst 38h ;cd3d ff . rst 38h ;cd3e ff . rst 38h ;cd3f ff . djnz lcd42h ;cd40 10 00 . . lcd42h: ld b,008h ;cd42 06 08 . . ex af,af' ;cd44 08 . cp 000h ;cd45 fe 00 . . inc b ;cd47 04 . ex af,af' ;cd48 08 . cp 000h ;cd49 fe 00 . . inc b ;cd4b 04 . ex af,af' ;cd4c 08 . cp 000h ;cd4d fe 00 . . ex af,af' ;cd4f 08 . ex af,af' ;cd50 08 . cp 000h ;cd51 fe 00 . . ex af,af' ;cd53 08 . djnz lcd56h ;cd54 10 00 . . lcd56h: ld b,008h ;cd56 06 08 . . ex af,af' ;cd58 08 . cp 000h ;cd59 fe 00 . . ex af,af' ;cd5b 08 . djnz lcd5eh ;cd5c 10 00 . . lcd5eh: ld b,008h ;cd5e 06 08 . . ex af,af' ;cd60 08 . cp 000h ;cd61 fe 00 . . ex af,af' ;cd63 08 . rst 38h ;cd64 ff . sub_cd65h: push bc ;cd65 c5 . ld c,0deh ;cd66 0e de . . lcd68h: dec c ;cd68 0d . jr nz,lcd68h ;cd69 20 fd . pop bc ;cd6b c1 . ret ;cd6c c9 . lcd6dh: nop ;cd6d 00 . nop ;cd6e 00 . nop ;cd6f 00 . nop ;cd70 00 . nop ;cd71 00 . nop ;cd72 00 . rst 38h ;cd73 ff . rst 38h ;cd74 ff . rst 38h ;cd75 ff . rst 38h ;cd76 ff . rst 38h ;cd77 ff . rst 38h ;cd78 ff . rst 38h ;cd79 ff . rst 38h ;cd7a ff . rst 38h ;cd7b ff . rst 38h ;cd7c ff . rst 38h ;cd7d ff . rst 38h ;cd7e ff . rst 38h ;cd7f ff . sub_cd80h: djnz lcd82h ;cd80 10 00 . . lcd82h: dec b ;cd82 05 . ex af,af' ;cd83 08 . ex af,af' ;cd84 08 . cp 000h ;cd85 fe 00 . . ex af,af' ;cd87 08 . djnz lcd8ah ;cd88 10 00 . . lcd8ah: ld b,008h ;cd8a 06 08 . . ex af,af' ;cd8c 08 . cp 000h ;cd8d fe 00 . . ex af,af' ;cd8f 08 . rst 38h ;cd90 ff . sub_cd91h: push hl ;cd91 e5 . ld h,a ;cd92 67 g and 00fh ;cd93 e6 0f . . add a,h ;cd95 84 . ld l,a ;cd96 6f o ld h,0ceh ;cd97 26 ce & . ld d,(hl) ;cd99 56 V inc hl ;cd9a 23 # ld e,(hl) ;cd9b 5e ^ pop hl ;cd9c e1 . ret ;cd9d c9 . sub_cd9eh: SETATONE: ld a,ATONC ;cd9e 3e 01 > . out (SGBREG),a ;cda0 d3 c3 . . ld a,d ;cda2 7a z out (SGBOUT),a ;cda3 d3 c2 . . ld a,ATONF ;cda5 3e 00 > . out (SGBREG),a ;cda7 d3 c3 . . ld a,e ;cda9 7b { out (SGBOUT),a ;cdaa d3 c2 . . ret ;cdac c9 . sub_cdadh: SETBTONE: ld a,BTONC ;cdad 3e 03 > . out (SGBREG),a ;cdaf d3 c3 . . ld a,d ;cdb1 7a z out (SGBOUT),a ;cdb2 d3 c2 . . ld a,BTONF ;cdb4 3e 02 > . out (SGBREG),a ;cdb6 d3 c3 . . ld a,e ;cdb8 7b { out (SGBOUT),a ;cdb9 d3 c2 . . ret ;cdbb c9 . rst 38h ;cdbc ff . rst 38h ;cdbd ff . rst 38h ;cdbe ff . rst 38h ;cdbf ff . jr lcdc2h ;cdc0 18 00 . . lcdc2h: ld b,010h ;cdc2 06 10 . . jr lcdc6h ;cdc4 18 00 . . lcdc6h: ld b,010h ;cdc6 06 10 . . jr lcdcah ;cdc8 18 00 . . lcdcah: ld b,010h ;cdca 06 10 . . djnz lcdceh ;cdcc 10 00 . . lcdceh: ld b,008h ;cdce 06 08 . . ex af,af' ;cdd0 08 . cp 000h ;cdd1 fe 00 . . ex af,af' ;cdd3 08 . rst 38h ;cdd4 ff . sub_cdd5h: SETCTONE: ld a,CTONC ;cdd5 3e 05 > . out (SGBREG),a ;cdd7 d3 c3 . . ld a,d ;cdd9 7a z out (SGBOUT),a ;cdda d3 c2 . . ld a,CTONF ;cddc 3e 04 > . out (SGBREG),a ;cdde d3 c3 . . ld a,e ;cde0 7b { out (SGBOUT),a ;cde1 d3 c2 . . ret ;cde3 c9 . sub_cde4h: push bc ;cde4 c5 . lcde5h: ld c,0deh ;cde5 0e de . . lcde7h: dec c ;cde7 0d . jr nz,lcde7h ;cde8 20 fd . dec b ;cdea 05 . jr nz,lcde5h ;cdeb 20 f8 . pop bc ;cded c1 . ret ;cdee c9 . sub_cdefh: ld d,000h ;cdef 16 00 . . call sub_cd0dh ;cdf1 cd 0d cd . . . call sub_cd15h ;cdf4 cd 15 cd . . . call sub_cd1dh ;cdf7 cd 1d cd . . . ret ;cdfa c9 . rst 38h ;cdfb ff . rst 38h ;cdfc ff . rst 38h ;cdfd ff . rst 38h ;cdfe ff . rst 38h ;cdff ff . jr lce02h ;ce00 18 00 . . lce02h: ld b,010h ;ce02 06 10 . . ex af,af' ;ce04 08 . cp 000h ;ce05 fe 00 . . djnz lce11h ;ce07 10 08 . . cp 000h ;ce09 fe 00 . . ex af,af' ;ce0b 08 . ex af,af' ;ce0c 08 . cp 000h ;ce0d fe 00 . . ex af,af' ;ce0f 08 . ex af,af' ;ce10 08 . lce11h: cp 000h ;ce11 fe 00 . . djnz $+1 ;ce13 10 ff . . rst 38h ;ce15 ff . rst 38h ;ce16 ff . rst 38h ;ce17 ff . rst 38h ;ce18 ff . rst 38h ;ce19 ff . rst 38h ;ce1a ff . rst 38h ;ce1b ff . rst 38h ;ce1c ff . rst 38h ;ce1d ff . rst 38h ;ce1e ff . rst 38h ;ce1f ff . rst 38h ;ce20 ff . rst 38h ;ce21 ff . rst 38h ;ce22 ff . rst 38h ;ce23 ff . rst 38h ;ce24 ff . rst 38h ;ce25 ff . rst 38h ;ce26 ff . rst 38h ;ce27 ff . rst 38h ;ce28 ff . rst 38h ;ce29 ff . rst 38h ;ce2a ff . rst 38h ;ce2b ff . rst 38h ;ce2c ff . rst 38h ;ce2d ff . rst 38h ;ce2e ff . rst 38h ;ce2f ff . rst 38h ;ce30 ff . rst 38h ;ce31 ff . rst 38h ;ce32 ff . rst 38h ;ce33 ff . rst 38h ;ce34 ff . rst 38h ;ce35 ff . rst 38h ;ce36 ff . rst 38h ;ce37 ff . rst 38h ;ce38 ff . rst 38h ;ce39 ff . rst 38h ;ce3a ff . rst 38h ;ce3b ff . rst 38h ;ce3c ff . rst 38h ;ce3d ff . rst 38h ;ce3e ff . rst 38h ;ce3f ff . jr lce42h ;ce40 18 00 . . lce42h: dec b ;ce42 05 . djnz lce4dh ;ce43 10 08 . . cp 000h ;ce45 fe 00 . . djnz $+26 ;ce47 10 18 . . nop ;ce49 00 . ld b,010h ;ce4a 06 10 . . ex af,af' ;ce4c 08 . lce4dh: cp 000h ;ce4d fe 00 . . djnz $+1 ;ce4f 10 ff . . sub_ce51h: ld a,b ;ce51 78 x cp 000h ;ce52 fe 00 . . jr nz,lce58h ;ce54 20 02 . ld b,003h ;ce56 06 03 . . lce58h: add a,0f0h ;ce58 c6 f0 . . jr nc,lce5eh ;ce5a 30 02 0 . ld b,003h ;ce5c 06 03 . . lce5eh: ret ;ce5e c9 . rst 38h ;ce5f ff . sub_ce60h: push ix ;ce60 dd e5 . . pop de ;ce62 d1 . ld a,e ;ce63 7b { and 007h ;ce64 e6 07 . . cp 007h ;ce66 fe 07 . . jr z,lce6eh ;ce68 28 04 ( . inc e ;ce6a 1c . jp lce72h ;ce6b c3 72 ce . r . lce6eh: ld a,e ;ce6e 7b { and 0f8h ;ce6f e6 f8 . . ld e,a ;ce71 5f _ lce72h: push de ;ce72 d5 . pop ix ;ce73 dd e1 . . ret ;ce75 c9 . rst 38h ;ce76 ff . rst 38h ;ce77 ff . rst 38h ;ce78 ff . rst 38h ;ce79 ff . rst 38h ;ce7a ff . rst 38h ;ce7b ff . rst 38h ;ce7c ff . rst 38h ;ce7d ff . rst 38h ;ce7e ff . rst 38h ;ce7f ff . lce80h: call sub_c360h ;ce80 cd 60 c3 . ` . jp lc18eh ;ce83 c3 8e c1 . . . rst 38h ;ce86 ff . rst 38h ;ce87 ff . rst 38h ;ce88 ff . rst 38h ;ce89 ff . rst 38h ;ce8a ff . rst 38h ;ce8b ff . rst 38h ;ce8c ff . rst 38h ;ce8d ff . rst 38h ;ce8e ff . rst 38h ;ce8f ff . rst 38h ;ce90 ff . rst 38h ;ce91 ff . rst 38h ;ce92 ff . rst 38h ;ce93 ff . rst 38h ;ce94 ff . rst 38h ;ce95 ff . rst 38h ;ce96 ff . rst 38h ;ce97 ff . rst 38h ;ce98 ff . rst 38h ;ce99 ff . rst 38h ;ce9a ff . rst 38h ;ce9b ff . rst 38h ;ce9c ff . rst 38h ;ce9d ff . rst 38h ;ce9e ff . rst 38h ;ce9f ff . rst 38h ;cea0 ff . rst 38h ;cea1 ff . inc bc ;cea2 03 . ld d,a ;cea3 57 W ld (bc),a ;cea4 02 . jp m,0a702h ;cea5 fa 02 a7 . . . ld (bc),a ;cea8 02 . add a,c ;cea9 81 . ld (bc),a ;ceaa 02 . dec sp ;ceab 3b ; ld bc,001fch ;ceac 01 fc 01 . . . push bc ;ceaf c5 . rst 38h ;ceb0 ff . rst 38h ;ceb1 ff . ld bc,001ach ;ceb2 01 ac 01 . . . ld a,l ;ceb5 7d } ld bc,00153h ;ceb6 01 53 01 . S . ld b,b ;ceb9 40 @ ld bc,0001dh ;ceba 01 1d 00 . . . cp 000h ;cebd fe 00 . . jp po,0ffffh ;cebf e2 ff ff . . . nop ;cec2 00 . sub 000h ;cec3 d6 00 . . cp (hl) ;cec5 be . nop ;cec6 00 . xor d ;cec7 aa . nop ;cec8 00 . and b ;cec9 a0 . nop ;ceca 00 . adc a,a ;cecb 8f . nop ;cecc 00 . ld a,a ;cecd 7f  nop ;cece 00 . ld (hl),c ;cecf 71 q rst 38h ;ced0 ff . rst 38h ;ced1 ff . inc bc ;ced2 03 . daa ;ced3 27 ' ld (bc),a ;ced4 02 . rst 8 ;ced5 cf . ld (bc),a ;ced6 02 . and a ;ced7 a7 . ld (bc),a ;ced8 02 . ld e,l ;ced9 5d ] ld (bc),a ;ceda 02 . dec de ;cedb 1b . ld bc,001e0h ;cedc 01 e0 01 . . . push bc ;cedf c5 . rst 38h ;cee0 ff . rst 38h ;cee1 ff . ld bc,00194h ;cee2 01 94 01 . . . ld l,b ;cee5 68 h ld bc,00153h ;cee6 01 53 01 . S . ld l,001h ;cee9 2e 01 . . dec c ;ceeb 0d . nop ;ceec 00 . ret p ;ceed f0 . nop ;ceee 00 . jp po,0ffffh ;ceef e2 ff ff . . . nop ;cef2 00 . jp z,0b400h ;cef3 ca 00 b4 . . . nop ;cef6 00 . xor d ;cef7 aa . nop ;cef8 00 . sub a ;cef9 97 . nop ;cefa 00 . add a,a ;cefb 87 . nop ;cefc 00 . ld a,b ;cefd 78 x nop ;cefe 00 . ld (hl),c ;ceff 71 q or c ;cf00 b1 . or l ;cf01 b5 . pop bc ;cf02 c1 . or l ;cf03 b5 . jp 0ffb5h ;cf04 c3 b5 ff . . . rst 38h ;cf07 ff . and (hl) ;cf08 a6 . or (hl) ;cf09 b6 . pop bc ;cf0a c1 . or (hl) ;cf0b b6 . jp 0ffb6h ;cf0c c3 b6 ff . . . rst 38h ;cf0f ff . or d ;cf10 b2 . or (hl) ;cf11 b6 . jp nz,0c4b6h ;cf12 c2 b6 c4 . . . or (hl) ;cf15 b6 . rst 38h ;cf16 ff . rst 38h ;cf17 ff . and l ;cf18 a5 . or l ;cf19 b5 . or a ;cf1a b7 . or l ;cf1b b5 . call nz,0ffb5h ;cf1c c4 b5 ff . . . rst 38h ;cf1f ff . and e ;cf20 a3 . push hl ;cf21 e5 . or a ;cf22 b7 . push hl ;cf23 e5 . jp 0ffe5h ;cf24 c3 e5 ff . . . rst 38h ;cf27 ff . and e ;cf28 a3 . push hl ;cf29 e5 . jp nz,lc3e5h ;cf2a c2 e5 c3 . . . push hl ;cf2d e5 . rst 38h ;cf2e ff . rst 38h ;cf2f ff . and e ;cf30 a3 . or l ;cf31 b5 . or a ;cf32 b7 . or l ;cf33 b5 . jp 0ffb5h ;cf34 c3 b5 ff . . . rst 38h ;cf37 ff . or h ;cf38 b4 . or (hl) ;cf39 b6 . pop bc ;cf3a c1 . or (hl) ;cf3b b6 . call nz,0ffb6h ;cf3c c4 b6 ff . . . rst 38h ;cf3f ff . or c ;cf40 b1 . and 0c1h ;cf41 e6 c1 . . and 0c3h ;cf43 e6 c3 . . and 0ffh ;cf45 e6 ff . . rst 38h ;cf47 ff . and l ;cf48 a5 . or l ;cf49 b5 . or a ;cf4a b7 . or l ;cf4b b5 . push bc ;cf4c c5 . or l ;cf4d b5 . rst 38h ;cf4e ff . rst 38h ;cf4f ff . and (hl) ;cf50 a6 . push hl ;cf51 e5 . pop af ;cf52 f1 . push hl ;cf53 e5 . push bc ;cf54 c5 . push hl ;cf55 e5 . rst 38h ;cf56 ff . rst 38h ;cf57 ff . or d ;cf58 b2 . or (hl) ;cf59 b6 . pop bc ;cf5a c1 . or (hl) ;cf5b b6 . call p,0ffb6h ;cf5c f4 b6 ff . . . rst 38h ;cf5f ff . or e ;cf60 b3 . or (hl) ;cf61 b6 . pop af ;cf62 f1 . or (hl) ;cf63 b6 . jp 0ffb6h ;cf64 c3 b6 ff . . . rst 38h ;cf67 ff . or d ;cf68 b2 . or (hl) ;cf69 b6 . pop bc ;cf6a c1 . or (hl) ;cf6b b6 . call p,0ffb6h ;cf6c f4 b6 ff . . . rst 38h ;cf6f ff . or c ;cf70 b1 . and 0f2h ;cf71 e6 f2 . . and 0c5h ;cf73 e6 c5 . . and 0ffh ;cf75 e6 ff . . rst 38h ;cf77 ff . or d ;cf78 b2 . or (hl) ;cf79 b6 . pop bc ;cf7a c1 . or (hl) ;cf7b b6 . call nz,0ffb6h ;cf7c c4 b6 ff . . . rst 38h ;cf7f ff . or c ;cf80 b1 . or l ;cf81 b5 . pop bc ;cf82 c1 . or l ;cf83 b5 . jp 0c1b5h ;cf84 c3 b5 c1 . . . or l ;cf87 b5 . and (hl) ;cf88 a6 . or (hl) ;cf89 b6 . pop bc ;cf8a c1 . or (hl) ;cf8b b6 . jp lc1b6h ;cf8c c3 b6 c1 . . . or (hl) ;cf8f b6 . or d ;cf90 b2 . or (hl) ;cf91 b6 . jp nz,0c4b6h ;cf92 c2 b6 c4 . . . or (hl) ;cf95 b6 . jp nz,0a5b6h ;cf96 c2 b6 a5 . . . or l ;cf99 b5 . or a ;cf9a b7 . or l ;cf9b b5 . call nz,0b7b5h ;cf9c c4 b5 b7 . . . or l ;cf9f b5 . and e ;cfa0 a3 . push hl ;cfa1 e5 . or a ;cfa2 b7 . push hl ;cfa3 e5 . jp 0b7e5h ;cfa4 c3 e5 b7 . . . push hl ;cfa7 e5 . and e ;cfa8 a3 . push hl ;cfa9 e5 . jp nz,lc3e5h ;cfaa c2 e5 c3 . . . push hl ;cfad e5 . jp nz,0a3e5h ;cfae c2 e5 a3 . . . or l ;cfb1 b5 . or a ;cfb2 b7 . or l ;cfb3 b5 . jp 0b7b5h ;cfb4 c3 b5 b7 . . . or l ;cfb7 b5 . or h ;cfb8 b4 . or (hl) ;cfb9 b6 . pop bc ;cfba c1 . or (hl) ;cfbb b6 . call nz,lc1b6h ;cfbc c4 b6 c1 . . . or (hl) ;cfbf b6 . or c ;cfc0 b1 . and 0c1h ;cfc1 e6 c1 . . and 0c3h ;cfc3 e6 c3 . . and 01ch ;cfc5 e6 c1 . . and 0a5h ;cfc7 e6 a5 . . or l ;cfc9 b5 . or a ;cfca b7 . or l ;cfcb b5 . push bc ;cfcc c5 . or l ;cfcd b5 . or a ;cfce b7 . or l ;cfcf b5 . and (hl) ;cfd0 a6 . push hl ;cfd1 e5 . pop af ;cfd2 f1 . push hl ;cfd3 e5 . push bc ;cfd4 c5 . push hl ;cfd5 e5 . pop af ;cfd6 f1 . push hl ;cfd7 e5 . or d ;cfd8 b2 . or (hl) ;cfd9 b6 . pop bc ;cfda c1 . or (hl) ;cfdb b6 . call p,lc1b6h ;cfdc f4 b6 c1 . . . or (hl) ;cfdf b6 . or e ;cfe0 b3 . or (hl) ;cfe1 b6 . pop af ;cfe2 f1 . or (hl) ;cfe3 b6 . jp 0f1b6h ;cfe4 c3 b6 f1 . . . or (hl) ;cfe7 b6 . or d ;cfe8 b2 . or (hl) ;cfe9 b6 . pop bc ;cfea c1 . or (hl) ;cfeb b6 . call p,lc1b6h ;cfec f4 b6 c1 . . . or (hl) ;cfef b6 . or c ;cff0 b1 . and 0f2h ;cff1 e6 f2 . . and 0c5h ;cff3 e6 c5 . . and 0f2h ;cff5 e6 f2 . . and 0b2h ;cff7 e6 b2 . . or (hl) ;cff9 b6 . pop bc ;cffa c1 . or (hl) ;cffb b6 . call nz,lc1b6h ;cffc c4 b6 c1 . . . or (hl) ;cfff b6 .