; Disassembly of the file "1z-013b.bin"
; 
; CPU Type: Z80
; 
; Created with dZ80 2.1
; 
; on Monday, 16 of March 2026 at 02:47 PM
; 
LSD0        EQU     0D0H
LSD1        EQU     0D1H
LSD2        EQU     0D2H
LSD3        EQU     0D3H
LSD4        EQU     0D4H
LSD5        EQU     0D5H
LSD6        EQU     0D6H
LSD7        EQU     0D7H
LSE0        EQU     0E0H
LSE1        EQU     0E1H
LSE2        EQU     0E2H
LSE3        EQU     0E3H
LSE4        EQU     0E4H
LSE5        EQU     0E5H
LSE6        EQU     0E6H
LSE8        EQU     0E8H
APTS        EQU     010F0H
NAME        EQU     010F1H
SIZE        EQU     01102H
DTADR       EQU     01104H
EXADR       EQU     01106H
COMNT       EQU     01108H
DTEFG       EQU     01171H
DTEFGX      EQU     01172H
TEMPW       EQU     01178H
TMCNT       EQU     01180H
SUMDT       EQU     01183H
KEYBM1      EQU     0118AH
KEYBUF      EQU     0118BH
DSPXY       EQU     01171H
TEXTST      EQU     01070H
TEXTED      EQU     01072H
VARST       EQU     01074H
STRST       EQU     01076H
VARED       EQU     01078H
TMPEND      EQU     0107AH
INTFAC      EQU     0107CH
MEMLMT      EQU     0107EH
MEMMAX      EQU     01080H
VRAM        EQU     0D000H
ARAM        EQU     0D800H
MMAPIO      EQU     0E000H
MEMSWAP     EQU     0E008H
SCRNEN      EQU     0E010H
SCRNDI      EQU     0E014H
INBUFC      EQU     01352H
INBUFL      EQU     01353H
INBUF       EQU     01354H
MONIT       EQU     00000H
GETL        EQU     00003H
LETNL       EQU     00006H
NL          EQU     00009H
PRNTS       EQU     0000CH
PRNTT       EQU     0000FH
PRNT        EQU     00012H
MSG         EQU     00015H
MSGX        EQU     00018H
GETKY       EQU     0001BH
BRKEY       EQU     0001EH
WRINF       EQU     00021H
WRDAT       EQU     00024H
RDINF       EQU     00027H
RDDAT       EQU     0002AH
VERFY       EQU     0002DH
MELDY       EQU     00030H
TIMST       EQU     00033H
TIMRD       EQU     00036H
BELL        EQU     00039H
XTEMP       EQU     0003CH
MSTA        EQU     0003FH
MSTP        EQU     00042H
RST38       EQU     00038H
ATRB        EQU     010F0H
PRGSTART    EQU     01200H
BUILD_ORIG  EQU     1
BUILD_RFS   EQU     0

            ; Create an MZF Tape header.
            ORG     ATRB

            ; Declare the MZF header to bootstrap BASIC from tape/SD.
BOOTATRB:   DB      01h                                                  ; Code Type, 01 = Machine Code.
BOOTNAME:   IF BUILD_ORIG = 1
              DB    "BASIC 1Z-013B   ", 0Dh                              ; Title/Name (17 bytes).
            ENDIF
            IF BUILD_RFS = 1
              DB    "BASIC 1Z-013BRFS", 0Dh                              ; Title/Name (17 bytes).
            ENDIF
BOOTSIZE:   DW      BASICEND - TAPECOPY                                  ; Size of program.
BOOTDTADR:  DW      TAPECOPY                                             ; Load address of program.
BOOTEXADR:  DW      EXECSTART                                            ; Exec address of program.
BOOTCOMNT:  DS      104         

            ORG     PRGSTART

TAPECOPY:   JP      000DAH              ; Cold start entry - JP to initialization

            JP      00120H

            JP      004FEH

            JP      004FAH

            JP      00531H

            JP      00502H

            JP      00533H

            JP      004DAH

            JP      004DAH

            JP      002F0H

            JP      004A0H

            JP      00A3BH

            JP      00A3FH

            JP      00A7AH

            JP      00A7EH

            JP      00A94H

            JP      008E4H

            JP      00D5AH

            EX      DE,HL
            NOP     
            JP      00DE4H

            JP      00DA7H

            JP      00A13H

            JP      00A04H

            JP      009B7H

            JP      009D2H

            DB      0C3H
            DB      020H
            DB      001H
            DS      2, 000H
            DB      0FFH
            DB      000H
            DB      0C3H
            DB      0DAH
            DB      004H
L1254:      DS      3, 000H
            DB      018H
            DB      0C3H
            DB      053H
            DB      002H
            DB      000H
            DB      027H
L125D:      DB      071H
            DS      2, 000H
            DB      0EFH
            DB      0C3H
            DB      06AH
            DB      00EH
            DS      3, 000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0FEH
            DB      007H
            DB      0F8H
            DB      007H
            DB      0E9H
            DB      000H
L1277:      DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      08DH
            DB      007H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      004H
            DB      008H
            DB      0B1H
            DB      007H
            DB      LSD6
            DB      007H
            DB      0B7H
            DB      007H
            DB      0DBH
            DB      007H
            DB      0F9H
            DB      006H
            DB      01EH
            DB      007H
            DB      0FBH
            DB      007H
            DB      0A6H
            DB      008H
            DB      0F8H
            DB      007H
            DB      0E9H
            DB      000H
L129D:      DB      08DH
            DB      007H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DB      000H
            DB      0E9H
            DS      52, 000H ; Zero padding / work area
            DI      
            LD      SP,MONIT
            IM      1
            OUT     (LSE1),A
            XOR     A
            LD      (L1819),A
L12E6:      JP      01822H

            RET     

            DI      
            OUT     (LSE3),A
            LD      A,(HL)
            OUT     (LSE1),A
            EI      
            RET     

            DI      
            OUT     (LSE3),A
            LD      (HL),A
            OUT     (LSE1),A
            EI      
            RET     

            PUSH    HL
            LD      HL,(00054H)
            PUSH    HL
            PUSH    DE
            CALL    005AEH
            POP     DE
            LD      (HL),000H
            POP     HL
            CALL    00120H
            JR      C,L131A             ; (+00eH)
            LD      A,(0005BH)
            SUB     L
            JR      NC,L131A            ; (+008H)
            NEG     
            LD      L,A
            LD      H,000H
            ADD     HL,DE
            EX      DE,HL
            OR      A
L131A:      POP     HL
            RET     

            DEC     D
L131D:      LD      D,010H
            JR      L12E6               ; (-03bH)

            PUSH    HL
L1322:      PUSH    DE
            JR      L1329               ; (+004H)

L1325:      POP     AF
L1326:      CALL    00A12H
L1329:      CALL    0025BH
            CP      00DH
            JP      Z,001D7H
            CP      01BH
            JP      Z,001ADH
            PUSH    AF
            CP      020H
            JR      NC,L138A            ; (+04fH)
            JR      L1390               ; (+053H)

L133D:      LD      A,(0004DH)
            OR      A
            JR      NZ,L1360            ; (+01dH)
            LD      A,(00EE9H)
            RRCA    
            JR      C,L1360             ; (+017H)
            LD      A,(0004EH)
            OR      A
            JR      NZ,L1360            ; (+011H)
            POP     AF
            LD      HL,00129H
            PUSH    HL
            CP      011H
            JP      Z,00655H
            CP      012H
            JP      Z,0067DH
            POP     HL
L135F:      PUSH    AF
L1360:      LD      A,(0004DH)
            OR      A
            JR      Z,L138A             ; (+024H)
            LD      HL,0011CH
            POP     AF
            LD      B,004H
L136C:      CP      (HL)
            JR      Z,L1326             ; (-049H)
            INC     HL
            DJNZ    L136C               ; (-006H)
            PUSH    AF
            LD      DE,(00054H)
            LD      HL,(0005BH)
            CP      014H
            JR      Z,L1386             ; (+008H)
            CP      012H
            JR      NZ,L138A            ; (+008H)
            LD      HL,(00056H)
            LD      E,D
L1386:      LD      A,L
            CP      E
            JR      NC,L1325            ; (-065H)
L138A:      POP     AF
            CALL    00533H
            JR      L1329               ; (-067H)

L1390:      LD      A,(00060H)
            CP      0FFH
            JR      NZ,L133D            ; (-05aH)
            POP     AF
            CP      017H
            JR      NC,L135F            ; (-03dH)
            CP      011H
            JR      C,L135F             ; (-041H)
            LD      HL,(00EE9H)
            BIT     6,L
            JR      Z,L135F             ; (-048H)
            CALL    0055EH
            JP      00129H

            SCF     
            PUSH    AF
            LD      A,00DH
            CALL    00533H
            POP     AF
            POP     DE
            POP     HL
            POP     BC
            RET     

            CALL    005AEH
L13BC:      LD      A,(HL)
            OR      A
            RET     Z
            DEC     HL
            DEC     E
            LD      A,(00056H)
            CP      E
            JR      C,L13BC             ; (-00bH)
            RET     

            CALL    005AEH
L13CB:      INC     E
            INC     HL
            LD      A,(HL)
            OR      A
            RET     Z
            LD      A,(00057H)
            CP      E
            JR      NC,L13CB            ; (-00bH)
            RET     

            LD      HL,(00054H)
            CALL    001B9H
            LD      D,E
            CALL    001CBH
            LD      A,(0005BH)
            LD      L,A
            LD      A,E
            SUB     D
            LD      E,A
            LD      H,D
            LD      D,L
            CALL    005B9H
            LD      A,(0005CH)
            SUB     D
            INC     A
            LD      D,A
            POP     BC
            PUSH    BC
            EXX     
            PUSH    HL
            LD      HL,(0004FH)
            EXX     
L13FB:      PUSH    DE
            PUSH    HL
            CALL    000EAH
            CALL    004B6H
            INC     HL
            LD      (BC),A
            INC     BC
            EXX     
            DEC     L
            JR      Z,L141D             ; (+013H)
            EXX     
L140B:      DEC     D
            JP      NZ,001FDH
            POP     HL
            PUSH    BC
            LD      BC,00028H
L1414:      ADD     HL,BC
            POP     BC
            POP     DE
            DEC     E
            JR      NZ,L13FB            ; (-01fH)
            PUSH    DE
            PUSH    HL
L141C:      EXX     
L141D:      EXX     
            POP     HL
            POP     DE
            EXX     
            POP     HL
            EXX     
            XOR     A
            LD      (BC),A
            LD      L,C
            LD      H,B
            POP     DE
            PUSH    DE
            PUSH    HL
            OR      A
            SBC     HL,DE
            LD      B,L
            POP     HL
            LD      A,020H
            LD      D,A
            JP      Z,001AEH
            DEC     HL
L1436:      LD      A,(HL)
            OR      A
            JR      Z,L143F             ; (+005H)
            CP      D
            JR      NZ,L1446            ; (+009H)
            LD      (HL),000H
L143F:      DEC     HL
            DJNZ    L1436               ; (-00cH)
            OR      A
            JP      001AEH

L1446:      LD      A,(HL)
            OR      A
            JR      NZ,L144C            ; (+002H)
            LD      (HL),020H
L144C:      DEC     HL
            DJNZ    L1446               ; (-009H)
            OR      A
            JP      001AEH

            INC     A
            JP      Z,002D8H
            DEC     A
            JP      Z,002F0H
            CALL    002FAH
            PUSH    BC
            PUSH    HL
            PUSH    DE
            CALL    005B6H
            CALL    000EAH
            LD      D,A
            LD      A,(00060H)
            LD      E,A
            CALL    000F2H
            XOR     A
            DI      
            OUT     (LSE3),A
            LD      (MMAPIO),A
            CPL     
            LD      (MMAPIO),A
            OUT     (LSE1),A
            EI      
            LD      C,000H
            EX      AF,AF'
            PUSH    AF
            CALL    00333H
L1484:      LD      A,060H
L1486:      EX      AF,AF'
L1487:      LD      B,010H
L1489:      CALL    00313H
            CALL    00333H
            BIT     1,A
            JR      NZ,L1487            ; (-00cH)
            DJNZ    L1489               ; (-00cH)
            BIT     0,A
            JR      Z,L14AA             ; (+011H)
            BIT     2,A
            JR      NZ,L14BB            ; (+01eH)
            EX      AF,AF'
            DEC     A
            JR      NZ,L1486            ; (-01bH)
            LD      A,000H
            OR      A
            JR      NZ,L1487            ; (-01fH)
            LD      A,006H
            JR      L14BD               ; (+013H)

L14AA:      PUSH    HL
            PUSH    DE
            PUSH    BC
            LD      HL,00EF2H
            LD      DE,00EE8H
            LD      BC,0000AH
            LDIR    
            POP     BC
            POP     DE
            POP     HL
L14BB:      LD      A,060H
L14BD:      LD      (00285H),A
L14C0:      CALL    00313H
            CALL    00371H
            OR      A
            JR      Z,L14C0             ; (-009H)
            LD      (0005FH),A
            LD      C,A
            LD      A,D
            CALL    000F2H
            POP     AF
            EX      AF,AF'
            LD      A,C
            POP     DE
            POP     HL
            POP     BC
            RET     

            CALL    002FAH
            PUSH    HL
L14DC:      LD      HL,(0005FH)
            CALL    00371H
            OR      A
            JR      Z,L14EB             ; (+006H)
            CP      L
            JR      NZ,L14EB            ; (+003H)
            POP     HL
            XOR     A
            RET     

L14EB:      POP     HL
            LD      (0005FH),A
            RET     

            CALL    002FAH
            CALL    00371H
            LD      (0005FH),A
            RET     

            PUSH    HL
            LD      HL,(00ED0H)
            LD      A,L
            CP      H
            POP     HL
L1501:      RET     Z
            EX      (SP),HL
            PUSH    BC
            INC     A
            LD      (00ED0H),A
            LD      L,A
            LD      H,000H
            LD      BC,00ED2H
            ADD     HL,BC
            LD      A,(HL)
            POP     BC
            POP     HL
            RET     

            DI      
            OUT     (LSE3),A
            LD      A,(0E002H)
            OUT     (LSE1),A
L151B:      EI      
            RLCA    
            RLCA    
            LD      A,C
            JR      C,L152A             ; (+009H)
            OR      A
L1522:      RET     Z
            LD      C,000H
            LD      A,D
            CALL    000F2H
            RET     

L152A:      DEC     A
            RET     Z
            LD      C,001H
            LD      A,E
            CALL    000F2H
            RET     

            PUSH    BC
            PUSH    HL
            PUSH    DE
            LD      DE,00EF2H
            LD      HL,00EE8H
            LD      BC,00A00H
            DI      
            OUT     (LSE3),A
L1542:      LD      A,B
            ADD     A,0EFH
            LD      (MMAPIO),A
            CP      0F8H
            LD      A,(0E001H)
            JR      NZ,L1551            ; (+002H)
            OR      07FH
L1551:      CP      0FFH
            JR      Z,L1557             ; (+002H)
            SET     0,C
L1557:      EX      DE,HL
            CP      (HL)
            LD      (HL),A
            EX      DE,HL
            JR      Z,L155F             ; (+002H)
            SET     1,C
L155F:      CPL     
            AND     (HL)
            JR      Z,L1565             ; (+002H)
            SET     2,C
L1565:      INC     HL
            INC     DE
            DJNZ    L1542               ; (-027H)
            LD      A,C
L156A:      OUT     (LSE1),A
            EI      
L156D:      POP     DE
            POP     HL
            POP     BC
            RET     

            PUSH    BC
            PUSH    HL
            PUSH    DE
            LD      HL,00EE8H
            LD      DE,00EF2H
            PUSH    HL
            PUSH    DE
            LD      BC,0000AH
            LDIR    
            POP     HL
            POP     DE
            LD      BC,00AF9H
            DI      
            OUT     (LSE3),A
            LD      A,C
            LD      (MMAPIO),A
            NOP     
            LD      A,(0E001H)
            LD      (DE),A
L1592:      LD      A,C
            LD      (MMAPIO),A
            CP      0F8H
            LD      A,(0E001H)
            LD      (DE),A
            JR      Z,L15C1             ; (+023H)
            CPL     
            AND     (HL)
L15A0:      LD      (HL),A
            INC     DE
L15A2:      INC     HL
            DEC     C
            DJNZ    L1592               ; (-014H)
            OUT     (LSE1),A
            EI      
            LD      BC,00A00H
L15AC:      DEC     HL
            LD      A,(HL)
            OR      A
            JR      NZ,L15E4            ; (+033H)
            INC     C
            DJNZ    L15AC               ; (-008H)
            LD      B,00AH
L15B6:      DEC     DE
            LD      A,(DE)
            CP      0FFH
            JR      NZ,L15C4            ; (+008H)
L15BC:      DJNZ    L15B6               ; (-008H)
L15BE:      XOR     A
            JR      L156A               ; (-057H)

L15C1:      XOR     A
            JR      L15A0               ; (-024H)

L15C4:      LD      A,B
            CP      002H
            JR      NZ,L15D2            ; (+009H)
            LD      A,(DE)
            AND     081H
            JR      NZ,L15BC            ; (-012H)
            LD      A,01BH
            JR      L156A               ; (-068H)

L15D2:      CP      001H
            JR      Z,L15BE             ; (-018H)
            CP      000H
            JR      NZ,L15BC            ; (-01eH)
            LD      A,(DE)
            AND     001H
            JR      NZ,L15BC            ; (-023H)
            LD      A,(0005FH)
            JR      L156A               ; (-07aH)

L15E4:      PUSH    AF
            LD      A,B
            LD      (003D7H),A
            LD      A,(HL)
L15EA:      LD      (003DCH),A
            POP     AF
            DEC     B
L15EF:      JR      NZ,L1629            ; (+038H)
            CALL    00496H
            LD      A,(00EE9H)
            BIT     6,A
            JR      Z,L15BE             ; (-03dH)
            BIT     0,A
            LD      A,B
            JR      NZ,L1602            ; (+002H)
            ADD     A,005H
L1602:      LD      L,A
            LD      H,000H
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,HL
            LD      BC,L1322
            ADD     HL,BC
            LD      DE,00ED0H
            XOR     A
            LD      (DE),A
            INC     DE
            LD      BC,00010H
            LDIR    
            LD      A,(00ED1H)
            OR      A
            JP      Z,003BEH
            DEC     A
            LD      (00ED1H),A
            LD      A,(00ED2H)
            JP      0036AH

L1629:      CALL    00496H
            LD      L,C
            LD      H,000H
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,HL
            LD      C,B
            LD      B,000H
            ADD     HL,BC
            LD      A,(00EE9H)
            BIT     6,A
            LD      BC,0121DH
            JR      Z,L166F             ; (+02fH)
            PUSH    AF
            LD      A,(00060H)
            CP      043H
            JR      NZ,L164E            ; (+006H)
            EX      (SP),HL
            LD      A,001H
            XOR     H
            LD      H,A
            EX      (SP),HL
L164E:      POP     AF
            BIT     0,A
            JR      NZ,L1656            ; (+003H)
            LD      BC,L125D
L1656:      LD      A,(00060H)
            CP      0FFH
            JR      NZ,L166A            ; (+00dH)
            LD      BC,012DDH
            LD      A,(00EE9H)
            BIT     0,A
            JR      Z,L166A             ; (+003H)
            LD      BC,L129D
L166A:      ADD     HL,BC
            LD      A,(HL)
            JP      0036AH

L166F:      ADD     HL,BC
            LD      A,(HL)
L1671:      CP      020H
            JP      C,0036AH
            LD      HL,L131D
            LD      B,005H
L167B:      CP      (HL)
            JR      Z,L1690             ; (+012H)
L167E:      INC     HL
            DJNZ    L167B               ; (-006H)
            CP      040H
            JP      C,003BEH
            CP      05BH
            JP      NC,003BEH
            SUB     040H
            JP      0036AH

L1690:      LD      A,020H
            SUB     B
            JP      0036AH

            LD      B,008H
L1698:      RRCA    
            JR      C,L169E             ; (+003H)
L169B:      DJNZ    L1698               ; (-005H)
            RET     

L169E:      DEC     B
            RET     

L16A0:      LD      A,LSE8
            DI      
            OUT     (LSE3),A
            LD      (MMAPIO),A
            NOP     
            LD      A,(0E001H)
            OUT     (LSE1),A
            EI      
            AND     081H
            RET     Z
            RLCA    
            RET     C
            JR      L16A0               ; (-016H)

            PUSH    HL
            PUSH    BC
L16B8:      LD      HL,00EFCH
            LD      B,000H
L16BD:      CP      (HL)
L16BE:      JR      Z,L16C7             ; (+007H)
            INC     HL
            DJNZ    L16BD               ; (-006H)
            XOR     A
            POP     BC
            POP     HL
            RET     

L16C7:      LD      A,000H
            SUB     B
            POP     BC
            POP     HL
            RET     

            PUSH    HL
            PUSH    BC
            LD      C,A
            LD      B,000H
            LD      HL,00EFCH
            ADD     HL,BC
            LD      A,(HL)
            POP     BC
            POP     HL
            RET     

            PUSH    DE
L16DB:      LD      A,(DE)
            OR      A
            JR      Z,L16E5             ; (+006H)
            CALL    00533H
            INC     DE
            JR      L16DB               ; (-00aH)

L16E5:      POP     DE
            RET     

            PUSH    HL
            LD      HL,(00054H)
            LD      A,(0005BH)
L16EE:      CP      L
            JR      C,L16F8             ; (+007H)
            PUSH    DE
            CALL    005AEH
            LD      A,(HL)
            OR      A
            POP     DE
L16F8:      POP     HL
            RET     

            CALL    004E7H
            RET     Z
            LD      A,00DH
            JR      L1733               ; (+031H)

L1702:      CALL    PRNTS
            LD      A,(00054H)
L1708:      SUB     00AH
            JR      NC,L1708            ; (-004H)
            ADD     A,00AH
            RET     Z
            JR      L1702               ; (-00fH)

            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            DEC     E
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            DEC     C
L171F:      NOP     
            NOP     
            NOP     
            LD      A,(BC)
            INC     BC
            JR      NZ,L1734            ; (+00eH)
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
L172C:      DEC     C
            NOP     
            NOP     
            NOP     
            NOP     
            LD      A,020H
L1733:      PUSH    HL
L1734:      PUSH    DE
            PUSH    BC
            PUSH    AF
            CALL    0056DH
            LD      A,(0004DH)
            OR      A
            JR      Z,L1759             ; (+019H)
            POP     AF
            PUSH    AF
            CP      020H
            JR      NC,L1754            ; (+00eH)
            LD      L,A
            LD      H,000H
            LD      DE,00511H
            ADD     HL,DE
            LD      A,(HL)
            OR      A
            CALL    NZ,L167E
            JR      L1759               ; (+005H)

L1754:      POP     AF
            PUSH    AF
            CALL    L1762
L1759:      POP     AF
            POP     BC
            POP     DE
            POP     HL
            RET     

            PUSH    HL
            PUSH    DE
            PUSH    BC
            PUSH    AF
L1762:      CALL    00572H
            LD      A,(0004DH)
            OR      A
            JR      NZ,L1754            ; (-017H)
            JR      L1759               ; (-014H)

            CP      020H
            JP      C,005D2H
L1772:      LD      HL,(00054H)
            PUSH    HL
            PUSH    AF
            CALL    005B9H
            POP     AF
            CALL    004CDH
            CALL    000F2H
            SET     3,H
            LD      A,(0005DH)
            CALL    000F2H
            POP     HL
            INC     L
            LD      A,(0005CH)
            CP      L
            JP      NC,007D2H
            LD      A,(0005BH)
            LD      L,A
            INC     H
            PUSH    HL
            CALL    005AEH
            LD      (HL),001H
            POP     HL
            LD      A,(00057H)
            CP      H
            JP      NC,007D2H
            LD      H,A
            PUSH    HL
            CALL    006A5H
            POP     HL
            JP      007D2H

            LD      E,H
            LD      D,000H
            LD      HL,000A7H
            ADD     HL,DE
            RET     

            LD      HL,(00054H)
            PUSH    DE
            CALL    005C5H
            LD      D,LSD0
            ADD     HL,DE
            POP     DE
            RET     

            LD      HL,(00054H)
            LD      E,L
            LD      L,H
            LD      H,000H
            LD      C,L
            LD      B,H
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,BC
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,HL
            RET     

            LD      L,A
L17D3:      LD      H,000H
            ADD     HL,HL
            LD      BC,00067H
            ADD     HL,BC
            LD      C,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,C
            JP      (HL)

            LD      BC,00028H
L17E2:      LD      (005F0H),BC
            EXX     
            PUSH    BC
            EXX     
L17E9:      LD      B,H
            LD      C,L
            DEC     D
            JR      Z,L1817             ; (+029H)
            PUSH    DE
            LD      HL,00028H
            ADD     HL,BC
            PUSH    HL
            PUSH    HL
            EXX     
            POP     BC
            EXX     
            DI      
L17F9:      OUT     (LSE3),A
L17FB:      EXX     
            LD      A,(BC)
            EXX     
            LD      (BC),A
            EXX     
L1800:      RES     3,B
            LD      A,(BC)
L1803:      SET     3,B
            INC     BC
            EXX     
            RES     3,B
            LD      (BC),A
            SET     3,B
            INC     BC
            DEC     E
L180E:      JR      NZ,L17FB            ; (-015H)
            OUT     (LSE1),A
            EI      
            POP     HL
            POP     DE
            JR      L17E9               ; (-02eH)

L1817:      LD      H,B
            LD      L,C
L1819:      LD      BC,(0005DH)
            DI      
            OUT     (LSE3),A
L1820:      LD      (HL),C
            RES     3,H
            LD      (HL),B
            SET     3,H
            INC     HL
            DEC     E
            JR      NZ,L1820            ; (-00aH)
            OUT     (LSE1),A
            EI      
            EXX     
            POP     BC
            EXX     
            RET     

            LD      A,0B0H
            JR      L1837               ; (+002H)

            LD      A,0B8H
L1837:      LD      (00651H),A
            LD      BC,00028H
            PUSH    HL
            PUSH    DE
            PUSH    BC
            CALL    0064EH
            POP     BC
            POP     DE
            POP     HL
            LD      A,008H
L1848:      XOR     H
            LD      H,A
            LD      A,008H
            XOR     D
L184D:      LD      D,A
            OUT     (LSE3),A
            LDIR    
            OUT     (LSE1),A
            RET     

            LD      HL,VRAM
            LD      DE,0D7D0H
            DI      
            CALL    00631H
L185F:      LD      HL,0D028H
            LD      DE,VRAM
            LD      B,032H
L1867:      PUSH    BC
            CALL    00631H
            POP     BC
            DJNZ    L1867               ; (-007H)
            EI      
            LD      HL,000A7H
L1872:      LD      E,L
            LD      D,H
            LD      A,(HL)
            INC     HL
L1876:      LD      BC,00031H
            LDIR    
            LD      (DE),A
            RET     

            LD      HL,0D7CFH
            LD      DE,0D7F7H
            DI      
            LD      B,032H
L1886:      PUSH    BC
            CALL    00635H
            POP     BC
            DJNZ    L1886               ; (-007H)
            LD      HL,0D7D0H
            LD      DE,VRAM
            CALL    00631H
            EI      
            LD      HL,000D9H
            LD      E,L
            LD      D,H
            DEC     HL
            LD      A,(DE)
            LD      BC,00031H
            LDDR    
            LD      (DE),A
            RET     

            LD      A,(0004EH)
            OR      A
            JR      NZ,L18D5            ; (+02aH)
            LD      HL,0D3E8H
            LD      DE,0D3E9H
            LD      BC,RDINF
            DI      
            OUT     (LSE3),A
            LD      (HL),000H
            LDIR    
            LD      HL,0DBE8H
            LD      DE,0DBE9H
            LD      BC,RDINF
            LD      A,(0005DH)
            LD      (HL),A
            LDIR    
            OUT     (LSE1),A
            EI      
            CALL    00655H
            XOR     A
            LD      (000C0H),A
            RET     

L18D5:      CALL    00704H
            CALL    005DFH
            LD      A,(00056H)
            LD      H,A
            CALL    005AEH
            LD      A,(00057H)
            SUB     E
            LD      B,A
            LD      (HL),000H
            INC     HL
            OR      A
            JR      Z,L18F6             ; (+009H)
            LD      D,H
            LD      E,L
            INC     DE
L18F0:      LD      A,(DE)
            INC     DE
            LD      (HL),A
            INC     HL
            DJNZ    L18F0               ; (-006H)
L18F6:      LD      (HL),000H
            RET     

            LD      A,(0005BH)
            LD      L,A
            LD      A,(00056H)
            LD      H,A
            JP      007D2H

            CALL    006F9H
            CALL    005C5H
            LD      D,0D8H
            ADD     HL,DE
            LD      A,(0005CH)
            SUB     E
            INC     A
            LD      E,A
            LD      A,(00056H)
            LD      D,A
            LD      A,(00057H)
            SUB     D
            INC     A
            LD      D,A
            RET     

            LD      A,(0004EH)
            OR      A
            JR      NZ,L1957            ; (+033H)
            LD      HL,VRAM
            LD      DE,0D001H
            LD      BC,007F8H
            DI      
            OUT     (LSE3),A
            LD      (HL),000H
L1932:      LDIR    
            LD      HL,ARAM
            LD      DE,0D801H
            LD      BC,007F8H
            LD      A,(0005DH)
            LD      (HL),A
            LDIR    
            OUT     (LSE1),A
            EI      
            LD      HL,000A7H
            LD      B,033H
            XOR     A
L194C:      LD      (HL),A
            INC     HL
            DJNZ    L194C               ; (-004H)
            LD      HL,MONIT
            LD      (00054H),HL
            RET     

L1957:      CALL    00704H
L195A:      PUSH    DE
            PUSH    HL
            LD      A,(0005DH)
            DI      
            OUT     (LSE3),A
L1962:      LD      (HL),A
            RES     3,H
            LD      (HL),000H
            SET     3,H
            INC     HL
            DEC     E
            JR      NZ,L1962            ; (-00bH)
            OUT     (LSE1),A
            EI      
            POP     HL
            LD      BC,00028H
            ADD     HL,BC
            POP     DE
            DEC     D
            JR      NZ,L195A            ; (-01fH)
            LD      A,(00056H)
            LD      H,A
            CALL    005AEH
            LD      A,(00057H)
            SUB     E
            ADD     A,002H
            LD      B,A
            XOR     A
L1988:      LD      (HL),A
L1989:      INC     HL
            DJNZ    L1988               ; (-004H)
            RET     

            LD      HL,(00054H)
            LD      A,(0005DH)
            AND     07FH
            LD      (0005DH),A
            PUSH    HL
            INC     H
            CALL    005AEH
            LD      A,(00057H)
            LD      D,A
L19A1:      LD      A,(HL)
            OR      A
            JR      Z,L19AB             ; (+006H)
            INC     HL
            INC     E
            LD      A,D
            CP      E
            JR      NC,L19A1            ; (-00aH)
L19AB:      DEC     E
            POP     HL
            LD      H,E
            JP      007C1H

            LD      HL,(00054H)
            JP      007C5H

            LD      HL,(00054H)
            INC     L
            LD      A,(0005CH)
            CP      L
            JR      NC,L19D2            ; (+011H)
            LD      A,(0005BH)
            LD      L,A
            INC     H
            LD      A,(00057H)
            CP      H
            JR      NC,L19D2            ; (+006H)
            LD      H,A
            PUSH    HL
            CALL    006A5H
            POP     HL
L19D2:      LD      (00054H),HL
            RET     

            LD      HL,(00054H)
            JR      L19E8               ; (+00dH)

            LD      HL,(00054H)
            LD      A,(0005BH)
            CP      L
            JR      C,019F3H             ; (+00fH)
            LD      A,(0005CH)
            LD      L,A
L19E8:      LD      A,(00056H)
            CP      H
            JR      C,019F5H             ; (+007H)
            LD      A,(00056H)
            LD      H,A
            LD      A,02DH
            LD      A,025H
            JR      L19D2               ; (-026H)

            LD      A,0EFH
            LD      HL,0FF3EH
            LD      HL,L433E
            LD      (00060H),A
            RET     

            LD      HL,(00054H)
            LD      BC,(0005BH)
            LD      A,L
            DEC     L
            INC     C
            CP      C
            JR      NC,L1A1D            ; (+00cH)
            PUSH    HL
            CALL    005AEH
            LD      A,(HL)
            POP     HL
            INC     L
            OR      A
            JR      Z,L1A56             ; (+03bH)
            LD      L,B
            DEC     H
L1A1D:      LD      DE,(00054H)
            LD      (00054H),HL
            EX      DE,HL
            LD      A,(0005BH)
            CP      L
            JR      C,L1A4F             ; (+024H)
L1A2B:      PUSH    HL
            CALL    005AEH
            LD      A,(HL)
            POP     HL
            OR      A
            JR      Z,L1A43             ; (+00fH)
            CALL    00864H
            PUSH    HL
            LD      A,(0005CH)
            LD      L,A
            DEC     H
            CALL    00880H
            POP     HL
            JR      L1A56               ; (+013H)

L1A43:      LD      A,(0005CH)
            LD      L,A
            DEC     H
            LD      DE,(0005DH)
            JP      00880H

L1A4F:      CALL    00864H
            DEC     BC
            CALL    0087BH
L1A56:      INC     L
            LD      A,(0005CH)
            CP      L
            JR      NC,L1A4F            ; (-00eH)
            LD      A,(0005BH)
            LD      L,A
            INC     H
            JR      L1A2B               ; (-039H)

            PUSH    HL
            CALL    005C5H
            LD      D,0D8H
            ADD     HL,DE
L1A6B:      CALL    000EAH
            LD      E,A
            RES     3,H
            CALL    000EAH
            SET     3,H
L1A76:      LD      D,A
            LD      C,L
            LD      B,H
            POP     HL
            RET     

            PUSH    HL
            LD      L,C
            LD      H,B
            JR      L1A89               ; (+009H)

            PUSH    HL
            PUSH    DE
            CALL    005C5H
            LD      D,0D8H
            ADD     HL,DE
            POP     DE
L1A89:      LD      A,E
            CALL    000F2H
            RES     3,H
            LD      A,D
            CALL    000F2H
            SET     3,H
            LD      C,L
            LD      B,H
            POP     HL
            RET     

            LD      HL,(00054H)
            CALL    001C8H
            DEC     E
            LD      H,E
            LD      A,(0005CH)
            LD      L,A
            RET     

            CALL    00899H
            CALL    00864H
            LD      A,0F0H
            CP      D
            JR      Z,L1AB4             ; (+003H)
            XOR     A
            CP      D
            RET     NZ
L1AB4:      LD      BC,(0005BH)
            EX      DE,HL
            LD      HL,(00054H)
            OR      A
            SBC     HL,DE
            EX      DE,HL
            JR      Z,L1ADD             ; (+01bH)
            LD      A,C
            CP      L
            JR      NC,L1AD0            ; (+00aH)
            DEC     L
            CALL    00864H
            INC     BC
            CALL    0087BH
            JR      L1AB4               ; (-01cH)

L1AD0:      PUSH    HL
            LD      L,B
            DEC     H
            CALL    00864H
            EX      (SP),HL
            CALL    00880H
            POP     HL
            JR      L1AB4               ; (-029H)

L1ADD:      LD      DE,(0005DH)
            JP      00880H

            PUSH    BC
            PUSH    DE
            PUSH    HL
            LD      A,002H
            LD      (00A38H),A
            LD      B,001H
L1AEE:      LD      A,(DE)
            CP      00DH
            JR      Z,L1B31             ; (+03eH)
            OR      A
            JR      Z,L1B31             ; (+03bH)
            CP      0C8H
            JR      Z,L1B31             ; (+037H)
            CP      0CFH
            JR      Z,L1B25             ; (+027H)
            CP      02DH
            JR      Z,L1B25             ; (+023H)
            CP      02BH
            JR      Z,L1B2D             ; (+027H)
            CP      LSD7
            JR      Z,L1B2D             ; (+023H)
            CP      023H
            LD      HL,00991H
            JR      NZ,L1B15            ; (+004H)
            LD      HL,0099FH
            INC     DE
L1B15:      CALL    0093DH
            JR      C,L1AEE             ; (-02cH)
            CALL    009E2H
            JR      C,L1B34             ; (+015H)
            CALL    009B7H
            LD      B,C
            JR      L1AEE               ; (-037H)

L1B25:      LD      A,003H
L1B27:      LD      (00A38H),A
            INC     DE
            JR      L1AEE               ; (-03fH)

L1B2D:      LD      A,001H
            JR      L1B27               ; (-00aH)

L1B31:      CALL    009E2H
L1B34:      PUSH    AF
            CALL    009D2H
            POP     AF
            POP     HL
            POP     DE
            POP     BC
            RET     

            LD      A,(DE)
            INC     DE
            CP      052H
            JR      Z,L1B5E             ; (+01bH)
            SUB     041H
            RET     C
            CP      007H
            CCF     
            RET     C
            PUSH    DE
            LD      E,A
            LD      D,000H
            EX      DE,HL
            ADD     HL,HL
            ADD     HL,DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            EX      DE,HL
            LD      A,(00A38H)
L1B58:      DEC     A
            JR      Z,L1B62             ; (+007H)
            ADD     HL,HL
            JR      L1B58               ; (-006H)

L1B5E:      PUSH    DE
            LD      HL,MONIT
L1B62:      LD      (00A39H),HL
            LD      HL,00A38H
            LD      (HL),002H
            DEC     HL
            POP     DE
            LD      A,(DE)
            PUSH    BC
            LD      B,A
            AND     0F0H
            CP      030H
            JR      Z,L1B78             ; (+003H)
            LD      A,(HL)
            JR      L1B7D               ; (+005H)

L1B78:      INC     DE
            LD      A,B
            AND     00FH
L1B7C:      LD      (HL),A
L1B7D:      LD      HL,009ADH
            LD      C,A
            LD      B,000H
            ADD     HL,BC
            LD      C,(HL)
            LD      A,(00A32H)
            LD      B,A
            XOR     A
L1B8A:      ADD     A,C
            DJNZ    L1B8A               ; (-003H)
            POP     BC
            LD      C,A
            XOR     A
            RET     

            CALL    PE,L6404
            INC     B
            LD      B,(HL)
            EX      AF,AF'
            LD      E,A
            RLCA    
            SUB     C
            LD      B,033H
            LD      B,086H
            DEC     B
            AND     L
            INC     B
            INC     HL
            INC     B
            RST     008H
            RLCA    
            PUSH    AF
            LD      B,033H
            LD      B,0DAH
            DEC     B
            SCF     
            DEC     B
            LD      BC,00302H
            INC     B
            LD      B,008H
            INC     C
            DJNZ    01BCEH               ; (+018H)
            JR      NZ,L1BE2            ; (+02aH)
            ADD     HL,SP
            LD      A,(BC)
            LD      A,H
            OR      L
            JR      Z,L1BD2             ; (+014H)
            PUSH    DE
            EX      DE,HL
            LD      HL,0E004H
            DI      
            OUT     (LSE3),A
            LD      (HL),E
            LD      (HL),D
            LD      A,001H
            LD      (MEMSWAP),A
            OUT     (LSE1),A
            EI      
            POP     DE
            RET     

L1BD2:      LD      A,036H
            DI      
            OUT     (LSE3),A
            LD      (0E007H),A
            XOR     A
            LD      (MEMSWAP),A
            OUT     (LSE1),A
            EI      
            RET     

L1BE2:      LD      HL,MMAPIO
            DI      
            OUT     (LSE3),A
            LD      (HL),0F8H
            INC     HL
            LD      A,(HL)
L1BEC:      AND     081H
            SCF     
            JR      Z,L1C00             ; (+00fH)
L1BF1:      LD      A,(MEMSWAP)
            RRCA    
            JR      C,L1BF1             ; (-006H)
L1BF7:      LD      A,(MEMSWAP)
            RRCA    
            JR      NC,L1BF7            ; (-006H)
            DJNZ    L1BF1               ; (-00eH)
            XOR     A
L1C00:      OUT     (LSE1),A
            EI      
            RET     

            PUSH    AF
            PUSH    BC
            AND     00FH
            LD      B,A
            LD      A,008H
            SUB     B
            LD      (00A32H),A
            POP     BC
            POP     AF
            RET     

            XOR     A
            PUSH    HL
            LD      HL,003F8H
            JR      Z,L1C22             ; (+009H)
            CP      001H
            JR      Z,L1C2D             ; (+010H)
            CALL    009BAH
            POP     HL
            RET     

L1C22:      CALL    009BAH
            LD      HL,02710H
L1C28:      DEC     HL
            LD      A,H
            OR      L
            JR      NZ,L1C28            ; (-005H)
L1C2D:      CALL    009D2H
            POP     HL
            RET     

            INC     B
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            LD      A,0CCH
            JR      L1C41               ; (+002H)

L1C3F:      LD      A,053H
L1C41:      PUSH    DE
            LD      E,A
            LD      D,LSD7
            LD      A,B
            OR      C
            JR      Z,L1C71             ; (+028H)
            CALL    00AACH
            CALL    00ACEH
            JR      C,L1C6E             ; (+01dH)
            LD      A,E
            CP      0CCH
            JR      NZ,L1C67            ; (+011H)
            LD      A,(00050H)
            OR      A
            JR      NZ,L1C67            ; (+00bH)
            CALL    NL
            PUSH    DE
            LD      DE,L1803
            CALL    016C8H
L1C66:      POP     DE
L1C67:      DI      
            CALL    00B5AH
            CALL    NC,00B85H
L1C6E:      CALL    00B3BH
L1C71:      POP     DE
            PUSH    AF
            XOR     A
            LD      (00050H),A
            POP     AF
            RET     

            RET     

            LD      A,0CCH
            JR      L1C80               ; (+002H)

            LD      A,053H
L1C80:      PUSH    DE
            LD      D,LSD2
            LD      E,A
            LD      A,B
L1C85:      OR      C
            JR      Z,L1C71             ; (-017H)
            CALL    00ACEH
            DI      
            CALL    NC,00C2AH
            CALL    NC,00C66H
            JR      L1C6E               ; (-026H)

            PUSH    DE
            LD      D,LSD2
            LD      E,053H
            LD      A,B
            OR      C
            JR      Z,L1C71             ; (-02cH)
            CALL    00AACH
            CALL    00ACEH
            DI      
            CALL    NC,00C2AH
            CALL    NC,00CDFH
            JR      L1C6E               ; (-03eH)

            PUSH    BC
            PUSH    DE
            PUSH    HL
            LD      DE,MONIT
L1CB2:      LD      A,B
            OR      C
            JR      NZ,L1CBF            ; (+009H)
            EX      DE,HL
            LD      (00EBFH),HL
            LD      (00EC1H),HL
            JR      L1D37               ; (+078H)

L1CBF:      LD      A,(HL)
            PUSH    BC
            LD      B,008H
L1CC3:      RLCA    
            JR      NC,L1CC7            ; (+001H)
            INC     DE
L1CC7:      DJNZ    L1CC3               ; (-006H)
            POP     BC
            INC     HL
            DEC     BC
            JR      L1CB2               ; (-01cH)

            PUSH    BC
            PUSH    DE
            PUSH    HL
            LD      HL,MMAPIO
            LD      A,0F8H
            CALL    000F2H
            LD      B,00AH
L1CDB:      LD      HL,0E002H
            CALL    000EAH
            AND     010H
            JR      Z,L1CEF             ; (+00aH)
L1CE5:      LD      B,0A6H
L1CE7:      CALL    00D4CH
            DJNZ    L1CE7               ; (-005H)
            XOR     A
            JR      L1D37               ; (+048H)

L1CEF:      LD      HL,0E003H
            LD      A,006H
            CALL    000F2H
            INC     A
            CALL    000F2H
            DJNZ    L1CDB               ; (-022H)
            LD      A,(00050H)
            OR      A
            JR      NZ,L1D22            ; (+01fH)
            CALL    NL
            LD      A,07FH
            CALL    0055EH
            CALL    PRNTS
            LD      A,D
            CP      LSD7
            JR      NZ,L1D19            ; (+006H)
            LD      DE,00EC3H
            CALL    00051H
L1D19:      LD      DE,00ECBH
            CALL    00051H
            CALL    NL
L1D22:      LD      HL,0E002H
            CALL    000EAH
            AND     010H
            JR      NZ,L1CE5            ; (-047H)
            LD      HL,0E001H
            CALL    000EAH
            AND     080H
            JR      NZ,L1D22            ; (-014H)
            SCF     
L1D37:      POP     HL
            POP     DE
            POP     BC
            RET     

            PUSH    AF
            PUSH    BC
            LD      B,00AH
            DI      
            OUT     (LSE3),A
L1D42:      LD      A,(0E002H)
            AND     010H
            JR      Z,L1D54             ; (+00bH)
            LD      A,006H
            LD      (0E003H),A
            INC     A
            LD      (0E003H),A
            DJNZ    L1D42               ; (-012H)
L1D54:      OUT     (LSE1),A
            EI      
            POP     BC
            POP     AF
            RET     

            PUSH    BC
            PUSH    HL
            LD      A,E
            LD      BC,L2AF8
            LD      HL,L1414
            CP      0CCH
            JR      NZ,L1D6B            ; (+004H)
            LD      BC,055F0H
            ADD     HL,HL
L1D6B:      CALL    00BFEH
            DEC     BC
            LD      A,B
            OR      C
            JR      NZ,L1D6B            ; (-008H)
L1D73:      CALL    00BDFH
            DEC     H
            JR      NZ,L1D73            ; (-006H)
L1D79:      CALL    00BFEH
            DEC     L
            JR      NZ,L1D79            ; (-006H)
            CALL    00BDFH
            POP     HL
            POP     BC
            RET     

            PUSH    DE
            PUSH    BC
            PUSH    HL
            LD      D,002H
            LD      A,0F8H
            DI      
            OUT     (LSE3),A
            LD      (MMAPIO),A
            OUT     (LSE1),A
L1D94:      LD      A,(HL)
            CALL    00BCEH
            OUT     (LSE3),A
            LD      A,(0E001H)
            OUT     (LSE1),A
            AND     080H
            SCF     
            JR      Z,L1DCA             ; (+026H)
            INC     HL
            DEC     BC
            LD      A,B
            OR      C
            JP      NZ,00B94H
            LD      HL,(00EBFH)
            LD      A,H
            CALL    00BCEH
            LD      A,L
            CALL    00BCEH
            CALL    00BDFH
            XOR     A
            DEC     D
            JR      Z,L1DCA             ; (+00dH)
            LD      B,000H
L1DBF:      CALL    00BFEH
            DJNZ    L1DBF               ; (-005H)
            POP     HL
            POP     BC
            PUSH    BC
            PUSH    HL
            JR      L1D94               ; (-036H)

L1DCA:      POP     HL
            POP     BC
            POP     DE
            RET     

            PUSH    BC
            LD      B,008H
L1DD1:      CALL    00BDFH
L1DD4:      RLCA    
            CALL    C,00BDFH
            CALL    NC,00BFEH
            DJNZ    L1DD4               ; (-009H)
            POP     BC
            RET     

L1DDF:      PUSH    AF
            PUSH    HL
            LD      HL,0E003H
            LD      A,003H
            CALL    00C1CH
            LD      A,060H
            NOP     
            CALL    00D47H
            LD      A,002H
            CALL    00C1CH
            LD      A,06FH
            LD      A,05FH
            CALL    00D47H
            POP     HL
            POP     AF
            RET     

            PUSH    AF
            PUSH    HL
            LD      HL,0E003H
            LD      A,003H
            CALL    00C1CH
            LD      A,02EH
            CALL    00D47H
            LD      A,002H
            CALL    00C1CH
            LD      A,02BH
            NOP     
            NOP     
            CALL    00D47H
            POP     HL
            POP     AF
            RET     

            DI      
            OUT     (LSE3),A
            LD      (HL),A
            OUT     (LSE1),A
            RET     

            DI      
            OUT     (LSE3),A
            LD      A,(HL)
            OUT     (LSE1),A
            RET     

            PUSH    DE
            PUSH    BC
            PUSH    HL
            LD      A,E
            CP      0CCH
            LD      A,014H
            JR      NZ,L1E35            ; (+001H)
            ADD     A,A
L1E35:      LD      D,A
            LD      HL,0E002H
L1E39:      LD      E,D
L1E3A:      CALL    00D24H
            JR      C,L1E62             ; (+023H)
            CALL    00D44H
            CALL    00C23H
            AND     020H
            JR      Z,L1E39             ; (-010H)
            DEC     E
            JR      NZ,L1E3A            ; (-012H)
            LD      E,D
L1E4D:      CALL    00D24H
            JR      C,L1E62             ; (+010H)
            CALL    00D44H
            CALL    00C23H
            AND     020H
            JR      NZ,L1E39            ; (-023H)
            DEC     E
            JR      NZ,L1E4D            ; (-012H)
            CALL    00D24H
L1E62:      POP     HL
            POP     BC
            POP     DE
            RET     

            PUSH    DE
            PUSH    BC
            PUSH    HL
L1E69:      LD      D,002H
L1E6B:      LD      HL,0E002H
L1E6E:      CALL    00D24H
            JR      C,L1E62             ; (-011H)
            CALL    00D44H
            CALL    00C23H
            AND     020H
            JR      Z,L1E6E             ; (-00fH)
            LD      HL,MONIT
            LD      (00EBFH),HL
            POP     HL
            POP     BC
            PUSH    BC
            PUSH    HL
L1E87:      CALL    00CB3H
            JR      C,L1E62             ; (-02aH)
            LD      (HL),A
            INC     HL
            DEC     BC
            LD      A,B
            OR      C
            JR      NZ,L1E87            ; (-00cH)
            LD      HL,(00EBFH)
            CALL    00CB3H
            JR      C,L1E62             ; (-039H)
            LD      E,A
            CALL    00CB3H
            JR      C,L1E62             ; (-03fH)
            CP      L
            JR      NZ,L1EAB            ; (+007H)
            LD      A,E
            CP      H
            JR      NZ,L1EAB            ; (+003H)
            XOR     A
            JR      L1E62               ; (-049H)

L1EAB:      DEC     D
            JR      NZ,L1E6B            ; (-043H)
            LD      A,002H
            SCF     
            JR      L1E62               ; (-051H)

            PUSH    DE
            PUSH    BC
            PUSH    HL
            LD      HL,0E002H
            LD      DE,(00EBFH)
            LD      BC,00800H
L1EC0:      CALL    00D24H
            JR      C,L1F1B             ; (+056H)
            CALL    00D44H
            CALL    00C23H
            AND     020H
            JR      Z,L1ED1             ; (+002H)
            INC     DE
            SCF     
L1ED1:      RL      C
            DJNZ    L1EC0               ; (-015H)
            CALL    00D24H
            LD      (00EBFH),DE
            LD      A,C
            JR      L1F1B               ; (+03cH)

            PUSH    DE
            PUSH    BC
            PUSH    HL
L1EE2:      LD      D,002H
L1EE4:      LD      HL,0E002H
L1EE7:      CALL    00D24H
            JR      C,L1F1B             ; (+02fH)
            CALL    00D44H
            CALL    00C23H
            AND     020H
            JR      Z,L1EE7             ; (-00fH)
            POP     HL
            POP     BC
            PUSH    BC
            PUSH    HL
L1EFA:      CALL    00CB3H
            JR      C,L1F1B             ; (+01cH)
            CP      (HL)
            JR      NZ,L1F1F            ; (+01dH)
            INC     HL
            DEC     BC
            LD      A,B
            OR      C
            JR      NZ,L1EFA            ; (-00eH)
            LD      HL,(00EC1H)
            CALL    00CB3H
            CP      H
            JR      NZ,L1F1F            ; (+00eH)
            CALL    00CB3H
            CP      L
            JR      NZ,L1F1F            ; (+008H)
            DEC     D
            JR      NZ,L1EE4            ; (-036H)
            XOR     A
L1F1B:      POP     HL
            POP     BC
            POP     DE
L1F1E:      RET     

L1F1F:      LD      A,002H
            SCF     
            JR      L1F1B               ; (-009H)

            DI      
            OUT     (LSE3),A
L1F27:      DEC     L
            LD      A,(HL)
            INC     L
            RLCA    
            JR      NC,L1F40            ; (+013H)
            LD      A,(HL)
            AND     020H
            JR      NZ,L1F27            ; (-00bH)
L1F32:      DEC     L
            LD      A,(HL)
            INC     L
            RLCA    
            JR      NC,L1F40            ; (+008H)
            LD      A,(HL)
            AND     020H
            JR      Z,L1F32             ; (-00bH)
            OUT     (LSE1),A
            RET     

L1F40:      OUT     (LSE1),A
            SCF     
            RET     

            LD      A,044H
            NOP     
L1F47:      DEC     A
            JP      NZ,00D47H
            RET     

            PUSH    BC
            LD      B,024H
L1F4F:      CALL    00D56H
            DJNZ    L1F4F               ; (-005H)
            POP     BC
            RET     

            LD      A,03FH
            JR      L1F47               ; (-013H)

            DI      
            PUSH    BC
            PUSH    DE
            PUSH    HL
            LD      (00064H),A
            LD      HL,0A8C0H
            XOR     A
            SBC     HL,DE
            PUSH    HL
            NOP     
            EX      DE,HL
            LD      HL,0E007H
            OUT     (LSE3),A
            LD      (HL),074H
            LD      (HL),0B0H
            DEC     HL
            LD      (HL),E
            LD      (HL),D
            DEC     HL
            LD      (HL),00AH
            LD      (HL),000H
            INC     HL
            INC     HL
            LD      (HL),080H
            DEC     HL
L1F80:      LD      C,(HL)
            LD      A,(HL)
            CP      D
            JR      NZ,L1F80            ; (-005H)
            LD      A,C
            CP      E
            JR      NZ,L1F80            ; (-009H)
            DEC     HL
            NOP     
            NOP     
            NOP     
            LD      (HL),0FBH
            LD      (HL),03CH
            OUT     (LSE1),A
            INC     HL
            POP     DE
            OUT     (LSE3),A
L1F97:      LD      C,(HL)
            LD      A,(HL)
            OUT     (LSE1),A
            CP      D
            JR      NZ,L1F97            ; (-007H)
            LD      A,C
            CP      E
            JR      NZ,L1F97            ; (-00bH)
            POP     HL
            POP     DE
            POP     BC
L1FA5:      EI      
            RET     

            PUSH    HL
            DI      
            LD      HL,0E007H
            OUT     (LSE3),A
            LD      (HL),080H
            DEC     HL
            LD      E,(HL)
            LD      D,(HL)
            OUT     (LSE1),A
            EI      
            LD      A,E
            OR      D
L1FB8:      JR      Z,L1FC8             ; (+00eH)
            XOR     A
            LD      HL,0A8C0H
            SBC     HL,DE
            JR      C,L1FD2             ; (+010H)
L1FC2:      EX      DE,HL
            LD      A,(00064H)
            POP     HL
L1FC7:      RET     

L1FC8:      LD      DE,0A8C0H
L1FCB:      LD      A,(00064H)
            XOR     001H
            POP     HL
            RET     

L1FD2:      DI      
            LD      HL,0E006H
            OUT     (LSE3),A
            LD      A,(HL)
            CPL     
            LD      E,A
            LD      A,(HL)
            CPL     
            LD      D,A
            OUT     (LSE1),A
            EI      
            INC     DE
            JR      L1FCB               ; (-019H)

            DI      
            PUSH    AF
            PUSH    BC
            PUSH    DE
            PUSH    HL
            LD      HL,00064H
L1FEC:      LD      A,(HL)
            XOR     001H
            LD      (HL),A
            LD      HL,0E007H
            OUT     (LSE3),A
            LD      (HL),080H
            OUT     (LSE1),A
            DEC     HL
            PUSH    HL
            OUT     (LSE3),A
            LD      E,(HL)
            LD      D,(HL)
L1FFF:      OUT     (LSE1),A
            LD      HL,0A8C0H
            ADD     HL,DE
            DEC     HL
            DEC     HL
            EX      DE,HL
            POP     HL
            OUT     (LSE3),A
            LD      (HL),E
            LD      (HL),D
            OUT     (LSE1),A
            POP     HL
            POP     DE
            POP     BC
            POP     AF
            EI      
            RET     

            LD      A,04EH
            DEC     L
            RET     Z
            LD      A,056H
            DEC     L
            RET     Z
            LD      A,05EH
            DEC     L
            RET     Z
            LD      A,066H
            DEC     L
            RET     

            PUSH    DE
            LD      (00E45H),A
            LD      DE,0FFFFH
            LD      HL,0E002H
            DI      
            OUT     (LSE3),A
            BIT     7,(HL)
            JP      Z,00E32H
            BIT     7,(HL)
            JP      NZ,00E37H
            LD      L,008H
            LD      A,011H
L2040:      DEC     A
            JR      NZ,L2040            ; (-003H)
            INC     DE
            BIT     0,(HL)
            JP      Z,00E43H
            OUT     (LSE1),A
            EI      
            LD      A,D
            OR      A
L204E:      LD      A,E
            JR      Z,L2053             ; (+002H)
            LD      A,0FFH
L2053:      LD      (00066H),A
            POP     DE
            POP     HL
            SCF     
            RET     

            LD      A,04EH
            DEC     L
            RET     Z
            LD      A,056H
            DEC     L
            RET     Z
            LD      A,05EH
            DEC     L
            RET     Z
            LD      A,066H
            DEC     L
L2069:      RET     

            INC     A
            PUSH    HL
            LD      L,A
            CALL    00E15H
            JP      Z,00E25H
            CALL    00E5AH
            LD      (00EACH),A
            LD      (00E8AH),A
            LD      HL,0E002H
            DI      
            OUT     (LSE3),A
            BIT     7,(HL)
            JP      Z,00E82H
            LD      L,008H
            BIT     0,(HL)
            LD      A,L
            JP      Z,00E90H
            XOR     A
            LD      (00EB4H),A
            OUT     (LSE1),A
            LD      A,009H
L2097:      PUSH    AF
            XOR     A
L2099:      DEC     A
            JR      NZ,L2099            ; (-003H)
            POP     AF
            DEC     A
            JR      NZ,L2097            ; (-009H)
            OUT     (LSE3),A
            LD      L,002H
            BIT     7,(HL)
            JP      Z,00EA4H
            LD      L,008H
            BIT     0,(HL)
            LD      A,L
            JP      Z,00EB2H
            XOR     A
            LD      L,A
            LD      A,000H
            AND     L
            LD      (00065H),A
L20B9:      OUT     (LSE1),A
L20BB:      EI      
            POP     HL
            OR      A
            RET     

            NOP     
            NOP     
            NOP     
            NOP     
            LD      D,D
            LD      B,L
            LD      B,E
            LD      C,A
            LD      D,D
L20C8:      LD      B,H
            LD      L,000H
L20CB:      LD      D,B
            LD      C,H
            LD      B,C
L20CE:      LD      E,C
            DS      2, 000H ; Work area (45 bytes)
L20D1:      DS      3, 000H
L20D4:      DS      12, 000H
L20E0:      DS      3, 000H
L20E3:      DS      3, 000H
L20E6:      DS      3, 000H
L20E9:      DS      6, 000H
L20EF:      DS      3, 000H
L20F2:      DS      3, 000H
L20F5:      DS      3, 000H
L20F8:      DS      3, 000H
L20FB:      DB      000H
            RET     P
            RET     P
L20FE:      RET     P
            RET     P
            RET     P
L2101:      RET     P
            RET     P
            RET     P
            RET     P
            RET     P
            RET     P
            RET     P
L2108:      RET     P
            RET     P
            RET     P
            RET     P
            RET     P
            POP     BC
            JP      NZ,0C4C3H
            PUSH    BC
            ADD     A,0F0H
            RET     P
            RET     P
            RET     P
            RET     P
            RET     P
            RET     P
            RET     P
            RET     P
            NOP     
            LD      H,C
            LD      H,D
            LD      H,E
            LD      H,H
            LD      H,L
            LD      H,(HL)
            LD      H,A
            LD      L,B
            LD      L,C
            LD      L,E
            LD      L,D
            CPL     
            LD      HL,(02D2EH)
            JR      NZ,L214F            ; (+021H)
            LD      (L2423),HL
            DEC     H
            LD      H,027H
            JR      Z,L215F             ; (+029H)
            LD      C,A
            INC     L
            LD      D,C
            DEC     HL
            LD      D,A
            LD      C,C
            LD      D,L
            LD      BC,00302H
            INC     B
            DEC     B
            LD      B,007H
            EX      AF,AF'
            ADD     HL,BC
            LD      A,(BC)
            DEC     BC
            INC     C
            DEC     C
            LD      C,00FH
            DJNZ    L215F               ; (+011H)
            LD      (DE),A
L214F:      INC     DE
            INC     D
            DEC     D
            LD      D,017H
            JR      0216FH               ; (+019H)

            LD      A,(DE)
            LD      D,D
            LD      E,C
            LD      D,H
            LD      D,B
            LD      B,L
            RST     000H
            RET     Z
            RET     

L215F:      JP      Z,0CCCBH
            CALL    0CFCEH
            RST     018H
            RST     020H
            RET     PE
            PUSH    HL
            JP      (HL)

            CALL    PE,0D0EDH
            POP     DE
            JP      NC,0D4D3H
            PUSH    DE
            SUB     LSD7
            RET     C
            EXX     
            JP      C,0DCDBH
            DB      0DDH
            SBC     A,0C0H
            LD      B,B
            CP      L
            SBC     A,L
            OR      C
            OR      L
            CP      C
            OR      H
            SBC     A,(HL)
            OR      D
            OR      (HL)
            CP      D
            CP      (HL)
            SBC     A,A
            OR      E
            OR      A
            CP      E
            CP      A
            AND     E
            ADD     A,L
            AND     H
            AND     L
            AND     (HL)
            SUB     H
            ADD     A,A
            ADC     A,B
            SBC     A,H
L2196:      ADD     A,D
            SBC     A,B
            ADD     A,H
            SUB     D
            SUB     B
L219B:      ADD     A,E
            SUB     C
            ADD     A,C
            SBC     A,D
            SUB     A
            SUB     E
L21A1:      SUB     L
            ADC     A,C
            AND     C
            XOR     A
            ADC     A,E
            ADD     A,(HL)
L21A7:      SUB     (HL)
            AND     D
            XOR     E
            XOR     D
            ADC     A,D
            ADC     A,(HL)
            OR      B
            XOR     L
            ADC     A,L
            AND     A
            XOR     B
            XOR     C
            ADC     A,A
            ADC     A,H
            XOR     (HL)
            XOR     H
            SBC     A,E
            AND     B
            SBC     A,C
            CP      H
            CP      B
            ADD     A,B
            DEC     SP
            LD      A,(03C70H)
            LD      (HL),C
            LD      E,D
            DEC     A
            LD      B,E
            LD      D,(HL)
            CCF     
            LD      E,04AH
            INC     E
            LD      E,L
            LD      A,05CH
            RRA     
            LD      E,A
            LD      E,(HL)
            SCF     
            LD      A,E
            LD      A,A
            LD      (HL),07AH
            LD      A,(HL)
            INC     SP
            LD      C,E
            LD      C,H
            DEC     E
            LD      L,H
            LD      E,E
            LD      A,B
            LD      B,C
            DEC     (HL)
            INC     (HL)
            LD      (HL),H
            JR      NC,L221B            ; (+038H)
            LD      (HL),L
            ADD     HL,SP
            LD      C,L
            LD      L,A
            LD      L,(HL)
            LD      (L7677),A
            LD      (HL),D
            LD      (HL),E
            LD      B,A
            LD      A,H
            LD      D,E
            LD      SP,06D4EH
            LD      C,B
            LD      B,(HL)
            LD      A,L
            LD      B,H
            DEC     DE
            LD      E,B
            LD      A,C
            LD      B,D
            LD      H,B
            DS      31, 000H ; Large work/buffer area (545 bytes)
L221B:      DS      14, 000H
L2229:      DS      8, 000H
L2231:      DS      8, 000H
L2239:      DS      21, 000H
L224E:      DS      42, 000H
L2278:      DS      10, 000H
L2282:      DS      5, 000H
L2287:      DS      52, 000H
L22BB:      DS      103, 000H
L2322:      DS      56, 000H
L235A:      DS      11, 000H
L2365:      DS      165, 000H
L240A:      DS      4, 000H
L240E:      DS      5, 000H
L2413:      DS      8, 000H
L241B:      DS      2, 000H
            SUB     B
            RLA     
            CALL    M,00019H
            DEC     SP
L2423:      LD      A,(0590DH)
            LD      E,D
            LD      B,B
            LD      E,E
            LD      E,L
            NOP     
            NOP     
            NOP     
            LD      D,C
            LD      D,D
            LD      D,E
            LD      D,H
            LD      D,L
            LD      D,(HL)
            LD      D,A
            LD      E,B
            LD      C,C
            LD      C,D
            LD      C,E
            LD      C,H
            LD      C,L
            LD      C,(HL)
            LD      C,A
L243C:      LD      D,B
            LD      B,C
            LD      B,D
            LD      B,E
            LD      B,H
            LD      B,L
            LD      B,(HL)
            LD      B,A
            LD      C,B
            LD      SP,03332H
            INC     (HL)
            DEC     (HL)
            LD      (HL),037H
            JR      C,L24AA             ; (+05cH)
L244E:      LD      E,(HL)
            DEC     L
            JR      NZ,L2482            ; (+030H)
            ADD     HL,SP
            INC     L
            LD      L,018H
            DJNZ    L246A               ; (+012H)
            LD      DE,01413H
            CCF     
            CPL     
            SUB     B
            RLA     
            EI      
            DEC     B
            NOP     
            DEC     HL
            LD      HL,(0BD0DH)
            AND     D
            SUB     E
            CP      (HL)
            ADD     A,B
L246A:      NOP     
L246B:      NOP     
            NOP     
            AND     B
            SBC     A,L
            AND     H
            SUB     (HL)
            AND     L
            XOR     E
            AND     E
            SBC     A,E
            AND     (HL)
            XOR     A
            XOR     C
            CP      B
            OR      E
            OR      B
            OR      A
            SBC     A,(HL)
            AND     C
            SBC     A,D
            SBC     A,A
            SBC     A,H
            SUB     D
L2482:      XOR     D
            SUB     A
            SBC     A,B
            LD      HL,L2322
            INC     H
            DEC     H
            LD      H,027H
            JR      Z,L244E             ; (-040H)
            SUB     H
            DEC     A
            JR      NZ,02491H            ; (-001H)
            ADD     HL,HL
            INC     A
L2494:      LD      A,016H
            DEC     D
            LD      (DE),A
            LD      DE,01413H
            ADD     A,05FH
            SUB     B
            RLA     
            LD      L,H
L24A0:      ADD     HL,DE
            NOP     
            CP      089H
            DEC     C
            RST     020H
            XOR     088H
            LD      A,B
            PUSH    AF
L24AA:      NOP     
            NOP     
            NOP     
            CALL    NZ,0FAE5H
            PUSH    BC
            DB      0FDH
            LD      A,D
            AND     0F6H
            LD      SP,HL
            RET     NC
            RST     018H
            ADD     A,(HL)
            CALL    0B1ECH
            HALT    
            DI      
            JP      PE,0F17EH
            EX      (SP),HL
            CALL    Z,0EFDBH
            CALL    NC,0D6CFH
            PUSH    DE
            JP      NZ,0D1D3H
            ADD     A,C
            LD      (HL),H
            ADD     A,A
            LD      (HL),D
            JR      NZ,L246B            ; (-067H)
            AND     A
            LD      H,E
            CP      A
            LD      D,015H
            LD      (DE),A
            LD      DE,01413H
            ADC     A,D
            LD      A,E
            SUB     B
            RLA     
            LD      L,B
            DEC     B
            NOP     
            ADD     A,H
            JP      (HL)

            DEC     C
            JP      PO,L77ED
            ADC     A,L
            ADC     A,(HL)
L24EA:      NOP     
            NOP     
            NOP     
            JP      P,0E1C3H
            CALL    P,095E8H
            RET     PO
            LD      A,L
            RST     000H
            ADC     A,0DEH
            RET     

            DB      0DDH
            JP      C,08375H
            RET     M
            EX      DE,HL
            LD      A,C
            RST     030H
            CALL    PO,0DCC8H
            RET     P
            JP      Z,0D9D7H
            POP     BC
            RET     C
            SET     2,D
            XOR     H
            LD      (HL),E
            ADC     A,H
            LD      (HL),C
            JR      NZ,L2494            ; (-07eH)
            SUB     C
            LD      (HL),B
            ADD     A,L
            LD      D,015H
            LD      (DE),A
            LD      DE,01413H
            ADC     A,A
            ADC     A,E
            LD      E,E
            LD      E,H
            LD      E,L
            LD      E,(HL)
            CPL     
            INC     B
            LD      D,D
            LD      D,L
            LD      C,(HL)
            DEC     C
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            INC     B
            LD      C,H
            LD      C,C
            LD      D,E
L2536:      LD      D,H
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            INC     B
            LD      B,C
            LD      D,L
            LD      D,H
            LD      C,A
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            DEC     B
            LD      D,D
            LD      B,L
            LD      C,(HL)
            LD      D,L
            LD      C,L
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            DEC     B
            LD      B,E
            LD      C,A
            LD      C,H
            LD      C,A
            LD      D,D
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            DEC     B
            LD      B,E
            LD      C,B
            LD      D,D
            INC     H
            JR      Z,L2579             ; (+000H)
L2579:      NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            EX      AF,AF'
            LD      B,H
            LD      B,L
            LD      B,(HL)
            JR      NZ,L25D3            ; (+04bH)
            LD      B,L
            LD      E,C
            JR      Z,L258C             ; (+000H)
L258C:      NOP     
            NOP     
L258E:      NOP     
            NOP     
            NOP     
            NOP     
            INC     B
            LD      B,E
            LD      C,A
            LD      C,(HL)
            LD      D,H
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            INC     B
            LD      D,E
            LD      B,C
            LD      D,(HL)
            LD      B,L
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            INC     B
            LD      C,H
            LD      C,A
            LD      B,C
            LD      B,H
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            PUSH    HL
            LD      DE,(01820H)
L25C7:      PUSH    DE
            LD      DE,L140B
            LD      (01820H),DE
            LD      A,(0004FH)
            PUSH    AF
L25D3:      LD      A,064H
            LD      (0004FH),A
            LD      (014B9H),SP
            XOR     A
            LD      (L1819),A
L25E0:      LD      SP,MONIT
            LD      BC,013E3H
            PUSH    BC
            CALL    NL
            LD      A,02AH
            CALL    PRNT
L25EF:      CALL    014C5H
            JR      NC,L25EF            ; (-005H)
            LD      A,(DE)
            CP      02AH
            RET     NZ
            INC     DE
            LD      A,(DE)
            INC     DE
            EXX     
            LD      HL,L141C
            LD      B,00AH
L2601:      CP      (HL)
            INC     HL
            JR      Z,L2616             ; (+011H)
            INC     HL
            INC     HL
            DJNZ    L2601               ; (-008H)
            EXX     
            RET     

            LD      DE,0181AH
            CALL    NL
            CALL    00051H
            JR      L25E0               ; (-036H)

L2616:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            PUSH    DE
            EXX     
            RET     

            LD      B,H
            LD      C,D
            DEC     D
            LD      C,L
            CP      L
            DEC     D
            LD      D,B
            LD      A,(04714H)
            LD      B,L
            DEC     D
            LD      B,(HL)
            CALL    P,L5215
L262C:      CP      B
            INC     D
            LD      D,E
            LD      B,E
            INC     D
            LD      C,H
            LD      L,C
L2633:      INC     D
            LD      D,(HL)
            XOR     C
            INC     D
            LD      D,H
            LD      E,D
            LD      D,03AH
            ADD     HL,DE
            JR      L262C               ; (-012H)

            LD      BC,L1932
            JR      0260CH               ; (-037H)

            CALL    01642H
            RET     C
            LD      (0100EH),BC
            LD      (01010H),DE
            LD      (01012H),HL
            PUSH    DE
            PUSH    BC
            EXX     
            CALL    L171F
            LD      HL,00FFCH
            LD      (HL),001H
            LD      BC,00080H
            CALL    WRINF
            POP     BC
            POP     HL
            CALL    NC,WRDAT
L2668:      RET     

            CALL    014E7H
            PUSH    HL
            PUSH    AF
            CALL    L1484
            POP     AF
            POP     HL
            JR      NC,L2678            ; (+003H)
            LD      HL,(0FF14H)
L2678:      LD      BC,(0FF12H)
            CALL    RDDAT
L267F:      JP      C,0181FH
            JR      L2668               ; (-01cH)

            CALL    L171F
            LD      A,001H
            LD      (00FFCH),A
L268C:      LD      HL,0FF00H
            LD      BC,00080H
            CALL    RDINF
            JP      C,0181FH
            LD      DE,L180E
            CALL    016C8H
            CALL    L16EE
            JR      NZ,L268C            ; (-017H)
            LD      DE,L430B
            JP      016C8H

            CALL    L1484
            LD      HL,(0FF14H)
            LD      BC,(0FF12H)
            CALL    VERFY
            JR      L267F               ; (-039H)

            LD      SP,MONIT
            POP     AF
            LD      (0004FH),A
            POP     HL
            LD      (L1820),HL
            POP     HL
L26C4:      RET     

            LD      DE,0FF00H
            CALL    0004AH
            JR      C,L26E5             ; (+018H)
            LD      A,(DE)
            CP      03AH
            SCF     
            RET     NZ
            INC     DE
            CALL    014E7H
            RET     C
            LD      A,(DE)
            INC     DE
            XOR     03DH
            RET     NZ
L26DC:      CALL    L151B
            CCF     
            RET     NC
            LD      (HL),A
            INC     HL
            JR      L26DC               ; (-009H)

L26E5:      LD      (DE),A
            RET     

            PUSH    HL
            CALL    L1501
            PUSH    DE
            CALL    L1522
            JR      C,L26FC             ; (+00bH)
            LD      H,A
            CALL    L1522
            JR      C,L26FC             ; (+005H)
            LD      L,A
            POP     AF
            POP     AF
            XOR     A
            RET     

L26FC:      POP     DE
            POP     HL
            SCF     
            RET     

L2700:      INC     DE
            LD      A,(DE)
            CP      020H
            JR      Z,L2700             ; (-006H)
            RET     

            LD      A,(DE)
            SUB     030H
            RET     C
            CP      00AH
L270D:      JR      C,L2718             ; (+009H)
            CP      011H
            RET     C
            SUB     007H
            CP      010H
            CCF     
            RET     C
L2718:      OR      A
            INC     DE
            RET     

            CALL    L1501
            CP      03BH
L2720:      JR      Z,L2740             ; (+01eH)
            PUSH    BC
            PUSH    DE
            CALL    01507H
            JR      C,L273C             ; (+013H)
            LD      C,A
L272A:      CALL    01507H
            JR      C,L273C             ; (+00dH)
            LD      B,A
L2730:      LD      A,C
            RLCA    
            RLCA    
            RLCA    
            RLCA    
            ADD     A,B
            LD      C,A
            LD      A,C
            POP     BC
            POP     BC
            OR      A
            RET     

L273C:      POP     DE
            POP     BC
            SCF     
            RET     

L2740:      INC     DE
            LD      A,(DE)
            INC     DE
            OR      A
            RET     

            CALL    014E7H
            RET     C
            JP      (HL)

            CALL    014E7H
            JR      C,L275A             ; (+00bH)
            PUSH    HL
            CALL    014E7H
            JR      C,L2759             ; (+004H)
            POP     DE
            EX      DE,HL
            JR      L2760               ; (+007H)

L2759:      POP     HL
L275A:      EX      DE,HL
            LD      HL,00080H
            ADD     HL,DE
            EX      DE,HL
L2760:      LD      C,008H
            CALL    L156D
            RET     C
            PUSH    HL
            SBC     HL,DE
            POP     HL
L276A:      RET     NC
            JR      L2760               ; (-00dH)

            CALL    L15EF
            CALL    L15A2
            CALL    L15EA
            LD      B,C
            PUSH    HL
L2778:      LD      A,(HL)
            CALL    015A7H
            INC     HL
            LD      A,020H
            CALL    L17D3
            DJNZ    L2778               ; (-00cH)
            POP     HL
            LD      A,02FH
            CALL    L17D3
            LD      B,C
L278B:      LD      A,(HL)
            CP      020H
            JR      NC,L2792            ; (+002H)
            LD      A,02EH
L2792:      CALL    L17D3
            INC     HL
            DJNZ    L278B               ; (-00dH)
            CALL    L17F9
            CALL    BRKEY
            SCF     
            RET     Z
            OR      A
            RET     

            LD      A,H
            CALL    015A7H
            LD      A,L
            PUSH    AF
            RLCA    
            RLCA    
            RLCA    
            RLCA    
            CALL    015B0H
L27AF:      POP     AF
            AND     00FH
            ADD     A,030H
            CP      03AH
            JR      C,L27BA             ; (+002H)
            ADD     A,007H
L27BA:      JP      L17D3

            CALL    014E7H
            LD      A,(L1819)
            PUSH    AF
            XOR     A
            LD      (L1819),A
L27C8:      CALL    NL
            CALL    L15EF
            CALL    L15A2
            CALL    L15EA
            LD      A,(HL)
            CALL    015A7H
            LD      A,014H
            CALL    PRNT
            CALL    PRNT
            CALL    014C5H
            JR      NC,L27C8            ; (-01dH)
            POP     AF
            LD      (L1819),A
            RET     

            LD      A,03DH
            JP      L17D3

            LD      A,03AH
            JP      L17D3

            CALL    014E7H
            RET     C
            PUSH    HL
L27F9:      CALL    014E7H
            POP     BC
            RET     C
            PUSH    HL
            PUSH    BC
            LD      HL,0FF00H
            CALL    L14DC
            LD      DE,0FF00H
            OR      A
            SBC     HL,DE
            LD      C,L
            POP     HL
            PUSH    HL
            EXX     
            POP     HL
            POP     DE
            EXX     
            RET     Z
L2814:      CALL    0162EH
            JR      NZ,L281D            ; (+004H)
            CALL    L156D
            RET     C
L281D:      CALL    BRKEY
            RET     Z
            EXX     
            INC     HL
            PUSH    HL
            SCF     
            SBC     HL,DE
            POP     HL
            RET     NC
            PUSH    HL
            EXX     
            POP     HL
            JR      L2814               ; (-01aH)

            LD      A,(DE)
            CP      (HL)
            RET     NZ
            PUSH    BC
            PUSH    DE
            PUSH    HL
            LD      B,C
L2835:      LD      A,(DE)
            CP      (HL)
            JR      NZ,L283E            ; (+005H)
            INC     DE
            INC     HL
            DJNZ    L2835               ; (-008H)
            XOR     A
L283E:      POP     HL
            POP     DE
            POP     BC
            RET     

            CALL    014E7H
            RET     C
            PUSH    HL
            CALL    014E7H
            POP     BC
            RET     C
            SBC     HL,BC
            INC     HL
            PUSH    HL
            PUSH    BC
            CALL    014E7H
            PUSH    HL
            EXX     
            POP     HL
            POP     DE
            POP     BC
            RET     

            CALL    01642H
            RET     C
L285E:      EX      DE,HL
            PUSH    HL
            SBC     HL,DE
            POP     HL
            JR      C,L2868             ; (+003H)
            LDIR    
            RET     

L2868:      ADD     HL,BC
            DEC     HL
            EX      DE,HL
            ADD     HL,BC
            DEC     HL
            EX      DE,HL
            LDDR    
            RET     

            LD      A,0FFH
            LD      (L16BE),A
            LD      A,00DH
            PUSH    HL
            LD      HL,L16BE
            INC     (HL)
            POP     HL
            PUSH    BC
            PUSH    DE
            PUSH    HL
            PUSH    AF
            XOR     A
            CALL    L169B
            POP     AF
            PUSH    AF
            OUT     (0FFH),A
            LD      A,080H
            OUT     (0FEH),A
            LD      A,001H
            CALL    L169B
            XOR     A
            OUT     (0FEH),A
            POP     AF
            POP     HL
            POP     DE
            POP     BC
            RET     

            LD      D,A
            LD      BC,MONIT
L289F:      LD      E,020H
L28A1:      IN      A,(0FEH)
            AND     00DH
            CP      D
            RET     Z
            DEC     E
            JR      NZ,L28A1            ; (-009H)
            DEC     BC
            LD      A,B
            OR      C
            JR      NZ,L289F            ; (-010H)
            XOR     A
            LD      (0004DH),A
            LD      A,041H
            JP      0181FH

L28B8:      LD      A,020H
            CALL    01678H
            LD      A,000H
L28BF:      SUB     00AH
            JR      NC,L28BF            ; (-004H)
            ADD     A,00AH
            RET     Z
            JR      L28B8               ; (-010H)

            CALL    NL
            CALL    00051H
            PUSH    HL
            INC     HL
            CALL    016E9H
            LD      D,010H
L28D5:      LD      A,(HL)
            CP      00DH
            JR      Z,L28E1             ; (+007H)
            CALL    PRNT
            INC     HL
            DEC     D
            JR      NZ,L28D5            ; (-00cH)
L28E1:      CALL    016E9H
            CALL    NL
            POP     HL
            RET     

            LD      A,022H
            JP      PRNT

            PUSH    DE
            PUSH    HL
            INC     HL
            LD      DE,00FFCH
            INC     DE
            LD      A,(DE)
            CP      00DH
            JR      Z,L290D             ; (+013H)
            LD      B,011H
L28FC:      LD      A,(DE)
            CP      (HL)
            JR      NZ,L290A            ; (+00aH)
            CP      00DH
            JR      Z,L290D             ; (+009H)
            INC     HL
            INC     DE
            DJNZ    L28FC               ; (-00cH)
            JR      L290D               ; (+003H)

L290A:      POP     HL
            POP     DE
            RET     

L290D:      POP     HL
            PUSH    HL
            LD      A,(00FFCH)
            OR      A
            JR      Z,L291B             ; (+006H)
            CP      (HL)
            LD      A,018H
            JP      NZ,0181FH
L291B:      POP     HL
            POP     DE
            XOR     A
            RET     

L291F:      LD      A,(DE)
            OR      A
            JR      Z,L2928             ; (+005H)
            INC     DE
            CP      03AH
            JR      NZ,L291F            ; (-009H)
L2928:      LD      B,010H
            JR      L2934               ; (+008H)

            CALL    L1C66
            LD      B,000H
            CALL    NZ,04DBCH
L2934:      PUSH    HL
            LD      HL,00FFCH
            INC     HL
            LD      C,011H
            PUSH    HL
L293C:      LD      (HL),020H
            INC     HL
            DEC     C
            JR      NZ,L293C            ; (-006H)
            POP     HL
            LD      A,B
            OR      A
L2945:      JR      Z,L2956             ; (+00fH)
            CP      011H
            JR      C,L294D             ; (+002H)
            LD      B,010H
L294D:      LD      A,(DE)
            OR      A
L294F:      JR      Z,L2956             ; (+005H)
            LD      (HL),A
            INC     DE
            INC     HL
            DJNZ    L294D               ; (-009H)
L2956:      LD      (HL),00DH
            POP     HL
            RET     

            EX      AF,AF'
            LD      A,(L1819)
            OR      A
            JR      Z,L29DE             ; (+07dH)
            EX      AF,AF'
            CP      011H
            JR      C,L29CB             ; (+065H)
            CP      017H
            JP      C,01678H
            CP      020H
            JR      C,L29CB             ; (+05cH)
            CP      060H
            JP      C,01678H
            CP      07BH
            JP      Z,01678H
            CP      080H
            JP      Z,01678H
            CP      08BH
            JP      Z,01678H
            CP      092H
            JR      C,L29CB             ; (+044H)
            CP      095H
            JR      Z,L29CB             ; (+040H)
            CP      099H
            JR      Z,L29CB             ; (+03cH)
            CP      0A7H
            JR      Z,L29CB             ; (+038H)
            CP      0ACH
            JR      Z,L29CB             ; (+034H)
            CP      0B1H
            JR      Z,L29CB             ; (+030H)
            CP      0B4H
            JP      C,01678H
            CP      0B7H
            JR      C,L29CB             ; (+027H)
            CP      0BCH
            JR      Z,L29CB             ; (+023H)
            CP      0BFH
            JP      C,01678H
            CP      0C6H
            JP      Z,01678H
            CP      0CFH
            JP      Z,01678H
            CP      LSD7
            JP      Z,01678H
            CP      0FBH
            JP      Z,01678H
            CP      0FCH
            JP      Z,01678H
            CP      0FFH
            JP      Z,01678H
L29CB:      PUSH    AF
            LD      A,02EH
            CALL    01678H
            POP     AF
            RET     

            EX      AF,AF'
            LD      A,(L1819)
            OR      A
            JR      Z,L29DE             ; (+004H)
            EX      AF,AF'
            JP      01678H

L29DE:      EX      AF,AF'
            JP      PRNT

            PUSH    DE
L29E3:      LD      A,(DE)
            OR      A
            JR      Z,L29ED             ; (+006H)
            CALL    L17D3
            INC     DE
            JR      L29E3               ; (-00aH)

L29ED:      POP     DE
L29EE:      RET     

            LD      A,(L1819)
            OR      A
            JP      Z,PRNTT
            JP      L16B8

            LD      A,(L1819)
            OR      A
            JP      Z,LETNL
            JP      L1671

            LD      D,A
            SBC     A,L
            AND     (HL)
            SUB     (HL)
            AND     (HL)
            OR      B
            SUB     A
            JR      NZ,L2A2C            ; (+020H)
            JR      NZ,L2A0E            ; (+000H)
L2A0E:      LD      B,(HL)
            OR      A
            AND     L
            OR      B
            SBC     A,H
            JR      NZ,02A35H            ; (+020H)
            JR      NZ,L2A37            ; (+020H)
            JR      NZ,L2A19            ; (+000H)
L2A19:      NOP     
            LD      B,L
            SBC     A,L
            SBC     A,L
            CCF     
            NOP     
            JP      L2108

            LD      DE,L6AC1
L2A25:      CALL    00051H
            EX      DE,HL
L2A29:      LD      (HL),000H
            INC     HL
L2A2C:      LD      A,H
            CP      0FFH
            JR      C,L2A29             ; (-008H)
            LD      HL,L1848
            LD      (000E7H),HL
L2A37:      LD      HL,0FF00H
            LD      (06ABDH),HL
            CALL    L2231
            CALL    L2239
L2A43:      CALL    L224E
            JR      L2A4D               ; (+005H)

L2A48:      LD      A,016H
            CALL    L17D3
L2A4D:      LD      SP,(06AB9H)
            LD      HL,0FFFFH
            PUSH    HL
            LD      (038D5H),SP
            CALL    L1C85
            CALL    L2282
L2A5F:      XOR     A
            LD      (L42A3),A
            LD      (L38DC),A
            CALL    NL
            LD      DE,L219B
            CALL    00051H
            CALL    LETNL
L2A72:      XOR     A
            LD      (L38DC),A
L2A76:      LD      HL,0FFFFH
            LD      (038E6H),HL
            CALL    L2229
            LD      DE,0110FH
            LD      A,(L42A3)
            OR      A
            JR      Z,L2A96             ; (+00eH)
            CP      002H
            JR      NZ,L2A91            ; (+005H)
            CALL    019B9H
            JR      L2A99               ; (+008H)

L2A91:      CALL    L1989
            JR      L2A99               ; (+003H)

L2A96:      CALL    0004AH
L2A99:      JR      NC,L2ABA            ; (+01fH)
            CP      004H
            JR      NZ,L2A9F            ; (+000H)
L2A9F:      LD      A,(L38DF)
            OR      A
            LD      A,000H
            LD      (L38DF),A
            JR      NZ,L2A5F            ; (-04bH)
            LD      A,(L38DE)
            OR      A
            JP      NZ,L1C6E
            LD      A,(L38DC)
            OR      A
            JR      Z,L2A72             ; (-045H)
            JR      L2A5F               ; (-05aH)

L2AB9:      INC     DE
L2ABA:      LD      A,(DE)
            CP      020H
            JR      Z,L2AB9             ; (-006H)
            OR      A
            JR      Z,L2A76             ; (-04cH)
            CALL    03ABEH
            JP      NC,L6891
            LD      A,(L38DC)
            OR      A
            JP      NZ,L20E9
            LD      HL,L6AC1
            PUSH    HL
            CALL    04795H
            INC     HL
            LD      (L38E0),HL
            LD      (HL),000H
            INC     HL
            LD      (HL),000H
            POP     HL
L2AE0:      JR      L2B25               ; (+043H)

L2AE2:      POP     HL
            LD      HL,(038E6H)
            INC     HL
            LD      A,L
            OR      H
            JP      Z,L185F
            XOR     A
            LD      (L38D9),A
            LD      A,(L38D8)
            CP      002H
L2AF5:      JP      NZ,L185F
L2AF8:      JP      L20EF

L2AFB:      LD      HL,(L38E0)
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      A,D
            OR      E
            JR      Z,L2AE2             ; (-023H)
            EX      DE,HL
            ADD     HL,DE
            DEC     HL
            LD      (L38E0),HL
            EX      DE,HL
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            LD      (038E6H),DE
            LD      A,(L38DD)
            OR      A
            CALL    NZ,L2278
            POP     DE
            JR      L2B25               ; (+006H)

            CALL    L1C66
            JP      NZ,L20FE
L2B25:      LD      (038D5H),SP
            LD      DE,0191FH
            PUSH    DE
L2B2D:      LD      (038F0H),HL
            CALL    BRKEY
            JP      Z,02071H
            LD      A,(HL)
            CP      080H
            JP      NC,L1C3F
            CP      027H
            JP      Z,03324H
            CP      020H
            JR      NZ,L2B48            ; (+003H)
L2B45:      INC     HL
            JR      L2B2D               ; (-01bH)

L2B48:      CP      03AH
            JR      Z,L2B45             ; (-007H)
            OR      A
            JR      Z,L2AFB             ; (-054H)
            CP      041H
            JP      C,L20FE
            CP      05BH
            JP      NC,L20FE
            CALL    0580BH
            PUSH    BC
            PUSH    BC
            PUSH    AF
            CALL    L5414
            CP      0F4H
            JP      NZ,L20FE
            INC     HL
            CALL    0528BH
            POP     BC
            LD      A,(06A65H)
            CP      B
            JP      NZ,L20FB
            EX      (SP),HL
            EX      DE,HL
            CP      005H
            JR      Z,L2B81             ; (+008H)
            PUSH    BC
            CALL    01B82H
            POP     AF
            POP     HL
            POP     BC
            RET     

L2B81:      LD      C,A
            LD      B,000H
            LDIR    
            POP     HL
            POP     BC
            RET     

            LD      HL,(L42A1)
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            LD      A,D
            OR      E
            JR      Z,L2BC3             ; (+02fH)
            PUSH    DE
            EX      DE,HL
            ADD     HL,DE
            DEC     HL
            DEC     HL
            LD      (L42A1),HL
            EX      DE,HL
            LD      DE,L6AC1
            LD      A,00BH
            LD      (DE),A
            INC     DE
            POP     BC
            DEC     BC
            DEC     BC
            LDIR    
            LD      HL,L6AC1
            LD      DE,0110FH
            CALL    L49CD
            LD      A,02EH
            CALL    L17D3
            OR      A
            RET     

            LD      HL,(L42A1)
            LD      E,(HL)
            INC     HL
            LD      A,(HL)
            INC     HL
            OR      E
            JR      NZ,L2BD0            ; (+00dH)
L2BC3:      LD      (L42A3),A
            CALL    LETNL
            LD      SP,(038D5H)
            JP      L185F

L2BD0:      LD      DE,L6AC1
            LD      A,00BH
            LD      (DE),A
            INC     DE
            LD      A,(HL)
            LD      (DE),A
            INC     DE
            INC     HL
            LD      A,(HL)
L2BDC:      LD      (DE),A
            INC     DE
            INC     HL
L2BDF:      LD      A,(HL)
            CP      03AH
            JR      Z,L2BDC             ; (-008H)
            CP      080H
            JP      Z,01A72H
            CP      081H
            JP      Z,L1A76
            CP      022H
            CALL    Z,01A1FH
            CP      022H
            JR      Z,L2BDC             ; (-01bH)
            CP      00DH
            JR      NZ,L2C2B            ; (+030H)
            XOR     A
            LD      (DE),A
            INC     HL
            LD      (L42A1),HL
            EX      DE,HL
            LD      HL,(06AB3H)
            INC     H
            INC     H
            INC     H
            INC     H
            OR      A
            SBC     HL,DE
            JP      NC,L20B9
            LD      HL,L6AC1
            LD      DE,0110FH
            CALL    L49CD
            LD      A,02EH
            CALL    L17D3
            OR      A
            RET     

L2C1F:      LD      (DE),A
            INC     DE
            INC     HL
            LD      A,(HL)
            CP      00DH
            RET     Z
            CP      022H
            RET     Z
            JR      L2C1F               ; (-00cH)

L2C2B:      CP      0FFH
            JR      Z,L2C3C             ; (+00dH)
            CP      0F2H
            JR      NZ,L2C49            ; (+016H)
            LD      A,0FEH
            LD      (DE),A
            INC     DE
            LD      A,0A4H
            JP      019DCH

L2C3C:      INC     HL
            PUSH    HL
            LD      B,005H
            LD      HL,L1B7C
            CALL    L1A6B
            POP     HL
            JR      L2BDF               ; (-06aH)

L2C49:      CP      080H
            JR      C,L2BDC             ; (-071H)
            INC     HL
            PUSH    HL
            LD      HL,01A91H
            SUB     080H
L2C54:      LD      B,A
            JR      Z,L2C5E             ; (+007H)
L2C57:      LD      A,(HL)
            OR      A
            INC     HL
            JR      NZ,L2C57            ; (-005H)
            DJNZ    L2C57               ; (-007H)
L2C5E:      LD      A,(HL)
            OR      A
            JR      Z,L2C67             ; (+005H)
            LD      (DE),A
            INC     DE
            INC     HL
            JR      L2C5E               ; (-009H)

L2C67:      POP     HL
            JP      019DFH

L2C6B:      LD      A,(HL)
            LD      (DE),A
            INC     DE
            INC     HL
            DJNZ    L2C6B               ; (-006H)
            RET     

            LD      A,097H
            JR      L2C78               ; (+002H)

            LD      A,094H
L2C78:      LD      (DE),A
            INC     DE
            INC     HL
            LD      A,(HL)
            CP      03AH
            JP      Z,019DCH
            CP      022H
            CALL    Z,01A1FH
            CP      022H
            JR      Z,L2C78             ; (-012H)
            CP      00DH
            JP      Z,019FBH
            JR      L2C78               ; (-019H)

            SUB     A
            NOP     
            SUB     H
            NOP     
            ADD     A,A
            NOP     
            ADD     A,E
            NOP     
            SBC     A,A
            NOP     
            ADC     A,A
            NOP     
            SBC     A,(HL)
            NOP     
            ADC     A,L
            NOP     
            SUB     E
            NOP     
            ADD     A,B
            NOP     
            SUB     L
            NOP     
            ADD     A,C
            NOP     
            ADD     A,H
            NOP     
            ADC     A,(HL)
            NOP     
            SBC     A,C
            NOP     
            SBC     A,B
            NOP     
            SBC     A,L
            NOP     
            OR      H
            NOP     
            OR      L
            NOP     
            CP      0A5H
            NOP     
            AND     B
            NOP     
            SUB     (HL)
            NOP     
            RST     000H
            RST     038H
            RST     000H
            NOP     
            SUB     C
            NOP     
            ADD     A,L
            NOP     
            CP      0A6H
            NOP     
            CP      0A2H
            NOP     
            CP      0A3H
            NOP     
            JP      00028H

            ADC     A,000H
            RET     NC
            NOP     
            RST     008H
            NOP     
            CALL    NZ,0FE00H
            AND     A
            NOP     
            SBC     A,D
            NOP     
            CP      081H
            NOP     
            CP      082H
            NOP     
            XOR     L
            NOP     
            XOR     E
            NOP     
            CP      D
            NOP     
            CP      0A4H
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            JP      PO,MMAPIO
            NOP     
            POP     HL
            NOP     
            XOR     000H
            RST     028H
            NOP     
            RET     P
            NOP     
            POP     AF
            NOP     
            JP      P,0F300H
            NOP     
            CALL    P,0F500H
            NOP     
            OR      000H
            CALL    PE,0EB00H
            NOP     
            DB      0EDH, 000H          ; Undocumented 8 T-State NOP
            RST     030H
            NOP     
            RET     M
            NOP     
            CALL    M,0FB00H
            NOP     
            RST     038H
            CP      D
            JR      Z,L2D1C             ; (+000H)
L2D1C:      RST     038H
            CP      E
            JR      Z,L2D20             ; (+000H)
L2D20:      RST     038H
            CP      H
            JR      Z,L2D24             ; (+000H)
L2D24:      RST     038H
            XOR     H
            JR      Z,L2D28             ; (+000H)
L2D28:      RST     038H
            AND     B
            JR      Z,L2D2C             ; (+000H)
L2D2C:      RST     038H
            AND     C
            JR      Z,L2D30             ; (+000H)
L2D30:      RST     038H
            XOR     E
            JR      Z,L2D34             ; (+000H)
L2D34:      RST     038H
            XOR     L
            JR      Z,L2D38             ; (+000H)
L2D38:      RST     038H
            ADC     A,C
            JR      Z,L2D3C             ; (+000H)
L2D3C:      AND     028H
            NOP     
            RST     020H
            JR      Z,L2D42             ; (+000H)
L2D42:      RST     038H
            OR      L
            NOP     
            NOP     
            NOP     
            NOP     
            DB      0FDH
            NOP     
            RST     038H
            ADC     A,B
            JR      Z,L2D4E             ; (+000H)
L2D4E:      RST     038H
            ADD     A,D
            JR      Z,L2D52             ; (+000H)
L2D52:      RST     038H
            ADD     A,E
            JR      Z,L2D56             ; (+000H)
L2D56:      RST     038H
            ADD     A,H
            JR      Z,L2D5A             ; (+000H)
L2D5A:      RST     038H
            ADC     A,D
            JR      Z,L2D5E             ; (+000H)
L2D5E:      RST     038H
            ADD     A,(HL)
            JR      Z,L2D62             ; (+000H)
L2D62:      RST     038H
            ADD     A,B
            JR      Z,L2D66             ; (+000H)
L2D66:      RST     038H
            ADC     A,H
            JR      Z,L2D6A             ; (+000H)
L2D6A:      RST     038H
            ADD     A,L
            JR      Z,L2D6E             ; (+000H)
L2D6E:      RST     038H
            ADD     A,C
            JR      Z,L2D72             ; (+000H)
L2D72:      RST     038H
            ADC     A,E
            JR      Z,L2D76             ; (+000H)
L2D76:      RST     038H
            ADD     A,A
            JR      Z,L2D7A             ; (+000H)
L2D7A:      NOP     
            NOP     
            RST     038H
            ADC     A,(HL)
            JR      Z,L2DB1             ; (+031H)
            ADD     HL,HL
            NOP     
            PUSH    DE
            CALL    0527FH
            LD      HL,0110FH
            LD      (HL),A
            LD      B,A
            LD      C,A
L2D8C:      INC     HL
            LD      A,(DE)
            LD      (HL),A
            INC     DE
            DJNZ    L2D8C               ; (-006H)
            POP     HL
            LD      A,(HL)
            CP      C
            JR      Z,L2DDC             ; (+045H)
            PUSH    HL
            OR      A
            CALL    NZ,L1BEC
            POP     HL
            LD      A,(0110FH)
            OR      A
            JR      Z,L2DD9             ; (+036H)
            PUSH    HL
            LD      BC,(06AB3H)
            SBC     HL,BC
            EX      DE,HL
            LD      HL,(L6AB7)
            DEC     HL
            DEC     HL
            LD      (HL),E
L2DB1:      INC     HL
            LD      (HL),D
            INC     HL
            LD      BC,(06AB5H)
            OR      A
            POP     DE
            PUSH    HL
            SBC     HL,BC
            EX      DE,HL
            LD      (HL),A
            LD      B,A
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
            POP     HL
            LD      DE,0110FH
            INC     DE
            CALL    058D0H
            LD      (HL),000H
            INC     HL
            LD      (HL),000H
            INC     HL
            LD      (038D3H),HL
            LD      (L6AB7),HL
            RET     

L2DD9:      LD      (HL),000H
            RET     

L2DDC:      INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      HL,(L6AB5)
            ADD     HL,DE
            LD      DE,0110FH
            LD      B,C
            INC     DE
            JP      058D0H

            LD      C,(HL)
            LD      B,000H
            INC     BC
            INC     BC
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      HL,(L6AB5)
            ADD     HL,DE
            DEC     HL
            DEC     HL
            LD      E,L
            LD      D,H
            ADD     HL,BC
            PUSH    BC
            PUSH    DE
            EX      DE,HL
            LD      HL,(L6AB7)
            OR      A
            SBC     HL,DE
            LD      C,L
            LD      B,H
            EX      DE,HL
            POP     DE
            PUSH    DE
            JR      Z,L2E10             ; (+002H)
            LDIR    
L2E10:      POP     DE
            POP     BC
            LD      HL,(L6AB7)
            OR      A
            SBC     HL,BC
            LD      (L6AB7),HL
            EX      DE,HL
L2E1C:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      A,D
            OR      E
            RET     Z
            LD      HL,(06AB3H)
            ADD     HL,DE
            LD      A,(HL)
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            OR      A
            EX      DE,HL
            SBC     HL,BC
            EX      DE,HL
            LD      (HL),D
            DEC     HL
            LD      (HL),E
            PUSH    BC
            LD      C,A
            LD      B,000H
            LD      HL,(L6AB5)
            ADD     HL,DE
            ADD     HL,BC
            POP     BC
            JR      L2E1C               ; (-023H)

            INC     HL
            CP      0FFH
            JP      Z,L241B
            LD      DE,L3207
            CP      0FEH
            JR      NZ,L2E50            ; (+004H)
            LD      A,(HL)
            INC     HL
            JR      L2E58               ; (+008H)

L2E50:      CP      LSE0
            JP      NC,L20FE
            LD      DE,03147H
L2E58:      SUB     080H
            PUSH    HL
            EX      DE,HL
            LD      E,A
            LD      D,000H
            ADD     HL,DE
            ADD     HL,DE
            LD      A,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,A
            EX      (SP),HL
            CALL    L5414
            OR      A
            RET     Z
            CP      03AH
            RET     

            JP      NZ,L3807
            LD      DE,(06ABFH)
            CALL    L1C85
            LD      SP,(06AB9H)
            LD      HL,0FFFFH
            PUSH    HL
            PUSH    HL
            EX      DE,HL
            JP      018FEH

            PUSH    HL
            PUSH    DE
            CALL    L224E
            CALL    L258E
            LD      HL,MONIT
            LD      (038EAH),HL
            DEC     HL
            LD      (L272A),HL
            XOR     A
            LD      (0272EH),A
            LD      (L38DE),A
            LD      (L38D9),A
            LD      (L38D8),A
            LD      (L38DF),A
            LD      (L38F2),A
            LD      (L3900),A
            LD      (03901H),A
            LD      (L5B42),A
            LD      HL,0000AH
            LD      (038E2H),HL
            LD      (L38E4),HL
            POP     DE
            POP     HL
            RET     

            POP     BC
            LD      (01D6DH),BC
            CALL    01959H
            LD      (038FBH),BC
            LD      IX,MONIT
            ADD     IX,SP
            LD      (01D4DH),HL
L2ED4:      LD      E,(IX+000H)
            LD      D,(IX+001H)
            LD      HL,0FFFFH
            OR      A
            SBC     HL,DE
            JR      Z,L2F04             ; (+022H)
            LD      HL,0FF12H
            OR      A
            SBC     HL,DE
            JR      NZ,L2F04            ; (+01aH)
            LD      E,(IX+006H)
            LD      D,(IX+007H)
            EX      DE,HL
            OR      A
            SBC     HL,BC
            JR      Z,L2EFD             ; (+007H)
            LD      DE,PRNT
            ADD     IX,DE
            JR      L2ED4               ; (-029H)

L2EFD:      LD      DE,PRNT
            ADD     IX,DE
            LD      SP,IX
L2F04:      LD      HL,(01D4DH)
            CALL    L5414
            CP      LSE0
            INC     HL
            JP      NZ,L20FE
            CALL    0528BH
            PUSH    AF
            PUSH    HL
            EX      DE,HL
            LD      BC,00005H
            LD      DE,L2720
            LDIR    
            POP     HL
            POP     AF
            CP      LSE1
            LD      DE,L3D77
            JR      NZ,L2F2B            ; (+004H)
            INC     HL
            CALL    0528BH
L2F2B:      LD      (01D4DH),HL
            EXX     
            LD      HL,0FFFBH
            ADD     HL,SP
            EX      DE,HL
            LD      HL,L2720
            LD      BC,00005H
            LDIR    
            EXX     
            LD      HL,0FFF6H
            ADD     HL,SP
            LD      SP,HL
            EX      DE,HL
            LD      BC,00005H
            LDIR    
            LD      HL,(038FBH)
            PUSH    HL
            LD      HL,MONIT
            PUSH    HL
            LD      HL,(L38E0)
            PUSH    HL
            LD      HL,0FF12H
            PUSH    HL
            LD      HL,MONIT
            ADD     HL,SP
            LD      DE,(038D3H)
            DEC     H
            DEC     H
            SBC     HL,DE
            LD      A,00BH
            JP      C,L20BB
            LD      HL,(01D4DH)
            JP      MONIT

            LD      A,005H
            LD      (06A65H),A
            POP     BC
            LD      (01DE2H),BC
            PUSH    AF
            POP     BC
            LD      (01D4DH),HL
            LD      IX,MONIT
            ADD     IX,SP
            LD      (L1DD1),IX
            LD      E,(IX+000H)
            LD      D,(IX+001H)
            LD      HL,0FF12H
            OR      A
            SBC     HL,DE
            JP      NZ,L20C8
            PUSH    BC
            POP     AF
            JP      NZ,01DFAH
            LD      E,(IX+004H)
            LD      D,(IX+005H)
            EX      DE,HL
            LD      (L1DDF),HL
            LD      E,(IX+006H)
            LD      D,(IX+007H)
            EX      DE,HL
            LD      BC,00008H
            ADD     IX,BC
            PUSH    IX
            POP     DE
            CALL    L5DAF
            INC     DE
            LD      A,(DE)
            LD      IX,(L1DD1)
            LD      DE,0000DH
            ADD     IX,DE
            PUSH    IX
            POP     DE
            BIT     7,A
            JR      NZ,L2FCB            ; (+001H)
            EX      DE,HL
L2FCB:      CALL    L5E4A
            JR      C,L2FE4             ; (+014H)
            LD      SP,MONIT
            LD      HL,00002H
            ADD     HL,SP
            LD      A,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,A
            LD      (L38E0),HL
            LD      HL,MONIT
L2FE1:      JP      MONIT

L2FE4:      LD      DE,PRNT
            LD      HL,(L1DD1)
            ADD     HL,DE
            LD      SP,HL
            LD      HL,(01D4DH)
            CALL    L5414
            CP      02CH
            JR      NZ,L2FE1            ; (-015H)
            INC     HL
            LD      (01D4DH),HL
            LD      IX,MONIT
            ADD     IX,SP
            LD      (L1DD1),IX
            LD      HL,(01D4DH)
            CALL    L5414
            CP      02CH
            INC     HL
            JP      Z,L1D79
            DEC     HL
            CALL    0580BH
            LD      (01D4DH),HL
            LD      IX,(L1DD1)
L301B:      LD      E,(IX+000H)
            LD      D,(IX+001H)
            LD      HL,0FF12H
            OR      A
            SBC     HL,DE
            JP      NZ,L20C8
            LD      L,(IX+006H)
            LD      H,(IX+007H)
            OR      A
            SBC     HL,BC
            LD      HL,(01D4DH)
L3036:      JP      Z,L1D79
            LD      DE,PRNT
            ADD     IX,DE
            LD      (L1DD1),IX
            LD      SP,(01DD1H)
            JR      L301B               ; (-02dH)

            NOP     
            NOP     
            NOP     
            NOP     
L304C:      CALL    03880H
            OR      A
            RET     NZ
            INC     HL
            PUSH    DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      A,D
            OR      E
            INC     HL
            LD      (01E4BH),DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      (01E49H),DE
            POP     DE
            SCF     
            RET     Z
            JR      L304C               ; (-01dH)

            LD      (HL),C
            XOR     A
            LD      (L1819),A
            LD      A,(0005DH)
            AND     07FH
            LD      (L1E69),A
            CALL    L5414
            CP      0FBH
            JR      NZ,L3090            ; (+013H)
            INC     HL
            CALL    L5414
            CP      050H
            INC     HL
            JR      Z,L308B             ; (+005H)
            CP      054H
            JP      NZ,L20FE
L308B:      LD      (L1819),A
            JR      L30E2               ; (+052H)

L3090:      CP      05BH
            JP      NZ,L1EE2
            INC     HL
            CALL    L5414
            CP      02CH
            INC     HL
            JR      Z,L30BE             ; (+020H)
            DEC     HL
            CALL    L4D50
            CP      008H
            JP      NC,L2101
            RLCA    
            RLCA    
L30A9:      RLCA    
            RLCA    
            LD      B,A
            LD      A,(L1E69)
            AND     08FH
            OR      B
            LD      (L1E69),A
            CALL    L5414
            CP      02CH
            JP      NZ,L20FE
            INC     HL
L30BE:      CALL    L5414
            CP      05DH
            INC     HL
            JR      Z,L30E2             ; (+01cH)
            DEC     HL
            CALL    L4D50
            CP      008H
            JP      NC,L2101
            LD      B,A
            LD      A,(L1E69)
            AND     0F8H
            OR      B
            LD      (L1E69),A
            CALL    L5414
            CP      05DH
            JP      NZ,L20FE
            INC     HL
L30E2:      CALL    L1C66
            JP      Z,L1FEC
            LD      A,(HL)
            CP      03BH
            JP      Z,L1FC7
            CP      02CH
            JP      Z,L1FC7
            CP      LSE6
            JR      Z,L3170             ; (+079H)
            CP      LSE3
            JP      Z,L2730
            PUSH    BC
            CALL    0528BH
            POP     BC
            LD      A,(06A65H)
            OR      A
            JP      Z,L1FEC
            CP      003H
            JP      Z,02033H
            PUSH    HL
            EX      DE,HL
            CALL    L3C69
            POP     HL
L3113:      LD      A,(DE)
            OR      A
            JP      Z,L1FC2
            CALL    L1F1E
            INC     DE
            JR      L3113               ; (-00bH)

            EX      AF,AF'
            LD      A,(L1819)
            CP      054H
            JR      Z,L3144             ; (+01eH)
            CP      050H
            JR      Z,L3148             ; (+01eH)
            PUSH    HL
            LD      HL,0005DH
            LD      A,(HL)
            PUSH    AF
            LD      A,(L1E69)
            RLCA    
            RLC     (HL)
            RRA     
            LD      (HL),A
            EX      AF,AF'
            CALL    L17D3
            POP     AF
            RLCA    
            RLC     (HL)
            RRA     
            LD      (HL),A
            POP     HL
            RET     

L3144:      EX      AF,AF'
            JP      0466FH

L3148:      EX      AF,AF'
            CP      011H
            LD      C,009H
            JR      Z,L316C             ; (+01dH)
            CP      012H
            LD      C,00BH
            JR      Z,L316C             ; (+017H)
            CP      015H
            LD      C,00FH
            JR      Z,L316C             ; (+011H)
            CP      016H
            JP      NZ,01678H
            LD      A,00CH
            CALL    01678H
            LD      A,00AH
            CALL    01678H
            LD      C,003H
L316C:      LD      A,C
            JP      01678H

L3170:      LD      A,020H
            LD      (L1FB8),A
            LD      A,028H
            LD      (L1FA5),A
            LD      A,(L1819)
            OR      A
            JR      Z,L3198             ; (+018H)
            CP      054H
            JR      Z,L318E             ; (+00aH)
            LD      A,0A0H
            LD      (L1FA5),A
            LD      A,(L16BE)
            JR      L31A0               ; (+012H)

L318E:      LD      A,0FFH
            LD      (L1FA5),A
            CALL    0464EH
            JR      L31A0               ; (+008H)

L3198:      LD      A,013H
            LD      (L1FB8),A
            LD      A,(00054H)
L31A0:      PUSH    AF
            CALL    L204E
            CP      028H
            JR      C,L31AD             ; (+005H)
            LD      A,003H
            JP      L2108

L31AD:      POP     DE
            SUB     D
            JP      C,L1EE2
            OR      A
            JP      Z,L1EE2
            LD      D,A
L31B7:      LD      A,013H
            CALL    L1F1E
            DEC     D
            JR      NZ,L31B7            ; (-008H)
            JP      L1EE2

            CALL    L1C66
            JR      Z,L31EC             ; (+025H)
            EX      AF,AF'
            LD      A,(L1819)
            CP      054H
            JR      Z,L31E2             ; (+013H)
            EX      AF,AF'
            CP      02CH
            JR      Z,L322E             ; (+05aH)
            CP      03BH
            JP      NZ,01EE8H
L31D9:      INC     HL
            CALL    L1C66
            JP      NZ,01EE8H
            JR      L31EF               ; (+00dH)

L31E2:      CALL    L1FFF
            JR      L31D9               ; (-00eH)

            CALL    L4D50
            JR      L31F6               ; (+00aH)

L31EC:      CALL    L1FFF
L31EF:      XOR     A
            LD      (L1819),A
            LD      A,(L3900)
L31F6:      OR      A
L31F7:      RET     Z
            LD      B,000H
L31FA:      DJNZ    L31FA               ; (-002H)
            DEC     A
            JR      L31F7               ; (-008H)

            LD      A,(L1819)
            CP      054H
            JP      Z,L4665
L3207:      OR      A
            JP      Z,LETNL
            JP      L1671

            LD      A,(L1819)
            OR      A
            JR      Z,L321C             ; (+008H)
            CP      054H
            JP      Z,L4655
            JP      L16B8

L321C:      LD      A,(0005DH)
            PUSH    AF
            LD      A,(L1E69)
            LD      (0005DH),A
            CALL    PRNTT
            POP     AF
            LD      (0005DH),A
            RET     

L322E:      CALL    0200EH
            JR      L31D9               ; (-05aH)

            PUSH    HL
            EX      DE,HL
            LD      A,(HL)
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      HL,(L6AB5)
            ADD     HL,DE
            EX      DE,HL
            POP     HL
            OR      A
L3241:      JP      Z,L1FC2
            PUSH    AF
            LD      A,(DE)
            CALL    L1F1E
            INC     DE
            POP     AF
            DEC     A
            JR      L3241               ; (-00dH)

            CALL    L57F9
            PUSH    BC
            CALL    L4D50
            POP     BC
            PUSH    AF
            CALL    L270D
            POP     AF
            RET     

            LD      A,000H
            LD      (L3900),A
            RET     Z
            CALL    L4D50
L3265:      LD      (L3900),A
            RET     

            LD      SP,(038D5H)
            LD      HL,(038F0H)
            PUSH    HL
            XOR     A
            CALL    0003EH
            POP     DE
            LD      (L38F3),HL
            LD      HL,(L38E0)
            LD      (038F7H),HL
            LD      HL,(038E6H)
            LD      (038F5H),HL
            CALL    NL
            LD      DE,L21A1
            CALL    00051H
            LD      HL,(038E6H)
            INC     HL
            LD      A,L
            OR      H
            JP      Z,L185F
            LD      A,001H
            LD      (L38D9),A
            JP      02173H

            POP     DE
            LD      A,(L38D9)
            OR      A
            JP      Z,L20E3
            LD      HL,(038F5H)
            LD      (038E6H),HL
            LD      HL,(038F7H)
            LD      (L38E0),HL
            LD      HL,(L38F3)
            JP      01925H

            LD      A,006H
            LD      SP,(06AB9H)
            LD      HL,0FFFFH
            PUSH    HL
            LD      (038D5H),SP
            LD      HL,00D3EH
            LD      HL,0103EH
            LD      HL,0073EH
            LD      HL,0033EH
            LD      HL,0153EH
            LD      HL,0013EH
            LD      HL,0013EH
            LD      HL,0013EH
            LD      HL,00E3EH
            LD      HL,0113EH
            LD      HL,0053EH
            LD      HL,0013EH
            LD      HL,0013EH
            LD      HL,0143EH
            LD      HL,0083EH
            LD      HL,0023EH
            LD      HL,0063EH
            LD      HL,0033EH
            LD      HL,0013EH
            LD      HL,0033EH
            JR      L3308               ; (+003H)

            CALL    L4D50
L3308:      LD      SP,(038D5H)
            LD      C,A
            LD      HL,MONIT
            LD      (L5D83),HL
            LD      HL,(038E6H)
            INC     HL
            LD      A,L
            OR      H
            LD      A,C
            JR      Z,L333E             ; (+022H)
            LD      HL,(038E6H)
            LD      (038EAH),HL
L3322:      LD      (038E2H),HL
            LD      HL,(L38E0)
            LD      (038ECH),HL
            LD      HL,(038F0H)
            LD      (L38EE),HL
            LD      (L38F2),A
            EX      AF,AF'
            LD      A,(L38D8)
            INC     A
            CP      002H
            JR      Z,L338C             ; (+04fH)
            EX      AF,AF'
L333E:      CP      047H
            JR      NC,L3350            ; (+00eH)
            LD      DE,L4B72
            CP      019H
            JR      C,L3355             ; (+00cH)
            LD      DE,L4CD0
            SUB     02AH
            JR      NC,L3355            ; (+005H)
L3350:      LD      DE,L4B72
            LD      A,001H
L3355:      OR      A
            JR      Z,L3350             ; (-008H)
L3358:      DEC     A
            JR      Z,L3368             ; (+00dH)
            EX      AF,AF'
L335C:      LD      A,(DE)
            INC     DE
            CP      080H
            JR      Z,L3365             ; (+003H)
            OR      A
            JR      NZ,L335C            ; (-009H)
L3365:      EX      AF,AF'
            JR      L3358               ; (-010H)

L3368:      LD      A,(DE)
            CP      080H
            JR      Z,L3350             ; (-01dH)
            CALL    NL
            CALL    00051H
            LD      HL,(038E6H)
            INC     HL
            LD      A,L
            OR      H
            JP      Z,L185F
            DEC     HL
            LD      DE,L2196
            CALL    00051H
            CALL    L21A7
            CALL    00051H
            JP      L185F

L338C:      LD      (L38D8),A
            LD      HL,(038E8H)
            PUSH    HL
            JP      018FEH

            JR      NZ,L333E            ; (-05aH)
            OR      B
            JR      NZ,L339B            ; (+000H)
L339B:      LD      D,D
            SUB     D
            AND     C
            SBC     A,H
            CP      L
            NOP     
            LD      B,D
            SBC     A,L
            SUB     D
            AND     C
            XOR     C
            NOP     
            LD      DE,06A26H
            CALL    L3D86
            LD      B,004H
L33AF:      LD      A,(DE)
            CP      030H
            RET     NZ
            INC     DE
            DJNZ    L33AF               ; (-007H)
            RET     

            POP     BC
            LD      (L38F3),HL
            LD      HL,(L38E0)
L33BE:      LD      (038F7H),HL
            LD      HL,(038E6H)
            LD      (038F5H),HL
            INC     HL
            LD      A,L
            OR      H
            JP      Z,L185F
            LD      A,001H
            LD      (L38D9),A
            JP      L185F

            LD      DE,0000AH
            LD      BC,0000AH
            JR      Z,L340D             ; (+030H)
            CP      02CH
            JR      NZ,L33EC            ; (+00bH)
            INC     HL
            CALL    L4D65
            LD      B,D
            LD      C,E
            LD      DE,0000AH
            JR      L340D               ; (+021H)

L33EC:      CP      02EH
            LD      DE,(038E2H)
            JR      Z,L33FD             ; (+009H)
            CP      00BH
            JP      NZ,L20FE
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
L33FD:      INC     HL
            CALL    L5414
            CP      02CH
            JR      NZ,L340D            ; (+008H)
            PUSH    DE
            INC     HL
            CALL    L4D65
            LD      C,E
L340B:      LD      B,D
            POP     DE
L340D:      CALL    L1C66
            JP      NZ,L20FE
            LD      A,C
            OR      B
            JP      Z,L2101
            LD      (038E2H),DE
            LD      (038E4H),BC
            LD      A,001H
            LD      (L38DF),A
            POP     AF
            JP      L1876

            LD      A,(L38DF)
            OR      A
            RET     Z
            JP      L3646

            LD      (L6ABB),HL
            DEC     H
            LD      (06AB9H),HL
            RET     

            LD      HL,(06ABFH)
            LD      (HL),000H
            INC     HL
            LD      (HL),000H
            INC     HL
            LD      (06AB3H),HL
            JP      L224E

            CALL    L2239
            JP      L184D

            PUSH    HL
            PUSH    DE
            LD      HL,(06AB3H)
            LD      (HL),000H
            INC     HL
            LD      (L6AB5),HL
            LD      A,(038D7H)
            LD      B,A
            INC     B
            LD      DE,00110H
L3461:      LD      (HL),000H
            ADD     HL,DE
            DJNZ    L3461               ; (-005H)
            LD      (038DAH),HL
            LD      (HL),000H
            INC     HL
            LD      (HL),000H
            INC     HL
            LD      (L6AB7),HL
            LD      (038D3H),HL
            POP     DE
            POP     HL
            RET     

            BIT     0,A
            CALL    NZ,L2287
            RET     

            LD      A,001H
            JR      L3483               ; (+001H)

            XOR     A
L3483:      LD      (L38DD),A
            RET     

            PUSH    AF
            PUSH    HL
            LD      A,05BH
            CALL    L17D3
            LD      HL,(038E6H)
            CALL    L21A7
            CALL    00051H
            LD      A,05DH
            CALL    L17D3
            POP     HL
            POP     AF
            RET     

            LD      A,(03901H)
            OR      A
            JP      NZ,L20CE
            INC     HL
            CALL    L4D50
            OR      A
            JR      Z,L34B2             ; (+005H)
            CP      002H
            JP      NC,L2101
L34B2:      LD      (L5B42),A
            LD      A,001H
L34B7:      LD      (03901H),A
            RET     

            CALL    04DBCH
            LD      A,B
            OR      A
            RET     Z
L34C1:      LD      A,(DE)
            INC     DE
            CALL    L17D3
            DJNZ    L34C1               ; (-007H)
            XOR     A
            RET     

            XOR     A
            LD      (0265EH),A
            CALL    L5414
            CP      0FBH
            JP      Z,L2365
            PUSH    HL
            LD      HL,(L6AB7)
            LD      (038D3H),HL
            POP     HL
            CALL    L5414
            CP      022H
            CALL    Z,L22BB
            JR      NZ,L34F3            ; (+00bH)
            CALL    L5414
            CP      03BH
L34ED:      INC     HL
            JR      Z,L34F9             ; (+009H)
            JP      L20FE

L34F3:      LD      DE,02713H
            CALL    00051H
L34F9:      LD      (02726H),SP
L34FD:      CALL    0580BH
            PUSH    AF
            PUSH    BC
            CALL    02705H
            JR      Z,L350C             ; (+005H)
            CALL    03332H
            JR      L34FD               ; (-00fH)

L350C:      XOR     A
            PUSH    AF
            PUSH    HL
            LD      HL,(L6AB5)
            LD      DE,00010H
            ADD     HL,DE
            EX      DE,HL
            CALL    000FAH
            JP      C,L2069
            PUSH    DE
            LD      HL,(02726H)
            DEC     HL
L3522:      LD      A,(HL)
            OR      A
            JR      Z,L3547             ; (+021H)
            LD      (02677H),A
            DEC     HL
            DEC     HL
            LD      B,(HL)
            DEC     HL
            LD      C,(HL)
            DEC     HL
L352F:      LD      (02674H),BC
            EX      (SP),HL
L3534:      CALL    L5414
            OR      A
            JR      Z,L354E             ; (+014H)
            CP      02CH
            JR      NZ,L3541            ; (+003H)
            INC     HL
            JR      L3544               ; (+003H)

L3541:      CALL    L2633
L3544:      EX      (SP),HL
            JR      L3522               ; (-025H)

L3547:      POP     DE
            POP     HL
            LD      SP,(02726H)
            RET     

L354E:      LD      DE,02713H
            CALL    00051H
            LD      HL,(L6AB5)
            LD      DE,00010H
L355A:      ADD     HL,DE
            EX      DE,HL
            CALL    000FAH
            JP      C,L2069
            EX      DE,HL
            JR      L3534               ; (-031H)

            INC     HL
            CALL    L5414
            CP      054H
            JP      NZ,L20FE
            INC     HL
L356F:      CALL    0580BH
            LD      (02677H),A
            LD      (02674H),BC
            PUSH    HL
            LD      HL,0110FH
            LD      BC,0FE00H
            CP      003H
            JR      Z,L35D4             ; (+050H)
            CALL    L240E
            CP      022H
            JR      Z,L35EB             ; (+060H)
L358B:      CALL    L2413
            JR      Z,L35A8             ; (+018H)
            DEC     C
            JR      NZ,L3597            ; (+004H)
            CP      020H
            JR      Z,L35BA             ; (+023H)
L3597:      CP      020H
            JR      Z,L359D             ; (+002H)
            LD      C,001H
L359D:      LD      (HL),A
            INC     HL
            CALL    L240A
            JR      C,L35A8             ; (+004H)
            DJNZ    L358B               ; (-01bH)
            LD      (HL),A
            INC     HL
L35A8:      LD      (HL),000H
            LD      HL,0110FH
            CALL    L2633
            POP     HL
            CALL    L5414
            CP      02CH
            RET     NZ
            INC     HL
            JR      L356F               ; (-04bH)

L35BA:      CALL    L240A
            JR      C,L35A8             ; (-017H)
            CP      020H
            JR      Z,L35BA             ; (-009H)
            CP      02CH
            JR      Z,L35A8             ; (-01fH)
            CP      00DH
            JR      Z,L35A8             ; (-023H)
L35CB:      DEC     (IY+00BH)
            LD      (IY+00CH),001H
            JR      L35A8               ; (-02cH)

L35D4:      CALL    L240E
            CP      022H
            JR      Z,L35EB             ; (+010H)
L35DB:      CALL    L2413
            JR      Z,L35A8             ; (-038H)
            LD      (HL),A
            INC     HL
            CALL    L240A
            JR      C,L35A8             ; (-03fH)
            DJNZ    L35DB               ; (-00eH)
            JR      L35A8               ; (-043H)

L35EB:      LD      (HL),A
            INC     HL
            LD      B,0FFH
L35EF:      CALL    L240A
            JR      C,L35A8             ; (-04cH)
            LD      (HL),A
            INC     HL
            CP      022H
            JR      Z,L35FE             ; (+004H)
            DJNZ    L35EF               ; (-00dH)
            JR      L35A8               ; (-056H)

L35FE:      CALL    L240A
            JR      C,L35A8             ; (-05bH)
            CALL    L2413
            JR      Z,L35A8             ; (-060H)
            JR      L35CB               ; (-03fH)

            CALL    L45B5
            RET     C
            CALL    L4571
            OR      A
            RET     

            OR      A
            RET     Z
            CP      02CH
            RET     Z
            CP      00DH
            RET     

            LD      A,(HL)
            INC     HL
            CP      0BCH
            JP      Z,L2536
            CP      0C0H
            JP      Z,L24EA
            CP      0C4H
            JP      Z,02459H
            JP      L20FE

            CALL    L243C
            RLCA    
            RLCA    
            RLCA    
            RLCA    
            LD      C,A
            CALL    L243C
            OR      C
            RET     

            LD      A,(DE)
            INC     DE
            SUB     030H
            JR      C,L3645             ; (+003H)
            CP      00AH
            RET     C
L3645:      LD      A,B
L3646:      RET     

L3647:      LD      A,(DE)
            CP      02CH
            JR      L364F               ; (+003H)

            LD      A,(DE)
            CP      03AH
L364F:      JR      L3654               ; (+003H)

            LD      A,(DE)
            CP      02FH
L3654:      INC     DE
            RET     Z
            JP      L2101

            CALL    L5414
            CP      0F4H
            JP      NZ,L20FE
            INC     HL
            CALL    04DBCH
            LD      A,B
            CP      006H
            JP      NZ,L2101
            PUSH    HL
            PUSH    DE
            LD      HL,MONIT
            CALL    L24A0
            CP      018H
            JP      NC,L2101
            CP      00CH
            LD      A,000H
            JR      C,L3687             ; (+009H)
            PUSH    DE
            LD      DE,PRNTS
            OR      A
            SBC     HL,DE
            POP     DE
            INC     A
L3687:      PUSH    AF
            CALL    L24A0
            CP      03CH
            JP      NC,L2101
            CALL    L24A0
            CP      03CH
            JP      NC,L2101
            POP     AF
            EX      DE,HL
            CALL    TIMST
            POP     DE
            POP     HL
            RET     

            PUSH    DE
            LD      D,H
            LD      E,L
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,DE
            LD      D,H
            LD      E,L
            ADD     HL,HL
            ADD     HL,DE
            ADD     HL,HL
            ADD     HL,HL
            POP     DE
            LD      A,(DE)
            INC     DE
            SUB     030H
            JP      C,L20FB
            CP      00AH
            JP      NC,L20FB
            PUSH    BC
            LD      C,A
            ADD     A,A
            ADD     A,A
            ADD     A,C
            ADD     A,A
            LD      C,A
            LD      A,(DE)
            INC     DE
            SUB     030H
            JP      C,L20FB
            CP      00AH
            JP      NC,L20FB
            ADD     A,C
L36CD:      LD      C,A
            LD      B,000H
            ADD     HL,BC
            POP     BC
            RET     

            PUSH    BC
            LD      C,A
            RLCA    
            RLCA    
            RLCA    
            RLCA    
            AND     00FH
            LD      B,A
            JR      Z,L36E3             ; (+005H)
            XOR     A
L36DF:      ADD     A,00AH
            DJNZ    L36DF               ; (-004H)
L36E3:      LD      B,A
            LD      A,C
            AND     00FH
            ADD     A,B
            POP     BC
            RET     

            CALL    057FAH
            CALL    L4D65
            CALL    03332H
            PUSH    DE
            CALL    L4D65
            CALL    05804H
            CALL    04D53H
            PUSH    AF
            CALL    L5414
            INC     HL
            CP      0F4H
            JP      NZ,L20FE
            CALL    04DBCH
            POP     BC
            EX      (SP),HL
            CP      B
            JR      NC,L3710            ; (+001H)
            LD      B,A
L3710:      INC     B
            JR      L3717               ; (+004H)

L3713:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
L3717:      DJNZ    L3713               ; (-006H)
            POP     HL
            RET     

            CP      0B2H
            JR      NZ,L3726            ; (+007H)
            INC     HL
            CALL    L5414
            JP      043E2H

L3726:      CP      0FFH
            JP      NZ,L20FE
            INC     HL
            LD      A,(HL)
            INC     HL
            CP      0C7H
            JP      Z,L5C77
            JP      L20FE

            CALL    057FAH
            CALL    0580BH
            CP      003H
            JP      NZ,L20FB
            PUSH    BC
            CALL    0332FH
            CALL    L4D50
            OR      A
            JP      Z,L2101
            PUSH    AF
            CALL    0332FH
            CALL    L4D50
            POP     BC
            LD      C,A
            PUSH    BC
            CALL    L270D
            CALL    L5414
            CP      0F4H
            JP      NZ,L20FE
            INC     HL
            CALL    04DBCH
            EXX     
            POP     BC
            EX      (SP),HL
            EX      AF,AF'
            CALL    0527FH
            SUB     B
            JR      C,L378C             ; (+01dH)
            LD      L,B
            DEC     L
            LD      H,000H
            ADD     HL,DE
            INC     A
            LD      E,A
            EX      AF,AF'
            CP      C
            JR      C,L377B             ; (+001H)
            LD      A,C
L377B:      CP      E
            JR      C,L377F             ; (+001H)
            LD      A,E
L377F:      PUSH    HL
            EXX     
            POP     HL
            LD      B,A
            OR      A
            JR      Z,L378C             ; (+006H)
L3786:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            DJNZ    L3786               ; (-006H)
L378C:      POP     HL
            RET     

L378E:      XOR     A
            LD      (0272EH),A
            PUSH    HL
            LD      HL,(06ABFH)
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      A,D
            OR      E
            DEC     DE
            JR      Z,L37A2             ; (+004H)
            INC     HL
            LD      E,(HL)
            INC     L
            LD      D,(HL)
L37A2:      LD      (0272AH),DE
            POP     HL
            RET     

            CALL    L1C66
            JR      Z,L378E             ; (-01fH)
            INC     HL
            CP      00CH
            JP      NZ,L25C7
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            EX      DE,HL
L37B8:      INC     HL
            INC     HL
            LD      C,(HL)
            INC     HL
            LD      B,(HL)
            INC     HL
            LD      (0272AH),BC
            CALL    L26C4
            EX      DE,HL
            RET     

            CP      00BH
            JP      NZ,L20FE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            EX      DE,HL
            CALL    035BBH
            JP      C,L20CB
            EX      DE,HL
            LD      (HL),D
            DEC     HL
            LD      (HL),E
            DEC     HL
            LD      (HL),00CH
            INC     HL
            INC     HL
            INC     HL
            EX      DE,HL
            JR      L37B8               ; (-02bH)

L37E3:      LD      A,03AH
            LD      (0265EH),A
            CALL    0580BH
            PUSH    HL
            LD      (02677H),A
            LD      (02674H),BC
            LD      A,(0272EH)
            CP      001H
            JP      Z,02613H
            JR      NC,L381D            ; (+020H)
            LD      HL,(06ABFH)
            LD      A,(HL)
            INC     HL
            OR      (HL)
            JR      Z,L3813             ; (+00eH)
            INC     HL
            LD      E,(HL)
L3807:      INC     HL
            LD      D,(HL)
            LD      (0272AH),DE
            INC     HL
            CALL    L26C4
            JR      NC,L381D            ; (+00aH)
L3813:      LD      A,001H
            LD      (0272EH),A
            LD      A,018H
            JP      L2108

L381D:      LD      HL,(0272CH)
            CALL    L2633
            LD      (0272CH),HL
            CALL    Z,L26C4
            POP     HL
            CALL    L5414
            CP      02CH
            RET     NZ
            INC     HL
            JR      L37E3               ; (-050H)

            LD      DE,(038D3H)
            LD      B,000H
            CALL    L5414
            CP      022H
            JR      NZ,L3859            ; (+019H)
            INC     HL
L3841:      LD      A,(HL)
            OR      A
            JR      Z,L386B             ; (+026H)
            INC     HL
            CP      022H
            JR      Z,L384F             ; (+005H)
            LD      (DE),A
            INC     DE
            INC     B
            JR      L3841               ; (-00eH)

L384F:      CALL    L5414
            CP      02CH
            JR      NZ,L386B            ; (+015H)
            INC     HL
            JR      L386B               ; (+012H)

L3859:      LD      A,(HL)
            OR      A
            JR      Z,L386B             ; (+00eH)
            CP      03AH
            JR      Z,L386B             ; (+00aH)
            INC     HL
            CP      02CH
            JR      Z,L386B             ; (+005H)
            LD      (DE),A
            INC     DE
            INC     B
L3869:      JR      L3859               ; (-012H)

L386B:      PUSH    HL
            PUSH    AF
            XOR     A
            LD      (DE),A
            LD      A,B
            LD      (L268C),A
            LD      DE,MONIT
            LD      A,005H
            CP      003H
            JR      NZ,L3899            ; (+01dH)
L387C:      LD      HL,(038D3H)
            LD      BC,(06AB5H)
            OR      A
            SBC     HL,BC
            LD      B,H
            LD      C,L
            LD      HL,(06AB9H)
            LD      A,000H
            LD      (HL),A
            INC     HL
            LD      (HL),C
            INC     HL
            LD      (HL),B
            DEC     HL
            DEC     HL
            CALL    01B82H
            JR      L38BD               ; (+024H)

L3899:      PUSH    DE
            PUSH    AF
            LD      HL,(06AB9H)
            LD      DE,(038D3H)
            EX      DE,HL
            CALL    L5414
            CP      045H
            JP      Z,L20FB
            EX      DE,HL
            CALL    L3B14
            LD      A,(DE)
            OR      A
            JP      NZ,L20FB
            POP     AF
            POP     DE
            LD      B,A
L38B7:      LD      A,(HL)
            LD      (DE),A
            INC     HL
            INC     DE
            DJNZ    L38B7               ; (-006H)
L38BD:      POP     AF
            POP     HL
            OR      A
            RET     Z
            CP      03AH
            RET     

            DEC     HL
L38C5:      PUSH    DE
            LD      DE,(0272AH)
            LD      (01E49H),DE
L38CE:      CALL    L387C
            OR      A
            JR      NZ,L38E7            ; (+013H)
            INC     HL
            LD      A,(HL)
            INC     HL
            OR      (HL)
L38D8:      SCF     
L38D9:      JR      Z,L38FE             ; (+023H)
            INC     HL
L38DC:      PUSH    DE
L38DD:      LD      E,(HL)
L38DE:      INC     HL
L38DF:      LD      D,(HL)
L38E0:      LD      (026ECH),DE
L38E4:      POP     DE
            JR      L38CE               ; (-019H)

L38E7:      CP      094H
            JR      NZ,L38CE            ; (-01dH)
            LD      DE,MONIT
L38EE:      LD      (0272AH),DE
L38F2:      INC     HL
L38F3:      LD      (0272CH),HL
            LD      A,002H
            LD      (0272EH),A
            OR      A
            POP     DE
            RET     

L38FE:      LD      A,001H
L3900:      LD      (0272EH),A
            POP     DE
            RET     

            CALL    L5414
            OR      A
            RET     Z
            CP      03AH
            RET     

            CALL    L5414
            JP      05804H

            CCF     
            JR      NZ,L3916            ; (+000H)
L3916:      ADD     A,(HL)
            LD      (HL),B
            NOP     
            NOP     
            NOP     
            SUB     C
            JR      Z,L38DE             ; (-040H)
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            RST     038H
            RST     038H
            NOP     
            NOP     
            NOP     
            NOP     
            INC     HL
            PUSH    BC
            CALL    04DBCH
            LD      A,B
            PUSH    HL
            LD      HL,(L6AB5)
            LD      BC,00010H
            LD      (02774H),BC
            ADD     HL,BC
            LD      B,A
            OR      A
            JP      Z,L2101
L3947:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            DJNZ    L3947               ; (-006H)
            LD      (HL),000H
            POP     HL
            POP     BC
L3951:      CALL    L2AE0
            JP      NC,L1FEC
            CALL    L1C66
            RET     Z
L395B:      PUSH    BC
            CALL    0528BH
            POP     BC
            LD      A,(06A65H)
            PUSH    HL
            CALL    L276A
            POP     HL
            JR      L3951               ; (-019H)

            CP      003H
            JP      NZ,028B4H
            PUSH    DE
            LD      HL,(L6AB5)
            LD      DE,00010H
            ADD     HL,DE
L3977:      LD      A,(HL)
            OR      A
            JP      Z,L2101
            CP      021H
            JP      Z,027E4H
            CP      026H
            JP      Z,L285E
            CP      023H
            JP      Z,L2101
            CP      02AH
            JP      Z,027CDH
            CP      024H
            JP      Z,027D9H
            CP      0FBH
            JP      Z,027D9H
            CP      02EH
            JP      Z,027C1H
            CP      02BH
            JP      Z,L2101
            CP      0C4H
            JP      NZ,L27AF
            INC     HL
            LD      A,(HL)
            OR      A
            JP      Z,L2101
L39AF:      CALL    L1F1E
            INC     HL
            LD      DE,(06AB5H)
            OR      A
            PUSH    HL
            SBC     HL,DE
            LD      (02774H),HL
            POP     HL
            JR      L3977               ; (-04aH)

            INC     HL
            LD      A,(HL)
            CP      023H
            JP      Z,L2101
            DEC     HL
            LD      A,02EH
            JR      L39AF               ; (-01eH)

            INC     HL
            LD      A,(HL)
            CP      02AH
            JP      Z,L2101
            DEC     HL
            LD      A,02AH
            JR      L39AF               ; (-02aH)

            INC     HL
            LD      A,(HL)
            CP      02AH
            JP      Z,L2101
            DEC     HL
            LD      A,(HL)
            JR      L39AF               ; (-035H)

            EX      (SP),HL
            LD      A,(HL)
            OR      A
            LD      A,020H
            JR      Z,L39F6             ; (+00bH)
            INC     HL
            LD      A,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,A
            LD      DE,(06AB5H)
            ADD     HL,DE
            LD      A,(HL)
L39F6:      CALL    L1F1E
            POP     HL
            INC     HL
L39FB:      LD      A,(HL)
            OR      A
            JR      Z,L3A4E             ; (+04fH)
            CP      021H
            JR      Z,L3A53             ; (+050H)
            CP      023H
            JR      Z,L3A53             ; (+04cH)
            CP      026H
            JR      Z,L3A53             ; (+048H)
            CP      02BH
            JR      Z,L3A53             ; (+044H)
            CP      02AH
            JR      Z,L3A40             ; (+02dH)
            CP      02EH
            JR      Z,L3A2F             ; (+018H)
            CP      024H
            JR      Z,L3A38             ; (+01dH)
            CP      0FBH
            JR      Z,L3A38             ; (+019H)
            CP      0C4H
            JR      NZ,L3A29            ; (+006H)
            INC     HL
            LD      A,(HL)
            OR      A
            JP      Z,L2101
L3A29:      CALL    L1F1E
            INC     HL
            JR      L39FB               ; (-034H)

L3A2F:      INC     HL
            LD      A,(HL)
            LD      D,A
            CP      023H
            LD      A,02EH
            JR      L3A47               ; (+00fH)

L3A38:      INC     HL
            PUSH    AF
            LD      A,(HL)
            LD      D,A
            POP     AF
            CP      D
            JR      L3A47               ; (+007H)

L3A40:      INC     HL
            LD      A,(HL)
            LD      D,A
            CP      02AH
            LD      A,02AH
L3A47:      DEC     HL
            JR      NZ,L3A29            ; (-021H)
            LD      A,D
            OR      A
            JR      NZ,L3A53            ; (+005H)
L3A4E:      LD      HL,00010H
            JR      L3A5A               ; (+007H)

L3A53:      LD      DE,(06AB5H)
            OR      A
            SBC     HL,DE
L3A5A:      LD      (02774H),HL
            RET     

            LD      D,002H
L3A60:      INC     HL
            LD      A,(HL)
            CP      026H
            JR      Z,L3A6E             ; (+008H)
            INC     D
L3A67:      CP      020H
            JR      Z,L3A60             ; (-00bH)
            JP      L2101

L3A6E:      EX      (SP),HL
            LD      A,(HL)
            CP      D
            JR      C,L3A8A             ; (+017H)
            INC     HL
            LD      A,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,A
            PUSH    BC
            LD      BC,(06AB5H)
            ADD     HL,BC
            POP     BC
L3A7F:      LD      A,(HL)
            CALL    L1F1E
            INC     HL
            DEC     D
            JR      NZ,L3A7F            ; (-008H)
            JP      L27F9

L3A8A:      LD      E,(HL)
            INC     HL
            LD      A,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,A
            LD      A,E
            OR      A
            JR      Z,L3AA9             ; (+015H)
            PUSH    BC
            LD      BC,(06AB5H)
            ADD     HL,BC
            POP     BC
L3A9B:      LD      A,(HL)
            CALL    L1F1E
            INC     HL
            DEC     E
            JR      Z,L3AAE             ; (+00bH)
            DEC     D
            JR      NZ,L3A9B            ; (-00bH)
            JP      L27F9

L3AA9:      LD      A,020H
            CALL    L1F1E
L3AAE:      DEC     D
            JR      NZ,L3AA9            ; (-008H)
            JP      L27F9

            PUSH    DE
L3AB5:      XOR     A
            LD      (L2A48),A
            LD      (L2A99),A
            LD      (02A80H),A
            LD      (02A3EH),A
            LD      (029F8H),A
            LD      (L2A25),A
            LD      (L2A43),A
            LD      (029F1H),A
            DEC     A
            LD      (L29EE),A
            LD      HL,(L6AB5)
            LD      DE,(02774H)
            ADD     HL,DE
L3ADA:      LD      A,(HL)
            OR      A
            JP      Z,L2101
            CP      021H
            JP      Z,L2101
            CP      026H
            JP      Z,L2101
            CP      023H
            JP      Z,0295CH
            CP      02AH
            JP      Z,02917H
            CP      024H
            JP      Z,0293AH
            CP      0FBH
            JP      Z,0293AH
            CP      02EH
            JP      Z,L294F
            CP      02BH
L3B04:      JP      Z,L2945
            CP      0C4H
            JR      NZ,L3B11            ; (+006H)
            INC     HL
            LD      A,(HL)
            OR      A
            JP      Z,L2101
L3B11:      CALL    L1F1E
L3B14:      INC     HL
            JR      L3ADA               ; (-03dH)

            INC     HL
            CP      (HL)
            DEC     HL
            JR      NZ,L3B11            ; (-00bH)
            LD      A,001H
            LD      (L2A99),A
            INC     HL
            INC     HL
            LD      A,(HL)
            LD      D,002H
            CP      0FBH
L3B28:      JR      Z,L3B2E             ; (+004H)
            CP      024H
            JR      NZ,L3B5F            ; (+031H)
L3B2E:      INC     HL
            INC     D
L3B30:      LD      (02AF4H),A
            LD      A,001H
            LD      (02A80H),A
            JR      L3B5F               ; (+025H)

            INC     HL
            CP      (HL)
            DEC     HL
            JR      NZ,L3B11            ; (-02eH)
            INC     HL
            INC     HL
            LD      D,002H
            JR      L3B30               ; (-015H)

            LD      A,001H
            LD      (L2A48),A
            INC     HL
            LD      D,001H
            JR      L3B5F               ; (+010H)

            INC     HL
            LD      A,(HL)
            DEC     HL
            CP      023H
            LD      A,02EH
            JR      NZ,L3B11            ; (-047H)
            LD      D,000H
            JR      L3B5F               ; (+003H)

            LD      D,001H
            INC     HL
L3B5F:      EX      DE,HL
            DEC     H
L3B61:      INC     H
            LD      A,(DE)
            INC     DE
            CP      023H
            JR      Z,L3B61             ; (-007H)
            CP      02CH
            JR      NZ,L3B73            ; (+007H)
            LD      A,001H
            LD      (029F8H),A
            JR      L3B61               ; (-012H)

L3B73:      CP      02EH
            JR      Z,L3B9A             ; (+023H)
            CP      02DH
            JR      NZ,L3B83            ; (+008H)
            LD      A,001H
            LD      (02A3EH),A
            INC     DE
            JR      L3B93               ; (+010H)

L3B83:      CP      02BH
            JR      NZ,L3B93            ; (+00cH)
            LD      A,(L2A48)
            OR      A
            JR      NZ,L3B93            ; (+006H)
            LD      A,001H
            LD      (L2A43),A
            INC     DE
L3B93:      DEC     DE
            LD      A,H
            LD      (L2A25),A
            JR      L3BCD               ; (+033H)

L3B9A:      LD      A,H
            LD      (L2A25),A
            LD      H,0FFH
L3BA0:      INC     H
            LD      A,(DE)
            INC     DE
            CP      023H
            JR      Z,L3BA0             ; (-007H)
            CP      02DH
            JR      NZ,L3BB3            ; (+008H)
            LD      A,001H
            LD      (02A3EH),A
            INC     DE
            JR      L3BC3               ; (+010H)

L3BB3:      CP      02BH
L3BB5:      JR      NZ,L3BC3            ; (+00cH)
            LD      A,(L2A48)
            OR      A
            JR      NZ,L3BC3            ; (+006H)
            LD      A,001H
            LD      (L2A43),A
            INC     DE
L3BC3:      DEC     DE
            LD      A,H
            LD      (L29EE),A
            JR      L3BCD               ; (+003H)

L3BCA:      POP     DE
            JR      L3BDF               ; (+012H)

L3BCD:      LD      H,004H
            PUSH    DE
L3BD0:      LD      A,(DE)
            INC     DE
            CP      05EH
            JR      NZ,L3BCA            ; (-00cH)
            DEC     H
            JR      NZ,L3BD0            ; (-009H)
            POP     AF
            LD      A,001H
            LD      (029F1H),A
L3BDF:      POP     HL
            PUSH    DE
            INC     HL
            LD      A,(HL)
            RES     7,(HL)
            DEC     HL
            LD      (02A75H),A
            LD      A,(L2A25)
            LD      D,A
            LD      A,000H
            LD      E,A
            LD      A,000H
            PUSH    BC
            CALL    L3E7E
            POP     BC
            LD      A,000H
            OR      A
            JR      Z,L3C3D             ; (+041H)
            PUSH    BC
            PUSH    DE
            LD      A,(L2A25)
            LD      L,A
            LD      H,000H
            ADD     HL,DE
            LD      DE,06A26H
            LD      C,000H
            DEC     HL
L3C0B:      LD      B,003H
L3C0D:      LD      A,(HL)
            CP      020H
            JR      Z,L3C24             ; (+012H)
            INC     C
            LD      (DE),A
            INC     DE
            DEC     HL
            DJNZ    L3C0D               ; (-00bH)
            LD      A,(HL)
            CP      020H
            JR      Z,L3C24             ; (+007H)
            LD      A,02CH
            LD      (DE),A
            INC     DE
            INC     C
            JR      L3C0B               ; (-019H)

L3C24:      LD      A,000H
            CP      C
            JP      C,02ADBH
            LD      B,C
            LD      L,A
            LD      H,000H
            POP     DE
            PUSH    DE
            ADD     HL,DE
L3C31:      LD      DE,06A26H
            DEC     HL
L3C35:      LD      A,(DE)
            LD      (HL),A
            DEC     HL
L3C38:      INC     DE
            DJNZ    L3C35               ; (-006H)
            POP     DE
            POP     BC
L3C3D:      LD      A,000H
            OR      A
            JR      NZ,L3C7F            ; (+03dH)
            LD      A,000H
            OR      A
L3C45:      JR      NZ,L3C7F            ; (+038H)
            LD      A,000H
L3C49:      OR      A
            JR      NZ,L3C74            ; (+028H)
            LD      A,(02A75H)
            RLCA    
            JR      NC,L3C7F            ; (+02dH)
            LD      A,(DE)
            CP      020H
            LD      H,02DH
            JR      Z,L3C5E             ; (+005H)
            CP      030H
            JP      NZ,02ADBH
L3C5E:      PUSH    DE
L3C5F:      LD      A,(DE)
            INC     DE
            CP      020H
            JR      Z,L3C5F             ; (-006H)
            CP      030H
            JR      Z,L3C5F             ; (-00aH)
L3C69:      OR      A
            JR      NZ,L3C6D            ; (+001H)
            DEC     DE
L3C6D:      DEC     DE
            DEC     DE
            LD      A,H
            LD      (DE),A
            POP     DE
            JR      L3C7F               ; (+00bH)

L3C74:      LD      A,000H
            RLCA    
            LD      H,02BH
            JR      NC,L3C5E            ; (-01dH)
            LD      H,02DH
            JR      L3C5E               ; (-021H)

L3C7F:      LD      A,000H
            OR      A
            JR      Z,L3C98             ; (+014H)
            LD      A,(DE)
            CP      020H
            JP      NZ,02ADBH
L3C8A:      PUSH    DE
L3C8B:      LD      A,(DE)
            INC     DE
            CP      020H
            JR      Z,L3C8B             ; (-006H)
            DEC     DE
            DEC     DE
L3C93:      LD      A,(02AF4H)
            LD      (DE),A
L3C97:      POP     DE
L3C98:      LD      A,000H
            OR      A
            JR      Z,L3CAA             ; (+00dH)
            PUSH    DE
L3C9E:      LD      A,(DE)
            CP      020H
            JR      NZ,L3CA9            ; (+006H)
            LD      A,02AH
            LD      (DE),A
            INC     DE
            JR      L3C9E               ; (-00bH)

L3CA9:      POP     DE
L3CAA:      LD      A,(DE)
            OR      A
            JR      Z,L3CB4             ; (+006H)
            CALL    L1F1E
            INC     DE
            JR      L3CAA               ; (-00aH)

L3CB4:      LD      A,(L2A43)
            OR      A
            JR      Z,L3CC9             ; (+00fH)
            LD      A,(02A75H)
            RLCA    
            LD      A,02BH
L3CC0:      JR      NC,L3CC4            ; (+002H)
            LD      A,02DH
L3CC4:      CALL    L1F1E
            JR      L3CD7               ; (+00eH)

L3CC9:      LD      A,(02A3EH)
            OR      A
L3CCD:      JR      Z,L3CD7             ; (+008H)
            LD      A,(02A75H)
            RLCA    
L3CD3:      LD      A,020H
            JR      L3CC0               ; (-017H)

L3CD7:      POP     HL
            JP      027FBH

            LD      A,002H
            JP      L2108

            CALL    L5414
            OR      A
            RET     Z
            CP      03AH
            RET     Z
            CP      02CH
            INC     HL
            SCF     
L3CEC:      RET     Z
            CP      03BH
            SCF     
            RET     Z
            JP      L20FE

            NOP     
STMTWORDTBL:DB      "GOT", "O" | 080H ; BASIC statement keyword text table
            DB      "GOSU", "B" | 080H
            DB      080H
            DB      "RU", "N" | 080H
            DB      "RETUR", "N" | 080H
            DB      052H,045H
L3D0A:      DB      "STOR", "E" | 080H
            DB      "RESUM", "E" | 080H
            DB      "LIS", "T" | 080H
            DB      080H
            DB      "DELET", "E" | 080H
            DB      052H
L3D21:      DB      "ENU", "M" | 080H
            DB      "AUT", "O" | 080H
            DB      080H
            DB      "FO", "R" | 080H
            DB      "NEX", "T" | 080H
L3D31:      DB      "PRIN", "T" | 080H
            DB      080H
            DB      "INPU", "T" | 080H
            DB      080H
            DB      "I", "F" | 080H
            DB      "DAT", "A" | 080H
            DB      "REA", "D" | 080H
            DB      "DI", "M" | 080H
            DB      "RE", "M" | 080H
            DB      045H,04EH
L3D4F:      DB      "D" | 080H
            DB      "STO", "P" | 080H
L3D54:      DB      "CON", "T" | 080H
            DB      "CL", "S" | 080H
            DB      080H
            DB      "O", "N" | 080H
            DB      "LE", "T" | 080H
            DB      "NE", "W" | 080H
            DB      "POK", "E" | 080H
            DB      "OF", "F" | 080H
            DB      "MOD", "E" | 080H
            DB      053H,04BH,049H
L3D72:      DB      "P" | 080H
            DB      "PLO", "T" | 080H
L3D77:      DB      "LIN", "E" | 080H
            DB      "RLIN", "E" | 080H
            DB      04DH
L3D81:      DB      "OV", "E" | 080H
            DB      052H,04DH
L3D86:      DB      "OV", "E" | 080H
            DB      "TRO", "N" | 080H
            DB      "TROF", "F" | 080H
            DB      "INP", "#" | 080H
            DB      080H
            DB      "GE", "T" | 080H
            DB      "PCOLO", "R" | 080H
            DB      "PHOM", "E" | 080H
            DB      "HSE", "T" | 080H
            DB      "GPRIN", "T" | 080H
            DB      "KE", "Y" | 080H
L3DB2:      DB      "AXI", "S" | 080H
            DB      "LOA", "D" | 080H
            DB      "SAV", "E" | 080H
            DB      "MERG", "E" | 080H
            DB      080H
            DB      043H,04FH,04EH
L3DC7:      DB      "SOL", "E" | 080H
            DB      080H
            DB      "OUT", "#" | 080H
            DB      "CIRCL", "E" | 080H
            DB      "TES", "T" | 080H
            DB      "PAG", "E" | 080H
            DB      080H
            DB      080H
            DB      "ERAS", "E" | 080H
            DB      "ERRO", "R" | 080H
            DB      080H
            DB      "US", "R" | 080H
            DB      "BY", "E" | 080H
            DB      080H
            DB      080H
            DB      "DE", "F" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "WOPE", "N" | 080H
            DB      043H
L3E02:      DB      "LOS", "E" | 080H
            DB      "ROPE", "N" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "KIL", "L" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "T", "O" | 080H
            DB      "STE", "P" | 080H
            DB      "THE", "N" | 080H
            DB      "USIN", "G" | 080H
            DB      080H
            DB      080H
            DB      054H
L3E2F:      DB      "A", "B" | 080H
            DB      "SP", "C" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      "O", "R" | 080H
            DB      "AN", "D" | 080H
            DB      080H
            DB      ">", "<" | 080H
            DB      "<", ">" | 080H
            DB      "=", "<" | 080H
            DB      "<", "=" | 080H
            DB      "=", ">" | 080H
            DB      ">", "=" | 080H
            DB      "=" | 080H
            DB      ">" | 080H
            DB      "<" | 080H
            DB      "+" | 080H
            DB      "-" | 080H
            DB      080H
            DB      080H
            DB      "/" | 080H
L3E51:      DB      "*" | 080H
            DB      "^" | 080H
            DB      0FFH
            DB      080H
            DB      "SE", "T" | 080H
            DB      "RESE", "T" | 080H
            DB      "COLO", "R" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
L3E7E:      DB      080H
            DB      080H
            DB      "MUSI", "C" | 080H
            DB      "TEMP", "O" | 080H
            DB      "CURSO", "R" | 080H
            DB      "VERIF", "Y" | 080H
            DB      "CL", "R" | 080H
            DB      "LIMI", "T" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "BOO", "T" | 080H
            DB      0FFH
            DS      96, 000H ; Zero padding / dispatch work area
L3F09:      DS      26, 000H
L3F23:      DS      140, 000H
L3FAF:      DS      80, 000H
L3FFF:      DS      28, 000H
L401B:      DS      16, 000H
L402B:      DS      12, 000H
L4037:      DS      3, 000H
L403A:      DS      100, 000H
L409E:      DS      40, 000H
L40C6:      DS      50, 000H
L40F8:      DS      57, 000H
L4131:      DS      98, 000H
L4193:      DS      18, 000H
L41A5:      DS      39, 000H
L41CC:      DS      133, 000H
L4251:      DS      63, 000H
L4290:      DS      17, 000H
L42A1:      DS      2, 000H
L42A3:      DS      6, 000H
FUNCWORDTBL:DB      "IN", "T" | 080H ; BASIC function keyword text table
            DB      "AB", "S" | 080H
            DB      "SI", "N" | 080H
            DB      "CO", "S" | 080H
            DB      "TA", "N" | 080H
            DB      "L", "N" | 080H
            DB      "EX", "P" | 080H
            DB      "SQ", "R" | 080H
            DB      "RN", "D" | 080H
            DB      "PEE", "K" | 080H
            DB      "AT", "N" | 080H
            DB      "SG", "N" | 080H
            DB      "LO", "G" | 080H
            DB      080H
            DB      "PA", "I" | 080H
            DB      "RA", "D" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "EO", "F" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "JO", "Y" | 080H
            DB      080H
            DB      "CHR", "$" | 080H
            DB      "STR", "$" | 080H
            DB      "HEX", "$" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "AS", "C" | 080H
            DB      "LE", "N" | 080H
            DB      "VA", "L" | 080H
L4308:      DB      080H
            DB      080H
            DB      080H
L430B:      DB      080H
            DB      080H
            DB      "ER", "N" | 080H
            DB      "ER", "L" | 080H
            DB      053H
L4314:      DB      049H,05AH
L4316:      DB      "E" | 080H
L4317:      DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      "LEFT", "$" | 080H
            DB      "RIGHT", "$" | 080H
            DB      "MID", "$" | 080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      053H,054H,052H,049H
L4334:      DB      "NG", "$" | 080H
            DB      "TI", "$" | 080H
            DB      080H
            DB      080H
            DB      "F", "N" | 080H
L433E:      DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            DB      080H
            RST     038H
            RLCA    
            JR      C,L4317             ; (-033H)
            LD      (HL),0FEH
L434C:      JR      NZ,L43BC            ; (+06eH)
            INC     E
            SUB     H
            LD      (HL),0A8H
            DEC     H
            EI      
            LD      (HL),002H
            LD      B,C
            CP      020H
            LD      D,(HL)
            INC     (HL)
            LD      (HL),C
            INC     (HL)
            PUSH    DE
            LD      HL,L20FE
            CP      A
            INC     E
            LD      L,A
            DEC     E
            LD      L,D
            LD      E,0FEH
            JR      NZ,L4334            ; (-036H)
            LD      (L20FE),HL
            CCF     
            JR      C,L4393             ; (+023H)
            INC     SP
            EX      (SP),HL
            DEC     H
            JP      PE,L235A
            INC     SP
            OR      A
            LD      HL,02071H
            SBC     A,A
            JR      NZ,L434C            ; (-032H)
L437E:      JR      C,L437E             ; (-002H)
            JR      NZ,L4314            ; (-06eH)
            SCF     
            LD      E,C
            ADD     HL,DE
            LD      C,B
            LD      (033D7H),HL
            CP      020H
            RET     NC
            LD      C,L
            INC     L
            LD      C,(HL)
            LD      SP,08C3AH
            LD      C,(HL)
L4393:      CP      04EH
            DEC     B
            LD      C,A
            INC     D
            LD      C,A
            LD      A,(HL)
            LD      (L2282),HL
            LD      D,B
            INC     SP
            CP      020H
            ADC     A,C
            INC     SP
            DEC     DE
            LD      C,A
            LD      D,B
            LD      C,A
            LD      H,H
            LD      C,A
            HALT    
            LD      C,A
            LD      HL,0FC43H
            LD      C,A
            POP     DE
            LD      B,C
            AND     H
            LD      B,D
            XOR     E
            LD      B,C
            CP      020H
            SRL     C
            CP      020H
            ADD     HL,SP
L43BC:      INC     SP
            LD      D,B
            LD      D,B
            DAA     
            LD      D,D
            DEC     SP
            LD      D,D
            CP      020H
            CP      020H
            CP      020H
            DEC     B
            LD      HL,L20FE
            DEC     B
            INC     SP
            JP      NZ,0FE13H
L43D2:      JR      NZ,L43D2            ; (-002H)
            JR      NZ,L43F1            ; (+01bH)
            DEC     H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            AND     E
            LD      B,(HL)
            LD      B,L
            LD      B,L
            RST     018H
            LD      B,(HL)
            CP      020H
            CP      020H
            CP      020H
            CP      020H
L43F1:      CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            LD      (BC),A
            ADD     HL,SP
            DEC     (HL)
            ADD     HL,SP
            LD      (HL),E
            LD      B,H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            INC     A
            LD      B,H
            LD      H,E
            LD      B,H
            LD      L,H
            INC     SP
            POP     DE
            LD      B,D
            LD      C,(HL)
            LD      (L340B),HL
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            LD      L,D
            LD      A,(06277H)
            LD      (HL),D
            LD      H,D
            ADD     A,063H
            OR      B
            LD      H,E
            CP      L
            LD      H,H
            LD      (HL),067H
            DEC     D
            LD      H,(HL)
            RET     NC
            LD      H,D
            RET     NC
            LD      H,L
            OR      L
            LD      H,L
            XOR     062H
            LD      A,D
            LD      H,L
            LD      HL,(0FE67H)
            JR      NZ,04424H            ; (-05eH)
            LD      H,L
            SBC     A,L
            LD      H,L
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            AND     E
            ADD     HL,SP
            CP      020H
            CP      020H
            LD      (HL),A
            LD      D,(HL)
            CALL    PE,0FE55H
L44AC:      JR      NZ,L44AC            ; (-002H)
L44AE:      JR      NZ,L44AE            ; (-002H)
L44B0:      JR      NZ,L44B0            ; (-002H)
L44B2:      JR      NZ,L44B2            ; (-002H)
L44B4:      JR      NZ,L44B4            ; (-002H)
L44B6:      JR      NZ,L44B6            ; (-002H)
L44B8:      JR      NZ,L44B8            ; (-002H)
            JR      NZ,0445CH            ; (-060H)
            LD      D,(HL)
            XOR     H
            LD      D,(HL)
            OR      H
            LD      D,(HL)
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            LD      H,D
            LD      D,L
            LD      L,D
            LD      D,L
            LD      C,B
            LD      D,L
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            RST     000H
            LD      D,(HL)
            CALL    PO,00256H
            LD      D,A
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CCF     
            LD      D,A
            CP      020H
            CP      020H
            RST     030H
            LD      E,H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CP      020H
            CALL    057FDH
            CALL    L4D65
            PUSH    DE
            INC     HL
            CP      029H
            JR      Z,L451C             ; (+00bH)
            DEC     HL
            CALL    03332H
            CALL    04DBCH
            LD      C,B
            CALL    05804H
L451C:      EX      (SP),HL
            CALL    L3322
            POP     HL
            RET     

            JP      (HL)

            DEC     HL
L4524:      CALL    03880H
            OR      A
            SCF     
            RET     Z
            CP      03AH
            RET     Z
            JR      L4524               ; (-00bH)

            CALL    L5414
            CP      02CH
            JP      NZ,L20FE
L4537:      INC     HL
            RET     

            CALL    L4D50
            CP      LSE0
            JR      C,L4545             ; (+005H)
            CP      0E7H
            JP      C,L2101
L4545:      CALL    0332FH
            PUSH    DE
            CALL    L4D50
            POP     BC
            OUT     (C),A
            RET     

            CALL    L4D50
            CALL    0332FH
            PUSH    DE
            CALL    0580BH
            CP      005H
            JP      NZ,L20FB
            EX      (SP),HL
            PUSH    BC
            EX      (SP),HL
            POP     BC
            IN      E,(C)
            LD      D,000H
            CALL    03A82H
            POP     HL
            RET     

            CALL    L4D50
            CP      028H
L4571:      JP      NC,L2101
            LD      (00054H),A
            CALL    L5414
            CALL    03332H
            CALL    L4D50
            CP      019H
            JP      NC,L2101
            LD      (00055H),A
            RET     

L4589:      CALL    0580BH
            LD      (06A65H),A
            CP      005H
            JP      Z,L33BE
            PUSH    HL
            PUSH    BC
            LD      A,0FFH
            CALL    00058H
            OR      A
            JR      Z,L45AB             ; (+00dH)
            LD      HL,(038D3H)
            LD      (HL),A
            LD      BC,(06AB5H)
            OR      A
            SBC     HL,BC
            LD      A,001H
L45AB:      LD      DE,(06AB9H)
            EX      DE,HL
            LD      (HL),A
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
L45B5:      LD      HL,(06AB9H)
            POP     DE
            CALL    01B82H
            POP     HL
            RET     

            PUSH    HL
            PUSH    BC
            LD      A,0FFH
            CALL    00058H
            SUB     030H
            JR      C,L45CD             ; (+004H)
            CP      00AH
            JR      C,L45CE             ; (+001H)
L45CD:      XOR     A
L45CE:      LD      E,A
            LD      D,000H
            POP     HL
            CALL    03A82H
            POP     HL
            RET     

            CP      040H
            JR      NZ,L45FF            ; (+024H)
            LD      BC,L33FD
            LD      (033F0H),BC
            INC     HL
L45E3:      CALL    L4D65
            CALL    03332H
L45E9:      PUSH    DE
            CALL    L4D50
            POP     DE
            EX      DE,HL
            CALL    000F2H
            EX      DE,HL
            INC     DE
            CALL    L5414
            CP      02CH
            RET     NZ
            INC     HL
            JR      L45E9               ; (-014H)

            LD      (HL),A
            RET     

L45FF:      LD      BC,000F2H
            LD      (033F0H),BC
            JR      L45E3               ; (-025H)

            JP      Z,L224E
            PUSH    HL
            CALL    L5414
            CP      04DH
            JR      NZ,L462B            ; (+018H)
            INC     HL
            CALL    L5414
            CP      041H
            JR      NZ,L462B            ; (+010H)
            INC     HL
            CALL    L5414
            CP      058H
            JR      NZ,L462B            ; (+008H)
            INC     HL
            POP     DE
            PUSH    HL
L4626:      LD      HL,0FF00H
            JR      L4647               ; (+01cH)

L462B:      POP     HL
            CALL    L4D65
            PUSH    HL
            LD      HL,(06ABDH)
            OR      A
L4634:      SBC     HL,DE
            JP      C,L20B9
            LD      HL,(L6AB7)
            INC     H
            INC     H
            INC     H
            INC     H
L4640:      OR      A
            SBC     HL,DE
            JP      NC,L2101
            EX      DE,HL
L4647:      CALL    L2231
            POP     HL
            POP     DE
            LD      SP,(06AB9H)
            LD      BC,0FFFFH
            PUSH    BC
            PUSH    DE
L4655:      RET     

            JP      Z,L20FE
            CALL    L352F
            CALL    L35EF
            EX      DE,HL
            LD      E,C
            LD      D,B
            CALL    L6974
L4665:      JP      L184D

            CALL    L4D65
            LD      A,D
            OR      E
            RET     NZ
            JP      L2101

            LD      DE,0000AH
            LD      (034EDH),DE
            LD      (034FFH),DE
            LD      E,000H
            LD      (034DCH),DE
            JR      Z,L46B7             ; (+033H)
            CP      02CH
            JR      Z,L4698             ; (+010H)
            CALL    03468H
            LD      (034EDH),DE
            CALL    L1C66
            JR      Z,L46B7             ; (+023H)
            CALL    0332FH
            DEC     HL
L4698:      CALL    05413H
            CP      02CH
            JR      Z,L46AF             ; (+010H)
            CALL    03468H
            LD      (034DCH),DE
            CALL    L1C66
            JR      Z,L46B7             ; (+00cH)
            CALL    0332FH
            DEC     HL
L46AF:      INC     HL
            CALL    03468H
            LD      (034FFH),DE
L46B7:      PUSH    HL
            LD      HL,(034DCH)
L46BB:      EX      DE,HL
            LD      HL,(L34ED)
            OR      A
            SBC     HL,DE
            JP      C,L2101
            CALL    L3522
            LD      HL,(06ABFH)
L46CB:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      A,D
            OR      E
            JR      Z,L4709             ; (+037H)
            EX      DE,HL
            ADD     HL,DE
            DEC     HL
            EX      DE,HL
L46D6:      INC     HL
            LD      C,(HL)
            INC     HL
            LD      B,(HL)
            PUSH    HL
            LD      HL,MONIT
            OR      A
            SBC     HL,BC
            POP     HL
            JR      Z,L46E9             ; (+005H)
            JR      C,L46E9             ; (+003H)
            EX      DE,HL
            JR      L46CB               ; (-01eH)

L46E9:      DEC     HL
            DEC     HL
            DEC     HL
            LD      BC,MONIT
L46EF:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      A,D
            OR      E
            JR      Z,L4709             ; (+013H)
            EX      DE,HL
            ADD     HL,DE
            DEC     HL
            EX      DE,HL
            INC     HL
            LD      (HL),C
            INC     HL
            LD      (HL),B
            LD      HL,MONIT
            ADD     HL,BC
            JR      C,L470E             ; (+00aH)
            LD      C,L
            LD      B,H
            EX      DE,HL
            JR      L46EF               ; (-01aH)

L4709:      CALL    L352F
            POP     HL
            RET     

L470E:      LD      HL,0000AH
            LD      (034FFH),HL
            LD      (L34ED),HL
            LD      L,000H
            LD      (034DCH),HL
            CALL    L34B7
            JP      L2101

            PUSH    DE
            PUSH    HL
            LD      HL,03574H
            LD      (03558H),HL
            JR      L4737               ; (+00bH)

L472C:      POP     HL
            POP     DE
            RET     

            PUSH    DE
            PUSH    HL
            LD      HL,L355A
            LD      (03558H),HL
L4737:      LD      HL,(06ABFH)
            DEC     HL
L473B:      INC     HL
            LD      A,(HL)
            INC     HL
            OR      (HL)
L473F:      JR      Z,L472C             ; (-015H)
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      (035ACH),DE
L4749:      CALL    03880H
            OR      A
            JR      Z,L473B             ; (-014H)
L474F:      CP      00BH
            JR      Z,L4757             ; (+004H)
            CP      00CH
            JR      NZ,L4749            ; (-00eH)
L4757:      JP      L355A

            CP      00BH
            JR      Z,L4749             ; (-015H)
            DEC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            PUSH    HL
            EX      DE,HL
L4764:      INC     HL
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            POP     HL
            LD      (HL),D
            DEC     HL
            LD      (HL),E
            DEC     HL
            LD      (HL),00BH
            INC     HL
            INC     HL
L4772:      JR      L4749               ; (-02bH)

            CP      00CH
            JR      Z,L4749             ; (-02fH)
            DEC     HL
L4779:      PUSH    HL
            CALL    L3A60
            LD      E,L
L477E:      LD      D,H
            LD      A,L
            OR      H
            JR      Z,L47B7             ; (+034H)
            CALL    035BBH
            JR      C,L4793             ; (+00bH)
            EX      DE,HL
            POP     HL
            DEC     HL
            LD      (HL),00CH
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
L4791:      JR      L4772               ; (-021H)

L4793:      EX      DE,HL
            LD      DE,L4C59
            CALL    00051H
            LD      A,020H
            CALL    L17D3
            CALL    L21A7
            CALL    00051H
            LD      DE,L2196
            CALL    00051H
            LD      HL,MONIT
            CALL    L21A7
            CALL    00051H
            CALL    NL
L47B7:      POP     HL
            INC     HL
            JR      L4791               ; (-02aH)

            PUSH    BC
            PUSH    DE
            EX      DE,HL
            LD      HL,(06ABFH)
L47C1:      LD      C,(HL)
            INC     HL
            LD      B,(HL)
            LD      A,B
            OR      C
            JR      Z,L47EC             ; (+024H)
            PUSH    HL
            ADD     HL,BC
            DEC     HL
            LD      C,L
            LD      B,H
            POP     HL
            PUSH    BC
            INC     HL
            LD      C,(HL)
            INC     HL
            LD      B,(HL)
            LD      A,C
            CP      E
            JR      NZ,L47E3            ; (+00cH)
            LD      A,B
            CP      D
            DEC     HL
            DEC     HL
            DEC     HL
            JR      NZ,L47E3            ; (+005H)
            POP     BC
            OR      A
L47E0:      POP     DE
            POP     BC
            RET     

L47E3:      PUSH    DE
            EX      DE,HL
            OR      A
            SBC     HL,BC
L47E8:      POP     DE
            POP     HL
            JR      NC,L47C1            ; (-02bH)
L47EC:      SCF     
            JR      L47E0               ; (-00fH)

            LD      DE,MONIT
            LD      BC,0FFFFH
            CALL    L1C66
            RET     Z
            CP      02DH
            JR      Z,L4827             ; (+02aH)
            CP      02CH
            JP      Z,L20FE
            CP      02EH
            JR      NZ,L480C            ; (+006H)
            LD      DE,(038E2H)
            JR      L4815               ; (+009H)

L480C:      CP      00BH
L480E:      JP      NZ,L20FE
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
L4815:      INC     HL
            CALL    L1C66
            JR      Z,L4824             ; (+009H)
            CP      02DH
            JR      Z,L4827             ; (+008H)
            CP      02CH
            JP      Z,L20FE
L4824:      LD      C,E
            LD      B,D
            RET     

L4827:      INC     HL
            CALL    L1C66
            RET     Z
            CP      02EH
            JR      NZ,L4836            ; (+006H)
            LD      BC,(038E2H)
            INC     HL
            RET     

L4836:      CP      00BH
            JR      NZ,L480E            ; (-02cH)
            INC     HL
            LD      C,(HL)
            INC     HL
            LD      B,(HL)
L483E:      INC     HL
            RET     

            CALL    L3647
            JP      L1872

            XOR     A
            LD      DE,(038E2H)
            JR      Z,L4850             ; (+003H)
            CALL    L35EF
L4850:      PUSH    DE
            EX      DE,HL
            CALL    035BBH
            POP     DE
            JR      NC,L485F            ; (+007H)
            LD      HL,L6AC1
            LD      (HL),000H
            JR      L4863               ; (+004H)

L485F:      LD      BC,00004H
            ADD     HL,BC
L4863:      EX      DE,HL
            PUSH    DE
            LD      (038E2H),HL
            CALL    L21A7
            CALL    00051H
            LD      A,020H
            CALL    L17D3
            POP     HL
            LD      DE,0110FH
            PUSH    DE
            CALL    L49CD
            POP     DE
            LD      B,000H
L487E:      LD      A,(DE)
            OR      A
            JR      Z,L4889             ; (+007H)
            INC     B
            CALL    0055EH
            INC     DE
            JR      L487E               ; (-00bH)

L4889:      LD      A,B
            OR      A
            RET     Z
            LD      A,014H
L488E:      CALL    L17D3
            DJNZ    L488E               ; (-005H)
            RET     

            POP     IX
L4896:      POP     BC
            INC     BC
            LD      A,B
            OR      C
            JR      Z,L48B9             ; (+01dH)
            INC     BC
            LD      A,B
            OR      C
            JR      NZ,L48BD            ; (+01cH)
            CALL    L5414
            EX      DE,HL
            POP     HL
            LD      (038E6H),HL
            POP     HL
            LD      (L38E0),HL
            POP     HL
            PUSH    IX
            CP      03AH
            RET     Z
            OR      A
            RET     Z
            EX      DE,HL
            JP      L3807

L48B9:      PUSH    BC
            JP      L20E0

L48BD:      DEC     BC
            DEC     BC
            LD      A,012H
            CP      C
            JR      NZ,L48B9            ; (-00bH)
            EX      DE,HL
            LD      HL,00010H
            ADD     HL,SP
            LD      SP,HL
            EX      DE,HL
            JR      L4896               ; (-037H)

            PUSH    HL
            CALL    03323H
            EX      DE,HL
            POP     HL
            POP     BC
            PUSH    DE
            EXX     
            LD      HL,(L38E0)
            PUSH    HL
            LD      HL,(038E6H)
            PUSH    HL
L48DE:      LD      HL,0FFFEH
            PUSH    HL
            LD      HL,MONIT
            ADD     HL,SP
            LD      DE,(038D3H)
            DEC     H
            DEC     H
            SBC     HL,DE
            LD      A,00AH
            JP      C,L20BB
            EXX     
L48F4:      PUSH    BC
            JP      L3807

            JP      L20FE

            LD      A,(L38D8)
            CP      002H
            JP      C,L20D4
            DEC     A
            LD      (L38D8),A
            CALL    L1C66
            EX      DE,HL
            LD      HL,(038EAH)
            LD      (038E6H),HL
            LD      HL,(038ECH)
            LD      (L38E0),HL
            LD      HL,(L38EE)
            JR      NZ,L4920            ; (+004H)
            POP     BC
            JP      01929H

L4920:      CP      08EH
            JP      Z,03323H
            EX      DE,HL
            JP      L3807

L4929:      CALL    05413H
            CP      080H
            JR      Z,L493D             ; (+00dH)
            CP      082H
            JP      NZ,L20FE
            CALL    05413H
L4938:      CP      LSE0
            JP      NZ,L20FE
L493D:      CALL    05413H
            CP      00BH
            JR      NZ,L495F            ; (+01bH)
            INC     HL
            PUSH    HL
            CALL    L3A60
            LD      A,L
            OR      H
            JR      Z,L497C             ; (+02fH)
            CALL    035BBH
            JP      C,L20CB
            LD      (038E8H),HL
            LD      A,001H
L4958:      LD      (L38D8),A
            POP     HL
            INC     HL
            INC     HL
            RET     

L495F:      CP      022H
            JP      NZ,L20CB
            PUSH    HL
            CALL    L3A67
            LD      HL,MONIT
            LD      (038E8H),HL
            POP     HL
            CALL    L38C5
            OR      A
            JR      Z,L4976             ; (+001H)
            INC     HL
L4976:      LD      A,001H
            LD      (L38D8),A
            RET     

L497C:      LD      A,(L38D8)
            DEC     A
            JR      Z,L4958             ; (-02aH)
            XOR     A
            LD      (L38D8),A
            LD      HL,(038EAH)
            LD      (038E6H),HL
            LD      A,(L38F2)
            JP      L2108

            CALL    L5414
            CP      0C1H
            JR      Z,L4929             ; (-070H)
            CALL    L4D65
            LD      C,E
            LD      B,D
            CP      087H
            JP      NC,L20FE
            CP      082H
            JR      NZ,L49B7            ; (+010H)
            CALL    05413H
            LD      E,081H
            CP      LSE4
            JR      Z,L49B6             ; (+006H)
            CP      LSE0
            JP      NZ,L20FE
            DEC     E
L49B6:      LD      A,E
L49B7:      PUSH    HL
            LD      HL,03147H
            SUB     080H
            ADD     A,A
            LD      E,A
            LD      D,000H
            ADD     HL,DE
            CALL    L3A60
            EX      (SP),HL
            INC     HL
            LD      A,B
L49C8:      OR      A
            JR      NZ,L49ED            ; (+022H)
            LD      A,C
            OR      A
L49CD:      JR      Z,L49ED             ; (+01eH)
            LD      B,A
L49D0:      DEC     B
            RET     Z
            CALL    L5414
            CP      022H
            JR      Z,L49F1             ; (+018H)
            CP      00BH
            JR      Z,L49E2             ; (+005H)
            CP      00CH
            JP      NZ,L20FE
L49E2:      INC     HL
            INC     HL
L49E4:      CALL    05413H
            CP      02CH
            INC     HL
            JR      Z,L49D0             ; (-01cH)
            DEC     HL
L49ED:      POP     DE
            JP      03323H

L49F1:      CALL    L38C5
            OR      A
            JR      Z,L49ED             ; (-00aH)
            JR      L49E4               ; (-015H)

            CALL    L5414
            INC     HL
            CP      LSE4
            JP      Z,L36CD
L4A02:      CP      LSE0
            JP      NZ,L20FE
            CALL    L5414
L4A0A:      INC     HL
            CP      00CH
            JR      NZ,L4A21            ; (+012H)
            CALL    L3A60
L4A12:      LD      (L38E0),HL
            XOR     A
            LD      (L38D9),A
            JP      018FEH

L4A1C:      LD      HL,(06ABFH)
            JR      L4A12               ; (-00fH)

L4A21:      CP      00BH
            JP      NZ,036F8H
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      A,D
            OR      E
            JR      Z,L4A1C             ; (-011H)
            EX      DE,HL
            CALL    035BBH
            JP      C,L20CB
            EX      DE,HL
            LD      (HL),D
            DEC     HL
            LD      (HL),E
            DEC     HL
            LD      (HL),00CH
            EX      DE,HL
            JP      03812H

            CALL    0528BH
            EX      AF,AF'
            LD      A,(DE)
            OR      A
            JR      Z,L4A60             ; (+019H)
            EX      AF,AF'
            CP      LSE2
            JR      NZ,L4A5C            ; (+010H)
L4A4C:      INC     HL
            CALL    L5414
            CP      00BH
            JR      Z,L4A0A             ; (-04aH)
            CP      00CH
            JR      Z,L4A0A             ; (-04eH)
            CP      022H
            JR      Z,L4A0A             ; (-052H)
L4A5C:      POP     AF
            JP      01925H

L4A60:      DEC     HL
            CALL    L3869
            JR      NC,L4A4C            ; (-01aH)
            JP      018FBH

L4A69:      CALL    03880H
            OR      A
            SCF     
            RET     Z
            CP      0C2H
            RET     Z
            CP      093H
            JR      NZ,L4A69            ; (-00dH)
            CALL    L3869
            RET     C
            JR      L4A69               ; (-013H)

            INC     HL
            LD      A,(HL)
            JR      L4A86               ; (+006H)

            INC     HL
            LD      A,(HL)
            CP      094H
            JR      Z,L4AA5             ; (+01fH)
L4A86:      OR      A
            RET     Z
            CP      022H
            JR      Z,L4AC5             ; (+039H)
            CP      0FEH
            JR      NC,L4AA3            ; (+013H)
            CP      097H
            JR      Z,L4AA5             ; (+011H)
            CP      027H
            JR      Z,L4AA5             ; (+00dH)
            CP      020H
            RET     NC
            CP      00BH
            RET     C
            CP      015H
            JR      NC,L4ABA            ; (+018H)
L4AA2:      INC     HL
L4AA3:      INC     HL
            RET     

L4AA5:      LD      A,(HL)
            OR      A
            RET     Z
            CP      03AH
            RET     Z
            CP      022H
            JR      Z,L4AB2             ; (+003H)
            INC     HL
            JR      L4AA5               ; (-00dH)

L4AB2:      CALL    L38C5
            OR      A
            RET     Z
            INC     HL
            JR      L4AA5               ; (-015H)

L4ABA:      AND     00FH
            ADD     A,L
            LD      L,A
            LD      A,000H
            ADC     A,H
            LD      H,A
            LD      A,020H
            RET     

L4AC5:      INC     HL
L4AC6:      LD      A,(HL)
            OR      A
            RET     Z
            CP      022H
L4ACB:      RET     Z
            JR      L4AC5               ; (-009H)

            LD      A,016H
            JP      PRNT

            NOP     
            NOP     
            NOP     
            NOP     
            LD      BC,MONIT
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
L4AE3:      NOP     
            NOP     
            NOP     
L4AE6:      NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
L4AF4:      NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            CALL    L395B
            PUSH    HL
            LD      B,001H
            SRL     D
            JR      NC,L4B0E            ; (+002H)
            SLA     B
L4B0E:      SRL     E
            JR      NC,L4B16            ; (+004H)
            SLA     B
            SLA     B
L4B16:      CALL    0398EH
            SET     3,H
L4B1B:      CALL    000EAH
            AND     08FH
L4B20:      OR      C
            CALL    000F2H
            RES     3,H
            CALL    000EAH
            CP      0F0H
            JR      NC,L4B2F            ; (+002H)
L4B2D:      LD      A,0F0H
L4B2F:      OR      B
            CALL    000F2H
            POP     HL
            RET     

            CALL    L395B
L4B38:      PUSH    HL
            LD      B,0FEH
            SRL     D
            JR      NC,L4B41            ; (+002H)
            RL      B
L4B41:      SRL     E
            JR      NC,L4B49            ; (+004H)
            RL      B
            RL      B
L4B49:      CALL    0398EH
            CALL    000EAH
            CP      0F0H
            JR      NC,L4B55            ; (+002H)
            LD      A,0F0H
L4B55:      AND     B
            CALL    000F2H
            POP     HL
            RET     

            CALL    L4D50
            CP      050H
            JP      NC,L2101
            PUSH    AF
            LD      A,(HL)
            CALL    03332H
            CALL    L4D50
            CP      064H
            JP      NC,L2101
            LD      E,A
            POP     AF
L4B72:      LD      D,A
            LD      A,(0005DH)
            AND     070H
            LD      C,A
            LD      A,(HL)
            CP      02CH
            RET     NZ
            INC     HL
            PUSH    DE
            CALL    L4D50
            POP     DE
            CP      008H
            JP      NC,L2101
            RLCA    
            RLCA    
            RLCA    
            RLCA    
            LD      C,A
            RET     

            PUSH    DE
            LD      D,000H
            LD      H,D
            LD      L,E
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,DE
            ADD     HL,HL
            ADD     HL,HL
            ADD     HL,HL
            POP     DE
            LD      E,D
            LD      D,000H
            ADD     HL,DE
            LD      DE,VRAM
            ADD     HL,DE
            RET     

            PUSH    HL
            CALL    L3D21
            LD      A,H
            OR      A
            JP      NZ,L2101
            LD      A,L
            CP      008H
            JP      NC,L2101
            CALL    00061H
            POP     HL
            JR      C,L4BC6             ; (+00eH)
            JR      Z,L4BC6             ; (+00cH)
            LD      DE,0FFFFH
L4BBD:      CALL    03A82H
            LD      A,005H
            LD      (06A65H),A
            RET     

L4BC6:      LD      E,A
            LD      D,000H
            JR      L4BBD               ; (-00eH)

            JR      Z,L4BFB             ; (+02eH)
            LD      A,001H
            LD      (0004EH),A
            LD      A,(00056H)
            LD      B,019H
            CALL    03A0EH
            LD      (00056H),BC
            LD      A,(HL)
            CP      02CH
            JR      NZ,L4BF6            ; (+013H)
            INC     HL
            LD      B,028H
            LD      A,(0005BH)
            CALL    03A0EH
            LD      (0005BH),BC
L4BF0:      LD      A,00BH
            CALL    L17D3
            RET     

L4BF6:      CALL    03A06H
            JR      L4BF0               ; (-00bH)

L4BFB:      LD      BC,L1800
            XOR     A
            LD      (0004EH),A
            LD      (00056H),BC
            LD      BC,L2700
            LD      (0005BH),BC
            RET     

            LD      D,000H
            LD      E,A
            CALL    L5414
            CP      02CH
            JR      Z,L4C1D             ; (+005H)
            PUSH    BC
            CALL    L4D50
            POP     BC
L4C1D:      CALL    0332FH
            LD      C,E
            PUSH    BC
            CALL    L4D50
            POP     BC
            DEC     A
            JP      M,L2101
            ADD     A,C
            CP      B
            JP      NC,L2101
            LD      B,A
            RET     

            CP      09DH
            JR      Z,L4C40             ; (+00bH)
            CP      0A1H
            JP      NZ,L20FE
            XOR     A
L4C3B:      LD      (0004DH),A
            INC     HL
            RET     

L4C40:      LD      A,(04DCBH)
            CP      002H
            JP      Z,L4FF7
            LD      A,(04DCDH)
            CP      04EH
            JP      NZ,L4FF7
            LD      A,(0004DH)
            OR      A
            JR      NZ,L4C3B            ; (-01bH)
            CALL    L39FB
L4C59:      LD      A,016H
            CALL    PRNT
            JR      L4C3B               ; (-025H)

            PUSH    AF
            LD      A,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,A
            POP     AF
            RET     

            JP      L20FE

            DI      
            OUT     (LSE4),A
            JP      MONIT

            SUB     C
            LD      L,B
            ADD     A,D
            LD      A,(L5D87)
            INC     C
            LD      L,D
            SUB     L
            LD      B,A
            LD      (HL),D
            LD      C,E
            LD      D,B
            LD      C,L
            OR      A
            LD      H,C
            LD      BC,0CD41H
            ADD     A,A
            LD      E,L
            LD      A,E
            OR      D
            RET     Z
            BIT     7,D
            LD      A,07FH
            JR      Z,L4C97             ; (+009H)
            LD      A,D
            CPL     
            LD      D,A
            LD      A,E
            CPL     
            LD      E,A
            INC     DE
            LD      A,0FFH
L4C97:      LD      B,091H
L4C99:      DEC     B
            BIT     7,D
            JR      NZ,L4CA4            ; (+006H)
            RL      E
            RL      D
            JR      L4C99               ; (-00bH)

L4CA4:      LD      (HL),B
            INC     HL
            AND     D
            LD      (HL),A
            INC     HL
            LD      (HL),E
            DEC     HL
            DEC     HL
            RET     

            PUSH    HL
            LD      HL,00005H
            ADD     HL,DE
            EX      DE,HL
            POP     HL
            RET     

            LD      HL,L3D77
            LD      BC,00005H
            LDIR    
            RET     

            CP      030H
            RET     C
            CP      03AH
            CCF     
            RET     

            LD      A,(DE)
            RET     

            CP      05FH
            RET     Z
            CP      030H
            RET     C
            CP      05BH
            CCF     
L4CD0:      RET     C
            CP      03AH
            CCF     
            RET     NC
            CP      041H
            RET     

            PUSH    HL
            LD      HL,MONIT
L4CDC:      LD      A,(DE)
            INC     DE
            CALL    L3B04
            JR      C,L4CFA             ; (+017H)
            CALL    L3C49
            CALL    L3C49
            CALL    L3C49
            CALL    L3C49
            ADD     A,L
            LD      L,A
            LD      A,000H
            ADC     A,H
            JP      C,L20F5
            LD      H,A
            JR      L4CDC               ; (-01eH)

L4CFA:      DEC     DE
            EX      DE,HL
            EX      (SP),HL
            CALL    03A82H
            POP     DE
            LD      A,005H
            RET     

            SUB     030H
            RET     C
            CP      00AH
            CCF     
            RET     NC
            CP      011H
            RET     C
            SUB     007H
            CP      010H
            CCF     
            RET     

            CALL    L5D87
            LD      (L6A81),A
            LD      (06A82H),A
            LD      (L6A83),A
            LD      (06A84H),A
            LD      A,005H
            LD      (06A65H),A
L4D28:      CALL    03C62H
            CP      02BH
            JR      Z,L4D28             ; (-007H)
            CP      02DH
            JR      NZ,L4D39            ; (+006H)
            CALL    L3B28
            JP      L5D91

L4D39:      CP      024H
            JP      Z,03AD8H
L4D3E:      CP      030H
            JR      NZ,L4D48            ; (+006H)
            LD      A,(DE)
            INC     DE
            JR      L4D3E               ; (-008H)

L4D46:      LD      A,(DE)
            INC     DE
L4D48:      CP      020H
            JR      NZ,L4D52            ; (+006H)
            LD      A,(06A80H)
            OR      A
L4D50:      JR      Z,L4D46             ; (-00cH)
L4D52:      CP      02EH
            JR      Z,L4D71             ; (+01bH)
            CALL    03ABEH
            JR      C,L4DB1             ; (+056H)
            SUB     030H
            CALL    L3D0A
            CALL    03C4EH
            LD      A,001H
L4D65:      LD      (06A82H),A
            LD      A,(L6A81)
            INC     A
            LD      (L6A81),A
            JR      L4D46               ; (-02bH)

L4D71:      LD      A,001H
            LD      (06A84H),A
            LD      C,A
L4D77:      LD      A,(DE)
L4D78:      INC     DE
            CP      020H
            JR      NZ,L4D83            ; (+006H)
            LD      A,(06A80H)
            OR      A
            JR      Z,L4D77             ; (-00cH)
L4D83:      CALL    03ABEH
            JR      C,L4DA9             ; (+021H)
            INC     C
            SUB     030H
            JR      Z,L4D94             ; (+007H)
            PUSH    AF
            LD      A,001H
            LD      (06A82H),A
L4D93:      POP     AF
L4D94:      PUSH    AF
            LD      A,(06A82H)
            LD      B,A
            LD      A,(L6A81)
            ADD     A,B
            LD      (L6A81),A
            POP     AF
L4DA1:      CALL    L3D0A
            CALL    03C4EH
            JR      L4D77               ; (-032H)

L4DA9:      DEC     C
            JR      Z,L4DB1             ; (+005H)
            CALL    L3C38
            JR      L4DA9               ; (-008H)

L4DB1:      CP      045H
            JR      Z,L4DC3             ; (+00eH)
L4DB5:      DEC     DE
            LD      A,(L6A83)
            OR      A
            RET     NZ
            LD      A,(06A84H)
            OR      A
            RET     NZ
            LD      A,005H
            RET     

L4DC3:      LD      A,(DE)
            CP      02DH
            JR      Z,L4DD1             ; (+009H)
            CP      02BH
            JR      Z,L4DD1             ; (+005H)
            CALL    03ABEH
            JR      C,L4DB5             ; (-01cH)
L4DD1:      LD      A,001H
            LD      (06A84H),A
            PUSH    HL
            LD      HL,05FE1H
            LD      (L3C31),HL
            LD      HL,MONIT
            LD      A,(DE)
            INC     DE
            CP      02BH
            JR      Z,L4DF2             ; (+00cH)
            CP      02DH
            JR      NZ,L4DF4            ; (+00aH)
            PUSH    HL
            LD      HL,L60CC
            LD      (L3C31),HL
            POP     HL
L4DF2:      LD      A,(DE)
            INC     DE
L4DF4:      SUB     030H
            JR      C,L4E14             ; (+01cH)
            CP      00AH
            JR      NC,L4E14            ; (+018H)
            PUSH    DE
            CALL    L3C49
            LD      E,L
L4E01:      LD      D,H
            CALL    L3C49
            CALL    L3C49
            CALL    L3C45
            LD      E,A
            LD      D,000H
            CALL    L3C45
            POP     DE
            JR      L4DF2               ; (-022H)

L4E14:      LD      A,H
            OR      A
            JR      NZ,L4E4B            ; (+033H)
            LD      A,L
            POP     HL
            PUSH    DE
            PUSH    BC
            PUSH    HL
            LD      DE,L6A66
            PUSH    DE
L4E21:      CALL    L3AB5
            POP     HL
            LD      B,A
            INC     B
            JR      L4E2C               ; (+003H)

L4E29:      CALL    L3D0A
L4E2C:      DJNZ    L4E29               ; (-005H)
            EX      DE,HL
            POP     HL
            CALL    MONIT
            POP     BC
            POP     DE
            JP      L3BB5

            PUSH    AF
            PUSH    BC
            PUSH    DE
            LD      DE,L3D72
            CALL    L60CC
            POP     DE
            POP     BC
            POP     AF
            RET     

            ADD     HL,DE
            RET     NC
            JR      L4E4B               ; (+002H)

            ADD     HL,HL
            RET     NC
L4E4B:      JP      L20F5

            PUSH    DE
            PUSH    HL
            LD      HL,L6A66
            LD      E,A
            LD      D,000H
            CALL    03A82H
            EX      DE,HL
            POP     HL
            PUSH    BC
            CALL    L5DAF
L4E5F:      POP     BC
            POP     DE
            RET     

L4E62:      LD      A,(DE)
            CP      020H
            INC     DE
            JR      Z,L4E62             ; (-006H)
            RET     

            LD      A,005H
            LD      (06A65H),A
            LD      A,(HL)
L4E6F:      OR      A
            JR      Z,L4E76             ; (+004H)
            INC     HL
            LD      A,(HL)
            DEC     HL
            RLCA    
L4E76:      LD      A,020H
            JR      NC,L4E7F            ; (+005H)
            CALL    L5D91
            LD      A,02DH
L4E7F:      PUSH    AF
L4E80:      CALL    L3FAF
            CALL    L403A
            POP     AF
            DEC     DE
            LD      (DE),A
            RET     

            PUSH    BC
            CALL    L5E4A
            POP     BC
            RET     

L4E90:      CALL    L5D87
L4E93:      POP     DE
            POP     HL
            POP     BC
            RET     

            PUSH    BC
            PUSH    HL
            PUSH    DE
            LD      A,(HL)
            CP      081H
            JR      C,L4E90             ; (-00fH)
            LD      A,(HL)
            CP      0A0H
            JR      NC,L4E93            ; (-011H)
            INC     HL
            CALL    L3CD3
            PUSH    HL
            LD      L,(HL)
            LD      B,000H
L4EAC:      SRL     E
            RR      D
            RR      C
            RR      L
            INC     A
            INC     B
            CP      0A0H
            JR      NZ,L4EAC            ; (-00eH)
L4EBA:      SLA     L
            RL      C
            RL      D
            RL      E
            DJNZ    L4EBA               ; (-00aH)
            LD      A,L
            POP     HL
            LD      (HL),A
            DEC     HL
            CALL    L3CCD
            JR      L4E93               ; (-03aH)

            LD      (HL),C
            DEC     HL
            LD      (HL),D
            DEC     HL
            LD      (HL),E
            RET     

            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            LD      C,(HL)
            INC     HL
            RET     

            LD      A,(HL)
            OR      A
            RET     Z
            INC     HL
            LD      A,(HL)
            RES     7,(HL)
            DEC     HL
            PUSH    AF
            CALL    L3CEC
            POP     AF
            RLCA    
            RET     NC
            JP      L5D91

            PUSH    BC
L4EED:      PUSH    HL
            PUSH    DE
            LD      A,(HL)
            CP      081H
            JP      C,L3C93
            LD      DE,L6A66
            PUSH    HL
            CALL    03AB8H
            LD      HL,L6A66
            CALL    L3C97
            POP     DE
            EX      DE,HL
            CALL    L5DA6
            JP      L3C93

            PUSH    AF
            PUSH    BC
            PUSH    DE
            LD      DE,L3D72
            CALL    05FE1H
            POP     DE
            POP     BC
            POP     AF
            RET     

            LD      A,(HL)
            CP      091H
            JR      C,L4F21             ; (+005H)
L4F1C:      CCF     
            LD      HL,MONIT
            RET     

L4F21:      INC     HL
            BIT     7,(HL)
            JR      Z,L4F31             ; (+00bH)
            CALL    L3D31
            LD      A,H
            CPL     
            LD      H,A
            LD      A,L
            CPL     
            LD      L,A
            INC     HL
            RET     

L4F31:      DEC     HL
            LD      A,(HL)
            CP      091H
            JP      NC,L20F5
            CP      081H
            JR      C,L4F1C             ; (-020H)
            PUSH    AF
            INC     HL
            LD      A,(HL)
L4F3F:      INC     HL
            LD      L,(HL)
            LD      H,A
            POP     AF
            SET     7,H
L4F45:      CP      090H
            RET     Z
            INC     A
            SRL     H
            RR      L
            JR      L4F45               ; (-00aH)

            SBC     A,E
            LD      A,0BCH
            JR      NZ,L4F54            ; (+000H)
L4F54:      SBC     A,B
            JR      L4EED               ; (-06aH)

            ADD     A,B
            NOP     
            SUB     H
            LD      (HL),H
            INC     H
            NOP     
            NOP     
            SUB     C
            LD      B,E
            LD      D,B
            NOP     
            NOP     
            ADC     A,(HL)
            INC     E
            LD      B,B
            NOP     
            NOP     
            ADC     A,D
            LD      A,D
            NOP     
            NOP     
            NOP     
            ADD     A,A
            LD      C,B
            NOP     
            NOP     
            NOP     
            ADD     A,H
            JR      NZ,L4F75            ; (+000H)
L4F75:      NOP     
            NOP     
            ADD     A,C
            NOP     
            NOP     
            NOP     
            NOP     
            LD      A,L
            LD      C,H
            CALL    Z,0CDCCH
            LD      H,(HL)
            DEC     HL
            CALL    Z,L1277
            PUSH    HL
            PUSH    DE
            PUSH    BC
            LD      C,000H
            PUSH    DE
            LD      B,000H
            LD      DE,02710H
            CALL    L3DB2
            LD      DE,003E8H
            CALL    L3DB2
            LD      DE,00064H
            CALL    L3DB2
            LD      DE,0000AH
            CALL    L3DB2
            LD      A,L
            POP     DE
            OR      030H
            LD      (DE),A
            INC     DE
            XOR     A
            LD      (DE),A
            POP     BC
            POP     DE
            POP     HL
            RET     

            LD      A,0FFH
L4FB4:      INC     A
            OR      A
            SBC     HL,DE
            JR      NC,L4FB4            ; (-006H)
            ADD     HL,DE
            OR      A
            INC     B
            OR      030H
            POP     DE
            EX      (SP),HL
            LD      (HL),A
            INC     HL
            EX      (SP),HL
            PUSH    DE
            INC     C
            RET     

            LD      HL,(L6A7E)
            LD      B,000H
L4FCC:      LD      DE,L3D72
            CALL    L3C8A
            JR      C,L4FDA             ; (+006H)
            CALL    L3C38
            INC     B
            JR      L4FCC               ; (-00eH)

L4FDA:      LD      DE,L3D77
            CALL    L3C8A
            JR      NC,L4FE8            ; (+006H)
            CALL    L3D0A
            DEC     B
            JR      L4FDA               ; (-00eH)

L4FE8:      PUSH    BC
            CALL    L3FAF
            CALL    L403A
            POP     BC
            PUSH    DE
            EX      DE,HL
L4FF2:      LD      A,(HL)
            OR      A
            JR      Z,L4FF9             ; (+003H)
            INC     HL
L4FF7:      JR      L4FF2               ; (-007H)

L4FF9:      DEC     HL
            LD      A,(HL)
            INC     HL
            CP      030H
            JR      NZ,L5002            ; (+002H)
            INC     B
            DEC     HL
L5002:      LD      A,045H
            LD      (HL),A
            INC     HL
            LD      A,B
            LD      B,02BH
            BIT     7,A
            JR      Z,L5011             ; (+004H)
            NEG     
            LD      B,02DH
L5011:      LD      (HL),B
            INC     HL
            LD      (HL),030H
L5015:      SUB     00AH
            JR      C,L501C             ; (+003H)
            INC     (HL)
            JR      L5015               ; (-007H)

L501C:      ADD     A,03AH
            INC     HL
            LD      (HL),A
            INC     HL
            LD      (HL),000H
            POP     DE
            RET     

            PUSH    HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
L5029:      EX      DE,HL
            CALL    L3E2F
            POP     HL
            RET     

            LD      DE,06A26H
            PUSH    DE
            CALL    L3D86
            POP     DE
            JP      L409E

            PUSH    HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            BIT     7,D
            JR      Z,L5029             ; (-019H)
            LD      HL,MONIT
            OR      A
            SBC     HL,DE
            CALL    L3E2F
            DEC     DE
            LD      A,02DH
            LD      (DE),A
            POP     HL
            RET     

            PUSH    HL
            CALL    L3D21
            LD      DE,06A31H
            PUSH    DE
            CALL    L3D86
            POP     HL
            LD      A,030H
            LD      B,005H
L5061:      CP      (HL)
            JR      NZ,L5069            ; (+005H)
            INC     HL
            DJNZ    L5061               ; (-006H)
            JR      L5072               ; (+009H)

L5069:      LD      A,B
            LD      (L6A81),A
            LD      A,001H
            LD      (06A82H),A
L5072:      LD      A,02EH
            LD      (L6A36),A
            POP     HL
            CALL    03CDAH
            JP      L3FFF

            OR      A
            JP      Z,L3F09
            PUSH    DE
            LD      A,(HL)
            OR      A
            JR      Z,L50C6             ; (+03fH)
            PUSH    HL
            LD      A,D
            LD      DE,L6A6E
            PUSH    AF
            CALL    L3AB5
            POP     AF
            OR      A
            JR      Z,L509F             ; (+00bH)
            LD      B,A
            LD      HL,L6A6E
            JR      L509D               ; (+003H)

L509A:      CALL    L3D0A
L509D:      DJNZ    L509A               ; (-005H)
L509F:      POP     HL
            LD      B,000H
L50A2:      LD      DE,L6A6E
            CALL    L3C8A
            JR      C,L50B0             ; (+006H)
            CALL    L3C38
            INC     B
            JR      L50A2               ; (-00eH)

L50B0:      PUSH    HL
            LD      HL,L6A6E
            CALL    L3C38
            POP     HL
L50B8:      LD      DE,L6A6E
            CALL    L3C8A
            JR      NC,L50C6            ; (+006H)
            CALL    L3D0A
            DEC     B
            JR      L50B8               ; (-00eH)

L50C6:      POP     DE
            PUSH    BC
            CALL    L3F23
            POP     BC
            PUSH    DE
            LD      A,(DE)
            CP      02EH
            JR      NZ,L50E4            ; (+012H)
            LD      DE,L6A36
            DEC     DE
            LD      A,(DE)
            CP      031H
            POP     DE
            PUSH    DE
            JR      NZ,L5100            ; (+023H)
            EX      DE,HL
            INC     HL
            LD      (HL),031H
            DEC     HL
            JR      L50FE               ; (+01aH)

L50E4:      LD      A,(DE)
            CP      031H
            JR      NZ,L5100            ; (+017H)
            EX      DE,HL
            INC     HL
            LD      A,(HL)
            DEC     HL
            CP      02EH
            LD      A,030H
            JR      Z,L50F5             ; (+002H)
            LD      A,020H
L50F5:      LD      (HL),A
L50F6:      INC     HL
            LD      A,(HL)
            CP      02EH
            JR      Z,L50F6             ; (-006H)
            LD      (HL),031H
L50FE:      EX      DE,HL
            INC     B
L5100:      LD      A,(DE)
            INC     DE
            OR      A
            JR      NZ,L5100            ; (-005H)
            DEC     DE
            JP      L3E02

            PUSH    DE
            CALL    L3F23
            POP     AF
            OR      A
            RET     NZ
            PUSH    HL
            LD      HL,L6A36
            DEC     HL
            LD      A,030H
            CP      (HL)
L5118:      JP      NZ,02ADBH
            DEC     HL
            LD      A,020H
            CP      (HL)
            JR      NZ,L5118            ; (-009H)
            POP     HL
            RET     

            PUSH    DE
            CALL    L3FAF
            JP      C,02ADBH
            POP     HL
            PUSH    HL
            LD      H,000H
            INC     L
            JR      Z,L5132             ; (+001H)
            DEC     L
L5132:      LD      DE,L6A37
            ADD     HL,DE
            LD      A,(HL)
            LD      (HL),000H
            LD      DE,L3036
            CP      035H
            JR      C,L514F             ; (+00fH)
L5140:      DEC     HL
            LD      A,(HL)
            CP      02EH
            JR      Z,L5140             ; (-006H)
            INC     A
            JP      Z,02ADBH
            LD      (HL),A
            CP      03AH
            JR      Z,0513AH             ; (-015H)
L514F:      LD      HL,0110EH
            LD      DE,02000H
L5155:      LD      (HL),D
            INC     HL
            DEC     E
            JR      NZ,L5155            ; (-005H)
            POP     HL
            PUSH    HL
            LD      E,H
            LD      D,000H
            LD      HL,0110FH
            ADD     HL,DE
            PUSH    HL
            LD      HL,06A2DH
            LD      (HL),020H
            INC     HL
            LD      D,007H
L516C:      LD      A,(HL)
            CP      030H
            JR      NZ,L5177            ; (+006H)
            LD      (HL),020H
            INC     HL
            DEC     D
            JR      NZ,L516C            ; (-00bH)
L5177:      POP     HL
            PUSH    HL
            LD      B,E
            LD      A,B
            OR      A
L517C:      JR      Z,L5195             ; (+017H)
            LD      DE,L6A36
L5181:      DEC     HL
            DEC     DE
            LD      A,(DE)
            LD      (HL),A
            CP      020H
            JR      Z,L5195             ; (+00cH)
            DJNZ    L5181               ; (-00aH)
            DEC     DE
            LD      A,(DE)
            CP      020H
            JR      Z,L5195             ; (+004H)
            INC     A
            JP      NZ,02ADBH
L5195:      POP     HL
            POP     DE
            INC     E
            JR      Z,L51A9             ; (+00fH)
            LD      B,E
            LD      DE,L6A37
            LD      (HL),02EH
L51A0:      INC     HL
            DEC     B
            JR      Z,L51A9             ; (+005H)
            LD      A,(DE)
            INC     DE
            LD      (HL),A
            JR      L51A0               ; (-009H)

L51A9:      LD      (HL),000H
L51AB:      LD      DE,0110FH
            RET     

            LD      (L6A7E),HL
            XOR     A
            LD      (L6A81),A
            LD      (06A82H),A
            PUSH    HL
            LD      HL,06A2DH
            LD      (HL),0FFH
            LD      B,021H
            LD      A,030H
L51C3:      INC     HL
            LD      (HL),A
            DJNZ    L51C3               ; (-004H)
            LD      A,02EH
            LD      (L6A36),A
            POP     HL
            LD      A,(HL)
            OR      A
            RET     Z
            LD      DE,L3D4F
            CALL    L5E4A
            CCF     
            RET     C
            LD      DE,L3D81
            CALL    L5E4A
            RET     C
            LD      DE,L6A6E
            PUSH    DE
            CALL    03AB8H
            POP     HL
            LD      A,(HL)
            CP      081H
            JR      C,L51FF             ; (+013H)
            CP      090H
            JP      C,L3E51
            LD      IX,L6A2E
L51F5:      LD      DE,L3D54
            CALL    L40C6
            CALL    L40F8
            RET     NC
L51FF:      LD      IX,L6A37
L5203:      LD      DE,L3D4F
            PUSH    BC
            PUSH    IX
L5209:      CALL    05FE1H
            POP     IX
L520E:      POP     BC
            CALL    03AADH
            CALL    L40C6
L5215:      CALL    L40F8
L5218:      JR      C,L5203             ; (-017H)
            RET     

            LD      A,005H
            LD      (06A65H),A
            PUSH    HL
            LD      DE,L6A76
            PUSH    DE
            CALL    03AB8H
            POP     HL
            CALL    L3FAF
            CALL    L4037
            POP     HL
            RET     

L5231:      LD      DE,L6A36
            LD      (DE),A
            DEC     DE
            RET     

            JP      C,L3DC7
            LD      HL,(L6A7E)
            LD      A,(HL)
            OR      A
            JR      Z,L5231             ; (-010H)
            LD      DE,L6A2E
            DEC     DE
            EX      DE,HL
            LD      DE,00001H
L5249:      INC     HL
            LD      A,(HL)
            CP      02EH
            JR      NZ,L5254            ; (+005H)
            LD      DE,MONIT
            JR      L5249               ; (-00bH)

L5254:      CP      030H
            JR      Z,L5249             ; (-00fH)
            ADD     HL,DE
            LD      DE,00008H
            ADD     HL,DE
            LD      A,(HL)
L525E:      LD      (HL),030H
            CP      035H
            JR      C,L5273             ; (+00fH)
L5264:      DEC     HL
            LD      A,(HL)
            CP      02EH
            JR      Z,L5264             ; (-006H)
            INC     A
            JR      Z,L52AD             ; (+040H)
            LD      (HL),A
            CP      03AH
            JR      Z,L525E             ; (-014H)
            INC     HL
L5273:      LD      DE,L6A36
            EX      DE,HL
            OR      A
            SBC     HL,DE
            EX      DE,HL
            JR      C,L5282             ; (+005H)
            LD      HL,L6A36
            JR      L5299               ; (+017H)

L5282:      DEC     HL
            LD      A,(HL)
            CP      02EH
            DEC     HL
            JR      Z,L5298             ; (+00fH)
            INC     HL
            CP      030H
            JR      Z,L5273             ; (-01bH)
            PUSH    HL
            LD      DE,L6A3F
            SBC     HL,DE
            POP     HL
            JP      NC,L3DC7
L5298:      INC     HL
L5299:      LD      (HL),000H
            LD      DE,L6A2E
L529E:      LD      A,(DE)
            CP      030H
            JR      NZ,L52A6            ; (+003H)
            INC     DE
            JR      L529E               ; (-008H)

L52A6:      OR      A
            RET     NZ
            DEC     DE
            LD      A,030H
            LD      (DE),A
            RET     

L52AD:      LD      HL,06A26H
            LD      (HL),031H
            INC     HL
            LD      (HL),045H
            LD      DE,03038H
            INC     HL
            LD      (HL),02BH
            INC     HL
            LD      (HL),D
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),000H
            LD      DE,06A26H
            RET     

L52C6:      LD      A,(DE)
            CP      07DH
            RET     Z
L52CA:      CALL    L5E4A
            JR      C,L52E2             ; (+013H)
            INC     (IX+000H)
            PUSH    IX
            PUSH    BC
            CALL    L5DA6
            POP     BC
            POP     IX
            LD      A,001H
            LD      (06A82H),A
            JR      L52CA               ; (-018H)

L52E2:      INC     IX
            CALL    03AADH
            LD      A,(06A82H)
            LD      B,A
            LD      A,(L6A81)
            ADD     A,B
            LD      (L6A81),A
            CALL    L40F8
            RET     NC
            JR      L52C6               ; (-032H)

            LD      A,(HL)
            OR      A
            RET     Z
            LD      A,(L6A81)
            CP      009H
            RET     

            NOP     
            XOR     A
            LD      (L1819),A
            CALL    L5414
            CP      0FBH
            JR      NZ,L5322            ; (+015H)
            INC     HL
            CALL    L5414
            CP      050H
            JP      NZ,L20FE
            INC     HL
            LD      (L1819),A
            LD      A,(04DCBH)
            CP      002H
            JP      Z,L4FF7
L5322:      CALL    L35EF
            LD      (04146H),DE
            LD      (04154H),BC
            PUSH    HL
            LD      HL,(06ABFH)
L5331:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            LD      A,D
            OR      E
            JP      Z,L41A5
            EX      DE,HL
L533B:      ADD     HL,DE
            DEC     HL
            DEC     HL
            EX      DE,HL
            PUSH    DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            PUSH    HL
            LD      HL,MONIT
            OR      A
            SBC     HL,DE
            JR      C,L5353             ; (+006H)
            JR      Z,L5353             ; (+004H)
            POP     HL
            POP     HL
            JR      L5331               ; (-022H)

L5353:      LD      HL,MONIT
            OR      A
            SBC     HL,DE
            JR      NC,L535F            ; (+004H)
            POP     HL
            POP     HL
            JR      L53A5               ; (+046H)

L535F:      POP     HL
            EX      DE,HL
            PUSH    DE
            LD      (038E2H),HL
            CALL    L21A7
            CALL    L17E2
            LD      A,020H
            CALL    L17D3
            POP     HL
            LD      DE,0110FH
            PUSH    DE
            CALL    L49CD
            POP     DE
            LD      A,(L1819)
            OR      A
            JR      NZ,L5389            ; (+00aH)
L537F:      LD      A,(DE)
            OR      A
            JR      Z,L538C             ; (+009H)
            CALL    0055EH
            INC     DE
            JR      L537F               ; (-00aH)

L5389:      CALL    L17E2
L538C:      CALL    L17F9
            POP     HL
L5390:      XOR     A
            CALL    00058H
            CP      020H
            JR      Z,L5390             ; (-008H)
            CP      01BH
            JP      NZ,L4131
            POP     HL
            XOR     A
            LD      (L1819),A
            JP      L2069

L53A5:      POP     HL
            XOR     A
            LD      (L1819),A
            RET     

            XOR     A
            LD      (00FFCH),A
            CALL    L46D6
            PUSH    HL
            LD      DE,L430B
            LD      HL,00FFCH
L53B9:      CALL    L473F
            LD      A,001H
            LD      (L42A3),A
            LD      A,(00FFCH)
            CP      002H
            JR      Z,L53F4             ; (+02cH)
            CP      005H
            JR      Z,L53F4             ; (+028H)
L53CC:      LD      A,018H
            JP      L2108

            XOR     A
            LD      (00FFCH),A
            CALL    L46D6
            PUSH    HL
            LD      DE,L430B
            LD      HL,00FFCH
            CALL    L473F
            LD      A,(00FFCH)
            CP      001H
            JR      Z,L542E             ; (+045H)
            CP      004H
            JR      Z,L53CC             ; (-021H)
            XOR     A
            LD      (L42A3),A
            CALL    L2239
L53F4:      LD      HL,(06AB9H)
            LD      DE,00200H
            OR      A
            SBC     HL,DE
            LD      (L4251),HL
            LD      A,(00FFCH)
            CP      002H
            JR      Z,L544D             ; (+046H)
            LD      A,(L42A3)
            CP      001H
            JR      Z,L5450             ; (+042H)
            LD      HL,(06ABFH)
            LD      (01010H),HL
L5414:      LD      BC,(0100EH)
            CALL    RDDAT
            JP      C,L4779
            LD      HL,(01010H)
            LD      DE,(0100EH)
            ADD     HL,DE
            LD      (06AB3H),HL
            CALL    L224E
            POP     HL
            RET     

L542E:      LD      HL,(01010H)
            PUSH    HL
            PUSH    DE
            LD      DE,(06ABBH)
            OR      A
            SBC     HL,DE
            LD      A,012H
            JP      C,L2108
            POP     DE
            POP     HL
            LD      BC,(0100EH)
            CALL    RDDAT
            JP      C,L477E
            POP     HL
            RET     

L544D:      LD      (L42A3),A
L5450:      LD      HL,MONIT
            LD      DE,(0100EH)
            OR      A
            SBC     HL,DE
            LD      (01010H),HL
            LD      (L42A1),HL
            LD      DE,(06AB3H)
            INC     D
            INC     D
            INC     D
            INC     D
            INC     D
            OR      A
            SBC     HL,DE
            JP      C,L20B9
            LD      HL,(01010H)
            LD      BC,(0100EH)
            CALL    RDDAT
            JP      C,L4779
            LD      A,(00FFCH)
            CP      005H
            JR      Z,L548C             ; (+009H)
            LD      DE,L4290
            CALL    00051H
            CALL    LETNL
L548C:      POP     HL
            JP      L1876

            DB      "CONVERT" ; CONVERTING TEXT string
L5497:      DB      "ING TEXT",000H
            NOP     
            NOP     
            NOP     
            NOP     
            CALL    L352F
            PUSH    HL
            LD      HL,00FFCH
            LD      (HL),005H
            LD      HL,(06ABFH)
            LD      (01010H),HL
            EX      DE,HL
            LD      HL,(06AB3H)
            OR      A
            SBC     HL,DE
            LD      (0100EH),HL
            POP     HL
            CALL    046C1H
            PUSH    HL
            LD      HL,(01010H)
            LD      BC,(0100EH)
            CALL    WRDAT
            JP      C,L477E
            POP     HL
            RET     

            CALL    L352F
            CALL    L46D6
            PUSH    HL
            LD      DE,L4316
            LD      HL,00FFCH
            CALL    L473F
            LD      BC,(0100EH)
            LD      A,(00FFCH)
            LD      HL,(06ABFH)
            CP      005H
            JR      Z,L54F7             ; (+008H)
            CP      001H
            JP      NZ,L41CC
            LD      HL,(01010H)
L54F7:      CALL    VERFY
            JP      C,L477E
            CALL    NL
            LD      DE,L4308
            CALL    00051H
            POP     HL
            RET     

            LD      C,A
            LD      C,E
            NOP     
            DB      "LOADING" ; LOADING string
            DS      3, 020H
            NOP     
            DB      "VERIFYING " ; VERIFYING string
            NOP     
            CP      087H
            JP      NZ,L20FE
            INC     HL
            PUSH    HL
            LD      C,000H
L552A:      CALL    NL
            LD      DE,04432H
            CALL    00051H
            LD      A,C
            CP      009H
            JR      Z,L553C             ; (+004H)
            ADD     A,031H
            JR      L5542               ; (+006H)

L553C:      LD      A,031H
            CALL    L17D3
            DEC     A
L5542:      CALL    L17D3
            LD      A,029H
            CALL    L17D3
            LD      A,03DH
            CALL    L17D3
            LD      A,C
            CALL    04424H
            LD      B,(HL)
            INC     HL
            LD      DE,0110FH
            CALL    0436CH
            LD      DE,0110FH
            CALL    00051H
            INC     C
            LD      A,C
            CP      00AH
L5565:      JR      NZ,L552A            ; (-03dH)
            CALL    NL
            POP     HL
            RET     

            EX      DE,HL
            PUSH    BC
            LD      A,B
            OR      A
            LD      C,000H
            JR      Z,L559D             ; (+029H)
L5574:      LD      A,(DE)
            CP      020H
            JR      C,L55A2             ; (+029H)
            CP      022H
            JR      Z,L55A2             ; (+025H)
            LD      A,C
            CP      001H
            JR      Z,L558E             ; (+00cH)
            OR      A
            JR      Z,L558B             ; (+006H)
            LD      (HL),029H
            INC     HL
L5588:      LD      (HL),02BH
            INC     HL
L558B:      LD      (HL),022H
            INC     HL
L558E:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            LD      C,001H
            DJNZ    L5574               ; (-022H)
L5596:      LD      (HL),022H
L5598:      INC     HL
            LD      (HL),000H
            POP     BC
            RET     

L559D:      LD      (HL),022H
            INC     HL
            JR      L5596               ; (-00cH)

L55A2:      LD      A,C
            CP      0FFH
            JR      Z,L55DE             ; (+037H)
            OR      A
            JR      Z,L55B0             ; (+006H)
            LD      (HL),022H
            INC     HL
            LD      (HL),02BH
            INC     HL
L55B0:      LD      (HL),043H
            INC     HL
            LD      (HL),048H
            INC     HL
            LD      (HL),052H
            INC     HL
            LD      (HL),024H
            INC     HL
            LD      (HL),028H
L55BE:      INC     HL
            PUSH    DE
            PUSH    HL
            PUSH    BC
            EX      DE,HL
            LD      L,(HL)
            LD      H,000H
            CALL    L21A7
            POP     BC
            POP     HL
L55CB:      LD      A,(DE)
            OR      A
            JR      Z,L55D4             ; (+005H)
            LD      (HL),A
            INC     DE
            INC     HL
            JR      L55CB               ; (-009H)

L55D4:      POP     DE
            INC     DE
            LD      C,0FFH
            DJNZ    L5574               ; (-066H)
            LD      (HL),029H
            JR      L5598               ; (-046H)

L55DE:      LD      (HL),02CH
            JR      L55BE               ; (-024H)

            CALL    L5414
L55E5:      CP      028H
            INC     HL
            JP      NZ,L20FE
            CALL    L4D50
            PUSH    AF
            CALL    L5414
            CALL    05804H
            CALL    L5414
            CP      0F4H
            JP      NZ,L20FE
            INC     HL
            POP     AF
L55FF:      DEC     A
            CP      00AH
            JP      NC,L2101
            PUSH    HL
            CALL    04424H
            EX      (SP),HL
            CALL    04DBCH
            EX      (SP),HL
            LD      A,B
L560F:      CP      010H
            JR      C,L5615             ; (+002H)
            LD      A,00FH
L5615:      LD      (HL),A
L5616:      OR      A
            JR      Z,L5621             ; (+008H)
            LD      B,A
            INC     HL
L561B:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            DJNZ    L561B               ; (-006H)
L5621:      POP     HL
            EI      
            RET     

            ADD     A,A
            ADD     A,A
            ADD     A,A
            ADD     A,A
            LD      HL,L1322
            ADD     A,L
            LD      L,A
L562D:      LD      A,000H
            ADC     A,H
            LD      H,A
            RET     

            LD      B,H
            LD      B,L
            LD      B,(HL)
            JR      NZ,05682H            ; (+04bH)
            LD      B,L
            LD      E,C
            JR      Z,L563B             ; (+000H)
L563B:      INC     HL
            CALL    04DBCH
            LD      A,B
            OR      A
            JR      Z,L5657             ; (+014H)
            PUSH    HL
            LD      HL,0110FH
            EX      DE,HL
            LD      C,B
            LD      B,000H
            LDIR    
            LD      A,00DH
            LD      (DE),A
            LD      DE,0110FH
            CALL    MELDY
            POP     HL
L5657:      CALL    L5414
            CP      03BH
            JR      Z,L563B             ; (-023H)
            CP      02CH
            JR      Z,L563B             ; (-027H)
            RET     

            CALL    L4D50
L5666:      OR      A
            JP      Z,L2101
            CP      008H
            JP      NC,L2101
            CALL    00041H
            RET     

            CALL    L5414
            CP      02CH
            JR      NZ,L568E            ; (+014H)
            INC     HL
            CALL    L5414
            CP      02CH
            JP      NZ,L20FE
            INC     HL
            PUSH    HL
            LD      HL,0005DH
            LD      (04533H),HL
            POP     HL
            JR      L56CE               ; (+040H)

L568E:      CALL    L4D50
            CP      028H
            JP      NC,L2101
            LD      (04535H),A
            CALL    L5414
            CP      02CH
            JP      NZ,L20FE
            INC     HL
            CALL    L5414
            CP      02CH
            JP      Z,L20FE
            CALL    L4D50
            CP      025H
            JP      NC,L2101
            LD      (04536H),A
            PUSH    HL
            LD      HL,(04535H)
            PUSH    DE
            CALL    005C5H
            LD      D,0D8H
            ADD     HL,DE
            POP     DE
            LD      (04533H),HL
            POP     HL
            CALL    L5414
            CP      02CH
            JP      NZ,L20FE
            INC     HL
L56CE:      CALL    L5414
            CP      02CH
            INC     HL
            JR      Z,L5701             ; (+02bH)
            DEC     HL
            CALL    L4D50
            CP      008H
            JP      NC,L2101
            RLA     
            RLA     
            RLA     
            RLA     
            AND     070H
            LD      B,A
            PUSH    HL
            LD      HL,(04533H)
            LD      A,H
            CP      0D8H
            JR      NC,L56F7            ; (+008H)
            LD      A,(HL)
            AND     08FH
            OR      B
            LD      (HL),A
            POP     HL
            JR      L5701               ; (+00aH)

L56F7:      CALL    000EAH
            AND     08FH
            OR      B
            CALL    000F2H
            POP     HL
L5701:      CALL    L5414
            CP      02CH
            JR      NZ,L5709            ; (+001H)
            INC     HL
L5709:      CALL    L1C66
            RET     Z
            CALL    L4D50
            CP      008H
            JP      NC,L2101
            AND     007H
            LD      B,A
            PUSH    HL
            LD      HL,(04533H)
            LD      A,H
            CP      0D8H
            JR      NC,L5728            ; (+007H)
            LD      A,(HL)
            AND     0F8H
            OR      B
            LD      (HL),A
            POP     HL
            RET     

L5728:      CALL    000EAH
            AND     0F8H
            OR      B
            CALL    000F2H
            POP     HL
            RET     

            NOP     
            NOP     
            NOP     
            NOP     
            LD      IY,(L6AB5)
            LD      DE,00110H
            ADD     IY,DE
            LD      A,(IY+000H)
            OR      A
            RET     

            PUSH    HL
            CALL    L4537
            JR      Z,L576B             ; (+020H)
            LD      A,(IY+001H)
            CP      04FH
            JR      NZ,L576B            ; (+019H)
            LD      A,(00FFCH)
            CP      004H
            JR      NZ,L576B            ; (+012H)
            CALL    04696H
            LD      (HL),01AH
            PUSH    IY
            POP     HL
            LD      BC,0000EH
            ADD     HL,BC
            CALL    0461EH
            JP      C,L477E
L576B:      LD      (IY+000H),000H
            POP     HL
            RET     

            PUSH    HL
            PUSH    BC
            CALL    L45B5
            JP      C,L4589
            CALL    04696H
            LD      A,(HL)
            INC     (IY+00BH)
            JR      NZ,L5786            ; (+004H)
            LD      (IY+00CH),000H
L5786:      POP     BC
            POP     HL
            RET     

            LD      A,03FH
            JP      L2108

            INC     B
L578F:      LD      A,(IY+00CH)
            OR      A
            JR      NZ,L57AD            ; (+018H)
            LD      BC,00090H
            ADD     HL,BC
            LD      BC,00080H
            CALL    L474F
            CALL    RDDAT
            JP      C,L477E
            LD      (IY+00BH),080H
            LD      (IY+00CH),001H
L57AD:      CALL    04696H
            LD      A,(HL)
            CP      0FFH
            JR      L57F1               ; (+03cH)

            PUSH    BC
            PUSH    DE
            PUSH    HL
            CALL    L4626
            PUSH    IY
            POP     HL
            LD      A,(0458EH)
            CP      003H
            JR      Z,L578F             ; (-036H)
            LD      BC,0000EH
            ADD     HL,BC
            LD      A,(IY+00CH)
            OR      A
            JR      NZ,L57DC            ; (+00dH)
            PUSH    HL
            CALL    045F6H
            POP     HL
            LD      (IY+00BH),000H
            LD      (IY+00CH),001H
L57DC:      LD      A,(HL)
            INC     HL
L57DE:      AND     (HL)
            INC     A
            OR      A
            JR      NZ,L57F2            ; (+00fH)
            LD      BC,00100H
            ADD     HL,BC
L57E7:      LD      A,(HL)
            DEC     HL
            DEC     C
            OR      A
            JR      Z,L57E7             ; (-006H)
            LD      A,(IY+00BH)
            CP      C
L57F1:      CCF     
L57F2:      POP     HL
            POP     DE
            POP     BC
            RET     

            LD      BC,00102H
L57F9:      CALL    L474F
            CALL    RDDAT
L57FF:      JP      C,L477E
            RET     

L5803:      LD      BC,00102H
            CALL    L474F
            CALL    WRDAT
            PUSH    AF
            CALL    04758H
            CALL    04616H
            POP     AF
            JR      L57FF               ; (-017H)

            INC     (IY+00EH)
            RET     NZ
            INC     (IY+00FH)
            RET     

            LD      A,0FFH
            LD      (HL),A
            INC     HL
            LD      (HL),A
            DEC     HL
            JR      L5803               ; (-023H)

            PUSH    AF
            CALL    04645H
            LD      A,(IY+001H)
            CP      049H
            JP      NZ,L4640
            POP     AF
            RET     

            PUSH    AF
            CALL    04645H
            LD      A,(IY+001H)
            CP      04FH
            JP      Z,04632H
            LD      A,018H
            JP      L2108

            CALL    L4537
            RET     NZ
            LD      A,018H
            JP      L2108

            CALL    L4537
            LD      A,(IY+00DH)
            RET     

            CALL    L4634
L5858:      LD      A,020H
            CALL    0466FH
            LD      A,(IY+00DH)
            AND     007H
            RET     Z
            JR      L5858               ; (-00dH)

            CALL    L4634
            LD      A,0FFH
            LD      (IY+00DH),A
            LD      A,00DH
            PUSH    HL
            PUSH    DE
            PUSH    BC
            PUSH    AF
            CALL    L4634
            INC     (IY+00DH)
            CALL    04696H
            POP     AF
            LD      (HL),A
L587E:      PUSH    AF
            INC     (IY+00BH)
            JR      NZ,L5891            ; (+00dH)
            PUSH    IY
            POP     HL
            LD      BC,0000EH
            ADD     HL,BC
L588B:      CALL    04603H
            CALL    04758H
L5891:      POP     AF
            POP     BC
            POP     DE
            POP     HL
            RET     

            PUSH    IY
            POP     HL
            LD      C,010H
            LD      B,000H
            ADD     HL,BC
            LD      C,(IY+00BH)
            ADD     HL,BC
            RET     

            LD      A,004H
            LD      (00FFCH),A
            CALL    L172C
            PUSH    HL
            CALL    L4537
            JR      NZ,L592D            ; (+07cH)
L58B1:      CALL    L4764
            LD      (IY+001H),04FH
            CALL    046C4H
L58BB:      POP     HL
            LD      (IY+000H),001H
            RET     

            CALL    L172C
L58C4:      PUSH    HL
            LD      HL,00FFCH
            LD      BC,00080H
            CALL    L474F
            CALL    WRINF
            JP      C,L477E
            POP     HL
            RET     

            CALL    L172C
            PUSH    HL
            CALL    04708H
            POP     HL
            RET     

L58DF:      LD      A,000H
            LD      (00FFCH),A
            CALL    L172C
            PUSH    HL
            CALL    L4537
            JR      NZ,L592D            ; (+040H)
L58ED:      CALL    L4764
            LD      (IY+001H),049H
L58F4:      CALL    04708H
            LD      A,(00FFCH)
            LD      (0458EH),A
            CP      004H
            JR      Z,L58BB             ; (-046H)
            CP      003H
            JP      NZ,L41CC
            JR      L58BB               ; (-04dH)

L5908:      LD      HL,0110FH
            LD      BC,00080H
            CALL    L474F
            CALL    RDINF
            JR      C,L597E             ; (+068H)
            LD      DE,L180E
            CALL    L473F
            CALL    L16EE
            JR      NZ,L5908            ; (-019H)
            LD      HL,0110FH
            LD      DE,00FFCH
            LD      BC,00080H
            LDIR    
            RET     

L592D:      LD      A,02BH
            JP      L2108

            LD      DE,00FFCH
            LD      BC,00020H
            PUSH    HL
            LDIR    
            POP     HL
            JP      L46BB

            CALL    04746H
            CALL    Z,016C8H
            RET     

            PUSH    HL
            LD      HL,(038E6H)
            INC     HL
            LD      A,H
            OR      L
            POP     HL
            RET     

            PUSH    AF
            CALL    04746H
            LD      (00050H),A
            POP     AF
            RET     

            PUSH    HL
            PUSH    BC
            PUSH    IY
            POP     HL
            LD      BC,00010H
            ADD     HL,BC
            XOR     A
            JR      L5970               ; (+00cH)

            PUSH    HL
            PUSH    BC
            PUSH    IY
            POP     HL
            LD      B,010H
            XOR     A
L596C:      LD      (HL),A
            INC     HL
            DJNZ    L596C               ; (-004H)
L5970:      LD      B,000H
L5972:      LD      (HL),A
            INC     HL
            DJNZ    L5972               ; (-004H)
            POP     BC
            POP     HL
            RET     

            PUSH    AF
            CALL    L2239
            POP     AF
L597E:      EX      AF,AF'
            XOR     A
            LD      (L1819),A
            CALL    L4537
            LD      (IY+000H),000H
            EX      AF,AF'
            CP      002H
            JP      NZ,L2069
            LD      A,018H
            JP      L2108

            PUSH    DE
            PUSH    BC
            EX      DE,HL
            CALL    L5414
            EX      DE,HL
            LD      C,000H
L599E:      CALL    0493EH
            OR      A
            JR      Z,L59DD             ; (+039H)
            CP      0FFH
            JR      Z,L59D2             ; (+02aH)
            INC     DE
            CP      060H
            JP      NC,L20FE
            CP      020H
            JR      C,L599E             ; (-014H)
            DEC     DE
            CP      027H
            JP      Z,L483E
            CP      03FH
            JR      Z,L59D6             ; (+01aH)
            CP      022H
            JR      Z,L59E1             ; (+021H)
            CP      02EH
            JR      Z,L59CD             ; (+009H)
            CP      024H
            JR      Z,L59CD             ; (+005H)
            CALL    03ABEH
            JR      C,L5A02             ; (+035H)
L59CD:      CALL    04948H
            JR      L599E               ; (-034H)

L59D2:      LD      (HL),LSE4
            JR      L59D8               ; (+002H)

L59D6:      LD      (HL),08FH
L59D8:      CALL    04937H
            JR      L599E               ; (-03fH)

L59DD:      LD      (HL),A
            POP     BC
            POP     DE
            RET     

L59E1:      CALL    0492BH
            JR      Z,L59DD             ; (-009H)
            JR      L599E               ; (-04aH)

L59E8:      JR      L599E               ; (-04cH)

L59EA:      POP     BC
            LD      A,(DE)
            CALL    03AC7H
            JR      C,L59FD             ; (+00cH)
L59F1:      CALL    04936H
            LD      A,(DE)
            CALL    03ABEH
            JP      C,0479EH
            JR      L59F1               ; (-00cH)

L59FD:      CALL    04936H
            JR      L599E               ; (-064H)

L5A02:      PUSH    BC
            LD      BC,L2AF5
            CALL    L48F4
            JR      NC,L5A44            ; (+039H)
            LD      BC,L2C54
            CALL    L48F4
            LD      C,0FEH
            JR      NC,L5A1F            ; (+00aH)
            LD      BC,L30A9
            CALL    L48F4
            LD      C,0FFH
            JR      C,L59EA             ; (-035H)
L5A1F:      LD      (HL),C
            INC     HL
            LD      (HL),B
            LD      A,B
            POP     BC
            CALL    04939H
            CALL    L4938
            CP      0B4H
            JR      NZ,L59E8            ; (-046H)
            CALL    0493EH
            CP      03DH
            JP      NZ,L47E8
            LD      (HL),0F4H
            CALL    04937H
            JP      04884H

            CALL    04936H
            JP      L48DE

L5A44:      LD      A,B
            POP     BC
            CALL    L4938
            CP      097H
            JP      Z,L48DE
            CP      094H
            JP      Z,L48DE
            CP      0C2H
            JR      Z,L5AD4             ; (+07dH)
            CP      LSE2
            JR      Z,L5A84             ; (+029H)
            CP      08DH
L5A5D:      JR      NC,L59E8            ; (-077H)
            CP      087H
            JR      NC,L5A9E            ; (+03bH)
            CP      082H
            JR      NZ,L5A84            ; (+01dH)
            CALL    0493EH
            OR      A
            JR      Z,L5A5D             ; (-010H)
            PUSH    BC
            LD      BC,L2AF5
            CALL    L48F4
            LD      A,B
            POP     BC
            JP      C,0479EH
            CALL    L4938
            CP      LSE0
            JR      Z,L5A84             ; (+004H)
            CP      LSE4
            JR      NZ,L5A5D            ; (-027H)
L5A84:      CALL    0493EH
            CP      02CH
            JR      Z,L5A96             ; (+00bH)
            CALL    03ABEH
            JP      C,L47E8
            CALL    049B3H
            JR      L5A84               ; (-012H)

L5A96:      CALL    04936H
            JR      L5A84               ; (-017H)

L5A9B:      CALL    04936H
L5A9E:      CALL    0493EH
            CP      02FH
            JR      NZ,L5AB5            ; (+010H)
            LD      A,0FBH
            CALL    04936H
            EX      DE,HL
            CALL    L5414
            EX      DE,HL
            CALL    04936H
            CALL    0493EH
L5AB5:      CP      022H
            JR      NZ,L5AC1            ; (+008H)
            CALL    0492BH
            JR      NZ,L5A9E            ; (-020H)
            JP      047DDH

L5AC1:      CP      02CH
            JR      C,L5ACC             ; (+007H)
L5AC5:      CP      02FH
            JR      C,L5A9B             ; (-02eH)
            CALL    03ABEH
L5ACC:      JP      C,L47E8
            CALL    049B3H
            JR      L5A9E               ; (-036H)

L5AD4:      DEC     HL
            LD      (HL),03AH
            INC     HL
            LD      (HL),A
            CALL    L4938
            JR      L5A84               ; (-05aH)

L5ADE:      LD      A,(DE)
            CALL    L49C8
            JP      Z,0479EH
            CALL    04936H
            CP      022H
            JR      NZ,L5ADE            ; (-00eH)
            CALL    0492FH
            JP      Z,047DDH
            JR      L5ADE               ; (-016H)

            PUSH    HL
            PUSH    DE
            LD      L,C
            LD      H,B
            LD      B,07FH
L5AFA:      POP     DE
            PUSH    DE
            INC     B
            LD      A,(HL)
            INC     A
            JR      NZ,L5B06            ; (+005H)
            POP     DE
            POP     HL
            SCF     
            RET     

L5B05:      INC     DE
L5B06:      LD      A,(DE)
            CP      020H
            JR      Z,L5B05             ; (-006H)
            LD      C,(HL)
            INC     HL
            INC     DE
            CP      02EH
            JR      Z,L5B21             ; (+00fH)
            SUB     C
L5B13:      JR      Z,L5B06             ; (-00fH)
            CP      080H
            JR      Z,L5B27             ; (+00eH)
L5B19:      DEC     HL
L5B1A:      LD      A,(HL)
            RLCA    
            INC     HL
            JR      NC,L5B1A            ; (-005H)
            JR      L5AFA               ; (-027H)

L5B21:      LD      A,B
            CP      0EEH
            JR      NC,L5B19            ; (-00dH)
            CCF     
L5B27:      POP     HL
            POP     HL
            LD      (HL),B
            RET     

L5B2B:      LD      (HL),A
            CALL    04937H
            LD      A,(DE)
            OR      A
            RET     Z
            CP      022H
            JR      NZ,L5B2B            ; (-00bH)
            LD      (HL),A
L5B37:      INC     DE
            INC     HL
            INC     C
            RET     NZ
            JP      L20F2

L5B3E:      LD      A,(DE)
            CP      020H
L5B41:      RET     NZ
L5B42:      LD      (HL),A
L5B43:      CALL    04937H
            JR      L5B3E               ; (-00aH)

            PUSH    BC
            CP      024H
            PUSH    HL
            INC     HL
            JR      NZ,L5B75            ; (+026H)
            CALL    0497AH
            JR      NZ,L5B59            ; (+005H)
L5B54:      POP     HL
            POP     BC
            LD      (HL),A
            JR      L5B37               ; (-022H)

L5B59:      PUSH    BC
            PUSH    AF
            INC     DE
            LD      A,(DE)
            DEC     DE
            CALL    L3B04
            POP     BC
            LD      A,B
            POP     BC
            JR      C,L5B54             ; (-012H)
            CALL    L3B14
            PUSH    DE
            CALL    L3D21
            POP     DE
            LD      B,011H
            LD      A,B
            LD      C,L
            LD      B,H
            JR      L5B9C               ; (+027H)

L5B75:      CALL    L3B14
            JR      L5BBB               ; (+041H)

            PUSH    DE
            PUSH    BC
            PUSH    AF
            INC     DE
            LD      A,(DE)
            CP      045H
            JR      NZ,L5B93            ; (+010H)
            INC     DE
            LD      A,(DE)
            CP      04CH
            JR      NZ,L5B93            ; (+00aH)
            INC     DE
            LD      A,(DE)
            CP      053H
            JR      NZ,L5B93            ; (+004H)
            INC     DE
            LD      A,(DE)
            CP      045H
L5B93:      POP     BC
            LD      A,B
            POP     BC
            POP     DE
            RET     

            LD      A,012H
            LD      C,L
            LD      B,H
L5B9C:      POP     HL
L5B9D:      LD      (HL),A
            LD      A,003H
            INC     HL
            LD      (HL),C
            INC     HL
            LD      (HL),B
            INC     HL
L5BA5:      POP     BC
            ADD     A,C
            JP      C,L20F2
            LD      C,A
L5BAB:      DEC     DE
            LD      A,(DE)
            CP      020H
            JR      Z,L5BAB             ; (-006H)
            INC     DE
            RET     

            PUSH    BC
            CALL    L4B38
            LD      A,00BH
            JR      L5B9D               ; (-01eH)

L5BBB:      LD      A,015H
            POP     HL
            LD      (HL),A
            INC     HL
            LD      BC,00005H
            ADD     HL,BC
            LD      A,C
            INC     A
            JR      L5BA5               ; (-023H)

            CP      03AH
            RET     Z
            OR      A
            RET     

            PUSH    HL
            PUSH    DE
            PUSH    BC
            XOR     A
            LD      (06A58H),A
            LD      C,000H
L5BD6:      LD      A,(HL)
            CP      027H
            JR      Z,L5C26             ; (+04bH)
            INC     HL
            OR      A
            JR      Z,L5C04             ; (+025H)
            LD      BC,L2AF5
            CP      020H
            JP      C,04A65H
            CP      022H
            JR      Z,L5C46             ; (+05bH)
            CP      03AH
            JR      Z,L5C58             ; (+069H)
            CP      097H
            JR      Z,L5C21             ; (+02eH)
            CP      094H
            JR      Z,L5C21             ; (+02aH)
            CP      LSE4
            JR      Z,L5C09             ; (+00eH)
            CP      080H
            JR      NC,L5C0D            ; (+00eH)
L5BFF:      CALL    L4AE3
L5C02:      JR      L5BD6               ; (-02eH)

L5C04:      LD      (DE),A
            POP     BC
L5C06:      POP     DE
            POP     HL
            RET     

L5C09:      LD      A,0FFH
            JR      L5BFF               ; (-00eH)

L5C0D:      CP      0FEH
            JR      C,L5C1C             ; (+00bH)
            INC     A
            LD      BC,L30A9
            JR      Z,L5C1A             ; (+003H)
            LD      BC,L2C54
L5C1A:      LD      A,(HL)
            INC     HL
L5C1C:      CALL    L4AC6
            JR      L5C02               ; (-01fH)

L5C21:      CALL    L4AC6
            JR      Z,L5C02             ; (-024H)
L5C26:      LD      A,(HL)
            CP      022H
            JR      Z,L5C38             ; (+00dH)
            CALL    L49C8
            JR      Z,L5BD6             ; (-05aH)
L5C30:      CALL    L4AE3
            INC     HL
            JR      NZ,L5C26            ; (-010H)
            JR      L5C04               ; (-034H)

L5C38:      CALL    L4AE3
            INC     HL
            LD      A,(HL)
            OR      A
            JR      Z,L5BD6             ; (-06aH)
            CP      022H
            JR      NZ,L5C38            ; (-00cH)
            JR      L5C30               ; (-016H)

L5C46:      LD      B,022H
            CALL    L4AE3
L5C4B:      LD      A,(HL)
            OR      A
            JR      Z,L5C04             ; (-04bH)
            INC     HL
            CP      B
            JR      Z,L5BFF             ; (-054H)
            CALL    L4AE3
            JR      L5C4B               ; (-00dH)

L5C58:      LD      (DE),A
            LD      A,(HL)
            CP      0C2H
            JP      Z,049D6H
            CALL    L4AE6
            JP      L4A02

            CP      015H
            JR      Z,L5CAD             ; (+044H)
            CP      00BH
            JR      NC,L5C72            ; (+005H)
            DEC     A
            OR      030H
            JR      L5BFF               ; (-073H)

L5C72:      PUSH    DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
L5C77:      PUSH    HL
            CP      012H
            JR      Z,L5C89             ; (+00dH)
            CP      00CH
            JR      C,L5C89             ; (+009H)
            JP      NZ,L4AF4
            EX      DE,HL
            INC     HL
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
L5C89:      EX      DE,HL
            LD      DE,06A31H
            CALL    L3D86
            XOR     A
            LD      (L6A36),A
            LD      B,004H
L5C96:      LD      A,(DE)
            CP      030H
            JR      NZ,L5C9E            ; (+003H)
            INC     DE
            DJNZ    L5C96               ; (-008H)
L5C9E:      LD      C,E
            LD      B,D
            POP     HL
            POP     DE
L5CA2:      LD      A,(BC)
            OR      A
            JP      Z,049D6H
            CALL    L4AE3
            INC     BC
            JR      L5CA2               ; (-00bH)

L5CAD:      PUSH    HL
            PUSH    DE
            CALL    L401B
            EX      DE,HL
            POP     DE
L5CB4:      LD      A,(HL)
            OR      A
            JR      Z,L5CBE             ; (+006H)
            INC     HL
            CALL    L4AE3
            JR      L5CB4               ; (-00aH)

L5CBE:      LD      BC,00005H
            POP     HL
            ADD     HL,BC
            JP      049D6H

L5CC6:      CP      080H
            JR      Z,L5CD5             ; (+00bH)
            EX      AF,AF'
            LD      A,(BC)
            RLCA    
            INC     BC
            JP      NC,L4ACB
            EX      AF,AF'
            DEC     A
            JR      L5CC6               ; (-00fH)

L5CD5:      LD      A,(BC)
            BIT     7,A
            JR      NZ,L5CE1            ; (+007H)
            CALL    L4AE3
            RET     Z
            INC     BC
            JR      L5CD5               ; (-00cH)

L5CE1:      AND     07FH
            LD      (DE),A
            OR      A
            RET     Z
            INC     DE
            LD      A,(06A58H)
            INC     A
L5CEB:      LD      (06A58H),A
            RET     NZ
            LD      (DE),A
            DEC     DE
            DEC     A
            JR      L5CEB               ; (-009H)

            LD      A,024H
            EX      AF,AF'
            EX      DE,HL
            LD      DE,L6A32
            CALL    04B13H
            LD      B,003H
L5D00:      LD      A,(DE)
            CP      030H
            JR      NZ,L5D08            ; (+003H)
            INC     DE
            DJNZ    L5D00               ; (-008H)
L5D08:      LD      C,E
            LD      B,D
            POP     HL
            POP     DE
L5D0C:      EX      AF,AF'
            CALL    L4AE3
            JP      L4AA2

            PUSH    DE
            CALL    L4B1B
            XOR     A
            LD      (DE),A
            POP     DE
            RET     

            LD      A,H
L5D1C:      CALL    L4B20
            LD      A,L
            PUSH    AF
            RRCA    
            RRCA    
            RRCA    
            RRCA    
            AND     00FH
            CALL    L4B2D
            POP     AF
            AND     00FH
            ADD     A,030H
L5D2F:      CP      03AH
            JR      C,L5D35             ; (+002H)
            ADD     A,007H
L5D35:      LD      (DE),A
            INC     DE
            RET     

            PUSH    HL
            CALL    04B4BH
            LD      C,L
            LD      B,H
            DEC     DE
            DEC     DE
            POP     HL
L5D41:      LD      A,(DE)
            CP      020H
L5D44:      JR      NZ,L5D49            ; (+003H)
            DEC     DE
            JR      L5D41               ; (-008H)

L5D49:      INC     DE
            RET     

            LD      HL,MONIT
L5D4E:      CALL    03C62H
            SUB     030H
            RET     C
            CP      00AH
            RET     NC
            CALL    04B6EH
L5D5A:      LD      C,L
            LD      B,H
            CALL    04B6EH
            CALL    04B6EH
            ADD     HL,BC
L5D63:      JR      C,L5D6B             ; (+006H)
            LD      C,A
            LD      B,000H
            ADD     HL,BC
            JR      NC,L5D4E            ; (-01dH)
L5D6B:      JP      L20F5

            ADD     HL,HL
            RET     NC
L5D70:      JR      L5D6B               ; (-007H)

            LD      D,E
            CP      L
            OR      B
            SUB     (HL)
            AND     C
            SBC     A,E
            JR      NZ,L5D0C            ; (-06eH)
L5D7A:      SBC     A,L
            SBC     A,L
L5D7C:      OR      A
            SBC     A,L
            NOP     
            LD      C,A
            XOR     E
            SUB     D
            SBC     A,L
L5D83:      JR      NZ,L5D2F            ; (-056H)
L5D85:      CP      B
            OR      A
L5D87:      AND     E
            JR      NZ,L5D1C            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      C,C
            CP      B
L5D91:      CP      B
            SUB     D
            SUB     A
            AND     C
            CP      B
            JR      NZ,05D34H            ; (-064H)
            AND     C
            SUB     (HL)
            AND     C
L5D9B:      JR      NZ,L5D2F            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
L5DA2:      ADD     A,B
            LD      D,E
            SUB     (HL)
            SBC     A,L
L5DA6:      AND     (HL)
L5DA7:      OR      B
            SUB     A
            JR      NZ,L5D63            ; (-048H)
            SUB     D
            OR      B
            SUB     A
            SUB     (HL)
L5DAF:      SBC     A,B
            JR      NZ,L5D44            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
L5DB7:      LD      C,L
            SUB     D
L5DB9:      OR      E
            OR      A
            SBC     A,L
            CP      L
            JR      NZ,05D5EH            ; (-061H)
            AND     C
            SBC     A,(HL)
            AND     C
L5DC2:      SBC     A,A
            AND     (HL)
            SUB     (HL)
            CP      L
            JR      NZ,L5D5A            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
L5DCD:      LD      B,C
            SBC     A,L
L5DCF:      SBC     A,L
            AND     C
            CP      L
            JR      NZ,L5D70            ; (-064H)
            SUB     D
            XOR     D
            JR      NZ,05D6AH            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      C,H
            AND     (HL)
            OR      B
L5DE0:      SUB     D
            JR      NZ,L5D9B            ; (-048H)
            SUB     D
            OR      B
            SUB     A
L5DE6:      SUB     (HL)
            SBC     A,B
            JR      NZ,L5D7C            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            ADD     A,B
            LD      B,A
            LD      C,A
            LD      D,E
            LD      D,L
            LD      B,D
            JR      NZ,L5DA7            ; (-050H)
L5DF7:      SUB     D
            AND     H
L5DF9:      SUB     (HL)
            AND     (HL)
            OR      B
L5DFC:      SUB     A
            JR      NZ,L5D91            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      B,(HL)
            LD      C,A
            LD      D,D
L5E07:      LD      L,02EH
            LD      L,04EH
            LD      B,L
            LD      E,B
            LD      D,H
            JR      NZ,L5DA2            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      B,H
L5E16:      LD      B,L
L5E17:      LD      B,(HL)
            JR      NZ,05E60H            ; (+046H)
            LD      C,(HL)
            JR      NZ,L5DCD            ; (-050H)
            SUB     D
            AND     H
            SUB     (HL)
            AND     (HL)
            OR      B
            SUB     A
            JR      NZ,L5DB7            ; (-06eH)
L5E25:      SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      C,(HL)
            LD      B,L
            LD      E,B
            LD      D,H
            JR      NZ,L5DC2            ; (-06eH)
L5E30:      SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      D,D
            LD      B,L
            LD      D,H
            LD      D,L
            LD      D,D
            LD      C,(HL)
            JR      NZ,L5DCF            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      D,L
L5E43:      OR      B
            JR      NZ,05DE2H            ; (-064H)
            SUB     D
            XOR     D
            LD      L,020H
L5E4A:      XOR     D
            AND     L
            OR      B
            SBC     A,A
            SUB     (HL)
            AND     (HL)
L5E50:      OR      A
            OR      B
            JR      NZ,L5DE6            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      D,L
            OR      B
            JR      NZ,L5DF9            ; (-064H)
L5E5D:      SUB     D
            XOR     D
            LD      L,020H
            CP      B
            AND     (HL)
            OR      B
            SUB     D
            JR      NZ,L5E17            ; (-050H)
            AND     L
            OR      E
            LD      L,092H
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
L5E70:      LD      B,E
            AND     C
            OR      B
            DAA     
            SUB     (HL)
            JR      NZ,L5E16            ; (-061H)
            OR      A
            OR      B
            SUB     (HL)
            AND     (HL)
            OR      B
            AND     L
            SUB     D
            NOP     
            LD      C,L
            SUB     D
            OR      E
            OR      A
            SBC     A,L
            CP      L
            JR      NZ,L5E25            ; (-062H)
            SBC     A,L
            OR      A
            SUB     (HL)
            SUB     D
            SBC     A,A
            SUB     (HL)
            AND     (HL)
            OR      A
            OR      B
L5E90:      NOP     
            LD      C,C
            OR      B
            AND     H
            SUB     (HL)
L5E95:      SBC     A,L
            AND     L
            SBC     A,A
            SUB     (HL)
            AND     (HL)
            OR      A
            OR      B
L5E9C:      JR      NZ,L5E30            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      B,E
            AND     C
            OR      B
            DAA     
            SUB     (HL)
L5EA8:      JR      NZ,L5EFC            ; (+052H)
            LD      B,L
            LD      D,E
            LD      D,L
            LD      C,L
            LD      B,L
            JR      NZ,L5E43            ; (-06eH)
            SBC     A,L
L5EB2:      SBC     A,L
            OR      A
            SBC     A,L
            NOP     
L5EB6:      LD      D,D
            LD      B,L
L5EB8:      LD      D,E
            LD      D,L
            LD      C,L
            LD      B,L
            JR      NZ,L5E50            ; (-06eH)
            SBC     A,L
            SBC     A,L
L5EC0:      OR      A
            SBC     A,L
            NOP     
            ADD     A,B
            ADD     A,B
L5EC5:      LD      D,D
            LD      B,L
            LD      B,C
L5EC8:      LD      B,H
            JR      NZ,L5E5D            ; (-06eH)
            SBC     A,L
L5ECC:      SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            LD      B,C
            CP      B
            SBC     A,L
            SUB     D
            AND     C
            SBC     A,H
            CP      L
            JR      NZ,L5E90            ; (-049H)
            SBC     A,(HL)
            SUB     D
L5EDB:      OR      B
            JR      NZ,L5E70            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
L5EE8:      ADD     A,B
            ADD     A,B
            ADD     A,B
L5EEB:      ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            ADD     A,B
            LD      C,A
            AND     L
            SUB     (HL)
            JR      NZ,L5EB2            ; (-049H)
            XOR     D
L5EFC:      JR      NZ,L5EA8            ; (-056H)
            AND     (HL)
            CP      B
            SUB     D
            JR      NZ,L5E95            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            ADD     A,B
            LD      D,B
            SBC     A,L
L5F0B:      AND     (HL)
            OR      B
            SUB     (HL)
            SUB     D
            SBC     A,L
            JR      NZ,L5EB8            ; (-05aH)
            AND     H
            JR      NZ,L5EC5            ; (-050H)
            OR      A
            SUB     (HL)
            JR      NZ,L5EB6            ; (-063H)
            SUB     D
            AND     C
            SBC     A,H
            CP      L
            NOP     
            ADD     A,B
            LD      C,A
            AND     L
            SUB     (HL)
            JR      NZ,L5EDB            ; (-049H)
            XOR     D
            JR      NZ,L5EC5            ; (-062H)
            AND     C
            SBC     A,(HL)
            SUB     D
            SBC     A,L
            NOP     
            LD      D,B
            SBC     A,L
            AND     (HL)
            OR      B
            SUB     (HL)
            SUB     D
            SBC     A,L
            JR      NZ,L5EE8            ; (-04dH)
            OR      A
            SBC     A,H
            SUB     D
            JR      NZ,L5ECC            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
L5F3F:      ADD     A,B
            LD      B,E
            SBC     A,B
            SUB     D
            SBC     A,A
            XOR     C
            JR      NZ,L5EEB            ; (-05cH)
            AND     L
            OR      E
            JR      NZ,05EDDH            ; (-06eH)
            SBC     A,L
            SBC     A,L
            OR      A
            SBC     A,L
            NOP     
            CALL    L4D65
            LD      A,D
            OR      A
            JP      NZ,L2101
            LD      A,E
            RET     

            CALL    0529DH
            EX      DE,HL
            LD      BC,0FFFBH
            ADD     HL,BC
            EX      DE,HL
            JR      L5F68               ; (+003H)

            CALL    0528BH
L5F68:      PUSH    AF
            PUSH    HL
            EX      DE,HL
            CALL    L5D9B
            CALL    L3D21
            EX      DE,HL
            POP     HL
            POP     AF
            RET     

            CALL    L4D65
            PUSH    AF
            PUSH    HL
            LD      HL,(06AB9H)
            CALL    03A82H
            CALL    L3C69
L5F83:      LD      A,(DE)
            CP      000H
            JR      Z,L5F8E             ; (+006H)
            CALL    L167E
            INC     DE
            JR      L5F83               ; (-00bH)

L5F8E:      POP     HL
            POP     AF
            RET     

            PUSH    HL
L5F92:      LD      HL,00010H
            BIT     7,D
            JR      NZ,L5F9F            ; (+006H)
            OR      A
            SBC     HL,DE
            JP      C,L2101
L5F9F:      PUSH    DE
            LD      HL,00001H
            BIT     7,H
            JR      NZ,L5FB6            ; (+00fH)
            BIT     7,D
            JP      NZ,L2101
L5FAC:      OR      A
            EX      DE,HL
            SBC     HL,DE
L5FB0:      JP      C,L2101
L5FB3:      POP     DE
            POP     HL
            RET     

L5FB6:      BIT     7,D
            JR      Z,L5FB3             ; (-007H)
            JR      L5FAC               ; (-010H)

            CALL    0528BH
            PUSH    AF
            CALL    L5D7A
            PUSH    HL
            EX      DE,HL
            CALL    0527FH
            POP     HL
            POP     AF
            RET     

            LD      BC,L4E01
            NOP     
            NOP     
            LD      A,(0004DH)
            OR      A
            JP      NZ,L4FF7
            CALL    L5414
            INC     HL
            CP      047H
            JP      Z,L4E5F
            CP      054H
            JP      NZ,L20FE
            LD      A,001H
            LD      (04DCBH),A
            CALL    L5414
            INC     HL
            CP      04EH
            JR      Z,L5FFB             ; (+009H)
            CP      04CH
            JR      Z,L5FFB             ; (+005H)
            CP      053H
            JP      NZ,L20FE
L5FFB:      LD      (04DCDH),A
            CALL    L1C66
            JP      NZ,L20FE
            LD      A,001H
            CALL    L167E
            LD      A,(04DCDH)
            CP      04EH
            JR      Z,L6021             ; (+011H)
            CP      04CH
            LD      A,00BH
            JR      Z,L601E             ; (+008H)
            LD      A,009H
            CALL    L167E
            CALL    L167E
L601E:      CALL    L167E
L6021:      LD      A,00AH
            CALL    L167E
            LD      A,003H
            CALL    L167E
            RET     

            LD      A,(04DCBH)
            CP      001H
            JP      NZ,L4FF7
            CALL    L4D65
            LD      A,E
            OR      A
            RET     Z
            CP      0ECH
            JR      NC,L6043            ; (+005H)
            CP      015H
            JP      NC,L2101
L6043:      CALL    L1C66
            JP      NZ,L20FE
            BIT     7,E
            JR      NZ,L6056            ; (+009H)
L604D:      LD      A,00AH
            CALL    L167E
            DEC     E
            JR      NZ,L604D            ; (-008H)
            RET     

L6056:      LD      A,003H
            CALL    L167E
            INC     E
            JR      NZ,L6056            ; (-008H)
            RET     

            INC     HL
            CALL    L1C66
            JP      NZ,L20FE
            LD      A,002H
            LD      (04DCBH),A
            CALL    L167E
            RET     

            PUSH    HL
            LD      HL,003E7H
            LD      (L4D93),HL
            LD      HL,0FC19H
L6079:      LD      (L4DA1),HL
            POP     HL
            JP      04D91H

            PUSH    HL
            LD      HL,001E0H
            LD      (L4D93),HL
            LD      HL,0FE20H
            JR      L6079               ; (-013H)

            LD      A,044H
            LD      (04EE0H),A
L6091:      LD      A,(04DCBH)
            CP      002H
            JP      NZ,L4FF7
            CALL    L5414
            CP      025H
            JR      NZ,L60C3            ; (+023H)
            INC     HL
            CALL    L4D50
            LD      A,E
            DEC     A
            CP      010H
            JP      NC,L2101
            DEC     DE
            LD      A,04CH
            CALL    L167E
            CALL    L4D78
            LD      A,00DH
            CALL    L167E
L60B9:      CALL    L1C66
            RET     Z
            CP      02CH
            JP      NZ,L20FE
            INC     HL
L60C3:      CALL    L4D65
            CALL    03332H
            CALL    L4E80
L60CC:      PUSH    DE
            CALL    L4D65
            CP      02CH
            JR      Z,L60DA             ; (+006H)
            CALL    L1C66
            JP      NZ,L20FE
L60DA:      CALL    L4E6F
            POP     BC
            PUSH    DE
            LD      A,044H
            CALL    L167E
            LD      E,C
            LD      D,B
            CALL    L4D78
            LD      A,02CH
            CALL    L167E
            POP     DE
            CALL    L4D78
            LD      A,00DH
            CALL    L167E
            CALL    L1C66
            RET     Z
            INC     HL
            JR      L60C3               ; (-03bH)

            LD      A,04AH
            LD      (04EE0H),A
            JR      L6091               ; (-074H)

            LD      A,04DH
            LD      (04EE0H),A
L610A:      LD      A,(04DCBH)
            CP      002H
            JP      NZ,L4FF7
            JR      L60C3               ; (-051H)

            LD      A,052H
            LD      (04EE0H),A
            JR      L610A               ; (-011H)

            CALL    L4D50
            LD      A,E
            CP      004H
L6121:      JP      NC,L2101
            CALL    L1C66
            JP      NZ,L20FE
            LD      A,(04DCBH)
            CP      002H
            JR      Z,L613F             ; (+00eH)
            CALL    L4E21
            LD      A,002H
            CALL    L167E
            CALL    L4F3F
            JP      04E04H

L613F:      LD      A,043H
            CALL    L167E
            LD      A,E
            OR      030H
            CALL    L167E
            LD      A,00DH
            CALL    L167E
            RET     

            LD      A,(04DCBH)
            CP      002H
            JP      NZ,L4FF7
            CALL    L1C66
            JP      NZ,L20FE
            LD      A,048H
L6160:      CALL    L167E
            RET     

            LD      A,(04DCBH)
            CP      002H
            JP      NZ,L4FF7
            CALL    L1C66
L616F:      JP      NZ,L20FE
            LD      A,049H
            JR      L6160               ; (-016H)

            LD      A,(04DCBH)
            CP      002H
L617B:      JR      NZ,L61F7            ; (+07aH)
            CALL    L5414
            CP      05BH
            JR      NZ,L61CE            ; (+04aH)
            INC     HL
            CALL    L4D50
            CP      040H
            JP      NC,L2101
            PUSH    DE
            CALL    L5414
            CALL    03332H
            CALL    L4D50
            CP      004H
            JP      NC,L2101
            PUSH    DE
            CALL    L5414
            CP      05DH
            JP      NZ,L20FE
            INC     HL
            POP     BC
            POP     DE
            PUSH    BC
            LD      A,053H
            CALL    L167E
            CALL    L4D78
            LD      A,02CH
            CALL    L167E
            POP     DE
L61B7:      LD      A,051H
            CALL    L167E
L61BC:      CALL    L4D78
            LD      A,00DH
L61C1:      CALL    L167E
            CALL    L1C66
            RET     Z
            CP      02CH
            JP      NZ,L20FE
            INC     HL
L61CE:      CALL    04DBCH
            CALL    L1C66
            JR      Z,L61DB             ; (+005H)
            CP      02CH
            JP      NZ,L20FE
L61DB:      LD      A,B
            OR      A
            JR      Z,L61F0             ; (+011H)
            LD      A,050H
            CALL    L167E
L61E4:      LD      A,(DE)
            CALL    L167E
            INC     DE
            DJNZ    L61E4               ; (-007H)
            LD      A,00DH
            CALL    L167E
L61F0:      CALL    L1C66
            RET     Z
            INC     HL
L61F5:      JR      L61CE               ; (-029H)

L61F7:      LD      A,044H
            JP      L2108

            LD      A,(04DCBH)
            CP      002H
            JP      NZ,L4FF7
            CALL    L4D50
            CP      002H
            JP      NC,L2101
            PUSH    AF
            CALL    L5414
            CALL    03332H
            CALL    L4D65
            PUSH    DE
            CALL    03332H
            CALL    L4D50
            OR      A
            JP      Z,L2101
            CALL    L1C66
            JP      NZ,L20FE
            LD      A,058H
            CALL    L167E
            POP     BC
            POP     AF
            PUSH    DE
            PUSH    BC
            OR      030H
L6232:      CALL    L167E
            LD      A,02CH
            CALL    L167E
            POP     DE
            CALL    L4E6F
            CALL    L4D78
            LD      A,02CH
            CALL    L167E
            POP     DE
            CALL    L4D78
            LD      A,00DH
            CALL    L167E
            RET     

            LD      A,(04DCBH)
            CP      002H
            JR      NZ,L61F7            ; (-060H)
            PUSH    HL
L6258:      LD      DE,MONIT
            LD      HL,05204H
L625E:      CALL    03A82H
            LD      DE,00168H
            LD      HL,L5209
            CALL    03A82H
            LD      HL,L3D72
            LD      DE,L520E
            CALL    03AB8H
            POP     HL
            CALL    0528BH
            CALL    03332H
            PUSH    HL
            LD      HL,L51F5
            EX      DE,HL
            CALL    03AB8H
            POP     HL
            CALL    0528BH
            CALL    03332H
            PUSH    HL
            LD      HL,051FAH
            EX      DE,HL
            CALL    03AB8H
            POP     HL
            CALL    0528BH
L6295:      PUSH    HL
            PUSH    AF
            LD      HL,L51FF
            EX      DE,HL
L629B:      CALL    03AB8H
            LD      A,(05200H)
L62A1:      RLCA    
            JP      C,L2101
            POP     AF
            CP      02CH
            JR      NZ,L62E4            ; (+03aH)
            POP     HL
            INC     HL
            CALL    0528BH
            PUSH    HL
L62B0:      PUSH    AF
            LD      HL,05204H
            EX      DE,HL
            CALL    03AB8H
            POP     AF
            CP      02CH
            JR      NZ,L62E4            ; (+027H)
            POP     HL
            INC     HL
            CALL    0528BH
            PUSH    HL
            PUSH    AF
            LD      HL,L5209
            EX      DE,HL
            CALL    03AB8H
            POP     AF
            CP      02CH
            JR      NZ,L62E4            ; (+014H)
            POP     HL
            INC     HL
            CALL    0528BH
            PUSH    HL
            LD      HL,L520E
            EX      DE,HL
            CALL    03AB8H
            LD      A,(0520FH)
            RLCA    
            JP      C,L2101
L62E4:      POP     HL
            CALL    L1C66
            JP      NZ,L20FE
            PUSH    HL
L62EC:      LD      HL,L5209
            LD      DE,05204H
            LD      A,(L520E)
            OR      A
            CALL    NZ,L5E4A
            JP      C,L2101
            CALL    L51AB
L62FF:      LD      HL,05213H
            LD      (05172H),HL
            LD      HL,L5218
            LD      (L517C),HL
            CALL    0516EH
            LD      A,(L520E)
            OR      A
            JR      Z,L6348             ; (+034H)
L6314:      LD      HL,05204H
            LD      DE,L520E
            CALL    L5DAF
            LD      DE,L5209
            CALL    L5E4A
            JR      NC,L6332            ; (+00dH)
            CALL    L51AB
L6328:      CALL    0516BH
            CALL    BRKEY
            JR      NZ,L6314            ; (-01cH)
            POP     HL
            RET     

L6332:      CALL    0513AH
            CALL    0516BH
            POP     HL
            RET     

            LD      HL,L5209
            LD      DE,05204H
            LD      BC,00005H
            LDIR    
            JP      L51AB

L6348:      LD      HL,L51F5
            LD      (05172H),HL
            LD      HL,051FAH
            LD      (L517C),HL
            CALL    0516BH
            CALL    0513AH
            LD      HL,05213H
            LD      (05172H),HL
            LD      HL,L5218
            LD      (L517C),HL
            CALL    0516BH
            POP     HL
            RET     

            LD      A,044H
            LD      HL,L4D3E
            PUSH    AF
            LD      HL,L51F5
            CALL    L3D21
            PUSH    HL
            CALL    0519DH
            LD      HL,051FAH
            CALL    L3D21
            PUSH    HL
            CALL    0519DH
            POP     HL
            POP     DE
            POP     AF
            CALL    L167E
            PUSH    HL
            CALL    L4D78
            LD      A,02CH
            CALL    L167E
            POP     DE
            CALL    L4D78
            LD      A,00DH
            JP      L167E

            EX      DE,HL
            LD      HL,003E7H
            PUSH    HL
            ADD     HL,DE
            POP     HL
            RET     C
            SBC     HL,DE
            RET     NC
            JP      L2101

            LD      DE,(06AB9H)
            LD      HL,05204H
            CALL    03AB8H
            LD      HL,(06AB9H)
            CALL    0659DH
            CALL    063B0H
            LD      DE,L51FF
            CALL    05FE1H
            LD      DE,L51F5
            CALL    L5DAF
            LD      DE,05213H
            CALL    03AB8H
            LD      DE,(06AB9H)
            LD      HL,05204H
            CALL    03AB8H
            LD      HL,(06AB9H)
            CALL    0659DH
            CALL    063C6H
            LD      DE,L51FF
            CALL    05FE1H
            LD      DE,051FAH
            CALL    L5DAF
            LD      DE,L5218
            JP      03AB8H

            DS      15, 000H ; Work area (45 bytes)
L6404:      DS      30, 000H
            LD      B,H
            JR      NC,06451H            ; (+02cH)
            JR      NC,06434H            ; (+00dH)
            LD      A,(04DCBH)
            CP      001H
            JP      NZ,L4FF7
            CALL    L1C66
            JP      NZ,L20FE
            LD      A,004H
            CALL    L167E
            RET     

            LD      A,(04DCBH)
            CP      001H
            JP      NZ,L4FF7
            CALL    L4D65
            LD      A,E
            OR      A
            JP      Z,L2101
            CP      049H
            JP      NC,L2101
            CALL    L1C66
            JP      NZ,L20FE
            LD      A,009H
            CALL    L167E
            CALL    L167E
            CALL    L4D78
            LD      A,00DH
            CALL    L167E
            DB      0C9H,"PRINTER MODE E" ; PRINTER MODE ERROR!! string
            DS      2, 052H
            DB      04FH
            DB      052H
            DS      2, 021H
            NOP     
            LD      D,H
            LD      L,04DH
            LD      B,(HL)
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      HL,(L6AB5)
            ADD     HL,DE
            EX      DE,HL
            LD      A,B
            RET     

            LD      DE,(06AB7H)
            LD      (038D3H),DE
            LD      DE,(06AB9H)
            PUSH    DE
            CALL    0529DH
            POP     DE
            RET     

            PUSH    DE
            LD      DE,(038D3H)
            CALL    L58DF
            POP     DE
            CALL    05310H
L64A9:      CP      0EEH
            RET     C
            PUSH    AF
            LD      A,(06A65H)
            PUSH    AF
            INC     HL
            CALL    05310H
            POP     BC
            EX      (SP),HL
            PUSH    AF
            PUSH    HL
            CALL    L58B1
            CALL    L5E4A
            EX      AF,AF'
            POP     AF
            CP      0F6H
            JR      NZ,L64E3            ; (+01eH)
            EX      AF,AF'
            JR      C,L64DE             ; (+016H)
L64C8:      LD      BC,MONIT
L64CB:      LD      (HL),C
            INC     HL
            LD      (HL),B
            INC     HL
            XOR     A
            LD      (HL),A
            INC     HL
            LD      (HL),A
            INC     HL
            LD      (HL),A
            LD      A,005H
            LD      (06A65H),A
            POP     AF
            POP     HL
            JR      L64A9               ; (-035H)

L64DE:      LD      BC,08081H
            JR      L64CB               ; (-018H)

L64E3:      CP      0F5H
            JR      NZ,L64EE            ; (+007H)
            EX      AF,AF'
            JR      Z,L64C8             ; (-022H)
            JR      C,L64C8             ; (-024H)
            JR      L64DE               ; (-010H)

L64EE:      CP      0F4H
            JR      NZ,L64F7            ; (+005H)
            EX      AF,AF'
L64F3:      JR      Z,L64DE             ; (-017H)
            JR      L64C8               ; (-02fH)

L64F7:      CP      0F2H
            JR      C,L6500             ; (+005H)
            EX      AF,AF'
            JR      NC,L64DE            ; (-020H)
            JR      L64C8               ; (-038H)

L6500:      CP      0F0H
            JR      C,L650B             ; (+007H)
            EX      AF,AF'
            JR      Z,L64DE             ; (-029H)
            JR      C,L64DE             ; (-02bH)
            JR      L64C8               ; (-043H)

L650B:      EX      AF,AF'
            JR      Z,L64C8             ; (-046H)
            JR      L64DE               ; (-032H)

            CALL    L533B
L6513:      CP      0F7H
            RET     C
            LD      A,(06A65H)
            PUSH    AF
            INC     HL
L651B:      JR      Z,L652D             ; (+010H)
            CALL    L533B
            POP     BC
            PUSH    AF
            PUSH    HL
            CALL    L58B1
            CALL    L5DA6
L6529:      POP     HL
            POP     AF
            JR      L6513               ; (-01aH)

L652D:      CALL    L533B
            POP     BC
            PUSH    AF
            PUSH    HL
            CALL    L58B1
            CALL    L5DAF
            JR      L6529               ; (-012H)

            CALL    05367H
L653E:      CP      0FBH
            RET     C
            LD      A,(06A65H)
            PUSH    AF
            INC     HL
            JR      Z,L6558             ; (+010H)
            CALL    05367H
            POP     BC
            PUSH    AF
            PUSH    HL
            CALL    L58B1
            CALL    05FE1H
L6554:      POP     HL
            POP     AF
            JR      L653E               ; (-01aH)

L6558:      CALL    05367H
            POP     BC
            PUSH    AF
            PUSH    HL
            CALL    L58B1
            CALL    L60CC
            JR      L6554               ; (-012H)

L6566:      INC     HL
            CALL    L5414
            CP      0F7H
            JR      Z,L6566             ; (-008H)
            CP      0F8H
            JR      NZ,L6599            ; (+027H)
            INC     HL
            CALL    05367H
L6576:      PUSH    AF
            PUSH    HL
            LD      HL,0FFFBH
            ADD     HL,DE
            CALL    L5D91
            LD      DE,00005H
            ADD     HL,DE
            EX      DE,HL
            POP     HL
            POP     AF
            RET     

L6587:      INC     HL
            CALL    L5414
            CP      0F7H
            JR      Z,L6587             ; (-008H)
            CP      0F8H
            JR      NZ,L65B9            ; (+026H)
            INC     HL
            CALL    05388H
            JR      L6576               ; (-023H)

L6599:      CALL    L53B9
L659C:      CP      0FDH
            RET     NZ
            INC     HL
            LD      A,(06A65H)
            CP      003H
            JP      Z,L20FB
            PUSH    AF
            CALL    05388H
            POP     BC
            PUSH    AF
            PUSH    HL
            CALL    L58B1
            CALL    L61F5
            POP     HL
            POP     AF
            JR      L659C               ; (-01dH)

L65B9:      CALL    L1C66
            JP      Z,L20FE
            CALL    L53CC
            EX      AF,AF'
            LD      A,(06A65H)
            OR      A
            JP      Z,L20FE
            EX      AF,AF'
            RET     

            XOR     A
            LD      (06A65H),A
            PUSH    HL
            LD      HL,(L6ABB)
            SCF     
            SBC     HL,DE
            JP      C,L20F8
            POP     HL
            PUSH    DE
            LD      B,005H
L65DE:      LD      (DE),A
            INC     DE
            DJNZ    L65DE               ; (-004H)
            POP     DE
L65E3:      CALL    L5414
            CP      0F7H
            INC     HL
            JR      Z,L65E3             ; (-008H)
            DEC     HL
            CP      LSE4
            JP      Z,0541AH
            CP      00BH
            JR      NC,L662E            ; (+039H)
            OR      A
            RET     Z
            INC     HL
            DEC     A
            LD      B,000H
            LD      C,A
L65FC:      PUSH    HL
            PUSH    DE
            EX      DE,HL
            LD      E,C
            LD      D,B
            CALL    03A82H
            POP     DE
            POP     HL
            LD      A,005H
            LD      (06A65H),A
            EX      DE,HL
            LD      BC,00005H
            ADD     HL,BC
            EX      DE,HL
            JR      L6614               ; (+001H)

L6613:      INC     HL
L6614:      LD      A,(HL)
L6615:      CP      020H
            JR      Z,L6613             ; (-006H)
            RET     

            EX      DE,HL
            LD      (HL),081H
            LD      A,005H
            LD      (06A65H),A
            PUSH    DE
            CALL    065A2H
            LD      DE,00005H
            ADD     HL,DE
            EX      DE,HL
            POP     HL
            JR      L6613               ; (-01bH)

L662E:      CP      015H
            JR      NC,L6646            ; (+014H)
            INC     HL
            LD      C,(HL)
            INC     HL
            LD      B,(HL)
            INC     HL
            CP      00CH
            JR      NZ,L65FC            ; (-03fH)
            INC     BC
            INC     BC
            LD      A,(BC)
            INC     BC
            EX      AF,AF'
            LD      A,(BC)
            LD      B,A
            EX      AF,AF'
            LD      C,A
            JR      L65FC               ; (-04aH)

L6646:      JP      NZ,05459H
            INC     HL
            PUSH    DE
            LD      BC,00505H
L664E:      LD      A,(HL)
            LD      (DE),A
            INC     HL
            INC     DE
            DJNZ    L664E               ; (-006H)
            LD      A,C
L6655:      POP     DE
            JP      05408H

            CP      022H
            JR      NZ,L6686            ; (+029H)
            INC     HL
            PUSH    DE
            PUSH    HL
            CALL    L58C4
            EX      (SP),HL
            PUSH    HL
            LD      HL,(038D3H)
            PUSH    BC
            LD      BC,(06AB5H)
            OR      A
            SBC     HL,BC
            POP     BC
            EX      DE,HL
            LD      (HL),B
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
            LD      HL,(038D3H)
            POP     DE
            CALL    058D0H
            LD      (038D3H),HL
            POP     HL
            LD      A,003H
            JR      L6655               ; (-031H)

L6686:      CP      028H
            JP      NZ,L5B43
            INC     HL
            CALL    0529DH
            CP      029H
            JP      NZ,L20FE
            JP      05413H

            CP      0E7H
            JP      Z,0563AH
            CP      0FFH
            RET     NZ
            INC     HL
            LD      A,(HL)
            CP      0ABH
            JR      NC,L6711            ; (+06cH)
            CP      088H
            JR      Z,L66F8             ; (+04fH)
            CP      0A0H
            JP      Z,L5588
            CP      089H
            PUSH    AF
            JR      NZ,L66BA            ; (+007H)
            INC     HL
            LD      A,(HL)
            CP      040H
            JR      Z,L66D5             ; (+01cH)
            DEC     HL
L66BA:      CALL    L57F9
L66BD:      CALL    0529DH
            CALL    05804H
            CALL    L5D9B
L66C6:      POP     AF
            PUSH    DE
            PUSH    HL
            LD      HL,0FFFBH
            ADD     HL,DE
            CALL    05537H
L66D0:      POP     HL
L66D1:      POP     DE
            JP      L5414

L66D5:      POP     AF
            PUSH    DE
            CALL    L57F9
            CALL    0529DH
            CALL    05804H
            CALL    L5D9B
            EX      DE,HL
            EX      (SP),HL
            PUSH    DE
            PUSH    HL
            CALL    L3D21
            LD      C,L
            LD      B,H
            POP     HL
            LD      A,(BC)
            LD      E,A
            LD      D,000H
            CALL    03A82H
            LD      A,005H
            JR      L66D0               ; (-028H)

L66F8:      PUSH    AF
            INC     HL
            CALL    L5414
            CP      028H
            JR      NZ,L6704            ; (+003H)
            INC     HL
            JR      L66BD               ; (-047H)

L6704:      LD      A,005H
L6706:      LD      (06A65H),A
            EX      DE,HL
            LD      BC,00005H
            ADD     HL,BC
            EX      DE,HL
            JR      L66C6               ; (-04bH)

L6711:      CP      0B3H
            JR      NC,L6729            ; (+014H)
            PUSH    AF
            CALL    L57F9
            CALL    0529DH
            CALL    05804H
            LD      A,(06A65H)
            CP      003H
            JP      NZ,L20FB
            JR      L66C6               ; (-063H)

L6729:      CP      0BAH
            JR      NC,L6733            ; (+006H)
            PUSH    AF
            LD      A,002H
            INC     HL
            JR      L6706               ; (-02dH)

L6733:      CP      LSD0
            RET     NC
L6736:      INC     HL
            PUSH    HL
            SUB     080H
            LD      L,A
            LD      H,000H
            LD      BC,L3265
            ADD     HL,HL
            ADD     HL,BC
            LD      A,(HL)
            INC     HL
            LD      H,(HL)
            LD      L,A
            EX      (SP),HL
            RET     

            EX      DE,HL
            LD      HL,MONIT
            ADD     HL,SP
            LD      BC,(038D3H)
            OR      A
            SBC     HL,BC
            OR      A
            LD      BC,00100H
            SBC     HL,BC
            EX      DE,HL
            JR      L676E               ; (+011H)

            LD      A,(00055H)
            JR      L6765               ; (+003H)

            LD      A,(L38F2)
L6765:      LD      E,A
            LD      D,000H
            JR      L676E               ; (+004H)

            LD      DE,(038EAH)
L676E:      CALL    03A82H
            LD      A,005H
            LD      (06A65H),A
            INC     HL
            BIT     7,(HL)
            DEC     HL
            RET     Z
            LD      DE,L6A6E
            EX      DE,HL
            CALL    L5D87
            LD      (HL),091H
            EX      DE,HL
            JP      L5DAF

            CALL    L57F9
            SCF     
L678C:      PUSH    AF
            PUSH    DE
            CALL    04D5AH
            CP      029H
            JR      Z,L67A1             ; (+00cH)
            CP      02CH
            JP      NZ,L20FE
            INC     HL
            CALL    04D53H
            POP     DE
            JR      L678C               ; (-015H)

L67A1:      INC     HL
            CALL    04D53H
            POP     DE
            PUSH    AF
            EXX     
            LD      DE,0110FH
            LD      B,000H
L67AD:      POP     AF
            JR      C,L67B5             ; (+005H)
            LD      (DE),A
            INC     DE
            INC     B
            JR      L67AD               ; (-008H)

L67B5:      LD      C,B
            LD      HL,(038D3H)
            PUSH    HL
L67BA:      DEC     DE
            LD      A,(DE)
            LD      (HL),A
            INC     HL
            DJNZ    L67BA               ; (-006H)
            POP     DE
            CALL    055C7H
            JP      L5414

            EX      DE,HL
            CALL    L58DF
            LD      (038D3H),DE
            LD      DE,(06AB5H)
            OR      A
            SBC     HL,DE
            PUSH    HL
            PUSH    BC
            EXX     
            POP     BC
            EX      DE,HL
            LD      (HL),C
            INC     HL
            POP     BC
            LD      (HL),C
            INC     HL
            LD      (HL),B
            LD      BC,GETL
            ADD     HL,BC
            EX      DE,HL
            LD      A,003H
            LD      (06A65H),A
            RET     

            PUSH    HL
            CALL    L560F
            CALL    L5616
            LD      B,004H
L67F5:      LD      A,(DE)
            CP      030H
            JR      NZ,L67FF            ; (+005H)
            INC     DE
            DJNZ    L67F5               ; (-008H)
            DEC     DE
            INC     B
L67FF:      LD      C,B
            LD      HL,(038D3H)
            PUSH    HL
            CALL    058D0H
            EX      DE,HL
            POP     HL
            EXX     
            POP     DE
            EXX     
            JP      L55CB

            CALL    L3D21
            LD      DE,0110FH
            RET     

            PUSH    DE
            LD      A,H
            CALL    05629H
            LD      A,H
            CALL    L562D
            LD      A,L
            CALL    05629H
L6823:      LD      A,L
            CALL    L562D
            POP     DE
L6828:      RET     

            RLCA    
            RLCA    
            RLCA    
            RLCA    
            AND     00FH
            ADD     A,030H
            CP      03AH
            JR      C,L6837             ; (+002H)
            ADD     A,007H
L6837:      LD      (DE),A
            INC     DE
            RET     

            CALL    L57F9
            CALL    0529DH
            CALL    05804H
            PUSH    HL
            LD      HL,0FFFBH
            ADD     HL,DE
            PUSH    DE
            CALL    05651H
            POP     DE
            POP     HL
            JP      L5414

            PUSH    HL
            CALL    0566DH
            LD      B,A
            LD      C,A
            OR      A
            JR      Z,L6866             ; (+00cH)
            LD      A,020H
            PUSH    DE
L685D:      LD      (DE),A
            INC     DE
            DJNZ    L685D               ; (-004H)
            POP     DE
            LD      B,C
            JP      L55FF

L6866:      POP     HL
            CALL    L5D87
            JP      L55E5

            CALL    L560F
            LD      A,H
            OR      A
            JP      NZ,L2101
            LD      A,L
            RET     

            PUSH    HL
L6878:      CALL    L3C69
            LD      A,(DE)
            CP      020H
            JR      NZ,L6881            ; (+001H)
            INC     DE
L6881:      LD      HL,(038D3H)
            LD      B,000H
L6886:      LD      A,(DE)
L6887:      OR      A
            JR      Z,L6890             ; (+006H)
            LD      (HL),A
            INC     DE
L688C:      INC     HL
            INC     B
            JR      L6886               ; (-00aH)

L6890:      LD      A,B
L6891:      OR      A
            JP      Z,L5666
            LD      DE,(038D3H)
            EXX     
            POP     DE
            EXX     
            LD      C,B
            JP      055C7H

            PUSH    HL
            CALL    0527FH
            OR      A
            JR      Z,L68A8             ; (+001H)
            LD      A,(DE)
L68A8:      POP     HL
            JP      L5565

            PUSH    HL
            CALL    0527FH
            POP     HL
            JP      L5565

            PUSH    HL
            CALL    0527FH
            LD      HL,(038D3H)
            PUSH    HL
            LD      B,A
            CALL    058D0H
            LD      (HL),000H
            POP     DE
            POP     HL
            JP      L3B14

            CALL    057E5H
            CALL    05804H
            CALL    L57DE
            EX      DE,HL
            LD      A,(HL)
            CP      C
            JR      NC,L68D6            ; (+001H)
            LD      C,A
L68D6:      LD      (HL),C
            LD      BC,00005H
L68DA:      LD      A,003H
            ADD     HL,BC
            EX      DE,HL
            LD      (06A65H),A
            JP      L5414

            CALL    057E5H
            CALL    05804H
            CALL    L57DE
            EX      DE,HL
            LD      A,(HL)
            SUB     C
            JR      NC,L68F4            ; (+002H)
            XOR     A
            LD      C,(HL)
L68F4:      LD      (HL),C
            INC     HL
            ADD     A,(HL)
            LD      (HL),A
            INC     HL
            LD      A,000H
L68FB:      ADC     A,(HL)
            LD      (HL),A
            LD      BC,GETL
            JR      L68DA               ; (-028H)

            CALL    057E5H
            CALL    L57DE
            OR      A
            JP      Z,L2101
            PUSH    AF
            LD      A,(HL)
            CP      029H
            JR      Z,L6936             ; (+024H)
            CALL    03332H
            PUSH    DE
            EX      DE,HL
            LD      BC,00005H
            ADD     HL,BC
            EX      DE,HL
            CALL    04D5AH
            CALL    05804H
            CALL    04D53H
            POP     DE
L6926:      POP     BC
            LD      C,A
            EX      DE,HL
            LD      A,(HL)
            SUB     B
            JR      C,L693B             ; (+00eH)
            INC     A
            CP      C
            JR      NC,L6932            ; (+001H)
            LD      C,A
L6932:      LD      A,B
            DEC     A
            JR      L68F4               ; (-042H)

L6936:      INC     HL
            LD      A,0FFH
            JR      L6926               ; (-015H)

L693B:      XOR     A
            LD      C,A
            JR      L68F4               ; (-04bH)

            PUSH    HL
            PUSH    DE
            LD      HL,(038D3H)
            PUSH    HL
            LD      A,030H
            LD      B,006H
L6949:      LD      (HL),A
            INC     HL
            DJNZ    L6949               ; (-004H)
            CALL    0003BH
            POP     HL
            OR      A
            JR      Z,L6959             ; (+005H)
            INC     (HL)
            INC     HL
            INC     (HL)
            INC     (HL)
            DEC     HL
L6959:      EX      DE,HL
            LD      BC,08CA0H
            CALL    057D1H
            LD      BC,00E10H
            CALL    057D1H
            CP      03AH
            JR      C,L6974             ; (+00aH)
            SUB     00AH
            DEC     DE
            LD      (DE),A
            DEC     DE
            LD      A,(DE)
            INC     A
            LD      (DE),A
            INC     DE
            INC     DE
L6974:      DEC     DE
            DEC     DE
            LD      A,(DE)
            INC     DE
            LD      B,A
            LD      A,(DE)
            INC     DE
            LD      C,A
            LD      A,B
            CP      032H
            JR      NZ,L6993            ; (+012H)
            LD      A,C
            CP      034H
            JR      NZ,L6993            ; (+00dH)
            LD      HL,(038D3H)
            LD      A,030H
            LD      B,006H
L698D:      LD      (HL),A
            INC     HL
            DJNZ    L698D               ; (-004H)
            JR      L69A9               ; (+016H)

L6993:      LD      BC,00258H
            CALL    057D1H
            LD      BC,XTEMP
            CALL    057D1H
            LD      BC,0000AH
            CALL    057D1H
            LD      A,030H
L69A7:      ADD     A,L
            LD      (DE),A
L69A9:      LD      HL,(038D3H)
            LD      DE,LETNL
            EX      DE,HL
            ADD     HL,DE
            LD      (038D3H),HL
            EX      DE,HL
            LD      DE,(06AB5H)
            OR      A
            SBC     HL,DE
            EX      DE,HL
            POP     HL
            LD      (HL),006H
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
            INC     HL
            INC     HL
            INC     HL
            EX      DE,HL
            POP     HL
            LD      A,003H
            LD      (06A65H),A
            JP      L5414

L69D1:      OR      A
            SBC     HL,BC
            JR      C,L69DB             ; (+005H)
            LD      A,(DE)
            INC     A
            LD      (DE),A
            JR      L69D1               ; (-00aH)

L69DB:      ADD     HL,BC
            INC     DE
            RET     

            LD      A,B
            OR      A
            JP      NZ,L2101
            LD      A,C
            RET     

            CALL    057FAH
            PUSH    DE
            CALL    0529DH
            CALL    03332H
            CALL    L5D7A
            CALL    04D5AH
            LD      C,E
            LD      B,D
            POP     DE
            RET     

            INC     HL
            CALL    L5414
            CP      028H
            INC     HL
            RET     Z
            JP      L20FE

            CP      029H
            INC     HL
            RET     Z
            JP      L20FE

            LD      DE,(06AB7H)
            LD      (038D3H),DE
            LD      DE,(06AB9H)
            CALL    L5414
L6A1A:      CP      041H
            JP      C,L20FE
L6A1F:      CP      05BH
L6A21:      JP      NC,L20FE
L6A24:      PUSH    DE
            CALL    L588B
            LD      A,(HL)
            CP      028H
            JP      Z,L58F4
L6A2E:      PUSH    HL
            CALL    L5C06
L6A32:      JR      NC,L6A3A            ; (+006H)
            LD      A,C
            LD      C,L
L6A36:      LD      B,H
L6A37:      POP     HL
            POP     DE
            RET     

L6A3A:      LD      A,(DE)
            ADD     A,C
            ADD     A,002H
            PUSH    BC
L6A3F:      EX      DE,HL
            LD      HL,(038D3H)
            PUSH    HL
            OR      A
            SBC     HL,DE
            INC     HL
            LD      C,L
            LD      B,H
            POP     HL
            PUSH    DE
            EX      DE,HL
            LD      L,A
            LD      H,000H
            ADD     HL,DE
            EX      DE,HL
            CALL    L58DF
            LD      (038D3H),DE
L6A59:      LDDR    
L6A5B:      LD      E,A
            LD      D,000H
            CALL    L5AD4
            POP     HL
            POP     BC
            LD      DE,0110FH
L6A66:      LD      (HL),C
            INC     HL
            SCF     
            SBC     A,C
            LD      B,A
L6A6B:      LD      A,(DE)
            LD      (HL),A
            INC     DE
L6A6E:      INC     HL
            DJNZ    L6A6B               ; (-006H)
            PUSH    HL
            LD      B,C
            XOR     A
L6A74:      LD      (HL),A
            INC     HL
L6A76:      DJNZ    L6A74               ; (-004H)
            LD      (HL),A
            LD      A,C
            POP     BC
            POP     HL
            POP     DE
            RET     

L6A7E:      CALL    L5414
L6A81:      CP      041H
L6A83:      JP      C,L20FE
            CP      05BH
            JP      NC,L20FE
            LD      DE,0110FH
            LD      B,000H
L6A90:      INC     DE
            LD      A,(HL)
            CALL    03AC7H
            JR      C,L6AA2             ; (+00bH)
            LD      (DE),A
            INC     B
            LD      A,B
            CP      003H
            JR      C,L6A9F             ; (+001H)
            DEC     B
L6A9F:      INC     HL
            JR      L6A90               ; (-012H)

L6AA2:      LD      DE,0110FH
            EX      DE,HL
            LD      (HL),B
            EX      DE,HL
            LD      C,005H
            CP      024H
            RET     NZ
            LD      C,003H
            INC     HL
            RET     

            LD      HL,0FFFBH
            ADD     HL,DE
L6AB5:      EX      DE,HL
            PUSH    DE
L6AB7:      LD      HL,0FFFBH
            ADD     HL,DE
L6ABB:      POP     DE
            LD      A,(06A65H)
            CP      B
            RET     Z
L6AC1:      JP      L20FB

            LD      B,0FFH
L6AC6:      INC     B
            LD      A,(HL)
            OR      A
            RET     Z
            INC     HL
            CP      022H
            RET     Z
            JR      L6AC6               ; (-00aH)

            LD      A,B
            OR      A
            RET     Z
L6AD3:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            DJNZ    L6AD3               ; (-006H)
            EX      DE,HL
            CALL    L58DF
            EX      DE,HL
            RET     

            PUSH    HL
            LD      HL,MONIT
            ADD     HL,SP
            DEC     H
            DEC     H
            SBC     HL,DE
            POP     HL
            RET     NC
            JP      L20B9

            LD      DE,(06AB9H)
            PUSH    DE
            JR      L6AFC               ; (+008H)

            XOR     A
            LD      (L5B41),A
            INC     HL
            LD      (05B3DH),HL
L6AFC:      LD      B,000H
            EXX     
            POP     HL
            PUSH    HL
            PUSH    HL
            LD      HL,(038D3H)
            LD      DE,0110FH
            PUSH    HL
            LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            LD      B,A
            CALL    058D0H
            POP     DE
            LD      (038D3H),HL
            LD      HL,(L6AB5)
            EX      DE,HL
            OR      A
            SBC     HL,DE
            EX      (SP),HL
            PUSH    HL
            EXX     
L6B1F:      POP     DE
            PUSH    DE
            PUSH    BC
            LD      BC,(05B3DH)
            LD      A,(L5B41)
            PUSH    BC
            PUSH    AF
            LD      BC,(06A26H)
            PUSH    BC
            CALL    04D5AH
            BIT     7,D
            JP      NZ,L20B9
            EX      AF,AF'
            POP     BC
            LD      (06A26H),BC
            POP     AF
            LD      (L5B41),A
            POP     BC
            LD      (05B3DH),BC
            EX      AF,AF'
            INC     HL
            CP      029H
            JR      Z,L6B69             ; (+01cH)
            CP      02CH
            JP      NZ,L20FE
            POP     BC
            INC     B
            LD      A,B
            CP      004H
            JR      C,L6B5E             ; (+005H)
            LD      A,003H
            JP      L2108

L6B5E:      EXX     
            POP     HL
            POP     DE
            EXX     
            PUSH    DE
            EXX     
            PUSH    DE
            PUSH    HL
            EXX     
            JR      L6B1F               ; (-04aH)

L6B69:      POP     BC
            EXX     
            POP     HL
            POP     DE
            EXX     
            INC     B
            PUSH    DE
            PUSH    HL
            EXX     
            LD      HL,(L6AB5)
            ADD     HL,DE
            LD      B,(HL)
            INC     B
            LD      DE,0110FH
L6B7B:      LD      A,(HL)
            LD      (DE),A
            INC     DE
            INC     HL
            DJNZ    L6B7B               ; (-006H)
            EXX     
            SET     7,C
            CALL    L5C06
            RES     7,C
            JP      NC,059F3H
            LD      A,B
            CP      (HL)
            JP      NZ,L20CE
            INC     HL
            EX      DE,HL
            POP     HL
            LD      (06A26H),HL
            EXX     
            LD      HL,MONIT
            EXX     
            EX      DE,HL
L6B9D:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            EX      (SP),HL
            PUSH    DE
            EXX     
            POP     DE
            CALL    L5B13
            EXX     
            EX      DE,HL
            CALL    059E7H
            EX      DE,HL
            PUSH    HL
            OR      A
            SBC     HL,DE
            JP      NC,L20D1
            EXX     
            POP     DE
            CALL    05B0FH
            EXX     
            POP     HL
            DJNZ    L6B9D               ; (-021H)
            PUSH    HL
            EXX     
            LD      A,C
            LD      D,B
            BIT     6,A
            JR      NZ,L6BDA            ; (+014H)
            AND     00FH
            LD      E,A
            PUSH    AF
            CALL    L5B13
            PUSH    HL
            EXX     
            POP     BC
            POP     AF
            POP     HL
            ADD     HL,BC
            LD      C,L
            LD      B,H
L6BD5:      LD      HL,(06A26H)
            POP     DE
            RET     

L6BDA:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            POP     HL
            LD      C,L
            LD      B,H
            LD      (HL),E
            INC     HL
            LD      (HL),D
            AND     00FH
            JR      L6BD5               ; (-012H)

            LD      A,(L5B42)
            OR      A
            RET     Z
            LD      A,D
            OR      E
            JP      Z,L20D1
            DEC     DE
            RET     

            EXX     
            LD      A,(L5B41)
            OR      A
            JP      Z,L20D1
            POP     HL
            LD      (06A26H),HL
            EXX     
            LD      DE,(038D3H)
            LD      L,B
            LD      H,000H
            ADD     HL,HL
            ADD     HL,DE
            EX      DE,HL
            INC     DE
            CALL    L58DF
            LD      (HL),B
            INC     HL
            EXX     
            LD      HL,00001H
            EXX     
L6C15:      POP     DE
            LD      A,(L5B41)
            OR      A
            JR      NZ,L6C28            ; (+00cH)
            PUSH    HL
            EX      DE,HL
            LD      DE,0000AH
            SCF     
            SBC     HL,DE
            JP      NC,L20D1
            POP     HL
L6C28:      CALL    059E7H
            INC     DE
            LD      (HL),E
            INC     HL
            LD      (HL),D
            INC     HL
            PUSH    DE
            EXX     
            POP     DE
            CALL    L5B13
            EXX     
            DJNZ    L6C15               ; (-024H)
            LD      E,C
            LD      D,000H
            PUSH    BC
            PUSH    DE
            EXX     
            POP     DE
            CALL    L5B13
            PUSH    HL
            EXX     
            POP     BC
            PUSH    BC
            EX      DE,HL
            LD      HL,(038D3H)
            LD      L,(HL)
            LD      H,000H
            ADD     HL,HL
            LD      A,(0110FH)
            ADD     A,005H
            ADD     A,L
            LD      L,A
            LD      A,000H
            ADC     A,H
            LD      H,A
            JR      C,L6C61             ; (+005H)
            ADD     HL,BC
            JR      C,L6C61             ; (+002H)
            PUSH    HL
            ADD     HL,DE
L6C61:      JP      C,L20B9
            EX      DE,HL
            CALL    L58DF
            PUSH    HL
            EXX     
            POP     HL
            LD      BC,(06AB5H)
            DEC     BC
            OR      A
            SBC     HL,BC
            PUSH    HL
            EXX     
            POP     BC
            LDDR    
            POP     DE
            CALL    05ACDH
            POP     BC
            PUSH    DE
            EXX     
            POP     DE
            LD      H,B
            LD      L,C
            POP     BC
            LD      A,C
            OR      080H
            LD      (HL),A
            INC     HL
            DEC     DE
            LD      (HL),E
            INC     HL
            LD      (HL),D
            INC     HL
            LD      DE,0110FH
            LD      A,(DE)
            INC     A
            CALL    L5AC5
            LD      DE,(038D3H)
            LD      A,(DE)
            LD      (HL),A
            INC     HL
            INC     DE
            ADD     A,A
            CALL    L5AC5
            PUSH    HL
            EXX     
            POP     HL
L6CA4:      XOR     A
            LD      (HL),A
            INC     HL
            DEC     BC
            LD      A,B
            OR      C
            JR      NZ,L6CA4            ; (-008H)
            LD      (HL),A
            LD      A,001H
            LD      (03901H),A
            EXX     
            POP     DE
            LD      A,(L5B41)
            OR      A
            JR      Z,L6CBE             ; (+004H)
            LD      HL,(06A26H)
            RET     

L6CBE:      LD      HL,(05B3DH)
            PUSH    DE
            JP      058FCH

            LD      B,A
L6CC6:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            DJNZ    L6CC6               ; (-006H)
            RET     

            LD      HL,(038D3H)
            ADD     HL,DE
            LD      (038D3H),HL
            LD      HL,(L6AB5)
            ADD     HL,DE
            LD      (L6AB5),HL
            LD      HL,(L6AB7)
            ADD     HL,DE
            LD      (L6AB7),HL
            LD      HL,(038DAH)
            ADD     HL,DE
            LD      (038DAH),HL
            RET     

            LD      A,0FFH
            LD      (L5B41),A
L6CEF:      EX      DE,HL
            LD      A,(DE)
            EX      DE,HL
            CP      041H
            JP      C,L20FE
            CP      05BH
            JP      NC,L20FE
            CALL    L588B
            LD      A,(HL)
            CALL    057FDH
            CALL    L58ED
            CALL    L5414
            CP      02CH
            RET     NZ
            INC     HL
            JR      L6CEF               ; (-020H)

            ADD     HL,DE
            RET     NC
            JR      L6D3A               ; (+027H)

            PUSH    BC
            EX      DE,HL
            LD      C,L
            LD      A,H
            LD      HL,MONIT
            CALL    05B23H
            LD      A,C
            CALL    05B23H
            POP     BC
            RET     

            OR      A
            JR      Z,L6D34             ; (+00eH)
            LD      B,008H
L6D28:      ADD     HL,HL
            JR      C,L6D3A             ; (+00fH)
            RLCA    
            JR      NC,L6D31            ; (+003H)
            ADD     HL,DE
            JR      C,L6D3A             ; (+009H)
L6D31:      DJNZ    L6D28               ; (-00bH)
            RET     

L6D34:      LD      A,H
            LD      H,L
            LD      L,000H
            OR      A
            RET     Z
L6D3A:      JP      L20D1

            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            CP      041H
            RET     C
            CP      05BH
            JP      NC,L5497
            LD      BC,(05D83H)
            LD      A,B
            OR      C
            JR      NZ,L6D66            ; (+013H)
            CALL    05817H
L6D56:      PUSH    DE
            PUSH    HL
            LD      L,C
            LD      H,B
            LD      B,A
            LD      C,A
L6D5C:      LD      A,(HL)
            LD      (DE),A
            INC     HL
            INC     DE
            DJNZ    L6D5C               ; (-006H)
            POP     HL
            JP      05454H

L6D66:      PUSH    DE
            CALL    L587E
            PUSH    HL
            INC     B
            LD      DE,0110FH
            LD      HL,(038D3H)
            CALL    058D0H
            LD      B,000H
            LD      HL,(L5D83)
            CALL    L5414
            CP      0F4H
            JR      Z,L6DB0             ; (+02fH)
            CP      028H
            JR      NZ,L6DAD            ; (+028H)
L6D85:      INC     HL
            INC     B
            PUSH    BC
            CALL    L587E
            LD      A,C
            POP     DE
            CP      E
            LD      C,E
            JR      NZ,L6DA2            ; (+011H)
            PUSH    DE
            LD      C,B
            INC     C
            PUSH    HL
            LD      HL,(038D3H)
            LD      DE,0110FH
            CALL    0162EH
            POP     HL
            POP     BC
            JR      Z,L6DC6             ; (+024H)
L6DA2:      CALL    L5414
            CP      029H
            JR      Z,L6DB0             ; (+007H)
            CP      02CH
            JR      Z,L6D85             ; (-028H)
L6DAD:      JP      L20FE

L6DB0:      LD      HL,(038D3H)
            LD      DE,0110FH
            LD      A,(HL)
            LD      (DE),A
            LD      B,A
L6DB9:      INC     HL
            INC     DE
            LD      A,(HL)
            LD      (DE),A
            DJNZ    L6DB9               ; (-006H)
            POP     HL
            POP     DE
            CALL    L5C02
            JR      L6D56               ; (-070H)

L6DC6:      LD      HL,(L5D85)
            CALL    057FAH
            DEC     B
            JR      Z,L6DE7             ; (+018H)
            DEC     HL
L6DD0:      PUSH    BC
L6DD1:      CALL    03880H
            CALL    L1C66
            JP      Z,L20FE
            CP      029H
            JP      Z,L20FE
            CP      02CH
            JR      NZ,L6DD1            ; (-012H)
            POP     BC
            DJNZ    L6DD0               ; (-016H)
            INC     HL
L6DE7:      EX      DE,HL
            POP     HL
            EX      (SP),HL
            EX      DE,HL
            LD      BC,(05D83H)
            PUSH    BC
            LD      BC,MONIT
            LD      (05D83H),BC
            CALL    0529DH
            POP     HL
            LD      (L5D83),HL
            POP     HL
            JP      L5414

            PUSH    DE
            JP      05828H

            LD      HL,(06AB3H)
L6E09:      LD      DE,0110FH
            LD      A,(HL)
            OR      A
            RET     Z
            CP      040H
            JR      NC,L6E3A            ; (+027H)
            CP      C
            JR      NZ,L6E2F            ; (+019H)
            INC     HL
            LD      A,(DE)
            CP      (HL)
            JR      NZ,L6E2D            ; (+012H)
            LD      B,A
L6E1C:      INC     DE
            INC     HL
            LD      A,(DE)
            CP      (HL)
            JR      NZ,L6E27            ; (+005H)
            DJNZ    L6E1C               ; (-008H)
            INC     HL
            SCF     
            RET     

L6E27:      INC     HL
            DJNZ    L6E27               ; (-003H)
            LD      A,C
            JR      L6E34               ; (+007H)

L6E2D:      LD      A,C
            DEC     HL
L6E2F:      AND     00FH
            INC     HL
            ADD     A,(HL)
            INC     HL
L6E34:      LD      E,A
            LD      D,000H
            ADD     HL,DE
            JR      L6E09               ; (-031H)

L6E3A:      CP      C
            JR      Z,L6E52             ; (+015H)
            INC     HL
L6E3E:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            DEC     HL
            ADD     HL,DE
            JP      L5C09

            LD      A,C
            SUB     B
            CPL     
            LD      C,A
            LD      B,0FFH
            ADD     HL,BC
            POP     BC
            DEC     HL
            DEC     HL
            JR      L6E3E               ; (-014H)

L6E52:      LD      A,(HL)
            EXX     
            LD      C,A
            LD      B,000H
            EXX     
            INC     HL
            PUSH    DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            EX      DE,HL
            ADD     HL,DE
            EX      DE,HL
            POP     DE
            LD      A,(DE)
            CP      (HL)
            JP      NZ,05C4EH
            PUSH    BC
            LD      B,A
            LD      C,A
L6E6A:      INC     HL
            INC     DE
            LD      A,(DE)
            CP      (HL)
            JP      NZ,L5C46
            DJNZ    L6E6A               ; (-009H)
            INC     HL
            POP     BC
            SCF     
            RET     

            LD      A,(HL)
            CALL    05881H
            SET     6,C
            PUSH    HL
            CALL    L5C06
            JP      C,L20CE
            LD      (HL),C
            EX      (SP),HL
            PUSH    HL
            DEC     HL
L6E88:      CALL    03880H
            OR      A
            JR      Z,L6E92             ; (+004H)
            CP      03AH
            JR      NZ,L6E88            ; (-00aH)
L6E92:      POP     DE
            PUSH    HL
            INC     HL
            SBC     HL,DE
            LD      A,(0110FH)
            ADD     A,004H
            LD      C,A
            LD      B,000H
            LD      A,L
            ADD     HL,BC
            LD      B,A
            PUSH    HL
            EXX     
            POP     BC
            PUSH    BC
            PUSH    HL
            PUSH    DE
            PUSH    BC
            LD      HL,MONIT
            ADD     HL,SP
            LD      DE,(038D3H)
            DEC     H
            OR      A
            SBC     HL,DE
            LD      A,00CH
            JP      C,L20BB
            POP     BC
            POP     DE
            POP     HL
            LD      HL,(038D3H)
            PUSH    HL
            ADD     HL,BC
            EX      (SP),HL
            PUSH    HL
            LD      DE,(06AB5H)
            OR      A
            SBC     HL,DE
            LD      C,L
            LD      B,H
            POP     HL
            POP     DE
            LDDR    
            POP     DE
            CALL    05ACDH
            DEC     DE
            POP     HL
            EX      (SP),HL
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
            INC     HL
            LD      DE,0110FH
            LD      A,(DE)
            LD      (HL),A
            LD      B,A
L6EE3:      INC     DE
            INC     HL
            LD      A,(DE)
            LD      (HL),A
            DJNZ    L6EE3               ; (-006H)
            INC     HL
            PUSH    HL
            EXX     
            POP     HL
L6EED:      LD      A,(DE)
            LD      (HL),A
            INC     DE
            INC     HL
            DJNZ    L6EED               ; (-006H)
            LD      (HL),000H
            POP     HL
            RET     

            PUSH    DE
            LD      A,(HL)
            CALL    05881H
            POP     IX
            PUSH    BC
            SET     6,C
            LD      DE,(05D85H)
            LD      (L5D85),HL
            PUSH    DE
            CALL    L5C06
            LD      A,00FH
            JP      NC,L2108
            LD      DE,(05D83H)
            LD      (L5D83),HL
            PUSH    DE
            PUSH    IX
            DEC     HL
L6F1C:      CALL    03880H
            CALL    L1C66
            JP      Z,L20FE
            CP      0F4H
            JR      NZ,L6F1C            ; (-00dH)
            INC     HL
            POP     DE
            PUSH    DE
            CALL    0529DH
            POP     DE
            LD      HL,(L5D85)
            POP     BC
            LD      (05D83H),BC
            POP     BC
            LD      (05D85H),BC
            EX      DE,HL
            POP     BC
            LD      A,C
            CALL    L5D70
            LD      BC,00005H
            ADD     HL,BC
            EX      DE,HL
            CALL    L5414
            CP      028H
            RET     NZ
            PUSH    DE
            LD      B,001H
L6F51:      PUSH    BC
            CALL    03880H
            POP     BC
            OR      A
            JP      Z,L20FE
            CP      03AH
            JP      Z,L20FE
            CP      028H
            JR      NZ,L6F64            ; (+001H)
            INC     B
L6F64:      CP      029H
            JR      NZ,L6F51            ; (-017H)
            DJNZ    L6F51               ; (-019H)
            INC     HL
            CALL    L5414
            POP     DE
            RET     

            CP      003H
            JR      Z,L6F7A             ; (+006H)
            CP      003H
            RET     NZ
            JP      L20FB

L6F7A:      LD      A,(06A65H)
            CP      003H
            RET     Z
            JP      L20FB

            NOP     
            NOP     
            NOP     
            NOP     
            PUSH    HL
            LD      B,005H
            XOR     A
L6F8B:      LD      (HL),A
            INC     HL
            DJNZ    L6F8B               ; (-004H)
            POP     HL
            RET     

            LD      A,(HL)
            OR      A
            RET     Z
            INC     HL
            LD      A,(HL)
            XOR     080H
            LD      (HL),A
            DEC     HL
            RET     

            LD      A,(06A65H)
            CP      003H
            LD      A,005H
            RET     NZ
            JP      L20FB

            CALL    L5D9B
            LD      C,A
            LD      A,080H
            JP      L5DB9

            LD      A,(06A65H)
            CP      003H
            JP      Z,L5E07
            LD      C,A
            XOR     A
            LD      (L6A59),HL
            PUSH    DE
            PUSH    HL
            LD      (06A5CH),SP
            INC     HL
            INC     DE
            LD      B,(HL)
            XOR     (HL)
            EX      DE,HL
            XOR     (HL)
            DEC     HL
            DEC     DE
            EX      DE,HL
            RLCA    
            LD      A,B
            LD      (L6A5B),A
            JP      C,L5EC8
            XOR     A
            CP      (HL)
            JP      Z,L5DFC
            LD      A,(DE)
            OR      A
            JR      Z,L6FE0             ; (+004H)
            SUB     (HL)
            JP      L5F0B

L6FE0:      LD      SP,(06A5CH)
            POP     HL
            POP     DE
            EI      
            LD      A,(HL)
            OR      A
            JR      Z,L6FF7             ; (+00cH)
            LD      A,(L6A5B)
            AND     080H
            INC     HL
            RES     7,(HL)
            OR      (HL)
            LD      (HL),A
            DEC     HL
            RET     

L6FF7:      INC     HL
            RES     7,(HL)
            DEC     HL
            RET     

            LD      B,000H
            LD      A,005H
            LD      C,A
            EX      DE,HL
            LDIR    
            JP      L5DE0

            LD      B,(HL)
            LD      A,(DE)
            ADD     A,B
            JP      C,L20E6
            LD      C,A
            PUSH    DE
            PUSH    HL
            PUSH    DE
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      HL,(L6AB5)
            ADD     HL,DE
            EX      DE,HL
            LD      HL,(038D3H)
            CALL    058D0H
            EX      (SP),HL
            LD      B,(HL)
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      HL,(L6AB5)
            ADD     HL,DE
            EX      DE,HL
            POP     HL
            CALL    058D0H
            LD      A,C
            LD      DE,(038D3H)
            LD      BC,(06AB5H)
            EX      DE,HL
            OR      A
            SBC     HL,BC
            EX      DE,HL
            LD      (038D3H),HL
            POP     HL
            LD      (HL),A
            INC     HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
            DEC     HL
            DEC     HL
            POP     DE
            RET     

            LD      A,(06A65H)
            CP      003H
            JR      NZ,L7085            ; (+034H)
            PUSH    DE
            PUSH    HL
            LD      A,(DE)
            OR      (HL)
            JR      Z,L7082             ; (+02bH)
            LD      A,(DE)
            CP      (HL)
            JR      C,L705C             ; (+001H)
            LD      A,(HL)
L705C:      OR      A
            JR      Z,L707C             ; (+01dH)
            INC     HL
            LD      C,(HL)
            INC     HL
            LD      B,(HL)
            EX      DE,HL
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            LD      HL,(L6AB5)
            EX      DE,HL
            ADD     HL,DE
            EX      DE,HL
            ADD     HL,BC
            EX      DE,HL
            LD      B,A
            OR      A
            JR      Z,L7082             ; (+00eH)
L7074:      LD      A,(DE)
            CP      (HL)
            JR      NZ,L7082            ; (+00aH)
            INC     DE
            INC     HL
            DJNZ    L7074               ; (-008H)
L707C:      POP     DE
            POP     HL
            LD      A,(DE)
            CP      (HL)
            EX      DE,HL
            RET     

L7082:      POP     HL
            POP     DE
            RET     

L7085:      INC     DE
            INC     HL
            LD      A,(DE)
            DEC     DE
            XOR     (HL)
            RLCA    
            JR      NC,L7091            ; (+004H)
            LD      A,(HL)
            DEC     HL
            RLCA    
            RET     

L7091:      LD      A,(HL)
            DEC     HL
            RLCA    
            JR      NC,L709C            ; (+006H)
            CALL    L5E9C
            RET     Z
            CCF     
            RET     

L709C:      PUSH    DE
            PUSH    HL
            EX      DE,HL
            LD      A,(DE)
            CP      (HL)
            JR      NZ,L70BD            ; (+01aH)
            INC     DE
            INC     HL
            LD      A,(HL)
            OR      080H
            LD      B,A
            LD      A,(DE)
            OR      080H
            CP      B
            JR      NZ,L70BD            ; (+00eH)
            LD      A,(06A65H)
            LD      B,A
            DEC     B
            DEC     B
L70B5:      INC     DE
            INC     HL
            LD      A,(DE)
            CP      (HL)
            JR      NZ,L70BD            ; (+002H)
            DJNZ    L70B5               ; (-008H)
L70BD:      POP     HL
            POP     DE
            RET     

L70C0:      POP     HL
            PUSH    HL
            CALL    L5D87
            JP      L5DE0

            CALL    L5E9C
            JR      Z,L70C0             ; (-00dH)
            JR      NC,L70D8            ; (+009H)
            LD      A,(L6A5B)
            XOR     080H
            LD      (L6A5B),A
            SCF     
L70D8:      EX      AF,AF'
            LD      A,(HL)
            OR      A
            JP      Z,L5DFC
            LD      A,(DE)
            OR      A
            JP      Z,L5DE0
            SUB     (HL)
            JR      C,L70ED             ; (+007H)
            CP      020H
            JP      NC,L5DFC
            JR      L70F4               ; (+007H)

L70ED:      NEG     
            CP      020H
            JP      NC,L5DE0
L70F4:      EX      AF,AF'
            JR      C,L70F8             ; (+001H)
            EX      DE,HL
L70F8:      EX      AF,AF'
            JP      L5F92

            LD      SP,(06A5CH)
            EI      
            POP     HL
            POP     DE
            LD      A,(06A63H)
            OR      A
            JP      Z,L20F5
            RET     

            JR      NC,L7117            ; (+00aH)
            NEG     
            CP      020H
            JP      NC,L5DE0
            EX      DE,HL
            JR      L711C               ; (+005H)

L7117:      CP      020H
            JP      NC,L5DFC
L711C:      CALL    05F52H
            LD      A,H
            EXX     
            ADC     A,H
            EXX     
            LD      H,A
            LD      A,L
            EXX     
            ADC     A,L
            EXX     
            LD      L,A
            LD      A,D
            EXX     
            ADC     A,D
            EXX     
            LD      D,A
            LD      A,E
            EXX     
            ADC     A,E
            EXX     
            JR      NC,L713F            ; (+00bH)
            RRA     
            RR      D
            RR      L
            RR      H
            INC     C
            JP      Z,L5EFC
L713F:      LD      E,A
            LD      A,C
            EXX     
            LD      BC,00005H
            LD      HL,(L6A59)
            LD      (HL),A
            ADD     HL,BC
            DI      
            LD      SP,HL
            EXX     
            PUSH    HL
            PUSH    DE
            JP      L5DE0

            DI      
            LD      (06A5EH),SP
            EX      AF,AF'
            INC     HL
            LD      SP,HL
            EXX     
            POP     DE
            SET     7,E
            POP     HL
            OR      A
L7160:      EX      AF,AF'
            CP      008H
            JR      C,L7171             ; (+00cH)
            SUB     008H
            EX      AF,AF'
            RL      H
            LD      H,L
            LD      L,D
            LD      D,E
            LD      E,000H
            JR      L7160               ; (-011H)

L7171:      OR      A
            JR      Z,L7182             ; (+00eH)
L7174:      EX      AF,AF'
            OR      A
            RR      E
            RR      D
            RR      L
            RR      H
            EX      AF,AF'
            DEC     A
            JR      NZ,L7174            ; (-00eH)
L7182:      EXX     
            EX      DE,HL
            LD      C,(HL)
            INC     HL
            LD      SP,HL
            POP     DE
            SET     7,E
            POP     HL
            EX      AF,AF'
            LD      SP,(06A5EH)
            EI      
            RET     

            CP      020H
            JP      NC,L5DE0
            CALL    05F52H
            LD      A,H
            EXX     
            SBC     A,H
            EXX     
            LD      H,A
            LD      A,L
            EXX     
            SBC     A,L
            EXX     
            LD      L,A
            LD      A,D
            EXX     
            SBC     A,D
            EXX     
            LD      D,A
            LD      A,E
            EXX     
            SBC     A,E
            EXX     
L71AD:      OR      A
            JR      Z,L71C6             ; (+016H)
            BIT     7,A
            JR      NZ,L71C2            ; (+00eH)
            RL      H
            RL      L
            RL      D
            RLA     
            DEC     C
            JP      NZ,L5FB0
            JP      L5EC0

L71C2:      LD      E,A
            JP      L5F3F

L71C6:      LD      A,C
            SUB     008H
            LD      C,A
            LD      A,D
            LD      D,L
            LD      L,H
            LD      H,000H
            JR      Z,L71D3             ; (+002H)
            JR      NC,L71AD            ; (-026H)
L71D3:      JP      L5EC0

            LD      C,A
            INC     HL
            INC     DE
            LD      A,(DE)
            XOR     (HL)
            LD      (L6A5B),A
            DEC     HL
            DEC     DE
            RET     

            CALL    L5D9B
            CALL    05FD6H
            PUSH    DE
            PUSH    HL
            LD      (06A5CH),SP
            LD      A,(HL)
            OR      A
            JP      Z,L5EC0
            LD      A,(DE)
            OR      A
            JP      Z,L5EC0
            INC     DE
            PUSH    DE
            POP     IX
            ADD     A,(HL)
            LD      E,A
            LD      A,000H
            ADC     A,A
            LD      D,A
            LD      (06A61H),DE
            INC     HL
            XOR     A
            LD      (06A60H),A
            LD      D,(HL)
            SET     7,D
            INC     HL
            LD      E,(HL)
            INC     HL
            PUSH    HL
            LD      H,A
            LD      L,A
            EXX     
            POP     HL
            LD      D,(HL)
            INC     HL
            LD      E,(HL)
            LD      B,A
            LD      C,A
            LD      H,A
            LD      L,A
            EXX     
            LD      A,(IX+000H)
            OR      080H
            LD      C,004H
L7224:      LD      B,008H
            OR      A
            JP      Z,L60B9
L722A:      RLCA    
            JR      NC,L723F            ; (+012H)
            EX      AF,AF'
            EXX     
            LD      A,C
            ADD     A,B
            LD      C,A
            ADC     HL,DE
            EXX     
            ADC     HL,DE
            JR      NC,L723E            ; (+005H)
            LD      A,001H
            LD      (06A60H),A
L723E:      EX      AF,AF'
L723F:      SRL     D
            RR      E
            EXX     
            RR      D
            RR      E
            RR      B
            EXX     
            DJNZ    L722A               ; (-023H)
            INC     IX
            LD      A,(IX+000H)
            DEC     C
            JR      NZ,L7224            ; (-031H)
            EXX     
            LD      A,(06A60H)
            OR      A
            JR      Z,L7272             ; (+016H)
            LD      DE,(06A61H)
            INC     DE
            LD      (06A61H),DE
            EXX     
            SCF     
            RR      H
            RR      L
            EXX     
            RR      H
            RR      L
            RR      C
L7272:      BIT     7,C
            JR      Z,L7290             ; (+01aH)
            LD      DE,00001H
            ADD     HL,DE
            EXX     
            LD      DE,MONIT
            ADC     HL,DE
            EXX     
            JR      NC,L7290            ; (+00dH)
            LD      DE,(06A61H)
            INC     DE
            LD      (06A61H),DE
            EXX     
            LD      H,080H
            EXX     
L7290:      POP     IX
            PUSH    IX
            LD      (IX+004H),L
            LD      (IX+003H),H
            EXX     
            LD      (IX+002H),L
            LD      (IX+001H),H
            LD      HL,(06A61H)
            OR      A
            LD      DE,00081H
            SBC     HL,DE
            LD      A,H
            ADD     A,000H
            JP      M,060C5H
            JP      NZ,L5EFC
            LD      (IX+000H),L
            JP      L5DE0

            LD      A,E
            EXX     
            LD      B,E
            LD      E,D
            LD      D,A
            EXX     
            LD      E,D
            LD      D,000H
            JP      L604D

            LD      SP,(06A5CH)
            JP      L5EC0

            CALL    L5D9B
            CALL    05FD6H
            PUSH    DE
            PUSH    HL
            LD      (06A5CH),SP
            LD      A,(DE)
            OR      A
            JP      Z,L20F5
            EX      AF,AF'
            LD      A,(HL)
            OR      A
            JP      Z,L5EC0
            EXX     
            ADD     A,081H
            LD      B,A
            LD      A,000H
            ADC     A,A
            EX      AF,AF'
            LD      C,A
            LD      A,B
            SUB     C
            LD      C,A
            EX      AF,AF'
            LD      B,A
            EX      AF,AF'
            LD      A,B
            SBC     A,000H
            JP      C,060C5H
            JP      NZ,L5EFC
            LD      A,C
            PUSH    AF
            EXX     
            INC     DE
            INC     HL
            LD      B,(HL)
            SET     7,B
            INC     HL
            LD      C,(HL)
            INC     HL
            PUSH    HL
            EX      DE,HL
            LD      D,(HL)
            SET     7,D
            INC     HL
            LD      E,(HL)
            INC     HL
            PUSH    HL
            LD      H,B
            LD      L,C
            EXX     
            POP     HL
            LD      D,(HL)
            INC     HL
            LD      E,(HL)
            POP     HL
            LD      A,(HL)
            INC     HL
            LD      L,(HL)
            LD      H,A
            EXX     
            LD      C,005H
L731E:      LD      B,008H
            XOR     A
L7321:      BIT     7,H
            JR      NZ,L7335            ; (+010H)
            OR      A
L7326:      RLA     
            EXX     
            ADD     HL,HL
            EXX     
            ADC     HL,HL
            DJNZ    L7321               ; (-00dH)
            PUSH    AF
            DEC     C
            JR      NZ,L731E            ; (-014H)
            JP      L616F

L7335:      OR      A
            EXX     
            SBC     HL,DE
            EXX     
            SBC     HL,DE
            CCF     
            JR      C,L7326             ; (-019H)
            EXX     
            ADD     HL,DE
            EXX     
            ADC     HL,DE
            OR      A
            RLA     
            EXX     
            ADD     HL,HL
            EXX     
            ADC     HL,HL
            DJNZ    L7354               ; (+007H)
            PUSH    AF
            LD      B,008H
            DEC     C
            JP      Z,L616F
L7354:      EXX     
            OR      A
            SBC     HL,DE
            EXX     
            SBC     HL,DE
            SCF     
            RLA     
            DJNZ    L7365               ; (+006H)
            PUSH    AF
            LD      B,008H
            DEC     C
            JR      Z,L736F             ; (+00aH)
L7365:      EXX     
            ADD     HL,HL
            EXX     
            ADC     HL,HL
            JR      C,L7354             ; (-018H)
            JP      L6121

L736F:      POP     AF
            LD      H,A
            EXX     
            POP     AF
            LD      E,A
            POP     AF
            LD      D,A
            POP     AF
            LD      C,A
            POP     AF
            LD      B,A
            POP     AF
            BIT     7,B
            JR      NZ,L7392            ; (+013H)
            EXX     
            SLA     H
            EXX     
            RL      E
            RL      D
            RL      C
            RL      B
            DEC     A
            JP      NZ,L617B
            JP      L5EC0

L7392:      EXX     
            RL      H
            EXX     
            JR      NC,L73A9            ; (+011H)
            LD      HL,00001H
            ADD     HL,DE
            EX      DE,HL
            LD      HL,MONIT
            ADC     HL,BC
            LD      B,H
            LD      C,L
            JR      NC,L73A9            ; (+003H)
            LD      B,080H
            INC     A
L73A9:      POP     HL
            PUSH    HL
            LD      (HL),A
            INC     HL
            LD      (HL),B
            INC     HL
            LD      (HL),C
            INC     HL
            LD      (HL),D
            INC     HL
            LD      (HL),E
            JP      L5DE0

            INC     HL
            BIT     7,(HL)
            DEC     HL
            RET     

            INC     (HL)
            RET     NZ
            JP      L20F5

            LD      A,(HL)
            OR      A
            RET     Z
            DEC     (HL)
            RET     NZ
            JP      L5D87

            PUSH    HL
            LD      DE,00005H
            ADD     HL,DE
            EX      DE,HL
            LD      HL,(06ABDH)
            DEC     HL
            SBC     HL,DE
            JP      C,L20F8
            POP     HL
            RET     

            PUSH    HL
            LD      (06A12H),HL
            CALL    061C9H
            EX      DE,HL
            LD      (06A14H),HL
            CALL    061C9H
            EX      DE,HL
            LD      (06A16H),HL
            CALL    061C9H
            LD      (06A18H),DE
            POP     HL
            RET     

            EX      DE,HL
            LD      A,(HL)
            OR      A
            JP      Z,L6258
            EX      DE,HL
            LD      A,(HL)
            OR      A
            JP      Z,L5D87
            CALL    L61B7
            JR      Z,L7432             ; (+02cH)
            CALL    L5D91
            EX      DE,HL
            PUSH    DE
            PUSH    HL
            LD      DE,L6A6E
            CALL    03AB8H
            LD      HL,L6A6E
            CALL    L62B0
            LD      A,(HL)
            OR      A
            JP      NZ,L2101
            POP     HL
            PUSH    HL
            CALL    L3D21
            XOR     A
            RR      L
            RRA     
            POP     DE
            POP     HL
            PUSH    AF
            CALL    L6232
            POP     AF
            INC     HL
            OR      (HL)
            LD      (HL),A
            DEC     HL
            RET     

L7432:      EX      DE,HL
            LD      A,(HL)
            OR      A
            JR      Z,L7458             ; (+021H)
            CALL    L61B7
            JR      Z,L745E             ; (+022H)
            CALL    L5D91
            CALL    L625E
            PUSH    DE
            PUSH    HL
            LD      DE,L6A6E
            CALL    L3AB5
            LD      HL,L6A6E
            POP     DE
            CALL    L60CC
            PUSH    DE
            CALL    03AB8H
            POP     HL
            POP     DE
            RET     

L7458:      PUSH    DE
            CALL    L3AB5
            POP     HL
            RET     

L745E:      PUSH    DE
            LD      DE,L6A6E
            CALL    03AB8H
            POP     HL
            CALL    L6736
            LD      DE,L6A6E
            CALL    05FE1H
            JP      L6615

            INC     HL
            RES     7,(HL)
            DEC     HL
            RET     

            LD      A,(06A65H)
            CP      002H
            RET     Z
            CALL    L61B7
            JP      Z,L3C97
            PUSH    HL
            LD      DE,L6A6E
            CALL    03AB8H
            POP     HL
            CALL    L3C97
            LD      DE,L6A6E
            CALL    L5E4A
            RET     Z
            LD      DE,L3D77
            JP      L5DA6

            LD      DE,L3D77
            JP      L5DAF

            LD      DE,L3D77
            JP      L5E4A

            LD      A,(06A65H)
            CP      002H
            RET     Z
            JP      L3C97

            LD      A,(06A65H)
            CP      002H
            JR      Z,L74C9             ; (+012H)
            PUSH    HL
            LD      DE,L6A6E
            CALL    03AB8H
            LD      HL,L6A6E
            CALL    L3C97
            EX      DE,HL
            POP     HL
            JP      L5DA6

L74C9:      LD      (HL),000H
            INC     HL
            LD      (HL),000H
            DEC     HL
            RET     

            LD      A,(HL)
            OR      A
            RET     Z
            CALL    L61B7
            JP      NZ,L2101
            CALL    L6736
            CALL    L61C1
            JP      L6615

            PUSH    HL
            EX      DE,HL
            CALL    L3AB5
            POP     HL
            POP     BC
            RET     

            LD      A,(HL)
            LD      C,H
            ADD     A,B
            DEC     HL
            PUSH    BC
            INC     HL
            LD      A,(HL)
            RES     7,(HL)
            DEC     HL
            PUSH    AF
            CALL    L62FF
            POP     AF
            POP     BC
            RLCA    
            RET     NC
            JP      L5D91

            CALL    L62A1
            JR      C,L7528             ; (+024H)
            CALL    061C9H
            PUSH    DE
            PUSH    HL
            CALL    03AB8H
            POP     DE
            PUSH    DE
            CALL    L3AB5
            POP     HL
            POP     DE
            CALL    L60CC
            CALL    L6328
            LD      DE,065ABH
            CALL    L61BC
            CALL    L5DA6
            CALL    L61C1
            JP      L5DF7

L7528:      LD      A,0FFH
            LD      (06A1EH),A
            LD      DE,062EAH
            CALL    L5E4A
            JR      C,07584H             ; (+04fH)
            LD      DE,L62EC
            CALL    L5E4A
            PUSH    AF
            CALL    061C9H
            POP     AF
            PUSH    HL
            PUSH    DE
            CALL    03AB8H
            POP     HL
            JR      C,L755C             ; (+014H)
            CALL    L629B
            EX      (SP),HL
            CALL    L5DA6
            POP     DE
            CALL    L60CC
            CALL    06384H
            LD      DE,06575H
            JP      L5DAF

L755C:      LD      DE,0637FH
            CALL    05FE1H
            CALL    L629B
            EX      (SP),HL
            LD      DE,0637FH
            CALL    L5DA6
            POP     DE
            CALL    L60CC
            CALL    06384H
            CALL    L61BC
            LD      DE,06575H
            CALL    L5DAF
            JP      L61C1

            LD      A,A
            LD      D,H
            INC     DE
            CALL    Z,0C5D0H
            PUSH    HL
            CALL    061DAH
            POP     HL
            PUSH    HL
            PUSH    DE
            CALL    03AB8H
            POP     HL
            LD      E,L
            LD      D,H
            CALL    05FE1H
            LD      DE,(06A16H)
            POP     HL
            PUSH    HL
            CALL    03AB8H
            LD      A,(06A65H)
            DEC     A
            CP      004H
            LD      B,A
            LD      HL,06543H
            JP      Z,06444H
            LD      B,00AH
            JP      06444H

            PUSH    BC
            LD      A,(HL)
            OR      A
            JP      Z,062E2H
            LD      DE,06575H
            CALL    L61C1
            CALL    L5DA6
            CALL    L61BC
            CALL    L5D91
            POP     BC
            PUSH    BC
            PUSH    HL
            INC     HL
            LD      A,(HL)
            RES     7,(HL)
            AND     080H
            CPL     
            LD      (06A1EH),A
            DEC     HL
            CALL    061C9H
            LD      HL,06575H
            PUSH    DE
            CALL    03AB8H
            POP     HL
            CALL    L61BC
            CALL    L61BC
            CALL    L61BC
            EX      DE,HL
            POP     HL
            PUSH    HL
            CALL    L5E4A
            CALL    NC,0680EH
            EX      DE,HL
            CALL    L61C1
            EX      DE,HL
            CALL    L5E4A
            JR      C,L7605             ; (+00bH)
            CALL    L5DA6
            LD      A,(06A1EH)
            XOR     080H
            LD      (06A1EH),A
L7605:      EX      DE,HL
            CALL    L61C1
            EX      DE,HL
            CALL    L5E4A
            JR      C,L761B             ; (+00cH)
            CALL    L61C1
            CALL    L5DA6
            CALL    L61BC
            CALL    L5DF7
L761B:      CALL    061DAH
            POP     HL
            PUSH    DE
            LD      DE,06575H
            CALL    L5E4A
            JR      NC,L768D            ; (+065H)
            POP     DE
            PUSH    HL
            PUSH    DE
            CALL    03AB8H
            POP     HL
            LD      E,L
            LD      D,H
            CALL    05FE1H
            LD      DE,(06A16H)
            POP     HL
            PUSH    HL
            CALL    03AB8H
            LD      A,(06A65H)
            LD      B,A
            LD      HL,L64F3
L7644:      PUSH    BC
            PUSH    HL
            LD      HL,(06A16H)
            LD      DE,(06A18H)
            CALL    05FE1H
            POP     HL
            PUSH    HL
            LD      DE,(06A14H)
            PUSH    DE
            CALL    03AB8H
            POP     HL
            LD      DE,(06A16H)
            CALL    05FE1H
            EX      DE,HL
            LD      HL,(06A12H)
            CALL    L5DAF
            POP     HL
            LD      DE,00005H
            ADD     HL,DE
            POP     BC
            DJNZ    L7644               ; (-02dH)
            POP     HL
            POP     BC
            LD      A,(06A1EH)
            INC     HL
L7677:      XOR     (HL)
            CPL     
            LD      (HL),A
            DEC     HL
            LD      A,(06A65H)
            CP      008H
            LD      A,(HL)
            JR      Z,L7689             ; (+006H)
            CP      05CH
L7685:      RET     NC
            JP      L5D87

L7689:      CP      04DH
            JR      L7685               ; (-008H)

L768D:      CALL    L61C1
            LD      DE,06575H
            CALL    L5DA6
            CALL    L61BC
            CALL    L5DF7
            POP     DE
            PUSH    HL
            PUSH    DE
            CALL    03AB8H
            POP     HL
            LD      E,L
            LD      D,H
            CALL    05FE1H
            LD      DE,(06A16H)
            CALL    L3AB5
            POP     DE
            PUSH    DE
            CALL    L3AB5
            LD      A,(06A65H)
            LD      B,A
            LD      HL,L651B
            JR      L7644               ; (-079H)

            PUSH    BC
            PUSH    HL
            CALL    061C9H
            EX      DE,HL
            LD      (L6A1A),HL
            CALL    061C9H
            LD      (06A1CH),DE
            POP     HL
            PUSH    HL
            CALL    03AB8H
            LD      HL,(L6A1A)
            EX      DE,HL
            POP     HL
            PUSH    HL
            CALL    03AB8H
            LD      HL,(06A1CH)
            CALL    063C6H
            POP     DE
            PUSH    DE
            CALL    03AB8H
            LD      HL,(L6A1A)
            CALL    063B0H
            EX      DE,HL
            POP     HL
            CALL    L60CC
            POP     BC
            RET     

            LD      A,(HL)
L76F4:      XOR     D
            XOR     D
            XOR     D
            XOR     E
            LD      A,D
            EX      AF,AF'
            ADC     A,B
            ADC     A,B
            ADC     A,C
            LD      (HL),H
            RET     NC
            DEC     C
            NOP     
            RET     NC
            LD      L,(HL)
            JR      C,L76F4             ; (-011H)
            DEC     E
            DEC     HL
            LD      H,A
            RST     010H
            LD      (L402B),A
            LD      H,B
            JR      NC,076A1H            ; (-06eH)
            JR      NC,076AEH            ; (-063H)
            LD      E,B
            RST     010H
            CCF     
            SBC     A,A
            LD      A,(04A50H)
            SUB     (HL)
            DEC     SP
            ADD     A,D
            ADD     A,B
            ADD     A,B
            NOP     
            NOP     
            NOP     
            LD      A,H
            LD      HL,(0AAAAH)
            XOR     E
            LD      (HL),A
            OR      (HL)
            DEC     BC
            LD      H,B
            OR      (HL)
            LD      (HL),C
            LD      D,B
            DEC     C
            NOP     
            RET     NC
            LD      L,E
            SUB     E
            JP      P,0BC7DH
            LD      H,H
            RRCA    
            HALT    
            RST     000H
L7738:      ADD     A,B
            LD      E,H
            RET     

L773B:      RES     4,L
            LD      B,(HL)
            LD      D,H
            LD      D,A
            CCF     
            SBC     A,A
            LD      A,(0AA7FH)
            XOR     D
            XOR     D
            XOR     E
            LD      A,(HL)
            LD      C,H
            CALL    Z,0CDCCH
            LD      A,(HL)
            SUB     D
            LD      C,C
            INC     H
            SUB     D
            LD      A,L
            LD      H,E
            ADC     A,(HL)
            JR      C,L773B             ; (-01cH)
            LD      A,L
            CP      D
            LD      L,08BH
            AND     E
            LD      A,L
            DEC     E
            ADC     A,C
            RET     C
            SBC     A,(HL)
            LD      A,L
            ADC     A,B
            ADC     A,B
            ADC     A,B
            ADC     A,C
            LD      A,H
            LD      (HL),B
            RET     P
            RET     P
            POP     AF
            LD      A,H
            RST     010H
            SUB     H
            DEC     (HL)
            PUSH    HL
            LD      A,H
            LD      B,E
            INC     C
            JR      NC,L7738            ; (-03dH)
            ADD     A,B
            LD      C,C
            RRCA    
            JP      C,011A2H
            NOP     
            NOP     
            CALL    0658EH
            JR      Z,L778A             ; (+008H)
            CALL    L61B7
            INC     DE
            JR      Z,L778A             ; (+002H)
            DEC     DE
            DEC     DE
L778A:      CALL    03A82H
            RET     

            LD      A,(06A65H)
            CP      002H
            JR      Z,L7798             ; (+003H)
            LD      A,(HL)
            OR      A
            RET     

L7798:      LD      A,(HL)
            INC     HL
            OR      (HL)
            DEC     HL
            RET     

            LD      DE,065B0H
            JR      L77A5               ; (+003H)

            LD      DE,065ABH
L77A5:      PUSH    BC
            CALL    05FE1H
            POP     BC
            RET     

            ADD     A,D
            LD      C,C
            RRCA    
            JP      C,L7BA2
            LD      C,0FAH
            DEC     (HL)
            INC     DE
            CP      040H
            JR      Z,L77C8             ; (+00fH)
            PUSH    HL
            CALL    L3D21
            CALL    000EAH
L77C0:      LD      E,A
            LD      D,000H
            POP     HL
            CALL    03A82H
            RET     

L77C8:      INC     HL
            PUSH    HL
            CALL    L3D21
            LD      A,(HL)
            JR      L77C0               ; (-010H)

            LD      A,(HL)
            OR      A
            JR      Z,L77DB             ; (+007H)
            INC     HL
            LD      A,(HL)
            DEC     HL
            BIT     7,A
            JR      Z,L77E6             ; (+00bH)
L77DB:      PUSH    HL
            LD      HL,L4193
            LD      (L6A1F),HL
            POP     HL
            XOR     A
            LD      R,A
L77E6:      PUSH    BC
            LD      DE,(06A1FH)
            LD      A,R
L77ED:      XOR     D
            RRC     A
            RRC     A
            RRC     A
            LD      D,A
            LD      A,R
            XOR     E
            RLC     A
            RLC     A
            LD      E,D
            LD      D,A
            LD      (06A1FH),DE
            PUSH    HL
            INC     HL
            RES     7,D
            LD      (HL),D
            INC     HL
            LD      (HL),E
            INC     HL
            LD      A,R
            LD      (HL),A
            POP     HL
            LD      (HL),081H
            CALL    L6295
            POP     BC
            RET     

            PUSH    BC
            LD      A,(HL)
            OR      A
            JP      Z,062E2H
            INC     HL
            LD      A,(HL)
            LD      (06A22H),A
            RES     7,(HL)
            DEC     HL
            LD      DE,L6887
            CALL    05FE1H
            PUSH    HL
            CALL    061C9H
            PUSH    DE
            CALL    03AB8H
            POP     HL
            CALL    L3C97
            PUSH    HL
            CALL    L3D21
            XOR     A
            CP      H
            JP      NZ,L20F5
            LD      A,L
            LD      (L6A21),A
            POP     DE
            POP     HL
            PUSH    HL
            CALL    L5DA6
            PUSH    DE
            PUSH    HL
            CALL    L3AB5
            POP     DE
            POP     HL
            CALL    L61C1
            EX      DE,HL
            XOR     A
            LD      B,008H
L7856:      PUSH    BC
            PUSH    AF
            CALL    L5E4A
            JR      C,L7864             ; (+007H)
            CALL    L5DA6
            POP     AF
            SET     7,A
            PUSH    AF
L7864:      POP     AF
            RLC     A
            EX      DE,HL
            PUSH    AF
            CALL    L61C1
            POP     AF
            EX      DE,HL
            POP     BC
            DJNZ    L7856               ; (-01bH)
            LD      (06A23H),A
            PUSH    DE
            LD      DE,0687DH
            LD      A,(06A65H)
            BIT     3,A
            JR      NZ,L7882            ; (+003H)
            LD      DE,06882H
L7882:      CALL    05FE1H
            POP     DE
            PUSH    DE
            CALL    03AB8H
            POP     HL
            LD      A,(06A65H)
            BIT     3,A
            JP      Z,06718H
            CALL    L61BC
            LD      DE,L3D72
            CALL    L5DAF
            CALL    L61C1
            POP     DE
            PUSH    DE
            CALL    05FE1H
            LD      DE,L3D72
            CALL    L61C1
            CALL    L5DAF
            CALL    L61BC
            POP     DE
            PUSH    DE
            CALL    05FE1H
            LD      DE,L6878
            CALL    05FE1H
            CALL    L61BC
            CALL    L629B
            CALL    L61C1
            POP     DE
            PUSH    DE
            CALL    05FE1H
            CALL    L629B
            POP     DE
            PUSH    DE
            CALL    05FE1H
            CALL    L629B
            EX      (SP),HL
            EX      DE,HL
            PUSH    DE
            CALL    L3AB5
            POP     HL
            LD      DE,L6828
            LD      A,(06A23H)
            LD      B,008H
L78E3:      RLC     A
            JR      NC,L78EE            ; (+007H)
            PUSH    AF
            PUSH    BC
            CALL    05FE1H
            POP     BC
            POP     AF
L78EE:      CALL    03AADH
            DJNZ    L78E3               ; (-010H)
            LD      A,(L6A21)
            ADD     A,(HL)
            JP      C,L20F5
            LD      (HL),A
            POP     DE
            CALL    05FE1H
            POP     BC
            LD      A,(06A22H)
            RLC     A
            RET     NC
            PUSH    BC
            PUSH    DE
            PUSH    HL
            CALL    03AB8H
            POP     DE
            PUSH    DE
            CALL    L3AB5
            POP     HL
            POP     DE
            CALL    L60CC
            POP     BC
            RET     

            POP     DE
            PUSH    DE
            CALL    05FE1H
            LD      A,(HL)
            OR      A
            JR      Z,L7924             ; (+003H)
            CALL    L61C1
L7924:      CALL    L5DAF
            JP      L66D1

            PUSH    BC
            CALL    L6736
            LD      DE,06819H
            CALL    05FE1H
            POP     BC
            RET     

            PUSH    BC
            INC     HL
            LD      A,(HL)
            RLC     A
            JP      C,L2101
            DEC     HL
            LD      A,(HL)
            OR      A
            JP      Z,L2101
            SUB     081H
            LD      (L6A24),A
            LD      (HL),081H
            XOR     A
            LD      B,008H
            LD      DE,L6828
L7951:      PUSH    BC
            PUSH    AF
            CALL    L5E4A
            JR      C,L7967             ; (+00fH)
            PUSH    HL
            LD      HL,00028H
            ADD     HL,DE
            EX      DE,HL
            EX      (SP),HL
            CALL    05FE1H
            POP     DE
            POP     AF
            SET     7,A
            PUSH    AF
L7967:      POP     AF
            RLC     A
            CALL    03AADH
            POP     BC
            DJNZ    L7951               ; (-01fH)
            LD      (06A12H),HL
            CALL    061C9H
            EX      DE,HL
            LD      E,A
            LD      D,000H
            CALL    03A82H
            LD      A,(HL)
            OR      A
            JR      Z,L7984             ; (+003H)
            SUB     008H
            LD      (HL),A
L7984:      LD      A,(L6A24)
            CP      080H
            JR      C,L798D             ; (+002H)
            NEG     
L798D:      PUSH    HL
            CALL    061C9H
            EX      DE,HL
            LD      (06A14H),HL
            LD      E,A
            LD      D,000H
            CALL    03A82H
            LD      A,(L6A24)
            AND     080H
            INC     HL
            OR      (HL)
            LD      (HL),A
            DEC     HL
            EX      DE,HL
            POP     HL
            CALL    L5DAF
            LD      A,(06A65H)
            LD      DE,L688C
            CP      005H
            JR      Z,L79B6             ; (+003H)
            LD      DE,0687DH
L79B6:      CALL    05FE1H
            PUSH    HL
            LD      DE,(06A14H)
            LD      HL,(06A12H)
            PUSH    HL
            PUSH    DE
            CALL    03AB8H
            POP     HL
            CALL    L629B
            EX      (SP),HL
            CALL    L5DA6
            POP     DE
            CALL    L60CC
            PUSH    DE
            CALL    03AB8H
            POP     HL
            PUSH    DE
            LD      E,L
            LD      D,H
            CALL    05FE1H
            POP     DE
            PUSH    HL
            PUSH    DE
            CALL    03AB8H
            POP     HL
            LD      DE,L6823
            CALL    L5DAF
            EX      DE,HL
            POP     HL
            CALL    05FE1H
            LD      DE,L3D72
            CALL    L61BC
            CALL    L5DAF
            CALL    L61C1
            EX      DE,HL
            LD      HL,(06A12H)
            CALL    05FE1H
            LD      DE,0681EH
            CALL    05FE1H
            POP     DE
            CALL    L5DAF
            POP     BC
            RET     

            CALL    L60CC
            PUSH    DE
            CALL    03CDAH
            POP     DE
            JP      05FE1H

            LD      A,A
            LD      E,(HL)
            LD      E,E
            RET     C
            XOR     C
            LD      A,A
            LD      C,H
            CALL    Z,0CDCCH
            ADD     A,C
            LD      D,L
            LD      D,L
            LD      D,L
            LD      D,(HL)
            ADD     A,C
            DEC     (HL)
            INC     B
            DI      
            INC     (HL)
            ADD     A,C
            JR      L7A67               ; (+037H)

            RET     P
            LD      D,D
            ADD     A,C
            DEC     BC
L7A34:      SUB     L
            POP     BC
            CALL    PO,00581H
            XOR     D
            JP      08168H

            LD      (BC),A
            CALL    09986H
            ADD     A,C
            LD      BC,0D164H
            CALL    P,00081H
            OR      C
            IN      D,(C)
            ADD     A,C
            NOP     
            LD      E,B
            RST     010H
            OUT     (080H),A
            DEC     (HL)
            INC     B
            DI      
            INC     (HL)
            ADD     A,B
            LD      D,A
            LD      B,H
            CALL    M,080CBH
            LD      L,D
            RET     NZ
            ADD     A,LSE8
            ADD     A,B
            LD      (HL),L
            DEC     H
            LD      A,L
            LD      D,080H
            LD      A,D
            ADD     A,E
L7A67:      OR      D
            CALL    C,L7D80
            LD      A,00CH
            DEC     C
            ADD     A,B
            LD      A,(HL)
            SBC     A,(HL)
            LD      DE,0805DH
            LD      A,A
            LD      C,(HL)
            BIT     3,D
            LD      A,D
            EX      AF,AF'
            ADC     A,B
            ADC     A,B
            ADC     A,C
            ADD     A,B
            LD      SP,L1772
            RET     M
            ADD     A,B
            LD      SP,L1772
            RET     M
            ADD     A,C
            JR      C,L7A34             ; (-056H)
            DEC     SP
            LD      HL,(03180H)
            LD      (HL),D
            RLA     
            RET     M
            XOR     A
            LD      (L38D9),A
            LD      (L38D8),A
            LD      (06A80H),A
            CALL    L352F
            CALL    L4B38
            LD      A,B
            OR      C
            JP      Z,L1876
            LD      (038E2H),BC
            LD      A,(DE)
            CP      020H
            JR      NZ,L7AB0            ; (+001H)
            INC     DE
L7AB0:      PUSH    AF
            LD      HL,L6AC1
            CALL    04795H
            PUSH    HL
            LD      HL,(038E2H)
            LD      E,L
            LD      D,H
            CALL    L6974
            POP     HL
            POP     AF
            OR      A
            JP      Z,0695CH
            LD      DE,L6AC1
            OR      A
            SBC     HL,DE
            LD      DE,00005H
            ADD     HL,DE
            PUSH    HL
            LD      BC,(038E2H)
            LD      HL,(06ABFH)
            JR      L7ADF               ; (+005H)

L7ADA:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            DEC     HL
            ADD     HL,DE
L7ADF:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            DEC     HL
            LD      A,D
            OR      E
            JR      Z,L7AF5             ; (+00eH)
            INC     HL
            INC     HL
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            EX      DE,HL
            SBC     HL,BC
            DEC     DE
            DEC     DE
            DEC     DE
            EX      DE,HL
            JR      C,L7ADA             ; (-01bH)
L7AF5:      POP     DE
            CALL    L68FB
            JR      L7B3D               ; (+042H)

            PUSH    HL
            LD      HL,(L6AB7)
            LD      C,L
            LD      B,H
            ADD     HL,DE
            JP      C,L20B9
            EX      DE,HL
            CALL    L58DF
            EX      DE,HL
            LD      (L6AB7),HL
            LD      (038D3H),HL
            LD      HL,(038DAH)
            ADD     HL,DE
            LD      (038DAH),HL
            LD      HL,(06AB3H)
            ADD     HL,DE
            LD      (06AB3H),HL
            LD      HL,(L6AB5)
            ADD     HL,DE
            LD      (L6AB5),HL
            POP     HL
            PUSH    DE
            EX      DE,HL
            LD      L,C
            LD      H,B
            LD      BC,(06AB7H)
L7B2E:      LD      A,(HL)
            LD      (BC),A
            PUSH    HL
            OR      A
            SBC     HL,DE
            POP     HL
            JR      Z,L7B3B             ; (+004H)
            DEC     HL
            DEC     BC
            JR      L7B2E               ; (-00dH)

L7B3B:      POP     BC
            RET     

L7B3D:      ADD     HL,BC
            PUSH    HL
            OR      A
            SBC     HL,DE
            EX      DE,HL
            LD      (HL),E
            INC     HL
            LD      (HL),D
            INC     HL
            LD      DE,(038E2H)
            LD      (HL),E
            INC     HL
            LD      (HL),D
            INC     HL
            EX      DE,HL
            LD      HL,L6AC1
            PUSH    BC
            DEC     BC
            DEC     BC
            DEC     BC
            DEC     BC
            LDIR    
            POP     BC
            POP     HL
            LD      A,(L38DF)
            OR      A
            JP      Z,L1876
            LD      DE,(038E4H)
            LD      HL,(038E2H)
            ADD     HL,DE
            LD      (038E2H),HL
            JP      NC,L1876
            JP      0189FH

            PUSH    AF
            PUSH    BC
            PUSH    HL
            PUSH    DE
            LD      C,L
            LD      B,H
            LD      HL,(06ABFH)
L7B7D:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            LD      A,E
            OR      D
            JR      NZ,L7B8D            ; (+008H)
L7B85:      POP     DE
            POP     HL
            POP     BC
            POP     AF
            RET     

L7B8A:      POP     DE
            JR      L7B85               ; (-008H)

L7B8D:      EX      DE,HL
            ADD     HL,DE
            DEC     HL
            DEC     HL
            EX      DE,HL
            PUSH    DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            EX      DE,HL
            LD      (L69A7),HL
            SBC     HL,BC
            POP     HL
            JR      C,L7B7D             ; (-022H)
            DEC     DE
            DEC     DE
            DEC     DE
L7BA2:      POP     BC
            PUSH    BC
            PUSH    DE
            PUSH    HL
            LD      HL,MONIT
            SBC     HL,BC
            POP     HL
            JR      Z,L7BCD             ; (+01fH)
            JR      NC,L7B8A            ; (-026H)
L7BB0:      LD      E,(HL)
            INC     HL
            LD      D,(HL)
            INC     HL
            LD      A,D
            OR      E
            JR      Z,L7BCB             ; (+013H)
            EX      DE,HL
            ADD     HL,DE
            EX      DE,HL
            DEC     DE
            DEC     DE
            PUSH    DE
            LD      E,(HL)
            INC     HL
            LD      D,(HL)
            EX      DE,HL
            SBC     HL,BC
            POP     HL
            JR      C,L7BB0             ; (-017H)
            JR      Z,L7BCD             ; (+004H)
            EX      DE,HL
            DEC     HL
L7BCB:      DEC     HL
            DEC     HL
L7BCD:      POP     DE
            PUSH    DE
            PUSH    HL
            OR      A
            SBC     HL,DE
            LD      C,L
            LD      B,H
            LD      HL,(06AB3H)
            OR      A
            SBC     HL,BC
            LD      (06AB3H),HL
            LD      HL,(038DAH)
            OR      A
            SBC     HL,BC
            LD      (038DAH),HL
            LD      HL,(L6AB5)
            OR      A
            SBC     HL,BC
            LD      (L6AB5),HL
            POP     HL
            POP     DE
            PUSH    BC
            PUSH    DE
            PUSH    DE
            PUSH    HL
            EX      DE,HL
            LD      HL,(L6AB7)
            OR      A
            SBC     HL,DE
            LD      C,L
            LD      B,H
            POP     HL
            POP     DE
            LDIR    
            EX      DE,HL
            LD      (L6AB7),HL
            POP     HL
            POP     BC
            JP      06985H

            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            NOP     
            SUB     E
            LD      B,C
            DS      68, 000H ; Zero/work area (158 bytes)
            DB      008H
            DS      89, 000H
            DB      0CFH                ; Splash screen / banner text
            DB      06BH
            DS      2, 00DH
            DB      020H
            DS      38, 0D8H
            DS      5, 020H
            DB      "BASIC INTERPRETER"
            DS      2, 020H
            DB      "1Z-013B V1.0A"
            DS      4, 020H
            DB      00DH
            DS      3, 020H
            DB      "COPYRIGHT (C) 1983 BY SHARP CORP."
            DS      5, 020H
            DS      38, 0C2H
            DB      020H,00DH," 36439 BYTES FR"
            DS      2, 045H
            DS      2, 00DH
            DB      000H

EXECSTART:  XOR     A                   ; Execution entry point
            LD      DE,MONIT
            CALL    TIMST
L7D80:      LD      HL,(DTEFG)
            LD      (L1254),HL
            LD      DE,MONIT
            LD      HL,06B79H
            OR      A
            SBC     HL,DE
            LD      C,L
            LD      B,H
            LD      HL,TAPECOPY
            OUT     (LSE0),A
            LDIR    
            JP      MONIT

            NOP     
            NOP     
            NOP     
            NOP     
            NOP    
BASICEND:
