; z80dasm 1.1.5 ; command line: z80dasm --labels --origin=0x8000 --block-def=SP180_rom_blocks.txt --sym-input=SP180_rom_symbols_in.txt --sym-output=SP180_rom_symbols_out.txt SP180_rom.bin org 08000h data_b3f8: equ 0xb3f8 reset: di ld a,080h ld bc,0003ah out (c),a ld a,068h ld bc,00038h out (c),a ld sp,0ffffh call sub_8015h sub_8015h: ld sp,013ffh jp data_8300h_end l801bh: adc a,h ld (00302h),a nop dec b inc h ld bc,03600h ld (bc),a inc (hl) adc a,a inc c nop dec c sub b ld c,000h rrca ld de,0ff10h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h rst 38h ; BLOCK 'vectors_maybe' (start 0x8040 end 0x8052) vectors_maybe_start: defw vectors_maybe_end defw sub_8015h defw handler_805ch defw sub_8015h defw sub_8015h defw sub_8015h defw sub_8015h defw sub_8015h defw sub_8015h vectors_maybe_end: push af ld a,0ffh ld (001f6h),a pop af ei reti handler_805ch: di ex af,af' exx push ix push iy xor a ; BLOCK 'Z180_code_8064' (start 0x8064 end 0x8066) Z180_code_8064_start: defb 0edh defb 039h Z180_code_8064_end: nop ld ix,0061ah ld de,(00618h) l806fh: ld a,e or d jr nz,l808eh l8073h: ld a,010h ; BLOCK 'Z180_code_8075' (start 0x8075 end 0x8077) Z180_code_8075_start: defb 0edh defb 039h Z180_code_8075_end: nop ld bc,00010h in e,(c) ld bc,0000ch in e,(c) inc bc in e,(c) pop iy pop ix exx ex af,af' ei reti l808eh: ld l,(ix+000h) inc ix ld h,(ix+000h) inc ix ld a,l or h jr nz,l80b2h push de l809dh: pop bc push ix ld de,0061ah ld hl,00100h add hl,de ex de,hl pop hl xor a sbc hl,de jr nc,l8073h ld e,c ld d,b jr l806fh l80b2h: dec de push de push hl pop iy ld l,(iy+014h) ld h,(iy+015h) ld a,l or h jp z,l81bfh dec hl ld (iy+014h),l ld (iy+015h),h jr l809dh l80cbh: ld l,(iy+001h) bit 0,l jp nz,l816ah ld l,(iy+000h) ld bc,02000h out (c),l bit 6,l jr nz,l80f7h ld bc,02003h in a,(c) cpl ld d,a ld e,000h and 03eh ld c,000h ld a,0ffh out (c),a jr z,l809dh ld (iy+003h),d jr l810dh l80f7h: ld bc,02005h in a,(c) cpl ld e,a ld d,000h and 03eh ld c,000h ld a,0ffh out (c),a jr z,l809dh ld (iy+003h),e l810dh: ld a,e and 0ffh jr z,l8119h and 028h jp z,l809dh jr l811fh l8119h: ld a,d and 028h jp z,l809dh l811fh: bit 6,(iy+001h) jr z,l8130h and 008h jp z,l809dh set 0,(iy+002h) jr l816ah l8130h: and 020h jp z,l809dh set 0,(iy+002h) jr l816ah cp 018h jr z,l8150h cp 010h jr z,l815eh ld a,e and 0ffh jr z,l8149h ld a,d l8149h: bit 1,a jr nz,l816ah jp l809dh l8150h: ld a,e and 0ffh jp z,l8157h ld a,d l8157h: and 014h jr nz,l816ah jp l809dh l815eh: ld a,e and 0ffh jp z,l8165h ld a,d l8165h: and 028h jp z,l809dh l816ah: ld e,(iy+00ah) ld (iy+00ah),000h ld d,(iy+00bh) ld (iy+00bh),000h ld l,(iy+00ch) ld (iy+00ch),000h ld h,(iy+00dh) ld (iy+00dh),000h ld (iy+00eh),e ld (iy+00fh),d ld (iy+010h),l ld (iy+011h),h ld hl,0096ch ld e,(hl) inc hl ld d,(hl) bit 7,(iy+001h) jr z,l81a4h ld a,e ld e,a ld a,d ld d,a jr l81a8h l81a4h: ld a,e ld e,a ld a,d ld d,a l81a8h: call sub_825eh ld (ix-001h),000h ld (ix-002h),000h ld bc,(00618h) dec bc ld (00618h),bc jp l809dh l81bfh: ld l,(iy+00ah) ld h,(iy+00bh) ld c,(iy+00ch) ld b,(iy+00dh) ld a,l or h jr z,l81d2h dec hl jr l81fch l81d2h: ld a,c or b jr nz,l81fah ld l,(iy+000h) ld bc,02000h out (c),l bit 6,l jr nz,l81e7h ld bc,02003h jr l81eah l81e7h: ld bc,02005h l81eah: in a,(c) cpl ld d,a ld c,000h ld a,0ffh out (c),a ld (iy+003h),d jp l816ah l81fah: dec hl dec bc l81fch: ld (iy+00ah),l ld (iy+00bh),h ld (iy+00ch),c ld (iy+00dh),b ld (iy+00eh),l ld (iy+00fh),h ld (iy+010h),c ld (iy+011h),b ld l,(iy+006h) ld h,(iy+007h) bit 6,(iy+001h) jr z,l822fh l8220h: ld e,(hl) inc hl ld d,(hl) ld a,e or d jr nz,l823fh inc hl ld e,(hl) inc hl ld d,(hl) sbc hl,de jr l8220h l822fh: dec hl ld d,(hl) dec hl ld e,(hl) ld a,e or d jr nz,l8240h dec hl ld d,(hl) dec hl ld e,(hl) add hl,de inc hl jr l822fh l823fh: inc hl l8240h: ld (iy+006h),l ld (iy+007h),h ld hl,0096ch ld (hl),e inc hl ld (hl),d call sub_825eh ld e,(iy+008h) ld d,(iy+009h) ld (iy+014h),e ld (iy+015h),d jp l80cbh sub_825eh: bit 7,(iy+001h) ld a,(iy+000h) ld bc,02001h jr nz,l8278h bit 6,a jr nz,l8272h out (c),e jr l827eh l8272h: inc bc out (c),e dec bc jr l827eh l8278h: out (c),e inc bc out (c),d dec bc l827eh: dec bc out (c),a ld a,0ffh out (c),a ret ; BLOCK 'data_null_1' (start 0x8286 end 0x8300) data_null_1_start: defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h data_null_1_end: ; BLOCK 'data_8300h' (start 0x8300 end 0x84fc) data_8300h_start: defw 00009h defw 00000h data_8304h: data_8312h: data_8326h: defw 0003eh defw 0001fh defw 0004eh defw 00000h defw 00009h defw 0000fh defw 00000h data_8312h: defw 0003eh defw 0003fh defw 0001fh defw 0005fh defw 0004eh defw 0007eh defw 00000h defw 0000fh defw 0000bh defw 00000h data_8326h: defw 0006fh defw 00077h defw 000d7h defw 000cfh defw 00000h defw 0000bh defw 00013h defw 00000h data_8336h: defw 0003eh defw 000beh defw 0009eh defw 000deh defw 0005eh defw 0005fh defw 0001fh defw 0003fh defw 00000h defw 00013h defw 00023h defw 00000h data_834eh: defw 0003eh defw 000aeh defw 000beh defw 000bah defw 0009eh defw 000dah defw 000deh defw 000ceh defw 0005eh defw 0004fh defw 0005fh defw 0005bh defw 0001fh defw 0003bh defw 0003fh defw 0002fh defw 00000h defw 00023h defw 0000dh defw 00000h data_8376h: defw 00003h defw 00001h defw 00011h defw 00010h defw 00012h defw 00000h defw 0000dh defw 00017h defw 00000h data_8388h: defw 00003h defw 0000dh defw 00001h defw 00071h defw 00011h defw 00290h defw 00010h defw 0001eh defw 00012h defw 00062h defw 00000h defw 00017h defw 0002bh defw 00000h data_83a4h: defw 00003h defw 0000bh defw 0000dh defw 00009h defw 00001h defw 00041h defw 00071h defw 00051h defw 00011h defw 00211h defw 00290h defw 00210h defw 00010h defw 00018h defw 0001eh defw 0001ah defw 00012h defw 00052h defw 00062h defw 00042h defw 00000h defw 0002bh defw 0000bh defw 00000h data_83d4h: defw 00003h defw 00001h defw 00011h defw 00010h defw 00410h defw 00412h defw 00402h defw 00403h defw 00000h defw 0000bh defw 00023h defw 00000h data_83ech: defw 00003h defw 0000dh defw 00001h defw 00071h defw 00011h defw 00290h defw 00010h defw 01c10h defw 00410h defw 0041eh defw 00412h defw 00462h defw 00402h defw 00683h defw 00403h defw 01803h defw 00000h defw 00023h defw 00043h defw 00000h data_8414h: defw 00003h defw 0000bh defw 0000dh defw 00009h defw 00001h defw 00041h defw 00071h defw 00051h defw 00011h defw 00211h defw 00290h defw 00090h defw 00010h defw 01010h defw 01c10h defw 01410h defw 00410h defw 00418h defw 0041eh defw 0041ah defw 00412h defw 00452h defw 00462h defw 00442h defw 00402h defw 00602h defw 00683h defw 00603h defw 00403h defw 01403h defw 01803h defw 01003h defw 00000h defw 00043h defw 00017h defw 00000h data_845ch: defw 00060h defw 00160h defw 00140h defw 00144h defw 00104h defw 00904h defw 00804h defw 00824h defw 00820h defw 00860h defw 00000h defw 00017h defw 0002bh defw 00000h data_8478h: defw 00060h defw 00660h defw 00160h defw 041c0h defw 00140h defw 00158h defw 00144h defw 00107h defw 00104h defw 03104h defw 00904h defw 00e04h defw 00804h defw 04884h defw 00824h defw 00838h defw 00820h defw 00823h defw 00860h defw 03060h defw 00000h defw 0002bh defw 00053h defw 00000h data_84a8h: defw 00060h defw 00260h defw 00660h defw 00360h defw 00160h defw 001e0h defw 041c0h defw 001c0h defw 00140h defw 00148h defw 00158h defw 0014ch defw 00144h defw 00145h defw 00107h defw 00105h defw 00104h defw 01104h defw 03104h defw 01904h defw 00904h defw 00b04h defw 00e04h defw 00a04h defw 00804h defw 00884h defw 04884h defw 008a4h defw 00824h defw 0082ch defw 00838h defw 00828h defw 00820h defw 00821h defw 00823h defw 00861h defw 00860h defw 01860h defw 03060h defw 01060h defw 00000h defw 00053h data_8300h_end: initilise_high: ld hl,00618h xor a ld (hl),a inc hl ld (hl),a ld hl,l801bh ld a,016h ld b,000h output_loop: ld e,(hl) inc hl ld c,(hl) out (c),e inc hl sub 002h jr nz,output_loop ld bc,00033h ld de,vectors_maybe_start ld a,d ld i,a out (c),e ld hl,00000h ld bc,02000h loop_8525h: xor a ld (hl),a inc hl dec bc ld a,c or b jr nz,loop_8525h jp data_null_2_end push af push bc push de push hl push ix push iy ld hl,0000eh add hl,sp push hl dec hl ld ix,00300h ld e,010h print_hex_byte_at_hl: ld d,(hl) call print_hex_byte dec hl bit 0,e call nz,print_space dec e jr nz,print_hex_byte_at_hl ld d,00ah call print_char_in_acc ld d,00dh call print_char_in_acc pop iy pop iy pop ix pop hl pop de pop bc pop af ret print_space: ld d,020h jr print_char_in_acc print_hex_byte: push de ld a,d srl a srl a srl a srl a cp 00ah jr c,print_hex_nibble add a,007h print_hex_nibble: add a,030h ld d,a call print_char_in_acc pop de ld a,d and 00fh cp 00ah jr c,print_hex_digit add a,007h print_hex_digit: add a,030h ld d,a print_char_in_acc: ld bc,00005h l8590h: in a,(c) bit 1,a jr z,l8590h inc bc inc bc out (c),d ret ld hl,asciitext_start print_asciiz_at_hl: ld a,(hl) cp 000h ret z ld d,a call print_char_in_acc inc hl jr print_asciiz_at_hl ; BLOCK 'asciitext' (start 0x85a9 end 0x85d4) asciitext_start: defb 052h defb 065h defb 074h defb 06eh defb 020h defb 020h defb 061h defb 066h defb 020h defb 020h defb 020h defb 062h defb 063h defb 020h defb 020h defb 020h defb 064h defb 065h defb 020h defb 020h defb 020h defb 068h defb 06ch defb 020h defb 020h defb 020h defb 069h defb 078h defb 020h defb 020h defb 020h defb 069h defb 079h defb 020h defb 020h defb 073h defb 070h defb 02dh defb 062h defb 034h defb 00ah defb 00dh defb 000h asciitext_end: ; BLOCK 'version_string' (start 0x85d4 end 0x85e1) version_string_start: defb 056h defb 065h defb 072h defb 073h defb 069h defb 06fh defb 06eh defb 020h defb 032h defb 02eh defb 031h defb 032h defb 000h version_string_end: ; BLOCK 'data_null_2' (start 0x85e1 end 0x8600) data_null_2_start: defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h defb 000h data_null_2_end: jp 0a73eh l8603h: ld de,0fffch call sub_b269h ld hl,01ffbh ld (00616h),hl ld hl,(00616h) ld e,(hl) inc hl ld d,(hl) ld hl,06789h call exit_with_hl_and_a_one_dup jp z,l8624h call sub_885ch jp l8649h l8624h: ld hl,00618h ld (0065ah),hl l862ah: ld hl,00000h push hl ld hl,(0065ah) inc hl inc hl ld (0065ah),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,(0065ah) ld de,0065ah ex de,hl call sub_b370h jp nz,l862ah l8649h: ld hl,00000h ld (00616h),hl ld hl,sub_abcch+1 push hl ld hl,(00616h) pop de ld (hl),e inc hl ld (hl),d ld hl,00100h ld (0065ch),hl ld (0065eh),hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl ld hl,00000h push hl ld hl,(0065eh) pop de ld (hl),e inc hl ld (hl),d ei l8677h: ld hl,(00660h) ld a,(hl) inc hl or (hl) jp nz,l8683h jp l8677h l8683h: ld hl,00000h ld (0065ch),hl ld (0065eh),hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00008h add hl,sp ld a,(hl) inc hl or (hl) jp z,data_881ah_end ld hl,00008h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00800h call sub_b37dh jp z,data_881ah_end ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ex de,hl jp function_8804 function_86cb: call sub_a29eh ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_86e2: call sub_a217h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_86f9: call sub_8ecfh ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_8710: call sub_8fd5h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_8727: call sub_a6a2h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_873e: ld hl,00008h add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_9161h pop de ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_875e: call sub_9645h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_8775: call sub_a580h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_878c: call sub_8cf7h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_87a3: call sub_9d06h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_87ba: call sub_a16eh ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_87d1: call sub_a669h ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_87e8: ld hl,0003fh push hl call sub_8bb6h pop de ld hl,00000h ld (0065ch),hl ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp data_881ah_end function_8804: ld de,0ffbfh add hl,de ex de,hl ld hl,0ffe8h add hl,de jp c,function_87e8 function_8810: ld hl,data_881ah add hl,de add hl,de ld e,(hl) inc hl ld d,(hl) ex de,hl jp (hl) data_881ah: ; BLOCK 'data_881ah' (start 0x881a end 0x884a) data_881ah_start: defw 086cbh defw 087e8h defw 087e8h defw 086e2h defw 086f9h defw 087e8h defw 08710h defw 08727h defw 0873eh defw 087e8h defw 087e8h defw 087e8h defw 0875eh defw 087e8h defw 08775h defw 0878ch defw 087e8h defw 087a3h defw 087bah defw 087e8h defw 087e8h defw 087e8h defw 087e8h defw 087d1h data_881ah_end: ld hl,00000h push hl ld hl,(00660h) pop de ld (hl),e inc hl ld (hl),d call sub_a635h jp l8677h ret sub_885ch: ld de,0fff5h call sub_b269h ld hl,00000h ld (00662h),hl ex de,hl ld hl,0000fh add hl,sp ld (hl),e inc hl ld (hl),d jp l8b2eh l8873h: ld hl,0000fh add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,02000h push hl ld a,(00664h) ld l,a ld h,000h push hl call sub_b39bh pop de pop de ld hl,0000fh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00001h call hl_and_with_de jp z,l8980h ld hl,02005h push hl call sub_b38bh pop de ex de,hl ld hl,0000ah add hl,sp ld (hl),e ld d,000h ld hl,000c0h call hl_and_with_de ld de,00040h call sub_b2e1h jp z,l897dh ld a,(00664h) ld l,a ld h,000h ld de,000ffh call hl_and_with_de ld de,04200h call hl_or_with_de push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp ld e,(hl) ld d,000h ld hl,00008h call sub_b223h call sub_b250h push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0ff00h call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,data_8326h push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,data_8326h ex de,hl ld hl,0000dh add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0000dh add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0000bh add hl,sp ld (hl),e inc hl ld (hl),d ld hl,(00662h) inc hl ld (00662h),hl ld hl,02002h push hl ld hl,0000fh add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl ld e,(hl) inc hl ld d,(hl) push de call sub_b39bh pop de pop de l897dh: jp l8b12h l8980h: ld hl,02003h push hl call sub_b38bh pop de ex de,hl ld hl,0000ah add hl,sp ld (hl),e ld d,000h ld hl,00041h call hl_and_with_de ld de,00040h call sub_b2e1h jp z,l8a61h ld a,(00664h) ld l,a ld h,000h ld de,000ffh call hl_and_with_de ld de,04200h call hl_or_with_de push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp ld e,(hl) ld d,000h ld hl,00008h call sub_b223h call sub_b250h push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0ff00h call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,data_8326h push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,data_8326h ex de,hl ld hl,0000dh add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0000dh add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0000bh add hl,sp ld (hl),e inc hl ld (hl),d ld hl,(00662h) inc hl ld (00662h),hl ld hl,02001h push hl ld hl,0000fh add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl ld e,(hl) inc hl ld d,(hl) push de call sub_b39bh pop de pop de jp l8b12h l8a61h: ld hl,02003h push hl call sub_b38bh pop de ld de,00041h call hl_and_with_de ld de,00001h call sub_b2e1h jp z,l8b12h ld a,(00664h) ld l,a ld h,000h ld de,000ffh call hl_and_with_de ld de,0c400h call hl_or_with_de push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp ld e,(hl) ld d,000h ld hl,00008h call sub_b223h call sub_b250h push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0ff00h call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,data_8478h push hl ld hl,(00662h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00662h) inc hl ld (00662h),hl ld hl,02001h push hl ld hl,0ffffh push hl call sub_b3aah pop de pop de l8b12h: ld hl,02000h push hl ld hl,000ffh push hl call sub_b39bh pop de pop de ld hl,0000fh add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l8b2eh: ld hl,(00662h) ld de,00020h ex de,hl call sub_b31bh jp z,l8b4bh ld hl,0000fh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,000feh call sub_b370h jp nz,l8873h l8b4bh: ld hl,001f0h ld (0065ch),hl ld hl,(00662h) ld a,h or l jp z,l8b9fh ld hl,(00662h) push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00666h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00018h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld (00660h),hl jp l8baah l8b9fh: ld hl,00000h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d l8baah: ld hl,06789h push hl ld hl,(00616h) pop de ld (hl),e inc hl ld (hl),d ret sub_8bb6h: ld de,0fffeh call sub_b269h ld hl,00100h ld (0065ch),hl ld (0065eh),hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl l8bcdh: ld hl,(0065eh) ld a,(hl) inc hl or (hl) jp z,l8bd9h jp l8bcdh l8bd9h: ld hl,00055h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0000eh add hl,sp ld e,(hl) ld d,000h push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065eh) pop de ld (hl),e inc hl ld (hl),d ret sub_8c18h: ld de,0fffeh call sub_b269h ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00081h call hl_and_with_de ld b,h ld c,l ld h,b ld l,c ld de,00080h call hl_and_with_de push hl ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,0007eh call hl_and_with_de ld de,00001h ex de,hl call sub_b209h pop de call hl_or_with_de ex de,hl ld hl,0000eh add hl,sp ld (hl),e inc hl ld (hl),d ld h,b ld l,c ld de,00001h call hl_and_with_de jp z,l8c76h ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00040h call hl_or_with_de ex de,hl ld hl,0000eh add hl,sp ld (hl),e inc hl ld (hl),d l8c76h: ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl ld a,l ld (00664h),a ret sub_8c83h: ld de,0fffeh call sub_b269h ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld b,d ld c,e ld h,b ld l,c ld de,00080h call hl_and_with_de push hl ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,0003fh call hl_and_with_de add hl,hl pop de call hl_or_with_de ex de,hl ld hl,0000eh add hl,sp ld (hl),e inc hl ld (hl),d ld h,b ld l,c ld de,00040h call hl_and_with_de jp z,l8cd5h ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00001h call hl_or_with_de ex de,hl ld hl,0000eh add hl,sp ld (hl),e inc hl ld (hl),d l8cd5h: ld h,b ld l,c ld de,0ff00h call hl_and_with_de ex de,hl ld hl,0000eh add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a call hl_or_with_de ret l8cea_unused: ld de,0fffeh call sub_b269h ld hl,00000h add hl,sp ld a,l or h ret sub_8cf7h: ld de,0fff2h call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,0000eh add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,00004h call exit_with_hl_and_a_one_dup jp z,l8d35h ld hl,0004ch push hl call sub_8bb6h pop de ret l8d35h: ld hl,00000h ex de,hl ld hl,0000ch add hl,sp ld (hl),e inc hl ld (hl),d jp l8d52h l8d43h: ld hl,0000ch add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l8d52h: ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b37dh jp z,l8d8ah ld a,(00664h) ld l,a ld h,000h push hl ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call exit_with_hl_and_a_one_dup jp nz,l8d43h l8d8ah: ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b36fh jp z,l8da3h ld hl,00043h push hl call sub_8bb6h pop de ret l8da3h: ld hl,00100h ld (0065ch),hl ld (0065eh),hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl l8db4h: ld hl,(0065eh) ld a,(hl) inc hl or (hl) jp z,l8dc0h jp l8db4h l8dc0h: ld hl,00050h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld a,(hl) inc hl or (hl) jp z,l8e05h ld hl,00000h jp l8e08h l8e05h: ld hl,00001h l8e08h: ld de,00100h call hl_and_with_de jp z,l8e5ah ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de ld a,(hl) inc hl or (hl) jp z,l8e2eh ld hl,00000h jp l8e31h l8e2eh: ld hl,00001h l8e31h: ld de,00001h call hl_and_with_de jp z,l8e5ah ld hl,00010h add hl,sp push hl ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00670h add hl,de call sub_ae95h pop hl call sub_aea7h jp l8e77h l8e5ah: ld hl,00010h add hl,sp push hl ld hl,0000eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00674h add hl,de call sub_ae95h pop hl call sub_aea7h l8e77h: ld hl,(0065ch) ex de,hl ld hl,00014h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00014h add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a ld de,00004h add hl,de ex de,hl pop hl ld (hl),e inc hl ld (hl),d ex de,hl ld de,0fffch add hl,de push hl ld hl,00012h add hl,sp call sub_ae95h pop hl call sub_aea7h ld hl,00014h add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl ld (0065ch),hl ld hl,00014h add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_ae8eh inc b nop nop nop pop hl call sub_aea7h ld hl,00006h push hl ld hl,(0065eh) pop de ld (hl),e inc hl ld (hl),d ret sub_8ecfh: ld de,0fff6h call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,0000ch add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,00004h call exit_with_hl_and_a_one_dup jp z,l8f0dh ld hl,00045h push hl call sub_8bb6h pop de ret l8f0dh: ld hl,00000h ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d jp l8f2ah l8f1bh: ld hl,0000ah add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l8f2ah: ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b37dh jp z,l8f62h ld a,(00664h) ld l,a ld h,000h push hl ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call exit_with_hl_and_a_one_dup jp nz,l8f1bh l8f62h: ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b36fh jp z,l8f7bh ld hl,00043h push hl call sub_8bb6h pop de ret l8f7bh: ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00678h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,00100h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ret sub_8fd5h: ld de,0fffah call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,000feh call sub_b37eh jp z,l9008h ld hl,0003eh push hl call sub_8bb6h pop de ret l9008h: ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,00000h ex de,hl ld hl,0000ch add hl,sp ld (hl),e inc hl ld (hl),d jp l9031h l9022h: ld hl,0000ch add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l9031h: ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b37dh jp z,l9069h ld a,(00664h) ld l,a ld h,000h push hl ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call exit_with_hl_and_a_one_dup jp nz,l9022h l9069h: ld a,(00664h) or a jp nz,l9092h ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de ld a,(hl) inc hl or (hl) jp nz,l9092h ld hl,00021h ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d l9092h: ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b36fh jp z,l9106h ld hl,00100h ld (0065ch),hl l90a8h: ld hl,(0065ch) ld a,(hl) inc hl or (hl) jp z,l90b4h jp l90a8h l90b4h: ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00041h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,000ffh push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ld hl,(0065ch) ld de,0fffah add hl,de ld (0065ch),hl ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ret l9106h: ld hl,00001h ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d jp l9123h l9114h: ld hl,0000ah add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l9123h: ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00618h add hl,de ld a,(hl) inc hl or (hl) jp nz,l9114h ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de push hl ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00618h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00618h) inc hl ld (00618h),hl ret sub_9161h: ld de,0fffeh call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,00000h ld (00400h),hl jp l9189h l9182h: ld hl,(00400h) inc hl ld (00400h),hl l9189h: ld hl,(00400h) ld de,00021h ex de,hl call sub_b31bh jp nz,l9182h ld a,(00664h) ld l,a ld h,000h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call sub_b2e1h jp nz,l9182h ld hl,(00400h) ld de,00021h call sub_b2e1h jp z,l91f3h ld a,(00664h) ld l,a ld h,000h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call exit_with_hl_and_a_one_dup jp z,l91f3h ld hl,00043h push hl call sub_8bb6h pop de ret l91f3h: ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,080ffh call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0ff00h call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ex de,hl ld (00402h),hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ex de,hl ld (00404h),hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ex de,hl ld (00406h),hl ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,00004h call exit_with_hl_and_a_one_dup jp z,l9294h ld hl,00045h push hl call sub_8bb6h pop de ret l9294h: ld hl,(00406h) ld de,007d0h ex de,hl call sub_b31ch jp z,l92a7h ld hl,007d0h ld (00406h),hl l92a7h: ld hl,(00406h) ld de,0000ah ex de,hl call sub_b31bh jp z,l92bah ld hl,0000ah ld (00406h),hl l92bah: ld hl,00839h ex de,hl ld hl,(00406h) call sub_ae14h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066eh add hl,de pop de ld (hl),e inc hl ld (hl),d push de ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0067ah add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00402h) ld de,000f0h call hl_and_with_de add hl,hl add hl,hl add hl,hl add hl,hl add hl,hl push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) pop hl call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,(00404h) ld a,h or l jp z,l9396h ld hl,(00404h) ld de,0000fh call hl_and_with_de ld de,00001h call sub_b2e1h jp z,l9368h ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,01000h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d jp l9393h l9368h: ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,01800h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d l9393h: jp l93c1h l9396h: ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,00800h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d l93c1h: ld hl,(00404h) ld de,00010h call hl_and_with_de jp nz,l93fbh ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,06000h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d jp l9426h l93fbh: ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,02000h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d l9426h: ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,reset call hl_and_with_de jp z,l954bh ld hl,(00402h) jp l951dh ld hl,data_8376h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_8388h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_83a4h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_83d4h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_83ech push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_8414h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_845ch push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_8478h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h ld hl,data_84a8h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l9548h l951dh: call sub_b348h add hl,bc nop inc de nop ld b,l sub h inc d nop adc a,l sub h dec d nop push de sub h inc hl nop ld e,l sub h inc h nop and l sub h dec h nop defb 0edh;next byte illegal after ed sub h inc sp nop ld (hl),l sub h inc (hl) nop cp l sub h dec (hl) nop dec b sub l ld c,b sub l l9548h: jp l95efh l954bh: ld hl,(00402h) jp l95d4h ld hl,data_8304h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l95efh ld hl,data_8312h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l95efh ld hl,data_8326h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l95efh ld hl,data_8336h push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l95efh ld hl,data_834eh push hl ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de pop de ld (hl),e inc hl ld (hl),d jp l95efh ld hl,00050h push hl call sub_8bb6h pop de jp l95efh l95d4h: call sub_b348h dec b nop inc de nop ld d,c sub l inc d nop add a,c sub l inc hl nop ld l,c sub l inc h nop sbc a,c sub l inc (hl) nop or c sub l ret sub l l95efh: ld hl,(00618h) ld (00406h),hl ld hl,00001h ld (00404h),hl jp l961bh l95feh: ld hl,(00404h) inc hl ld (00404h),hl dec hl add hl,hl ld de,00618h add hl,de ld a,(hl) inc hl or (hl) jp z,l9614h jp l95feh l9614h: ld hl,(00406h) dec hl ld (00406h),hl l961bh: ld hl,(00406h) ld a,h or l jp nz,l95feh ld hl,(00400h) ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de push hl ld hl,(00404h) add hl,hl ld de,00618h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00618h) inc hl ld (00618h),hl ret sub_9645h: ld de,0ffd8h call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00014h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00014h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,000feh call sub_b37eh jp z,l9678h ld hl,0003eh push hl call sub_8bb6h pop de ret l9678h: ld hl,00014h add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,00000h ex de,hl ld hl,00028h add hl,sp ld (hl),e inc hl ld (hl),d jp l96a1h l9692h: ld hl,00028h add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l96a1h: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b37dh jp z,l96d9h ld a,(00664h) ld l,a ld h,000h push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call exit_with_hl_and_a_one_dup jp nz,l9692h l96d9h: ld a,(00664h) or a jp nz,l9702h ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de ld a,(hl) inc hl or (hl) jp nz,l9702h ld hl,00021h ex de,hl ld hl,00028h add hl,sp ld (hl),e inc hl ld (hl),d l9702h: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b36fh jp z,l971bh ld hl,00043h push hl call sub_8bb6h pop de ret l971bh: ld hl,(0065ch) ld (00966h),hl ld hl,0000eh add hl,sp push hl ld hl,(00966h) call sub_ae95h pop hl call sub_aea7h ld hl,(00966h) ld de,00004h add hl,de ld (00966h),hl ld (0065ch),hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00018h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00000h ex de,hl ld hl,00018h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00012h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00016h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00022h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de ld a,(hl) inc hl or (hl) jp nz,l97b8h ld hl,00049h push hl call sub_8bb6h pop de ret l97b8h: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00670h add hl,de call sub_ae95h call sub_aeffh jp z,l97deh ld hl,0004dh push hl call sub_8bb6h pop de ld hl,0004dh ret l97deh: ld hl,000d2h ex de,hl ld hl,0001eh add hl,sp ld (hl),e inc hl ld (hl),d ld hl,007d0h ex de,hl ld hl,00012h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a call sub_ae22h ex de,hl ld hl,00020h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00018h add hl,sp ld a,(hl) inc hl or (hl) jp z,l9b0eh ld hl,00018h add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh call sub_a7fch ld hl,0001ah add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh call sub_a82dh call sub_a996h call sub_a7a6h ld b,d rlca ret nc nop nop nop nop nop call sub_aa9eh call sub_a7a6h ld b,b add a,b nop nop nop nop nop nop call sub_a8c1h call sub_ad7ah ex de,hl ld hl,0001ch add hl,sp ld (hl),e inc hl ld (hl),d l9850h: ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,0001eh add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a call sub_b370h jp z,l987dh ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00001h call sub_b233h ex de,hl ld hl,0001eh add hl,sp ld (hl),e inc hl ld (hl),d jp l9850h l987dh: ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a call sub_b37eh jp z,l9b02h ld hl,0000eh add hl,sp call sub_ae95h call sub_aeffh jp z,l9b02h ld hl,00016h add hl,sp ld a,(hl) inc hl or (hl) jp z,l98dbh ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,last_address_of_ROM call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d jp l990ah l98dbh: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,04000h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d l990ah: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00670h add hl,de push hl ld hl,00010h add hl,sp call sub_ae95h pop hl call sub_aea7h ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0067ch add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp push hl ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh call sub_a7fch ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh call sub_a7fch ld hl,00030h add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh call sub_a82dh call sub_a8bah call sub_a82dh call sub_a996h call sub_a7fch call sub_a7b4h ld b,c ld bc,00000h nop nop nop nop call sub_a82dh call sub_a8bah pop hl call sub_a788h ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,0001ah add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00001h push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de pop de ld (hl),e inc hl ld (hl),d l99bbh: ld hl,0001ah add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,0002ch add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d ex de,hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d ld hl,00020h add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh call sub_a7fch ld hl,00022h add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh ld hl,00012h add hl,sp call sub_a75ch call sub_aa9eh call sub_a82dh call sub_ab5dh jp nz,l9a45h ld hl,0001ah add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_ab7eh ld hl,0000ah add hl,sp call sub_a75ch call sub_aa9eh call sub_ad7ah ex de,hl ld hl,0001ah add hl,sp ld (hl),e inc hl ld (hl),d jp l99bbh l9a45h: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d ld hl,00020h add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,0002ch add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl pop de ld (hl),e inc hl ld (hl),d ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_b19dh ld hl,00001h call sub_afbbh ld hl,0000eh add hl,sp call sub_ae88h call lb167_unused jp z,l9affh ld hl,0000eh add hl,sp call sub_ae95h call sub_ae81h ld (bc),a nop nop nop call sub_b00bh call sub_b1b6h push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0067ch add hl,de ld e,(hl) inc hl ld d,(hl) pop hl add hl,de ex de,hl ld hl,0002ah add hl,sp ld (hl),e inc hl ld (hl),d l9affh: jp l9b0bh l9b02h: ld hl,00050h push hl call sub_8bb6h pop de ret l9b0bh: jp l9bbfh l9b0eh: ld hl,00000h push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,02000h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,00020h add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066eh add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00670h add hl,de push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00674h add hl,de push hl ld hl,00012h add hl,sp call sub_ae95h pop hl call sub_aea7h pop hl call sub_aea7h ld hl,00000h push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00678h add hl,de pop de ld (hl),e inc hl ld (hl),d l9bbfh: ld hl,00000h push hl ld hl,0002ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0feffh call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,00016h add hl,sp ld a,(hl) inc hl or (hl) jp z,l9c43h ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,04000h call hl_or_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d jp l9c72h l9c43h: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,last_address_of_ROM call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d l9c72h: ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ex de,hl ld hl,00008h add hl,sp ld (hl),e inc hl ld (hl),d ex de,hl ld e,(hl) inc hl ld d,(hl) ld hl,0e7ffh call hl_and_with_de ex de,hl ld hl,00008h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (hl),e inc hl ld (hl),d ld hl,00022h add hl,sp ld a,(hl) inc hl or (hl) jp z,l9d05h ld hl,00001h ex de,hl ld hl,00024h add hl,sp ld (hl),e inc hl ld (hl),d jp l9cc8h l9cb9h: ld hl,00024h add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l9cc8h: ld hl,00024h add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00618h add hl,de ld a,(hl) inc hl or (hl) jp nz,l9cb9h ld hl,00028h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de push hl ld hl,00026h add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00618h add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,(00618h) inc hl ld (00618h),hl l9d05h: ret sub_9d06h: ld de,0ffeeh call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00018h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00018h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,000feh call sub_b37eh jp z,l9d39h ld hl,0003eh push hl call sub_8bb6h pop de ret l9d39h: ld hl,00018h add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,00000h ex de,hl ld hl,00016h add hl,sp ld (hl),e inc hl ld (hl),d jp l9d62h l9d53h: ld hl,00016h add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l9d62h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b37dh jp z,l9d9ah ld a,(00664h) ld l,a ld h,000h push hl ld hl,00018h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call exit_with_hl_and_a_one_dup jp nz,l9d53h l9d9ah: ld a,(00664h) or a jp nz,l9dc3h ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de ld a,(hl) inc hl or (hl) jp nz,l9dc3h ld hl,00021h ex de,hl ld hl,00016h add hl,sp ld (hl),e inc hl ld (hl),d l9dc3h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b36fh jp z,l9e5bh ld hl,00100h ld (0065ch),hl l9dd9h: ld hl,(0065ch) ld a,(hl) inc hl or (hl) jp z,l9de5h jp l9dd9h l9de5h: ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00041h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,000ffh push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00000h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00000h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ld hl,(0065ch) ld de,0fff6h add hl,de ld (0065ch),hl ld hl,00006h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ret l9e5bh: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,reset call hl_and_with_de jp z,l9e86h ld hl,00005h ex de,hl ld hl,0000ch add hl,sp ld (hl),e inc hl ld (hl),d jp l9e91h l9e86h: ld hl,00009h ex de,hl ld hl,0000ch add hl,sp ld (hl),e inc hl ld (hl),d l9e91h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,00600h call hl_and_with_de ex de,hl ld hl,00012h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00012h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,0000ch add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a call sub_b233h ex de,hl ld hl,00012h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00000h ex de,hl ld hl,00010h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00670h add hl,de call sub_ae95h call sub_aeffh jp nz,l9f07h ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00001h call hl_or_with_de ex de,hl ld hl,00010h add hl,sp ld (hl),e inc hl ld (hl),d l9f07h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,00100h call hl_and_with_de jp z,l9f39h ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00002h call hl_or_with_de ex de,hl ld hl,00010h add hl,sp ld (hl),e inc hl ld (hl),d l9f39h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00678h add hl,de ld a,(hl) inc hl or (hl) jp nz,la071h ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066eh add hl,de ld a,(hl) inc hl or (hl) jp z,la071h ld hl,(00618h) ex de,hl ld hl,00014h add hl,sp ld (hl),e inc hl ld (hl),d ld a,d or e jp z,la059h ld hl,00001h ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d jp l9fe0h l9f85h: ld hl,0000ah add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d ex de,hl dec hl add hl,hl ld de,00618h add hl,de ld e,(hl) inc hl ld d,(hl) ex de,hl ld a,(hl) inc hl or (hl) jp nz,l9fa8h jp l9f85h l9fa8h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de push hl ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00616h add hl,de ld e,(hl) inc hl ld d,(hl) pop hl call sub_b2e1h jp nz,la001h ld hl,00014h add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a dec hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d l9fe0h: ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00618h add hl,de ld de,0065ah ex de,hl call sub_b37dh jp z,la001h ld hl,00014h add hl,sp ld a,(hl) inc hl or (hl) jp nz,l9f85h la001h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de push hl ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00616h add hl,de ld e,(hl) inc hl ld d,(hl) pop hl call exit_with_hl_and_a_one_dup jp nz,la041h ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl add hl,hl ld de,00616h add hl,de ld de,0065ah ex de,hl call sub_b37eh jp z,la056h la041h: ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00100h call hl_or_with_de ex de,hl ld hl,00010h add hl,sp ld (hl),e inc hl ld (hl),d la056h: jp la06eh la059h: ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00100h call hl_or_with_de ex de,hl ld hl,00010h add hl,sp ld (hl),e inc hl ld (hl),d la06eh: jp la086h la071h: ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00080h call hl_or_with_de ex de,hl ld hl,00010h add hl,sp ld (hl),e inc hl ld (hl),d la086h: ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,00007h call sub_b233h ld de,0007ch call hl_and_with_de ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,0000ah add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a call hl_or_with_de ex de,hl ld hl,00010h add hl,sp ld (hl),e inc hl ld (hl),d ld hl,00100h ld (0065ch),hl la0ceh: ld hl,(0065ch) ld a,(hl) inc hl or (hl) jp z,la0dah jp la0ceh la0dah: ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,00041h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00016h add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) push de call sub_8c83h pop de push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00012h add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00010h add hl,sp ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ld hl,(0065ch) ld de,0fff6h add hl,de ld (0065ch),hl ld hl,00006h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ret sub_a16eh: ld de,0fff6h call sub_b269h ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,00004h call exit_with_hl_and_a_one_dup jp z,la18ch ld hl,00045h push hl call sub_8bb6h pop de ret la18ch: ld hl,(00618h) ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d ld a,d or e jp z,la216h ld hl,0061ah ld (00968h),hl jp la20ch la1a5h: ld hl,(00968h) ld de,00018h add hl,de ld (00968h),hl ld de,0ffe8h add hl,de ld a,(hl) inc hl or (hl) jp nz,la1bch jp la1a5h la1bch: ld hl,(00968h) ld de,0ffe8h add hl,de ld de,0065ah ex de,hl call sub_b37eh jp nz,la216h ld hl,(00968h) ld de,0fff2h add hl,de push hl ld hl,(00968h) ld de,0ffech add hl,de ld e,(hl) inc hl ld d,(hl) ex de,hl call sub_b19dh pop hl call sub_aea7h ld hl,(00968h) ld de,0ffech add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(00968h) ld de,0fffah add hl,de pop de ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a dec hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d la20ch: ld hl,0000ah add hl,sp ld a,(hl) inc hl or (hl) jp nz,la1a5h la216h: ret sub_a217h: ld de,0fffah call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,0000ch add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0000ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00100h call sub_b37eh jp z,la259h ld hl,00100h ex de,hl ld hl,0000ch add hl,sp ld (hl),e inc hl ld (hl),d la259h: ld hl,00100h ld (0065ch),hl la25fh: ld hl,0000ch add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a dec hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d ex de,hl inc hl ld a,h or l jp z,la278h jp la25fh la278h: ld hl,0000ah add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d ex de,hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ret sub_a29eh: ld de,0ffe8h call sub_b269h ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl ld e,(hl) inc hl ld d,(hl) ld hl,0001eh add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,000feh call sub_b37eh jp z,la2d1h ld hl,0003eh push hl call sub_8bb6h pop de ret la2d1h: ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) push de call sub_8c18h pop de ld hl,00000h ex de,hl ld hl,0001ch add hl,sp ld (hl),e inc hl ld (hl),d jp la2fah la2ebh: ld hl,0001ch add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d la2fah: ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b37dh jp z,la332h ld a,(00664h) ld l,a ld h,000h push hl ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call exit_with_hl_and_a_one_dup jp nz,la2ebh la332h: ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00020h call sub_b36fh jp z,la3c5h ld hl,00100h ld (0065ch),hl la348h: ld hl,(0065ch) ld a,(hl) inc hl or (hl) jp z,la354h jp la348h la354h: ld hl,(0065ch) inc hl inc hl ld (0065ch),hl ld hl,00056h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,000ffh push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00000h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00000h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ld hl,(0065ch) ld de,0fff6h add hl,de ld (0065ch),hl ld hl,00006h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ret la3c5h: ld hl,00100h ld (0065ch),hl la3cbh: ld hl,(0065ch) ld a,(hl) inc hl or (hl) jp z,la3d7h jp la3cbh la3d7h: ld hl,(0065ch) inc hl inc hl ld (0065ch),hl ld hl,00056h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00668h add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ah add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066ch add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0066eh add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0000ch add hl,sp push hl ld hl,0001eh add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00670h add hl,de call sub_ae95h pop hl call sub_aea7h ld hl,(0065ch) ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a ld de,00004h add hl,de ex de,hl pop hl ld (hl),e inc hl ld (hl),d ex de,hl ld de,0fffch add hl,de push hl ld hl,0000eh add hl,sp call sub_ae95h pop hl call sub_aea7h ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ex de,hl ld (0065ch),hl ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00678h add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0067ah add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,0001ch add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,0067ch add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ld hl,(0065ch) ld de,0ffe8h add hl,de ld (0065ch),hl ld hl,0000dh push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d ret sub_a580h: ld de,0fffdh call sub_b269h ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,00049h call sub_b2e1h jp nz,la5a4h ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,00069h call sub_b2e1h jp z,la5ebh la5a4h: ld hl,(0065ch) inc hl inc hl ld (0065ch),hl ld e,(hl) inc hl ld d,(hl) ld b,d ld c,e ld hl,00100h ld (0065ch),hl ld hl,00003h push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d push bc call sub_b38bh pop de push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld hl,00004h push hl ld hl,(0065ch) pop de ld (hl),e inc hl ld (hl),d jp la634h la5ebh: ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,0004fh call sub_b2e1h jp nz,la609h ld hl,(0065ch) ld e,(hl) inc hl ld d,(hl) ld hl,0006fh call sub_b2e1h jp z,la634h la609h: ld hl,(0065ch) inc hl inc hl ld (0065ch),hl ld e,(hl) inc hl ld d,(hl) ld hl,0000ah add hl,sp ld (hl),e ld hl,(0065ch) inc hl inc hl ld (0065ch),hl ld e,(hl) inc hl ld d,(hl) ld b,d ld c,e push bc ld hl,0000ch add hl,sp ld e,(hl) ld d,000h push de call sub_b39bh pop de pop de la634h: ret sub_a635h: ld de,0fffeh call sub_b269h ld hl,00000h ld (0065ch),hl ld hl,(0065ch) ld de,00050h add hl,de ld (0065ch),hl la64bh: ld hl,(0065ch) ld a,h or l jp z,la668h ld hl,00000h push hl ld hl,(0065ch) dec hl dec hl ld (0065ch),hl inc hl inc hl pop de ld (hl),e inc hl ld (hl),d jp la64bh la668h: ret sub_a669h: ld de,0fffch call sub_b269h ld hl,00000h ex de,hl ld hl,0000ah add hl,sp ld (hl),e inc hl ld (hl),d la67ah: ld hl,00010h push hl call sub_b38bh pop de ld hl,0000ah add hl,sp push hl ld a,(hl) inc hl ld h,(hl) ld l,a inc hl ex de,hl pop hl ld (hl),e inc hl ld (hl),d ld hl,0000ah add hl,sp ld e,(hl) inc hl ld d,(hl) ld hl,0ffffh call sub_b37dh jp nz,la67ah ret sub_a6a2h: ld de,0fffeh call sub_b269h ld hl,00100h ld (0065ch),hl ld hl,00000h ld b,h ld c,l la6b3h: ld hl,00000h push hl pop ix la6b9h: push bc call sub_8c18h pop de ld a,(00664h) ld l,a ld h,000h push hl ld h,b ld l,c ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) ld hl,000ffh call hl_and_with_de pop de call sub_b2e1h jp z,la716h ld h,b ld l,c ld de,04300h call hl_or_with_de push hl ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d ld h,b ld l,c ld de,00018h call bc_to_stack_hl_to_bc_clear_hl_a_is_16 ld de,00666h add hl,de ld e,(hl) inc hl ld d,(hl) push de ld hl,(0065ch) inc hl inc hl ld (0065ch),hl dec hl dec hl pop de ld (hl),e inc hl ld (hl),d la716h: push ix pop hl inc hl push hl pop ix push ix pop hl ld de,000ffh ex de,hl call sub_b31bh jp nz,la6b9h ld h,b ld l,c inc hl ld b,h ld c,l ld h,b ld l,c ld de,00020h ex de,hl call sub_b31bh jp nz,la6b3h ret jp p,0f30dh ld sp,00608h ld hl,00400h ld bc,009f2h ld e,000h la74ah: ld (hl),e inc hl dec bc ld a,c or b jp nz,la74ah ld hl,00ff2h ld (00deeh),hl ei jp l8603h sub_a75ch: ex de,hl ld hl,(0b3c0h) jp la767h ex de,hl ld hl,(words_3_start+1) la767h: push bc ld a,(de) ld (hl),a inc hl and 07fh sub 040h ld (hl),a inc hl ld (hl),000h ld b,003h la775h: inc hl inc de ld a,(de) ld (hl),a dec b jp nz,la775h ld b,005h xor a la780h: inc hl ld (hl),a dec b jp nz,la780h pop bc ret sub_a788h: push bc ex de,hl ld hl,(words_3_start+1) ld a,(hl) and 080h ld b,a inc hl ld a,(hl) add a,040h and 07fh or b ld (de),a inc hl ld b,003h la79ch: inc de inc hl ld a,(hl) ld (de),a dec b jp nz,la79ch pop bc ret sub_a7a6h: pop de ld hl,00008h add hl,de push hl ex de,hl ex de,hl ld hl,(0b3c0h) jp la7bfh sub_a7b4h: pop de ld hl,00008h add hl,de push hl ex de,hl ex de,hl ld hl,(words_3_start+1) la7bfh: push bc ld a,(de) ld (hl),a inc hl and 07fh sub 040h ld (hl),a inc hl ld (hl),000h ld b,007h la7cdh: inc hl inc de ld a,(de) ld (hl),a dec b jp nz,la7cdh inc hl ld (hl),000h pop bc ret push bc push hl call sub_abcch pop de ld hl,(words_3_start+1) ld a,(hl) and 080h ld b,a inc hl ld a,(hl) add a,040h and 07fh or b ld (de),a inc hl ld b,007h la7f2h: inc de inc hl ld a,(hl) ld (de),a dec b jp nz,la7f2h pop bc ret sub_a7fch: pop hl ld (0b3c6h),hl call sub_abcch ld hl,(words_3_start+1) ld de,00009h add hl,de ld d,(hl) dec hl ld e,(hl) dec hl push de ld d,(hl) dec hl ld e,(hl) dec hl push de ld d,(hl) dec hl ld e,(hl) dec hl push de ld d,(hl) dec hl dec hl ld a,(hl) add a,040h and 07fh ld e,a dec hl ld a,(hl) and 080h or e ld e,a push de ld hl,(0b3c6h) jp (hl) sub_a82dh: pop hl ld (0b3c6h),hl ld hl,(0b3c0h) pop de ld (hl),e inc hl ld a,e and 07fh sub 040h ld (hl),a inc hl ld (hl),000h inc hl ld (hl),d inc hl pop de ld (hl),e inc hl ld (hl),d inc hl pop de ld (hl),e inc hl ld (hl),d inc hl pop de ld (hl),e inc hl ld (hl),d inc hl ld (hl),000h ld hl,(0b3c6h) jp (hl) ld hl,(0b3c0h) ex de,hl ld hl,(words_3_start+1) ld (0b3c0h),hl ex de,hl ld (words_3_start+1),hl ret ld hl,(words_3_start+1) ld a,(hl) xor 080h ld (hl),a ret ld hl,(words_3_start+1) inc hl ld a,(hl) cp 0c0h jp nz,lab4eh jp lab43h la87ch: xor a dec a pop bc ret la880h: xor a inc a pop bc ret sub_a884h: push bc ld hl,(words_3_start+1) ex de,hl ld hl,(0b3c0h) ld a,(de) or a jp m,la898h xor (hl) jp m,la880h jp la89dh la898h: xor (hl) jp m,la87ch ex de,hl la89dh: inc hl inc de ld a,(de) cp (hl) jp m,la87ch jp nz,la880h ld b,009h la8a9h: inc hl inc de ld a,(de) cp (hl) jp c,la87ch jp nz,la880h dec b jp nz,la8a9h xor a pop bc ret sub_a8bah: ld hl,(0b3c0h) ld a,(hl) xor 080h ld (hl),a sub_a8c1h: push bc ld hl,(words_3_start+1) ld de,0000bh add hl,de ld b,007h xor a la8cch: ld (hl),a inc hl dec b jp nz,la8cch ld hl,(0b3c0h) ld de,0000bh add hl,de ld b,007h la8dbh: ld (hl),a inc hl dec b jp nz,la8dbh ld hl,(words_3_start+1) ex de,hl ld hl,(0b3c0h) inc hl inc de ld a,(de) sub (hl) jp p,la8f2h ex de,hl cpl inc a la8f2h: dec de dec hl ld (0b3c0h),hl ex de,hl ld (words_3_start+1),hl cp 009h jp nc,labf3h ld c,a push hl push de add a,009h ld e,a ld d,000h add hl,de ld (0b3c8h),hl pop de ld hl,00009h add hl,de ld (0b3cah),hl pop hl ex de,hl ld a,(de) xor (hl) jp p,la978h ld a,(de) or a jp m,la93fh ld b,007h ld hl,(0b3c8h) ex de,hl ld hl,(0b3cah) la929h: ld a,(de) sbc a,(hl) ld (de),a dec de dec hl dec b jp nz,la929h la932h: ld a,(de) sbc a,000h ld (de),a dec de dec c jp p,la932h ex de,hl jp la95ah la93fh: ld b,007h ld hl,(0b3cah) ex de,hl ld hl,(0b3c8h) la948h: ld a,(de) sbc a,(hl) ld (hl),a dec de dec hl dec b jp nz,la948h la951h: ld a,000h sbc a,(hl) ld (hl),a dec hl dec c jp p,la951h la95ah: inc hl ld a,(hl) or a ld a,001h jp p,la971h ld de,0000fh add hl,de la966h: ld a,000h sbc a,(hl) ld (hl),a dec hl dec e jp p,la966h ld a,081h la971h: ld hl,(words_3_start+1) ld (hl),a jp labf3h la978h: ld b,007h ld hl,(0b3c8h) ex de,hl ld hl,(0b3cah) la981h: ld a,(de) adc a,(hl) ld (de),a dec de dec hl dec b jp nz,la981h la98ah: ld a,(de) adc a,000h ld (de),a dec de dec c jp p,la98ah jp labf3h sub_a996h: push bc ld hl,(words_3_start+1) ex de,hl ld hl,(0b3c0h) ld a,(de) xor (hl) ld (de),a inc hl inc de ld a,(de) sub (hl) ld c,a push de push hl ld a,(hl) cp 0c0h jp nz,la9b8h pop hl pop hl ld a,003h ld (0b3c2h),a jp lac93h la9b8h: inc de inc hl ld b,008h la9bch: inc de inc hl ld a,(de) cp (hl) jp nz,la9dah dec b jp nz,la9bch pop hl pop hl inc c ld (hl),c inc hl ld (hl),000h inc hl ld (hl),001h ld b,008h xor a ld (0b3c2h),a jp lac1ah la9dah: pop de pop hl ld (hl),c jp c,la9e3h inc c ld (hl),c dec hl la9e3h: push de ld de,00009h add hl,de ld b,008h ld de,0b3fah la9edh: ld a,(hl) ld (de),a dec hl inc de dec b jp nz,la9edh pop hl ld de,00009h add hl,de ld b,008h ld de,0b402h la9ffh: ld a,(hl) ld (de),a dec hl inc de dec b jp nz,la9ffh ld b,008h ld hl,data_b3f1+1 xor a laa0dh: ld (hl),a inc hl dec b jp nz,laa0dh ld a,040h ld (data_b3f1),a laa18h: ld hl,data_b3f1+1 ld b,010h or a laa1eh: ld a,(hl) adc a,a ld (hl),a inc hl dec b jp nz,laa1eh sbc a,a and 001h ld c,a ld b,008h ld de,0b3fah ld hl,0b402h or a laa33h: ld a,(de) sbc a,(hl) ld (de),a inc de inc hl dec b jp nz,laa33h ld a,c sbc a,000h jp nz,laa50h laa42h: ld hl,data_b3f1+1 inc (hl) ld hl,data_b3f1 dec (hl) jp nz,laa18h jp laa82h laa50h: ld hl,data_b3f1 dec (hl) jp z,laa82h ld hl,data_b3f1+1 ld b,010h or a laa5dh: ld a,(hl) adc a,a ld (hl),a inc hl dec b jp nz,laa5dh sbc a,a ld c,a ld b,008h ld de,0b3fah ld hl,0b402h or a laa70h: ld a,(de) adc a,(hl) ld (de),a inc de inc hl dec b jp nz,laa70h ld a,c adc a,000h jp nz,laa50h jp laa42h laa82h: ld hl,(words_3_start+1) ld de,0000ch add hl,de ld (hl),000h dec hl ld (hl),000h ld de,data_b3f1+1 ld b,008h laa93h: dec hl ld a,(de) ld (hl),a inc de dec b jp nz,laa93h jp labf3h sub_aa9eh: push bc ld hl,(words_3_start+1) ex de,hl ld hl,(0b3c0h) ld a,(de) xor (hl) ld (de),a inc hl inc de ld a,(de) cp 0c0h jp z,lac0dh add a,(hl) ld (de),a ld a,(hl) cp 0c0h jp z,lac0dh push de ld de,00009h add hl,de ld b,008h ld de,0b402h laac3h: ld a,(hl) ld (de),a dec hl inc de dec b jp nz,laac3h pop hl ld de,00009h add hl,de ld b,008h ld de,0b3fah laad5h: ld a,(hl) ld (de),a dec hl inc de dec b jp nz,laad5h ld b,008h ld hl,data_b3f1+1 xor a laae3h: ld (hl),a inc hl dec b jp nz,laae3h ld a,040h ld (data_b3f1),a laaeeh: ld hl,data_b3f1+1 ld b,010h or a laaf4h: ld a,(hl) adc a,a ld (hl),a inc hl dec b jp nz,laaf4h jp nc,lab1fh ld b,008h ld de,data_b3f1+1 ld hl,0b402h or a lab08h: ld a,(de) adc a,(hl) ld (de),a inc de inc hl dec b jp nz,lab08h ld b,008h lab13h: ld a,(de) adc a,000h ld (de),a jp nc,lab1fh inc de dec b jp nz,lab13h lab1fh: ld hl,data_b3f1 dec (hl) jp nz,laaeeh ld hl,(words_3_start+1) ld de,0000ch add hl,de ld de,data_b3f8 ld b,00ah lab32h: ld a,(de) ld (hl),a inc de dec hl dec b jp nz,lab32h jp labf3h call sub_a884h jp z,lab4eh lab43h: ld hl,00000h xor a ret call sub_a884h jp z,lab43h lab4eh: ld hl,00001h xor a inc a ret call sub_a884h jp m,lab4eh jp lab43h sub_ab5dh: call sub_a884h jp m,lab4eh jp z,lab4eh jp lab43h call sub_a884h jp m,lab43h jp lab4eh call sub_a884h jp m,lab43h jp z,lab43h jp lab4eh sub_ab7eh: push bc ld a,h or l jp z,lac0dh ex de,hl ld b,000h jp laba0h push bc ld a,h or l jp z,lac0dh ex de,hl ld b,000h ld a,d or a jp p,laba0h cpl ld d,a ld a,e cpl ld e,a inc de ld b,080h laba0h: ld hl,(words_3_start+1) ld (hl),b inc hl ld a,d or a jp nz,labb7h ld (hl),001h inc hl ld (hl),000h inc hl ld (hl),e ld b,007h xor a jp labc3h labb7h: ld (hl),002h inc hl ld (hl),000h inc hl ld (hl),d inc hl ld (hl),e ld b,006h xor a labc3h: inc hl ld (hl),a dec b jp nz,labc3h jp lac54h sub_abcch: ld hl,(words_3_start+1) ld de,0000ah add hl,de ld a,(hl) cp 080h ret c jp nz,labe0h dec hl ld a,(hl) or 001h ld (hl),a ret labe0h: push bc ld bc,00800h scf labe5h: dec hl ld a,(hl) adc a,c ld (hl),a dec b jp nz,labe5h or a jp nz,labf3h pop bc ret labf3h: ld hl,(words_3_start+1) inc hl ld a,(hl) ld d,h ld e,l inc hl ld c,a xor a cp (hl) jp nz,lac5bh ld b,008h lac03h: inc hl cp (hl) jp nz,lac22h dec c dec b jp nz,lac03h lac0dh: xor a ld (0b3c2h),a ld hl,(words_3_start+1) ld b,00ah ld (hl),a inc hl ld (hl),0c0h lac1ah: inc hl ld (hl),a dec b jp nz,lac1ah pop bc ret lac22h: ld a,008h sub b ld b,a jp z,lac42h dec hl ld a,c ld (de),a push de inc de ld a,00fh sub b ld c,a lac32h: ld a,(hl) ld (de),a inc de inc hl dec c jp nz,lac32h xor a lac3bh: ld (de),a inc de dec b jp nz,lac3bh pop de lac42h: ld a,(de) or a jp m,lac4fh cp 040h jp c,lac54h jp lac8eh lac4fh: cp 0c1h jp c,lac75h lac54h: ld a,000h ld (0b3c2h),a pop bc ret lac5bh: inc c ld a,c ld (de),a ld b,00fh push de ld hl,00010h add hl,de ld d,h ld e,l lac67h: dec de ld a,(de) ld (hl),a dec hl dec b jp nz,lac67h ld (hl),000h pop de jp lac42h lac75h: ld a,001h ld (0b3c2h),a call sub_acaeh xor a ld hl,(words_3_start+1) inc hl ld (hl),0c1h inc hl ld (hl),a inc hl ld (hl),001h ld b,008h jp lac1ah lac8eh: ld a,002h ld (0b3c2h),a lac93h: call sub_acaeh ld hl,(words_3_start+1) inc hl ld (hl),03fh inc hl ld (hl),000h ld a,0ffh ld b,007h laca3h: inc hl ld (hl),a dec b jp nz,laca3h inc hl ld (hl),000h pop bc ret sub_acaeh: ld hl,(0b410h) ld a,h or l jp z,laccbh ex de,hl ld hl,00004h add hl,sp ld a,(hl) inc hl ld h,(hl) ld l,a ld (0b3c4h),hl ld hl,00001h push hl ex de,hl call sub_accch pop hl laccbh: ret sub_accch: jp (hl) push bc ld hl,(words_3_start+1) ld (hl),000h inc hl ld (hl),003h ld de,00004h add hl,de ld e,l ld d,h ld b,005h xor a lacdfh: inc hl ld (hl),a dec b jp nz,lacdfh ld b,004h ld hl,00608h ld a,(0060bh) or a jp p,lad02h lacf1h: ld a,000h sbc a,(hl) ld (de),a inc hl dec de dec b jp nz,lacf1h dec de ld a,080h ld (de),a jp labf3h lad02h: ld a,(hl) ld (de),a inc hl dec de dec b jp nz,lad02h jp labf3h push bc ld hl,00000h ld (00608h),hl ld (0060ah),hl ld de,00608h ld hl,(words_3_start+1) ld c,(hl) inc hl ld a,(hl) or a jp z,lac54h jp m,lac54h cp 005h jp nc,lad52h ld b,a inc hl add a,l ld l,a jp nc,lad34h inc h lad34h: ld a,(hl) ld (de),a inc de dec hl dec b jp nz,lad34h ld a,c or a jp p,lac54h ld b,004h ld hl,00608h lad46h: ld a,000h sbc a,(hl) ld (hl),a inc hl dec b jp nz,lad46h jp lac54h lad52h: ex de,hl ld a,c or a jp m,lad66h ld (hl),07fh inc hl ld (hl),0ffh inc hl ld (hl),0ffh inc hl ld (hl),0ffh jp ladcdh lad66h: ld (hl),080h inc hl ld (hl),000h inc hl ld (hl),000h inc hl ld (hl),000h jp ladcdh push bc ld c,000h jp lad7dh sub_ad7ah: push bc ld c,001h lad7dh: ld hl,(words_3_start+1) ld b,(hl) inc hl ld a,(hl) or a jp z,lad8ah jp p,lad90h lad8ah: ld hl,00000h jp lac54h lad90h: cp 003h jp nc,ladb4h inc hl add a,l ld l,a jp nc,lad9ch inc h lad9ch: ld e,(hl) dec hl ld d,(hl) ex de,hl ld a,c or a jp z,lac54h ld a,b or a jp p,lac54h ld a,h cpl ld h,a ld a,l cpl ld l,a inc hl jp lac54h ladb4h: ld a,c or a jp nz,ladbfh ld hl,0ffffh jp ladcdh ladbfh: ld a,b or a jp m,ladcah ld hl,07fffh jp ladcdh ladcah: ld hl,reset ladcdh: ld a,002h ld (0b3c2h),a pop bc ret ld hl,(words_3_start+1) ld (hl),000h ret push bc ld hl,(words_3_start+1) inc hl inc (hl) ld de,00009h add hl,de xor a ld b,008h lade7h: push bc ld e,(hl) ex de,hl ld h,000h add hl,hl ld b,h ld c,l add hl,hl add hl,hl add hl,bc ex de,hl add a,e inc hl ld (hl),a ld a,d adc a,000h dec hl dec hl pop bc dec b jp nz,lade7h inc hl ld (hl),a or a jp z,labf3h dec hl dec hl ld a,(hl) or a jp m,lae12h cp 040h jp nc,lac8eh lae12h: pop bc ret sub_ae14h: ld a,d xor h push af call sub_ae36h ex de,hl pop af jp m,lb335_unused ld a,l or h ret sub_ae22h: call sub_ae4ch ex de,hl ld a,l or h ret ld a,d push af call sub_ae36h pop af or a jp m,lb335_unused ld a,h or l ret sub_ae36h: ld a,h or a jp p,lae41h cpl ld h,a ld a,l cpl ld l,a inc hl lae41h: ld a,d or a jp p,sub_ae4ch cpl ld d,a ld a,e cpl ld e,a inc de sub_ae4ch: push bc ld c,l ld b,h ld hl,00000h call sub_ae59h pop bc ld a,l or h ret sub_ae59h: ld a,c cpl ld c,a ld a,b cpl ld b,a inc bc ld a,010h lae62h: add hl,hl ex de,hl add hl,hl ex de,hl jp nc,lae6ah inc l lae6ah: add hl,bc jp c,lae7bh push af ld a,l sub c ld l,a ld a,h sbc a,b ld h,a pop af dec a jp nz,lae62h ret lae7bh: inc e dec a jp nz,lae62h ret sub_ae81h: pop de ld hl,00004h add hl,de push hl ex de,hl sub_ae88h: ld de,00610h jp lae98h sub_ae8eh: pop de ld hl,00004h add hl,de push hl ex de,hl sub_ae95h: ld de,00608h lae98h: ld a,(hl) ld (de),a inc de inc hl ld a,(hl) ld (de),a inc de inc hl ld a,(hl) ld (de),a inc de inc hl ld a,(hl) ld (de),a ret sub_aea7h: ld de,00608h ld a,(de) ld (hl),a inc hl inc de ld a,(de) ld (hl),a inc hl inc de ld a,(de) ld (hl),a inc hl inc de ld a,(de) ld (hl),a ret pop de ld hl,0060bh ld hl,(0060ah) push hl ld hl,(00608h) push hl ex de,hl jp (hl) pop de pop hl ld (00610h),hl pop hl ld (00612h),hl ex de,hl jp (hl) ld hl,(00610h) ex de,hl ld hl,(00608h) ld (00610h),hl ex de,hl ld (00608h),hl ld hl,(00612h) ex de,hl ld hl,(0060ah) ld (00612h),hl ex de,hl ld (0060ah),hl ret laeefh: ld hl,00608h ; BLOCK 'code_2' (start 0xaef2 end 0xafff) code_2_start: xor a ld d,004h loop_aef5h: ld a,000h sbc a,(hl) ld (hl),a inc hl dec d jp nz,loop_aef5h ret sub_aeffh: ld hl,00608h ld d,004h laf04h: ld a,(hl) or a jp nz,exit_with_hl_and_a_one laf09_unused: inc hl dec d jp nz,laf04h jp exit_with_hl_and_a_zero laf11_unused: xor a dec a pop bc ret laf15_unused: xor a inc a pop bc ret sub_af19h: push bc ld de,0060bh ld hl,00613h ld a,(hl) xor 080h ld c,a ld a,(de) xor 080h cp c ld b,004h jp laf38h sub_af2dh: push bc ld de,0060bh ld hl,00613h ld b,004h laf36h: ld a,(de) cp (hl) laf38h: jp c,laf11_unused jp nz,laf15_unused dec hl dec de dec b jp nz,laf36h xor a pop bc ret push bc ld de,00608h ld hl,00610h xor a ld b,004h laf51h: ld a,(de) adc a,(hl) ld (de),a inc hl inc de dec b jp nz,laf51h pop bc ret push bc ld de,00608h ld hl,00610h xor a ld b,004h laf66h: ld a,(de) sbc a,(hl) ld (de),a inc hl inc de dec b jp nz,laf66h pop bc ret push bc ld de,00608h ld hl,00610h ld b,004h laf7ah: ld a,(de) and (hl) ld (de),a inc hl inc de dec b jp nz,laf7ah pop bc ret push bc ld de,00608h ld hl,00610h ld b,004h laf8eh: ld a,(de) or (hl) ld (de),a inc hl inc de dec b jp nz,laf8eh pop bc ret push bc ld de,00608h ld hl,00610h ld b,004h lafa2h: ld a,(de) xor (hl) ld (de),a inc hl inc de dec b jp nz,lafa2h pop bc ret ld hl,00608h ld d,004h lafb2h: ld a,(hl) cpl ld (hl),a inc hl dec d jp nz,lafb2h ret sub_afbbh: ld a,l and 03fh ret z ld hl,(00608h) ex de,hl ld hl,(0060ah) lafc6h: add hl,hl ex de,hl add hl,hl ex de,hl jp nc,lafceh inc l lafceh: dec a jp nz,lafc6h ld (0060ah),hl ex de,hl ld (00608h),hl ret xor a jp lafe2h ld a,(0060bh) rla lafe2h: push af ld a,l and 03fh jp z,laffdh ld d,a lafeah: ld hl,0060bh ld e,004h pop af push af laff1h: ld a,(hl) rra ld (hl),a dec hl dec e jp nz,laff1h dec d jp nz,lafeah laffdh: pop af ret code_2_end: ld hl,00003h add hl,de ld c,(hl) ld a,c or a ret p ex de,hl jp code_2_start sub_b00bh: push bc ld de,00608h call code_2_end push bc ld de,00610h call code_2_end ld a,c pop bc xor c push af call sub_b06bh pop af pop bc jp m,laeefh ret push bc ld de,00608h call code_2_end ld a,c or a push af ld de,00610h call code_2_end call sub_b06bh ld de,0060ch ld hl,00608h ld b,004h lb041h: ld a,(de) ld (hl),a inc de inc hl dec b jp nz,lb041h pop af pop bc jp m,laeefh ret push bc call sub_b06bh pop bc ret push bc call sub_b06bh ld de,0060ch ld hl,00608h ld b,004h lb061h: ld a,(de) ld (hl),a inc de inc hl dec b jp nz,lb061h pop bc ret sub_b06bh: ld b,004h ld hl,0060ch xor a lb071h: ld (hl),a inc hl dec b jp nz,lb071h ld a,020h lb079h: push af ld hl,00608h ld b,008h or a lb080h: ld a,(hl) adc a,a ld (hl),a inc hl dec b jp nz,lb080h sbc a,a and 001h ld c,a ld b,004h ld de,0060ch ld hl,00610h or a lb095h: ld a,(de) sbc a,(hl) ld (de),a inc de inc hl dec b jp nz,lb095h ld a,c sbc a,000h jp nz,lb0aeh lb0a4h: ld hl,00608h inc (hl) pop af dec a jp nz,lb079h ret lb0aeh: pop af dec a jp z,lb0dfh push af ld hl,00608h ld b,008h or a lb0bah: ld a,(hl) adc a,a ld (hl),a inc hl dec b jp nz,lb0bah sbc a,a ld c,a ld b,004h ld de,0060ch ld hl,00610h or a lb0cdh: ld a,(de) adc a,(hl) ld (de),a inc de inc hl dec b jp nz,lb0cdh ld a,c adc a,000h jp nz,lb0aeh jp lb0a4h lb0dfh: ld b,004h ld de,0060ch ld hl,00610h or a loop_b0e8h: ld a,(de) adc a,(hl) ld (de),a inc de inc hl dec b jp nz,loop_b0e8h ret push bc ld hl,00608h ld b,004h ld de,0060ch loop_b0fbh: ld a,(hl) ld (de),a ld (hl),000h inc hl inc de dec b jp nz,loop_b0fbh ld a,020h lb107h: push af ld hl,00608h ld b,008h or a lb10eh: ld a,(hl) adc a,a ld (hl),a inc hl dec b jp nz,lb10eh jp nc,lb12bh ld b,004h ld de,00608h ld hl,00610h or a lb122h: ld a,(de) adc a,(hl) ld (de),a inc de inc hl dec b jp nz,lb122h lb12bh: pop af dec a jp nz,lb107h pop bc ret call sub_af19h jp z,exit_with_hl_and_a_one exit_with_hl_and_a_zero: ld hl,00000h xor a ret lb13d_unused: call sub_af19h jp z,exit_with_hl_and_a_zero exit_with_hl_and_a_one: ld hl,00001h xor a inc a ret lb149_unused: call sub_af19h jp m,exit_with_hl_and_a_one jp exit_with_hl_and_a_zero lb152_unused: call sub_af19h jp m,exit_with_hl_and_a_one jp z,exit_with_hl_and_a_one jp exit_with_hl_and_a_zero lb15e_unused: call sub_af19h jp m,exit_with_hl_and_a_zero jp exit_with_hl_and_a_one lb167_unused: call sub_af19h jp m,exit_with_hl_and_a_zero jp z,exit_with_hl_and_a_zero jp exit_with_hl_and_a_one lb173_unused: call sub_af2dh jp m,exit_with_hl_and_a_one jp exit_with_hl_and_a_zero lb17c_unused: call sub_af2dh jp m,exit_with_hl_and_a_one jp z,exit_with_hl_and_a_one jp exit_with_hl_and_a_zero lb188_unused: call sub_af2dh jp m,exit_with_hl_and_a_zero jp exit_with_hl_and_a_one lb191_unused: call sub_af2dh jp m,exit_with_hl_and_a_zero jp z,exit_with_hl_and_a_zero jp exit_with_hl_and_a_one sub_b19dh: ld (00608h),hl lb1a0h: ld hl,00000h ld (0060ah),hl ret ld (00608h),hl lb1aa_unused: ld a,h or a jp p,lb1a0h ld hl,0ffffh ld (0060ah),hl ret sub_b1b6h: ld hl,(00608h) ret lb1ba_unused: pop hl push bc ld e,(hl) inc hl ld d,(hl) inc hl ex de,hl lb1c1h: ld (00614h),hl ex de,hl ld a,e or d jp z,lb1dfh ld de,00608h ld bc,00004h lb1d0h: ex de,hl ld a,(hl) ex de,hl cp (hl) jp nz,lb1e5h inc hl inc de dec bc ld a,c or a jp nz,lb1d0h lb1dfh: ld a,(hl) inc hl ld h,(hl) ld l,a pop bc jp (hl) lb1e5h: ld bc,00006h add hl,bc ex de,hl ld hl,(00614h) dec hl jp lb1c1h bc_to_stack_hl_to_bc_clear_hl_a_is_16: push bc ld b,h ld c,l ld hl,00000h ld a,010h lb1f9h: add hl,hl ex de,hl add hl,hl ex de,hl jp nc,lb201h add hl,bc lb201h: dec a jp nz,lb1f9h pop bc ld a,l or h ret sub_b209h: ex de,hl ld a,e and 01fh ld e,a jp z,skip_b230h ld a,h or h jp p,lb23bh lb216h: ld a,h scf rra ld h,a ld a,l rra ld l,a dec e jp nz,lb216h or h ret sub_b223h: ex de,hl ld a,e and 01fh ld e,a jp z,skip_b230h loop_b22bh: add hl,hl dec e jp nz,loop_b22bh skip_b230h: ld a,l or h ret sub_b233h: ex de,hl ld a,e and 01fh ld e,a jp z,skip_b230h lb23bh: ld a,h or a rra ld h,a ld a,l rra ld l,a dec e jp nz,lb23bh or h ret hl_and_with_de: ld a,h and d ld h,a ld a,l and e ld l,a or h ret sub_b250h: ld a,h cpl ld h,a ld a,l cpl ld l,a or h ret hl_or_with_de: ld a,h or d ld h,a ld a,l or e ld l,a or h ret hl_xor_with_de: ld a,h xor d ld h,a ld a,l xor e ld l,a or h ret jump_to_hl_indirect: jp (hl) sub_b269h: pop hl push bc ld b,h ld c,l ld hl,00000h add hl,sp ex de,hl add hl,sp ld sp,hl push de push ix push iy ld h,b ld l,c call jump_to_hl_indirect pop iy pop ix lb282h: ex de,hl pop hl ld sp,hl pop bc ex de,hl ld a,h or l ret lb28a_unused: pop hl push bc ld b,h ld c,l ld hl,00000h add hl,sp ex de,hl add hl,sp ld sp,hl push de ld hl,lb282h push hl ld h,b ld l,c jp (hl) lb29dh: ld a,(hl) ld (de),a inc hl inc de dec bc ld a,b or c jp nz,lb29dh ret lb2a8_unused: pop de ld hl,00002h add hl,sp xor a add a,003h jp pe,lb2b7h push ix push iy lb2b7h: push bc push de ld de,0b40ah ld b,006h lb2beh: ld a,(hl) ld (de),a inc hl inc de dec b jp nz,lb2beh ld hl,lb2cbh ex (sp),hl jp (hl) lb2cbh: pop bc xor a add a,003h jp pe,lb2d6h pop iy pop ix lb2d6h: ld a,h or l ret lb2d9_unused: ld a,h or l jp z,exit_with_hl_and_a_one_dup2 jp exit_with_hl_and_a_zero_dup sub_b2e1h: ld a,l sub e jp nz,exit_with_hl_and_a_zero_dup ld a,h sub d jp z,exit_with_hl_and_a_one_dup2 exit_with_hl_and_a_zero_dup: ld hl,00000h xor a ret exit_with_hl_and_a_one_dup: ld a,l sub e jp nz,exit_with_hl_and_a_one_dup2 ld a,h sub d jp z,exit_with_hl_and_a_zero_dup exit_with_hl_and_a_one_dup2: ld hl,00001h ld a,l or h ret lb300_unused: ex de,hl ld a,h xor d jp m,lb313h ld a,l sub e ld a,h sbc a,d ccf ld a,000h adc a,000h ld l,a ld h,000h ret lb313h: ld a,d rlca and 001h ld l,a ld h,000h ret sub_b31bh: ex de,hl sub_b31ch: ld a,h xor d jp m,lb32dh ld a,l sub e ld a,h sbc a,d ld a,000h adc a,000h ld l,a ld h,000h ret lb32dh: ld a,h rlca and 001h ld l,a ld h,000h ret lb335_unused: ld a,l cpl ld l,a ld a,h cpl ld h,a inc hl ld a,l or h ret hl_subtract_de: ex de,hl ld a,l sub e ld l,a ld a,h sbc a,d ld h,a or l ret sub_b348h: ex de,hl pop hl push bc ld b,d ld c,e ld e,(hl) inc hl ld d,(hl) lb350h: dec de ld a,d or a jp m,skip_b368h inc hl ld a,c cp (hl) jp z,skip_b362h inc hl loop_b35dh: inc hl inc hl jp lb350h skip_b362h: inc hl ld a,b cp (hl) jp nz,loop_b35dh skip_b368h: inc hl ld a,(hl) inc hl ld h,(hl) ld l,a pop bc jp (hl) sub_b36fh: ex de,hl sub_b370h: ld a,l sub e ld a,h sbc a,d ld a,000h ccf adc a,000h ld l,a ld h,000h ret sub_b37dh: ex de,hl sub_b37eh: ld a,l sub e ld a,h sbc a,d ld a,000h adc a,000h ld l,a ld h,000h ret ret sub_b38bh: push bc ld hl,00005h add hl,sp ld b,(hl) dec hl ld c,(hl) ld h,000h in l,(c) ld a,l or a pop bc ret sub_b39bh: push bc ld hl,00007h add hl,sp ld b,(hl) dec hl ld c,(hl) dec hl dec hl ld a,(hl) out (c),a pop bc ret sub_b3aah: push bc ld hl,00007h add hl,sp ld b,(hl) dec hl ld c,(hl) dec hl ld a,(hl) out (c),a dec hl inc bc ld a,(hl) out (c),a pop bc ret ; BLOCK 'words_3' (start 0xb3bd end 0xc000) words_3_start: defw 0cd00h defw 0dfb3h defw 000b3h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h data_b3f1: defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00400h defw 05400h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00d00h defw 00031h defw 00000h defw 00600h defw 01f00h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00e00h defw 02400h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00600h defw 0e800h defw 00030h defw 00000h defw 00000h defw 00000h defw 00c00h defw 08600h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00200h defw 09b00h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00e00h defw 05600h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00600h defw 0a100h defw 08831h defw 0e905h defw 00024h defw 00000h defw 00400h defw 0e100h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00e00h defw 0e300h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00e00h defw 0a300h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00a00h defw 09300h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00c00h defw 03200h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00200h defw 0fc00h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 0d100h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00a00h defw 04a00h defw 00031h defw 00000h defw 00000h defw 00000h defw 00800h defw 0e600h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00600h defw 0fd00h defw 00030h defw 00000h defw 00000h defw 00000h defw 00200h defw 09100h defw 00031h defw 06700h defw 00030h defw 00000h defw 00200h defw 07700h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00800h defw 06400h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00600h defw 06c00h defw 00030h defw 00000h defw 00000h defw 00000h defw 00e00h defw 0e500h defw 00030h defw 00000h defw 00000h defw 00000h defw 00e00h defw 0d800h defw 00030h defw 00000h defw 00000h defw 00000h defw 00800h defw 0ce00h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 09600h defw 0e904h defw 00c24h defw 05e00h defw 00030h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00a00h defw 0f900h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00e00h defw 0dd00h defw 00031h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00400h defw 0d600h defw 00030h defw 00000h defw 05400h defw 0e904h defw 00824h defw 01700h defw 00031h defw 00000h defw 0b500h defw 00000h defw 00000h defw 00000h defw 00000h defw 00080h defw 00500h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h defw 00000h last_address_of_ROM: defb 000h words_3_end: