Disassembly of Commodore LCD kernal

Note: main 'documentation' and description (including I/O memory layout, additional information, details, etc) page can be found here.

Click here to review the added comments.




; da65 V2.13.3 - (C) Copyright 2000-2009,  Ullrich von Bassewitz
; Created:    2014-01-21 00:08:01
; Input file: kizapr-u102.bin
; Page:       1


        .setcpu "65C02"

; ----------------------------------------------------------------------------
L004E           := $004E
L0081           := $0081
VidMemHi        := $00A0
CursorX         := $00A1
CursorY         := $00A2
CurMaxX_        := $00A4
CurMaxY_        := $00A6
StopKeyFlag     := $00AD
FNptr_lo        := $00AE
FNptr_hi        := $00AF
ST              := $00BA
VidPtrLo        := $00C1
VidPtrHi        := $00C2
LFS2ndAddr      := $00C4
LFSDevNum       := $00C5
LFSLogNum       := $00C6
stack           := $0100
L0300           := $0300
RAMVEC_IRQ      := $0314
RAMVEC_BRK      := $0316
RAMVEC_NMI      := $0318
RAMVEC_OPEN     := $031A
RAMVEC_CLOSE    := $031C
RAMVEC_CHKIN    := $031E
RAMVEC_CHKOUT   := $0320
RAMVEC_CLRCHN   := $0322
RAMVEC_CHRIN    := $0324
RAMVEC_CHROUT   := $0326
RAMVEC_STOP     := $0328
RAMVEC_GETIN    := $032A
RAMVEC_CLALL    := $032C
RAMVEC_WTF      := $032E
RAMVEC_LOAD     := $0330
RAMVEC_SAVE     := $0332
L0334           := $0334
L0336           := $0336
FROM_C669       := $0338
FROM_C672       := $0341
FROM_C67B       := $034A
L034D           := $034D
FROM_C684       := $0353
FROM_C68D       := $035C
L035F           := $035F
CurMaxY         := $037E
L0380           := $0380
CurMaxX         := $0381
KernMsg         := $0383
L0386           := $0386
FNlength        := $0387
TOD_60HZ        := $038F
TOD_SECS        := $0390
TOD_MINS        := $0391
TOD_HOURS       := $0392
MemBotLoByte    := $0398
MemBotHiByte    := $0399
MemTopLoByte    := $039A
MemTopHiByte    := $039B
L03AB           := $03AB
L03B7           := $03B7
L03C0           := $03C0
L0470           := $0470
L066A           := $066A
L0810           := $0810
L0A00           := $0A00
L11A0           := $11A0
L1F0C           := $1F0C
L2020           := $2020
L2E6A           := $2E6A
L42D0           := $42D0
L42E4           := $42E4
L4307           := $4307
L4825           := $4825
L4AF3           := $4AF3
L4D37           := $4D37
L4D39           := $4D39
L4DCA           := $4DCA
L4F4C           := $4F4C
L4F7F           := $4F7F
L5044           := $5044
L5061           := $5061
L509D           := $509D
L51D3           := $51D3
L51F0           := $51F0
L51F5           := $51F5
L53DE           := $53DE
L5595           := $5595
L5609           := $5609
L5653           := $5653
L5A79           := $5A79
L5A93           := $5A93
L5A9E           := $5A9E
L673E           := $673E
L6E6E           := $6E6E
L77CB           := $77CB
L77DD           := $77DD
L78C5           := $78C5
L792A           := $792A
L7944           := $7944
L7947           := $7947
L794A           := $794A
L794C           := $794C
L795A           := $795A
L7A73           := $7A73
L7D16           := $7D16
L7E6A           := $7E6A
; ----------------------------------------------------------------------------
; At offset 4: this bytes tells the number of Kbytes to be checked by the ROM
; checksum routine. I don't know the purpose of the other bytes though.
        .byte   $00,$00,$FF,$FF,$10,$DD,$DD,$DD ; 8000 00 00 FF FF 10 DD DD DD  ........
; ----------------------------------------------------------------------------
Commodore_LCD:
; Every ROM images begins with this "identification" string. This one is also
; used to compare with the searched ones by the ROM scanning routine.
        .byte   "Commodore LCD"                 ; 8008 43 6F 6D 6D 6F 64 6F 72  Commodor
                                                ; 8010 65 20 4C 43 44           e LCD
; ----------------------------------------------------------------------------
; Every ROMs contain a "directory" with the "applications" can be found (I
; guess). Besides the names, I know only maybe three bytes of the six
; (prefixed every name): the size of that entry, zero for no more entries.
; Two other bytes (last two bytes - a word - before the name itself) may
; encode the entry point of the given software. I don't know the purpose of
; other bytes.
        .byte   $11,$10,$20,$00,$38,$80,$4D,$4F ; 8015 11 10 20 00 38 80 4D 4F  .. .8.MO
        .byte   $4E,$49,$54,$4F,$52,$2E,$4D,$4F ; 801D 4E 49 54 4F 52 2E 4D 4F  NITOR.MO
        .byte   $4E,$11,$01,$20,$00,$4C,$80,$43 ; 8025 4E 11 01 20 00 4C 80 43  N.. .L.C
        .byte   $4F,$4D,$4D,$41,$4E,$44,$2E,$43 ; 802D 4F 4D 4D 41 4E 44 2E 43  OMMAND.C
        .byte   $4D,$44,$00                     ; 8035 4D 44 00                 MD.
; ----------------------------------------------------------------------------
; It seems to be the entry point of "MONITOR.MON".
        cpx     #$0E                            ; 8038 E0 0E                    ..
        bne     L8040                           ; 803A D0 04                    ..
        clc                                     ; 803C 18                       .
        jmp     L84FA                           ; 803D 4C FA 84                 L..
; ----------------------------------------------------------------------------
L8040:  cpx     #$06                            ; 8040 E0 06                    ..
        beq     L8049                           ; 8042 F0 05                    ..
        cpx     #$04                            ; 8044 E0 04                    ..
        beq     L8049                           ; 8046 F0 01                    ..
        rts                                     ; 8048 60                       `
; ----------------------------------------------------------------------------
L8049:  jmp     LC6DF                           ; 8049 4C DF C6                 L..
; ----------------------------------------------------------------------------
; It seems to be the entry point of "COMMAND.CMD".
        cpx     #$08                            ; 804C E0 08                    ..
        bne     L8066                           ; 804E D0 16                    ..
        lda     #$7E                            ; 8050 A9 7E                    .~
L8052:  ldx     #$01                            ; 8052 A2 01                    ..
        ldy     #$0E                            ; 8054 A0 0E                    ..
        jsr     SetLFS                          ; 8056 20 CF FC                  ..
        lda     $0423                           ; 8059 AD 23 04                 .#.
        ldx     #$24                            ; 805C A2 24                    .$
        ldy     #$04                            ; 805E A0 04                    ..
        jsr     SetNam                          ; 8060 20 D6 FC                  ..
        jsr     Open_                           ; 8063 20 DE FC                  ..
L8066:  rts                                     ; 8066 60                       `
; ----------------------------------------------------------------------------
L8067:  txa                                     ; 8067 8A                       .
        tay                                     ; 8068 A8                       .
        lda     #$FF                            ; 8069 A9 FF                    ..
L806B:  phy                                     ; 806B 5A                       Z
        ldx     #$00                            ; 806C A2 00                    ..
        phx                                     ; 806E DA                       .
        pha                                     ; 806F 48                       H
        phy                                     ; 8070 5A                       Z
        cld                                     ; 8071 D8                       .
        ldx     #$08                            ; 8072 A2 08                    ..
L8074:  stx     L03C0                           ; 8074 8E C0 03                 ...
L8077:  dec     L03C0                           ; 8077 CE C0 03                 ...
        ldx     L03C0                           ; 807A AE C0 03                 ...
        bpl     L8082                           ; 807D 10 03                    ..
        sec                                     ; 807F 38                       8
        bra     L80BB                           ; 8080 80 39                    .9
L8082:  lda     $0204                           ; 8082 AD 04 02                 ...
        and     PowersOfTwo,x                   ; 8085 3D 41 B0                 =A.
        beq     L8077                           ; 8088 F0 ED                    ..
        lda     ROM_MMU_values,x                ; 808A BD CB 82                 ...
        sta     MMU_KERN_WINDOW                 ; 808D 8D 00 FF                 ...
        lda     #$40                            ; 8090 A9 40                    .@
        sta     $DC                             ; 8092 85 DC                    ..
        stz     $DB                             ; 8094 64 DB                    d.
        lda     #$15                            ; 8096 A9 15                    ..
        .byte   $2C                             ; 8098 2C                       ,
L8099:  lda     ($DB)                           ; 8099 B2 DB                    ..
        clc                                     ; 809B 18                       .
        adc     $DB                             ; 809C 65 DB                    e.
        sta     $DB                             ; 809E 85 DB                    ..
        bcc     L80A4                           ; 80A0 90 02                    ..
        inc     $DC                             ; 80A2 E6 DC                    ..
L80A4:  lda     ($DB)                           ; 80A4 B2 DB                    ..
        beq     L8077                           ; 80A6 F0 CF                    ..
        tsx                                     ; 80A8 BA                       .
L80A9:  inc     stack+3,x                       ; 80A9 FE 03 01                 ...
        ldy     #$01                            ; 80AC A0 01                    ..
        lda     ($DB),y                         ; 80AE B1 DB                    ..
        and     stack+2,x                       ; 80B0 3D 02 01                 =..
        beq     L8099                           ; 80B3 F0 E4                    ..
        dec     stack+1,x                       ; 80B5 DE 01 01                 ...
        bne     L8099                           ; 80B8 D0 DF                    ..
        clc                                     ; 80BA 18                       .
L80BB:  ply                                     ; 80BB 7A                       z
        ply                                     ; 80BC 7A                       z
        plx                                     ; 80BD FA                       .
        ply                                     ; 80BE 7A                       z
        bcc     L80C3                           ; 80BF 90 02                    ..
        ldx     #$00                            ; 80C1 A2 00                    ..
L80C3:  cpx     #$00                            ; 80C3 E0 00                    ..
        rts                                     ; 80C5 60                       `
; ----------------------------------------------------------------------------
L80C6:  pha                                     ; 80C6 48                       H
        ldy     #$01                            ; 80C7 A0 01                    ..
        phy                                     ; 80C9 5A                       Z
L80CA:  ply                                     ; 80CA 7A                       z
        lda     #$07                            ; 80CB A9 07                    ..
        jsr     L806B                           ; 80CD 20 6B 80                  k.
        beq     L80DC                           ; 80D0 F0 0A                    ..
        pla                                     ; 80D2 68                       h
        pha                                     ; 80D3 48                       H
        phy                                     ; 80D4 5A                       Z
        ldy     #$03                            ; 80D5 A0 03                    ..
        eor     ($DB),y                         ; 80D7 51 DB                    Q.
        bne     L80CA                           ; 80D9 D0 EF                    ..
        ply                                     ; 80DB 7A                       z
L80DC:  ply                                     ; 80DC 7A                       z
        cpx     #$00                            ; 80DD E0 00                    ..
        rts                                     ; 80DF 60                       `
; ----------------------------------------------------------------------------
L80E0:  and     #$3F                            ; 80E0 29 3F                    )?
        sta     $03BC                           ; 80E2 8D BC 03                 ...
        ldx     #$04                            ; 80E5 A2 04                    ..
        jsr     LD230                           ; 80E7 20 30 D2                  0.
        stz     $03BD                           ; 80EA 9C BD 03                 ...
        lda     $03BC                           ; 80ED AD BC 03                 ...
        ldy     #$01                            ; 80F0 A0 01                    ..
        jsr     L806B                           ; 80F2 20 6B 80                  k.
        beq     L8148                           ; 80F5 F0 51                    .Q
        lda     #$05                            ; 80F7 A9 05                    ..
        sta     $03BF                           ; 80F9 8D BF 03                 ...
        ldx     #$07                            ; 80FC A2 07                    ..
        lda     $03BC                           ; 80FE AD BC 03                 ...
L8101:  cmp     PowersOfTwo,x                   ; 8101 DD 41 B0                 .A.
        beq     L810B                           ; 8104 F0 05                    ..
        dex                                     ; 8106 CA                       .
        bpl     L8101                           ; 8107 10 F8                    ..
        bra     L8115                           ; 8109 80 0A                    ..
L810B:  ldy     #$08                            ; 810B A0 08                    ..
        jsr     L806B                           ; 810D 20 6B 80                  k.
        bne     L8115                           ; 8110 D0 03                    ..
        inc     $03BF                           ; 8112 EE BF 03                 ...
L8115:  jsr     L815E                           ; 8115 20 5E 81                  ^.
L8118:  jsr     LB6DF                           ; 8118 20 DF B6                  ..
        ldx     #$09                            ; 811B A2 09                    ..
L811D:  cmp     L8154,x                         ; 811D DD 54 81                 .T.
        beq     L8127                           ; 8120 F0 05                    ..
        dex                                     ; 8122 CA                       .
        bpl     L811D                           ; 8123 10 F8                    ..
        bra     L8118                           ; 8125 80 F1                    ..
L8127:  txa                                     ; 8127 8A                       .
        cmp     #$07                            ; 8128 C9 07                    ..
        bcs     L8148                           ; 812A B0 1C                    ..
        cmp     #$06                            ; 812C C9 06                    ..
        bne     L813A                           ; 812E D0 0A                    ..
        cmp     $03BF                           ; 8130 CD BF 03                 ...
        beq     L813A                           ; 8133 F0 05                    ..
        jsr     L815E                           ; 8135 20 5E 81                  ^.
        bra     L8118                           ; 8138 80 DE                    ..
L813A:  clc                                     ; 813A 18                       .
        adc     $03BE                           ; 813B 6D BE 03                 m..
        tay                                     ; 813E A8                       .
        lda     $03BD                           ; 813F AD BD 03                 ...
        jsr     L806B                           ; 8142 20 6B 80                  k.
        beq     L8118                           ; 8145 F0 D1                    ..
        .byte   $2C                             ; 8147 2C                       ,
L8148:  ldx     #$00                            ; 8148 A2 00                    ..
        phx                                     ; 814A DA                       .
        pha                                     ; 814B 48                       H
        ldx     #$06                            ; 814C A2 06                    ..
        jsr     LD230                           ; 814E 20 30 D2                  0.
        pla                                     ; 8151 68                       h
        plx                                     ; 8152 FA                       .
        rts                                     ; 8153 60                       `
; ----------------------------------------------------------------------------
L8154:  .byte   $85,$89,$86,$8A,$87,$8B,$88,$8C ; 8154 85 89 86 8A 87 8B 88 8C  ........
        .byte   $0D,$8D                         ; 815C 0D 8D                    ..
; ----------------------------------------------------------------------------
L815E:  sec                                     ; 815E 38                       8
        cld                                     ; 815F D8                       .
        lda     $03BF                           ; 8160 AD BF 03                 ...
        adc     $03BE                           ; 8163 6D BE 03                 m..
        sta     $03BE                           ; 8166 8D BE 03                 ...
L8169:  ldy     $03BE                           ; 8169 AC BE 03                 ...
        lda     $03BD                           ; 816C AD BD 03                 ...
        jsr     L806B                           ; 816F 20 6B 80                  k.
        bne     L818A                           ; 8172 D0 16                    ..
        ldy     #$01                            ; 8174 A0 01                    ..
        sty     $03BE                           ; 8176 8C BE 03                 ...
L8179:  lda     $03BD                           ; 8179 AD BD 03                 ...
        asl     a                               ; 817C 0A                       .
        bne     L8180                           ; 817D D0 01                    ..
        inc     a                               ; 817F 1A                       .
L8180:  sta     $03BD                           ; 8180 8D BD 03                 ...
        bit     $03BC                           ; 8183 2C BC 03                 ,..
        beq     L8179                           ; 8186 F0 F1                    ..
        bra     L8169                           ; 8188 80 DF                    ..
L818A:  ldx     #$00                            ; 818A A2 00                    ..
L818C:  phx                                     ; 818C DA                       .
        phy                                     ; 818D 5A                       Z
        jsr     L81E0                           ; 818E 20 E0 81                  ..
        lda     #$D4                            ; 8191 A9 D4                    ..
        sta     $DB                             ; 8193 85 DB                    ..
        lda     #$81                            ; 8195 A9 81                    ..
        sta     $DC                             ; 8197 85 DC                    ..
        tsx                                     ; 8199 BA                       .
        lda     stack+2,x                       ; 819A BD 02 01                 ...
        ldy     #$07                            ; 819D A0 07                    ..
        cmp     #$07                            ; 819F C9 07                    ..
        beq     L81B8                           ; 81A1 F0 15                    ..
        ldy     #$00                            ; 81A3 A0 00                    ..
        dec     a                               ; 81A5 3A                       :
        cmp     $03BF                           ; 81A6 CD BF 03                 ...
        beq     L81B8                           ; 81A9 F0 0D                    ..
        ldy     stack+1,x                       ; 81AB BC 01 01                 ...
        lda     $03BD                           ; 81AE AD BD 03                 ...
        jsr     L806B                           ; 81B1 20 6B 80                  k.
        beq     L81C5                           ; 81B4 F0 0F                    ..
        ldy     #$06                            ; 81B6 A0 06                    ..
L81B8:  lda     ($DB),y                         ; 81B8 B1 DB                    ..
        cmp     #$2E                            ; 81BA C9 2E                    ..
        beq     L81C5                           ; 81BC F0 07                    ..
        clc                                     ; 81BE 18                       .
        jsr     LB6F9                           ; 81BF 20 F9 B6                  ..
        iny                                     ; 81C2 C8                       .
        bra     L81B8                           ; 81C3 80 F3                    ..
L81C5:  lda     #$0D                            ; 81C5 A9 0D                    ..
        clc                                     ; 81C7 18                       .
        jsr     LB6F9                           ; 81C8 20 F9 B6                  ..
        ply                                     ; 81CB 7A                       z
        plx                                     ; 81CC FA                       .
        iny                                     ; 81CD C8                       .
        inx                                     ; 81CE E8                       .
        cpx     #$08                            ; 81CF E0 08                    ..
        bne     L818C                           ; 81D1 D0 B9                    ..
        rts                                     ; 81D3 60                       `
; ----------------------------------------------------------------------------
        .byte   "<MORE>.EXIT."                  ; 81D4 3C 4D 4F 52 45 3E 2E 45  <MORE>.E
                                                ; 81DC 58 49 54 2E              XIT.
; ----------------------------------------------------------------------------
L81E0:  ldy     L81F3,x                         ; 81E0 BC F3 81                 ...
        ldx     $039C                           ; 81E3 AE 9C 03                 ...
        lda     #$89                            ; 81E6 A9 89                    ..
        sec                                     ; 81E8 38                       8
        jsr     LB6F9                           ; 81E9 20 F9 B6                  ..
        lda     #$67                            ; 81EC A9 67                    .g
        ldy     #$09                            ; 81EE A0 09                    ..
        sta     ($BD),y                         ; 81F0 91 BD                    ..
        rts                                     ; 81F2 60                       `
; ----------------------------------------------------------------------------
L81F3:  .byte   $00,$0A,$14,$1E                 ; 81F3 00 0A 14 1E              ....
L81F7:  .byte   $28,$32,$3C,$46                 ; 81F7 28 32 3C 46              (2<F
; ----------------------------------------------------------------------------
L81FB:  stz     $0450                           ; 81FB 9C 50 04                 .P.
        jsr     L806B                           ; 81FE 20 6B 80                  k.
        beq     L821C                           ; 8201 F0 19                    ..
        phx                                     ; 8203 DA                       .
        pha                                     ; 8204 48                       H
        phy                                     ; 8205 5A                       Z
        ldx     #$00                            ; 8206 A2 00                    ..
        ldy     #$06                            ; 8208 A0 06                    ..
L820A:  lda     ($DB),y                         ; 820A B1 DB                    ..
        sta     $0450,x                         ; 820C 9D 50 04                 .P.
        inx                                     ; 820F E8                       .
        iny                                     ; 8210 C8                       .
        tya                                     ; 8211 98                       .
        cmp     ($DB)                           ; 8212 D2 DB                    ..
        bne     L820A                           ; 8214 D0 F4                    ..
        stz     $0450,x                         ; 8216 9E 50 04                 .P.
        ply                                     ; 8219 7A                       z
        pla                                     ; 821A 68                       h
        plx                                     ; 821B FA                       .
L821C:  rts                                     ; 821C 60                       `
; ----------------------------------------------------------------------------
L821D:  lda     #$AE                            ; 821D A9 AE                    ..
        sta     $034E                           ; 821F 8D 4E 03                 .N.
        ldx     FNlength                        ; 8222 AE 87 03                 ...
        beq     L826E                           ; 8225 F0 47                    .G
        ldy     #$01                            ; 8227 A0 01                    ..
L8229:  lda     #$7F                            ; 8229 A9 7F                    ..
        jsr     L806B                           ; 822B 20 6B 80                  k.
        beq     L826E                           ; 822E F0 3E                    .>
        pha                                     ; 8230 48                       H
        phx                                     ; 8231 DA                       .
        phy                                     ; 8232 5A                       Z
        ldx     FNlength                        ; 8233 AE 87 03                 ...
        beq     L826E                           ; 8236 F0 36                    .6
        lda     ($DB)                           ; 8238 B2 DB                    ..
        tay                                     ; 823A A8                       .
L823B:  dey                                     ; 823B 88                       .
        dex                                     ; 823C CA                       .
        bmi     L824D                           ; 823D 30 0E                    0.
        jsr     L826F                           ; 823F 20 6F 82                  o.
        cmp     ($DB),y                         ; 8242 D1 DB                    ..
        bne     L824D                           ; 8244 D0 07                    ..
        cmp     #$2E                            ; 8246 C9 2E                    ..
        bne     L823B                           ; 8248 D0 F1                    ..
        clc                                     ; 824A 18                       .
        bra     L826B                           ; 824B 80 1E                    ..
L824D:  ldy     #$06                            ; 824D A0 06                    ..
        ldx     #$00                            ; 824F A2 00                    ..
L8251:  jsr     L826F                           ; 8251 20 6F 82                  o.
        cmp     ($DB),y                         ; 8254 D1 DB                    ..
        bne     L8265                           ; 8256 D0 0D                    ..
        inx                                     ; 8258 E8                       .
        iny                                     ; 8259 C8                       .
        cpx     FNlength                        ; 825A EC 87 03                 ...
        bne     L8251                           ; 825D D0 F2                    ..
        lda     ($DB),y                         ; 825F B1 DB                    ..
        cmp     #$2E                            ; 8261 C9 2E                    ..
        beq     L826B                           ; 8263 F0 06                    ..
L8265:  ply                                     ; 8265 7A                       z
        plx                                     ; 8266 FA                       .
        pla                                     ; 8267 68                       h
        iny                                     ; 8268 C8                       .
        bra     L8229                           ; 8269 80 BE                    ..
L826B:  ply                                     ; 826B 7A                       z
        plx                                     ; 826C FA                       .
        pla                                     ; 826D 68                       h
L826E:  rts                                     ; 826E 60                       `
; ----------------------------------------------------------------------------
L826F:  phy                                     ; 826F 5A                       Z
        txa                                     ; 8270 8A                       .
        tay                                     ; 8271 A8                       .
        jsr     FROM_C67B                       ; 8272 20 4A 03                  J.
        ply                                     ; 8275 7A                       z
        rts                                     ; 8276 60                       `
; ----------------------------------------------------------------------------
; Interesting, though I don't know the purpose of the given ZP locations. It
; seems, $FD00, $FD80, $FE00, $FE80 are used some kind of MMU purpose, based
; on value CMP'd with constants which suggests memory is devided into parts
; (high byte only): $00-$3F, $40-$7F, $80-$BF, $C0-$F7, $F8-$FF.
L8277:  sei                                     ; 8277 78                       x
        phx                                     ; 8278 DA                       .
        ldx     L03C0                           ; 8279 AE C0 03                 ...
        lda     ROM_MMU_values,x                ; 827C BD CB 82                 ...
        clc                                     ; 827F 18                       .
        adc     #$10                            ; 8280 69 10                    i.
        ldy     #$02                            ; 8282 A0 02                    ..
        sec                                     ; 8284 38                       8
        sbc     ($DB),y                         ; 8285 F1 DB                    ..
        tax                                     ; 8287 AA                       .
        ldy     #$05                            ; 8288 A0 05                    ..
        lda     ($DB),y                         ; 828A B1 DB                    ..
        cmp     #$F8                            ; 828C C9 F8                    ..
        bcs     L82B1                           ; 828E B0 21                    .!
        stz     MMU_APPL_WINDOW1                ; 8290 9C 00 FD                 ...
        stz     MMU_APPL_WINDOW2                ; 8293 9C 80 FD                 ...
        stz     MMU_APPL_WINDOW3                ; 8296 9C 00 FE                 ...
        cmp     #$C0                            ; 8299 C9 C0                    ..
        bcs     L82AE                           ; 829B B0 11                    ..
        cmp     #$80                            ; 829D C9 80                    ..
        bcs     L82AB                           ; 829F B0 0A                    ..
        cmp     #$40                            ; 82A1 C9 40                    .@
        bcs     L82A8                           ; 82A3 B0 03                    ..
        stx     MMU_APPL_WINDOW1                ; 82A5 8E 00 FD                 ...
L82A8:  stx     MMU_APPL_WINDOW2                ; 82A8 8E 80 FD                 ...
L82AB:  stx     MMU_APPL_WINDOW3                ; 82AB 8E 00 FE                 ...
L82AE:  stx     MMU_APPL_WINDOW4                ; 82AE 8E 80 FE                 ...
L82B1:  pha                                     ; 82B1 48                       H
        dey                                     ; 82B2 88                       .
        lda     ($DB),y                         ; 82B3 B1 DB                    ..
        ply                                     ; 82B5 7A                       z
        cmp     #$00                            ; 82B6 C9 00                    ..
        bne     L82BB                           ; 82B8 D0 01                    ..
        dey                                     ; 82BA 88                       .
L82BB:  dec     a                               ; 82BB 3A                       :
        plx                                     ; 82BC FA                       .
        rts                                     ; 82BD 60                       `
; ----------------------------------------------------------------------------
L82BE:  jsr     ScanROMs                        ; 82BE 20 D3 82                  ..
        sta     $0204                           ; 82C1 8D 04 02                 ...
        stx     $0205                           ; 82C4 8E 05 02                 ...
        sty     $0206                           ; 82C7 8C 06 02                 ...
        rts                                     ; 82CA 60                       `
; ----------------------------------------------------------------------------
ROM_MMU_values:
; The 'ScanROMs' routine uses this table to write values to $FF00 to check
; for ROMs.
        .byte   $70,$80,$90,$A0,$B0,$C0,$D0,$E0 ; 82CB 70 80 90 A0 B0 C0 D0 E0  p.......
; ----------------------------------------------------------------------------
ScanROMs:
; This routine seems to scan ROMs, searching for the "Commodore LCD" string.
; This is done by using register at $FF00 which seems to tell the memory
; mapping at CPU address $4000. So I think $FF00 tells what is mapped to
; $4000.
        lda     #$00                            ; 82D3 A9 00                    ..
        pha                                     ; 82D5 48                       H
        pha                                     ; 82D6 48                       H
        pha                                     ; 82D7 48                       H
        ldy     #$07                            ; 82D8 A0 07                    ..
L82DA:  lda     ROM_MMU_values,y                ; 82DA B9 CB 82                 ...
        sta     MMU_KERN_WINDOW                 ; 82DD 8D 00 FF                 ...
        phy                                     ; 82E0 5A                       Z
        ldx     #$0C                            ; 82E1 A2 0C                    ..
L82E3:  lda     $4008,x                         ; 82E3 BD 08 40                 ..@
        cmp     Commodore_LCD,x                 ; 82E6 DD 08 80                 ...
        bne     L8315                           ; 82E9 D0 2A                    .*
        dex                                     ; 82EB CA                       .
        bpl     L82E3                           ; 82EC 10 F5                    ..
        ply                                     ; 82EE 7A                       z
        phy                                     ; 82EF 5A                       Z
        lda     ROM_MMU_values,y                ; 82F0 B9 CB 82                 ...
; $4004 is the paged-in ROM, where the id string would be ($FF00 controls
; what can you see from $4000), it's compared with the kernal's image's id
; string ("Commodore LCD").
        ldx     $4004                           ; 82F3 AE 04 40                 ..@
        pha                                     ; 82F6 48                       H
        jsr     RomCheckSum                     ; 82F7 20 67 83                  g.
        ply                                     ; 82FA 7A                       z
        sty     MMU_KERN_WINDOW                 ; 82FB 8C 00 FF                 ...
L82FE:  phx                                     ; 82FE DA                       .
        tsx                                     ; 82FF BA                       .
        clc                                     ; 8300 18                       .
        adc     stack+4,x                       ; 8301 7D 04 01                 }..
        sta     stack+4,x                       ; 8304 9D 04 01                 ...
; Hmm, it seems to be a bug for me, it should be 'pla', otherwise X is messed
; up to be used to address byte on the stack.
        plx                                     ; 8307 FA                       .
        adc     stack+5,x                       ; 8308 7D 05 01                 }..
        sta     stack+5,x                       ; 830B 9D 05 01                 ...
        ply                                     ; 830E 7A                       z
        phy                                     ; 830F 5A                       Z
        jsr     PrintRomSumChkByPassed          ; 8310 20 2F 83                  /.
        sec                                     ; 8313 38                       8
        .byte   $24                             ; 8314 24                       $
L8315:  clc                                     ; 8315 18                       .
        ply                                     ; 8316 7A                       z
        tsx                                     ; 8317 BA                       .
        rol     stack+1,x                       ; 8318 3E 01 01                 >..
        dey                                     ; 831B 88                       .
        bpl     L82DA                           ; 831C 10 BC                    ..
        pla                                     ; 831E 68                       h
        ply                                     ; 831F 7A                       z
        plx                                     ; 8320 FA                       .
        cmp     $0204                           ; 8321 CD 04 02                 ...
        bne     L832E                           ; 8324 D0 08                    ..
        cpx     $0205                           ; 8326 EC 05 02                 ...
        bne     L832E                           ; 8329 D0 03                    ..
        cpy     $0206                           ; 832B CC 06 02                 ...
L832E:  rts                                     ; 832E 60                       `
; ----------------------------------------------------------------------------
PrintRomSumChkByPassed:
; Push Y onto the stack. Write "ROMSUM ...." text, then take the value from
; the stack, "covert" into an ASCII number (ORA), and print it, followed by
; the " INSTALLED" text.
        phy                                     ; 832F 5A                       Z
        jsr     ShowInLineText                  ; 8330 20 5B FB                  [.
        .byte   "ROMSUM CHECK BYPASSED, ROM #"  ; 8333 52 4F 4D 53 55 4D 20 43  ROMSUM C
                                                ; 833B 48 45 43 4B 20 42 59 50  HECK BYP
                                                ; 8343 41 53 53 45 44 2C 20 52  ASSED, R
                                                ; 834B 4F 4D 20 23              OM #
        .byte   $00                             ; 834F 00                       .
; ----------------------------------------------------------------------------
        pla                                     ; 8350 68                       h
        ora     #$30                            ; 8351 09 30                    .0
        jsr     ShowChar_                       ; 8353 20 B3 AB                  ..
        jsr     ShowInLineText                  ; 8356 20 5B FB                  [.
        .byte   "  INSTALLED"                   ; 8359 20 20 49 4E 53 54 41 4C    INSTAL
                                                ; 8361 4C 45 44                 LED
        .byte   $0D,$00                         ; 8364 0D 00                    ..
; ----------------------------------------------------------------------------
        rts                                     ; 8366 60                       `
; ----------------------------------------------------------------------------
RomCheckSum:
; Creates checksum on ROMs.
; Input:
;        A = value of $FF00 reg to start at
;        X = number of Kbytes to check
; Output:
;        X/A = 16 bit checksum (simple addition, X is the high byte)
        sta     $03C2                           ; 8367 8D C2 03                 ...
        stx     $03C1                           ; 836A 8E C1 03                 ...
        lda     #$00                            ; 836D A9 00                    ..
        tax                                     ; 836F AA                       .
        cld                                     ; 8370 D8                       .
L8371:  ldy     $03C2                           ; 8371 AC C2 03                 ...
        sty     MMU_KERN_WINDOW                 ; 8374 8C 00 FF                 ...
        ldy     #$00                            ; 8377 A0 00                    ..
        clc                                     ; 8379 18                       .
L837A:  adc     $4000,y                         ; 837A 79 00 40                 y.@
        bcc     L8381                           ; 837D 90 02                    ..
        clc                                     ; 837F 18                       .
        inx                                     ; 8380 E8                       .
L8381:  adc     $4100,y                         ; 8381 79 00 41                 y.A
        bcc     L8388                           ; 8384 90 02                    ..
        clc                                     ; 8386 18                       .
        inx                                     ; 8387 E8                       .
L8388:  adc     $4200,y                         ; 8388 79 00 42                 y.B
        bcc     L838F                           ; 838B 90 02                    ..
        clc                                     ; 838D 18                       .
        inx                                     ; 838E E8                       .
L838F:  adc     $4300,y                         ; 838F 79 00 43                 y.C
        bcc     L8396                           ; 8392 90 02                    ..
        clc                                     ; 8394 18                       .
        inx                                     ; 8395 E8                       .
L8396:  iny                                     ; 8396 C8                       .
        bne     L837A                           ; 8397 D0 E1                    ..
        inc     $03C2                           ; 8399 EE C2 03                 ...
        dec     $03C1                           ; 839C CE C1 03                 ...
        bne     L8371                           ; 839F D0 D0                    ..
        rts                                     ; 83A1 60                       `
; ----------------------------------------------------------------------------
L83A2:  lda     $DD                             ; 83A2 A5 DD                    ..
        ldx     $DE                             ; 83A4 A6 DE                    ..
        ldy     $DF                             ; 83A6 A4 DF                    ..
        pha                                     ; 83A8 48                       H
        phx                                     ; 83A9 DA                       .
        phy                                     ; 83AA 5A                       Z
        lda     #$0F                            ; 83AB A9 0F                    ..
        sta     $DE                             ; 83AD 85 DE                    ..
        lda     #$00                            ; 83AF A9 00                    ..
        sta     $DD                             ; 83B1 85 DD                    ..
        sta     $DF                             ; 83B3 85 DF                    ..
        pha                                     ; 83B5 48                       H
        pha                                     ; 83B6 48                       H
        tay                                     ; 83B7 A8                       .
        tsx                                     ; 83B8 BA                       .
        cld                                     ; 83B9 D8                       .
L83BA:  clc                                     ; 83BA 18                       .
        adc     ($DD),y                         ; 83BB 71 DD                    q.
        bcc     L83C7                           ; 83BD 90 08                    ..
        inc     stack+1,x                       ; 83BF FE 01 01                 ...
        bne     L83C7                           ; 83C2 D0 03                    ..
        inc     stack+2,x                       ; 83C4 FE 02 01                 ...
L83C7:  iny                                     ; 83C7 C8                       .
        bne     L83BA                           ; 83C8 D0 F0                    ..
        dec     $DE                             ; 83CA C6 DE                    ..
        dec     $DE                             ; 83CC C6 DE                    ..
        beq     L83BA                           ; 83CE F0 EA                    ..
        inc     $DE                             ; 83D0 E6 DE                    ..
        bpl     L83BA                           ; 83D2 10 E6                    ..
        plx                                     ; 83D4 FA                       .
        ply                                     ; 83D5 7A                       z
        sta     $DD                             ; 83D6 85 DD                    ..
        stx     $DE                             ; 83D8 86 DE                    ..
        sty     $DF                             ; 83DA 84 DF                    ..
        ply                                     ; 83DC 7A                       z
        plx                                     ; 83DD FA                       .
        pla                                     ; 83DE 68                       h
        cmp     $DD                             ; 83DF C5 DD                    ..
        bne     L83EB                           ; 83E1 D0 08                    ..
        cpx     $DE                             ; 83E3 E4 DE                    ..
        bne     L83EB                           ; 83E5 D0 04                    ..
        cpy     $DF                             ; 83E7 C4 DF                    ..
        beq     L83EC                           ; 83E9 F0 01                    ..
L83EB:  clc                                     ; 83EB 18                       .
L83EC:  rts                                     ; 83EC 60                       `
; ----------------------------------------------------------------------------
L83ED:  lda     #$02                            ; 83ED A9 02                    ..
        .byte   $2C                             ; 83EF 2C                       ,
L83F0:  lda     #$00                            ; 83F0 A9 00                    ..
        bit     $10A9                           ; 83F2 2C A9 10                 ,..
        ldx     #$01                            ; 83F5 A2 01                    ..
L83F7:  phx                                     ; 83F7 DA                       .
        pha                                     ; 83F8 48                       H
        jsr     L840F                           ; 83F9 20 0F 84                  ..
        bcs     L8407                           ; 83FC B0 09                    ..
        jsr     KL_RESTOR                       ; 83FE 20 96 C6                  ..
        plx                                     ; 8401 FA                       .
        phx                                     ; 8402 DA                       .
        jsr     L8420                           ; 8403 20 20 84                   .
        clc                                     ; 8406 18                       .
L8407:  pla                                     ; 8407 68                       h
        plx                                     ; 8408 FA                       .
        inx                                     ; 8409 E8                       .
        bcc     L83F7                           ; 840A 90 EB                    ..
        jmp     KL_RESTOR                       ; 840C 4C 96 C6                 L..
; ----------------------------------------------------------------------------
L840F:  jsr     L8067                           ; 840F 20 67 80                  g.
        beq     L841C                           ; 8412 F0 08                    ..
        bit     #$C0                            ; 8414 89 C0                    ..
        bne     L841C                           ; 8416 D0 04                    ..
        ldy     #$01                            ; 8418 A0 01                    ..
        clc                                     ; 841A 18                       .
        rts                                     ; 841B 60                       `
; ----------------------------------------------------------------------------
L841C:  sec                                     ; 841C 38                       8
        bit     #$00                            ; 841D 89 00                    ..
        rts                                     ; 841F 60                       `
; ----------------------------------------------------------------------------
L8420:  jsr     L8277                           ; 8420 20 77 82                  w.
        jmp     LFA67                           ; 8423 4C 67 FA                 Lg.
; ----------------------------------------------------------------------------
L8426:  stz     $0202                           ; 8426 9C 02 02                 ...
        ldx     $0203                           ; 8429 AE 03 02                 ...
        stx     $0200                           ; 842C 8E 00 02                 ...
        stz     $0203                           ; 842F 9C 03 02                 ...
L8433           := * + 1
        jsr     L840F                           ; 8432 20 0F 84                  ..
        bcc     L843A                           ; 8435 90 03                    ..
        jmp     L843F                           ; 8437 4C 3F 84                 L?.
; ----------------------------------------------------------------------------
L843A:  ldx     #$0A                            ; 843A A2 0A                    ..
        jsr     L8420                           ; 843C 20 20 84                   .
L843F:  jsr     L8685                           ; 843F 20 85 86                  ..
        lda     #$20                            ; 8442 A9 20                    .
        ldy     #$01                            ; 8444 A0 01                    ..
        jsr     L806B                           ; 8446 20 6B 80                  k.
        clc                                     ; 8449 18                       .
        jsr     L8459                           ; 844A 20 59 84                  Y.
        ldy     #$01                            ; 844D A0 01                    ..
        lda     #$10                            ; 844F A9 10                    ..
        jsr     L806B                           ; 8451 20 6B 80                  k.
        clc                                     ; 8454 18                       .
        jsr     L8459                           ; 8455 20 59 84                  Y.
        brk                                     ; 8458 00                       .
L8459:  ldy     $0202                           ; 8459 AC 02 02                 ...
        bne     L843F                           ; 845C D0 E1                    ..
        bcc     L8472                           ; 845E 90 12                    ..
        jsr     L840F                           ; 8460 20 0F 84                  ..
        beq     L84C3                           ; 8463 F0 5E                    .^
        bit     #$12                            ; 8465 89 12                    ..
        beq     L84C3                           ; 8467 F0 5A                    .Z
        ldy     $0200                           ; 8469 AC 00 02                 ...
        sty     $0203                           ; 846C 8C 03 02                 ...
        stz     $0200                           ; 846F 9C 00 02                 ...
L8472:  jsr     L840F                           ; 8472 20 0F 84                  ..
        beq     L84C3                           ; 8475 F0 4C                    .L
        bit     #$01                            ; 8477 89 01                    ..
        bne     L849B                           ; 8479 D0 20                    .
        bit     #$12                            ; 847B 89 12                    ..
        bne     L8482                           ; 847D D0 03                    ..
        stz     $0203                           ; 847F 9C 03 02                 ...
L8482:  sta     $0201                           ; 8482 8D 01 02                 ...
        stx     $0200                           ; 8485 8E 00 02                 ...
        sei                                     ; 8488 78                       x
        jsr     KL_RESTOR                       ; 8489 20 96 C6                  ..
        ldx     #$04                            ; 848C A2 04                    ..
        lda     $0203                           ; 848E AD 03 02                 ...
        beq     L8495                           ; 8491 F0 02                    ..
        ldx     #$06                            ; 8493 A2 06                    ..
L8495:  jsr     L8420                           ; 8495 20 20 84                   .
        jmp     L8426                           ; 8498 4C 26 84                 L&.
; ----------------------------------------------------------------------------
L849B:  stx     $0202                           ; 849B 8E 02 02                 ...
        php                                     ; 849E 08                       .
        sei                                     ; 849F 78                       x
        jsr     LC6CB                           ; 84A0 20 CB C6                  ..
        jsr     KL_RESTOR                       ; 84A3 20 96 C6                  ..
        ldx     #$08                            ; 84A6 A2 08                    ..
        jsr     L8420                           ; 84A8 20 20 84                   .
        sei                                     ; 84AB 78                       x
        jsr     LC6CB                           ; 84AC 20 CB C6                  ..
        .byte   $9C                             ; 84AF 9C                       .
L84B0:  .byte   $02                             ; 84B0 02                       .
        .byte   $02                             ; 84B1 02                       .
        ldx     $0200                           ; 84B2 AE 00 02                 ...
        jsr     L840F                           ; 84B5 20 0F 84                  ..
        beq     L84C0                           ; 84B8 F0 06                    ..
        jsr     L8277                           ; 84BA 20 77 82                  w.
        plp                                     ; 84BD 28                       (
        sec                                     ; 84BE 38                       8
        rts                                     ; 84BF 60                       `
; ----------------------------------------------------------------------------
L84C0:  jmp     L8426                           ; 84C0 4C 26 84                 L&.
; ----------------------------------------------------------------------------
L84C3:  clc                                     ; 84C3 18                       .
        rts                                     ; 84C4 60                       `
; ----------------------------------------------------------------------------
L84C5:  php                                     ; 84C5 08                       .
        sei                                     ; 84C6 78                       x
        ldx     $0202                           ; 84C7 AE 02 02                 ...
        beq     L84DA                           ; 84CA F0 0E                    ..
        jsr     LC6CB                           ; 84CC 20 CB C6                  ..
        .byte   $20                             ; 84CF 20
L84D0:  sbc     $2084                           ; 84D0 ED 84 20                 ..
        .byte   $CB                             ; 84D3 CB                       .
        dec     FNptr_lo                        ; 84D4 C6 AE                    ..
        .byte   $02                             ; 84D6 02                       .
        .byte   $02                             ; 84D7 02                       .
        bra     L84E0                           ; 84D8 80 06                    ..
L84DA:  jsr     L84ED                           ; 84DA 20 ED 84                  ..
        ldx     $0200                           ; 84DD AE 00 02                 ...
L84E0:  jsr     L840F                           ; 84E0 20 0F 84                  ..
        beq     L84EA                           ; 84E3 F0 05                    ..
        jsr     L8277                           ; 84E5 20 77 82                  w.
        plp                                     ; 84E8 28                       (
        rts                                     ; 84E9 60                       `
; ----------------------------------------------------------------------------
L84EA:  jmp     L843F                           ; 84EA 4C 3F 84                 L?.
; ----------------------------------------------------------------------------
L84ED:  ldx     $0200                           ; 84ED AE 00 02                 ...
        jsr     L840F                           ; 84F0 20 0F 84                  ..
        beq     L84FA                           ; 84F3 F0 05                    ..
        ldx     #$0E                            ; 84F5 A2 0E                    ..
        jmp     L8420                           ; 84F7 4C 20 84                 L .
; ----------------------------------------------------------------------------
; This seems to be the "shutdown" function or part of it: "state" should be
; saved (which is checked on next reset to see it was a clean shutdown) and
; then it used /POWEROFF line to actually switch the power off (the RAM is
; still powered at least on CLCD!)
L84FA:  sec                                     ; 84FA 38                       8
L84FB:  php                                     ; 84FB 08                       .
        sei                                     ; 84FC 78                       x
        php                                     ; 84FD 08                       .
        ldx     #$00                            ; 84FE A2 00                    ..
L8500:  phx                                     ; 8500 DA                       .
        jsr     LFCF1                           ; 8501 20 F1 FC                  ..
        plx                                     ; 8504 FA                       .
        dex                                     ; 8505 CA                       .
        bpl     L8500                           ; 8506 10 F8                    ..
        plp                                     ; 8508 28                       (
        bcs     L8510                           ; 8509 B0 05                    ..
        tsx                                     ; 850B BA                       .
        cpx     #$20                            ; 850C E0 20                    .
        bcs     L8516                           ; 850E B0 06                    ..
L8510:  ldx     #$FF                            ; 8510 A2 FF                    ..
        tsx                                     ; 8512 BA                       .
        jsr     L8685                           ; 8513 20 85 86                  ..
L8516:  jsr     L889A                           ; 8516 20 9A 88                  ..
        jsr     L83ED                           ; 8519 20 ED 83                  ..
        jsr     L8644                           ; 851C 20 44 86                  D.
        jsr     L86E9                           ; 851F 20 E9 86                  ..
        sei                                     ; 8522 78                       x
        tsx                                     ; 8523 BA                       .
        stx     $0207                           ; 8524 8E 07 02                 ...
        jsr     L83A2                           ; 8527 20 A2 83                  ..
; Release /POWERON signal, machine will switch off. Run the endless BRA if it
; needs some cycle to happen or some kind of odd problem makes it impossible
; to power off actually.
        lda     #$04                            ; 852A A9 04                    ..
        tsb     VIA1_PORTB                      ; 852C 0C 00 F8                 ...
        trb     VIA1_DDRB                       ; 852F 1C 02 F8                 ...
L8532:  bra     L8532                           ; 8532 80 FE                    ..
KL_RESET:
; *************************************
; Start of the real RESET routine after
; MMU set up.
; *************************************
        sei                                     ; 8534 78                       x
; As soon as possible set /POWERON signal to low (low-active signal)
; configure DDR bit as well.
        lda     #$04                            ; 8535 A9 04                    ..
        tsb     VIA1_DDRB                       ; 8537 0C 02 F8                 ...
        trb     VIA1_PORTB                      ; 853A 1C 00 F8                 ...
        ldx     $0207                           ; 853D AE 07 02                 ...
        txs                                     ; 8540 9A                       .
        cpx     #$20                            ; 8541 E0 20                    .
        bcc     L8582                           ; 8543 90 3D                    .=
        jsr     L83A2                           ; 8545 20 A2 83                  ..
        bne     L8582                           ; 8548 D0 38                    .8
        sec                                     ; 854A 38                       8
        jsr     LCDsetupGetOrSet                ; 854B 20 28 B2                  (.
        jsr     L870F                           ; 854E 20 0F 87                  ..
        bcs     L8582                           ; 8551 B0 2F                    ./
        jsr     ScanROMs                        ; 8553 20 D3 82                  ..
        bne     L8582                           ; 8556 D0 2A                    .*
        ldx     $0200                           ; 8558 AE 00 02                 ...
        jsr     L840F                           ; 855B 20 0F 84                  ..
        beq     L8582                           ; 855E F0 22                    ."
        jsr     InitIOhw                        ; 8560 20 63 87                  c.
        jsr     KBD_READ_VIA_SR                 ; 8563 20 E4 B5                  ..
        jsr     LB5FD                           ; 8566 20 FD B5                  ..
        lsr     a                               ; 8569 4A                       J
        bcs     L8582                           ; 856A B0 16                    ..
        jsr     L83F0                           ; 856C 20 F0 83                  ..
        jsr     L8644                           ; 856F 20 44 86                  D.
        jsr     L887F                           ; 8572 20 7F 88                  ..
        ldx     $0200                           ; 8575 AE 00 02                 ...
        jsr     L840F                           ; 8578 20 0F 84                  ..
        beq     L8582                           ; 857B F0 05                    ..
        jsr     L8277                           ; 857D 20 77 82                  w.
        plp                                     ; 8580 28                       (
        rts                                     ; 8581 60                       `
; ----------------------------------------------------------------------------
L8582:  ldx     #$FF                            ; 8582 A2 FF                    ..
        txs                                     ; 8584 9A                       .
        jsr     L8685                           ; 8585 20 85 86                  ..
        cli                                     ; 8588 58                       X
        jsr     ShowInLineText                  ; 8589 20 5B FB                  [.
        .byte   " COULD NOT RESTORE PREVIOUS STA"; 858C 20 43 4F 55 4C 44 20 4E  COULD N
                                                ; 8594 4F 54 20 52 45 53 54 4F  OT RESTO
                                                ; 859C 52 45 20 50 52 45 56 49  RE PREVI
                                                ; 85A4 4F 55 53 20 53 54 41     OUS STA
        .byte   "TE"                            ; 85AB 54 45                    TE
        .byte   $0D,$07,$00                     ; 85AD 0D 07 00                 ...
; ----------------------------------------------------------------------------
        ldx     #$02                            ; 85B0 A2 02                    ..
        jsr     WaitXticks_                     ; 85B2 20 E4 BF                  ..
        lda     StopKeyFlag                     ; 85B5 A5 AD                    ..
        and     #$1F                            ; 85B7 29 1F                    ).
        eor     #$15                            ; 85B9 49 15                    I.
        bne     L85C0                           ; 85BB D0 03                    ..
        jmp     L87C5                           ; 85BD 4C C5 87                 L..
; ----------------------------------------------------------------------------
L85C0:  jsr     L870F                           ; 85C0 20 0F 87                  ..
        bcc     L85E2                           ; 85C3 90 1D                    ..
        jsr     ShowInLineText                  ; 85C5 20 5B FB                  [.
        .byte   "YOUR DISK IS NOT INTACT"       ; 85C8 59 4F 55 52 20 44 49 53  YOUR DIS
                                                ; 85D0 4B 20 49 53 20 4E 4F 54  K IS NOT
                                                ; 85D8 20 49 4E 54 41 43 54      INTACT
        .byte   $0D,$07,$00                     ; 85DF 0D 07 00                 ...
; ----------------------------------------------------------------------------
L85E2:  jsr     L82BE                           ; 85E2 20 BE 82                  ..
        beq     L8607                           ; 85E5 F0 20                    .
        jsr     ShowInLineText                  ; 85E7 20 5B FB                  [.
        .byte   "ROM ENVIROMENT HAS CHANGED"    ; 85EA 52 4F 4D 20 45 4E 56 49  ROM ENVI
                                                ; 85F2 52 4F 4D 45 4E 54 20 48  ROMENT H
                                                ; 85FA 41 53 20 43 48 41 4E 47  AS CHANG
                                                ; 8602 45 44                    ED
        .byte   $0D,$07,$00                     ; 8604 0D 07 00                 ...
; ----------------------------------------------------------------------------
L8607:  jsr     L889A                           ; 8607 20 9A 88                  ..
        jsr     L83F0                           ; 860A 20 F0 83                  ..
        jsr     L8644                           ; 860D 20 44 86                  D.
        stz     $0384                           ; 8610 9C 84 03                 ...
        lda     #$0E                            ; 8613 A9 0E                    ..
        sta     CursorY                         ; 8615 85 A2                    ..
        jsr     ShowInLineText                  ; 8617 20 5B FB                  [.
        .byte   "P"                             ; 861A 50                       P
L861B:  .byte   "RESS ANY KEY TO CONTINUE"      ; 861B 52 45 53 53 20 41 4E 59  RESS ANY
                                                ; 8623 20 4B 45 59 20 54 4F 20   KEY TO
                                                ; 862B 43 4F 4E 54 49 4E 55 45  CONTINUE
        .byte   $00                             ; 8633 00                       .
; ----------------------------------------------------------------------------
        cli                                     ; 8634 58                       X
        jsr     LB2D6                           ; 8635 20 D6 B2                  ..
        jsr     LB6DF                           ; 8638 20 DF B6                  ..
        jsr     LB2E4                           ; 863B 20 E4 B2                  ..
        jsr     PrintNewLine                    ; 863E 20 D3 CA                  ..
        jmp     L843F                           ; 8641 4C 3F 84                 L?.
; ----------------------------------------------------------------------------
L8644:  cli                                     ; 8644 58                       X
L8645:  ldy     #$00                            ; 8645 A0 00                    ..
L8647:  ldx     #$02                            ; 8647 A2 02                    ..
        jsr     WaitXticks_                     ; 8649 20 E4 BF                  ..
        lda     StopKeyFlag                     ; 864C A5 AD                    ..
        bit     #$20                            ; 864E 89 20                    .
        bne     L8653                           ; 8650 D0 01                    ..
        rts                                     ; 8652 60                       `
; ----------------------------------------------------------------------------
; Funny :)
L8653:  iny                                     ; 8653 C8                       .
        bne     L8647                           ; 8654 D0 F1                    ..
        jsr     ShowInLineText80                ; 8656 20 56 FB                  V.
        .byte   "HEY, LEAVE OFF THE BUTTON, WILL"; 8659 48 45 59 2C 20 4C 45 41 HEY, LEA
                                                ; 8661 56 45 20 4F 46 46 20 54  VE OFF T
                                                ; 8669 48 45 20 42 55 54 54 4F  HE BUTTO
                                                ; 8671 4E 2C 20 57 49 4C 4C     N, WILL
        .byte   " YA ??"                        ; 8678 20 59 41 20 3F 3F         YA ??
        .byte   $0D,$00                         ; 867E 0D 00                    ..
; ----------------------------------------------------------------------------
        jsr     LC65C                           ; 8680 20 5C C6                  \.
        bra     L8644                           ; 8683 80 BF                    ..
L8685:  stz     $0200                           ; 8685 9C 00 02                 ...
        stz     $0203                           ; 8688 9C 03 02                 ...
L868C           := * + 1
        stz     $0202                           ; 868B 9C 02 02                 ...
        jsr     KL_IOINIT                       ; 868E 20 47 87                  G.
        jsr     L87BA                           ; 8691 20 BA 87                  ..
        jsr     KL_RESTOR                       ; 8694 20 96 C6                  ..
        jsr     LFDDF                           ; 8697 20 DF FD                  ..
        jsr     L8C6F                           ; 869A 20 6F 8C                  o.
        stz     $0384                           ; 869D 9C 84 03                 ...
; Set MEMBOT vector to $0FFF
        ldy     #$0F                            ; 86A0 A0 0F                    ..
        ldx     #$FF                            ; 86A2 A2 FF                    ..
        clc                                     ; 86A4 18                       .
        jmp     MEMBOT__                        ; 86A5 4C AD D3                 L..
; ----------------------------------------------------------------------------
KL_RAMTAS:
        php                                     ; 86A8 08                       .
; D9/DA shows here the tested amount of RAM to be found OK, starts from zero
        sei                                     ; 86A9 78                       x
        stz     $D9                             ; 86AA 64 D9                    d.
        stz     $DA                             ; 86AC 64 DA                    d.
; This seems to test the zero page memory.
        ldx     #$00                            ; 86AE A2 00                    ..
L86B0:  lda     $00,x                           ; 86B0 B5 00                    ..
        ldy     #$01                            ; 86B2 A0 01                    ..
L86B4:  eor     $FF                             ; 86B4 45 FF                    E.
        sta     $00,x                           ; 86B6 95 00                    ..
        cmp     $00,x                           ; 86B8 D5 00                    ..
        bne     L86E3                           ; 86BA D0 27                    .'
        dey                                     ; 86BC 88                       .
        bpl     L86B4                           ; 86BD 10 F5                    ..
        dex                                     ; 86BF CA                       .
        bne     L86B0                           ; 86C0 D0 EE                    ..
; Test rest of the RAM, using the kernal window to page in the testable area.
L86C2:  lda     $D9                             ; 86C2 A5 D9                    ..
        ldx     $DA                             ; 86C4 A6 DA                    ..
        inc     a                               ; 86C6 1A                       .
        bne     L86CA                           ; 86C7 D0 01                    ..
        inx                                     ; 86C9 E8                       .
L86CA:  jsr     L8A87                           ; 86CA 20 87 8A                  ..
        ldy     #$00                            ; 86CD A0 00                    ..
L86CF:  lda     ($E4),y                         ; 86CF B1 E4                    ..
        ldx     #$01                            ; 86D1 A2 01                    ..
L86D3:  eor     #$FF                            ; 86D3 49 FF                    I.
        sta     ($E4),y                         ; 86D5 91 E4                    ..
        cmp     ($E4),y                         ; 86D7 D1 E4                    ..
        bne     L86E3                           ; 86D9 D0 08                    ..
        dex                                     ; 86DB CA                       .
        bpl     L86D3                           ; 86DC 10 F5                    ..
        iny                                     ; 86DE C8                       .
L86DF:  bne     L86CF                           ; 86DF D0 EE                    ..
        bra     L86C2                           ; 86E1 80 DF                    ..
L86E3:  lda     $D9                             ; 86E3 A5 D9                    ..
        ldx     $DA                             ; 86E5 A6 DA                    ..
        plp                                     ; 86E7 28                       (
        rts                                     ; 86E8 60                       `
; ----------------------------------------------------------------------------
L86E9:  jsr     L8C6F                           ; 86E9 20 6F 8C                  o.
        jsr     L86F6                           ; 86EC 20 F6 86                  ..
        sta     $02D9                           ; 86EF 8D D9 02                 ...
        sty     $02DA                           ; 86F2 8C DA 02                 ...
        rts                                     ; 86F5 60                       `
; ----------------------------------------------------------------------------
L86F6:  cld                                     ; 86F6 D8                       .
        lda     #$00                            ; 86F7 A9 00                    ..
        tay                                     ; 86F9 A8                       .
        ldx     #$D1                            ; 86FA A2 D1                    ..
L86FC:  clc                                     ; 86FC 18                       .
        adc     $0208,x                         ; 86FD 7D 08 02                 }..
        bcc     L8703                           ; 8700 90 01                    ..
        iny                                     ; 8702 C8                       .
L8703:  dex                                     ; 8703 CA                       .
        bpl     L86FC                           ; 8704 10 F6                    ..
        cmp     $02D9                           ; 8706 CD D9 02                 ...
        bne     L870E                           ; 8709 D0 03                    ..
        cpy     $02DA                           ; 870B CC DA 02                 ...
L870E:  rts                                     ; 870E 60                       `
; ----------------------------------------------------------------------------
L870F:  jsr     L8E46                           ; 870F 20 46 8E                  F.
        bcc     L8745                           ; 8712 90 31                    .1
        lda     $020A                           ; 8714 AD 0A 02                 ...
        ldx     $020B                           ; 8717 AE 0B 02                 ...
        bne     L8720                           ; 871A D0 04                    ..
        cmp     #$10                            ; 871C C9 10                    ..
        bcc     L8745                           ; 871E 90 25                    .%
L8720:  jsr     KL_RAMTAS                       ; 8720 20 A8 86                  ..
        cmp     $0208                           ; 8723 CD 08 02                 ...
        bne     L8745                           ; 8726 D0 1D                    ..
        cpx     $0209                           ; 8728 EC 09 02                 ...
        bne     L8745                           ; 872B D0 18                    ..
        cpx     $020B                           ; 872D EC 0B 02                 ...
        bcc     L8745                           ; 8730 90 13                    ..
        bne     L8739                           ; 8732 D0 05                    ..
        cmp     $020A                           ; 8734 CD 0A 02                 ...
        bcc     L8745                           ; 8737 90 0C                    ..
L8739:  cpx     #$02                            ; 8739 E0 02                    ..
        bcc     L8743                           ; 873B 90 06                    ..
        bne     L8745                           ; 873D D0 06                    ..
        cmp     #$00                            ; 873F C9 00                    ..
        bne     L8745                           ; 8741 D0 02                    ..
L8743:  clc                                     ; 8743 18                       .
        rts                                     ; 8744 60                       `
; ----------------------------------------------------------------------------
L8745:  sec                                     ; 8745 38                       8
        rts                                     ; 8746 60                       `
; ----------------------------------------------------------------------------
KL_IOINIT:
        jsr     InitIOhw                        ; 8747 20 63 87                  c.
        jsr     LB4DA                           ; 874A 20 DA B4                  ..
        ldx     #$02                            ; 874D A2 02                    ..
L874F:  stz     $0393,x                         ; 874F 9E 93 03                 ...
        dex                                     ; 8752 CA                       .
        bpl     L874F                           ; 8753 10 FA                    ..
        stz     $0385                           ; 8755 9C 85 03                 ...
        lda     #$03                            ; 8758 A9 03                    ..
        sta     L0386                           ; 875A 8D 86 03                 ...
        lda     #$FF                            ; 875D A9 FF                    ..
        sta     KernMsg                         ; 875F 8D 83 03                 ...
        rts                                     ; 8762 60                       `
; ----------------------------------------------------------------------------
InitIOhw:
; Inits VIAs, ACIA and possible other stuffs with JSRing routines.
        php                                     ; 8763 08                       .
        sei                                     ; 8764 78                       x
        lda     #$FF                            ; 8765 A9 FF                    ..
        sta     VIA1_DDRA                       ; 8767 8D 03 F8                 ...
        lda     #$3F                            ; 876A A9 3F                    .?
        sta     VIA1_DDRB                       ; 876C 8D 02 F8                 ...
        lda     #$00                            ; 876F A9 00                    ..
        sta     VIA1_PORTB                      ; 8771 8D 00 F8                 ...
        lda     #$48                            ; 8774 A9 48                    .H
L8777           := * + 1
        sta     VIA1_ACR                        ; 8776 8D 0B F8                 ...
        lda     #$A0                            ; 8779 A9 A0                    ..
L877D           := * + 2
        sta     VIA1_PCR                        ; 877B 8D 0C F8                 ...
        lda     #$1A                            ; 877E A9 1A                    ..
L8781           := * + 1
        sta     VIA1_T1LL                       ; 8780 8D 06 F8                 ...
        lda     #$41                            ; 8783 A9 41                    .A
        sta     VIA1_T1CH                       ; 8785 8D 05 F8                 ...
        lda     #$C0                            ; 8788 A9 C0                    ..
        sta     VIA1_IER                        ; 878A 8D 0E F8                 ...
        stz     VIA2_PORTA                      ; 878D 9C 81 F8                 ...
        lda     #$FF                            ; 8790 A9 FF                    ..
        sta     VIA2_DDRA                       ; 8792 8D 83 F8                 ...
        lda     #$AF                            ; 8795 A9 AF                    ..
        sta     VIA2_DDRB                       ; 8797 8D 82 F8                 ...
        lda     #$82                            ; 879A A9 82                    ..
        sta     VIA2_PORTB                      ; 879C 8D 80 F8                 ...
        lda     #$00                            ; 879F A9 00                    ..
        sta     VIA2_ACR                        ; 87A1 8D 8B F8                 ...
        lda     #$0C                            ; 87A4 A9 0C                    ..
        sta     VIA2_PCR                        ; 87A6 8D 8C F8                 ...
        lda     #$80                            ; 87A9 A9 80                    ..
        sta     VIA2_IFR                        ; 87AB 8D 8D F8                 ...
        stz     ACIA_ST                         ; 87AE 9C 81 F9                 ...
        jsr     LBFBE                           ; 87B1 20 BE BF                  ..
        sec                                     ; 87B4 38                       8
        jsr     LCDsetupGetOrSet                ; 87B5 20 28 B2                  (.
        plp                                     ; 87B8 28                       (
        rts                                     ; 87B9 60                       `
; ----------------------------------------------------------------------------
L87BA:  jsr     LB4DA                           ; 87BA 20 DA B4                  ..
        ldx     #$00                            ; 87BD A2 00                    ..
        jsr     LD230                           ; 87BF 20 30 D2                  0.
        jmp     LB1DA                           ; 87C2 4C DA B1                 L..
; ----------------------------------------------------------------------------
L87C5:  sei                                     ; 87C5 78                       x
        ldx     #$FF                            ; 87C6 A2 FF                    ..
        txs                                     ; 87C8 9A                       .
        inx                                     ; 87C9 E8                       .
L87CA:  stz     $00,x                           ; 87CA 74 00                    t.
        stz     stack,x                         ; 87CC 9E 00 01                 ...
        stz     $0200,x                         ; 87CF 9E 00 02                 ...
        stz     L0300,x                         ; 87D2 9E 00 03                 ...
        stz     $0400,x                         ; 87D5 9E 00 04                 ...
        inx                                     ; 87D8 E8                       .
        bne     L87CA                           ; 87D9 D0 EF                    ..
        jsr     L8685                           ; 87DB 20 85 86                  ..
        cli                                     ; 87DE 58                       X
        jsr     ShowInLineText                  ; 87DF 20 5B FB                  [.
        .byte   "ESTABLISHING S"                ; 87E2 45 53 54 41 42 4C 49 53  ESTABLIS
                                                ; 87EA 48 49 4E 47 20 53        HING S
L87F0:  .byte   "YST"                           ; 87F0 59 53 54                 YST
L87F3:  .byte   "EM PARAMETERS "                ; 87F3 45 4D 20 50 41 52 41 4D  EM PARAM
                                                ; 87FB 45 54 45 52 53 20        ETERS
        .byte   $07,$0D,$00                     ; 8801 07 0D 00                 ...
; ----------------------------------------------------------------------------
L8805           := * + 1
        jsr     L82BE                           ; 8804 20 BE 82                  ..
        lda     #$0F                            ; 8807 A9 0F                    ..
L880B           := * + 2
        sta     $020C                           ; 8809 8D 0C 02                 ...
L880E           := * + 2
        jsr     KL_RAMTAS                       ; 880C 20 A8 86                  ..
L8811           := * + 2
        sta     $0208                           ; 880F 8D 08 02                 ...
        stx     $0209                           ; 8812 8E 09 02                 ...
        sta     $020A                           ; 8815 8D 0A 02                 ...
        stx     $020B                           ; 8818 8E 0B 02                 ...
        stx     $00                             ; 881B 86 00                    ..
        lsr     $00                             ; 881D 46 00                    F.
        ror     a                               ; 881F 6A                       j
        lsr     $00                             ; 8820 46 00                    F.
        ror     a                               ; 8822 6A                       j
        jsr     L8850                           ; 8823 20 50 88                  P.
        jsr     L8E5C                           ; 8826 20 5C 8E                  \.
        .byte   $20                             ; 8829 20
L882A:  .byte   $5B                             ; 882A 5B                       [
        .byte   $FB                             ; 882B FB                       .
        .byte   " "                             ; 882C 20
L882D:  .byte   "KBYTE SYSTEM ESTABLI"          ; 882D 4B 42 59 54 45 20 53 59  KBYTE SY
                                                ; 8835 53 54 45 4D 20 45 53 54  STEM EST
                                                ; 883D 41 42 4C 49              ABLI
L8841:  .byte   "SHE"                           ; 8841 53 48 45                 SHE
L8844:  .byte   "D"                             ; 8844 44                       D
        .byte   $0D,$00                         ; 8845 0D 00                    ..
; ----------------------------------------------------------------------------
        jsr     LD411                           ; 8847 20 11 D4                  ..
        jsr     L8644                           ; 884A 20 44 86                  D.
        jmp     L843F                           ; 884D 4C 3F 84                 L?.
; ----------------------------------------------------------------------------
L8850:  jsr     L886A                           ; 8850 20 6A 88                  j.
        pha                                     ; 8853 48                       H
        phx                                     ; 8854 DA                       .
        tya                                     ; 8855 98                       .
        bne     L885D                           ; 8856 D0 05                    ..
        pla                                     ; 8858 68                       h
        bne     L8861                           ; 8859 D0 06                    ..
        beq     L8864                           ; 885B F0 07                    ..
L885D:  jsr     L8865                           ; 885D 20 65 88                  e.
        pla                                     ; 8860 68                       h
L8861:  jsr     L8865                           ; 8861 20 65 88                  e.
L8864:  pla                                     ; 8864 68                       h
L8865:  ora     #$30                            ; 8865 09 30                    .0
        jmp     ShowChar_                       ; 8867 4C B3 AB                 L..
; ----------------------------------------------------------------------------
L886A:  ldy     #$FF                            ; 886A A0 FF                    ..
        cld                                     ; 886C D8                       .
        sec                                     ; 886D 38                       8
L886E:  iny                                     ; 886E C8                       .
        sbc     #$64                            ; 886F E9 64                    .d
        bcs     L886E                           ; 8871 B0 FB                    ..
        adc     #$64                            ; 8873 69 64                    id
        ldx     #$FF                            ; 8875 A2 FF                    ..
L8877:  inx                                     ; 8877 E8                       .
        sbc     #$0A                            ; 8878 E9 0A                    ..
        bcs     L8877                           ; 887A B0 FB                    ..
        adc     #$0A                            ; 887C 69 0A                    i.
        rts                                     ; 887E 60                       `
; ----------------------------------------------------------------------------
L887F:  clc                                     ; 887F 18                       .
        jsr     L88C2                           ; 8880 20 C2 88                  ..
        bit     $0384                           ; 8883 2C 84 03                 ,..
        bvc     L8896                           ; 8886 50 0E                    P.
        ldy     #$02                            ; 8888 A0 02                    ..
L888A:  lda     ($E4),y                         ; 888A B1 E4                    ..
        sta     $037A,y                         ; 888C 99 7A 03                 .z.
        dey                                     ; 888F 88                       .
        bpl     L888A                           ; 8890 10 F8                    ..
        sec                                     ; 8892 38                       8
        jsr     LCDsetupGetOrSet                ; 8893 20 28 B2                  (.
L8896:  stz     $0384                           ; 8896 9C 84 03                 ...
        rts                                     ; 8899 60                       `
; ----------------------------------------------------------------------------
L889A:  jsr     LBE69                           ; 889A 20 69 BE                  i.
        sec                                     ; 889D 38                       8
        jsr     L88C2                           ; 889E 20 C2 88                  ..
        bit     $0384                           ; 88A1 2C 84 03                 ,..
        bvc     L88BF                           ; 88A4 50 19                    P.
        lda     #$93                            ; 88A6 A9 93                    ..
        jsr     ShowChar_                       ; 88A8 20 B3 AB                  ..
        ldy     #$02                            ; 88AB A0 02                    ..
L88AD:  lda     $037A,y                         ; 88AD B9 7A 03                 .z.
        sta     ($E4),y                         ; 88B0 91 E4                    ..
        dey                                     ; 88B2 88                       .
        bpl     L88AD                           ; 88B3 10 F8                    ..
        and     #$01                            ; 88B5 29 01                    ).
        ldy     VidMemHi                        ; 88B7 A4 A0                    ..
        ldx     #$00                            ; 88B9 A2 00                    ..
        clc                                     ; 88BB 18                       .
        jsr     LCDsetupGetOrSet                ; 88BC 20 28 B2                  (.
L88BF:  jmp     KL_RESTOR                       ; 88BF 4C 96 C6                 L..
; ----------------------------------------------------------------------------
L88C2:  ldx     #$C0                            ; 88C2 A2 C0                    ..
        ldy     #$04                            ; 88C4 A0 04                    ..
        jsr     KL_VECTOR                       ; 88C6 20 9B C6                  ..
        lda     $020C                           ; 88C9 AD 0C 02                 ...
        ldx     $020D                           ; 88CC AE 0D 02                 ...
        inc     a                               ; 88CF 1A                       .
        bne     L88D3                           ; 88D0 D0 01                    ..
        inx                                     ; 88D2 E8                       .
L88D3:  cpx     $020B                           ; 88D3 EC 0B 02                 ...
        bcc     L88E5                           ; 88D6 90 0D                    ..
        bne     L88DF                           ; 88D8 D0 05                    ..
        cmp     $020A                           ; 88DA CD 0A 02                 ...
        bcc     L88E5                           ; 88DD 90 06                    ..
L88DF:  lda     #$80                            ; 88DF A9 80                    ..
        sta     $0384                           ; 88E1 8D 84 03                 ...
        rts                                     ; 88E4 60                       `
; ----------------------------------------------------------------------------
L88E5:  jsr     L8A87                           ; 88E5 20 87 8A                  ..
        lda     #$FF                            ; 88E8 A9 FF                    ..
        sta     $0384                           ; 88EA 8D 84 03                 ...
        lda     #$05                            ; 88ED A9 05                    ..
        sta     $03E7                           ; 88EF 8D E7 03                 ...
        ldy     #$FF                            ; 88F2 A0 FF                    ..
L88F4:  phy                                     ; 88F4 5A                       Z
        clc                                     ; 88F5 18                       .
        cld                                     ; 88F6 D8                       .
        lda     $03E7                           ; 88F7 AD E7 03                 ...
        adc     #$04                            ; 88FA 69 04                    i.
        tax                                     ; 88FC AA                       .
        ldy     #$13                            ; 88FD A0 13                    ..
        sec                                     ; 88FF 38                       8
        jsr     LB6F9                           ; 8900 20 F9 B6                  ..
        ply                                     ; 8903 7A                       z
        ldx     #$29                            ; 8904 A2 29                    .)
L8906:  phy                                     ; 8906 5A                       Z
        lda     ($E4),y                         ; 8907 B1 E4                    ..
        pha                                     ; 8909 48                       H
        phy                                     ; 890A 5A                       Z
        txa                                     ; 890B 8A                       .
        tay                                     ; 890C A8                       .
        lda     ($BD),y                         ; 890D B1 BD                    ..
        ply                                     ; 890F 7A                       z
        sta     ($E4),y                         ; 8910 91 E4                    ..
        txa                                     ; 8912 8A                       .
        tay                                     ; 8913 A8                       .
        pla                                     ; 8914 68                       h
        sta     ($BD),y                         ; 8915 91 BD                    ..
        ply                                     ; 8917 7A                       z
        dey                                     ; 8918 88                       .
        dex                                     ; 8919 CA                       .
        bpl     L8906                           ; 891A 10 EA                    ..
        dec     $03E7                           ; 891C CE E7 03                 ...
        bpl     L88F4                           ; 891F 10 D3                    ..
        rts                                     ; 8921 60                       `
; ----------------------------------------------------------------------------
L8922:  lda     #$05                            ; 8922 A9 05                    ..
        sta     $03E7                           ; 8924 8D E7 03                 ...
        ldx     #$A4                            ; 8927 A2 A4                    ..
L8929:  jsr     L893C                           ; 8929 20 3C 89                  <.
        ldx     #$0D                            ; 892C A2 0D                    ..
        dec     $03E7                           ; 892E CE E7 03                 ...
        bne     L8929                           ; 8931 D0 F6                    ..
        ldx     #$A3                            ; 8933 A2 A3                    ..
        jsr     L893C                           ; 8935 20 3C 89                  <.
        lda     #$0D                            ; 8938 A9 0D                    ..
        bra     L8948                           ; 893A 80 0C                    ..
L893C:  phx                                     ; 893C DA                       .
        jsr     L8964                           ; 893D 20 64 89                  d.
        plx                                     ; 8940 FA                       .
L8941:  txa                                     ; 8941 8A                       .
        jsr     L897C                           ; 8942 20 7C 89                  |.
        bcc     L8941                           ; 8945 90 FA                    ..
        rts                                     ; 8947 60                       `
; ----------------------------------------------------------------------------
L8948:  cmp     #$07                            ; 8948 C9 07                    ..
        bne     L894F                           ; 894A D0 03                    ..
        jmp     LC65C                           ; 894C 4C 5C C6                 L\.
; ----------------------------------------------------------------------------
L894F:  cmp     #$93                            ; 894F C9 93                    ..
        beq     L8922                           ; 8951 F0 CF                    ..
        cmp     #$0D                            ; 8953 C9 0D                    ..
        bne     L897C                           ; 8955 D0 25                    .%
        .byte   $20                             ; 8957 20
        .byte   $7C                             ; 8958 7C                       |
L8959:  bit     #$AD                            ; 8959 89 AD                    ..
        smb6    $03                             ; 895B E7 03                    ..
        cmp     #$04                            ; 895D C9 04                    ..
        bcs     L8980                           ; 895F B0 1F                    ..
        inc     $03E7                           ; 8961 EE E7 03                 ...
L8964:  clc                                     ; 8964 18                       .
        cld                                     ; 8965 D8                       .
        lda     $03E7                           ; 8966 AD E7 03                 ...
        adc     #$04                            ; 8969 69 04                    i.
        tax                                     ; 896B AA                       .
        ldy     #$13                            ; 896C A0 13                    ..
        lda     #$29                            ; 896E A9 29                    .)
        pha                                     ; 8970 48                       H
        sec                                     ; 8971 38                       8
        jsr     LB6F9                           ; 8972 20 F9 B6                  ..
        lda     #$65                            ; 8975 A9 65                    .e
        ply                                     ; 8977 7A                       z
        sta     ($BD),y                         ; 8978 91 BD                    ..
        lda     #$A7                            ; 897A A9 A7                    ..
L897C:  clc                                     ; 897C 18                       .
        jmp     LB6F9                           ; 897D 4C F9 B6                 L..
; ----------------------------------------------------------------------------
L8980:  stz     $03E7                           ; 8980 9C E7 03                 ...
L8983:  inc     $03E7                           ; 8983 EE E7 03                 ...
        jsr     L8964                           ; 8986 20 64 89                  d.
        lda     $03E7                           ; 8989 AD E7 03                 ...
        cmp     #$04                            ; 898C C9 04                    ..
        beq     L89A1                           ; 898E F0 11                    ..
        ldy     #$AA                            ; 8990 A0 AA                    ..
L8992:  lda     ($BD),y                         ; 8992 B1 BD                    ..
        jsr     L89A8                           ; 8994 20 A8 89                  ..
        sta     ($BD),y                         ; 8997 91 BD                    ..
        jsr     L89A8                           ; 8999 20 A8 89                  ..
        dey                                     ; 899C 88                       .
        bmi     L8992                           ; 899D 30 F3                    0.
        bra     L8983                           ; 899F 80 E2                    ..
L89A1:  lda     #$0D                            ; 89A1 A9 0D                    ..
        jsr     L897C                           ; 89A3 20 7C 89                  |.
        bra     L8964                           ; 89A6 80 BC                    ..
L89A8:  tax                                     ; 89A8 AA                       .
        tya                                     ; 89A9 98                       .
        eor     #$80                            ; 89AA 49 80                    I.
        tay                                     ; 89AC A8                       .
        txa                                     ; 89AD 8A                       .
        rts                                     ; 89AE 60                       `
; ----------------------------------------------------------------------------
L89AF:  jsr     L8A39                           ; 89AF 20 39 8A                  9.
        bcs     L89B5                           ; 89B2 B0 01                    ..
        rts                                     ; 89B4 60                       `
; ----------------------------------------------------------------------------
L89B5:  lda     $020A                           ; 89B5 AD 0A 02                 ...
L89B8:  bne     L89BD                           ; 89B8 D0 03                    ..
        dec     $020B                           ; 89BA CE 0B 02                 ...
L89BD:  dec     $020A                           ; 89BD CE 0A 02                 ...
        jsr     LD3F6                           ; 89C0 20 F6 D3                  ..
        jmp     L8A81                           ; 89C3 4C 81 8A                 L..
; ----------------------------------------------------------------------------
L89C6:  jsr     L89AF                           ; 89C6 20 AF 89                  ..
        bcc     L89E1                           ; 89C9 90 16                    ..
        lda     $E8                             ; 89CB A5 E8                    ..
        sta     $020E                           ; 89CD 8D 0E 02                 ...
        sta     ($E4)                           ; 89D0 92 E4                    ..
        lda     $E9                             ; 89D2 A5 E9                    ..
        sta     $020F                           ; 89D4 8D 0F 02                 ...
        ldy     #$01                            ; 89D7 A0 01                    ..
        sta     ($E4),y                         ; 89D9 91 E4                    ..
        iny                                     ; 89DB C8                       .
        lda     #$02                            ; 89DC A9 02                    ..
        sta     ($E4),y                         ; 89DE 91 E4                    ..
        sec                                     ; 89E0 38                       8
L89E1:  rts                                     ; 89E1 60                       `
; ----------------------------------------------------------------------------
L89E2:  jsr     L8A81                           ; 89E2 20 81 8A                  ..
L89E5:  lda     $020E                           ; 89E5 AD 0E 02                 ...
        cmp     $0219                           ; 89E8 CD 19 02                 ...
        bne     L89F2                           ; 89EB D0 05                    ..
        jsr     L89FF                           ; 89ED 20 FF 89                  ..
        bra     L89E2                           ; 89F0 80 F0                    ..
L89F2:  jsr     L8A61                           ; 89F2 20 61 8A                  a.
        bcs     L89E5                           ; 89F5 B0 EE                    ..
        sec                                     ; 89F7 38                       8
        rts                                     ; 89F8 60                       `
; ----------------------------------------------------------------------------
L89F9:  jsr     L8AD5                           ; 89F9 20 D5 8A                  ..
        bcs     L89FF                           ; 89FC B0 01                    ..
        rts                                     ; 89FE 60                       `
; ----------------------------------------------------------------------------
L89FF:  lda     $0216                           ; 89FF AD 16 02                 ...
        pha                                     ; 8A02 48                       H
        lda     $E5                             ; 8A03 A5 E5                    ..
        pha                                     ; 8A05 48                       H
        jsr     L8A81                           ; 8A06 20 81 8A                  ..
        stz     $D9                             ; 8A09 64 D9                    d.
        pla                                     ; 8A0B 68                       h
        sta     $DA                             ; 8A0C 85 DA                    ..
        ldy     #$00                            ; 8A0E A0 00                    ..
L8A10:  lda     ($E4),y                         ; 8A10 B1 E4                    ..
        tax                                     ; 8A12 AA                       .
        pla                                     ; 8A13 68                       h
L8A14:  pha                                     ; 8A14 48                       H
        sta     MMU_KERN_WINDOW                 ; 8A15 8D 00 FF                 ...
        lda     ($D9),y                         ; 8A18 B1 D9                    ..
L8A1A:  pha                                     ; 8A1A 48                       H
        txa                                     ; 8A1B 8A                       .
        sta     ($D9),y                         ; 8A1C 91 D9                    ..
        .byte   $AD                             ; 8A1E AD                       .
        .byte   $16                             ; 8A1F 16                       .
L8A20:  .byte   $02                             ; 8A20 02                       .
        .byte   $8D                             ; 8A21 8D                       .
        brk                                     ; 8A22 00                       .
L8A23:  bbs7    $68,$68                         ; 8A23 FF 68 91                 .h.
        cpx     $C8                             ; 8A26 E4 C8                    ..
        bne     L8A10                           ; 8A28 D0 E6                    ..
        pla                                     ; 8A2A 68                       h
        inc     $020A                           ; 8A2B EE 0A 02                 ...
        bne     L8A33                           ; 8A2E D0 03                    ..
        inc     $020B                           ; 8A30 EE 0B 02                 ...
L8A33:  jsr     LD3F6                           ; 8A33 20 F6 D3                  ..
        jmp     L8A81                           ; 8A36 4C 81 8A                 L..
; ----------------------------------------------------------------------------
L8A39:  ldx     $020B                           ; 8A39 AE 0B 02                 ...
        lda     $020A                           ; 8A3C AD 0A 02                 ...
        bne     L8A42                           ; 8A3F D0 01                    ..
        dex                                     ; 8A41 CA                       .
L8A42:  dec     a                               ; 8A42 3A                       :
        cpx     $020D                           ; 8A43 EC 0D 02                 ...
        bne     L8A4E                           ; 8A46 D0 06                    ..
        cmp     $020C                           ; 8A48 CD 0C 02                 ...
        bne     L8A4E                           ; 8A4B D0 01                    ..
        clc                                     ; 8A4D 18                       .
L8A4E:  lda     #$19                            ; 8A4E A9 19                    ..
        rts                                     ; 8A50 60                       `
; ----------------------------------------------------------------------------
        cld                                     ; 8A51 D8                       .
        sec                                     ; 8A52 38                       8
        lda     $0208                           ; 8A53 AD 08 02                 ...
        sbc     $020A                           ; 8A56 ED 0A 02                 ...
        tax                                     ; 8A59 AA                       .
        lda     $0209                           ; 8A5A AD 09 02                 ...
        sbc     $020B                           ; 8A5D ED 0B 02                 ...
        rts                                     ; 8A60 60                       `
; ----------------------------------------------------------------------------
L8A61:  ldx     $DA                             ; 8A61 A6 DA                    ..
        lda     $D9                             ; 8A63 A5 D9                    ..
        inc     a                               ; 8A65 1A                       .
        bne     L8A69                           ; 8A66 D0 01                    ..
        inx                                     ; 8A68 E8                       .
L8A69:  cpx     $0209                           ; 8A69 EC 09 02                 ...
        bcc     L8A77                           ; 8A6C 90 09                    ..
        bne     L8A75                           ; 8A6E D0 05                    ..
        cmp     $0208                           ; 8A70 CD 08 02                 ...
        bcc     L8A77                           ; 8A73 90 02                    ..
L8A75:  clc                                     ; 8A75 18                       .
        rts                                     ; 8A76 60                       `
; ----------------------------------------------------------------------------
L8A77:  stx     $DA                             ; 8A77 86 DA                    ..
        sta     $D9                             ; 8A79 85 D9                    ..
        inc     $E5                             ; 8A7B E6 E5                    ..
        bmi     L8A87                           ; 8A7D 30 08                    0.
        bra     L8AA9                           ; 8A7F 80 28                    .(
L8A81:  ldx     $020B                           ; 8A81 AE 0B 02                 ...
L8A84:  lda     $020A                           ; 8A84 AD 0A 02                 ...
L8A87:  sta     $D9                             ; 8A87 85 D9                    ..
        stx     $DA                             ; 8A89 86 DA                    ..
        sec                                     ; 8A8B 38                       8
        cld                                     ; 8A8C D8                       .
        sbc     #$40                            ; 8A8D E9 40                    .@
        bcs     L8A92                           ; 8A8F B0 01                    ..
        dex                                     ; 8A91 CA                       .
L8A92:  sta     $E5                             ; 8A92 85 E5                    ..
        txa                                     ; 8A94 8A                       .
        asl     $E5                             ; 8A95 06 E5                    ..
        rol     a                               ; 8A97 2A                       *
        asl     $E5                             ; 8A98 06 E5                    ..
        rol     a                               ; 8A9A 2A                       *
        asl     a                               ; 8A9B 0A                       .
        asl     a                               ; 8A9C 0A                       .
        asl     a                               ; 8A9D 0A                       .
        asl     a                               ; 8A9E 0A                       .
        sta     $0216                           ; 8A9F 8D 16 02                 ...
        sec                                     ; 8AA2 38                       8
        ror     $E5                             ; 8AA3 66 E5                    f.
        lsr     $E5                             ; 8AA5 46 E5                    F.
        stz     $E4                             ; 8AA7 64 E4                    d.
L8AA9:  lda     $0216                           ; 8AA9 AD 16 02                 ...
        sta     MMU_KERN_WINDOW                 ; 8AAC 8D 00 FF                 ...
L8AAF:  ldy     #$01                            ; 8AAF A0 01                    ..
        lda     ($E4)                           ; 8AB1 B2 E4                    ..
        tax                                     ; 8AB3 AA                       .
        sta     $020E                           ; 8AB4 8D 0E 02                 ...
        lda     ($E4),y                         ; 8AB7 B1 E4                    ..
        tay                                     ; 8AB9 A8                       .
        lda     $020A                           ; 8ABA AD 0A 02                 ...
        eor     $0208                           ; 8ABD 4D 08 02                 M..
        bne     L8ACD                           ; 8AC0 D0 0B                    ..
        lda     $020B                           ; 8AC2 AD 0B 02                 ...
        eor     $0209                           ; 8AC5 4D 09 02                 M..
        bne     L8ACD                           ; 8AC8 D0 03                    ..
        ldy     #$FF                            ; 8ACA A0 FF                    ..
        tax                                     ; 8ACC AA                       .
L8ACD:  stx     $020E                           ; 8ACD 8E 0E 02                 ...
        sty     $020F                           ; 8AD0 8C 0F 02                 ...
        sec                                     ; 8AD3 38                       8
        rts                                     ; 8AD4 60                       `
; ----------------------------------------------------------------------------
L8AD5:  jsr     L8AA9                           ; 8AD5 20 A9 8A                  ..
        jsr     L8AEE                           ; 8AD8 20 EE 8A                  ..
        beq     L8AFA                           ; 8ADB F0 1D                    ..
        jsr     L8A81                           ; 8ADD 20 81 8A                  ..
L8AE0:  jsr     L8AEE                           ; 8AE0 20 EE 8A                  ..
        beq     L8AFA                           ; 8AE3 F0 15                    ..
        jsr     L8A61                           ; 8AE5 20 61 8A                  a.
        bcs     L8AE0                           ; 8AE8 B0 F6                    ..
        clc                                     ; 8AEA 18                       .
        lda     #$14                            ; 8AEB A9 14                    ..
        rts                                     ; 8AED 60                       `
; ----------------------------------------------------------------------------
L8AEE:  lda     $E8                             ; 8AEE A5 E8                    ..
        cmp     $020E                           ; 8AF0 CD 0E 02                 ...
        bne     L8AFA                           ; 8AF3 D0 05                    ..
        lda     $E9                             ; 8AF5 A5 E9                    ..
        cmp     $020F                           ; 8AF7 CD 0F 02                 ...
L8AFA:  rts                                     ; 8AFA 60                       `
; ----------------------------------------------------------------------------
        cpx     $DA                             ; 8AFB E4 DA                    ..
        bne     L8B08                           ; 8AFD D0 09                    ..
        cmp     $D9                             ; 8AFF C5 D9                    ..
        bne     L8B08                           ; 8B01 D0 05                    ..
        jsr     L8AA9                           ; 8B03 20 A9 8A                  ..
        bra     L8B0B                           ; 8B06 80 03                    ..
L8B08:  jsr     L8A87                           ; 8B08 20 87 8A                  ..
L8B0B:  stz     $020E                           ; 8B0B 9C 0E 02                 ...
        stz     $020F                           ; 8B0E 9C 0F 02                 ...
        sec                                     ; 8B11 38                       8
        rts                                     ; 8B12 60                       `
; ----------------------------------------------------------------------------
L8B13:  lda     $0207                           ; 8B13 AD 07 02                 ...
        bne     L8B1D                           ; 8B16 D0 05                    ..
        inc     $0207                           ; 8B18 EE 07 02                 ...
        bra     L8B13                           ; 8B1B 80 F6                    ..
L8B1D:  pha                                     ; 8B1D 48                       H
        jsr     L8DBE                           ; 8B1E 20 BE 8D                  ..
        pla                                     ; 8B21 68                       h
        bcs     L8B27                           ; 8B22 B0 03                    ..
        sec                                     ; 8B24 38                       8
        bra     L8B31                           ; 8B25 80 0A                    ..
L8B27:  inc     a                               ; 8B27 1A                       .
        bne     L8B2B                           ; 8B28 D0 01                    ..
        inc     a                               ; 8B2A 1A                       .
L8B2B:  cmp     $0207                           ; 8B2B CD 07 02                 ...
        bne     L8B1D                           ; 8B2E D0 ED                    ..
        clc                                     ; 8B30 18                       .
L8B31:  sta     $0207                           ; 8B31 8D 07 02                 ...
        sta     $0219                           ; 8B34 8D 19 02                 ...
        lda     #$48                            ; 8B37 A9 48                    .H
        rts                                     ; 8B39 60                       `
; ----------------------------------------------------------------------------
L8B3A:  .byte   $20                             ; 8B3A 20
        rti                                     ; 8B3B 40                       @
; ----------------------------------------------------------------------------
L8B3C:  .byte   $8B                             ; 8B3C 8B                       .
        .byte   $4C                             ; 8B3D 4C                       L
        .byte   $3F                             ; 8B3E 3F                       ?
L8B3F:  .byte   $99                             ; 8B3F 99                       .
L8B40:  jsr     L8C36                           ; 8B40 20 36 8C                  6.
        bcs     L8B46                           ; 8B43 B0 01                    ..
        rts                                     ; 8B45 60                       `
; ----------------------------------------------------------------------------
L8B46:  lda     $E7                             ; 8B46 A5 E7                    ..
        bit     #$10                            ; 8B48 89 10                    ..
        bne     L8B50                           ; 8B4A D0 04                    ..
        lda     #$3D                            ; 8B4C A9 3D                    .=
        clc                                     ; 8B4E 18                       .
        rts                                     ; 8B4F 60                       `
; ----------------------------------------------------------------------------
L8B50:  lda     $E6                             ; 8B50 A5 E6                    ..
        cmp     #$0F                            ; 8B52 C9 0F                    ..
        bne     L8B59                           ; 8B54 D0 03                    ..
        jmp     L9AA5                           ; 8B56 4C A5 9A                 L..
; ----------------------------------------------------------------------------
L8B59:  lda     $E7                             ; 8B59 A5 E7                    ..
        bit     #$80                            ; 8B5B 89 80                    ..
        bne     L8BA0                           ; 8B5D D0 41                    .A
        lda     $E8                             ; 8B5F A5 E8                    ..
        bne     L8B66                           ; 8B61 D0 03                    ..
        jmp     L939A                           ; 8B63 4C 9A 93                 L..
; ----------------------------------------------------------------------------
L8B66:  stz     $039D                           ; 8B66 9C 9D 03                 ...
        lda     $EA                             ; 8B69 A5 EA                    ..
        bne     L8B7F                           ; 8B6B D0 12                    ..
        jsr     L8AD5                           ; 8B6D 20 D5 8A                  ..
        bcs     L8B7B                           ; 8B70 B0 09                    ..
        dec     $039D                           ; 8B72 CE 9D 03                 ...
        lda     #$0D                            ; 8B75 A9 0D                    ..
        sec                                     ; 8B77 38                       8
        rts                                     ; 8B78 60                       `
; ----------------------------------------------------------------------------
L8B79:  inc     $E9                             ; 8B79 E6 E9                    ..
L8B7B:  lda     #$02                            ; 8B7B A9 02                    ..
        sta     $EA                             ; 8B7D 85 EA                    ..
L8B7F:  jsr     L8AD5                           ; 8B7F 20 D5 8A                  ..
        bcc     L8B9F                           ; 8B82 90 1B                    ..
        ldy     #$02                            ; 8B84 A0 02                    ..
        lda     ($E4),y                         ; 8B86 B1 E4                    ..
        beq     L8B8E                           ; 8B88 F0 04                    ..
        cmp     $EA                             ; 8B8A C5 EA                    ..
        beq     L8B92                           ; 8B8C F0 04                    ..
L8B8E:  inc     $EA                             ; 8B8E E6 EA                    ..
        beq     L8B79                           ; 8B90 F0 E7                    ..
L8B92:  lda     $EA                             ; 8B92 A5 EA                    ..
        cmp     ($E4),y                         ; 8B94 D1 E4                    ..
        bne     L8B9B                           ; 8B96 D0 03                    ..
        ror     $039D                           ; 8B98 6E 9D 03                 n..
L8B9B:  tay                                     ; 8B9B A8                       .
        lda     ($E4),y                         ; 8B9C B1 E4                    ..
        sec                                     ; 8B9E 38                       8
L8B9F:  rts                                     ; 8B9F 60                       `
; ----------------------------------------------------------------------------
L8BA0:  lda     #$0D                            ; 8BA0 A9 0D                    ..
        stz     $039D                           ; 8BA2 9C 9D 03                 ...
        dec     $039D                           ; 8BA5 CE 9D 03                 ...
        sec                                     ; 8BA8 38                       8
        rts                                     ; 8BA9 60                       `
; ----------------------------------------------------------------------------
L8BAA:  jsr     L8BB0                           ; 8BAA 20 B0 8B                  ..
        jmp     L993F                           ; 8BAD 4C 3F 99                 L?.
; ----------------------------------------------------------------------------
L8BB0:  sta     $039E                           ; 8BB0 8D 9E 03                 ...
        jsr     L8C36                           ; 8BB3 20 36 8C                  6.
        bcs     L8BB9                           ; 8BB6 B0 01                    ..
        rts                                     ; 8BB8 60                       `
; ----------------------------------------------------------------------------
L8BB9:  lda     $E7                             ; 8BB9 A5 E7                    ..
        bit     #$20                            ; 8BBB 89 20                    .
        bne     L8BC3                           ; 8BBD D0 04                    ..
        lda     #$3D                            ; 8BBF A9 3D                    .=
L8BC1:  clc                                     ; 8BC1 18                       .
        rts                                     ; 8BC2 60                       `
; ----------------------------------------------------------------------------
L8BC3:  bit     #$80                            ; 8BC3 89 80                    ..
        beq     L8BCB                           ; 8BC5 F0 04                    ..
L8BC7:  lda     #$49                            ; 8BC7 A9 49                    .I
        bra     L8BC1                           ; 8BC9 80 F6                    ..
L8BCB:  lda     $E6                             ; 8BCB A5 E6                    ..
        cmp     #$0F                            ; 8BCD C9 0F                    ..
        bne     L8BD7                           ; 8BCF D0 06                    ..
        jmp     L975D                           ; 8BD1 4C 5D 97                 L].
; ----------------------------------------------------------------------------
L8BD4:  sta     $039E                           ; 8BD4 8D 9E 03                 ...
L8BD7:  lda     $EA                             ; 8BD7 A5 EA                    ..
        bne     L8BE1                           ; 8BD9 D0 06                    ..
        jsr     L8A39                           ; 8BDB 20 39 8A                  9.
        bcs     L8BF7                           ; 8BDE B0 17                    ..
        rts                                     ; 8BE0 60                       `
; ----------------------------------------------------------------------------
L8BE1:  inc     $EA                             ; 8BE1 E6 EA                    ..
        bne     L8BFE                           ; 8BE3 D0 19                    ..
        jsr     L8A39                           ; 8BE5 20 39 8A                  9.
        bcc     L8C0E                           ; 8BE8 90 24                    .$
        jsr     L8AD5                           ; 8BEA 20 D5 8A                  ..
        bcc     L8C0E                           ; 8BED 90 1F                    ..
        ldy     #$02                            ; 8BEF A0 02                    ..
        lda     #$00                            ; 8BF1 A9 00                    ..
L8BF3:  sta     ($E4),y                         ; 8BF3 91 E4                    ..
        inc     $E9                             ; 8BF5 E6 E9                    ..
L8BF7:  ldy     #$03                            ; 8BF7 A0 03                    ..
        sty     $EA                             ; 8BF9 84 EA                    ..
        jsr     L89C6                           ; 8BFB 20 C6 89                  ..
L8BFE:  jsr     L8AD5                           ; 8BFE 20 D5 8A                  ..
        ldy     #$02                            ; 8C01 A0 02                    ..
        lda     $EA                             ; 8C03 A5 EA                    ..
        sta     ($E4),y                         ; 8C05 91 E4                    ..
        tay                                     ; 8C07 A8                       .
        lda     $039E                           ; 8C08 AD 9E 03                 ...
        sta     ($E4),y                         ; 8C0B 91 E4                    ..
        sec                                     ; 8C0D 38                       8
L8C0E:  rts                                     ; 8C0E 60                       `
; ----------------------------------------------------------------------------
L8C0F:  pha                                     ; 8C0F 48                       H
        lda     $EA                             ; 8C10 A5 EA                    ..
L8C12:  inc     a                               ; 8C12 1A                       .
        bne     L8C17                           ; 8C13 D0 02                    ..
        inc     $E9                             ; 8C15 E6 E9                    ..
L8C17:  cmp     #$03                            ; 8C17 C9 03                    ..
        bcc     L8C12                           ; 8C19 90 F7                    ..
L8C1B:  sta     $EA                             ; 8C1B 85 EA                    ..
        jsr     L8AD5                           ; 8C1D 20 D5 8A                  ..
        pla                                     ; 8C20 68                       h
        bcc     L8C27                           ; 8C21 90 04                    ..
        ldy     $EA                             ; 8C23 A4 EA                    ..
        sta     ($E4),y                         ; 8C25 91 E4                    ..
L8C27:  lda     #$47                            ; 8C27 A9 47                    .G
        rts                                     ; 8C29 60                       `
; ----------------------------------------------------------------------------
L8C2A:  .byte   $20                             ; 8C2A 20
L8C2B:  .byte   $3B                             ; 8C2B 3B                       ;
        sty     $894C                           ; 8C2C 8C 4C 89                 .L.
        .byte   $8C                             ; 8C2F 8C                       .
L8C30:  jsr     L8C3E                           ; 8C30 20 3E 8C                  >.
        jmp     L8C89                           ; 8C33 4C 89 8C                 L..
; ----------------------------------------------------------------------------
L8C36:  lda     LFS2ndAddr                      ; 8C36 A5 C4                    ..
        and     #$0F                            ; 8C38 29 0F                    ).
L8C3A:  .byte   $2C                             ; 8C3A 2C                       ,
L8C3B:  lda     #$11                            ; 8C3B A9 11                    ..
        .byte   $2C                             ; 8C3D 2C                       ,
L8C3E:  lda     #$10                            ; 8C3E A9 10                    ..
L8C40:  cmp     $E6                             ; 8C40 C5 E6                    ..
        beq     L8C66                           ; 8C42 F0 22                    ."
        pha                                     ; 8C44 48                       H
        lda     $E6                             ; 8C45 A5 E6                    ..
        jsr     L8C4D                           ; 8C47 20 4D 8C                  M.
L8C4A:  pla                                     ; 8C4A 68                       h
        sta     $E6                             ; 8C4B 85 E6                    ..
L8C4D:  inc     a                               ; 8C4D 1A                       .
        asl     a                               ; 8C4E 0A                       .
        asl     a                               ; 8C4F 0A                       .
        dec     a                               ; 8C50 3A                       :
        tax                                     ; 8C51 AA                       .
        ldy     #$03                            ; 8C52 A0 03                    ..
L8C54:  lda     $E7,y                           ; 8C54 B9 E7 00                 ...
        pha                                     ; 8C57 48                       H
        lda     $024D,x                         ; 8C58 BD 4D 02                 .M.
        sta     $E7,y                           ; 8C5B 99 E7 00                 ...
        pla                                     ; 8C5E 68                       h
        sta     $024D,x                         ; 8C5F 9D 4D 02                 .M.
        dex                                     ; 8C62 CA                       .
        dey                                     ; 8C63 88                       .
        bpl     L8C54                           ; 8C64 10 EE                    ..
L8C66:  lda     #$46                            ; 8C66 A9 46                    .F
L8C68:  clc                                     ; 8C68 18                       .
        ldx     $E7                             ; 8C69 A6 E7                    ..
        beq     L8C6E                           ; 8C6B F0 01                    ..
        sec                                     ; 8C6D 38                       8
L8C6E:  rts                                     ; 8C6E 60                       `
; ----------------------------------------------------------------------------
L8C6F:  lda     #$0E                            ; 8C6F A9 0E                    ..
        jsr     L8C40                           ; 8C71 20 40 8C                  @.
        ldx     #$47                            ; 8C74 A2 47                    .G
L8C76:  .byte   $9E                             ; 8C76 9E                       .
L8C77:  eor     $CA02                           ; 8C77 4D 02 CA                 M..
L8C7A:  bpl     L8C76                           ; 8C7A 10 FA                    ..
        stz     $02D5                           ; 8C7C 9C D5 02                 ...
        inx                                     ; 8C7F E8                       .
        txa                                     ; 8C80 8A                       .
        tay                                     ; 8C81 A8                       .
        sec                                     ; 8C82 38                       8
        jmp     L9964                           ; 8C83 4C 64 99                 Ld.
; ----------------------------------------------------------------------------
L8C86:  jsr     L8C36                           ; 8C86 20 36 8C                  6.
L8C89:  ldx     #$03                            ; 8C89 A2 03                    ..
L8C8B:  stz     $E7,x                           ; 8C8B 74 E7                    t.
        dex                                     ; 8C8D CA                       .
        bpl     L8C8B                           ; 8C8E 10 FB                    ..
        sec                                     ; 8C90 38                       8
        rts                                     ; 8C91 60                       `
; ----------------------------------------------------------------------------
L8C92:  lda     #$00                            ; 8C92 A9 00                    ..
        jsr     L8C9F                           ; 8C94 20 9F 8C                  ..
        bcc     L8C9E                           ; 8C97 90 05                    ..
        jsr     L8C89                           ; 8C99 20 89 8C                  ..
        bra     L8C92                           ; 8C9C 80 F4                    ..
L8C9E:  rts                                     ; 8C9E 60                       `
; ----------------------------------------------------------------------------
L8C9F:  tay                                     ; 8C9F A8                       .
        ldx     #$0F                            ; 8CA0 A2 0F                    ..
L8CA2:  phy                                     ; 8CA2 5A                       Z
        phx                                     ; 8CA3 DA                       .
        txa                                     ; 8CA4 8A                       .
        jsr     L8C40                           ; 8CA5 20 40 8C                  @.
        plx                                     ; 8CA8 FA                       .
        ply                                     ; 8CA9 7A                       z
        lda     $E7                             ; 8CAA A5 E7                    ..
        beq     L8CB6                           ; 8CAC F0 08                    ..
        bit     #$80                            ; 8CAE 89 80                    ..
        bne     L8CB6                           ; 8CB0 D0 04                    ..
        cpy     $E8                             ; 8CB2 C4 E8                    ..
        beq     L8CBA                           ; 8CB4 F0 04                    ..
L8CB6:  dex                                     ; 8CB6 CA                       .
        bpl     L8CA2                           ; 8CB7 10 E9                    ..
        clc                                     ; 8CB9 18                       .
L8CBA:  rts                                     ; 8CBA 60                       `
; ----------------------------------------------------------------------------
L8CBB:  stz     $E9                             ; 8CBB 64 E9                    d.
        stz     $EA                             ; 8CBD 64 EA                    d.
        stz     $E8                             ; 8CBF 64 E8                    d.
        bra     L8CCE                           ; 8CC1 80 0B                    ..
L8CC3:  jsr     L8CE6                           ; 8CC3 20 E6 8C                  ..
        bcc     L8CD1                           ; 8CC6 90 09                    ..
        clc                                     ; 8CC8 18                       .
        bit     $039D                           ; 8CC9 2C 9D 03                 ,..
        bmi     L8CD1                           ; 8CCC 30 03                    0.
L8CCE:  jsr     L8CE6                           ; 8CCE 20 E6 8C                  ..
L8CD1:  ldx     $EA                             ; 8CD1 A6 EA                    ..
        ldy     $03A7                           ; 8CD3 AC A7 03                 ...
        stx     $03A7                           ; 8CD6 8E A7 03                 ...
        sty     $EA                             ; 8CD9 84 EA                    ..
        ldx     $E9                             ; 8CDB A6 E9                    ..
        ldy     $03A6                           ; 8CDD AC A6 03                 ...
        stx     $03A6                           ; 8CE0 8E A6 03                 ...
        sty     $E9                             ; 8CE3 84 E9                    ..
        rts                                     ; 8CE5 60                       `
; ----------------------------------------------------------------------------
L8CE6:  ldx     $EA                             ; 8CE6 A6 EA                    ..
        ldy     $E9                             ; 8CE8 A4 E9                    ..
        stx     $03A7                           ; 8CEA 8E A7 03                 ...
        .byte   $8C                             ; 8CED 8C                       .
L8CEE:  ldx     $03                             ; 8CEE A6 03                    ..
        stz     $02D8                           ; 8CF0 9C D8 02                 ...
        ldx     #$FF                            ; 8CF3 A2 FF                    ..
L8CF5:  inx                                     ; 8CF5 E8                       .
        cpx     #$19                            ; 8CF6 E0 19                    ..
        beq     L8D13                           ; 8CF8 F0 19                    ..
        phx                                     ; 8CFA DA                       .
        jsr     L8B66                           ; 8CFB 20 66 8B                  f.
        plx                                     ; 8CFE FA                       .
        bcc     L8D15                           ; 8CFF 90 14                    ..
        sta     $0218,x                         ; 8D01 9D 18 02                 ...
        cpx     #$05                            ; 8D04 E0 05                    ..
        bit     $039D                           ; 8D06 2C 9D 03                 ,..
        bmi     L8D12                           ; 8D09 30 07                    0.
        bcc     L8CF5                           ; 8D0B 90 E8                    ..
        cmp     #$00                            ; 8D0D C9 00                    ..
        bne     L8CF5                           ; 8D0F D0 E4                    ..
        sec                                     ; 8D11 38                       8
L8D12:  rts                                     ; 8D12 60                       `
; ----------------------------------------------------------------------------
L8D13:  lda     #$43                            ; 8D13 A9 43                    .C
L8D15:  clc                                     ; 8D15 18                       .
        rts                                     ; 8D16 60                       `
; ----------------------------------------------------------------------------
L8D17:  jsr     L8C92                           ; 8D17 20 92 8C                  ..
        jsr     L8C3E                           ; 8D1A 20 3E 8C                  >.
        jsr     L8CE6                           ; 8D1D 20 E6 8C                  ..
        bcc     L8D3C                           ; 8D20 90 1A                    ..
L8D22:  bit     $039D                           ; 8D22 2C 9D 03                 ,..
        bmi     L8D3C                           ; 8D25 30 15                    0.
L8D27:  jsr     L8B66                           ; 8D27 20 66 8B                  f.
        bcc     L8D5A                           ; 8D2A 90 2E                    ..
        jsr     L8CD1                           ; 8D2C 20 D1 8C                  ..
        jsr     L8C0F                           ; 8D2F 20 0F 8C                  ..
        bcc     L8D5A                           ; 8D32 90 26                    .&
        jsr     L8CD1                           ; 8D34 20 D1 8C                  ..
        bit     $039D                           ; 8D37 2C 9D 03                 ,..
        bpl     L8D27                           ; 8D3A 10 EB                    ..
L8D3C:  jsr     L8CD1                           ; 8D3C 20 D1 8C                  ..
        jsr     L8AD5                           ; 8D3F 20 D5 8A                  ..
        lda     #$47                            ; 8D42 A9 47                    .G
        bcc     L8D5A                           ; 8D44 90 14                    ..
        lda     $EA                             ; 8D46 A5 EA                    ..
        beq     L8D50                           ; 8D48 F0 06                    ..
        ldy     #$02                            ; 8D4A A0 02                    ..
        sta     ($E4),y                         ; 8D4C 91 E4                    ..
        inc     $E9                             ; 8D4E E6 E9                    ..
L8D50:  jsr     L89F9                           ; 8D50 20 F9 89                  ..
        jsr     L8C30                           ; 8D53 20 30 8C                  0.
        jsr     L8E39                           ; 8D56 20 39 8E                  9.
        sec                                     ; 8D59 38                       8
L8D5A:  rts                                     ; 8D5A 60                       `
; ----------------------------------------------------------------------------
L8D5B:  jsr     L8E10                           ; 8D5B 20 10 8E                  ..
        lda     #$30                            ; 8D5E A9 30                    .0
        trb     $0218                           ; 8D60 1C 18 02                 ...
L8D63:  jsr     L8E91                           ; 8D63 20 91 8E                  ..
        bcc     L8D9E                           ; 8D66 90 36                    .6
        jsr     L8C92                           ; 8D68 20 92 8C                  ..
        jsr     L8C30                           ; 8D6B 20 30 8C                  0.
        lda     #$10                            ; 8D6E A9 10                    ..
        sta     $E7                             ; 8D70 85 E7                    ..
L8D72:  jsr     L8B66                           ; 8D72 20 66 8B                  f.
        bcs     L8D7A                           ; 8D75 B0 03                    ..
        lda     #$47                            ; 8D77 A9 47                    .G
        rts                                     ; 8D79 60                       `
; ----------------------------------------------------------------------------
L8D7A:  lda     $039D                           ; 8D7A AD 9D 03                 ...
        bpl     L8D72                           ; 8D7D 10 F3                    ..
        lda     #$20                            ; 8D7F A9 20                    .
        tsb     $E7                             ; 8D81 04 E7                    ..
        ldx     #$FF                            ; 8D83 A2 FF                    ..
L8D85:  inx                                     ; 8D85 E8                       .
        phx                                     ; 8D86 DA                       .
        lda     $0218,x                         ; 8D87 BD 18 02                 ...
        jsr     L8BD4                           ; 8D8A 20 D4 8B                  ..
        plx                                     ; 8D8D FA                       .
        cpx     #$05                            ; 8D8E E0 05                    ..
        bcc     L8D85                           ; 8D90 90 F3                    ..
        lda     $0218,x                         ; 8D92 BD 18 02                 ...
        bne     L8D85                           ; 8D95 D0 EE                    ..
        jsr     L8C30                           ; 8D97 20 30 8C                  0.
        jsr     L8E39                           ; 8D9A 20 39 8E                  9.
        sec                                     ; 8D9D 38                       8
L8D9E:  rts                                     ; 8D9E 60                       `
; ----------------------------------------------------------------------------
L8D9F:  jsr     L8C30                           ; 8D9F 20 30 8C                  0.
        jsr     L8CBB                           ; 8DA2 20 BB 8C                  ..
        bra     L8DAA                           ; 8DA5 80 03                    ..
L8DA7:  jsr     L8CC3                           ; 8DA7 20 C3 8C                  ..
L8DAA:  bcc     L8DBA                           ; 8DAA 90 0E                    ..
        jsr     L8FC3                           ; 8DAC 20 C3 8F                  ..
        bcc     L8DB5                           ; 8DAF 90 04                    ..
        lda     $0218                           ; 8DB1 AD 18 02                 ...
        rts                                     ; 8DB4 60                       `
; ----------------------------------------------------------------------------
L8DB5:  bit     $039D                           ; 8DB5 2C 9D 03                 ,..
        bpl     L8DA7                           ; 8DB8 10 ED                    ..
L8DBA:  clc                                     ; 8DBA 18                       .
        lda     #$3E                            ; 8DBB A9 3E                    .>
        rts                                     ; 8DBD 60                       `
; ----------------------------------------------------------------------------
L8DBE:  pha                                     ; 8DBE 48                       H
        jsr     L8C30                           ; 8DBF 20 30 8C                  0.
        jsr     L8CBB                           ; 8DC2 20 BB 8C                  ..
        bra     L8DCA                           ; 8DC5 80 03                    ..
L8DC7:  jsr     L8CC3                           ; 8DC7 20 C3 8C                  ..
L8DCA:  bcc     L8DDC                           ; 8DCA 90 10                    ..
        lda     $0218                           ; 8DCC AD 18 02                 ...
        bit     #$80                            ; 8DCF 89 80                    ..
        bne     L8DC7                           ; 8DD1 D0 F4                    ..
        tsx                                     ; 8DD3 BA                       .
        lda     $0219                           ; 8DD4 AD 19 02                 ...
        cmp     stack+1,x                       ; 8DD7 DD 01 01                 ...
        bne     L8DC7                           ; 8DDA D0 EB                    ..
L8DDC:  pla                                     ; 8DDC 68                       h
        lda     #$3E                            ; 8DDD A9 3E                    .>
        rts                                     ; 8DDF 60                       `
; ----------------------------------------------------------------------------
L8DE0:  lda     $0219                           ; 8DE0 AD 19 02                 ...
        .byte   $2C                             ; 8DE3 2C                       ,
L8DE4:  lda     #$00                            ; 8DE4 A9 00                    ..
        ldx     #$00                            ; 8DE6 A2 00                    ..
        phx                                     ; 8DE8 DA                       .
        phx                                     ; 8DE9 DA                       .
        pha                                     ; 8DEA 48                       H
        jsr     L8A81                           ; 8DEB 20 81 8A                  ..
        beq     L8E0A                           ; 8DEE F0 1A                    ..
L8DF0:  tsx                                     ; 8DF0 BA                       .
        lda     $020E                           ; 8DF1 AD 0E 02                 ...
        cmp     stack+1,x                       ; 8DF4 DD 01 01                 ...
        bne     L8E05                           ; 8DF7 D0 0C                    ..
        inc     stack+2,x                       ; 8DF9 FE 02 01                 ...
        ldy     #$02                            ; 8DFC A0 02                    ..
        lda     ($E4),y                         ; 8DFE B1 E4                    ..
        beq     L8E05                           ; 8E00 F0 03                    ..
        sta     stack+3,x                       ; 8E02 9D 03 01                 ...
L8E05:  jsr     L8A61                           ; 8E05 20 61 8A                  a.
        bcs     L8DF0                           ; 8E08 B0 E6                    ..
L8E0A:  pla                                     ; 8E0A 68                       h
        pla                                     ; 8E0B 68                       h
        ply                                     ; 8E0C 7A                       z
        cmp     #$00                            ; 8E0D C9 00                    ..
        rts                                     ; 8E0F 60                       `
; ----------------------------------------------------------------------------
L8E10:  lda     $0219                           ; 8E10 AD 19 02                 ...
        jsr     L8E5E                           ; 8E13 20 5E 8E                  ^.
        sta     $021A                           ; 8E16 8D 1A 02                 ...
        stx     $021B                           ; 8E19 8E 1B 02                 ...
        sty     $021C                           ; 8E1C 8C 1C 02                 ...
        rts                                     ; 8E1F 60                       `
; ----------------------------------------------------------------------------
L8E20:  lda     $0219                           ; 8E20 AD 19 02                 ...
        .byte   $20                             ; 8E23 20
        .byte   $5E                             ; 8E24 5E                       ^
L8E25:  stx     $1ACD                           ; 8E25 8E CD 1A                 ...
        .byte   $02                             ; 8E28 02                       .
        bne     L8E35                           ; 8E29 D0 0A                    ..
        cpx     $021B                           ; 8E2B EC 1B 02                 ...
        bne     L8E35                           ; 8E2E D0 05                    ..
        cpy     $021C                           ; 8E30 CC 1C 02                 ...
        beq     L8E36                           ; 8E33 F0 01                    ..
L8E35:  clc                                     ; 8E35 18                       .
L8E36:  lda     #$1B                            ; 8E36 A9 1B                    ..
        rts                                     ; 8E38 60                       `
; ----------------------------------------------------------------------------
L8E39:  jsr     L8E5C                           ; 8E39 20 5C 8E                  \.
        sta     $0213                           ; 8E3C 8D 13 02                 ...
        stx     $0214                           ; 8E3F 8E 14 02                 ...
        sty     $0215                           ; 8E42 8C 15 02                 ...
        rts                                     ; 8E45 60                       `
; ----------------------------------------------------------------------------
L8E46:  jsr     L8E5C                           ; 8E46 20 5C 8E                  \.
        cmp     $0213                           ; 8E49 CD 13 02                 ...
        bne     L8E58                           ; 8E4C D0 0A                    ..
        cpx     $0214                           ; 8E4E EC 14 02                 ...
        bne     L8E58                           ; 8E51 D0 05                    ..
        cpy     $0215                           ; 8E53 CC 15 02                 ...
        beq     L8E59                           ; 8E56 F0 01                    ..
L8E58:  clc                                     ; 8E58 18                       .
L8E59:  lda     #$1B                            ; 8E59 A9 1B                    ..
        rts                                     ; 8E5B 60                       `
; ----------------------------------------------------------------------------
L8E5C:  lda     #$00                            ; 8E5C A9 00                    ..
L8E5E:  ldx     #$00                            ; 8E5E A2 00                    ..
        phx                                     ; 8E60 DA                       .
        phx                                     ; 8E61 DA                       .
        pha                                     ; 8E62 48                       H
        jsr     L8A81                           ; 8E63 20 81 8A                  ..
        beq     L8E8D                           ; 8E66 F0 25                    .%
        lda     #$00                            ; 8E68 A9 00                    ..
L8E6A:  tsx                                     ; 8E6A BA                       .
        ldy     stack+1,x                       ; 8E6B BC 01 01                 ...
        cpy     $020E                           ; 8E6E CC 0E 02                 ...
        bne     L8E86                           ; 8E71 D0 13                    ..
        ldy     #$00                            ; 8E73 A0 00                    ..
        clc                                     ; 8E75 18                       .
L8E76:  adc     ($E4),y                         ; 8E76 71 E4                    q.
        bcc     L8E83                           ; 8E78 90 09                    ..
        clc                                     ; 8E7A 18                       .
        inc     stack+2,x                       ; 8E7B FE 02 01                 ...
        bne     L8E83                           ; 8E7E D0 03                    ..
        inc     stack+3,x                       ; 8E80 FE 03 01                 ...
L8E83:  iny                                     ; 8E83 C8                       .
        bne     L8E76                           ; 8E84 D0 F0                    ..
L8E86:  pha                                     ; 8E86 48                       H
        jsr     L8A61                           ; 8E87 20 61 8A                  a.
        pla                                     ; 8E8A 68                       h
        bcs     L8E6A                           ; 8E8B B0 DD                    ..
L8E8D:  plx                                     ; 8E8D FA                       .
        plx                                     ; 8E8E FA                       .
        ply                                     ; 8E8F 7A                       z
        rts                                     ; 8E90 60                       `
; ----------------------------------------------------------------------------
L8E91:  jsr     L8DE4                           ; 8E91 20 E4 8D                  ..
        beq     L8EA7                           ; 8E94 F0 11                    ..
        tya                                     ; 8E96 98                       .
        ldx     #$FF                            ; 8E97 A2 FF                    ..
L8E99:  inc     a                               ; 8E99 1A                       .
        beq     L8EA7                           ; 8E9A F0 0B                    ..
        inx                                     ; 8E9C E8                       .
        cpx     #$05                            ; 8E9D E0 05                    ..
        bcc     L8E99                           ; 8E9F 90 F8                    ..
        lda     $021D,x                         ; 8EA1 BD 1D 02                 ...
        bne     L8E99                           ; 8EA4 D0 F3                    ..
        rts                                     ; 8EA6 60                       `
; ----------------------------------------------------------------------------
L8EA7:  jsr     L8A39                           ; 8EA7 20 39 8A                  9.
        bcc     L8EAE                           ; 8EAA 90 02                    ..
        lda     #$01                            ; 8EAC A9 01                    ..
L8EAE:  rts                                     ; 8EAE 60                       `
; ----------------------------------------------------------------------------
L8EAF:  lda     FNptr_lo                        ; 8EAF A5 AE                    ..
        ldx     FNptr_hi                        ; 8EB1 A6 AF                    ..
        ldy     FNlength                        ; 8EB3 AC 87 03                 ...
        sta     $E2                             ; 8EB6 85 E2                    ..
        stx     $E3                             ; 8EB8 86 E3                    ..
        sty     $039F                           ; 8EBA 8C 9F 03                 ...
L8EBD:  stz     $03A5                           ; 8EBD 9C A5 03                 ...
        stz     $03A3                           ; 8EC0 9C A3 03                 ...
        stz     $03A4                           ; 8EC3 9C A4 03                 ...
        stz     $03A0                           ; 8EC6 9C A0 03                 ...
        lda     #$E2                            ; 8EC9 A9 E2                    ..
        sta     $034E                           ; 8ECB 8D 4E 03                 .N.
        lda     $039F                           ; 8ECE AD 9F 03                 ...
        bne     L8ED7                           ; 8ED1 D0 04                    ..
L8ED3:  lda     #$21                            ; 8ED3 A9 21                    .!
        clc                                     ; 8ED5 18                       .
        rts                                     ; 8ED6 60                       `
; ----------------------------------------------------------------------------
L8ED7:  ldy     #$00                            ; 8ED7 A0 00                    ..
        jsr     L8FAD                           ; 8ED9 20 AD 8F                  ..
        dey                                     ; 8EDC 88                       .
        bcc     L8ED3                           ; 8EDD 90 F4                    ..
        cmp     #$24                            ; 8EDF C9 24                    .$
        beq     L8EE7                           ; 8EE1 F0 04                    ..
        cmp     #$40                            ; 8EE3 C9 40                    .@
        bne     L8EEB                           ; 8EE5 D0 04                    ..
L8EE7:  iny                                     ; 8EE7 C8                       .
        sta     $03A0                           ; 8EE8 8D A0 03                 ...
L8EEB:  sty     $03A1                           ; 8EEB 8C A1 03                 ...
L8EEE:  sty     $03A2                           ; 8EEE 8C A2 03                 ...
        cpy     $039F                           ; 8EF1 CC 9F 03                 ...
        bne     L8EF9                           ; 8EF4 D0 03                    ..
        jmp     L8F86                           ; 8EF6 4C 86 8F                 L..
; ----------------------------------------------------------------------------
L8EF9:  jsr     L8FAD                           ; 8EF9 20 AD 8F                  ..
        bcc     L8ED3                           ; 8EFC 90 D5                    ..
        tax                                     ; 8EFE AA                       .
        cpx     #$20                            ; 8EFF E0 20                    .
        beq     L8EEE                           ; 8F01 F0 EB                    ..
        cpx     #$30                            ; 8F03 E0 30                    .0
        beq     L8EEE                           ; 8F05 F0 E7                    ..
        cpx     #$3A                            ; 8F07 E0 3A                    .:
        bne     L8F14                           ; 8F09 D0 09                    ..
        lda     #$03                            ; 8F0B A9 03                    ..
        tsb     $03A5                           ; 8F0D 0C A5 03                 ...
        bne     L8ED3                           ; 8F10 D0 C1                    ..
        bra     L8EEB                           ; 8F12 80 D7                    ..
L8F14:  lda     #$02                            ; 8F14 A9 02                    ..
        tsb     $03A5                           ; 8F16 0C A5 03                 ...
        cpx     #$3D                            ; 8F19 E0 3D                    .=
        beq     L8F81                           ; 8F1B F0 64                    .d
        cpx     #$3F                            ; 8F1D E0 3F                    .?
        beq     L8F25                           ; 8F1F F0 04                    ..
        cpx     #$2A                            ; 8F21 E0 2A                    .*
        bne     L8F2A                           ; 8F23 D0 05                    ..
L8F25:  lda     #$40                            ; 8F25 A9 40                    .@
        tsb     $03A5                           ; 8F27 0C A5 03                 ...
L8F2A:  cpx     #$2C                            ; 8F2A E0 2C                    .,
        bne     L8EEE                           ; 8F2C D0 C0                    ..
        dey                                     ; 8F2E 88                       .
L8F2F:  cpy     $039F                           ; 8F2F CC 9F 03                 ...
        beq     L8F86                           ; 8F32 F0 52                    .R
        jsr     L8FAD                           ; 8F34 20 AD 8F                  ..
        bcc     L8F5F                           ; 8F37 90 26                    .&
        cmp     #$3D                            ; 8F39 C9 3D                    .=
        beq     L8F81                           ; 8F3B F0 44                    .D
        cmp     #$20                            ; 8F3D C9 20                    .
        beq     L8F2F                           ; 8F3F F0 EE                    ..
        cmp     #$2C                            ; 8F41 C9 2C                    .,
        bne     L8F5F                           ; 8F43 D0 1A                    ..
L8F45:  cpy     $039F                           ; 8F45 CC 9F 03                 ...
        bcs     L8F5F                           ; 8F48 B0 15                    ..
        jsr     L8FAD                           ; 8F4A 20 AD 8F                  ..
        bcc     L8F5F                           ; 8F4D 90 10                    ..
        cmp     #$20                            ; 8F4F C9 20                    .
        beq     L8F45                           ; 8F51 F0 F2                    ..
        and     #$DF                            ; 8F53 29 DF                    ).
        ldx     #$05                            ; 8F55 A2 05                    ..
L8F57:  cmp     L8F7B,x                         ; 8F57 DD 7B 8F                 .{.
        beq     L8F63                           ; 8F5A F0 07                    ..
        dex                                     ; 8F5C CA                       .
        bpl     L8F57                           ; 8F5D 10 F8                    ..
L8F5F:  lda     #$21                            ; 8F5F A9 21                    .!
        clc                                     ; 8F61 18                       .
        rts                                     ; 8F62 60                       `
; ----------------------------------------------------------------------------
L8F63:  cpx     #$02                            ; 8F63 E0 02                    ..
        bcs     L8F71                           ; 8F65 B0 0A                    ..
        ldx     $03A4                           ; 8F67 AE A4 03                 ...
        bne     L8F5F                           ; 8F6A D0 F3                    ..
        sta     $03A4                           ; 8F6C 8D A4 03                 ...
        bra     L8F2F                           ; 8F6F 80 BE                    ..
L8F71:  ldx     $03A3                           ; 8F71 AE A3 03                 ...
        bne     L8F5F                           ; 8F74 D0 E9                    ..
        sta     $03A3                           ; 8F76 8D A3 03                 ...
        bra     L8F2F                           ; 8F79 80 B4                    ..
L8F7B:  .byte   $53                             ; 8F7B 53                       S
        bvc     L8FD0                           ; 8F7C 50 52                    PR
        rmb5    $41                             ; 8F7E 57 41                    WA
        .byte   $4D                             ; 8F80 4D                       M
L8F81:  lda     #$20                            ; 8F81 A9 20                    .
        tsb     $03A5                           ; 8F83 0C A5 03                 ...
L8F86:  lda     $03A1                           ; 8F86 AD A1 03                 ...
        cmp     $03A2                           ; 8F89 CD A2 03                 ...
        bcc     L8F96                           ; 8F8C 90 08                    ..
        stz     $03A2                           ; 8F8E 9C A2 03                 ...
        stz     $03A1                           ; 8F91 9C A1 03                 ...
        bcs     L8F9B                           ; 8F94 B0 05                    ..
L8F96:  lda     #$80                            ; 8F96 A9 80                    ..
        tsb     $03A5                           ; 8F98 0C A5 03                 ...
L8F9B:  cld                                     ; 8F9B D8                       .
        clc                                     ; 8F9C 18                       .
        lda     #$10                            ; 8F9D A9 10                    ..
        adc     $03A1                           ; 8F9F 6D A1 03                 m..
        cmp     $03A2                           ; 8FA2 CD A2 03                 ...
        lda     #$21                            ; 8FA5 A9 21                    .!
        bcc     L8FAC                           ; 8FA7 90 03                    ..
        .byte   $AD                             ; 8FA9 AD                       .
L8FAA:  lda     $03                             ; 8FAA A5 03                    ..
L8FAC:  rts                                     ; 8FAC 60                       `
; ----------------------------------------------------------------------------
L8FAD:  jsr     FROM_C67B                       ; 8FAD 20 4A 03                  J.
        iny                                     ; 8FB0 C8                       .
L8FB1:  ldx     #$03                            ; 8FB1 A2 03                    ..
L8FB3:  .byte   $DD                             ; 8FB3 DD                       .
L8FB4:  bbs3    $8F,$8F                         ; 8FB4 BF 8F D0                 ...
        .byte   $02                             ; 8FB7 02                       .
        clc                                     ; 8FB8 18                       .
        rts                                     ; 8FB9 60                       `
; ----------------------------------------------------------------------------
L8FBA:  dex                                     ; 8FBA CA                       .
        bpl     L8FB3                           ; 8FBB 10 F6                    ..
        sec                                     ; 8FBD 38                       8
        rts                                     ; 8FBE 60                       `
; ----------------------------------------------------------------------------
L8FBF:  brk                                     ; 8FBF 00                       .
        ora     L8D22                           ; 8FC0 0D 22 8D                 .".
L8FC3:  ldx     #$00                            ; 8FC3 A2 00                    ..
        ldy     $03A1                           ; 8FC5 AC A1 03                 ...
        lda     #$E2                            ; 8FC8 A9 E2                    ..
        sta     $034E                           ; 8FCA 8D 4E 03                 .N.
L8FCD:  jsr     FROM_C67B                       ; 8FCD 20 4A 03                  J.
L8FD0:  cmp     #$2A                            ; 8FD0 C9 2A                    .*
        beq     L8FE9                           ; 8FD2 F0 15                    ..
        cmp     #$3F                            ; 8FD4 C9 3F                    .?
        beq     L8FDD                           ; 8FD6 F0 05                    ..
        cmp     $021D,x                         ; 8FD8 DD 1D 02                 ...
        bne     L8FF1                           ; 8FDB D0 14                    ..
L8FDD:  iny                                     ; 8FDD C8                       .
        cpy     $03A2                           ; 8FDE CC A2 03                 ...
        bne     L8FEB                           ; 8FE1 D0 08                    ..
        inx                                     ; 8FE3 E8                       .
        lda     $021D,x                         ; 8FE4 BD 1D 02                 ...
        bne     L8FF1                           ; 8FE7 D0 08                    ..
L8FE9:  sec                                     ; 8FE9 38                       8
        rts                                     ; 8FEA 60                       `
; ----------------------------------------------------------------------------
L8FEB:  inx                                     ; 8FEB E8                       .
        .byte   $BD                             ; 8FEC BD                       .
L8FED:  ora     $D002,x                         ; 8FED 1D 02 D0                 ...
        .byte   $DC                             ; 8FF0 DC                       .
L8FF1:  clc                                     ; 8FF1 18                       .
        rts                                     ; 8FF2 60                       `
; ----------------------------------------------------------------------------
L8FF3:  stz     $02D8                           ; 8FF3 9C D8 02                 ...
        lda     #$E2                            ; 8FF6 A9 E2                    ..
        sta     $034E                           ; 8FF8 8D 4E 03                 .N.
        ldx     #$00                            ; 8FFB A2 00                    ..
        ldy     $03A1                           ; 8FFD AC A1 03                 ...
L9000:  jsr     FROM_C67B                       ; 9000 20 4A 03                  J.
        sta     $021D,x                         ; 9003 9D 1D 02                 ...
        inx                                     ; 9006 E8                       .
        iny                                     ; 9007 C8                       .
        cpy     $03A2                           ; 9008 CC A2 03                 ...
        bne     L9000                           ; 900B D0 F3                    ..
        stz     $021D,x                         ; 900D 9E 1D 02                 ...
        rts                                     ; 9010 60                       `
; ----------------------------------------------------------------------------
L9011:  ldx     #$53                            ; 9011 A2 53                    .S
        lda     $0218                           ; 9013 AD 18 02                 ...
        bit     #$40                            ; 9016 89 40                    .@
        beq     L901C                           ; 9018 F0 02                    ..
        ldx     #$50                            ; 901A A2 50                    .P
L901C:  lda     #$40                            ; 901C A9 40                    .@
        cpx     $03A4                           ; 901E EC A4 03                 ...
        beq     L9029                           ; 9021 F0 06                    ..
        ldy     $03A4                           ; 9023 AC A4 03                 ...
L9026:  beq     L9029                           ; 9026 F0 01                    ..
        clc                                     ; 9028 18                       .
L9029:  stx     $03A4                           ; 9029 8E A4 03                 ...
        rts                                     ; 902C 60                       `
; ----------------------------------------------------------------------------
L902D:  ldx     #$04                            ; 902D A2 04                    ..
        lda     $0218                           ; 902F AD 18 02                 ...
        bit     #$80                            ; 9032 89 80                    ..
        bne     L9038                           ; 9034 D0 02                    ..
        ldx     #$01                            ; 9036 A2 01                    ..
L9038:  lda     $0218,x                         ; 9038 BD 18 02                 ...
        sta     $E7,x                           ; 903B 95 E7                    ..
        dex                                     ; 903D CA                       .
        bpl     L9038                           ; 903E 10 F8                    ..
        rts                                     ; 9040 60                       `
; ----------------------------------------------------------------------------
L9041:  jsr     L8C92                           ; 9041 20 92 8C                  ..
        stz     $02D6                           ; 9044 9C D6 02                 ...
        lda     #$2A                            ; 9047 A9 2A                    .*
        sta     $0238                           ; 9049 8D 38 02                 .8.
        stz     $0239                           ; 904C 9C 39 02                 .9.
        stz     $024C                           ; 904F 9C 4C 02                 .L.
        lda     $03A5                           ; 9052 AD A5 03                 ...
        bit     #$80                            ; 9055 89 80                    ..
        beq     L907D                           ; 9057 F0 24                    .$
        ldx     #$00                            ; 9059 A2 00                    ..
        ldy     $03A1                           ; 905B AC A1 03                 ...
L905E:  lda     #$E2                            ; 905E A9 E2                    ..
        sta     $034E                           ; 9060 8D 4E 03                 .N.
        jsr     FROM_C67B                       ; 9063 20 4A 03                  J.
        sta     $0238,x                         ; 9066 9D 38 02                 .8.
        iny                                     ; 9069 C8                       .
        inx                                     ; 906A E8                       .
        cpy     $03A2                           ; 906B CC A2 03                 ...
        bne     L905E                           ; 906E D0 EE                    ..
        cpx     #$14                            ; 9070 E0 14                    ..
        bcs     L9077                           ; 9072 B0 03                    ..
        stz     $0238,x                         ; 9074 9E 38 02                 .8.
L9077:  .byte   $AD                             ; 9077 AD                       .
        .byte   $A4                             ; 9078 A4                       .
L9079:  .byte   $03                             ; 9079 03                       .
        sta     $024C                           ; 907A 8D 4C 02                 .L.
L907D:  sec                                     ; 907D 38                       8
        rts                                     ; 907E 60                       `
; ----------------------------------------------------------------------------
        ldx     $B2                             ; 907F A6 B2                    ..
        ldy     $B3                             ; 9081 A4 B3                    ..
        sec                                     ; 9083 38                       8
        rts                                     ; 9084 60                       `
; ----------------------------------------------------------------------------
L9085:  jsr     L908B                           ; 9085 20 8B 90                  ..
        jmp     L993F                           ; 9088 4C 3F 99                 L?.
; ----------------------------------------------------------------------------
L908B:  ldx     $B7                             ; 908B A6 B7                    ..
        lda     $B6                             ; 908D A5 B6                    ..
        sta     $B8                             ; 908F 85 B8                    ..
        stx     $B9                             ; 9091 86 B9                    ..
        cpx     #$08                            ; 9093 E0 08                    ..
        bcc     L90DD                           ; 9095 90 46                    .F
        cpx     #$F8                            ; 9097 E0 F8                    ..
        bcs     L90DD                           ; 9099 B0 42                    .B
        lda     $B3                             ; 909B A5 B3                    ..
        cmp     #$F8                            ; 909D C9 F8                    ..
        bcc     L90A7                           ; 909F 90 06                    ..
        bne     L90DD                           ; 90A1 D0 3A                    .:
        lda     $B2                             ; 90A3 A5 B2                    ..
        bne     L90DD                           ; 90A5 D0 36                    .6
L90A7:  jsr     L8EAF                           ; 90A7 20 AF 8E                  ..
        bcc     L90DA                           ; 90AA 90 2E                    ..
        bit     #$80                            ; 90AC 89 80                    ..
        beq     L90DA                           ; 90AE F0 2A                    .*
        bit     #$60                            ; 90B0 89 60                    .`
        bne     L90DA                           ; 90B2 D0 26                    .&
        lda     $03A3                           ; 90B4 AD A3 03                 ...
        bne     L90DA                           ; 90B7 D0 21                    .!
        lda     $03A0                           ; 90B9 AD A0 03                 ...
        beq     L90C2                           ; 90BC F0 04                    ..
        cmp     #$40                            ; 90BE C9 40                    .@
        bne     L90DA                           ; 90C0 D0 18                    ..
L90C2:  .byte   $20                             ; 90C2 20
L90C3:  bbs1    $8D,$8D                         ; 90C3 9F 8D 90                 ...
        and     StopKeyFlag                     ; 90C6 25 AD                    %.
        ldy     #$03                            ; 90C8 A0 03                    ..
        .byte   $D0                             ; 90CA D0                       .
L90CB:  tsb     $A9                             ; 90CB 04 A9                    ..
        bbr3    $80,L90DF                       ; 90CD 3F 80 0F                 ?..
L90D0:  .byte   $AD                             ; 90D0 AD                       .
        clc                                     ; 90D1 18                       .
L90D2:  .byte   $02                             ; 90D2 02                       .
        and     #$80                            ; 90D3 29 80                    ).
        beq     L90E1                           ; 90D5 F0 0A                    ..
        lda     #$1A                            ; 90D7 A9 1A                    ..
        .byte   $2C                             ; 90D9 2C                       ,
L90DA:  lda     #$21                            ; 90DA A9 21                    .!
        .byte   $2C                             ; 90DC 2C                       ,
L90DD:  lda     #$19                            ; 90DD A9 19                    ..
L90DF:  clc                                     ; 90DF 18                       .
        rts                                     ; 90E0 60                       `
; ----------------------------------------------------------------------------
L90E1:  jsr     L9011                           ; 90E1 20 11 90                  ..
        bcc     L90DF                           ; 90E4 90 F9                    ..
        jsr     L8DE0                           ; 90E6 20 E0 8D                  ..
        inc     a                               ; 90E9 1A                       .
        bra     L910D                           ; 90EA 80 21                    .!
L90EC:  stz     $03A0                           ; 90EC 9C A0 03                 ...
        jsr     L8B13                           ; 90EF 20 13 8B                  ..
L90F2:  bcc     L90DF                           ; 90F2 90 EB                    ..
        jsr     L8FF3                           ; 90F4 20 F3 8F                  ..
        stz     $0218                           ; 90F7 9C 18 02                 ...
        lda     $03A4                           ; 90FA AD A4 03                 ...
        cmp     #$53                            ; 90FD C9 53                    .S
        beq     L9106                           ; 90FF F0 05                    ..
        lda     #$40                            ; 9101 A9 40                    .@
        sta     $0218                           ; 9103 8D 18 02                 ...
L9106:  .byte   $20                             ; 9106 20
        .byte   $91                             ; 9107 91                       .
L9108:  stx     $D490                           ; 9108 8E 90 D4                 ...
        eor     #$01                            ; 910B 49 01                    I.
L910D:  pha                                     ; 910D 48                       H
        .byte   $20                             ; 910E 20
        .byte   $A4                             ; 910F A4                       .
L9110:  sta     ($8C),y                         ; 9110 91 8C                    ..
        inc     a                               ; 9112 1A                       .
        .byte   $02                             ; 9113 02                       .
        pla                                     ; 9114 68                       h
        clc                                     ; 9115 18                       .
        adc     $020A                           ; 9116 6D 0A 02                 m..
        ldx     $020B                           ; 9119 AE 0B 02                 ...
        bcc     L911F                           ; 911C 90 01                    ..
        inx                                     ; 911E E8                       .
L911F:  clc                                     ; 911F 18                       .
        sbc     $021A                           ; 9120 ED 1A 02                 ...
        bcs     L9126                           ; 9123 B0 01                    ..
        dex                                     ; 9125 CA                       .
L9126:  tay                                     ; 9126 A8                       .
        bne     L912A                           ; 9127 D0 01                    ..
        dex                                     ; 9129 CA                       .
L912A:  dec     a                               ; 912A 3A                       :
        cpx     $020D                           ; 912B EC 0D 02                 ...
        bcc     L9137                           ; 912E 90 07                    ..
        bne     L913A                           ; 9130 D0 08                    ..
        cmp     $020C                           ; 9132 CD 0C 02                 ...
        bcs     L913A                           ; 9135 B0 03                    ..
L9137:  jmp     L90DD                           ; 9137 4C DD 90                 L..
; ----------------------------------------------------------------------------
L913A:  cpx     #$00                            ; 913A E0 00                    ..
        bne     L9145                           ; 913C D0 07                    ..
        cmp     $B7                             ; 913E C5 B7                    ..
        bcs     L9145                           ; 9140 B0 03                    ..
        jsr     L91D5                           ; 9142 20 D5 91                  ..
L9145:  lda     $03A0                           ; 9145 AD A0 03                 ...
        beq     L9150                           ; 9148 F0 06                    ..
        jsr     L89E2                           ; 914A 20 E2 89                  ..
        jsr     L8D17                           ; 914D 20 17 8D                  ..
L9150:  jsr     L91A4                           ; 9150 20 A4 91                  ..
        cpy     #$00                            ; 9153 C0 00                    ..
        beq     L91A1                           ; 9155 F0 4A                    .J
        dey                                     ; 9157 88                       .
        .byte   $8C                             ; 9158 8C                       .
        inc     a                               ; 9159 1A                       .
L915A:  .byte   $02                             ; 915A 02                       .
        sta     $021B                           ; 915B 8D 1B 02                 ...
        lda     #$E0                            ; 915E A9 E0                    ..
        sta     $034E                           ; 9160 8D 4E 03                 .N.
L9163:  jsr     L89AF                           ; 9163 20 AF 89                  ..
        ldy     #$FF                            ; 9166 A0 FF                    ..
L9168:  jsr     FROM_C67B                       ; 9168 20 4A 03                  J.
        sta     ($E4),y                         ; 916B 91 E4                    ..
        dey                                     ; 916D 88                       .
        bne     L9168                           ; 916E D0 F8                    ..
        ldy     #$02                            ; 9170 A0 02                    ..
L9172:  lda     $0219,y                         ; 9172 B9 19 02                 ...
        sta     ($E4),y                         ; 9175 91 E4                    ..
        dey                                     ; 9177 88                       .
        bpl     L9172                           ; 9178 10 F8                    ..
        sec                                     ; 917A 38                       8
        lda     $E0                             ; 917B A5 E0                    ..
        sbc     #$FD                            ; 917D E9 FD                    ..
        bcs     L9183                           ; 917F B0 02                    ..
        dec     $E1                             ; 9181 C6 E1                    ..
L9183:  sta     $E0                             ; 9183 85 E0                    ..
        stz     $021B                           ; 9185 9C 1B 02                 ...
        ldy     $021A                           ; 9188 AC 1A 02                 ...
        dec     $021A                           ; 918B CE 1A 02                 ...
        tya                                     ; 918E 98                       .
        bne     L9163                           ; 918F D0 D2                    ..
        bit     $0218                           ; 9191 2C 18 02                 ,..
        bvc     L91A1                           ; 9194 50 0B                    P.
        ldy     #$04                            ; 9196 A0 04                    ..
        lda     $B9                             ; 9198 A5 B9                    ..
        sta     ($E4),y                         ; 919A 91 E4                    ..
        dey                                     ; 919C 88                       .
        lda     $B8                             ; 919D A5 B8                    ..
        sta     ($E4),y                         ; 919F 91 E4                    ..
L91A1:  jmp     L8D5B                           ; 91A1 4C 5B 8D                 L[.
; ----------------------------------------------------------------------------
L91A4:  ldx     $B7                             ; 91A4 A6 B7                    ..
        lda     $B6                             ; 91A6 A5 B6                    ..
        bit     $0218                           ; 91A8 2C 18 02                 ,..
        bvc     L91B3                           ; 91AB 50 06                    P.
        sec                                     ; 91AD 38                       8
        sbc     #$02                            ; 91AE E9 02                    ..
        bcs     L91B3                           ; 91B0 B0 01                    ..
        dex                                     ; 91B2 CA                       .
L91B3:  ldy     #$00                            ; 91B3 A0 00                    ..
L91B5:  cpx     $B3                             ; 91B5 E4 B3                    ..
        bcc     L91BD                           ; 91B7 90 04                    ..
        cmp     $B2                             ; 91B9 C5 B2                    ..
        bcs     L91C9                           ; 91BB B0 0C                    ..
L91BD:  adc     #$FD                            ; 91BD 69 FD                    i.
        bcc     L91C2                           ; 91BF 90 01                    ..
        inx                                     ; 91C1 E8                       .
L91C2:  iny                                     ; 91C2 C8                       .
        bne     L91B5                           ; 91C3 D0 F0                    ..
        lda     #$34                            ; 91C5 A9 34                    .4
        clc                                     ; 91C7 18                       .
        rts                                     ; 91C8 60                       `
; ----------------------------------------------------------------------------
L91C9:  dex                                     ; 91C9 CA                       .
        sta     $E0                             ; 91CA 85 E0                    ..
L91CC:  stx     $E1                             ; 91CC 86 E1                    ..
        clc                                     ; 91CE 18                       .
        lda     $B2                             ; 91CF A5 B2                    ..
        sbc     $E0                             ; 91D1 E5 E0                    ..
        sec                                     ; 91D3 38                       8
        rts                                     ; 91D4 60                       `
; ----------------------------------------------------------------------------
L91D5:  pha                                     ; 91D5 48                       H
        sta     $E1                             ; 91D6 85 E1                    ..
        stz     $E0                             ; 91D8 64 E0                    d.
        lda     #$B7                            ; 91DA A9 B7                    ..
        sta     $034E                           ; 91DC 8D 4E 03                 .N.
        lda     #$E0                            ; 91DF A9 E0                    ..
        sta     $0360                           ; 91E1 8D 60 03                 .`.
L91E4:  lda     $B7                             ; 91E4 A5 B7                    ..
        cmp     $B3                             ; 91E6 C5 B3                    ..
        bne     L91F0                           ; 91E8 D0 06                    ..
        lda     $B6                             ; 91EA A5 B6                    ..
        cmp     $B2                             ; 91EC C5 B2                    ..
        beq     L9206                           ; 91EE F0 16                    ..
L91F0:  ldy     #$00                            ; 91F0 A0 00                    ..
        jsr     FROM_C67B                       ; 91F2 20 4A 03                  J.
        jsr     FROM_C68D                       ; 91F5 20 5C 03                  \.
        inc     $E0                             ; 91F8 E6 E0                    ..
        bne     L91FE                           ; 91FA D0 02                    ..
        inc     $E1                             ; 91FC E6 E1                    ..
L91FE:  inc     $B6                             ; 91FE E6 B6                    ..
        bne     L9204                           ; 9200 D0 02                    ..
        inc     $B7                             ; 9202 E6 B7                    ..
L9204:  bra     L91E4                           ; 9204 80 DE                    ..
L9206:  lda     $E0                             ; 9206 A5 E0                    ..
        sta     $B2                             ; 9208 85 B2                    ..
        lda     $E1                             ; 920A A5 E1                    ..
        sta     $B3                             ; 920C 85 B3                    ..
        pla                                     ; 920E 68                       h
        sta     $B7                             ; 920F 85 B7                    ..
        stz     $B6                             ; 9211 64 B6                    d.
        rts                                     ; 9213 60                       `
; ----------------------------------------------------------------------------
L9214:  jsr     L921A                           ; 9214 20 1A 92                  ..
        jmp     L993F                           ; 9217 4C 3F 99                 L?.
; ----------------------------------------------------------------------------
L921A:  jsr     L8C36                           ; 921A 20 36 8C                  6.
        bcs     L9221                           ; 921D B0 02                    ..
        sec                                     ; 921F 38                       8
        rts                                     ; 9220 60                       `
; ----------------------------------------------------------------------------
L9221:  lda     $E6                             ; 9221 A5 E6                    ..
        cmp     #$0F                            ; 9223 C9 0F                    ..
        beq     L9240                           ; 9225 F0 19                    ..
        lda     $E7                             ; 9227 A5 E7                    ..
        bit     #$20                            ; 9229 89 20                    .
        beq     L9240                           ; 922B F0 13                    ..
        bit     #$80                            ; 922D 89 80                    ..
        bne     L9240                           ; 922F D0 0F                    ..
        lda     $E8                             ; 9231 A5 E8                    ..
        beq     L9240                           ; 9233 F0 0B                    ..
        .byte   $20                             ; 9235 20
L9236:  ldx     $908D,y                         ; 9236 BE 8D 90                 ...
        asl     $20                             ; 9239 06 20                    .
        rmb1    $8D                             ; 923B 17 8D                    ..
        jsr     L8D5B                           ; 923D 20 5B 8D                  [.
L9240:  jmp     L8C86                           ; 9240 4C 86 8C                 L..
; ----------------------------------------------------------------------------
L9243:  .byte   $20                             ; 9243 20
L9244:  eor     #$92                            ; 9244 49 92                    I.
        jmp     L993F                           ; 9246 4C 3F 99                 L?.
; ----------------------------------------------------------------------------
L9249:  .byte   $20                             ; 9249 20
L924A:  rol     $8C,x                           ; 924A 36 8C                    6.
        lda     $E6                             ; 924C A5 E6                    ..
        cmp     #$0F                            ; 924E C9 0F                    ..
L9250:  bne     L9255                           ; 9250 D0 03                    ..
        jmp     L9737                           ; 9252 4C 37 97                 L7.
; ----------------------------------------------------------------------------
L9255:  .byte   $20                             ; 9255 20
L9256:  bit     #$8C                            ; 9256 89 8C                    ..
        jsr     L8EAF                           ; 9258 20 AF 8E                  ..
        .byte   $90                             ; 925B 90                       .
L925C:  rol     a                               ; 925C 2A                       *
        bit     #$20                            ; 925D 89 20                    .
        bne     L9282                           ; 925F D0 21                    .!
        .byte   $AE                             ; 9261 AE                       .
L9262:  ldy     #$03                            ; 9262 A0 03                    ..
        beq     L928C                           ; 9264 F0 26                    .&
        cpx     #$24                            ; 9266 E0 24                    .$
L9268:  bne     L927B                           ; 9268 D0 11                    ..
        ldx     $03A3                           ; 926A AE A3 03                 ...
        .byte   $D0                             ; 926D D0                       .
L926E:  clc                                     ; 926E 18                       .
        jsr     L8C36                           ; 926F 20 36 8C                  6.
        .byte   $20                             ; 9272 20
        .byte   $41                             ; 9273 41                       A
L9274:  bcc     $921F                           ; 9274 90 A9                    ..
        bvc     $91FD                           ; 9276 50 85                    P.
        smb6    $38                             ; 9278 E7 38                    .8
L927A:  rts                                     ; 927A 60                       `
; ----------------------------------------------------------------------------
L927B:  ldy     $03A3                           ; 927B AC A3 03                 ...
L927E:  cpy     #$57                            ; 927E C0 57                    .W
        beq     L9289                           ; 9280 F0 07                    ..
L9282:  lda     #$21                            ; 9282 A9 21                    .!
        .byte   $2C                             ; 9284 2C                       ,
L9285:  .byte   $A9                             ; 9285 A9                       .
L9286:  .byte   $21                             ; 9286 21                       !
L9287:  clc                                     ; 9287 18                       .
        rts                                     ; 9288 60                       `
; ----------------------------------------------------------------------------
L9289:  stx     $03A3                           ; 9289 8E A3 03                 ...
L928C:  bit     #$80                            ; 928C 89 80                    ..
        beq     L9282                           ; 928E F0 F2                    ..
        ldy     #$52                            ; 9290 A0 52                    .R
        ldx     $03A3                           ; 9292 AE A3 03                 ...
        bne     L929A                           ; 9295 D0 03                    ..
        sty     $03A3                           ; 9297 8C A3 03                 ...
L929A:  bit     #$40                            ; 929A 89 40                    .@
        beq     L92A3                           ; 929C F0 05                    ..
        cpx     $03A3                           ; 929E EC A3 03                 ...
        bne     L9285                           ; 92A1 D0 E2                    ..
L92A3:  jsr     L8D9F                           ; 92A3 20 9F 8D                  ..
        bcc     L9317                           ; 92A6 90 6F                    .o
        jsr     L9011                           ; 92A8 20 11 90                  ..
        bcc     L92C7                           ; 92AB 90 1A                    ..
        ldy     $03A3                           ; 92AD AC A3 03                 ...
        lda     #$3F                            ; 92B0 A9 3F                    .?
        cpy     #$57                            ; 92B2 C0 57                    .W
        beq     L92C7                           ; 92B4 F0 11                    ..
        lda     $0218                           ; 92B6 AD 18 02                 ...
        bit     #$80                            ; 92B9 89 80                    ..
        beq     L92C9                           ; 92BB F0 0C                    ..
        lda     #$1A                            ; 92BD A9 1A                    ..
        cpy     #$40                            ; 92BF C0 40                    .@
        beq     L92C7                           ; 92C1 F0 04                    ..
        cpy     #$41                            ; 92C3 C0 41                    .A
        bne     L9315                           ; 92C5 D0 4E                    .N
L92C7:  clc                                     ; 92C7 18                       .
        rts                                     ; 92C8 60                       `
; ----------------------------------------------------------------------------
L92C9:  lda     $0219                           ; 92C9 AD 19 02                 ...
        jsr     L8C9F                           ; 92CC 20 9F 8C                  ..
        bcc     L92E6                           ; 92CF 90 15                    ..
        lda     $E7                             ; 92D1 A5 E7                    ..
        and     #$20                            ; 92D3 29 20                    )
        beq     L92DB                           ; 92D5 F0 04                    ..
        lda     #$3C                            ; 92D7 A9 3C                    .<
        bra     L92C7                           ; 92D9 80 EC                    ..
L92DB:  .byte   $AC                             ; 92DB AC                       .
        .byte   $A3                             ; 92DC A3                       .
L92DD:  .byte   $03                             ; 92DD 03                       .
        cpy     #$52                            ; 92DE C0 52                    .R
        beq     L92F8                           ; 92E0 F0 16                    ..
L92E2:  lda     #$3C                            ; 92E2 A9 3C                    .<
        bra     L92C7                           ; 92E4 80 E1                    ..
L92E6:  lda     $0218                           ; 92E6 AD 18 02                 ...
        bit     #$20                            ; 92E9 89 20                    .
        beq     L92F8                           ; 92EB F0 0B                    ..
        ldy     $03A3                           ; 92ED AC A3 03                 ...
        cpy     #$4D                            ; 92F0 C0 4D                    .M
        beq     L92F8                           ; 92F2 F0 04                    ..
        cpy     #$40                            ; 92F4 C0 40                    .@
        bne     L92E2                           ; 92F6 D0 EA                    ..
L92F8:  ldy     $03A3                           ; 92F8 AC A3 03                 ...
        cpy     #$40                            ; 92FB C0 40                    .@
        bne     L930C                           ; 92FD D0 0D                    ..
        jsr     L8D17                           ; 92FF 20 17 8D                  ..
        jsr     L89E2                           ; 9302 20 E2 89                  ..
        lda     #$57                            ; 9305 A9 57                    .W
        sta     $03A3                           ; 9307 8D A3 03                 ...
        bra     L9317                           ; 930A 80 0B                    ..
L930C:  cpy     #$4D                            ; 930C C0 4D                    .M
        beq     L9315                           ; 930E F0 05                    ..
        jsr     L8E20                           ; 9310 20 20 8E                   .
        bcc     L92C7                           ; 9313 90 B2                    ..
L9315:  bra     L9335                           ; 9315 80 1E                    ..
L9317:  ldy     $03A3                           ; 9317 AC A3 03                 ...
        cpy     #$52                            ; 931A C0 52                    .R
        beq     L9322                           ; 931C F0 04                    ..
        cpy     #$4D                            ; 931E C0 4D                    .M
        bne     L9326                           ; 9320 D0 04                    ..
L9322:  lda     #$3E                            ; 9322 A9 3E                    .>
        clc                                     ; 9324 18                       .
        rts                                     ; 9325 60                       `
; ----------------------------------------------------------------------------
L9326:  lda     #$57                            ; 9326 A9 57                    .W
        sta     $03A3                           ; 9328 8D A3 03                 ...
        lda     $03A4                           ; 932B AD A4 03                 ...
        bne     L9335                           ; 932E D0 05                    ..
        lda     #$53                            ; 9330 A9 53                    .S
        sta     $03A4                           ; 9332 8D A4 03                 ...
L9335:  ldy     $03A3                           ; 9335 AC A3 03                 ...
        cpy     #$57                            ; 9338 C0 57                    .W
        bne     L935A                           ; 933A D0 1E                    ..
        jsr     L8B13                           ; 933C 20 13 8B                  ..
        bcc     L9358                           ; 933F 90 17                    ..
        jsr     L8FF3                           ; 9341 20 F3 8F                  ..
        stz     $0218                           ; 9344 9C 18 02                 ...
        lda     $03A4                           ; 9347 AD A4 03                 ...
        cmp     #$50                            ; 934A C9 50                    .P
        bne     L9353                           ; 934C D0 05                    ..
        lda     #$40                            ; 934E A9 40                    .@
        sta     $0218                           ; 9350 8D 18 02                 ...
L9353:  jsr     L8E91                           ; 9353 20 91 8E                  ..
        bcs     L935A                           ; 9356 B0 02                    ..
L9358:  clc                                     ; 9358 18                       .
        rts                                     ; 9359 60                       `
; ----------------------------------------------------------------------------
L935A:  jsr     L8C36                           ; 935A 20 36 8C                  6.
        jsr     L902D                           ; 935D 20 2D 90                  -.
        .byte   $A9                             ; 9360 A9                       .
L9361:  bpl     $9367                           ; 9361 10 04                    ..
        smb6    $AC                             ; 9363 E7 AC                    ..
        .byte   $A3                             ; 9365 A3                       .
        .byte   $03                             ; 9366 03                       .
        cpy     #$4D                            ; 9367 C0 4D                    .M
        beq     L9378                           ; 9369 F0 0D                    ..
        cpy     #$52                            ; 936B C0 52                    .R
        bne     L937A                           ; 936D D0 0B                    ..
        lda     $E6                             ; 936F A5 E6                    ..
        cmp     #$0E                            ; 9371 C9 0E                    ..
        bne     L9378                           ; 9373 D0 03                    ..
        dec     $0405                           ; 9375 CE 05 04                 ...
L9378:  sec                                     ; 9378 38                       8
        rts                                     ; 9379 60                       `
; ----------------------------------------------------------------------------
L937A:  cpy     #$41                            ; 937A C0 41                    .A
        bne     L938D                           ; 937C D0 0F                    ..
        jsr     L8D17                           ; 937E 20 17 8D                  ..
L9381:  jsr     L8B40                           ; 9381 20 40 8B                  @.
        lda     #$47                            ; 9384 A9 47                    .G
        bcc     L9358                           ; 9386 90 D0                    ..
        bit     $039D                           ; 9388 2C 9D 03                 ,..
        bpl     L9381                           ; 938B 10 F4                    ..
L938D:  jsr     L8C36                           ; 938D 20 36 8C                  6.
        lda     #$20                            ; 9390 A9 20                    .
        tsb     $E7                             ; 9392 04 E7                    ..
        tsb     $0218                           ; 9394 0C 18 02                 ...
        jmp     L8D63                           ; 9397 4C 63 8D                 Lc.
; ----------------------------------------------------------------------------
L939A:  lda     $02D6                           ; 939A AD D6 02                 ...
L939D:  bne     L93A2                           ; 939D D0 03                    ..
        sta     $02D7                           ; 939F 8D D7 02                 ...
L93A2:  ldx     $02D7                           ; 93A2 AE D7 02                 ...
        beq     L93C0                           ; 93A5 F0 19                    ..
        lda     $02D8                           ; 93A7 AD D8 02                 ...
        beq     L941F                           ; 93AA F0 73                    .s
        lda     $0217,x                         ; 93AC BD 17 02                 ...
        inx                                     ; 93AF E8                       .
        tay                                     ; 93B0 A8                       .
        bne     L93B8                           ; 93B1 D0 05                    ..
        cpx     #$0A                            ; 93B3 E0 0A                    ..
        bcc     L93B8                           ; 93B5 90 01                    ..
        tax                                     ; 93B7 AA                       .
L93B8:  stx     $02D7                           ; 93B8 8E D7 02                 ...
        stz     $039D                           ; 93BB 9C 9D 03                 ...
        sec                                     ; 93BE 38                       8
        rts                                     ; 93BF 60                       `
; ----------------------------------------------------------------------------
L93C0:  ldx     $02D6                           ; 93C0 AE D6 02                 ...
        jmp     (L93C6,x)                       ; 93C3 7C C6 93                 |..
L93C6:  trb     $94                             ; 93C6 14 94                    ..
        cpx     $93                             ; 93C8 E4 93                    ..
        sbc     #$93                            ; 93CA E9 93                    ..
        bne     L9361                           ; 93CC D0 93                    ..
        dec     $93,x                           ; 93CE D6 93                    ..
        ldx     #$08                            ; 93D0 A2 08                    ..
        lda     #$00                            ; 93D2 A9 00                    ..
        bra     L93DA                           ; 93D4 80 04                    ..
        ldx     #$00                            ; 93D6 A2 00                    ..
        lda     #$FF                            ; 93D8 A9 FF                    ..
L93DA:  stx     $02D6                           ; 93DA 8E D6 02                 ...
        sta     $039D                           ; 93DD 8D 9D 03                 ...
        lda     #$00                            ; 93E0 A9 00                    ..
        sec                                     ; 93E2 38                       8
        rts                                     ; 93E3 60                       `
; ----------------------------------------------------------------------------
        jsr     L8CBB                           ; 93E4 20 BB 8C                  ..
        bra     L93EC                           ; 93E7 80 03                    ..
L93E9:  jsr     L8CC3                           ; 93E9 20 C3 8C                  ..
L93EC:  ldx     #$04                            ; 93EC A2 04                    ..
        stx     $02D6                           ; 93EE 8E D6 02                 ...
        bcc     L9414                           ; 93F1 90 21                    .!
        lda     #$38                            ; 93F3 A9 38                    .8
        sta     $E2                             ; 93F5 85 E2                    ..
        lda     #$02                            ; 93F7 A9 02                    ..
        stz     $03A1                           ; 93F9 9C A1 03                 ...
L93FC:  sta     $E3                             ; 93FC 85 E3                    ..
        ldx     #$00                            ; 93FE A2 00                    ..
L9400:  lda     $0238,x                         ; 9400 BD 38 02                 .8.
L9403:  beq     L940A                           ; 9403 F0 05                    ..
        inx                                     ; 9405 E8                       .
        cpx     #$14                            ; 9406 E0 14                    ..
        bne     L9400                           ; 9408 D0 F6                    ..
L940A:  stx     $03A2                           ; 940A 8E A2 03                 ...
        jsr     L8FC3                           ; 940D 20 C3 8F                  ..
        bcc     L93E9                           ; 9410 90 D7                    ..
        bra     L941A                           ; 9412 80 06                    ..
L9414:  inc     $02D6                           ; 9414 EE D6 02                 ...
        inc     $02D6                           ; 9417 EE D6 02                 ...
L941A:  lda     #$01                            ; 941A A9 01                    ..
        sta     $02D7                           ; 941C 8D D7 02                 ...
L941F:  jsr     L8CCE                           ; 941F 20 CE 8C                  ..
        jsr     L942B                           ; 9422 20 2B 94                  +.
        dec     $02D8                           ; 9425 CE D8 02                 ...
        jmp     L939A                           ; 9428 4C 9A 93                 L..
; ----------------------------------------------------------------------------
; Jumps (by a jump table) to the right routine to dump the "virtual 1541"
; directory listing tail/head or the content itself, IMHO.
L942B:  ldx     $02D6                           ; 942B AE D6 02                 ...
L942F           := * + 1
        jmp     (L942F,x)                       ; 942E 7C 2F 94                 |/.
        .addr   L9457                           ; 9431 57 94                    W.
        .addr   L94A8                           ; 9433 A8 94                    ..
        .addr   L9488                           ; 9435 88 94                    ..
; ----------------------------------------------------------------------------
; This (and other part later) fragment seems to be the usual directory
; listing produced by an 1541 and compatible drives. The text says "virtual
; 1541" thus it seems CLCD handles something (possible programs in ROM and/or
; RAM disk) as it would be a "real" 1541 drive for the user.
L9437:  .byte   $01,$10,$01,$10,$00,$00,$12,$22 ; 9437 01 10 01 10 00 00 12 22  ......."
        .byte   "VIRTUAL 1541 "                 ; 943F 56 49 52 54 55 41 4C 20  VIRTUAL
                                                ; 9447 31 35 34 31 20           1541
L944C:  .byte   "   "                           ; 944C 20 20 20
        .byte   $22                             ; 944F 22                       "
        .byte   " ID 00"                        ; 9450 20 49 44 20 30 30         ID 00
        .byte   $00                             ; 9456 00                       .
; ----------------------------------------------------------------------------
; This dumps the directory listing head, with the "virtual 1541" text.
L9457:  ldx     #$1F                            ; 9457 A2 1F                    ..
L9459:  lda     L9437,x                         ; 9459 BD 37 94                 .7.
        sta     $0218,x                         ; 945C 9D 18 02                 ...
        dex                                     ; 945F CA                       .
        bpl     L9459                           ; 9460 10 F7                    ..
        jsr     L8DE4                           ; 9462 20 E4 8D                  ..
        sta     $021C                           ; 9465 8D 1C 02                 ...
        rts                                     ; 9468 60                       `
; ----------------------------------------------------------------------------
L9469:  .byte   $01,$10,$00,$00                 ; 9469 01 10 00 00              ....
        .byte   "BLOCKS USED.            "      ; 946D 42 4C 4F 43 4B 53 20 55  BLOCKS U
                                                ; 9475 53 45 44 2E 20 20 20 20  SED.
                                                ; 947D 20 20 20 20 20 20 20 20
        .byte   $00,$00,$00                     ; 9485 00 00 00                 ...
; ----------------------------------------------------------------------------
; This dumps the directory listing tail, with the "block used" text.
L9488:  ldx     #$1E                            ; 9488 A2 1E                    ..
L948A:  lda     L9469,x                         ; 948A BD 69 94                 .i.
        sta     $0218,x                         ; 948D 9D 18 02                 ...
        dex                                     ; 9490 CA                       .
        bpl     L948A                           ; 9491 10 F7                    ..
        cld                                     ; 9493 D8                       .
        sec                                     ; 9494 38                       8
        lda     $0208                           ; 9495 AD 08 02                 ...
        sbc     $020A                           ; 9498 ED 0A 02                 ...
        sta     $021A                           ; 949B 8D 1A 02                 ...
        lda     $0209                           ; 949E AD 09 02                 ...
        sbc     $020B                           ; 94A1 ED 0B 02                 ...
L94A6           := * + 2
        sta     $021B                           ; 94A4 8D 1B 02                 ...
        rts                                     ; 94A7 60                       `
; ----------------------------------------------------------------------------
; Afaik this dumps a row of the directory listing, about a file, you can even
; see the "PRG", "SEQ" stuffs appended.
L94A8:  ldx     #$04                            ; 94A8 A2 04                    ..
L94AA:  inx                                     ; 94AA E8                       .
        lda     $0218,x                         ; 94AB BD 18 02                 ...
        beq     L94B4                           ; 94AE F0 04                    ..
        cpx     #$15                            ; 94B0 E0 15                    ..
        bne     L94AA                           ; 94B2 D0 F6                    ..
L94B4:  lda     #$22                            ; 94B4 A9 22                    ."
L94B6:  sta     $0218,x                         ; 94B6 9D 18 02                 ...
        lda     #$20                            ; 94B9 A9 20                    .
        inx                                     ; 94BB E8                       .
        cpx     #$20                            ; 94BC E0 20                    .
        bne     L94B6                           ; 94BE D0 F6                    ..
        lda     $0218                           ; 94C0 AD 18 02                 ...
        bit     #$30                            ; 94C3 89 30                    .0
        beq     L94CC                           ; 94C5 F0 05                    ..
        ldx     #$2A                            ; 94C7 A2 2A                    .*
        stx     $022E                           ; 94C9 8E 2E 02                 ...
L94CC:  bit     #$80                            ; 94CC 89 80                    ..
        bne     L94D5                           ; 94CE D0 05                    ..
        jsr     L8DE0                           ; 94D0 20 E0 8D                  ..
        bra     L94D8                           ; 94D3 80 03                    ..
L94D5:  lda     $021B                           ; 94D5 AD 1B 02                 ...
L94D8:  sta     $021A                           ; 94D8 8D 1A 02                 ...
        lda     $0218                           ; 94DB AD 18 02                 ...
        and     #$40                            ; 94DE 29 40                    )@
        beq     L94EA                           ; 94E0 F0 08                    ..
        lda     #$50                            ; 94E2 A9 50                    .P
        ldx     #$52                            ; 94E4 A2 52                    .R
        ldy     #$47                            ; 94E6 A0 47                    .G
        bra     L94F0                           ; 94E8 80 06                    ..
L94EA:  lda     #$53                            ; 94EA A9 53                    .S
        ldx     #$45                            ; 94EC A2 45                    .E
        ldy     #$51                            ; 94EE A0 51                    .Q
L94F0:  sta     $022F                           ; 94F0 8D 2F 02                 ./.
        stx     $0230                           ; 94F3 8E 30 02                 .0.
        sty     $0231                           ; 94F6 8C 31 02                 .1.
        lda     #$01                            ; 94F9 A9 01                    ..
        sta     $0218                           ; 94FB 8D 18 02                 ...
        lda     #$10                            ; 94FE A9 10                    ..
        sta     $0219                           ; 9500 8D 19 02                 ...
        stz     $021B                           ; 9503 9C 1B 02                 ...
        lda     #$22                            ; 9506 A9 22                    ."
        sta     $021C                           ; 9508 8D 1C 02                 ...
        lda     $021A                           ; 950B AD 1A 02                 ...
        cmp     #$64                            ; 950E C9 64                    .d
        bcs     L9515                           ; 9510 B0 03                    ..
        jsr     L9522                           ; 9512 20 22 95                  ".
L9515:  lda     $021A                           ; 9515 AD 1A 02                 ...
        cmp     #$0A                            ; 9518 C9 0A                    ..
        bcc     L951F                           ; 951A 90 03                    ..
        jsr     L9522                           ; 951C 20 22 95                  ".
L951F:  jsr     L9522                           ; 951F 20 22 95                  ".
L9522:  lda     #$20                            ; 9522 A9 20                    .
        ldx     #$04                            ; 9524 A2 04                    ..
L9526:  ldy     $0218,x                         ; 9526 BC 18 02                 ...
        sta     $0218,x                         ; 9529 9D 18 02                 ...
        tya                                     ; 952C 98                       .
        inx                                     ; 952D E8                       .
        cpx     #$1F                            ; 952E E0 1F                    ..
        bne     L9526                           ; 9530 D0 F4                    ..
        lda     #$00                            ; 9532 A9 00                    ..
        sta     $0237                           ; 9534 8D 37 02                 .7.
        rts                                     ; 9537 60                       `
; ----------------------------------------------------------------------------
LOAD__: sta     $0406                           ; 9538 8D 06 04                 ...
        stz     ST                              ; 953B 64 BA                    d.
        lda     LFSDevNum                       ; 953D A5 C5                    ..
        bne     L9544                           ; 953F D0 03                    ..
L9541:  jmp     LBC68                           ; 9541 4C 68 BC                 Lh.
; ----------------------------------------------------------------------------
L9544:  cmp     #$01                            ; 9544 C9 01                    ..
        beq     L9550                           ; 9546 F0 08                    ..
        cmp     #$04                            ; 9548 C9 04                    ..
        bcc     L9541                           ; 954A 90 F5                    ..
        cmp     #$1E                            ; 954C C9 1E                    ..
        bcs     L9541                           ; 954E B0 F1                    ..
L9550:  ldy     FNlength                        ; 9550 AC 87 03                 ...
        bne     L9558                           ; 9553 D0 03                    ..
        jmp     LBC65                           ; 9555 4C 65 BC                 Le.
; ----------------------------------------------------------------------------
L9558:  jsr     LBB8D                           ; 9558 20 8D BB                  ..
        ldx     LFS2ndAddr                      ; 955B A6 C4                    ..
        stx     $0407                           ; 955D 8E 07 04                 ...
        stz     LFS2ndAddr                      ; 9560 64 C4                    d.
        lda     LFSDevNum                       ; 9562 A5 C5                    ..
        dec     a                               ; 9564 3A                       :
        beq     L957A                           ; 9565 F0 13                    ..
        lda     #$60                            ; 9567 A9 60                    .`
        sta     LFS2ndAddr                      ; 9569 85 C4                    ..
        jsr     LBB40                           ; 956B 20 40 BB                  @.
        lda     LFSDevNum                       ; 956E A5 C5                    ..
        jsr     SendTalk                        ; 9570 20 91 BC                  ..
        lda     LFS2ndAddr                      ; 9573 A5 C4                    ..
        jsr     TALKSA__                        ; 9575 20 55 BD                  U.
        bra     L9592                           ; 9578 80 18                    ..
L957A:  phx                                     ; 957A DA                       .
        jsr     L966B                           ; 957B 20 6B 96                  k.
        plx                                     ; 957E FA                       .
        lda     ST                              ; 957F A5 BA                    ..
        bit     #$0C                            ; 9581 89 0C                    ..
        beq     L9592                           ; 9583 F0 0D                    ..
L9585:  jmp     LBC59                           ; 9585 4C 59 BC                 LY.
; ----------------------------------------------------------------------------
L9588:  lda     LFS2ndAddr                      ; 9588 A5 C4                    ..
        beq     L958F                           ; 958A F0 03                    ..
        jsr     LBC36                           ; 958C 20 36 BC                  6.
L958F:  jmp     LBC6B                           ; 958F 4C 6B BC                 Lk.
; ----------------------------------------------------------------------------
L9592:  jsr     L9661                           ; 9592 20 61 96                  a.
        sta     $B2                             ; 9595 85 B2                    ..
        lda     #$02                            ; 9597 A9 02                    ..
        bit     ST                              ; 9599 24 BA                    $.
        bne     L9585                           ; 959B D0 E8                    ..
        jsr     L9661                           ; 959D 20 61 96                  a.
        sta     $B3                             ; 95A0 85 B3                    ..
        lda     $0407                           ; 95A2 AD 07 04                 ...
        bne     L95AF                           ; 95A5 D0 08                    ..
        lda     $B4                             ; 95A7 A5 B4                    ..
        sta     $B2                             ; 95A9 85 B2                    ..
        lda     $B5                             ; 95AB A5 B5                    ..
        sta     $B3                             ; 95AD 85 B3                    ..
L95AF:  lda     $0406                           ; 95AF AD 06 04                 ...
        bne     L95E4                           ; 95B2 D0 30                    .0
        jsr     ShowInLineText80                ; 95B4 20 56 FB                  V.
        .byte   "LOADING"                       ; 95B7 4C 4F 41 44 49 4E 47     LOADING
        .byte   $0D,$00                         ; 95BE 0D 00                    ..
; ----------------------------------------------------------------------------
        lda     $B3                             ; 95C0 A5 B3                    ..
        cmp     #$05                            ; 95C2 C9 05                    ..
        bcc     L9588                           ; 95C4 90 C2                    ..
        cmp     #$F8                            ; 95C6 C9 F8                    ..
        bcs     L9588                           ; 95C8 B0 BE                    ..
        cmp     $020A                           ; 95CA CD 0A 02                 ...
        bcc     L95D4                           ; 95CD 90 05                    ..
        lda     $020B                           ; 95CF AD 0B 02                 ...
        beq     L9588                           ; 95D2 F0 B4                    ..
L95D4:  lda     LFS2ndAddr                      ; 95D4 A5 C4                    ..
        bne     L95F0                           ; 95D6 D0 18                    ..
        .byte   $AD                             ; 95D8 AD                       .
        .byte   $A0                             ; 95D9 A0                       .
L95DA:  .byte   $03                             ; 95DA 03                       .
        cmp     #$40                            ; 95DB C9 40                    .@
        bne     L95F0                           ; 95DD D0 11                    ..
        jsr     L96D6                           ; 95DF 20 D6 96                  ..
        bra     L9651                           ; 95E2 80 6D                    .m
L95E4:  jsr     ShowInLineText80                ; 95E4 20 56 FB                  V.
        .byte   $0D                             ; 95E7 0D                       .
        .byte   "VERIF"                         ; 95E8 56 45 52 49 46           VERIF
L95ED:  .byte   "Y "                            ; 95ED 59 20                    Y
        .byte   $00                             ; 95EF 00                       .
; ----------------------------------------------------------------------------
L95F0:  lda     #$02                            ; 95F0 A9 02                    ..
        trb     ST                              ; 95F2 14 BA                    ..
        jsr     LFDB9                           ; 95F4 20 B9 FD                  ..
        beq     L9657                           ; 95F7 F0 5E                    .^
L95F9:  jsr     L9661                           ; 95F9 20 61 96                  a.
        tax                                     ; 95FC AA                       .
        lda     ST                              ; 95FD A5 BA                    ..
        lsr     a                               ; 95FF 4A                       J
        lsr     a                               ; 9600 4A                       J
        bcs     L95F9                           ; 9601 B0 F6                    ..
        txa                                     ; 9603 8A                       .
        ldy     $0406                           ; 9604 AC 06 04                 ...
        beq     L9622                           ; 9607 F0 19                    ..
        ldy     #$00                            ; 9609 A0 00                    ..
        sta     $0407                           ; 960B 8D 07 04                 ...
        lda     #$B2                            ; 960E A9 B2                    ..
        sta     $034E                           ; 9610 8D 4E 03                 .N.
        jsr     FROM_C67B                       ; 9613 20 4A 03                  J.
        cmp     $0407                           ; 9616 CD 07 04                 ...
        beq     L963D                           ; 9619 F0 22                    ."
        lda     #$10                            ; 961B A9 10                    ..
        jsr     SetST                           ; 961D 20 CA FC                  ..
        bra     L963D                           ; 9620 80 1B                    ..
L9622:  ldx     #$B2                            ; 9622 A2 B2                    ..
        stx     $0360                           ; 9624 8E 60 03                 .`.
        ldx     $B3                             ; 9627 A6 B3                    ..
        cpx     #$F8                            ; 9629 E0 F8                    ..
        bcs     L9637                           ; 962B B0 0A                    ..
        cpx     $020A                           ; 962D EC 0A 02                 ...
        bcc     L963A                           ; 9630 90 08                    ..
        ldx     $020B                           ; 9632 AE 0B 02                 ...
        bne     L963A                           ; 9635 D0 03                    ..
L9637:  jmp     L9588                           ; 9637 4C 88 95                 L..
; ----------------------------------------------------------------------------
L963A:  jsr     FROM_C68D                       ; 963A 20 5C 03                  \.
L963D:  inc     $B2                             ; 963D E6 B2                    ..
        bne     L9643                           ; 963F D0 02                    ..
        inc     $B3                             ; 9641 E6 B3                    ..
L9643:  bit     ST                              ; 9643 24 BA                    $.
        bvc     L95F9                           ; 9645 50 B2                    P.
        lda     LFS2ndAddr                      ; 9647 A5 C4                    ..
        beq     L9651                           ; 9649 F0 06                    ..
        jsr     UNTALK__                        ; 964B 20 81 BD                  ..
        jsr     LBC36                           ; 964E 20 36 BC                  6.
L9651:  ldx     $B2                             ; 9651 A6 B2                    ..
        ldy     $B3                             ; 9653 A4 B3                    ..
        clc                                     ; 9655 18                       .
        rts                                     ; 9656 60                       `
; ----------------------------------------------------------------------------
L9657:  lda     LFS2ndAddr                      ; 9657 A5 C4                    ..
        bne     L965E                           ; 9659 D0 03                    ..
        jsr     LBC36                           ; 965B 20 36 BC                  6.
L965E:  jmp     LBC4D                           ; 965E 4C 4D BC                 LM.
; ----------------------------------------------------------------------------
L9661:  lda     LFS2ndAddr                      ; 9661 A5 C4                    ..
        beq     L9668                           ; 9663 F0 03                    ..
        jmp     IECIN__                         ; 9665 4C A5 BD                 L..
; ----------------------------------------------------------------------------
L9668:  jmp     L971F                           ; 9668 4C 1F 97                 L..
; ----------------------------------------------------------------------------
L966B:  jsr     L9671                           ; 966B 20 71 96                  q.
        jmp     L993F                           ; 966E 4C 3F 99                 L?.
; ----------------------------------------------------------------------------
L9671:  jsr     L8EAF                           ; 9671 20 AF 8E                  ..
        .byte   $90                             ; 9674 90                       .
L9675:  bit     $89                             ; 9675 24 89                    $.
        jsr     $20D0                           ; 9677 20 D0 20                  .
        ldx     $03A0                           ; 967A AE A0 03                 ...
        cpx     #$24                            ; 967D E0 24                    .$
        bne     L969C                           ; 967F D0 1B                    ..
        ldx     $03A3                           ; 9681 AE A3 03                 ...
        bne     L9698                           ; 9684 D0 12                    ..
        jsr     L9041                           ; 9686 20 41 90                  A.
        jsr     L8C2A                           ; 9689 20 2A 8C                  *.
        lda     #$40                            ; 968C A9 40                    .@
        tsb     $E7                             ; 968E 04 E7                    ..
        bra     L96C0                           ; 9690 80 2E                    ..
L9692:  lda     #$40                            ; 9692 A9 40                    .@
        .byte   $2C                             ; 9694 2C                       ,
L9695:  lda     #$3C                            ; 9695 A9 3C                    .<
        .byte   $2C                             ; 9697 2C                       ,
L9698:  lda     #$22                            ; 9698 A9 22                    ."
L969A:  clc                                     ; 969A 18                       .
        rts                                     ; 969B 60                       `
; ----------------------------------------------------------------------------
L969C:  jsr     L8D9F                           ; 969C 20 9F 8D                  ..
        bcc     L969A                           ; 969F 90 F9                    ..
        lda     $0218                           ; 96A1 AD 18 02                 ...
        .byte   $89                             ; 96A4 89                       .
L96A5:  jsr     $EDD0                           ; 96A5 20 D0 ED                  ..
        bit     #$80                            ; 96A8 89 80                    ..
        bne     L96B1                           ; 96AA D0 05                    ..
        jsr     L8E20                           ; 96AC 20 20 8E                   .
        bcc     L969A                           ; 96AF 90 E9                    ..
L96B1:  jsr     L9011                           ; 96B1 20 11 90                  ..
        bcc     L969A                           ; 96B4 90 E4                    ..
        cpx     #$53                            ; 96B6 E0 53                    .S
        beq     L9692                           ; 96B8 F0 D8                    ..
        jsr     L8C2A                           ; 96BA 20 2A 8C                  *.
        jsr     L902D                           ; 96BD 20 2D 90                  -.
L96C0:  lda     #$10                            ; 96C0 A9 10                    ..
        tsb     $E7                             ; 96C2 04 E7                    ..
        lda     $03A0                           ; 96C4 AD A0 03                 ...
        cmp     #$40                            ; 96C7 C9 40                    .@
        bne     L96D1                           ; 96C9 D0 06                    ..
        lda     $E7                             ; 96CB A5 E7                    ..
        and     #$80                            ; 96CD 29 80                    ).
        beq     L96D4                           ; 96CF F0 03                    ..
L96D1:  stz     $03A0                           ; 96D1 9C A0 03                 ...
L96D4:  sec                                     ; 96D4 38                       8
        rts                                     ; 96D5 60                       `
; ----------------------------------------------------------------------------
L96D6:  stz     $E9                             ; 96D6 64 E9                    d.
        dec     $E9                             ; 96D8 C6 E9                    ..
L96DA:  inc     $E9                             ; 96DA E6 E9                    ..
        jsr     L89F9                           ; 96DC 20 F9 89                  ..
        bcc     L9719                           ; 96DF 90 38                    .8
L96E1:  ldx     $020B                           ; 96E1 AE 0B 02                 ...
        lda     $020A                           ; 96E4 AD 0A 02                 ...
        bne     L96EA                           ; 96E7 D0 01                    ..
        dex                                     ; 96E9 CA                       .
L96EA:  dec     a                               ; 96EA 3A                       :
        jsr     L8A87                           ; 96EB 20 87 8A                  ..
        ldy     #$02                            ; 96EE A0 02                    ..
        lda     ($E4),y                         ; 96F0 B1 E4                    ..
        bne     L96F5                           ; 96F2 D0 01                    ..
        dec     a                               ; 96F4 3A                       :
L96F5:  sta     $E0                             ; 96F5 85 E0                    ..
        lda     $E9                             ; 96F7 A5 E9                    ..
        bne     L9703                           ; 96F9 D0 08                    ..
L96FB:  lda     $E7                             ; 96FB A5 E7                    ..
        and     #$40                            ; 96FD 29 40                    )@
        beq     L9703                           ; 96FF F0 02                    ..
        iny                                     ; 9701 C8                       .
        iny                                     ; 9702 C8                       .
L9703:  iny                                     ; 9703 C8                       .
        lda     ($E4),y                         ; 9704 B1 E4                    ..
        phy                                     ; 9706 5A                       Z
        ldy     #$00                            ; 9707 A0 00                    ..
        jsr     FROM_C68D                       ; 9709 20 5C 03                  \.
        inc     $B2                             ; 970C E6 B2                    ..
        bne     L9712                           ; 970E D0 02                    ..
        inc     $B3                             ; 9710 E6 B3                    ..
L9712:  ply                                     ; 9712 7A                       z
        cpy     $E0                             ; 9713 C4 E0                    ..
        bne     L9703                           ; 9715 D0 EC                    ..
        .byte   $80                             ; 9717 80                       .
L9718:  .byte   $C1                             ; 9718 C1                       .
L9719:  .byte   $20                             ; 9719 20
L971A:  .byte   $E2                             ; 971A E2                       .
        bit     #$4C                            ; 971B 89 4C                    .L
        rmb1    $8D                             ; 971D 17 8D                    ..
L971F:  jsr     L9725                           ; 971F 20 25 97                  %.
        .byte   $4C                             ; 9722 4C                       L
        .byte   $3F                             ; 9723 3F                       ?
L9724:  .byte   $99                             ; 9724 99                       .
L9725:  jsr     L8C3B                           ; 9725 20 3B 8C                  ;.
        bcc     L972D                           ; 9728 90 03                    ..
        jsr     L8B46                           ; 972A 20 46 8B                  F.
L972D:  rts                                     ; 972D 60                       `
; ----------------------------------------------------------------------------
L972E:  lda     #$20                            ; 972E A9 20                    .
L9730:  cpy     #$3C                            ; 9730 C0 3C                    .<
L9732:  rol     a                               ; 9732 2A                       *
        eor     #$01                            ; 9733 49 01                    I.
        ror     a                               ; 9735 6A                       j
        rts                                     ; 9736 60                       `
; ----------------------------------------------------------------------------
L9737:  jsr     L8C36                           ; 9737 20 36 8C                  6.
        lda     #$10                            ; 973A A9 10                    ..
        tsb     $E7                             ; 973C 04 E7                    ..
        ldy     FNlength                        ; 973E AC 87 03                 ...
        sty     $02D5                           ; 9741 8C D5 02                 ...
        jsr     L972E                           ; 9744 20 2E 97                  ..
        bcs     L974A                           ; 9747 B0 01                    ..
L9749:  rts                                     ; 9749 60                       `
; ----------------------------------------------------------------------------
L974A:  lda     #$AE                            ; 974A A9 AE                    ..
        sta     $034E                           ; 974C 8D 4E 03                 .N.
        dey                                     ; 974F 88                       .
        bmi     L9749                           ; 9750 30 F7                    0.
L9752:  jsr     FROM_C67B                       ; 9752 20 4A 03                  J.
        sta     $0295,y                         ; 9755 99 95 02                 ...
        dey                                     ; 9758 88                       .
        bpl     L9752                           ; 9759 10 F7                    ..
        bra     L9772                           ; 975B 80 15                    ..
L975D:  ldy     $02D5                           ; 975D AC D5 02                 ...
        jsr     L972E                           ; 9760 20 2E 97                  ..
        bcs     L9766                           ; 9763 B0 01                    ..
        rts                                     ; 9765 60                       `
; ----------------------------------------------------------------------------
L9766:  .byte   $99                             ; 9766 99                       .
L9767:  sta     $02,x                           ; 9767 95 02                    ..
        inc     $02D5                           ; 9769 EE D5 02                 ...
        cmp     #$0D                            ; 976C C9 0D                    ..
        beq     L9772                           ; 976E F0 02                    ..
        sec                                     ; 9770 38                       8
        rts                                     ; 9771 60                       `
; ----------------------------------------------------------------------------
L9772:  lda     $0295                           ; 9772 AD 95 02                 ...
L9775:  ldx     #$07                            ; 9775 A2 07                    ..
L9777:  cmp     L978E,x                         ; 9777 DD 8E 97                 ...
        beq     L9783                           ; 977A F0 07                    ..
        dex                                     ; 977C CA                       .
        .byte   $10                             ; 977D 10                       .
L977E:  sed                                     ; 977E F8                       .
        lda     #$1F                            ; 977F A9 1F                    ..
        clc                                     ; 9781 18                       .
        rts                                     ; 9782 60                       `
; ----------------------------------------------------------------------------
L9783:  txa                                     ; 9783 8A                       .
        and     #$FE                            ; 9784 29 FE                    ).
        pha                                     ; 9786 48                       H
        jsr     L979E                           ; 9787 20 9E 97                  ..
        plx                                     ; 978A FA                       .
        jmp     (L9796,x)                       ; 978B 7C 96 97                 |..
L978E:  eor     #$69                            ; 978E 49 69                    Ii
        eor     ($72)                           ; 9790 52 72                    Rr
L9792:  .byte   $53                             ; 9792 53                       S
        .byte   $73                             ; 9793 73                       s
        lsr     $76,x                           ; 9794 56 76                    Vv
L9796:  bbr6    $8C,L97A7                       ; 9796 6F 8C 0E                 o..
        tya                                     ; 9799 98                       .
        dec     $97,x                           ; 979A D6 97                    ..
        .byte   $42                             ; 979C 42                       B
        tya                                     ; 979D 98                       .
L979E:  ldy     $02D5                           ; 979E AC D5 02                 ...
        dey                                     ; 97A1 88                       .
        lda     #$96                            ; 97A2 A9 96                    ..
        ldx     #$02                            ; 97A4 A2 02                    ..
        .byte   $4C                             ; 97A6 4C                       L
L97A7:  ldx     $8E,y                           ; 97A7 B6 8E                    ..
L97A9:  jsr     L979E                           ; 97A9 20 9E 97                  ..
L97AC:  lda     ($E2)                           ; 97AC B2 E2                    ..
        inc     $E2                             ; 97AE E6 E2                    ..
        bne     L97B4                           ; 97B0 D0 02                    ..
        inc     $E3                             ; 97B2 E6 E3                    ..
L97B4:  dec     $039F                           ; 97B4 CE 9F 03                 ...
        beq     L97D2                           ; 97B7 F0 19                    ..
        cmp     #$3D                            ; 97B9 C9 3D                    .=
        bne     L97AC                           ; 97BB D0 EF                    ..
        jsr     L8EBD                           ; 97BD 20 BD 8E                  ..
        bcc     L97D4                           ; 97C0 90 12                    ..
        and     #$40                            ; 97C2 29 40                    )@
        ora     $03A4                           ; 97C4 0D A4 03                 ...
        ora     $03A3                           ; 97C7 0D A3 03                 ...
        ora     $03A0                           ; 97CA 0D A0 03                 ...
        bne     L97D2                           ; 97CD D0 03                    ..
        jmp     L8D9F                           ; 97CF 4C 9F 8D                 L..
; ----------------------------------------------------------------------------
L97D2:  lda     #$21                            ; 97D2 A9 21                    .!
L97D4:  clc                                     ; 97D4 18                       .
        rts                                     ; 97D5 60                       `
; ----------------------------------------------------------------------------
        bcs     L97DC                           ; 97D6 B0 04                    ..
L97D8:  lda     #$22                            ; 97D8 A9 22                    ."
        clc                                     ; 97DA 18                       .
        rts                                     ; 97DB 60                       `
; ----------------------------------------------------------------------------
L97DC:  bit     #$80                            ; 97DC 89 80                    ..
        beq     L97D8                           ; 97DE F0 F8                    ..
        and     #$20                            ; 97E0 29 20                    )
        ora     $03A4                           ; 97E2 0D A4 03                 ...
        ora     $03A3                           ; 97E5 0D A3 03                 ...
        bne     L97D8                           ; 97E8 D0 EE                    ..
        lda     #$00                            ; 97EA A9 00                    ..
        pha                                     ; 97EC 48                       H
L97ED:
L97EE           := * + 1
        jsr     L8D9F                           ; 97ED 20 9F 8D                  ..
        bcc     L9805                           ; 97F0 90 13                    ..
L97F2:  tsx                                     ; 97F2 BA                       .
L97F5           := * + 2
        inc     stack+1,x                       ; 97F3 FE 01 01                 ...
        jsr     L8D17                           ; 97F6 20 17 8D                  ..
        lda     $0218                           ; 97F9 AD 18 02                 ...
        and     #$80                            ; 97FC 29 80                    ).
        bne     L97ED                           ; 97FE D0 ED                    ..
        jsr     L89E2                           ; 9800 20 E2 89                  ..
        bra     L97ED                           ; 9803 80 E8                    ..
L9805:  pla                                     ; 9805 68                       h
        ldx     #$01                            ; 9806 A2 01                    ..
        ldy     #$00                            ; 9808 A0 00                    ..
        sec                                     ; 980A 38                       8
        jmp     L9964                           ; 980B 4C 64 99                 Ld.
; ----------------------------------------------------------------------------
        .byte   $90                             ; 980E 90                       .
L980F:  bmi     $979A                           ; 980F 30 89                    0.
        bra     $9803                           ; 9811 80 F0                    ..
        rol     a                               ; 9813 2A                       *
        and     #$40                            ; 9814 29 40                    )@
        ora     $03A0                           ; 9816 0D A0 03                 ...
        ora     $03A3                           ; 9819 0D A3 03                 ...
        .byte   $0D                             ; 981C 0D                       .
L981D:  ldy     $03                             ; 981D A4 03                    ..
        bne     L983E                           ; 981F D0 1D                    ..
        jsr     L8D9F                           ; 9821 20 9F 8D                  ..
        lda     #$3F                            ; 9824 A9 3F                    .?
        bcs     L9840                           ; 9826 B0 18                    ..
        jsr     L97A9                           ; 9828 20 A9 97                  ..
        bcc     L9840                           ; 982B 90 13                    ..
        jsr     L979E                           ; 982D 20 9E 97                  ..
        jsr     L8FF3                           ; 9830 20 F3 8F                  ..
L9833:  jsr     L8D5B                           ; 9833 20 5B 8D                  [.
        bcc     L9840                           ; 9836 90 08                    ..
        jsr     L97A9                           ; 9838 20 A9 97                  ..
        jmp     L8D17                           ; 983B 4C 17 8D                 L..
; ----------------------------------------------------------------------------
L983E:  lda     #$21                            ; 983E A9 21                    .!
L9840:  clc                                     ; 9840 18                       .
        rts                                     ; 9841 60                       `
; ----------------------------------------------------------------------------
        jsr     L8C6F                           ; 9842 20 6F 8C                  o.
        jsr     KL_RAMTAS                       ; 9845 20 A8 86                  ..
        cpx     $0209                           ; 9848 EC 09 02                 ...
        beq     L985B                           ; 984B F0 0E                    ..
L984D:  stx     $0209                           ; 984D 8E 09 02                 ...
        sta     $0208                           ; 9850 8D 08 02                 ...
        stx     $020B                           ; 9853 8E 0B 02                 ...
        sta     $020A                           ; 9856 8D 0A 02                 ...
        sec                                     ; 9859 38                       8
        rts                                     ; 985A 60                       `
; ----------------------------------------------------------------------------
L985B:  cmp     $0208                           ; 985B CD 08 02                 ...
        bne     L984D                           ; 985E D0 ED                    ..
        cpx     $020A                           ; 9860 EC 0A 02                 ...
        bcc     L984D                           ; 9863 90 E8                    ..
        bne     L986C                           ; 9865 D0 05                    ..
        cmp     $020A                           ; 9867 CD 0A 02                 ...
        bcc     L984D                           ; 986A 90 E1                    ..
L986C:  jsr     L8CBB                           ; 986C 20 BB 8C                  ..
        bne     L9890                           ; 986F D0 1F                    ..
L9871:  jsr     L8CC3                           ; 9871 20 C3 8C                  ..
        bcc     L988B                           ; 9874 90 15                    ..
        jsr     L8CD1                           ; 9876 20 D1 8C                  ..
        jsr     L8AD5                           ; 9879 20 D5 8A                  ..
        ldy     #$02                            ; 987C A0 02                    ..
        lda     $EA                             ; 987E A5 EA                    ..
        sta     ($E4),y                         ; 9880 91 E4                    ..
L9882:  inc     $E9                             ; 9882 E6 E9                    ..
        beq     L9890                           ; 9884 F0 0A                    ..
        jsr     L89F9                           ; 9886 20 F9 89                  ..
        bra     L9882                           ; 9889 80 F7                    ..
L988B:  bit     $039D                           ; 988B 2C 9D 03                 ,..
        bpl     L9871                           ; 988E 10 E1                    ..
L9890:  jsr     L8CBB                           ; 9890 20 BB 8C                  ..
        .byte   $90                             ; 9893 90                       .
L9894:  .byte   $3B                             ; 9894 3B                       ;
        bra     L98AB                           ; 9895 80 14                    ..
L9897:  jsr     L8CC3                           ; 9897 20 C3 8C                  ..
        .byte   $90                             ; 989A 90                       .
L989B:  bit     $20,x                           ; 989B 34 20                    4
        rol     a                               ; 989D 2A                       *
L989E:  sty     $18AD                           ; 989E 8C AD 18                 ...
        .byte   $02                             ; 98A1 02                       .
        bit     #$80                            ; 98A2 89 80                    ..
        bne     L98B4                           ; 98A4 D0 0E                    ..
        lda     $0219                           ; 98A6 AD 19 02                 ...
        sta     $E8                             ; 98A9 85 E8                    ..
L98AB:  jsr     L8AD5                           ; 98AB 20 D5 8A                  ..
        bcs     L98B9                           ; 98AE B0 09                    ..
        lda     $E9                             ; 98B0 A5 E9                    ..
        beq     L9897                           ; 98B2 F0 E3                    ..
L98B4:  jsr     L8D17                           ; 98B4 20 17 8D                  ..
        bra     L9890                           ; 98B7 80 D7                    ..
L98B9:  inc     $E9                             ; 98B9 E6 E9                    ..
        ldy     #$02                            ; 98BB A0 02                    ..
        lda     ($E4),y                         ; 98BD B1 E4                    ..
        beq     L98AB                           ; 98BF F0 EA                    ..
        lda     $E9                             ; 98C1 A5 E9                    ..
        pha                                     ; 98C3 48                       H
        jsr     L8DE0                           ; 98C4 20 E0 8D                  ..
        sta     $E9                             ; 98C7 85 E9                    ..
        pla                                     ; 98C9 68                       h
        cmp     $E9                             ; 98CA C5 E9                    ..
        .byte   $D0                             ; 98CC D0                       .
L98CD:  inc     $80                             ; 98CD E6 80                    ..
        .byte   $C7                             ; 98CF C7                       .
L98D0:  ldx     #$3F                            ; 98D0 A2 3F                    .?
L98D2:  stz     $0295,x                         ; 98D2 9E 95 02                 ...
        dex                                     ; 98D5 CA                       .
        bpl     L98D2                           ; 98D6 10 FA                    ..
        inc     $0295                           ; 98D8 EE 95 02                 ...
        jsr     L8CBB                           ; 98DB 20 BB 8C                  ..
L98DE:  bcc     L9917                           ; 98DE 90 37                    .7
        bra     L98E5                           ; 98E0 80 03                    ..
L98E2:  jsr     L8D17                           ; 98E2 20 17 8D                  ..
L98E5:  jsr     L8CBB                           ; 98E5 20 BB 8C                  ..
L98E8:  bra     L98ED                           ; 98E8 80 03                    ..
L98EA:  jsr     L8CC3                           ; 98EA 20 C3 8C                  ..
L98ED:  bcc     L9917                           ; 98ED 90 28                    .(
        jsr     L9932                           ; 98EF 20 32 99                  2.
        and     $0295,y                         ; 98F2 39 95 02                 9..
        bne     L98E2                           ; 98F5 D0 EB                    ..
        lda     PowersOfTwo,x                   ; 98F7 BD 41 B0                 .A.
        ora     $0295,y                         ; 98FA 19 95 02                 ...
        sta     $0295,y                         ; 98FD 99 95 02                 ...
        lda     #$30                            ; 9900 A9 30                    .0
        trb     $0218                           ; 9902 1C 18 02                 ...
        bne     L990F                           ; 9905 D0 08                    ..
        lda     $0219                           ; 9907 AD 19 02                 ...
        jsr     L8E20                           ; 990A 20 20 8E                   .
        bcs     L98EA                           ; 990D B0 DB                    ..
L990F:  jsr     L8D17                           ; 990F 20 17 8D                  ..
        jsr     L8D5B                           ; 9912 20 5B 8D                  [.
        bra     L98D0                           ; 9915 80 B9                    ..
L9917:  jsr     L8A81                           ; 9917 20 81 8A                  ..
L991A:  beq     L9930                           ; 991A F0 14                    ..
L991C:  lda     ($E4)                           ; 991C B2 E4                    ..
        jsr     L9932                           ; 991E 20 32 99                  2.
        and     $0295,y                         ; 9921 39 95 02                 9..
        bne     L992B                           ; 9924 D0 05                    ..
        jsr     L89FF                           ; 9926 20 FF 89                  ..
        bra     L9917                           ; 9929 80 EC                    ..
L992B:  jsr     L8A61                           ; 992B 20 61 8A                  a.
        bcs     L991C                           ; 992E B0 EC                    ..
L9930:  sec                                     ; 9930 38                       8
        rts                                     ; 9931 60                       `
; ----------------------------------------------------------------------------
L9932:  pha                                     ; 9932 48                       H
        lsr     a                               ; 9933 4A                       J
        lsr     a                               ; 9934 4A                       J
        lsr     a                               ; 9935 4A                       J
        tay                                     ; 9936 A8                       .
        pla                                     ; 9937 68                       h
        and     #$07                            ; 9938 29 07                    ).
        tax                                     ; 993A AA                       .
        lda     PowersOfTwo,x                   ; 993B BD 41 B0                 .A.
L993E:  rts                                     ; 993E 60                       `
; ----------------------------------------------------------------------------
L993F:  tax                                     ; 993F AA                       .
        lda     #$00                            ; 9940 A9 00                    ..
        bcs     L9955                           ; 9942 B0 11                    ..
        lda     $E8                             ; 9944 A5 E8                    ..
        ldy     $E9                             ; 9946 A4 E9                    ..
        jsr     L9964                           ; 9948 20 64 99                  d.
        lda     #$04                            ; 994B A9 04                    ..
        cpx     #$19                            ; 994D E0 19                    ..
        bne     L9953                           ; 994F D0 02                    ..
        ora     #$08                            ; 9951 09 08                    ..
L9953:  ldx     #$0D                            ; 9953 A2 0D                    ..
L9955:  bit     $039D                           ; 9955 2C 9D 03                 ,..
        bpl     L995C                           ; 9958 10 02                    ..
        ora     #$40                            ; 995A 09 40                    .@
L995C:  sta     ST                              ; 995C 85 BA                    ..
        stz     $039D                           ; 995E 9C 9D 03                 ...
        txa                                     ; 9961 8A                       .
L9962:  clc                                     ; 9962 18                       .
        rts                                     ; 9963 60                       `
; ----------------------------------------------------------------------------
L9964:  stx     $0210                           ; 9964 8E 10 02                 ...
        sta     $0211                           ; 9967 8D 11 02                 ...
        sty     $0212                           ; 996A 8C 12 02                 ...
        .byte   $9C                             ; 996D 9C                       .
        .byte   $17                             ; 996E 17                       .
L996F:  .byte   $02                             ; 996F 02                       .
        rts                                     ; 9970 60                       `
; ----------------------------------------------------------------------------
L9971:  .byte   "CHANNEL"                       ; 9971 43 48 41 4E 4E 45 4C     CHANNEL
        .byte   $00                             ; 9978 00                       .
        .byte   "COMMAND"                       ; 9979 43 4F 4D 4D 41 4E 44     COMMAND
        .byte   $00                             ; 9980 00                       .
        .byte   "DIRECTORY"                     ; 9981 44 49 52 45 43 54 4F 52  DIRECTOR
                                                ; 9989 59                       Y
        .byte   $00                             ; 998A 00                       .
        .byte   "DISK"                          ; 998B 44 49 53 4B              DISK
        .byte   $00                             ; 998F 00                       .
        .byte   "DOS"                           ; 9990 44 4F 53                 DOS
        .byte   $00                             ; 9993 00                       .
        .byte   "ERROR"                         ; 9994 45 52 52 4F 52           ERROR
        .byte   $00                             ; 9999 00                       .
L999A:  .byte   "EXISTS"                        ; 999A 45 58 49 53 54 53        EXISTS
        .byte   $00                             ; 99A0 00                       .
        .byte   "F"                             ; 99A1 46                       F
L99A2:  .byte   "ILE"                           ; 99A2 49 4C 45                 ILE
        .byte   $00                             ; 99A5 00                       .
L99A6:  .byte   "FILES"                         ; 99A6 46 49 4C 45 53           FILES
        .byte   $00                             ; 99AB 00                       .
        .byte   "FOUND"                         ; 99AC 46 4F 55 4E 44           FOUND
        .byte   $00                             ; 99B1 00                       .
        .byte   "FULL"                          ; 99B2 46 55 4C 4C              FULL
        .byte   $00                             ; 99B6 00                       .
        .byte   "ILLEGAL"                       ; 99B7 49 4C 4C 45 47 41 4C     ILLEGAL
        .byte   $00                             ; 99BE 00                       .
        .byte   "INVALID"                       ; 99BF 49 4E 56 41 4C 49 44     INVALID
        .byte   $00                             ; 99C6 00                       .
        .byte   "LARGE"                         ; 99C7 4C 41 52 47 45           LARGE
        .byte   $00                             ; 99CC 00                       .
        .byte   "LINE"                          ; 99CD 4C 49 4E 45              LINE
        .byte   $00                             ; 99D1 00                       .
        .byte   "LONG"                          ; 99D2 4C 4F 4E 47              LONG
        .byte   $00                             ; 99D6 00                       .
        .byte   "MISMATCH"                      ; 99D7 4D 49 53 4D 41 54 43 48  MISMATCH
        .byte   $00                             ; 99DF 00                       .
        .byte   "NO"                            ; 99E0 4E 4F                    NO
        .byte   $00                             ; 99E2 00                       .
        .byte   "NOT"                           ; 99E3 4E 4F 54                 NOT
        .byte   $00                             ; 99E6 00                       .
        .byte   "OK"                            ; 99E7 4F 4B                    OK
        .byte   $00                             ; 99E9 00                       .
        .byte   "OPEN"                          ; 99EA 4F 50 45 4E              OPEN
        .byte   $00                             ; 99EE 00                       .
        .byte   "PROTECT"                       ; 99EF 50 52 4F 54 45 43 54     PROTECT
        .byte   $00                             ; 99F6 00                       .
        .byte   "READ"                          ; 99F7 52 45 41 44              READ
        .byte   $00                             ; 99FB 00                       .
        .byte   "SCRATCHED"                     ; 99FC 53 43 52 41 54 43 48 45  SCRATCHE
                                                ; 9A04 44                       D
        .byte   $00                             ; 9A05 00                       .
        .byte   "SYNTAX"                        ; 9A06 53 59 4E 54 41 58        SYNTAX
        .byte   $00                             ; 9A0C 00                       .
        .byte   "SYSTEM"                        ; 9A0D 53 59 53 54 45 4D        SYSTEM
        .byte   $00                             ; 9A13 00                       .
        .byte   "T&S"                           ; 9A14 54 26 53                 T&S
        .byte   $00                             ; 9A17 00                       .
        .byte   "TOO"                           ; 9A18 54 4F 4F                 TOO
        .byte   $00                             ; 9A1B 00                       .
        .byte   "TYPE"                          ; 9A1C 54 59 50 45              TYPE
        .byte   $00                             ; 9A20 00                       .
        .byte   "VERIFY"                        ; 9A21 56 45 52 49 46 59        VERIFY
        .byte   $00                             ; 9A27 00                       .
        .byte   "WR"                            ; 9A28 57 52                    WR
L9A2A:  .byte   "I"                             ; 9A2A 49                       I
L9A2B:  .byte   "TE"                            ; 9A2B 54 45                    TE
        .byte   $00,$00                         ; 9A2D 00 00                    ..
; ----------------------------------------------------------------------------
        .byte   $77,$00,$00,$01,$36,$8C,$00,$14 ; 9A2F 77 00 00 01 36 8C 00 14  w...6...
        .byte   $47,$A4,$00,$19,$B8,$B1,$24,$1A ; 9A37 47 A4 00 19 B8 B1 24 1A  G.....$.
        .byte   $B8,$7F,$24,$1B,$87,$24,$00,$1F ; 9A3F B8 7F 24 1B 87 24 00 1F  ..$..$..
        .byte   $4F,$09,$00,$20,$62,$5D,$00,$21 ; 9A47 4F 09 00 20 62 5D 00 21  O.. b].!
        .byte   $96,$24,$00,$21,$96,$24,$00,$22 ; 9A4F 96 24 00 21 96 24 00 22  .$.!.$."
        .byte   $96,$24,$00,$27,$96,$24,$00,$34 ; 9A57 96 24 00 27 96 24 00 34  .$.'.$.4
        .byte   $31,$A8,$57,$3C,$B8,$31,$7A,$3D ; 9A5F 31 A8 57 3C B8 31 7A 3D  1.W<.1z=
        .byte   $31,$73,$7A                     ; 9A67 31 73 7A                 1sz
L9A6A:  .byte   $3E,$31,$73,$3C,$3F,$31,$2A,$00 ; 9A6A 3E 31 73 3C 3F 31 2A 00  >1s<?1*.
        .byte   $40,$31,$AC,$67,$43,$47,$9D,$A4 ; 9A72 40 31 AC 67 43 47 9D A4  @1.gCG..
        .byte   $46,$70,$01,$00,$47,$11,$24,$00 ; 9A7A 46 70 01 00 47 11 24 00  Fp..G.$.
        .byte   $47,$11,$24,$00,$48             ; 9A82 47 11 24 00 48           G.$.H
L9A87:  .byte   $1B,$42,$00,$49,$20,$67,$24     ; 9A87 1B 42 00 49 20 67 24     .B.I g$
L9A8E:  .byte   $00,$01,$02,$80,$81,$82,$83,$84 ; 9A8E 00 01 02 80 81 82 83 84  ........
        .byte   $85,$86,$87,$88                 ; 9A96 85 86 87 88              ....
L9A9A:  .byte   $41,$81,$10,$22,$42,$82,$10,$23 ; 9A9A 41 81 10 22 42 82 10 23  A.."B..#
        .byte   $43,$83,$00                     ; 9AA2 43 83 00                 C..
; ----------------------------------------------------------------------------
L9AA5:  lda     $0217                           ; 9AA5 AD 17 02                 ...
        inc     $0217                           ; 9AA8 EE 17 02                 ...
        ldy     #$0B                            ; 9AAB A0 0B                    ..
L9AAD:  cmp     L9A8E,y                         ; 9AAD D9 8E 9A                 ...
        beq     L9AB8                           ; 9AB0 F0 06                    ..
        dey                                     ; 9AB2 88                       .
        bpl     L9AAD                           ; 9AB3 10 F8                    ..
        jmp     L9AE8                           ; 9AB5 4C E8 9A                 L..
; ----------------------------------------------------------------------------
L9AB8:  lda     L9A9A,y                         ; 9AB8 B9 9A 9A                 ...
        bne     L9ACD                           ; 9ABB D0 10                    ..
        tax                                     ; 9ABD AA                       .
        tay                                     ; 9ABE A8                       .
        .byte   $20                             ; 9ABF 20
        .byte   $64                             ; 9AC0 64                       d
L9AC1:  sta     $6E38,y                         ; 9AC1 99 38 6E                 .8n
        sta     $A903,x                         ; 9AC4 9D 03 A9                 ...
        .byte   $0D                             ; 9AC7 0D                       .
        .byte   $2C                             ; 9AC8 2C                       ,
L9AC9:  lda     #$2C                            ; 9AC9 A9 2C                    .,
        sec                                     ; 9ACB 38                       8
        rts                                     ; 9ACC 60                       `
; ----------------------------------------------------------------------------
L9ACD:  bit     #$10                            ; 9ACD 89 10                    ..
        bne     L9AC9                           ; 9ACF D0 F8                    ..
        sta     $E0                             ; 9AD1 85 E0                    ..
        and     #$03                            ; 9AD3 29 03                    ).
L9AD5:  tax                                     ; 9AD5 AA                       .
        lda     $020F,x                         ; 9AD6 BD 0F 02                 ...
        jsr     L886A                           ; 9AD9 20 6A 88                  j.
        bit     $E0                             ; 9ADC 24 E0                    $.
        bmi     L9AE4                           ; 9ADE 30 04                    0.
        txa                                     ; 9AE0 8A                       .
        bvs     L9AE4                           ; 9AE1 70 01                    p.
        tya                                     ; 9AE3 98                       .
L9AE4:  .byte   $09                             ; 9AE4 09                       .
L9AE5:  bmi     L9B1F                           ; 9AE5 30 38                    08
        rts                                     ; 9AE7 60                       `
; ----------------------------------------------------------------------------
L9AE8:  dec     a                               ; 9AE8 3A                       :
        sta     $E0                             ; 9AE9 85 E0                    ..
        ldx     #$00                            ; 9AEB A2 00                    ..
        lda     $0210                           ; 9AED AD 10 02                 ...
L9AF0:  inx                                     ; 9AF0 E8                       .
        inx                                     ; 9AF1 E8                       .
        inx                                     ; 9AF2 E8                       .
        inx                                     ; 9AF3 E8                       .
        beq     L9B12                           ; 9AF4 F0 1C                    ..
        cmp     L9A2A,x                         ; 9AF6 DD 2A 9A                 .*.
        bne     L9AF0                           ; 9AF9 D0 F5                    ..
L9AFB:  lda     #$20                            ; 9AFB A9 20                    .
        ldy     L9A2B,x                         ; 9AFD BC 2B 9A                 .+.
        .byte   $F0                             ; 9B00 F0                       .
L9B01:  .byte   $10                             ; 9B01 10                       .
L9B02:  dec     $E0                             ; 9B02 C6 E0                    ..
        beq     L9B19                           ; 9B04 F0 13                    ..
        iny                                     ; 9B06 C8                       .
        lda     L996F,y                         ; 9B07 B9 6F 99                 .o.
        bne     L9B02                           ; 9B0A D0 F6                    ..
        inx                                     ; 9B0C E8                       .
        txa                                     ; 9B0D 8A                       .
        and     #$03                            ; 9B0E 29 03                    ).
        bne     L9AFB                           ; 9B10 D0 E9                    ..
L9B12:  lda     #$80                            ; 9B12 A9 80                    ..
        sta     $0217                           ; 9B14 8D 17 02                 ...
        lda     #$2C                            ; 9B17 A9 2C                    .,
L9B19:  sec                                     ; 9B19 38                       8
        rts                                     ; 9B1A 60                       `
; ----------------------------------------------------------------------------
L9B1B:  jmp     (L9B1E,x)                       ; 9B1B 7C 1E 9B                 |..
L9B1E:  .byte   $F6                             ; 9B1E F6                       .
L9B1F:  .byte   $9B                             ; 9B1F 9B                       .
        phx                                     ; 9B20 DA                       .
        .byte   $9B                             ; 9B21 9B                       .
        .byte   $73                             ; 9B22 73                       s
L9B23:  ldy     $6B                             ; 9B23 A4 6B                    .k
        stz     L9BE0                           ; 9B25 9C E0 9B                 ...
        cmp     (CursorY),y                     ; 9B28 D1 A2                    ..
        ldy     $9C                             ; 9B2A A4 9C                    ..
        smb2    $9C                             ; 9B2C A7 9C                    ..
        .byte   $BB                             ; 9B2E BB                       .
        .byte   $9C                             ; 9B2F 9C                       .
        .byte   $BE                             ; 9B30 BE                       .
L9B31:  stz     L9F60                           ; 9B31 9C 60 9F                 .`.
        .byte   $63                             ; 9B34 63                       c
        bbs1    $F6,$F6                         ; 9B35 9F F6 A0                 ...
        sbc     LF0A0,y                         ; 9B38 F9 A0 F0                 ...
        stz     LA369,x                         ; 9B3B 9E 69 A3                 .i.
        adc     (CurMaxY_,x)                    ; 9B3E 61 A6                    a.
        smb2    CurMaxY_                        ; 9B40 A7 A6                    ..
        phy                                     ; 9B42 5A                       Z
        ldx     $6B                             ; 9B43 A6 6B                    .k
        ldx     $2B                             ; 9B45 A6 2B                    .+
        smb2    $48                             ; 9B47 A7 48                    .H
        tay                                     ; 9B49 A8                       .
        bbr4    $A8,L9AE5                       ; 9B4A 4F A8 98                 O..
        tay                                     ; 9B4D A8                       .
        and     L8AA9                           ; 9B4E 2D A9 8A                 -..
        ldx     #$D9                            ; 9B51 A2 D9                    ..
        ldx     #$9A                            ; 9B53 A2 9A                    ..
        ldx     #$DC                            ; 9B55 A2 DC                    ..
        ldx     #$DB                            ; 9B57 A2 DB                    ..
        smb2    $2B                             ; 9B59 A7 2B                    .+
        ldy     #$F1                            ; 9B5B A0 F1                    ..
        bbs1    $DB,L9B01                       ; 9B5D 9F DB A1                 ...
        cmp     $1AA1,x                         ; 9B60 DD A1 1A                 ...
        ldx     #$6B                            ; 9B63 A2 6B                    .k
        ldx     #$7B                            ; 9B65 A2 7B                    .{
        ldx     #$AB                            ; 9B67 A2 AB                    ..
        ldx     #$CD                            ; 9B69 A2 CD                    ..
        ldx     #$D5                            ; 9B6B A2 D5                    ..
        ldx     #$38                            ; 9B6D A2 38                    .8
        .byte   $A3                             ; 9B6F A3                       .
        and     (CurMaxX_,x)                    ; 9B70 21 A4                    !.
        stx     $A3,y                           ; 9B72 96 A3                    ..
        rol     CursorY                         ; 9B74 26 A2                    &.
        adc     CurMaxX_,x                      ; 9B76 75 A4                    u.
        tay                                     ; 9B78 A8                       .
        ldx     #$D8                            ; 9B79 A2 D8                    ..
        smb2    L004E                           ; 9B7B A7 4E                    .N
        bbs1    $42,L9B1F                       ; 9B7D 9F 42 9F                 .B.
        .byte   $33                             ; 9B80 33                       3
        bbs1    $5A,L9B23                       ; 9B81 9F 5A 9F                 .Z.
        bbr5    CurMaxY_,L9BF4                  ; 9B84 5F A6 6D                 _.m
        ldy     #$B7                            ; 9B87 A0 B7                    ..
        lda     ($CE,x)                         ; 9B89 A1 CE                    ..
        .byte   $9B                             ; 9B8B 9B                       .
        bbs1    $9B,L9B31                       ; 9B8C 9F 9B A2                 ...
        .byte   $9B                             ; 9B8F 9B                       .
        tya                                     ; 9B90 98                       .
        .byte   $9B                             ; 9B91 9B                       .
        .byte   $9B                             ; 9B92 9B                       .
        .byte   $9B                             ; 9B93 9B                       .
        dec     $A9                             ; 9B94 C6 A9                    ..
        cmp     #$A9                            ; 9B96 C9 A9                    ..
        jsr     LA02B                           ; 9B98 20 2B A0                  +.
        ldy     #$FF                            ; 9B9B A0 FF                    ..
        bra     L9BA4                           ; 9B9D 80 05                    ..
        jsr     LA02B                           ; 9B9F 20 2B A0                  +.
        ldy     #$00                            ; 9BA2 A0 00                    ..
L9BA4:  sty     $49                             ; 9BA4 84 49                    .I
        jsr     L9BF6                           ; 9BA6 20 F6 9B                  ..
        lda     $2B                             ; 9BA9 A5 2B                    .+
        eor     $49                             ; 9BAB 45 49                    EI
        sta     $00                             ; 9BAD 85 00                    ..
        lda     $2C                             ; 9BAF A5 2C                    .,
        eor     $49                             ; 9BB1 45 49                    EI
        sta     $01                             ; 9BB3 85 01                    ..
        jsr     LA26B                           ; 9BB5 20 6B A2                  k.
        jsr     L9BF6                           ; 9BB8 20 F6 9B                  ..
        lda     $2C                             ; 9BBB A5 2C                    .,
        eor     $49                             ; 9BBD 45 49                    EI
        and     $01                             ; 9BBF 25 01                    %.
        eor     $49                             ; 9BC1 45 49                    EI
        tay                                     ; 9BC3 A8                       .
        lda     $2B                             ; 9BC4 A5 2B                    .+
        eor     $49                             ; 9BC6 45 49                    EI
        and     $00                             ; 9BC8 25 00                    %.
        eor     $49                             ; 9BCA 45 49                    EI
        bra     L9BDA                           ; 9BCC 80 0C                    ..
        jsr     L9BF6                           ; 9BCE 20 F6 9B                  ..
        lda     $2C                             ; 9BD1 A5 2C                    .,
        eor     #$FF                            ; 9BD3 49 FF                    I.
        tay                                     ; 9BD5 A8                       .
        lda     $2B                             ; 9BD6 A5 2B                    .+
        eor     #$FF                            ; 9BD8 49 FF                    I.
L9BDA:  jsr     L9C60                           ; 9BDA 20 60 9C                  `.
L9BDD:  jmp     LA2B3                           ; 9BDD 4C B3 A2                 L..
; ----------------------------------------------------------------------------
L9BE0:  lda     $2D                             ; 9BE0 A5 2D                    .-
        bmi     L9C05                           ; 9BE2 30 21                    0!
        lda     $25                             ; 9BE4 A5 25                    .%
        cmp     #$91                            ; 9BE6 C9 91                    ..
        bcs     L9C05                           ; 9BE8 B0 1B                    ..
        jsr     LA338                           ; 9BEA 20 38 A3                  8.
        .byte   $A5                             ; 9BED A5                       .
L9BEE:  .byte   $2B                             ; 9BEE 2B                       +
        ldy     $2C                             ; 9BEF A4 2C                    .,
        sty     $06                             ; 9BF1 84 06                    ..
        .byte   $85                             ; 9BF3 85                       .
L9BF4:  rmb0    $60                             ; 9BF4 07 60                    .`
L9BF6:  lda     $25                             ; 9BF6 A5 25                    .%
        cmp     #$90                            ; 9BF8 C9 90                    ..
        bcc     L9C0A                           ; 9BFA 90 0E                    ..
        lda     #$58                            ; 9BFC A9 58                    .X
        ldy     #$9C                            ; 9BFE A0 9C                    ..
        jsr     LA2DC                           ; 9C00 20 DC A2                  ..
        beq     L9C0A                           ; 9C03 F0 05                    ..
L9C05:  ldx     #$0E                            ; 9C05 A2 0E                    ..
        jmp     LFB4B                           ; 9C07 4C 4B FB                 LK.
; ----------------------------------------------------------------------------
L9C0A:  .byte   $4C                             ; 9C0A 4C                       L
        sec                                     ; 9C0B 38                       8
L9C0C:  .byte   $A3                             ; 9C0C A3                       .
L9C0D:  inc     $3F                             ; 9C0D E6 3F                    .?
        bne     L9C13                           ; 9C0F D0 02                    ..
        inc     $40                             ; 9C11 E6 40                    .@
L9C13:  sei                                     ; 9C13 78                       x
        ldy     #$00                            ; 9C14 A0 00                    ..
        lda     #$3F                            ; 9C16 A9 3F                    .?
        sta     $034E                           ; 9C18 8D 4E 03                 .N.
        jsr     FROM_C67B                       ; 9C1B 20 4A 03                  J.
        cli                                     ; 9C1E 58                       X
        cmp     #$3A                            ; 9C1F C9 3A                    .:
        bcs     L9C2D                           ; 9C21 B0 0A                    ..
        cmp     #$20                            ; 9C23 C9 20                    .
        beq     L9C0D                           ; 9C25 F0 E6                    ..
        sec                                     ; 9C27 38                       8
        sbc     #$30                            ; 9C28 E9 30                    .0
        sec                                     ; 9C2A 38                       8
        sbc     #$D0                            ; 9C2B E9 D0                    ..
L9C2D:  rts                                     ; 9C2D 60                       `
; ----------------------------------------------------------------------------
L9C2E:  lda     #$3F                            ; 9C2E A9 3F                    .?
        sta     $034E                           ; 9C30 8D 4E 03                 .N.
        jmp     FROM_C67B                       ; 9C33 4C 4A 03                 LJ.
; ----------------------------------------------------------------------------
L9C36:  lda     #$08                            ; 9C36 A9 08                    ..
        sta     $034E                           ; 9C38 8D 4E 03                 .N.
        .byte   $4C                             ; 9C3B 4C                       L
L9C3C:  lsr     a                               ; 9C3C 4A                       J
        .byte   $03                             ; 9C3D 03                       .
L9C3E:  lda     #$08                            ; 9C3E A9 08                    ..
        sta     $0357                           ; 9C40 8D 57 03                 .W.
        jmp     FROM_C684                       ; 9C43 4C 53 03                 LS.
; ----------------------------------------------------------------------------
L9C46:  lda     #$0A                            ; 9C46 A9 0A                    ..
        sta     $034E                           ; 9C48 8D 4E 03                 .N.
        jmp     FROM_C67B                       ; 9C4B 4C 4A 03                 LJ.
; ----------------------------------------------------------------------------
L9C4E:  pha                                     ; 9C4E 48                       H
        lda     #$0A                            ; 9C4F A9 0A                    ..
        sta     $0360                           ; 9C51 8D 60 03                 .`.
        pla                                     ; 9C54 68                       h
        jmp     FROM_C68D                       ; 9C55 4C 5C 03                 L\.
; ----------------------------------------------------------------------------
        bcc     L9BDA                           ; 9C58 90 80                    ..
        brk                                     ; 9C5A 00                       .
        brk                                     ; 9C5B 00                       .
        brk                                     ; 9C5C 00                       .
        brk                                     ; 9C5D 00                       .
        brk                                     ; 9C5E 00                       .
        brk                                     ; 9C5F 00                       .
L9C60:  ldx     #$00                            ; 9C60 A2 00                    ..
        .byte   $86                             ; 9C62 86                       .
L9C63:  .byte   $02                             ; 9C63 02                       .
        sta     $26                             ; 9C64 85 26                    .&
        sty     $27                             ; 9C66 84 27                    .'
        ldx     #$90                            ; 9C68 A2 90                    ..
        rts                                     ; 9C6A 60                       `
; ----------------------------------------------------------------------------
        ldx     $3F                             ; 9C6B A6 3F                    .?
        ldy     $40                             ; 9C6D A4 40                    .@
        stx     $3B                             ; 9C6F 86 3B                    .;
        sty     $3C                             ; 9C71 84 3C                    .<
        ldx     $08                             ; 9C73 A6 08                    ..
        stx     $3F                             ; 9C75 86 3F                    .?
        clc                                     ; 9C77 18                       .
        adc     $08                             ; 9C78 65 08                    e.
        sta     $0A                             ; 9C7A 85 0A                    ..
        ldx     $09                             ; 9C7C A6 09                    ..
        stx     $40                             ; 9C7E 86 40                    .@
        bcc     L9C83                           ; 9C80 90 01                    ..
        inx                                     ; 9C82 E8                       .
L9C83:  stx     $0B                             ; 9C83 86 0B                    ..
        ldy     #$00                            ; 9C85 A0 00                    ..
        jsr     L9C46                           ; 9C87 20 46 9C                  F.
        pha                                     ; 9C8A 48                       H
        tya                                     ; 9C8B 98                       .
        jsr     L9C4E                           ; 9C8C 20 4E 9C                  N.
        jsr     L9C13                           ; 9C8F 20 13 9C                  ..
        jsr     LA396                           ; 9C92 20 96 A3                  ..
        pla                                     ; 9C95 68                       h
        ldy     #$00                            ; 9C96 A0 00                    ..
        jsr     L9C4E                           ; 9C98 20 4E 9C                  N.
        ldx     $3B                             ; 9C9B A6 3B                    .;
        ldy     $3C                             ; 9C9D A4 3C                    .<
        stx     $3F                             ; 9C9F 86 3F                    .?
        sty     $40                             ; 9CA1 84 40                    .@
L9CA3:  rts                                     ; 9CA3 60                       `
; ----------------------------------------------------------------------------
        jsr     LA02B                           ; 9CA4 20 2B A0                  +.
L9CA7:  lda     $2D                             ; 9CA7 A5 2D                    .-
        eor     #$FF                            ; 9CA9 49 FF                    I.
        sta     $2D                             ; 9CAB 85 2D                    .-
        eor     $38                             ; 9CAD 45 38                    E8
        sta     $39                             ; 9CAF 85 39                    .9
        lda     $25                             ; 9CB1 A5 25                    .%
        jmp     L9CBE                           ; 9CB3 4C BE 9C                 L..
; ----------------------------------------------------------------------------
L9CB6:  jsr     L9E56                           ; 9CB6 20 56 9E                  V.
        bcc     L9CF7                           ; 9CB9 90 3C                    .<
        .byte   $20                             ; 9CBB 20
        .byte   $2B                             ; 9CBC 2B                       +
L9CBD:  .byte   $A0                             ; 9CBD A0                       .
L9CBE:  bne     L9CC3                           ; 9CBE D0 03                    ..
        jmp     LA26B                           ; 9CC0 4C 6B A2                 Lk.
; ----------------------------------------------------------------------------
L9CC3:  ldx     $3A                             ; 9CC3 A6 3A                    .:
        stx     $14                             ; 9CC5 86 14                    ..
        ldx     #$30                            ; 9CC7 A2 30                    .0
        lda     $30                             ; 9CC9 A5 30                    .0
L9CCB:  tay                                     ; 9CCB A8                       .
        beq     L9CA3                           ; 9CCC F0 D5                    ..
        sec                                     ; 9CCE 38                       8
        sbc     $25                             ; 9CCF E5 25                    .%
        beq     L9CF7                           ; 9CD1 F0 24                    .$
        bcc     L9CE7                           ; 9CD3 90 12                    ..
        .byte   $84                             ; 9CD5 84                       .
L9CD6:  and     CurMaxX_                        ; 9CD6 25 A4                    %.
        sec                                     ; 9CD8 38                       8
        sty     $2D                             ; 9CD9 84 2D                    .-
L9CDB:  eor     #$FF                            ; 9CDB 49 FF                    I.
        adc     #$00                            ; 9CDD 69 00                    i.
        ldy     #$00                            ; 9CDF A0 00                    ..
        sty     $14                             ; 9CE1 84 14                    ..
        ldx     #$25                            ; 9CE3 A2 25                    .%
        bne     L9CEB                           ; 9CE5 D0 04                    ..
L9CE7:  ldy     #$00                            ; 9CE7 A0 00                    ..
        sty     $3A                             ; 9CE9 84 3A                    .:
L9CEB:  cmp     #$F9                            ; 9CEB C9 F9                    ..
        bmi     L9CB6                           ; 9CED 30 C7                    0.
        tay                                     ; 9CEF A8                       .
        lda     $3A                             ; 9CF0 A5 3A                    .:
        lsr     $01,x                           ; 9CF2 56 01                    V.
        jsr     L9E6D                           ; 9CF4 20 6D 9E                  m.
L9CF7:  bit     $39                             ; 9CF7 24 39                    $9
        bpl     L9D73                           ; 9CF9 10 78                    .x
        ldy     #$25                            ; 9CFB A0 25                    .%
        cpx     #$30                            ; 9CFD E0 30                    .0
        beq     L9D03                           ; 9CFF F0 02                    ..
        ldy     #$30                            ; 9D01 A0 30                    .0
L9D03:  sec                                     ; 9D03 38                       8
        eor     #$FF                            ; 9D04 49 FF                    I.
        adc     $14                             ; 9D06 65 14                    e.
        sta     $3A                             ; 9D08 85 3A                    .:
        lda     $07,y                           ; 9D0A B9 07 00                 ...
        sbc     $07,x                           ; 9D0D F5 07                    ..
L9D0F:  sta     $2C                             ; 9D0F 85 2C                    .,
        lda     $06,y                           ; 9D11 B9 06 00                 ...
        sbc     $06,x                           ; 9D14 F5 06                    ..
        .byte   $85                             ; 9D16 85                       .
L9D17:  .byte   $2B                             ; 9D17 2B                       +
        lda     $05,y                           ; 9D18 B9 05 00                 ...
        sbc     $05,x                           ; 9D1B F5 05                    ..
        sta     $2A                             ; 9D1D 85 2A                    .*
        lda     $04,y                           ; 9D1F B9 04 00                 ...
        sbc     $04,x                           ; 9D22 F5 04                    ..
        sta     $29                             ; 9D24 85 29                    .)
L9D26:  lda     $03,y                           ; 9D26 B9 03 00                 ...
        sbc     $03,x                           ; 9D29 F5 03                    ..
        sta     $28                             ; 9D2B 85 28                    .(
        lda     $02,y                           ; 9D2D B9 02 00                 ...
        sbc     $02,x                           ; 9D30 F5 02                    ..
        sta     $27                             ; 9D32 85 27                    .'
        lda     $01,y                           ; 9D34 B9 01 00                 ...
        sbc     $01,x                           ; 9D37 F5 01                    ..
        sta     $26                             ; 9D39 85 26                    .&
L9D3B:  bcs     L9D40                           ; 9D3B B0 03                    ..
L9D3D:  jsr     L9DDA                           ; 9D3D 20 DA 9D                  ..
L9D40:  ldy     #$00                            ; 9D40 A0 00                    ..
        tya                                     ; 9D42 98                       .
        clc                                     ; 9D43 18                       .
L9D44:  ldx     $26                             ; 9D44 A6 26                    .&
        bne     L9DB6                           ; 9D46 D0 6E                    .n
        ldx     $27                             ; 9D48 A6 27                    .'
        stx     $26                             ; 9D4A 86 26                    .&
        .byte   $A6                             ; 9D4C A6                       .
L9D4D:  plp                                     ; 9D4D 28                       (
        stx     $27                             ; 9D4E 86 27                    .'
        ldx     $29                             ; 9D50 A6 29                    .)
        stx     $28                             ; 9D52 86 28                    .(
        ldx     $2A                             ; 9D54 A6 2A                    .*
        stx     $29                             ; 9D56 86 29                    .)
        ldx     $2B                             ; 9D58 A6 2B                    .+
        stx     $2A                             ; 9D5A 86 2A                    .*
        ldx     $2C                             ; 9D5C A6 2C                    .,
L9D5E:  stx     $2B                             ; 9D5E 86 2B                    .+
L9D60:  ldx     $3A                             ; 9D60 A6 3A                    .:
        stx     $2C                             ; 9D62 86 2C                    .,
        sty     $3A                             ; 9D64 84 3A                    .:
        adc     #$08                            ; 9D66 69 08                    i.
        cmp     #$38                            ; 9D68 C9 38                    .8
        bne     L9D44                           ; 9D6A D0 D8                    ..
L9D6C:  lda     #$00                            ; 9D6C A9 00                    ..
L9D6E:  .byte   $85                             ; 9D6E 85                       .
L9D6F:  .byte   $25                             ; 9D6F 25                       %
L9D70:  sta     $2D                             ; 9D70 85 2D                    .-
        rts                                     ; 9D72 60                       `
; ----------------------------------------------------------------------------
L9D73:  adc     $14                             ; 9D73 65 14                    e.
        sta     $3A                             ; 9D75 85 3A                    .:
        lda     $2C                             ; 9D77 A5 2C                    .,
        adc     $37                             ; 9D79 65 37                    e7
        sta     $2C                             ; 9D7B 85 2C                    .,
        lda     $2B                             ; 9D7D A5 2B                    .+
        adc     $36                             ; 9D7F 65 36                    e6
        .byte   $85                             ; 9D81 85                       .
L9D82:  .byte   $2B                             ; 9D82 2B                       +
        lda     $2A                             ; 9D83 A5 2A                    .*
        adc     $35                             ; 9D85 65 35                    e5
        sta     $2A                             ; 9D87 85 2A                    .*
        lda     $29                             ; 9D89 A5 29                    .)
        .byte   $65                             ; 9D8B 65                       e
L9D8C:  bit     $85,x                           ; 9D8C 34 85                    4.
        .byte   $29                             ; 9D8E 29                       )
L9D8F:  lda     $28                             ; 9D8F A5 28                    .(
L9D91:  adc     $33                             ; 9D91 65 33                    e3
        sta     $28                             ; 9D93 85 28                    .(
        lda     $27                             ; 9D95 A5 27                    .'
        adc     $32                             ; 9D97 65 32                    e2
        sta     $27                             ; 9D99 85 27                    .'
        lda     $26                             ; 9D9B A5 26                    .&
        adc     $31                             ; 9D9D 65 31                    e1
        sta     $26                             ; 9D9F 85 26                    .&
L9DA1:  jmp     L9DC3                           ; 9DA1 4C C3 9D                 L..
; ----------------------------------------------------------------------------
L9DA4:  adc     #$01                            ; 9DA4 69 01                    i.
        asl     $3A                             ; 9DA6 06 3A                    .:
        rol     $2C                             ; 9DA8 26 2C                    &,
        rol     $2B                             ; 9DAA 26 2B                    &+
        rol     $2A                             ; 9DAC 26 2A                    &*
        rol     $29                             ; 9DAE 26 29                    &)
        rol     $28                             ; 9DB0 26 28                    &(
        rol     $27                             ; 9DB2 26 27                    &'
        rol     $26                             ; 9DB4 26 26                    &&
L9DB6:  bpl     L9DA4                           ; 9DB6 10 EC                    ..
        sec                                     ; 9DB8 38                       8
        sbc     $25                             ; 9DB9 E5 25                    .%
        bcs     L9D6C                           ; 9DBB B0 AF                    ..
        eor     #$FF                            ; 9DBD 49 FF                    I.
        adc     #$01                            ; 9DBF 69 01                    i.
        sta     $25                             ; 9DC1 85 25                    .%
L9DC3:  bcc     L9DD9                           ; 9DC3 90 14                    ..
L9DC5:  inc     $25                             ; 9DC5 E6 25                    .%
        beq     L9E2F                           ; 9DC7 F0 66                    .f
        ror     $26                             ; 9DC9 66 26                    f&
        ror     $27                             ; 9DCB 66 27                    f'
        ror     $28                             ; 9DCD 66 28                    f(
        ror     $29                             ; 9DCF 66 29                    f)
        ror     $2A                             ; 9DD1 66 2A                    f*
        ror     $2B                             ; 9DD3 66 2B                    f+
        ror     $2C                             ; 9DD5 66 2C                    f,
        ror     $3A                             ; 9DD7 66 3A                    f:
L9DD9:  rts                                     ; 9DD9 60                       `
; ----------------------------------------------------------------------------
L9DDA:  lda     $2D                             ; 9DDA A5 2D                    .-
        eor     #$FF                            ; 9DDC 49 FF                    I.
        sta     $2D                             ; 9DDE 85 2D                    .-
L9DE0:  lda     $26                             ; 9DE0 A5 26                    .&
        eor     #$FF                            ; 9DE2 49 FF                    I.
        sta     $26                             ; 9DE4 85 26                    .&
        lda     $27                             ; 9DE6 A5 27                    .'
        eor     #$FF                            ; 9DE8 49 FF                    I.
        sta     $27                             ; 9DEA 85 27                    .'
L9DEC:  lda     $28                             ; 9DEC A5 28                    .(
        eor     #$FF                            ; 9DEE 49 FF                    I.
        sta     $28                             ; 9DF0 85 28                    .(
        lda     $29                             ; 9DF2 A5 29                    .)
        eor     #$FF                            ; 9DF4 49 FF                    I.
        sta     $29                             ; 9DF6 85 29                    .)
        lda     $2A                             ; 9DF8 A5 2A                    .*
        eor     #$FF                            ; 9DFA 49 FF                    I.
        sta     $2A                             ; 9DFC 85 2A                    .*
        lda     $2B                             ; 9DFE A5 2B                    .+
        eor     #$FF                            ; 9E00 49 FF                    I.
        sta     $2B                             ; 9E02 85 2B                    .+
        lda     $2C                             ; 9E04 A5 2C                    .,
        eor     #$FF                            ; 9E06 49 FF                    I.
        sta     $2C                             ; 9E08 85 2C                    .,
        lda     $3A                             ; 9E0A A5 3A                    .:
        eor     #$FF                            ; 9E0C 49 FF                    I.
        sta     $3A                             ; 9E0E 85 3A                    .:
        .byte   $E6                             ; 9E10 E6                       .
L9E11:  dec     a                               ; 9E11 3A                       :
        bne     L9E2E                           ; 9E12 D0 1A                    ..
L9E14:  inc     $2C                             ; 9E14 E6 2C                    .,
        bne     L9E2E                           ; 9E16 D0 16                    ..
        inc     $2B                             ; 9E18 E6 2B                    .+
        bne     L9E2E                           ; 9E1A D0 12                    ..
        inc     $2A                             ; 9E1C E6 2A                    .*
        bne     L9E2E                           ; 9E1E D0 0E                    ..
        inc     $29                             ; 9E20 E6 29                    .)
        bne     L9E2E                           ; 9E22 D0 0A                    ..
        inc     $28                             ; 9E24 E6 28                    .(
        bne     L9E2E                           ; 9E26 D0 06                    ..
        inc     $27                             ; 9E28 E6 27                    .'
        bne     L9E2E                           ; 9E2A D0 02                    ..
        inc     $26                             ; 9E2C E6 26                    .&
L9E2E:  rts                                     ; 9E2E 60                       `
; ----------------------------------------------------------------------------
L9E2F:  ldx     #$0F                            ; 9E2F A2 0F                    ..
        jmp     LFB4B                           ; 9E31 4C 4B FB                 LK.
; ----------------------------------------------------------------------------
L9E34:  ldx     #$0B                            ; 9E34 A2 0B                    ..
L9E36:  ldy     $07,x                           ; 9E36 B4 07                    ..
        sty     $3A                             ; 9E38 84 3A                    .:
        ldy     $06,x                           ; 9E3A B4 06                    ..
        sty     $07,x                           ; 9E3C 94 07                    ..
        ldy     $05,x                           ; 9E3E B4 05                    ..
        .byte   $94                             ; 9E40 94                       .
L9E41:  asl     $B4                             ; 9E41 06 B4                    ..
        tsb     $94                             ; 9E43 04 94                    ..
        ora     $B4                             ; 9E45 05 B4                    ..
        .byte   $03                             ; 9E47 03                       .
        sty     $04,x                           ; 9E48 94 04                    ..
        .byte   $B4                             ; 9E4A B4                       .
L9E4B:  .byte   $02                             ; 9E4B 02                       .
        sty     $03,x                           ; 9E4C 94 03                    ..
        ldy     $01,x                           ; 9E4E B4 01                    ..
        sty     $02,x                           ; 9E50 94 02                    ..
        ldy     $2F                             ; 9E52 A4 2F                    ./
        sty     $01,x                           ; 9E54 94 01                    ..
L9E56:  adc     #$08                            ; 9E56 69 08                    i.
        bmi     L9E36                           ; 9E58 30 DC                    0.
        beq     L9E36                           ; 9E5A F0 DA                    ..
        sbc     #$08                            ; 9E5C E9 08                    ..
        tay                                     ; 9E5E A8                       .
        lda     $3A                             ; 9E5F A5 3A                    .:
        .byte   $B0                             ; 9E61 B0                       .
L9E62:  inc     a                               ; 9E62 1A                       .
L9E63:  asl     $01,x                           ; 9E63 16 01                    ..
        bcc     L9E69                           ; 9E65 90 02                    ..
        inc     $01,x                           ; 9E67 F6 01                    ..
L9E69:  ror     $01,x                           ; 9E69 76 01                    v.
        ror     $01,x                           ; 9E6B 76 01                    v.
L9E6D:  ror     $02,x                           ; 9E6D 76 02                    v.
        ror     $03,x                           ; 9E6F 76 03                    v.
        ror     $04,x                           ; 9E71 76 04                    v.
        ror     $05,x                           ; 9E73 76 05                    v.
        ror     $06,x                           ; 9E75 76 06                    v.
        ror     $07,x                           ; 9E77 76 07                    v.
        ror     a                               ; 9E79 6A                       j
        iny                                     ; 9E7A C8                       .
        bne     L9E63                           ; 9E7B D0 E6                    ..
L9E7D:  clc                                     ; 9E7D 18                       .
        rts                                     ; 9E7E 60                       `
; ----------------------------------------------------------------------------
        sta     ($00,x)                         ; 9E7F 81 00                    ..
        brk                                     ; 9E81 00                       .
        brk                                     ; 9E82 00                       .
        brk                                     ; 9E83 00                       .
        brk                                     ; 9E84 00                       .
        brk                                     ; 9E85 00                       .
        brk                                     ; 9E86 00                       .
        php                                     ; 9E87 08                       .
        ror     LCD2D,x                         ; 9E88 7E 2D CD                 ~-.
        stz     $DB                             ; 9E8B 64 DB                    d.
        lda     ($F8,x)                         ; 9E8D A1 F8                    ..
        pla                                     ; 9E8F 68                       h
        ror     LF944,x                         ; 9E90 7E 44 F9                 ~D.
        cld                                     ; 9E93 D8                       .
        ldy     CurMaxY_,x                      ; 9E94 B4 A6                    ..
        bbr7    $F4,L9F17                       ; 9E96 7F F4 7E                 ..~
        .byte   $63                             ; 9E99 63                       c
        rmb4    $AB                             ; 9E9A 47 AB                    G.
        lsr     $98                             ; 9E9C 46 98                    F.
        .byte   $BB                             ; 9E9E BB                       .
        tsb     $7F                             ; 9E9F 04 7F                    ..
L9EA1:  asl     $4D                             ; 9EA1 06 4D                    .M
        .byte   $42                             ; 9EA3 42                       B
        jmp     L11A0                           ; 9EA4 4C A0 11                 L..
; ----------------------------------------------------------------------------
        ror     $7F                             ; 9EA7 66 7F                    f.
        bit     $25                             ; 9EA9 24 25                    $%
        bit     #$EB                            ; 9EAB 89 EB                    ..
        cpx     #$15                            ; 9EAD E0 15                    ..
        lsr     $7F                             ; 9EAF 46 7F                    F.
        .byte   $53                             ; 9EB1 53                       S
        .byte   $0B                             ; 9EB2 0B                       .
        lda     ($53),y                         ; 9EB3 B1 53                    .S
        dec     $F6,x                           ; 9EB5 D6 F6                    ..
        cpy     $1380                           ; 9EB7 CC 80 13                 ...
        .byte   $BB                             ; 9EBA BB                       .
        .byte   $62                             ; 9EBB 62                       b
        smb0    $7C                             ; 9EBC 87 7C                    .|
        bbs5    $EE,L9E41                       ; 9EBE DF EE 80                 ...
        ror     $38,x                           ; 9EC1 76 38                    v8
        lsr     LD0E1                           ; 9EC3 4E E1 D0                 N..
        bbr1    $E8,L9E4B                       ; 9EC6 1F E8 82                 ...
        sec                                     ; 9EC9 38                       8
        tax                                     ; 9ECA AA                       .
        .byte   $3B                             ; 9ECB 3B                       ;
        and     #$5C                            ; 9ECC 29 5C                    )\
        rmb1    $EE                             ; 9ECE 17 EE                    ..
        bra     L9F07                           ; 9ED0 80 35                    .5
        tsb     $F3                             ; 9ED2 04 F3                    ..
        .byte   $33                             ; 9ED4 33                       3
        sbc     $68DE,y                         ; 9ED5 F9 DE 68                 ..h
        sta     ($35,x)                         ; 9ED8 81 35                    .5
        tsb     $F3                             ; 9EDA 04 F3                    ..
        .byte   $33                             ; 9EDC 33                       3
        sbc     $68DE,y                         ; 9EDD F9 DE 68                 ..h
        bra     L9E62                           ; 9EE0 80 80                    ..
        brk                                     ; 9EE2 00                       .
        brk                                     ; 9EE3 00                       .
        brk                                     ; 9EE4 00                       .
        brk                                     ; 9EE5 00                       .
        brk                                     ; 9EE6 00                       .
        brk                                     ; 9EE7 00                       .
        bra     L9F1B                           ; 9EE8 80 31                    .1
        adc     ($17)                           ; 9EEA 72 17                    r.
        smb7    $D1                             ; 9EEC F7 D1                    ..
        .byte   $CF                             ; 9EEE CF                       .
        .byte   $7C                             ; 9EEF 7C                       |
L9EF0:  jsr     LA29A                           ; 9EF0 20 9A A2                  ..
        beq     $9EF7                           ; 9EF3 F0 02                    ..
        bpl     L9EFA                           ; 9EF5 10 03                    ..
        jmp     L9C05                           ; 9EF7 4C 05 9C                 L..
; ----------------------------------------------------------------------------
L9EFA:  .byte   $A5                             ; 9EFA A5                       .
L9EFB:  and     $E9                             ; 9EFB 25 E9                    %.
        bbr7    $48,$48                         ; 9EFD 7F 48 A9                 .H.
        bra     $9E87                           ; 9F00 80 85                    ..
        and     $A9                             ; 9F02 25 A9                    %.
        bne     $9EA6                           ; 9F04 D0 A0                    ..
        .byte   $9E                             ; 9F06 9E                       .
L9F07:  jsr     L9F3C                           ; 9F07 20 3C 9F                  <.
        lda     #$D8                            ; 9F0A A9 D8                    ..
        ldy     #$9E                            ; 9F0C A0 9E                    ..
        jsr     L9F54                           ; 9F0E 20 54 9F                  T.
L9F11:  lda     #$7F                            ; 9F11 A9 7F                    ..
        ldy     #$9E                            ; 9F13 A0 9E                    ..
        .byte   $20                             ; 9F15 20
        pha                                     ; 9F16 48                       H
L9F17:  .byte   $9F                             ; 9F17 9F                       .
L9F18:  lda     #$87                            ; 9F18 A9 87                    ..
        .byte   $A0                             ; 9F1A A0                       .
L9F1B:  .byte   $9E                             ; 9F1B 9E                       .
L9F1C:  .byte   $20                             ; 9F1C 20
L9F1D:  ror     $A9A7,x                         ; 9F1D 7E A7 A9                 ~..
        cpx     #$A0                            ; 9F20 E0 A0                    ..
        stz     $3C20,x                         ; 9F22 9E 20 3C                 . <
        bbs1    $68,L9F48                       ; 9F25 9F 68 20                 .h
        and     (CurMaxX_,x)                    ; 9F28 21 A4                    !.
        lda     #$E8                            ; 9F2A A9 E8                    ..
        ldy     #$9E                            ; 9F2C A0 9E                    ..
L9F2E:  .byte   $20                             ; 9F2E 20
        .byte   $F1                             ; 9F2F F1                       .
L9F30:  .byte   $9F                             ; 9F30 9F                       .
L9F31:  bra     L9F63                           ; 9F31 80 30                    .0
        jsr     LA06D                           ; 9F33 20 6D A0                  m.
        bra     L9F63                           ; 9F36 80 2B                    .+
L9F38:  lda     #$BF                            ; 9F38 A9 BF                    ..
        ldy     #$A5                            ; 9F3A A0 A5                    ..
L9F3C:  jsr     L9FF1                           ; 9F3C 20 F1 9F                  ..
        jmp     L9CBE                           ; 9F3F 4C BE 9C                 L..
; ----------------------------------------------------------------------------
        jsr     LA06D                           ; 9F42 20 6D A0                  m.
        jmp     L9CBE                           ; 9F45 4C BE 9C                 L..
; ----------------------------------------------------------------------------
L9F48:  jsr     L9FF1                           ; 9F48 20 F1 9F                  ..
        jmp     L9CA7                           ; 9F4B 4C A7 9C                 L..
; ----------------------------------------------------------------------------
        jsr     LA06D                           ; 9F4E 20 6D A0                  m.
        jmp     L9CA7                           ; 9F51 4C A7 9C                 L..
; ----------------------------------------------------------------------------
L9F54:  jsr     L9FF1                           ; 9F54 20 F1 9F                  ..
        jmp     LA0F9                           ; 9F57 4C F9 A0                 L..
; ----------------------------------------------------------------------------
        jsr     LA06D                           ; 9F5A 20 6D A0                  m.
        jmp     LA0F9                           ; 9F5D 4C F9 A0                 L..
; ----------------------------------------------------------------------------
L9F60:  jsr     LA02B                           ; 9F60 20 2B A0                  +.
L9F63:  bne     L9F68                           ; 9F63 D0 03                    ..
        jmp     L9FF0                           ; 9F65 4C F0 9F                 L..
; ----------------------------------------------------------------------------
L9F68:  jsr     LA096                           ; 9F68 20 96 A0                  ..
        lda     #$00                            ; 9F6B A9 00                    ..
        sta     $0C                             ; 9F6D 85 0C                    ..
        sta     $0D                             ; 9F6F 85 0D                    ..
        sta     $0E                             ; 9F71 85 0E                    ..
        sta     $0F                             ; 9F73 85 0F                    ..
        sta     $10                             ; 9F75 85 10                    ..
        sta     $11                             ; 9F77 85 11                    ..
        sta     $12                             ; 9F79 85 12                    ..
        lda     $3A                             ; 9F7B A5 3A                    .:
        jsr     L9FA6                           ; 9F7D 20 A6 9F                  ..
        lda     $2C                             ; 9F80 A5 2C                    .,
        jsr     L9FA6                           ; 9F82 20 A6 9F                  ..
L9F85:  lda     $2B                             ; 9F85 A5 2B                    .+
        jsr     L9FA6                           ; 9F87 20 A6 9F                  ..
        lda     $2A                             ; 9F8A A5 2A                    .*
        jsr     L9FA6                           ; 9F8C 20 A6 9F                  ..
        lda     $29                             ; 9F8F A5 29                    .)
        jsr     L9FA6                           ; 9F91 20 A6 9F                  ..
        lda     $28                             ; 9F94 A5 28                    .(
        jsr     L9FA6                           ; 9F96 20 A6 9F                  ..
        lda     $27                             ; 9F99 A5 27                    .'
        jsr     L9FA6                           ; 9F9B 20 A6 9F                  ..
        lda     $26                             ; 9F9E A5 26                    .&
        jsr     L9FAB                           ; 9FA0 20 AB 9F                  ..
        jmp     LA198                           ; 9FA3 4C 98 A1                 L..
; ----------------------------------------------------------------------------
L9FA6:  bne     L9FAB                           ; 9FA6 D0 03                    ..
        jmp     L9E34                           ; 9FA8 4C 34 9E                 L4.
; ----------------------------------------------------------------------------
L9FAB:  lsr     a                               ; 9FAB 4A                       J
        ora     #$80                            ; 9FAC 09 80                    ..
L9FAE:  tay                                     ; 9FAE A8                       .
        bcc     L9FDC                           ; 9FAF 90 2B                    .+
        clc                                     ; 9FB1 18                       .
        lda     $12                             ; 9FB2 A5 12                    ..
        adc     $37                             ; 9FB4 65 37                    e7
        sta     $12                             ; 9FB6 85 12                    ..
        lda     $11                             ; 9FB8 A5 11                    ..
L9FBA:  adc     $36                             ; 9FBA 65 36                    e6
        sta     $11                             ; 9FBC 85 11                    ..
        lda     $10                             ; 9FBE A5 10                    ..
        adc     $35                             ; 9FC0 65 35                    e5
        sta     $10                             ; 9FC2 85 10                    ..
        lda     $0F                             ; 9FC4 A5 0F                    ..
        adc     $34                             ; 9FC6 65 34                    e4
        sta     $0F                             ; 9FC8 85 0F                    ..
        lda     $0E                             ; 9FCA A5 0E                    ..
        adc     $33                             ; 9FCC 65 33                    e3
        sta     $0E                             ; 9FCE 85 0E                    ..
        lda     $0D                             ; 9FD0 A5 0D                    ..
        adc     $32                             ; 9FD2 65 32                    e2
        sta     $0D                             ; 9FD4 85 0D                    ..
        lda     $0C                             ; 9FD6 A5 0C                    ..
        adc     $31                             ; 9FD8 65 31                    e1
        sta     $0C                             ; 9FDA 85 0C                    ..
L9FDC:  ror     $0C                             ; 9FDC 66 0C                    f.
        ror     $0D                             ; 9FDE 66 0D                    f.
        ror     $0E                             ; 9FE0 66 0E                    f.
        ror     $0F                             ; 9FE2 66 0F                    f.
        ror     $10                             ; 9FE4 66 10                    f.
        ror     $11                             ; 9FE6 66 11                    f.
        ror     $12                             ; 9FE8 66 12                    f.
        ror     $3A                             ; 9FEA 66 3A                    f:
        tya                                     ; 9FEC 98                       .
        lsr     a                               ; 9FED 4A                       J
        bne     L9FAE                           ; 9FEE D0 BE                    ..
L9FF0:  rts                                     ; 9FF0 60                       `
; ----------------------------------------------------------------------------
L9FF1:  sta     $08                             ; 9FF1 85 08                    ..
        sty     $09                             ; 9FF3 84 09                    ..
        ldy     #$07                            ; 9FF5 A0 07                    ..
        lda     ($08),y                         ; 9FF7 B1 08                    ..
        sta     $37                             ; 9FF9 85 37                    .7
        dey                                     ; 9FFB 88                       .
        lda     ($08),y                         ; 9FFC B1 08                    ..
        sta     $36                             ; 9FFE 85 36                    .6
        dey                                     ; A000 88                       .
        lda     ($08),y                         ; A001 B1 08                    ..
        sta     $35                             ; A003 85 35                    .5
        dey                                     ; A005 88                       .
        lda     ($08),y                         ; A006 B1 08                    ..
        sta     $34                             ; A008 85 34                    .4
        dey                                     ; A00A 88                       .
        lda     ($08),y                         ; A00B B1 08                    ..
        sta     $33                             ; A00D 85 33                    .3
        dey                                     ; A00F 88                       .
        lda     ($08),y                         ; A010 B1 08                    ..
        sta     $32                             ; A012 85 32                    .2
        dey                                     ; A014 88                       .
        lda     ($08),y                         ; A015 B1 08                    ..
        sta     $38                             ; A017 85 38                    .8
        eor     $2D                             ; A019 45 2D                    E-
        sta     $39                             ; A01B 85 39                    .9
        lda     $38                             ; A01D A5 38                    .8
        ora     #$80                            ; A01F 09 80                    ..
        sta     $31                             ; A021 85 31                    .1
        dey                                     ; A023 88                       .
        lda     ($08),y                         ; A024 B1 08                    ..
        sta     $30                             ; A026 85 30                    .0
        lda     $25                             ; A028 A5 25                    .%
        rts                                     ; A02A 60                       `
; ----------------------------------------------------------------------------
LA02B:  sta     $08                             ; A02B 85 08                    ..
        sty     $09                             ; A02D 84 09                    ..
        ldy     #$07                            ; A02F A0 07                    ..
        jsr     L9C36                           ; A031 20 36 9C                  6.
        sta     $37                             ; A034 85 37                    .7
        dey                                     ; A036 88                       .
        jsr     L9C36                           ; A037 20 36 9C                  6.
        sta     $36                             ; A03A 85 36                    .6
        dey                                     ; A03C 88                       .
        jsr     L9C36                           ; A03D 20 36 9C                  6.
        sta     $35                             ; A040 85 35                    .5
        dey                                     ; A042 88                       .
        jsr     L9C36                           ; A043 20 36 9C                  6.
        sta     $34                             ; A046 85 34                    .4
        dey                                     ; A048 88                       .
        jsr     L9C36                           ; A049 20 36 9C                  6.
        sta     $33                             ; A04C 85 33                    .3
        dey                                     ; A04E 88                       .
        jsr     L9C36                           ; A04F 20 36 9C                  6.
        sta     $32                             ; A052 85 32                    .2
        dey                                     ; A054 88                       .
LA055:  jsr     L9C36                           ; A055 20 36 9C                  6.
        sta     $38                             ; A058 85 38                    .8
        eor     $2D                             ; A05A 45 2D                    E-
        sta     $39                             ; A05C 85 39                    .9
        lda     $38                             ; A05E A5 38                    .8
        ora     #$80                            ; A060 09 80                    ..
        sta     $31                             ; A062 85 31                    .1
        dey                                     ; A064 88                       .
        .byte   $20                             ; A065 20
        .byte   $36                             ; A066 36                       6
LA067:  .byte   $9C                             ; A067 9C                       .
LA068:  sta     $30                             ; A068 85 30                    .0
        lda     $25                             ; A06A A5 25                    .%
        rts                                     ; A06C 60                       `
; ----------------------------------------------------------------------------
LA06D:  sta     $08                             ; A06D 85 08                    ..
        sty     $09                             ; A06F 84 09                    ..
        .byte   $A0                             ; A071 A0                       .
LA072:  .byte   $07                             ; A072 07                       .
LA073:  jsr     L9C3E                           ; A073 20 3E 9C                  >.
        sta     $30,y                           ; A076 99 30 00                 .0.
        dey                                     ; A079 88                       .
        cpy     #$02                            ; A07A C0 02                    ..
        bcs     LA073                           ; A07C B0 F5                    ..
        jsr     L9C3E                           ; A07E 20 3E 9C                  >.
        sta     $38                             ; A081 85 38                    .8
        eor     $2D                             ; A083 45 2D                    E-
        sta     $39                             ; A085 85 39                    .9
        lda     $38                             ; A087 A5 38                    .8
        ora     #$80                            ; A089 09 80                    ..
        sta     $31                             ; A08B 85 31                    .1
        dey                                     ; A08D 88                       .
        jsr     L9C3E                           ; A08E 20 3E 9C                  >.
        sta     $30                             ; A091 85 30                    .0
        lda     $25                             ; A093 A5 25                    .%
        rts                                     ; A095 60                       `
; ----------------------------------------------------------------------------
LA096:  lda     $30                             ; A096 A5 30                    .0
LA098:  beq     LA0B9                           ; A098 F0 1F                    ..
        clc                                     ; A09A 18                       .
        adc     $25                             ; A09B 65 25                    e%
        bcc     LA0A3                           ; A09D 90 04                    ..
        bmi     LA0BE                           ; A09F 30 1D                    0.
        clc                                     ; A0A1 18                       .
        .byte   $2C                             ; A0A2 2C                       ,
LA0A3:  bpl     LA0B9                           ; A0A3 10 14                    ..
        adc     #$80                            ; A0A5 69 80                    i.
        sta     $25                             ; A0A7 85 25                    .%
        bne     LA0AE                           ; A0A9 D0 03                    ..
        jmp     L9D70                           ; A0AB 4C 70 9D                 Lp.
; ----------------------------------------------------------------------------
LA0AE:  lda     $39                             ; A0AE A5 39                    .9
        sta     $2D                             ; A0B0 85 2D                    .-
        rts                                     ; A0B2 60                       `
; ----------------------------------------------------------------------------
LA0B3:  lda     $2D                             ; A0B3 A5 2D                    .-
        eor     #$FF                            ; A0B5 49 FF                    I.
        bmi     LA0BE                           ; A0B7 30 05                    0.
LA0B9:  pla                                     ; A0B9 68                       h
        pla                                     ; A0BA 68                       h
        jmp     L9D6C                           ; A0BB 4C 6C 9D                 Ll.
; ----------------------------------------------------------------------------
LA0BE:  jmp     L9E2F                           ; A0BE 4C 2F 9E                 L/.
; ----------------------------------------------------------------------------
LA0C1:  jsr     LA27B                           ; A0C1 20 7B A2                  {.
        tax                                     ; A0C4 AA                       .
        beq     LA0D7                           ; A0C5 F0 10                    ..
        clc                                     ; A0C7 18                       .
        adc     #$02                            ; A0C8 69 02                    i.
        bcs     LA0BE                           ; A0CA B0 F2                    ..
        ldx     #$00                            ; A0CC A2 00                    ..
        stx     $39                             ; A0CE 86 39                    .9
        jsr     L9CCB                           ; A0D0 20 CB 9C                  ..
        inc     $25                             ; A0D3 E6 25                    .%
        beq     LA0BE                           ; A0D5 F0 E7                    ..
LA0D7:  rts                                     ; A0D7 60                       `
; ----------------------------------------------------------------------------
        sty     $20                             ; A0D8 84 20                    .
        brk                                     ; A0DA 00                       .
        brk                                     ; A0DB 00                       .
        brk                                     ; A0DC 00                       .
        brk                                     ; A0DD 00                       .
        brk                                     ; A0DE 00                       .
        brk                                     ; A0DF 00                       .
LA0E0:  ldx     #$14                            ; A0E0 A2 14                    ..
        jmp     LFB4B                           ; A0E2 4C 4B FB                 LK.
; ----------------------------------------------------------------------------
LA0E5:  .byte   $20                             ; A0E5 20
LA0E6:  .byte   $7B                             ; A0E6 7B                       {
        ldx     #$A9                            ; A0E7 A2 A9                    ..
        cld                                     ; A0E9 D8                       .
        ldy     #$A0                            ; A0EA A0 A0                    ..
        ldx     #$00                            ; A0EC A2 00                    ..
LA0EE:  stx     $39                             ; A0EE 86 39                    .9
        jsr     LA1DD                           ; A0F0 20 DD A1                  ..
        jmp     LA0F9                           ; A0F3 4C F9 A0                 L..
; ----------------------------------------------------------------------------
LA0F6:  jsr     LA02B                           ; A0F6 20 2B A0                  +.
LA0F9:  beq     LA0E0                           ; A0F9 F0 E5                    ..
        jsr     LA28A                           ; A0FB 20 8A A2                  ..
        lda     #$00                            ; A0FE A9 00                    ..
        sec                                     ; A100 38                       8
        sbc     $25                             ; A101 E5 25                    .%
        sta     $25                             ; A103 85 25                    .%
        .byte   $20                             ; A105 20
        .byte   $96                             ; A106 96                       .
LA107:  ldy     #$E6                            ; A107 A0 E6                    ..
        and     $F0                             ; A109 25 F0                    %.
        lda     (CursorY)                       ; A10B B2 A2                    ..
        sbc     stack+169,y                     ; A10D F9 A9 01                 ...
LA110:  ldy     $31                             ; A110 A4 31                    .1
        cpy     $26                             ; A112 C4 26                    .&
        bne     LA138                           ; A114 D0 22                    ."
        ldy     $32                             ; A116 A4 32                    .2
        cpy     $27                             ; A118 C4 27                    .'
        bne     LA138                           ; A11A D0 1C                    ..
        ldy     $33                             ; A11C A4 33                    .3
        cpy     $28                             ; A11E C4 28                    .(
        bne     LA138                           ; A120 D0 16                    ..
        ldy     $34                             ; A122 A4 34                    .4
        cpy     $29                             ; A124 C4 29                    .)
        bne     LA138                           ; A126 D0 10                    ..
        ldy     $35                             ; A128 A4 35                    .5
        cpy     $2A                             ; A12A C4 2A                    .*
        bne     LA138                           ; A12C D0 0A                    ..
        ldy     $36                             ; A12E A4 36                    .6
        cpy     $2B                             ; A130 C4 2B                    .+
        bne     LA138                           ; A132 D0 04                    ..
        ldy     $37                             ; A134 A4 37                    .7
        cpy     $2C                             ; A136 C4 2C                    .,
LA138:  php                                     ; A138 08                       .
        rol     a                               ; A139 2A                       *
        bcc     LA145                           ; A13A 90 09                    ..
        inx                                     ; A13C E8                       .
        sta     $12,x                           ; A13D 95 12                    ..
        beq     LA18B                           ; A13F F0 4A                    .J
        bpl     LA18F                           ; A141 10 4C                    .L
        lda     #$01                            ; A143 A9 01                    ..
LA145:  plp                                     ; A145 28                       (
        bcs     LA15C                           ; A146 B0 14                    ..
LA148:  asl     $37                             ; A148 06 37                    .7
LA14A:  rol     $36                             ; A14A 26 36                    &6
        rol     $35                             ; A14C 26 35                    &5
        rol     $34                             ; A14E 26 34                    &4
        rol     $33                             ; A150 26 33                    &3
        rol     $32                             ; A152 26 32                    &2
        rol     $31                             ; A154 26 31                    &1
        bcs     LA138                           ; A156 B0 E0                    ..
        bmi     LA110                           ; A158 30 B6                    0.
        bpl     LA138                           ; A15A 10 DC                    ..
LA15C:  tay                                     ; A15C A8                       .
        lda     $37                             ; A15D A5 37                    .7
        sbc     $2C                             ; A15F E5 2C                    .,
        sta     $37                             ; A161 85 37                    .7
        lda     $36                             ; A163 A5 36                    .6
        sbc     $2B                             ; A165 E5 2B                    .+
        sta     $36                             ; A167 85 36                    .6
        lda     $35                             ; A169 A5 35                    .5
        sbc     $2A                             ; A16B E5 2A                    .*
        sta     $35                             ; A16D 85 35                    .5
        lda     $34                             ; A16F A5 34                    .4
        sbc     $29                             ; A171 E5 29                    .)
        sta     $34                             ; A173 85 34                    .4
        .byte   $A5                             ; A175 A5                       .
LA176:  .byte   $33                             ; A176 33                       3
        sbc     $28                             ; A177 E5 28                    .(
        sta     $33                             ; A179 85 33                    .3
        lda     $32                             ; A17B A5 32                    .2
        sbc     $27                             ; A17D E5 27                    .'
        sta     $32                             ; A17F 85 32                    .2
        lda     $31                             ; A181 A5 31                    .1
        sbc     $26                             ; A183 E5 26                    .&
        sta     $31                             ; A185 85 31                    .1
        tya                                     ; A187 98                       .
        jmp     LA148                           ; A188 4C 48 A1                 LH.
; ----------------------------------------------------------------------------
LA18B:  lda     #$40                            ; A18B A9 40                    .@
        bne     LA145                           ; A18D D0 B6                    ..
LA18F:  asl     a                               ; A18F 0A                       .
        asl     a                               ; A190 0A                       .
        asl     a                               ; A191 0A                       .
        asl     a                               ; A192 0A                       .
        asl     a                               ; A193 0A                       .
        asl     a                               ; A194 0A                       .
        sta     $3A                             ; A195 85 3A                    .:
        plp                                     ; A197 28                       (
LA198:  lda     $0C                             ; A198 A5 0C                    ..
        sta     $26                             ; A19A 85 26                    .&
        lda     $0D                             ; A19C A5 0D                    ..
        sta     $27                             ; A19E 85 27                    .'
        lda     $0E                             ; A1A0 A5 0E                    ..
        sta     $28                             ; A1A2 85 28                    .(
        lda     $0F                             ; A1A4 A5 0F                    ..
        sta     $29                             ; A1A6 85 29                    .)
        lda     $10                             ; A1A8 A5 10                    ..
        sta     $2A                             ; A1AA 85 2A                    .*
        lda     $11                             ; A1AC A5 11                    ..
        sta     $2B                             ; A1AE 85 2B                    .+
        lda     $12                             ; A1B0 A5 12                    ..
        sta     $2C                             ; A1B2 85 2C                    .,
        jmp     L9D40                           ; A1B4 4C 40 9D                 L@.
; ----------------------------------------------------------------------------
        sec                                     ; A1B7 38                       8
        sta     $08                             ; A1B8 85 08                    ..
        sty     $09                             ; A1BA 84 09                    ..
        ldy     #$07                            ; A1BC A0 07                    ..
LA1BE:  jsr     L9C3E                           ; A1BE 20 3E 9C                  >.
        sta     $25,y                           ; A1C1 99 25 00                 .%.
        dey                                     ; A1C4 88                       .
        cpy     #$02                            ; A1C5 C0 02                    ..
        bcs     LA1BE                           ; A1C7 B0 F5                    ..
        jsr     L9C3E                           ; A1C9 20 3E 9C                  >.
        sta     $2D                             ; A1CC 85 2D                    .-
        ora     #$80                            ; A1CE 09 80                    ..
        sta     $26                             ; A1D0 85 26                    .&
        dey                                     ; A1D2 88                       .
        jsr     L9C3E                           ; A1D3 20 3E 9C                  >.
        sta     $25                             ; A1D6 85 25                    .%
        sty     $3A                             ; A1D8 84 3A                    .:
        rts                                     ; A1DA 60                       `
; ----------------------------------------------------------------------------
        clc                                     ; A1DB 18                       .
        .byte   $24                             ; A1DC 24                       $
LA1DD:  sec                                     ; A1DD 38                       8
        sta     $08                             ; A1DE 85 08                    ..
        sty     $09                             ; A1E0 84 09                    ..
        ldy     #$07                            ; A1E2 A0 07                    ..
        jsr     LA331                           ; A1E4 20 31 A3                  1.
        sta     $2C                             ; A1E7 85 2C                    .,
        dey                                     ; A1E9 88                       .
        jsr     LA331                           ; A1EA 20 31 A3                  1.
        sta     $2B                             ; A1ED 85 2B                    .+
        dey                                     ; A1EF 88                       .
        jsr     LA331                           ; A1F0 20 31 A3                  1.
        sta     $2A                             ; A1F3 85 2A                    .*
        dey                                     ; A1F5 88                       .
        jsr     LA331                           ; A1F6 20 31 A3                  1.
        sta     $29                             ; A1F9 85 29                    .)
        dey                                     ; A1FB 88                       .
        jsr     LA331                           ; A1FC 20 31 A3                  1.
        sta     $28                             ; A1FF 85 28                    .(
        dey                                     ; A201 88                       .
        jsr     LA331                           ; A202 20 31 A3                  1.
        sta     $27                             ; A205 85 27                    .'
        dey                                     ; A207 88                       .
        jsr     LA331                           ; A208 20 31 A3                  1.
        sta     $2D                             ; A20B 85 2D                    .-
        ora     #$80                            ; A20D 09 80                    ..
        sta     $26                             ; A20F 85 26                    .&
        dey                                     ; A211 88                       .
        jsr     LA331                           ; A212 20 31 A3                  1.
        sta     $25                             ; A215 85 25                    .%
        sty     $3A                             ; A217 84 3A                    .:
        rts                                     ; A219 60                       `
; ----------------------------------------------------------------------------
        tax                                     ; A21A AA                       .
        bra     LA227                           ; A21B 80 0A                    ..
LA21D:  ldx     #$1D                            ; A21D A2 1D                    ..
        .byte   $2C                             ; A21F 2C                       ,
LA220:  ldx     #$15                            ; A220 A2 15                    ..
        .byte   $A0                             ; A222 A0                       .
LA223:  brk                                     ; A223 00                       .
        beq     LA227                           ; A224 F0 01                    ..
        tax                                     ; A226 AA                       .
LA227:  jsr     LA28A                           ; A227 20 8A A2                  ..
        stx     $08                             ; A22A 86 08                    ..
        sty     $09                             ; A22C 84 09                    ..
        ldy     #$07                            ; A22E A0 07                    ..
        lda     #$08                            ; A230 A9 08                    ..
        sta     $0360                           ; A232 8D 60 03                 .`.
        lda     $2C                             ; A235 A5 2C                    .,
        jsr     FROM_C68D                       ; A237 20 5C 03                  \.
        dey                                     ; A23A 88                       .
        lda     $2B                             ; A23B A5 2B                    .+
        jsr     FROM_C68D                       ; A23D 20 5C 03                  \.
        dey                                     ; A240 88                       .
        lda     $2A                             ; A241 A5 2A                    .*
        jsr     FROM_C68D                       ; A243 20 5C 03                  \.
        dey                                     ; A246 88                       .
        lda     $29                             ; A247 A5 29                    .)
        jsr     FROM_C68D                       ; A249 20 5C 03                  \.
        dey                                     ; A24C 88                       .
        lda     $28                             ; A24D A5 28                    .(
        jsr     FROM_C68D                       ; A24F 20 5C 03                  \.
        dey                                     ; A252 88                       .
        lda     $27                             ; A253 A5 27                    .'
        jsr     FROM_C68D                       ; A255 20 5C 03                  \.
        dey                                     ; A258 88                       .
        lda     $2D                             ; A259 A5 2D                    .-
        ora     #$7F                            ; A25B 09 7F                    ..
        and     $26                             ; A25D 25 26                    %&
        jsr     FROM_C68D                       ; A25F 20 5C 03                  \.
        dey                                     ; A262 88                       .
        lda     $25                             ; A263 A5 25                    .%
        jsr     FROM_C68D                       ; A265 20 5C 03                  \.
        sty     $3A                             ; A268 84 3A                    .:
        rts                                     ; A26A 60                       `
; ----------------------------------------------------------------------------
LA26B:  lda     $38                             ; A26B A5 38                    .8
LA26D:  sta     $2D                             ; A26D 85 2D                    .-
        ldx     #$08                            ; A26F A2 08                    ..
LA271:  lda     $2F,x                           ; A271 B5 2F                    ./
        sta     $24,x                           ; A273 95 24                    .$
        dex                                     ; A275 CA                       .
        bne     LA271                           ; A276 D0 F9                    ..
        stx     $3A                             ; A278 86 3A                    .:
        rts                                     ; A27A 60                       `
; ----------------------------------------------------------------------------
LA27B:  jsr     LA28A                           ; A27B 20 8A A2                  ..
LA27E:  ldx     #$09                            ; A27E A2 09                    ..
LA280:  lda     $24,x                           ; A280 B5 24                    .$
        sta     $2F,x                           ; A282 95 2F                    ./
        dex                                     ; A284 CA                       .
        bne     LA280                           ; A285 D0 F9                    ..
        stx     $3A                             ; A287 86 3A                    .:
LA289:  rts                                     ; A289 60                       `
; ----------------------------------------------------------------------------
LA28A:  lda     $25                             ; A28A A5 25                    .%
        beq     LA289                           ; A28C F0 FB                    ..
        asl     $3A                             ; A28E 06 3A                    .:
        bcc     LA289                           ; A290 90 F7                    ..
LA292:  jsr     L9E14                           ; A292 20 14 9E                  ..
        bne     LA289                           ; A295 D0 F2                    ..
        jmp     L9DC5                           ; A297 4C C5 9D                 L..
; ----------------------------------------------------------------------------
LA29A:  lda     $25                             ; A29A A5 25                    .%
        beq     LA2A7                           ; A29C F0 09                    ..
LA29E:  lda     $2D                             ; A29E A5 2D                    .-
LA2A0:  rol     a                               ; A2A0 2A                       *
        lda     #$FF                            ; A2A1 A9 FF                    ..
        bcs     LA2A7                           ; A2A3 B0 02                    ..
        lda     #$01                            ; A2A5 A9 01                    ..
LA2A7:  rts                                     ; A2A7 60                       `
; ----------------------------------------------------------------------------
        jsr     LA29A                           ; A2A8 20 9A A2                  ..
LA2AB:  sta     $26                             ; A2AB 85 26                    .&
        lda     #$00                            ; A2AD A9 00                    ..
        sta     $27                             ; A2AF 85 27                    .'
        ldx     #$88                            ; A2B1 A2 88                    ..
LA2B3:  lda     $26                             ; A2B3 A5 26                    .&
        eor     #$FF                            ; A2B5 49 FF                    I.
        rol     a                               ; A2B7 2A                       *
LA2B8:  lda     #$00                            ; A2B8 A9 00                    ..
        sta     $2C                             ; A2BA 85 2C                    .,
        sta     $2B                             ; A2BC 85 2B                    .+
        sta     $2A                             ; A2BE 85 2A                    .*
        sta     $29                             ; A2C0 85 29                    .)
        sta     $28                             ; A2C2 85 28                    .(
LA2C4:  stx     $25                             ; A2C4 86 25                    .%
        sta     $3A                             ; A2C6 85 3A                    .:
        sta     $2D                             ; A2C8 85 2D                    .-
        .byte   $4C                             ; A2CA 4C                       L
LA2CB:  .byte   $3B                             ; A2CB 3B                       ;
        sta     $FA5A,x                         ; A2CC 9D 5A FA                 .Z.
        bra     LA2C4                           ; A2CF 80 F3                    ..
        phy                                     ; A2D1 5A                       Z
        plx                                     ; A2D2 FA                       .
        bra     LA2B8                           ; A2D3 80 E3                    ..
        phy                                     ; A2D5 5A                       Z
        plx                                     ; A2D6 FA                       .
        bra     LA2B3                           ; A2D7 80 DA                    ..
        lsr     $2D                             ; A2D9 46 2D                    F-
        rts                                     ; A2DB 60                       `
; ----------------------------------------------------------------------------
LA2DC:  sta     $0A                             ; A2DC 85 0A                    ..
        sty     $0B                             ; A2DE 84 0B                    ..
        ldy     #$00                            ; A2E0 A0 00                    ..
        lda     ($0A),y                         ; A2E2 B1 0A                    ..
        iny                                     ; A2E4 C8                       .
        tax                                     ; A2E5 AA                       .
        beq     LA29A                           ; A2E6 F0 B2                    ..
        lda     ($0A),y                         ; A2E8 B1 0A                    ..
        eor     $2D                             ; A2EA 45 2D                    E-
        bmi     LA29E                           ; A2EC 30 B0                    0.
        cpx     $25                             ; A2EE E4 25                    .%
        bne     LA328                           ; A2F0 D0 36                    .6
        lda     ($0A),y                         ; A2F2 B1 0A                    ..
        ora     #$80                            ; A2F4 09 80                    ..
        cmp     $26                             ; A2F6 C5 26                    .&
        bne     LA328                           ; A2F8 D0 2E                    ..
        iny                                     ; A2FA C8                       .
        lda     ($0A),y                         ; A2FB B1 0A                    ..
        cmp     $27                             ; A2FD C5 27                    .'
        bne     LA328                           ; A2FF D0 27                    .'
        iny                                     ; A301 C8                       .
        lda     ($0A),y                         ; A302 B1 0A                    ..
        cmp     $28                             ; A304 C5 28                    .(
        bne     LA328                           ; A306 D0 20                    .
        iny                                     ; A308 C8                       .
        lda     ($0A),y                         ; A309 B1 0A                    ..
        cmp     $29                             ; A30B C5 29                    .)
        bne     LA328                           ; A30D D0 19                    ..
        iny                                     ; A30F C8                       .
        lda     ($0A),y                         ; A310 B1 0A                    ..
        cmp     $2A                             ; A312 C5 2A                    .*
        bne     LA328                           ; A314 D0 12                    ..
        iny                                     ; A316 C8                       .
        lda     ($0A),y                         ; A317 B1 0A                    ..
        cmp     $2B                             ; A319 C5 2B                    .+
        bne     LA328                           ; A31B D0 0B                    ..
        iny                                     ; A31D C8                       .
        lda     #$7F                            ; A31E A9 7F                    ..
        cmp     $3A                             ; A320 C5 3A                    .:
        lda     ($0A),y                         ; A322 B1 0A                    ..
        sbc     $2C                             ; A324 E5 2C                    .,
        beq     LA357                           ; A326 F0 2F                    ./
LA328:  lda     $2D                             ; A328 A5 2D                    .-
        bcc     LA32E                           ; A32A 90 02                    ..
        eor     #$FF                            ; A32C 49 FF                    I.
LA32E:  jmp     LA2A0                           ; A32E 4C A0 A2                 L..
; ----------------------------------------------------------------------------
LA331:  lda     ($08),y                         ; A331 B1 08                    ..
        bcs     LA357                           ; A333 B0 22                    ."
        jmp     L9C36                           ; A335 4C 36 9C                 L6.
; ----------------------------------------------------------------------------
LA338:  lda     $25                             ; A338 A5 25                    .%
        beq     LA386                           ; A33A F0 4A                    .J
        sec                                     ; A33C 38                       8
        sbc     #$B8                            ; A33D E9 B8                    ..
        bit     $2D                             ; A33F 24 2D                    $-
        bpl     LA34C                           ; A341 10 09                    ..
        tax                                     ; A343 AA                       .
        lda     #$FF                            ; A344 A9 FF                    ..
        sta     $2F                             ; A346 85 2F                    ./
        jsr     L9DE0                           ; A348 20 E0 9D                  ..
        txa                                     ; A34B 8A                       .
LA34C:  ldx     #$25                            ; A34C A2 25                    .%
        cmp     #$F9                            ; A34E C9 F9                    ..
        bpl     LA358                           ; A350 10 06                    ..
        jsr     L9E56                           ; A352 20 56 9E                  V.
        sty     $2F                             ; A355 84 2F                    ./
LA357:  rts                                     ; A357 60                       `
; ----------------------------------------------------------------------------
LA358:  tay                                     ; A358 A8                       .
        lda     $2D                             ; A359 A5 2D                    .-
        and     #$80                            ; A35B 29 80                    ).
        lsr     $26                             ; A35D 46 26                    F&
        ora     $26                             ; A35F 05 26                    .&
        sta     $26                             ; A361 85 26                    .&
        jsr     L9E6D                           ; A363 20 6D 9E                  m.
        sty     $2F                             ; A366 84 2F                    ./
        rts                                     ; A368 60                       `
; ----------------------------------------------------------------------------
LA369:  lda     $25                             ; A369 A5 25                    .%
        cmp     #$B8                            ; A36B C9 B8                    ..
        bcs     LA395                           ; A36D B0 26                    .&
        jsr     LA338                           ; A36F 20 38 A3                  8.
        .byte   $84                             ; A372 84                       .
LA373:  dec     a                               ; A373 3A                       :
        lda     $2D                             ; A374 A5 2D                    .-
        sty     $2D                             ; A376 84 2D                    .-
        eor     #$80                            ; A378 49 80                    I.
        rol     a                               ; A37A 2A                       *
        lda     #$B8                            ; A37B A9 B8                    ..
        sta     $25                             ; A37D 85 25                    .%
        lda     $2C                             ; A37F A5 2C                    .,
        sta     $00                             ; A381 85 00                    ..
        jmp     L9D3B                           ; A383 4C 3B 9D                 L;.
; ----------------------------------------------------------------------------
LA386:  sta     $26                             ; A386 85 26                    .&
        sta     $27                             ; A388 85 27                    .'
        sta     $28                             ; A38A 85 28                    .(
        sta     $29                             ; A38C 85 29                    .)
        .byte   $85                             ; A38E 85                       .
LA38F:  rol     a                               ; A38F 2A                       *
        sta     $2B                             ; A390 85 2B                    .+
        sta     $2C                             ; A392 85 2C                    .,
        tay                                     ; A394 A8                       .
LA395:  rts                                     ; A395 60                       `
; ----------------------------------------------------------------------------
LA396:  ldy     #$00                            ; A396 A0 00                    ..
LA398:  ldx     #$0D                            ; A398 A2 0D                    ..
LA39A:  sty     $21,x                           ; A39A 94 21                    .!
        dex                                     ; A39C CA                       .
        bpl     LA39A                           ; A39D 10 FB                    ..
        bcc     LA3B0                           ; A39F 90 0F                    ..
        cmp     #$2D                            ; A3A1 C9 2D                    .-
        bne     LA3A9                           ; A3A3 D0 04                    ..
        stx     $2E                             ; A3A5 86 2E                    ..
        beq     LA3AD                           ; A3A7 F0 04                    ..
LA3A9:  cmp     #$2B                            ; A3A9 C9 2B                    .+
        bne     LA3B2                           ; A3AB D0 05                    ..
LA3AD:  jsr     L9C0D                           ; A3AD 20 0D 9C                  ..
LA3B0:  bcc     LA40D                           ; A3B0 90 5B                    .[
LA3B2:  cmp     #$2E                            ; A3B2 C9 2E                    ..
        beq     LA3E4                           ; A3B4 F0 2E                    ..
        cmp     #$45                            ; A3B6 C9 45                    .E
        bne     LA3EA                           ; A3B8 D0 30                    .0
        jsr     L9C0D                           ; A3BA 20 0D 9C                  ..
        bcc     LA3D6                           ; A3BD 90 17                    ..
        cmp     #$AB                            ; A3BF C9 AB                    ..
LA3C1:  beq     LA3D1                           ; A3C1 F0 0E                    ..
        cmp     #$2D                            ; A3C3 C9 2D                    .-
        beq     LA3D1                           ; A3C5 F0 0A                    ..
        cmp     #$AA                            ; A3C7 C9 AA                    ..
        beq     LA3D3                           ; A3C9 F0 08                    ..
        cmp     #$2B                            ; A3CB C9 2B                    .+
        beq     LA3D3                           ; A3CD F0 04                    ..
LA3CF:  bne     LA3D8                           ; A3CF D0 07                    ..
LA3D1:  ror     $24                             ; A3D1 66 24                    f$
LA3D3:  jsr     L9C0D                           ; A3D3 20 0D 9C                  ..
LA3D6:  bcc     LA434                           ; A3D6 90 5C                    .\
LA3D8:  bit     $24                             ; A3D8 24 24                    $$
        bpl     LA3EA                           ; A3DA 10 0E                    ..
        lda     #$00                            ; A3DC A9 00                    ..
        sec                                     ; A3DE 38                       8
        sbc     $22                             ; A3DF E5 22                    ."
        jmp     LA3EC                           ; A3E1 4C EC A3                 L..
; ----------------------------------------------------------------------------
LA3E4:  ror     $23                             ; A3E4 66 23                    f#
        bit     $23                             ; A3E6 24 23                    $#
        bvc     LA3AD                           ; A3E8 50 C3                    P.
LA3EA:  lda     $22                             ; A3EA A5 22                    ."
LA3EC:  sec                                     ; A3EC 38                       8
        sbc     $21                             ; A3ED E5 21                    .!
        sta     $22                             ; A3EF 85 22                    ."
        beq     LA405                           ; A3F1 F0 12                    ..
        bpl     LA3FE                           ; A3F3 10 09                    ..
LA3F5:  jsr     LA0E5                           ; A3F5 20 E5 A0                  ..
        inc     $22                             ; A3F8 E6 22                    ."
        bne     LA3F5                           ; A3FA D0 F9                    ..
        beq     LA405                           ; A3FC F0 07                    ..
LA3FE:  jsr     LA0C1                           ; A3FE 20 C1 A0                  ..
        dec     $22                             ; A401 C6 22                    ."
        bne     LA3FE                           ; A403 D0 F9                    ..
LA405:  lda     $2E                             ; A405 A5 2E                    ..
        bmi     LA40A                           ; A407 30 01                    0.
        rts                                     ; A409 60                       `
; ----------------------------------------------------------------------------
LA40A:  jmp     LA6A7                           ; A40A 4C A7 A6                 L..
; ----------------------------------------------------------------------------
LA40D:  pha                                     ; A40D 48                       H
LA40E:  bit     $23                             ; A40E 24 23                    $#
        bpl     LA414                           ; A410 10 02                    ..
        inc     $21                             ; A412 E6 21                    .!
LA414:  jsr     LA0C1                           ; A414 20 C1 A0                  ..
        pla                                     ; A417 68                       h
        sec                                     ; A418 38                       8
        sbc     #$30                            ; A419 E9 30                    .0
        jsr     LA421                           ; A41B 20 21 A4                  !.
        jmp     LA3AD                           ; A41E 4C AD A3                 L..
; ----------------------------------------------------------------------------
LA421:  pha                                     ; A421 48                       H
        jsr     LA27B                           ; A422 20 7B A2                  {.
        pla                                     ; A425 68                       h
        jsr     LA2AB                           ; A426 20 AB A2                  ..
        lda     $38                             ; A429 A5 38                    .8
        eor     $2D                             ; A42B 45 2D                    E-
        sta     $39                             ; A42D 85 39                    .9
        ldx     $25                             ; A42F A6 25                    .%
        jmp     L9CBE                           ; A431 4C BE 9C                 L..
; ----------------------------------------------------------------------------
LA434:  lda     $22                             ; A434 A5 22                    ."
        cmp     #$0A                            ; A436 C9 0A                    ..
        bcc     LA443                           ; A438 90 09                    ..
        lda     #$64                            ; A43A A9 64                    .d
        bit     $24                             ; A43C 24 24                    $$
        bmi     LA456                           ; A43E 30 16                    0.
        jmp     L9E2F                           ; A440 4C 2F 9E                 L/.
; ----------------------------------------------------------------------------
LA443:  asl     a                               ; A443 0A                       .
        asl     a                               ; A444 0A                       .
        clc                                     ; A445 18                       .
        adc     $22                             ; A446 65 22                    e"
        asl     a                               ; A448 0A                       .
        clc                                     ; A449 18                       .
        ldy     #$00                            ; A44A A0 00                    ..
        sta     $22                             ; A44C 85 22                    ."
        jsr     L9C2E                           ; A44E 20 2E 9C                  ..
        .byte   $65                             ; A451 65                       e
LA452:  .byte   $22                             ; A452 22                       "
        sec                                     ; A453 38                       8
        sbc     #$30                            ; A454 E9 30                    .0
LA456:  sta     $22                             ; A456 85 22                    ."
        jmp     LA3D3                           ; A458 4C D3 A3                 L..
; ----------------------------------------------------------------------------
        .byte   $AF,$35,$E6,$20,$F4,$7F,$FF,$CC ; A45B AF 35 E6 20 F4 7F FF CC  .5. ....
        .byte   $B2,$63,$5F,$A9,$31,$9F,$FF,$E8 ; A463 B2 63 5F A9 31 9F FF E8  .c_.1...
        .byte   $B2,$63,$5F,$A9,$31,$9F,$FF,$FC ; A46B B2 63 5F A9 31 9F FF FC  .c_.1...
        .byte   $A0,$01,$A9,$20,$24,$2D,$10,$02 ; A473 A0 01 A9 20 24 2D 10 02  ... $-..
        .byte   $A9,$2D,$99,$FF,$00,$85,$2D,$84 ; A47B A9 2D 99 FF 00 85 2D 84  .-....-.
        .byte   $3B,$C8,$A9,$30,$A6,$25,$D0,$03 ; A483 3B C8 A9 30 A6 25 D0 03  ;..0.%..
; ----------------------------------------------------------------------------
LA48B:  jmp     LA5B2                           ; A48B 4C B2 A5                 L..
; ----------------------------------------------------------------------------
        lda     #$00                            ; A48E A9 00                    ..
        cpx     #$80                            ; A490 E0 80                    ..
        beq     LA496                           ; A492 F0 02                    ..
        bcs     LA49F                           ; A494 B0 09                    ..
LA496:  lda     #$6B                            ; A496 A9 6B                    .k
        ldy     #$A4                            ; A498 A0 A4                    ..
        jsr     L9F2E                           ; A49A 20 2E 9F                  ..
        lda     #$F1                            ; A49D A9 F1                    ..
LA49F:  sta     $21                             ; A49F 85 21                    .!
LA4A1:  lda     #$63                            ; A4A1 A9 63                    .c
        ldy     #$A4                            ; A4A3 A0 A4                    ..
        jsr     LA2DC                           ; A4A5 20 DC A2                  ..
        beq     LA4C8                           ; A4A8 F0 1E                    ..
        bpl     LA4BE                           ; A4AA 10 12                    ..
LA4AC:  lda     #$5B                            ; A4AC A9 5B                    .[
        ldy     #$A4                            ; A4AE A0 A4                    ..
        jsr     LA2DC                           ; A4B0 20 DC A2                  ..
LA4B3:  beq     LA4B7                           ; A4B3 F0 02                    ..
        bpl     LA4C5                           ; A4B5 10 0E                    ..
LA4B7:  jsr     LA0C1                           ; A4B7 20 C1 A0                  ..
        dec     $21                             ; A4BA C6 21                    .!
        bne     LA4AC                           ; A4BC D0 EE                    ..
LA4BE:  jsr     LA0E5                           ; A4BE 20 E5 A0                  ..
        inc     $21                             ; A4C1 E6 21                    .!
        bne     LA4A1                           ; A4C3 D0 DC                    ..
LA4C5:  jsr     L9F38                           ; A4C5 20 38 9F                  8.
LA4C8:  jsr     LA338                           ; A4C8 20 38 A3                  8.
        ldx     #$01                            ; A4CB A2 01                    ..
        .byte   $A5                             ; A4CD A5                       .
LA4CE:  and     ($18,x)                         ; A4CE 21 18                    !.
        adc     #$10                            ; A4D0 69 10                    i.
LA4D2:  bmi     LA4DD                           ; A4D2 30 09                    0.
        cmp     #$11                            ; A4D4 C9 11                    ..
        bcs     LA4DE                           ; A4D6 B0 06                    ..
        adc     #$FF                            ; A4D8 69 FF                    i.
        tax                                     ; A4DA AA                       .
        lda     #$02                            ; A4DB A9 02                    ..
LA4DD:  sec                                     ; A4DD 38                       8
LA4DE:  sbc     #$02                            ; A4DE E9 02                    ..
        sta     $22                             ; A4E0 85 22                    ."
        stx     $21                             ; A4E2 86 21                    .!
        txa                                     ; A4E4 8A                       .
        beq     LA4E9                           ; A4E5 F0 02                    ..
        bpl     LA4FC                           ; A4E7 10 13                    ..
LA4E9:  ldy     $3B                             ; A4E9 A4 3B                    .;
        lda     #$2E                            ; A4EB A9 2E                    ..
        iny                                     ; A4ED C8                       .
        sta     $FF,y                           ; A4EE 99 FF 00                 ...
        txa                                     ; A4F1 8A                       .
        beq     LA4FA                           ; A4F2 F0 06                    ..
        lda     #$30                            ; A4F4 A9 30                    .0
        iny                                     ; A4F6 C8                       .
        sta     $FF,y                           ; A4F7 99 FF 00                 ...
LA4FA:  sty     $3B                             ; A4FA 84 3B                    .;
LA4FC:  ldy     #$00                            ; A4FC A0 00                    ..
        ldx     #$80                            ; A4FE A2 80                    ..
LA500:  lda     $2C                             ; A500 A5 2C                    .,
        clc                                     ; A502 18                       .
        adc     LA5CD,y                         ; A503 79 CD A5                 y..
        sta     $2C                             ; A506 85 2C                    .,
        lda     $2B                             ; A508 A5 2B                    .+
        adc     LA5CC,y                         ; A50A 79 CC A5                 y..
        sta     $2B                             ; A50D 85 2B                    .+
        lda     $2A                             ; A50F A5 2A                    .*
        adc     LA5CB,y                         ; A511 79 CB A5                 y..
        sta     $2A                             ; A514 85 2A                    .*
        lda     $29                             ; A516 A5 29                    .)
        adc     LA5CA,y                         ; A518 79 CA A5                 y..
        sta     $29                             ; A51B 85 29                    .)
        lda     $28                             ; A51D A5 28                    .(
        adc     LA5C9,y                         ; A51F 79 C9 A5                 y..
        sta     $28                             ; A522 85 28                    .(
        lda     $27                             ; A524 A5 27                    .'
        adc     LA5C8,y                         ; A526 79 C8 A5                 y..
        sta     $27                             ; A529 85 27                    .'
        lda     $26                             ; A52B A5 26                    .&
        adc     LA5C7,y                         ; A52D 79 C7 A5                 y..
        sta     $26                             ; A530 85 26                    .&
        inx                                     ; A532 E8                       .
        bcs     LA539                           ; A533 B0 04                    ..
        bpl     LA500                           ; A535 10 C9                    ..
        bmi     LA53B                           ; A537 30 02                    0.
LA539:  bmi     LA500                           ; A539 30 C5                    0.
LA53B:  txa                                     ; A53B 8A                       .
        bcc     LA542                           ; A53C 90 04                    ..
        .byte   $49                             ; A53E 49                       I
LA53F:  bbs7    $69,$69                         ; A53F FF 69 0A                 .i.
LA542:  adc     #$2F                            ; A542 69 2F                    i/
        iny                                     ; A544 C8                       .
        iny                                     ; A545 C8                       .
        iny                                     ; A546 C8                       .
        iny                                     ; A547 C8                       .
        iny                                     ; A548 C8                       .
        iny                                     ; A549 C8                       .
        iny                                     ; A54A C8                       .
        sty     $3D                             ; A54B 84 3D                    .=
        ldy     $3B                             ; A54D A4 3B                    .;
        iny                                     ; A54F C8                       .
        tax                                     ; A550 AA                       .
        and     #$7F                            ; A551 29 7F                    ).
        sta     $FF,y                           ; A553 99 FF 00                 ...
        dec     $21                             ; A556 C6 21                    .!
        .byte   $D0                             ; A558 D0                       .
LA559:  asl     $A9                             ; A559 06 A9                    ..
        rol     $99C8                           ; A55B 2E C8 99                 ...
        .byte   $FF                             ; A55E FF                       .
        brk                                     ; A55F 00                       .
LA560:  sty     $3B                             ; A560 84 3B                    .;
        ldy     $3D                             ; A562 A4 3D                    .=
LA564:  txa                                     ; A564 8A                       .
        eor     #$FF                            ; A565 49 FF                    I.
        and     #$80                            ; A567 29 80                    ).
        tax                                     ; A569 AA                       .
        cpy     #$69                            ; A56A C0 69                    .i
        beq     LA572                           ; A56C F0 04                    ..
        cpy     #$93                            ; A56E C0 93                    ..
        bne     LA500                           ; A570 D0 8E                    ..
LA572:  ldy     $3B                             ; A572 A4 3B                    .;
LA574:  .byte   $B9                             ; A574 B9                       .
LA575:  bbs7    $00,LA500                       ; A575 FF 00 88                 ...
        cmp     #$30                            ; A578 C9 30                    .0
        beq     LA574                           ; A57A F0 F8                    ..
        cmp     #$2E                            ; A57C C9 2E                    ..
        beq     LA581                           ; A57E F0 01                    ..
        iny                                     ; A580 C8                       .
LA581:  lda     #$2B                            ; A581 A9 2B                    .+
        ldx     $22                             ; A583 A6 22                    ."
        beq     LA5B5                           ; A585 F0 2E                    ..
        bpl     LA591                           ; A587 10 08                    ..
        lda     #$00                            ; A589 A9 00                    ..
        sec                                     ; A58B 38                       8
        sbc     $22                             ; A58C E5 22                    ."
        tax                                     ; A58E AA                       .
        .byte   $A9                             ; A58F A9                       .
LA590:  .byte   $2D                             ; A590 2D                       -
LA591:  sta     stack+1,y                       ; A591 99 01 01                 ...
        lda     #$45                            ; A594 A9 45                    .E
        sta     stack,y                         ; A596 99 00 01                 ...
        txa                                     ; A599 8A                       .
        ldx     #$2F                            ; A59A A2 2F                    ./
        sec                                     ; A59C 38                       8
LA59D:  inx                                     ; A59D E8                       .
        sbc     #$0A                            ; A59E E9 0A                    ..
        bcs     LA59D                           ; A5A0 B0 FB                    ..
        adc     #$3A                            ; A5A2 69 3A                    i:
        sta     stack+3,y                       ; A5A4 99 03 01                 ...
        txa                                     ; A5A7 8A                       .
        sta     stack+2,y                       ; A5A8 99 02 01                 ...
        lda     #$00                            ; A5AB A9 00                    ..
        sta     stack+4,y                       ; A5AD 99 04 01                 ...
        beq     LA5BA                           ; A5B0 F0 08                    ..
LA5B2:  sta     $FF,y                           ; A5B2 99 FF 00                 ...
LA5B5:  lda     #$00                            ; A5B5 A9 00                    ..
        sta     stack,y                         ; A5B7 99 00 01                 ...
LA5BA:  lda     #$00                            ; A5BA A9 00                    ..
        ldy     #$01                            ; A5BC A0 01                    ..
        rts                                     ; A5BE 60                       `
; ----------------------------------------------------------------------------
        bra     LA5C1                           ; A5BF 80 00                    ..
LA5C1:  brk                                     ; A5C1 00                       .
LA5C2:  brk                                     ; A5C2 00                       .
        brk                                     ; A5C3 00                       .
        brk                                     ; A5C4 00                       .
        brk                                     ; A5C5 00                       .
        brk                                     ; A5C6 00                       .
LA5C7:  .byte   $FF                             ; A5C7 FF                       .
LA5C8:  .byte   $A5                             ; A5C8 A5                       .
LA5C9:  .byte   $0C                             ; A5C9 0C                       .
LA5CA:  .byte   $EF                             ; A5CA EF                       .
LA5CB:  .byte   $85                             ; A5CB 85                       .
LA5CC:  .byte   $C0                             ; A5CC C0                       .
LA5CD:  brk                                     ; A5CD 00                       .
        brk                                     ; A5CE 00                       .
        ora     #$18                            ; A5CF 09 18                    ..
        lsr     LA072                           ; A5D1 4E 72 A0                 Nr.
        brk                                     ; A5D4 00                       .
        bbs7    $FF,LA5EF                       ; A5D5 FF FF 17                 ...
        .byte   $2B                             ; A5D8 2B                       +
        phy                                     ; A5D9 5A                       Z
LA5DA:  beq     LA5DC                           ; A5DA F0 00                    ..
LA5DC:  brk                                     ; A5DC 00                       .
        brk                                     ; A5DD 00                       .
        rmb1    $48                             ; A5DE 17 48                    .H
        ror     $E8,x                           ; A5E0 76 E8                    v.
        brk                                     ; A5E2 00                       .
LA5E3:  bbs7    $FF,LA5E3                       ; A5E3 FF FF FD                 ...
        .byte   $AB                             ; A5E6 AB                       .
        .byte   $F4                             ; A5E7 F4                       .
        trb     a:$00                           ; A5E8 1C 00 00                 ...
        brk                                     ; A5EB 00                       .
        brk                                     ; A5EC 00                       .
        .byte   $3B                             ; A5ED 3B                       ;
        txs                                     ; A5EE 9A                       .
LA5EF:  dex                                     ; A5EF CA                       .
        brk                                     ; A5F0 00                       .
        .byte   $FF                             ; A5F1 FF                       .
LA5F2:  .byte   $FF                             ; A5F2 FF                       .
LA5F3:  bbs7    $FA,$FA                         ; A5F3 FF FA 0A                 ...
        .byte   $1F                             ; A5F6 1F                       .
LA5F7:  brk                                     ; A5F7 00                       .
        brk                                     ; A5F8 00                       .
LA5F9:  brk                                     ; A5F9 00                       .
        brk                                     ; A5FA 00                       .
LA5FB:  brk                                     ; A5FB 00                       .
LA5FC:  tya                                     ; A5FC 98                       .
        stx     $80,y                           ; A5FD 96 80                    ..
        .byte   $FF                             ; A5FF FF                       .
        .byte   $FF                             ; A600 FF                       .
LA601:  bbs7    $FF,$FF                         ; A601 FF FF F0                 ...
LA604:  lda     a:$C0,x                         ; A604 BD C0 00                 ...
        brk                                     ; A607 00                       .
        brk                                     ; A608 00                       .
        brk                                     ; A609 00                       .
        ora     ($86,x)                         ; A60A 01 86                    ..
        ldy     #$FF                            ; A60C A0 FF                    ..
        .byte   $FF                             ; A60E FF                       .
        .byte   $FF                             ; A60F FF                       .
LA610:  bbs7    $FF,$FF                         ; A610 FF FF D8                 ...
        .byte   $F0                             ; A613 F0                       .
LA614:  brk                                     ; A614 00                       .
        brk                                     ; A615 00                       .
        brk                                     ; A616 00                       .
        brk                                     ; A617 00                       .
        brk                                     ; A618 00                       .
        .byte   $03                             ; A619 03                       .
        inx                                     ; A61A E8                       .
        .byte   $FF                             ; A61B FF                       .
        .byte   $FF                             ; A61C FF                       .
LA61D:  bbs7    $FF,$FF                         ; A61D FF FF FF                 ...
LA620:  bbs7    $9C,$9C                         ; A620 FF 9C 00                 ...
        brk                                     ; A623 00                       .
        brk                                     ; A624 00                       .
        brk                                     ; A625 00                       .
        brk                                     ; A626 00                       .
        brk                                     ; A627 00                       .
        asl     a                               ; A628 0A                       .
        .byte   $FF                             ; A629 FF                       .
        .byte   $FF                             ; A62A FF                       .
LA62B:  bbs7    $FF,$FF                         ; A62B FF FF FF                 ...
LA62E:  bbs7    $FF,$FF                         ; A62E FF FF FF                 ...
LA631:  bbs7    $FF,$FF                         ; A631 FF FF FF                 ...
        bbs5    $0A,$0A                         ; A634 DF 0A 80                 ...
        brk                                     ; A637 00                       .
LA638:  brk                                     ; A638 00                       .
        brk                                     ; A639 00                       .
        brk                                     ; A63A 00                       .
        .byte   $03                             ; A63B 03                       .
LA63C:  .byte   $4B                             ; A63C 4B                       K
        cpy     #$FF                            ; A63D C0 FF                    ..
        .byte   $FF                             ; A63F FF                       .
        .byte   $FF                             ; A640 FF                       .
LA641:  bbs7    $FF,$FF                         ; A641 FF FF 73                 ..s
        rts                                     ; A644 60                       `
; ----------------------------------------------------------------------------
        brk                                     ; A645 00                       .
LA646:  brk                                     ; A646 00                       .
        brk                                     ; A647 00                       .
        brk                                     ; A648 00                       .
        brk                                     ; A649 00                       .
        asl     LFF10                           ; A64A 0E 10 FF                 ...
        .byte   $FF                             ; A64D FF                       .
        .byte   $FF                             ; A64E FF                       .
LA64F:  bbs7    $FF,LA64F                       ; A64F FF FF FD                 ...
        tay                                     ; A652 A8                       .
        brk                                     ; A653 00                       .
        brk                                     ; A654 00                       .
        brk                                     ; A655 00                       .
        brk                                     ; A656 00                       .
        brk                                     ; A657 00                       .
        brk                                     ; A658 00                       .
        bit     LDB20,x                         ; A659 3C 20 DB                 < .
        lda     ($80,x)                         ; A65C A1 80                    ..
        tsb     $0A80                           ; A65E 0C 80 0A                 ...
        jsr     LA27B                           ; A661 20 7B A2                  {.
        lda     #$BF                            ; A664 A9 BF                    ..
        ldy     #$A5                            ; A666 A0 A5                    ..
        jsr     LA1DD                           ; A668 20 DD A1                  ..
        bne     LA670                           ; A66B D0 03                    ..
        jmp     LA72B                           ; A66D 4C 2B A7                 L+.
; ----------------------------------------------------------------------------
LA670:  lda     $30                             ; A670 A5 30                    .0
        bne     LA677                           ; A672 D0 03                    ..
        jmp     L9D6E                           ; A674 4C 6E 9D                 Ln.
; ----------------------------------------------------------------------------
LA677:  ldx     #$41                            ; A677 A2 41                    .A
        ldy     #$00                            ; A679 A0 00                    ..
        jsr     LA227                           ; A67B 20 27 A2                  '.
        lda     $38                             ; A67E A5 38                    .8
        bpl     LA691                           ; A680 10 0F                    ..
        jsr     LA369                           ; A682 20 69 A3                  i.
        lda     #$41                            ; A685 A9 41                    .A
        ldy     #$00                            ; A687 A0 00                    ..
        jsr     LA2DC                           ; A689 20 DC A2                  ..
        bne     LA691                           ; A68C D0 03                    ..
        tya                                     ; A68E 98                       .
        ldy     $00                             ; A68F A4 00                    ..
LA691:  jsr     LA26D                           ; A691 20 6D A2                  m.
        tya                                     ; A694 98                       .
        pha                                     ; A695 48                       H
        jsr     L9EF0                           ; A696 20 F0 9E                  ..
        lda     #$41                            ; A699 A9 41                    .A
        ldy     #$00                            ; A69B A0 00                    ..
        jsr     L9F60                           ; A69D 20 60 9F                  `.
        jsr     LA72B                           ; A6A0 20 2B A7                  +.
        pla                                     ; A6A3 68                       h
        lsr     a                               ; A6A4 4A                       J
LA6A5:  bcc     LA6B1                           ; A6A5 90 0A                    ..
LA6A7:  lda     $25                             ; A6A7 A5 25                    .%
        beq     LA6B1                           ; A6A9 F0 06                    ..
        lda     $2D                             ; A6AB A5 2D                    .-
        eor     #$FF                            ; A6AD 49 FF                    I.
        sta     $2D                             ; A6AF 85 2D                    .-
LA6B1:  rts                                     ; A6B1 60                       `
; ----------------------------------------------------------------------------
        sta     ($38,x)                         ; A6B2 81 38                    .8
        tax                                     ; A6B4 AA                       .
        .byte   $3B                             ; A6B5 3B                       ;
        and     #$5C                            ; A6B6 29 5C                    )\
        rmb1    $EE                             ; A6B8 17 EE                    ..
        ora     $4A59                           ; A6BA 0D 59 4A                 .YJ
        brk                                     ; A6BD 00                       .
        brk                                     ; A6BE 00                       .
        brk                                     ; A6BF 00                       .
        brk                                     ; A6C0 00                       .
        brk                                     ; A6C1 00                       .
        brk                                     ; A6C2 00                       .
        eor     LDE61,x                         ; A6C3 5D 61 DE                 ]a.
        lda     ($87)                           ; A6C6 B2 87                    ..
        sbc     ($4C,x)                         ; A6C8 E1 4C                    .L
        trb     $7461                           ; A6CA 1C 61 74                 .at
        adc     $63                             ; A6CD 65 63                    ec
        txs                                     ; A6CF 9A                       .
        sta     $14D9                           ; A6D0 8D D9 14                 ...
        adc     $72                             ; A6D3 65 72                    er
        rmb6    $A8                             ; A6D5 67 A8                    g.
        ldy     $765C                           ; A6D7 AC 5C 76                 .\v
        .byte   $44                             ; A6DA 44                       D
        adc     #$5A                            ; A6DB 69 5A                    iZ
        sta     ($9E)                           ; A6DD 92 9E                    ..
        stz     $3EAF                           ; A6DF 9C AF 3E                 ..>
        tsb     $316D                           ; A6E2 0C 6D 31                 .m1
        rts                                     ; A6E5 60                       `
; ----------------------------------------------------------------------------
        ora     ($1D),y                         ; A6E6 11 1D                    ..
        rol     $0E41                           ; A6E8 2E 41 0E                 .A.
        bvs     LA76C                           ; A6EB 70 7F                    p.
        sbc     $FE                             ; A6ED E5 FE                    ..
        bit     L8645                           ; A6EF 2C 45 86                 ,E.
        bit     $74                             ; A6F2 24 74                    $t
LA6F4:  and     ($84,x)                         ; A6F4 21 84                    !.
        bit     #$7C                            ; A6F6 89 7C                    .|
        rol     $3C,x                           ; A6F8 36 3C                    6<
        bmi     LA773                           ; A6FA 30 77                    0w
        rol     LFFC3                           ; A6FC 2E C3 FF                 ...
        bit     $3953,x                         ; A6FF 3C 53 39                 <S9
        .byte   $82                             ; A702 82                       .
        ply                                     ; A703 7A                       z
        ora     $5B95,x                         ; A704 1D 95 5B                 ..[
        adc     $73D2,x                         ; A707 7D D2 73                 }.s
        sty     $7C                             ; A70A 84 7C                    .|
        .byte   $63                             ; A70C 63                       c
        cli                                     ; A70D 58                       X
        lsr     $B8                             ; A70E 46 B8                    F.
        and     $05                             ; A710 25 05                    %.
        sed                                     ; A712 F8                       .
        ror     LFD75,x                         ; A713 7E 75 FD                 ~u.
        bbs6    $FC,LA72F                       ; A716 EF FC 16                 ...
        bit     L8074                           ; A719 2C 74 80                 ,t.
        and     ($72),y                         ; A71C 31 72                    1r
LA71E:  rmb1    $F7                             ; A71E 17 F7                    ..
        cmp     ($CF),y                         ; A720 D1 CF                    ..
        jmp     (L0081,x)                       ; A722 7C 81 00                 |..
LA725:  brk                                     ; A725 00                       .
        brk                                     ; A726 00                       .
        brk                                     ; A727 00                       .
        brk                                     ; A728 00                       .
        brk                                     ; A729 00                       .
        brk                                     ; A72A 00                       .
LA72B:  lda     #$B2                            ; A72B A9 B2                    ..
        ldy     #$A6                            ; A72D A0 A6                    ..
LA72F:  .byte   $20                             ; A72F 20
LA730:  rol     $A59F                           ; A730 2E 9F A5                 ...
        dec     a                               ; A733 3A                       :
        .byte   $69                             ; A734 69                       i
LA735:  bvc     $A6C7                           ; A735 50 90                    P.
        .byte   $03                             ; A737 03                       .
        jsr     LA292                           ; A738 20 92 A2                  ..
LA73B:  sta     $14                             ; A73B 85 14                    ..
        jsr     LA27E                           ; A73D 20 7E A2                  ~.
        lda     $25                             ; A740 A5 25                    .%
        cmp     #$88                            ; A742 C9 88                    ..
LA744:  bcc     LA749                           ; A744 90 03                    ..
LA746:  jsr     LA0B3                           ; A746 20 B3 A0                  ..
LA749:  jsr     LA369                           ; A749 20 69 A3                  i.
        .byte   $A5                             ; A74C A5                       .
LA74D:  brk                                     ; A74D 00                       .
        clc                                     ; A74E 18                       .
        adc     #$81                            ; A74F 69 81                    i.
        beq     LA746                           ; A751 F0 F3                    ..
        sec                                     ; A753 38                       8
        sbc     #$01                            ; A754 E9 01                    ..
        pha                                     ; A756 48                       H
        ldx     #$08                            ; A757 A2 08                    ..
LA759:  lda     $30,x                           ; A759 B5 30                    .0
        ldy     $25,x                           ; A75B B4 25                    .%
        sta     $25,x                           ; A75D 95 25                    .%
        sty     $30,x                           ; A75F 94 30                    .0
        dex                                     ; A761 CA                       .
        bpl     LA759                           ; A762 10 F5                    ..
        lda     $14                             ; A764 A5 14                    ..
        sta     $3A                             ; A766 85 3A                    .:
        jsr     L9CA7                           ; A768 20 A7 9C                  ..
        .byte   $20                             ; A76B 20
LA76C:  smb2    CurMaxY_                        ; A76C A7 A6                    ..
        lda     #$BA                            ; A76E A9 BA                    ..
        ldy     #$A6                            ; A770 A0 A6                    ..
        .byte   $20                             ; A772 20
LA773:  sty     $A7,x                           ; A773 94 A7                    ..
        lda     #$00                            ; A775 A9 00                    ..
        sta     $39                             ; A777 85 39                    .9
        pla                                     ; A779 68                       h
        jsr     LA098                           ; A77A 20 98 A0                  ..
        rts                                     ; A77D 60                       `
; ----------------------------------------------------------------------------
LA77E:  sta     $3B                             ; A77E 85 3B                    .;
        sty     $3C                             ; A780 84 3C                    .<
        jsr     LA220                           ; A782 20 20 A2                   .
        lda     #$15                            ; A785 A9 15                    ..
        jsr     L9F60                           ; A787 20 60 9F                  `.
        jsr     LA798                           ; A78A 20 98 A7                  ..
        lda     #$15                            ; A78D A9 15                    ..
        ldy     #$00                            ; A78F A0 00                    ..
        jmp     L9F60                           ; A791 4C 60 9F                 L`.
; ----------------------------------------------------------------------------
        sta     $3B                             ; A794 85 3B                    .;
        sty     $3C                             ; A796 84 3C                    .<
LA798:  jsr     LA21D                           ; A798 20 1D A2                  ..
        lda     ($3B),y                         ; A79B B1 3B                    .;
LA79D:  sta     $2E                             ; A79D 85 2E                    ..
        ldy     $3B                             ; A79F A4 3B                    .;
        iny                                     ; A7A1 C8                       .
        tya                                     ; A7A2 98                       .
        bne     LA7A7                           ; A7A3 D0 02                    ..
        inc     $3C                             ; A7A5 E6 3C                    .<
LA7A7:  sta     $3B                             ; A7A7 85 3B                    .;
        ldy     $3C                             ; A7A9 A4 3C                    .<
LA7AB:  jsr     L9F2E                           ; A7AB 20 2E 9F                  ..
        lda     $3B                             ; A7AE A5 3B                    .;
        ldy     $3C                             ; A7B0 A4 3C                    .<
        clc                                     ; A7B2 18                       .
        adc     #$08                            ; A7B3 69 08                    i.
        .byte   $90                             ; A7B5 90                       .
LA7B6:  ora     ($C8,x)                         ; A7B6 01 C8                    ..
LA7B8:  sta     $3B                             ; A7B8 85 3B                    .;
        sty     $3C                             ; A7BA 84 3C                    .<
        jsr     L9F3C                           ; A7BC 20 3C 9F                  <.
        lda     #$1D                            ; A7BF A9 1D                    ..
        ldy     #$00                            ; A7C1 A0 00                    ..
        dec     $2E                             ; A7C3 C6 2E                    ..
        bne     LA7AB                           ; A7C5 D0 E4                    ..
        rts                                     ; A7C7 60                       `
; ----------------------------------------------------------------------------
        tya                                     ; A7C8 98                       .
        and     $44,x                           ; A7C9 35 44                    5D
        ply                                     ; A7CB 7A                       z
        brk                                     ; A7CC 00                       .
        brk                                     ; A7CD 00                       .
        brk                                     ; A7CE 00                       .
        brk                                     ; A7CF 00                       .
        pla                                     ; A7D0 68                       h
        plp                                     ; A7D1 28                       (
        lda     ($46),y                         ; A7D2 B1 46                    .F
        brk                                     ; A7D4 00                       .
        brk                                     ; A7D5 00                       .
        brk                                     ; A7D6 00                       .
        brk                                     ; A7D7 00                       .
        jsr     LA29A                           ; A7D8 20 9A A2                  ..
        bmi     LA81A                           ; A7DB 30 3D                    0=
        bne     LA805                           ; A7DD D0 26                    .&
        lda     VIA1_T1CL                       ; A7DF AD 04 F8                 ...
LA7E2:  sta     $26                             ; A7E2 85 26                    .&
        lda     VIA1_T1CH                       ; A7E4 AD 05 F8                 ...
        sta     $2B                             ; A7E7 85 2B                    .+
        lda     VIA1_T2CL                       ; A7E9 AD 08 F8                 ...
        sta     $2A                             ; A7EC 85 2A                    .*
        lda     VIA2_T2CL                       ; A7EE AD 88 F8                 ...
        sta     $29                             ; A7F1 85 29                    .)
        lda     VIA2_T1CL                       ; A7F3 AD 84 F8                 ...
        sta     $28                             ; A7F6 85 28                    .(
        lda     VIA1_T2CL                       ; A7F8 AD 08 F8                 ...
        sta     $27                             ; A7FB 85 27                    .'
        lda     VIA1_T2CH                       ; A7FD AD 09 F8                 ...
        sta     $2C                             ; A800 85 2C                    .,
        jmp     LA832                           ; A802 4C 32 A8                 L2.
; ----------------------------------------------------------------------------
LA805:  lda     #$AC                            ; A805 A9 AC                    ..
        ldy     #$03                            ; A807 A0 03                    ..
        jsr     LA1DD                           ; A809 20 DD A1                  ..
        lda     #$C8                            ; A80C A9 C8                    ..
        ldy     #$A7                            ; A80E A0 A7                    ..
        jsr     L9F2E                           ; A810 20 2E 9F                  ..
        lda     #$D0                            ; A813 A9 D0                    ..
        ldy     #$A7                            ; A815 A0 A7                    ..
        jsr     L9F3C                           ; A817 20 3C 9F                  <.
LA81A:  ldx     $2C                             ; A81A A6 2C                    .,
        lda     $26                             ; A81C A5 26                    .&
        sta     $2C                             ; A81E 85 2C                    .,
        stx     $26                             ; A820 86 26                    .&
        ldx     $2A                             ; A822 A6 2A                    .*
        lda     $29                             ; A824 A5 29                    .)
        sta     $2A                             ; A826 85 2A                    .*
        stx     $29                             ; A828 86 29                    .)
        ldx     $27                             ; A82A A6 27                    .'
        lda     $2B                             ; A82C A5 2B                    .+
        sta     $27                             ; A82E 85 27                    .'
        stx     $2B                             ; A830 86 2B                    .+
LA832:  lda     #$00                            ; A832 A9 00                    ..
        sta     $2D                             ; A834 85 2D                    .-
        lda     $25                             ; A836 A5 25                    .%
        sta     $3A                             ; A838 85 3A                    .:
        lda     #$80                            ; A83A A9 80                    ..
        sta     $25                             ; A83C 85 25                    .%
        jsr     L9D40                           ; A83E 20 40 9D                  @.
        ldx     #$AC                            ; A841 A2 AC                    ..
        ldy     #$03                            ; A843 A0 03                    ..
LA845:  jmp     LA227                           ; A845 4C 27 A2                 L'.
; ----------------------------------------------------------------------------
        lda     #$C4                            ; A848 A9 C4                    ..
        ldy     #$A8                            ; A84A A0 A8                    ..
        jsr     L9F3C                           ; A84C 20 3C 9F                  <.
LA84F:  jsr     LA27B                           ; A84F 20 7B A2                  {.
        lda     #$CC                            ; A852 A9 CC                    ..
        ldy     #$A8                            ; A854 A0 A8                    ..
        ldx     $38                             ; A856 A6 38                    .8
        jsr     LA0EE                           ; A858 20 EE A0                  ..
        jsr     LA27B                           ; A85B 20 7B A2                  {.
        jsr     LA369                           ; A85E 20 69 A3                  i.
        lda     #$00                            ; A861 A9 00                    ..
        sta     $39                             ; A863 85 39                    .9
        jsr     L9CA7                           ; A865 20 A7 9C                  ..
        lda     #$D4                            ; A868 A9 D4                    ..
        .byte   $A0                             ; A86A A0                       .
LA86B:  tay                                     ; A86B A8                       .
        jsr     L9F48                           ; A86C 20 48 9F                  H.
        lda     $2D                             ; A86F A5 2D                    .-
        pha                                     ; A871 48                       H
        bpl     LA881                           ; A872 10 0D                    ..
        jsr     L9F38                           ; A874 20 38 9F                  8.
        lda     $2D                             ; A877 A5 2D                    .-
        bmi     LA884                           ; A879 30 09                    0.
        lda     $04                             ; A87B A5 04                    ..
        eor     #$FF                            ; A87D 49 FF                    I.
        sta     $04                             ; A87F 85 04                    ..
LA881:  jsr     LA6A7                           ; A881 20 A7 A6                  ..
LA884:  lda     #$D4                            ; A884 A9 D4                    ..
        ldy     #$A8                            ; A886 A0 A8                    ..
        jsr     L9F3C                           ; A888 20 3C 9F                  <.
        pla                                     ; A88B 68                       h
        bpl     LA891                           ; A88C 10 03                    ..
        jsr     LA6A7                           ; A88E 20 A7 A6                  ..
LA891:  lda     #$DC                            ; A891 A9 DC                    ..
        ldy     #$A8                            ; A893 A0 A8                    ..
        jmp     LA77E                           ; A895 4C 7E A7                 L~.
; ----------------------------------------------------------------------------
        jsr     LA220                           ; A898 20 20 A2                   .
        lda     #$00                            ; A89B A9 00                    ..
        sta     $04                             ; A89D 85 04                    ..
        jsr     LA84F                           ; A89F 20 4F A8                  O.
        ldx     #$41                            ; A8A2 A2 41                    .A
        ldy     #$00                            ; A8A4 A0 00                    ..
        jsr     LA845                           ; A8A6 20 45 A8                  E.
        lda     #$15                            ; A8A9 A9 15                    ..
        ldy     #$00                            ; A8AB A0 00                    ..
        jsr     LA1DD                           ; A8AD 20 DD A1                  ..
        lda     #$00                            ; A8B0 A9 00                    ..
        sta     $2D                             ; A8B2 85 2D                    .-
        lda     $04                             ; A8B4 A5 04                    ..
        jsr     LA8C0                           ; A8B6 20 C0 A8                  ..
        lda     #$41                            ; A8B9 A9 41                    .A
        ldy     #$00                            ; A8BB A0 00                    ..
        jmp     LA0F6                           ; A8BD 4C F6 A0                 L..
; ----------------------------------------------------------------------------
LA8C0:  pha                                     ; A8C0 48                       H
        jmp     LA881                           ; A8C1 4C 81 A8                 L..
; ----------------------------------------------------------------------------
        sta     ($49,x)                         ; A8C4 81 49                    .I
        bbr0    $DA,LA86B                       ; A8C6 0F DA A2                 ...
        and     ($68,x)                         ; A8C9 21 68                    !h
        iny                                     ; A8CB C8                       .
        .byte   $83                             ; A8CC 83                       .
        eor     #$0F                            ; A8CD 49 0F                    I.
        phx                                     ; A8CF DA                       .
        ldx     #$21                            ; A8D0 A2 21                    .!
        pla                                     ; A8D2 68                       h
        iny                                     ; A8D3 C8                       .
        bbr7    $00,LA8D7                       ; A8D4 7F 00 00                 ...
LA8D7:  brk                                     ; A8D7 00                       .
        brk                                     ; A8D8 00                       .
        brk                                     ; A8D9 00                       .
        brk                                     ; A8DA 00                       .
        brk                                     ; A8DB 00                       .
        ora     #$7A                            ; A8DC 09 7A                    .z
        cmp     $20                             ; A8DE C5 20                    .
        and     ($08,x)                         ; A8E0 21 08                    !.
        .byte   $FC                             ; A8E2 FC                       .
        tax                                     ; A8E3 AA                       .
        trb     $7D                             ; A8E4 14 7D                    .}
        eor     $76,x                           ; A8E6 55 76                    Uv
        ora     LC957,y                         ; A8E8 19 57 C9                 .W.
        txs                                     ; A8EB 9A                       .
        ldy     LB780                           ; A8EC AC 80 B7                 ...
        dec     $DC,x                           ; A8EF D6 DC                    ..
        sed                                     ; A8F1 F8                       .
        tax                                     ; A8F2 AA                       .
        lda     L82FE,y                         ; A8F3 B9 FE 82                 ...
        stz     $7A,x                           ; A8F6 74 7A                    tz
        inc     a                               ; A8F8 1A                       .
        pla                                     ; A8F9 68                       h
        .byte   $0C                             ; A8FA 0C                       .
LA8FB:  ror     a                               ; A8FB 6A                       j
        .byte   $F4                             ; A8FC F4                       .
        sty     $F1                             ; A8FD 84 F1                    ..
        .byte   $83                             ; A8FF 83                       .
        smb2    $EF                             ; A900 A7 EF                    ..
        .byte   $44                             ; A902 44                       D
        sec                                     ; A903 38                       8
        .byte   $DC                             ; A904 DC                       .
        stx     $28                             ; A905 86 28                    .(
        bit     $431A,x                         ; A907 3C 1A 43                 <.C
        smb7    $3B                             ; A90A F7 3B                    .;
        sed                                     ; A90C F8                       .
        smb0    $99                             ; A90D 87 99                    ..
        adc     #$66                            ; A90F 69 66                    if
        .byte   $73                             ; A911 73                       s
        ora     $EC,x                           ; A912 15 EC                    ..
        .byte   $23                             ; A914 23                       #
        smb0    $23                             ; A915 87 23                    .#
        and     $E3,x                           ; A917 35 E3                    5.
        .byte   $3B                             ; A919 3B                       ;
        lda     a:$57                           ; A91A AD 57 00                 .W.
        stx     $A5                             ; A91D 86 A5                    ..
        eor     $31E7,x                         ; A91F 5D E7 31                 ].1
        and     L90F2                           ; A922 2D F2 90                 -..
        .byte   $83                             ; A925 83                       .
        eor     #$0F                            ; A926 49 0F                    I.
        phx                                     ; A928 DA                       .
        ldx     #$21                            ; A929 A2 21                    .!
        pla                                     ; A92B 68                       h
        iny                                     ; A92C C8                       .
        lda     $2D                             ; A92D A5 2D                    .-
        pha                                     ; A92F 48                       H
        bpl     LA935                           ; A930 10 03                    ..
        jsr     LA6A7                           ; A932 20 A7 A6                  ..
LA935:  lda     $25                             ; A935 A5 25                    .%
        pha                                     ; A937 48                       H
        cmp     #$81                            ; A938 C9 81                    ..
        bcc     LA943                           ; A93A 90 07                    ..
        lda     #$7F                            ; A93C A9 7F                    ..
        ldy     #$9E                            ; A93E A0 9E                    ..
        jsr     L9F54                           ; A940 20 54 9F                  T.
LA943:  lda     #$5D                            ; A943 A9 5D                    .]
        ldy     #$A9                            ; A945 A0 A9                    ..
        jsr     LA77E                           ; A947 20 7E A7                  ~.
        pla                                     ; A94A 68                       h
        cmp     #$81                            ; A94B C9 81                    ..
        bcc     LA956                           ; A94D 90 07                    ..
        lda     #$C4                            ; A94F A9 C4                    ..
        ldy     #$A8                            ; A951 A0 A8                    ..
        jsr     L9F48                           ; A953 20 48 9F                  H.
LA956:  pla                                     ; A956 68                       h
        bpl     LA95C                           ; A957 10 03                    ..
        jmp     LA6A7                           ; A959 4C A7 A6                 L..
; ----------------------------------------------------------------------------
LA95C:  rts                                     ; A95C 60                       `
; ----------------------------------------------------------------------------
        tsb     $6275                           ; A95D 0C 75 62                 .ub
        inc     $07BA,x                         ; A960 FE BA 07                 ...
        trb     $3A                             ; A963 14 3A                    .:
        tay                                     ; A965 A8                       .
        sei                                     ; A966 78                       x
        dec     $D8,x                           ; A967 D6 D8                    ..
        dec     $5116                           ; A969 CE 16 51                 ..Q
        eor     $7A14                           ; A96C 4D 14 7A                 M.z
        rol     $7DD1,x                         ; A96F 3E D1 7D                 >.}
        .byte   $BD                             ; A972 BD                       .
        .byte   $4C                             ; A973 4C                       L
LA974:  rol     $88,x                           ; A974 36 88                    6.
        .byte   $7B                             ; A976 7B                       {
        .byte   $D7                             ; A977 D7                       .
LA978:  cpy     $23                             ; A978 C4 23                    .#
        .byte   $CB                             ; A97A CB                       .
        ora     ($6B,x)                         ; A97B 01 6B                    .k
        .byte   $9C                             ; A97D 9C                       .
LA97E:  jmp     ($1734,x)                       ; A97E 7C 34 17                 |4.
        asl     a                               ; A981 0A                       .
        dec     a                               ; A982 3A                       :
        .byte   $DC                             ; A983 DC                       .
        eor     ($78,x)                         ; A984 41 78                    Ax
        jmp     (L81F7,x)                       ; A986 7C F7 81                 |..
        .byte   $A3                             ; A989 A3                       .
        cmp     ($36,x)                         ; A98A C1 36                    .6
        rmb2    $00                             ; A98C 27 00                    '.
        adc     LAE19,x                         ; A98E 7D 19 AE                 }..
        adc     ($16,x)                         ; A991 61 16                    a.
        nop                                     ; A993 EA                       .
        tsx                                     ; A994 BA                       .
        eor     LB97D                           ; A995 4D 7D B9                 M}.
        rts                                     ; A998 60                       `
; ----------------------------------------------------------------------------
        bbs0    $78,LA9F9                       ; A999 8F 78 5D                 .x]
        .byte   $0B                             ; A99C 0B                       .
        tsx                                     ; A99D BA                       .
        adc     $7263,x                         ; A99E 7D 63 72                 }cr
        ora     ($44)                           ; A9A1 12 44                    .D
        .byte   $A1                             ; A9A3 A1                       .
LA9A4:  sta     $B4                             ; A9A4 85 B4                    ..
        ror     $4792,x                         ; A9A6 7E 92 47                 ~.G
        .byte   $FB                             ; A9A9 FB                       .
        .byte   $62                             ; A9AA 62                       b
        asl     $0D,x                           ; A9AB 16 0D                    ..
        .byte   $43                             ; A9AD 43                       C
        ror     LCC4C,x                         ; A9AE 7E 4C CC                 ~L.
        bbs3    $F0,LA974                       ; A9B1 BF F0 C0                 ...
        ply                                     ; A9B4 7A                       z
        stz     $7F                             ; A9B5 64 7F                    d.
        tax                                     ; A9B7 AA                       .
        tax                                     ; A9B8 AA                       .
        tax                                     ; A9B9 AA                       .
LA9BA:  stx     LB07D                           ; A9BA 8E 7D B0                 .}.
        cpy     #$80                            ; A9BD C0 80                    ..
        .byte   $7F                             ; A9BF 7F                       .
        .byte   $FF                             ; A9C0 FF                       .
LA9C1:  bbs7    $FF,$FF                         ; A9C1 FF FF F5                 ...
        lda     $202C,y                         ; A9C4 B9 2C 20                 .,
        .byte   $2B                             ; A9C7 2B                       +
        ldy     #$20                            ; A9C8 A0 20                    .
        inc     $9B,x                           ; A9CA F6 9B                    ..
        lda     $2C                             ; A9CC A5 2C                    .,
        sta     $00                             ; A9CE 85 00                    ..
        lda     $2B                             ; A9D0 A5 2B                    .+
        sta     $01                             ; A9D2 85 01                    ..
        jsr     LA26B                           ; A9D4 20 6B A2                  k.
        jsr     L9BF6                           ; A9D7 20 F6 9B                  ..
        lda     $2C                             ; A9DA A5 2C                    .,
        eor     $00                             ; A9DC 45 00                    E.
        tay                                     ; A9DE A8                       .
        lda     $2B                             ; A9DF A5 2B                    .+
LA9E1:  eor     $01                             ; A9E1 45 01                    E.
        jmp     L9BDA                           ; A9E3 4C DA 9B                 L..
; ----------------------------------------------------------------------------
LA9E6:  php                                     ; A9E6 08                       .
        sty     $03A0                           ; A9E7 8C A0 03                 ...
        cpx     #$50                            ; A9EA E0 50                    .P
        bcs     LAA17                           ; A9EC B0 29                    .)
        stx     $039F                           ; A9EE 8E 9F 03                 ...
LA9F1:  tax                                     ; A9F1 AA                       .
        and     #$0F                            ; A9F2 29 0F                    ).
        sta     $039D                           ; A9F4 8D 9D 03                 ...
        txa                                     ; A9F7 8A                       .
        lsr     a                               ; A9F8 4A                       J
LA9F9:  lsr     a                               ; A9F9 4A                       J
        lsr     a                               ; A9FA 4A                       J
        lsr     a                               ; A9FB 4A                       J
        inc     a                               ; A9FC 1A                       .
        sta     $039E                           ; A9FD 8D 9E 03                 ...
        cld                                     ; AA00 D8                       .
        lda     #$FF                            ; AA01 A9 FF                    ..
        sta     $ED                             ; AA03 85 ED                    ..
        lda     VidMemHi                        ; AA05 A5 A0                    ..
        clc                                     ; AA07 18                       .
        adc     #$07                            ; AA08 69 07                    i.
        sta     $EE                             ; AA0A 85 EE                    ..
LAA0C:  lda     $039D                           ; AA0C AD 9D 03                 ...
        inc     $039D                           ; AA0F EE 9D 03                 ...
        cmp     $039E                           ; AA12 CD 9E 03                 ...
        bcc     LAA19                           ; AA15 90 02                    ..
LAA17:  plp                                     ; AA17 28                       (
        rts                                     ; AA18 60                       `
; ----------------------------------------------------------------------------
LAA19:  stz     $EB                             ; AA19 64 EB                    d.
        lsr     a                               ; AA1B 4A                       J
        ror     $EB                             ; AA1C 66 EB                    f.
        adc     VidMemHi                        ; AA1E 65 A0                    e.
        sta     $EC                             ; AA20 85 EC                    ..
        ldy     $039F                           ; AA22 AC 9F 03                 ...
LAA25:  plp                                     ; AA25 28                       (
        php                                     ; AA26 08                       .
        lda     ($ED)                           ; AA27 B2 ED                    ..
        bcs     LAA31                           ; AA29 B0 06                    ..
        lda     ($EB),y                         ; AA2B B1 EB                    ..
        sta     ($ED)                           ; AA2D 92 ED                    ..
        lda     #$20                            ; AA2F A9 20                    .
LAA31:  sta     ($EB),y                         ; AA31 91 EB                    ..
        lda     $ED                             ; AA33 A5 ED                    ..
        asl     a                               ; AA35 0A                       .
        eor     #$A2                            ; AA36 49 A2                    I.
        bne     LAA47                           ; AA38 D0 0D                    ..
        ror     a                               ; AA3A 6A                       j
        sta     $ED                             ; AA3B 85 ED                    ..
        bmi     LAA47                           ; AA3D 30 08                    0.
        dec     $EE                             ; AA3F C6 EE                    ..
        lda     $EE                             ; AA41 A5 EE                    ..
        cmp     VidMemHi                        ; AA43 C5 A0                    ..
        bcc     LAA17                           ; AA45 90 D0                    ..
LAA47:  dec     $ED                             ; AA47 C6 ED                    ..
        dey                                     ; AA49 88                       .
        bmi     LAA0C                           ; AA4A 30 C0                    0.
        cpy     $03A0                           ; AA4C CC A0 03                 ...
        bcs     LAA25                           ; AA4F B0 D4                    ..
        bra     LAA0C                           ; AA51 80 B9                    ..
LAA53:  stx     $03A3                           ; AA53 8E A3 03                 ...
        sty     $03A7                           ; AA56 8C A7 03                 ...
        sty     $0357                           ; AA59 8C 57 03                 .W.
        pha                                     ; AA5C 48                       H
        and     #$07                            ; AA5D 29 07                    ).
        sta     $03A2                           ; AA5F 8D A2 03                 ...
        pla                                     ; AA62 68                       h
        eor     #$F8                            ; AA63 49 F8                    I.
        bit     #$F8                            ; AA65 89 F8                    ..
        beq     LAA7F                           ; AA67 F0 16                    ..
        .byte   $09                             ; AA69 09                       .
LAA6A:  rmb0    $8D                             ; AA6A 07 8D                    ..
        lda     ($03,x)                         ; AA6C A1 03                    ..
        ldy     #$00                            ; AA6E A0 00                    ..
        ldx     #$00                            ; AA70 A2 00                    ..
LAA72:  jsr     FROM_C684                       ; AA72 20 53 03                  S.
        beq     LAA81                           ; AA75 F0 0A                    ..
        cmp     #$0D                            ; AA77 C9 0D                    ..
        bne     LAA7C                           ; AA79 D0 01                    ..
        inx                                     ; AA7B E8                       .
LAA7C:  iny                                     ; AA7C C8                       .
        bne     LAA72                           ; AA7D D0 F3                    ..
LAA7F:  sec                                     ; AA7F 38                       8
        rts                                     ; AA80 60                       `
; ----------------------------------------------------------------------------
LAA81:  cpx     #$0F                            ; AA81 E0 0F                    ..
        bcs     LAA7F                           ; AA83 B0 FA                    ..
        stx     $03A4                           ; AA85 8E A4 03                 ...
        clc                                     ; AA88 18                       .
        jsr     LAB90                           ; AA89 20 90 AB                  ..
LAA8C:  ldx     $03A4                           ; AA8C AE A4 03                 ...
        lda     $03A3                           ; AA8F AD A3 03                 ...
        bmi     LAA9C                           ; AA92 30 08                    0.
        cpx     $03A3                           ; AA94 EC A3 03                 ...
        bcs     LAA9D                           ; AA97 B0 04                    ..
        lda     #$00                            ; AA99 A9 00                    ..
        .byte   $24                             ; AA9B 24                       $
LAA9C:  txa                                     ; AA9C 8A                       .
LAA9D:  sta     $03A3                           ; AA9D 8D A3 03                 ...
        jsr     LAAF7                           ; AAA0 20 F7 AA                  ..
        jsr     LB6DF                           ; AAA3 20 DF B6                  ..
        cmp     #$91                            ; AAA6 C9 91                    ..
        bne     LAAAD                           ; AAA8 D0 03                    ..
        inc     $03A3                           ; AAAA EE A3 03                 ...
LAAAD:  cmp     #$11                            ; AAAD C9 11                    ..
        bne     LAAB4                           ; AAAF D0 03                    ..
        dec     $03A3                           ; AAB1 CE A3 03                 ...
LAAB4:  tax                                     ; AAB4 AA                       .
        lda     #$80                            ; AAB5 A9 80                    ..
        cpx     #$9D                            ; AAB7 E0 9D                    ..
        beq     LAAD9                           ; AAB9 F0 1E                    ..
        lsr     a                               ; AABB 4A                       J
        cpx     #$1D                            ; AABC E0 1D                    ..
        beq     LAAD9                           ; AABE F0 19                    ..
        lsr     a                               ; AAC0 4A                       J
        cpx     #$0D                            ; AAC1 E0 0D                    ..
        beq     LAAD9                           ; AAC3 F0 14                    ..
        cpx     #$85                            ; AAC5 E0 85                    ..
        bcc     LAA8C                           ; AAC7 90 C3                    ..
        cpx     #$8D                            ; AAC9 E0 8D                    ..
        bcs     LAA8C                           ; AACB B0 BF                    ..
        lda     LAA6A,x                         ; AACD BD 6A AA                 .j.
        cmp     $03A2                           ; AAD0 CD A2 03                 ...
        beq     LAAD7                           ; AAD3 F0 02                    ..
        ora     #$18                            ; AAD5 09 18                    ..
LAAD7:  eor     #$08                            ; AAD7 49 08                    I.
LAAD9:  and     $03A1                           ; AAD9 2D A1 03                 -..
        bit     #$F8                            ; AADC 89 F8                    ..
        beq     LAA8C                           ; AADE F0 AC                    ..
        sta     $03A1                           ; AAE0 8D A1 03                 ...
        sec                                     ; AAE3 38                       8
        jsr     LAB90                           ; AAE4 20 90 AB                  ..
        lda     $03A1                           ; AAE7 AD A1 03                 ...
        ldx     $03A3                           ; AAEA AE A3 03                 ...
        clc                                     ; AAED 18                       .
        rts                                     ; AAEE 60                       `
; ----------------------------------------------------------------------------
        brk                                     ; AAEF 00                       .
        .byte   $02                             ; AAF0 02                       .
        tsb     $06                             ; AAF1 04 06                    ..
        ora     ($03,x)                         ; AAF3 01 03                    ..
        ora     $07                             ; AAF5 05 07                    ..
LAAF7:  stz     $03A5                           ; AAF7 9C A5 03                 ...
        lda     #$FF                            ; AAFA A9 FF                    ..
        sta     $03A6                           ; AAFC 8D A6 03                 ...
        ldy     $03A7                           ; AAFF AC A7 03                 ...
        sty     $0357                           ; AB02 8C 57 03                 .W.
LAB05:  jsr     LAB57                           ; AB05 20 57 AB                  W.
        lda     #$A5                            ; AB08 A9 A5                    ..
        jsr     LAB50                           ; AB0A 20 50 AB                  P.
        bne     LAB11                           ; AB0D D0 02                    ..
        lda     #$20                            ; AB0F A9 20                    .
LAB11:  clc                                     ; AB11 18                       .
        jsr     LB6F9                           ; AB12 20 F9 B6                  ..
        inc     $03A6                           ; AB15 EE A6 03                 ...
        ldy     $03A6                           ; AB18 AC A6 03                 ...
        jsr     FROM_C684                       ; AB1B 20 53 03                  S.
        beq     LAB24                           ; AB1E F0 04                    ..
        cmp     #$0D                            ; AB20 C9 0D                    ..
        bne     LAB11                           ; AB22 D0 ED                    ..
LAB24:  lda     #$0D                            ; AB24 A9 0D                    ..
        clc                                     ; AB26 18                       .
        jsr     LB6F9                           ; AB27 20 F9 B6                  ..
        lda     #$67                            ; AB2A A9 67                    .g
        jsr     LAB50                           ; AB2C 20 50 AB                  P.
        bne     LAB33                           ; AB2F D0 02                    ..
        lda     #$A0                            ; AB31 A9 A0                    ..
LAB33:  sta     ($BD)                           ; AB33 92 BD                    ..
        lda     $03A5                           ; AB35 AD A5 03                 ...
        inc     $03A5                           ; AB38 EE A5 03                 ...
        cmp     $03A4                           ; AB3B CD A4 03                 ...
        bcc     LAB05                           ; AB3E 90 C5                    ..
        cmp     #$0E                            ; AB40 C9 0E                    ..
        bcs     LAB50                           ; AB42 B0 0C                    ..
        jsr     LAB57                           ; AB44 20 57 AB                  W.
        ldy     #$08                            ; AB47 A0 08                    ..
        lda     #$64                            ; AB49 A9 64                    .d
LAB4B:  sta     ($BD),y                         ; AB4B 91 BD                    ..
        dey                                     ; AB4D 88                       .
        bpl     LAB4B                           ; AB4E 10 FB                    ..
LAB50:  ldx     $03A5                           ; AB50 AE A5 03                 ...
        cpx     $03A3                           ; AB53 EC A3 03                 ...
        rts                                     ; AB56 60                       `
; ----------------------------------------------------------------------------
LAB57:  ldx     $03A2                           ; AB57 AE A2 03                 ...
        ldy     LAB80,x                         ; AB5A BC 80 AB                 ...
        lda     #$08                            ; AB5D A9 08                    ..
        jsr     LAB50                           ; AB5F 20 50 AB                  P.
        bne     LAB66                           ; AB62 D0 02                    ..
        eor     #$80                            ; AB64 49 80                    I.
LAB66:  pha                                     ; AB66 48                       H
        lda     LAB70,x                         ; AB67 BD 70 AB                 .p.
        tax                                     ; AB6A AA                       .
        pla                                     ; AB6B 68                       h
        sec                                     ; AB6C 38                       8
        jmp     LB6F9                           ; AB6D 4C F9 B6                 L..
; ----------------------------------------------------------------------------
LAB70:  .byte   $0E                             ; AB70 0E                       .
LAB71:  .byte   $0D,$0C,$0B,$0A,$09,$08,$07,$06 ; AB71 0D 0C 0B 0A 09 08 07 06  ........
        .byte   $05,$04,$03,$02,$01,$00,$00     ; AB79 05 04 03 02 01 00 00     .......
LAB80:  .byte   $00,$0A,$14,$1E,$28,$32,$3C,$46 ; AB80 00 0A 14 1E 28 32 3C 46  ....(2<F
LAB88:  .byte   $09,$13,$1D,$27,$31,$3B,$45,$4F ; AB88 09 13 1D 27 31 3B 45 4F  ...'1;EO
; ----------------------------------------------------------------------------
LAB90:  php                                     ; AB90 08                       .
        ldx     #$04                            ; AB91 A2 04                    ..
        bcc     LAB97                           ; AB93 90 02                    ..
        ldx     #$06                            ; AB95 A2 06                    ..
LAB97:  clc                                     ; AB97 18                       .
        jsr     LD230                           ; AB98 20 30 D2                  0.
        ldx     $03A4                           ; AB9B AE A4 03                 ...
        lda     LAB71,x                         ; AB9E BD 71 AB                 .q.
        eor     #$E0                            ; ABA1 49 E0                    I.
        pha                                     ; ABA3 48                       H
        ldx     $03A2                           ; ABA4 AE A2 03                 ...
        ldy     LAB80,x                         ; ABA7 BC 80 AB                 ...
        lda     LAB88,x                         ; ABAA BD 88 AB                 ...
        tax                                     ; ABAD AA                       .
        pla                                     ; ABAE 68                       h
        plp                                     ; ABAF 28                       (
        jmp     LA9E6                           ; ABB0 4C E6 A9                 L..
; ----------------------------------------------------------------------------
ShowChar_:
        phx                                     ; ABB3 DA                       .
        phy                                     ; ABB4 5A                       Z
        bit     $0384                           ; ABB5 2C 84 03                 ,..
        bpl     LABC1                           ; ABB8 10 07                    ..
        bvc     LABC4                           ; ABBA 50 08                    P.
        jsr     L8948                           ; ABBC 20 48 89                  H.
        bra     LABC4                           ; ABBF 80 03                    ..
LABC1:  jsr     LABC8                           ; ABC1 20 C8 AB                  ..
LABC4:  ply                                     ; ABC4 7A                       z
        plx                                     ; ABC5 FA                       .
        clc                                     ; ABC6 18                       .
        rts                                     ; ABC7 60                       `
; ----------------------------------------------------------------------------
LABC8:  bit     $0382                           ; ABC8 2C 82 03                 ,..
        bpl     LABD6                           ; ABCB 10 09                    ..
        stz     $0382                           ; ABCD 9C 82 03                 ...
        jsr     LB220                           ; ABD0 20 20 B2                   .
        jsr     LAEA6                           ; ABD3 20 A6 AE                  ..
LABD6:  pha                                     ; ABD6 48                       H
LABD7:  php                                     ; ABD7 08                       .
        pla                                     ; ABD8 68                       h
        bit     #$04                            ; ABD9 89 04                    ..
        bne     LABED                           ; ABDB D0 10                    ..
        lda     $AA                             ; ABDD A5 AA                    ..
        and     $036D                           ; ABDF 2D 6D 03                 -m.
        and     #$02                            ; ABE2 29 02                    ).
        beq     LABED                           ; ABE4 F0 07                    ..
        ldx     #$02                            ; ABE6 A2 02                    ..
        jsr     WaitXticks_                     ; ABE8 20 E4 BF                  ..
        bra     LABD7                           ; ABEB 80 EA                    ..
LABED:  pla                                     ; ABED 68                       h
        ldx     $036E                           ; ABEE AE 6E 03                 .n.
        sta     $036E                           ; ABF1 8D 6E 03                 .n.
        cmp     #$0D                            ; ABF4 C9 0D                    ..
        beq     LAC2F                           ; ABF6 F0 37                    .7
        cmp     #$8D                            ; ABF8 C9 8D                    ..
        beq     LAC2F                           ; ABFA F0 33                    .3
        cpx     #$1B                            ; ABFC E0 1B                    ..
        bne     LAC03                           ; ABFE D0 03                    ..
        jmp     LB10E                           ; AC00 4C 0E B1                 L..
; ----------------------------------------------------------------------------
LAC03:  cmp     #$1B                            ; AC03 C9 1B                    ..
        bne     LAC08                           ; AC05 D0 01                    ..
        rts                                     ; AC07 60                       `
; ----------------------------------------------------------------------------
LAC08:  bit     $AA                             ; AC08 24 AA                    $.
        bpl     LAC24                           ; AC0A 10 18                    ..
        ldy     $A8                             ; AC0C A4 A8                    ..
        beq     LAC19                           ; AC0E F0 09                    ..
        cmp     #$94                            ; AC10 C9 94                    ..
        beq     LAC2F                           ; AC12 F0 1B                    ..
        dec     $A8                             ; AC14 C6 A8                    ..
        jmp     LAC3A                           ; AC16 4C 3A AC                 L:.
; ----------------------------------------------------------------------------
LAC19:  jsr     LB08E                           ; AC19 20 8E B0                  ..
        ldy     $A7                             ; AC1C A4 A7                    ..
        beq     LAC24                           ; AC1E F0 04                    ..
        cmp     #$14                            ; AC20 C9 14                    ..
        bne     LAC3A                           ; AC22 D0 16                    ..
LAC24:  cmp     #$13                            ; AC24 C9 13                    ..
        bne     LAC2F                           ; AC26 D0 07                    ..
        cpx     #$13                            ; AC28 E0 13                    ..
        bne     LAC2F                           ; AC2A D0 03                    ..
        jmp     LAE5B                           ; AC2C 4C 5B AE                 L[.
; ----------------------------------------------------------------------------
LAC2F:  bit     #$20                            ; AC2F 89 20                    .
        bne     LAC3A                           ; AC31 D0 07                    ..
        bit     #$40                            ; AC33 89 40                    .@
        bne     LAC3A                           ; AC35 D0 03                    ..
        jmp     LACD2                           ; AC37 4C D2 AC                 L..
; ----------------------------------------------------------------------------
LAC3A:  jsr     LB09B                           ; AC3A 20 9B B0                  ..
        ldx     $036C                           ; AC3D AE 6C 03                 .l.
        beq     LAC44                           ; AC40 F0 02                    ..
        ora     #$80                            ; AC42 09 80                    ..
LAC44:  ldx     $A9                             ; AC44 A6 A9                    ..
        beq     LAC4D                           ; AC46 F0 05                    ..
        pha                                     ; AC48 48                       H
        jsr     LAEC9                           ; AC49 20 C9 AE                  ..
        pla                                     ; AC4C 68                       h
LAC4D:  jsr     LAF1C                           ; AC4D 20 1C AF                  ..
LAC50:  ldx     CursorX                         ; AC50 A6 A1                    ..
        cpx     CurMaxX_                        ; AC52 E4 A4                    ..
        beq     LAC59                           ; AC54 F0 03                    ..
        inc     CursorX                         ; AC56 E6 A1                    ..
LAC58:  rts                                     ; AC58 60                       `
; ----------------------------------------------------------------------------
LAC59:  lda     $AA                             ; AC59 A5 AA                    ..
        bit     #$04                            ; AC5B 89 04                    ..
        beq     LAC93                           ; AC5D F0 34                    .4
        bit     #$20                            ; AC5F 89 20                    .
        beq     LAC58                           ; AC61 F0 F5                    ..
        ldy     CursorY                         ; AC63 A4 A2                    ..
        jsr     LB059                           ; AC65 20 59 B0                  Y.
        bcs     LAC93                           ; AC68 B0 29                    .)
        ldx     $A3                             ; AC6A A6 A3                    ..
        stx     CursorX                         ; AC6C 86 A1                    ..
        ldy     CursorY                         ; AC6E A4 A2                    ..
        sec                                     ; AC70 38                       8
        jsr     LB06F                           ; AC71 20 6F B0                  o.
        ldy     CursorY                         ; AC74 A4 A2                    ..
        cpy     CurMaxY_                        ; AC76 C4 A6                    ..
        bne     LAC8E                           ; AC78 D0 14                    ..
        ldy     $03E9                           ; AC7A AC E9 03                 ...
        bmi     LAC88                           ; AC7D 30 09                    0.
        cpy     $A5                             ; AC7F C4 A5                    ..
        beq     LAC88                           ; AC81 F0 05                    ..
        dec     $03E9                           ; AC83 CE E9 03                 ...
        bra     LAC8B                           ; AC86 80 03                    ..
LAC88:  jsr     LB393                           ; AC88 20 93 B3                  ..
LAC8B:  jmp     LAF4B                           ; AC8B 4C 4B AF                 LK.
; ----------------------------------------------------------------------------
LAC8E:  inc     CursorY                         ; AC8E E6 A2                    ..
        jmp     LAF89                           ; AC90 4C 89 AF                 L..
; ----------------------------------------------------------------------------
LAC93:  jmp     LADD1                           ; AC93 4C D1 AD                 L..
; ----------------------------------------------------------------------------
LAC96:  .byte   $07                             ; AC96 07                       .
; ----------------------------------------------------------------------------
LAC97:  .addr   LC65C                           ; AC97 5C C6                    \.
; ----------------------------------------------------------------------------
        .byte   $09                             ; AC99 09                       .
; ----------------------------------------------------------------------------
        .addr   LAD0E                           ; AC9A 0E AD                    ..
; ----------------------------------------------------------------------------
        .byte   $0A                             ; AC9C 0A                       .
; ----------------------------------------------------------------------------
        .addr   LADA5                           ; AC9D A5 AD                    ..
; ----------------------------------------------------------------------------
        .byte   $0D                             ; AC9F 0D                       .
; ----------------------------------------------------------------------------
        .addr   LAD4F                           ; ACA0 4F AD                    O.
; ----------------------------------------------------------------------------
        .byte   $0E                             ; ACA2 0E                       .
; ----------------------------------------------------------------------------
        .addr   LACFA                           ; ACA3 FA AC                    ..
; ----------------------------------------------------------------------------
        .byte   $11                             ; ACA5 11                       .
; ----------------------------------------------------------------------------
        .addr   LADA5                           ; ACA6 A5 AD                    ..
; ----------------------------------------------------------------------------
        .byte   $12                             ; ACA8 12                       .
; ----------------------------------------------------------------------------
        .addr   LAD72                           ; ACA9 72 AD                    r.
; ----------------------------------------------------------------------------
        .byte   $13                             ; ACAB 13                       .
; ----------------------------------------------------------------------------
        .addr   LAE6F                           ; ACAC 6F AE                    o.
; ----------------------------------------------------------------------------
        .byte   $14                             ; ACAE 14                       .
; ----------------------------------------------------------------------------
        .addr   LAE7B                           ; ACAF 7B AE                    {.
; ----------------------------------------------------------------------------
        .byte   $18                             ; ACB1 18                       .
; ----------------------------------------------------------------------------
        .addr   LAD37                           ; ACB2 37 AD                    7.
; ----------------------------------------------------------------------------
        .byte   $19                             ; ACB4 19                       .
; ----------------------------------------------------------------------------
        .addr   LACE2                           ; ACB5 E2 AC                    ..
; ----------------------------------------------------------------------------
        .byte   $1A                             ; ACB7 1A                       .
; ----------------------------------------------------------------------------
        .addr   LACE8                           ; ACB8 E8 AC                    ..
; ----------------------------------------------------------------------------
        .byte   $1D                             ; ACBA 1D                       .
; ----------------------------------------------------------------------------
        .addr   LADD1                           ; ACBB D1 AD                    ..
; ----------------------------------------------------------------------------
        .byte   $8D                             ; ACBD 8D                       .
; ----------------------------------------------------------------------------
        .addr   LAD4F                           ; ACBE 4F AD                    O.
; ----------------------------------------------------------------------------
        .byte   $8E                             ; ACC0 8E                       .
; ----------------------------------------------------------------------------
        .addr   LAD02                           ; ACC1 02 AD                    ..
; ----------------------------------------------------------------------------
        .byte   $91                             ; ACC3 91                       .
; ----------------------------------------------------------------------------
        .addr   LAD78                           ; ACC4 78 AD                    x.
; ----------------------------------------------------------------------------
        .byte   $92                             ; ACC6 92                       .
; ----------------------------------------------------------------------------
        .addr   LB224                           ; ACC7 24 B2                    $.
; ----------------------------------------------------------------------------
        .byte   $93                             ; ACC9 93                       .
; ----------------------------------------------------------------------------
        .addr   LAE47                           ; ACCA 47 AE                    G.
; ----------------------------------------------------------------------------
        .byte   $94                             ; ACCC 94                       .
; ----------------------------------------------------------------------------
        .addr   LAEC9                           ; ACCD C9 AE                    ..
; ----------------------------------------------------------------------------
        .byte   $9D                             ; ACCF 9D                       .
; ----------------------------------------------------------------------------
        .addr   LAE09                           ; ACD0 09 AE                    ..
; ----------------------------------------------------------------------------
LACD2:  ldx     #$39                            ; ACD2 A2 39                    .9
LACD4:  cmp     LAC96,x                         ; ACD4 DD 96 AC                 ...
        beq     LACDF                           ; ACD7 F0 06                    ..
        dex                                     ; ACD9 CA                       .
        dex                                     ; ACDA CA                       .
        dex                                     ; ACDB CA                       .
        bpl     LACD4                           ; ACDC 10 F6                    ..
        rts                                     ; ACDE 60                       `
; ----------------------------------------------------------------------------
LACDF:  jmp     (LAC97,x)                       ; ACDF 7C 97 AC                 |..
LACE2:  lda     #$40                            ; ACE2 A9 40                    .@
        tsb     $036D                           ; ACE4 0C 6D 03                 .m.
        rts                                     ; ACE7 60                       `
; ----------------------------------------------------------------------------
LACE8:  lda     #$40                            ; ACE8 A9 40                    .@
        trb     $036D                           ; ACEA 1C 6D 03                 .m.
        rts                                     ; ACED 60                       `
; ----------------------------------------------------------------------------
LACEE:  bit     $036D                           ; ACEE 2C 6D 03                 ,m.
        bvs     LACE2                           ; ACF1 70 EF                    p.
        lda     #$01                            ; ACF3 A9 01                    ..
        tsb     $037A                           ; ACF5 0C 7A 03                 .z.
        beq     LAD0A                           ; ACF8 F0 10                    ..
LACFA:  lda     #$01                            ; ACFA A9 01                    ..
        trb     $037A                           ; ACFC 1C 7A 03                 .z.
        bne     LAD0A                           ; ACFF D0 09                    ..
        rts                                     ; AD01 60                       `
; ----------------------------------------------------------------------------
LAD02:  lda     #$01                            ; AD02 A9 01                    ..
        tsb     $037A                           ; AD04 0C 7A 03                 .z.
        beq     LAD0A                           ; AD07 F0 01                    ..
        rts                                     ; AD09 60                       `
; ----------------------------------------------------------------------------
LAD0A:  sec                                     ; AD0A 38                       8
        jmp     LCDsetupGetOrSet                ; AD0B 4C 28 B2                 L(.
; ----------------------------------------------------------------------------
LAD0E:  ldx     CursorX                         ; AD0E A6 A1                    ..
        cpx     CurMaxX_                        ; AD10 E4 A4                    ..
        beq     LAD27                           ; AD12 F0 13                    ..
        lda     #$1D                            ; AD14 A9 1D                    ..
        ldx     $A9                             ; AD16 A6 A9                    ..
        beq     LAD1C                           ; AD18 F0 02                    ..
        lda     #$20                            ; AD1A A9 20                    .
LAD1C:  jsr     LABD6                           ; AD1C 20 D6 AB                  ..
        jsr     LAD28                           ; AD1F 20 28 AD                  (.
        and     $0370,y                         ; AD22 39 70 03                 9p.
        beq     LAD0E                           ; AD25 F0 E7                    ..
LAD27:  rts                                     ; AD27 60                       `
; ----------------------------------------------------------------------------
LAD28:  lda     CursorX                         ; AD28 A5 A1                    ..
        lsr     a                               ; AD2A 4A                       J
        lsr     a                               ; AD2B 4A                       J
        lsr     a                               ; AD2C 4A                       J
        tay                                     ; AD2D A8                       .
        lda     CursorX                         ; AD2E A5 A1                    ..
        and     #$07                            ; AD30 29 07                    ).
        tax                                     ; AD32 AA                       .
        lda     PowersOfTwo,x                   ; AD33 BD 41 B0                 .A.
        rts                                     ; AD36 60                       `
; ----------------------------------------------------------------------------
LAD37:  jsr     LAD28                           ; AD37 20 28 AD                  (.
        eor     $0370,y                         ; AD3A 59 70 03                 Yp.
        sta     $0370,y                         ; AD3D 99 70 03                 .p.
        rts                                     ; AD40 60                       `
; ----------------------------------------------------------------------------
LAD41:  lda     #$80                            ; AD41 A9 80                    ..
        .byte   $2C                             ; AD43 2C                       ,
LAD44:  lda     #$00                            ; AD44 A9 00                    ..
        ldx     #$09                            ; AD46 A2 09                    ..
LAD48:  sta     $0370,x                         ; AD48 9D 70 03                 .p.
        dex                                     ; AD4B CA                       .
        bpl     LAD48                           ; AD4C 10 FA                    ..
        rts                                     ; AD4E 60                       `
; ----------------------------------------------------------------------------
LAD4F:  lda     $AA                             ; AD4F A5 AA                    ..
        lsr     a                               ; AD51 4A                       J
        bcc     LAD65                           ; AD52 90 11                    ..
        lda     #$08                            ; AD54 A9 08                    ..
        bit     StopKeyFlag                     ; AD56 24 AD                    $.
        beq     LAD65                           ; AD58 F0 0B                    ..
        php                                     ; AD5A 08                       .
        pla                                     ; AD5B 68                       h
        bit     #$04                            ; AD5C 89 04                    ..
        bne     LAD65                           ; AD5E D0 05                    ..
        ldx     #$2D                            ; AD60 A2 2D                    .-
        jsr     WaitXticks_                     ; AD62 20 E4 BF                  ..
LAD65:  jsr     LB15A                           ; AD65 20 5A B1                  Z.
        ldx     $A3                             ; AD68 A6 A3                    ..
        stx     CursorX                         ; AD6A 86 A1                    ..
        jsr     LADA5                           ; AD6C 20 A5 AD                  ..
        jmp     LB220                           ; AD6F 4C 20 B2                 L .
; ----------------------------------------------------------------------------
LAD72:  lda     #$80                            ; AD72 A9 80                    ..
        sta     $036C                           ; AD74 8D 6C 03                 .l.
        rts                                     ; AD77 60                       `
; ----------------------------------------------------------------------------
LAD78:  ldy     CursorY                         ; AD78 A4 A2                    ..
        cpy     $A5                             ; AD7A C4 A5                    ..
        beq     LAD8A                           ; AD7C F0 0C                    ..
        dec     CursorY                         ; AD7E C6 A2                    ..
        dey                                     ; AD80 88                       .
        jsr     LB059                           ; AD81 20 59 B0                  Y.
        bcs     LAD89                           ; AD84 B0 03                    ..
        jsr     LB393                           ; AD86 20 93 B3                  ..
LAD89:  rts                                     ; AD89 60                       `
; ----------------------------------------------------------------------------
LAD8A:  lda     #$10                            ; AD8A A9 10                    ..
        bit     $AA                             ; AD8C 24 AA                    $.
        bne     LAD91                           ; AD8E D0 01                    ..
        rts                                     ; AD90 60                       `
; ----------------------------------------------------------------------------
LAD91:  jsr     LB393                           ; AD91 20 93 B3                  ..
        bit     $AA                             ; AD94 24 AA                    $.
        bvc     LADA0                           ; AD96 50 08                    P.
        jsr     LAF89                           ; AD98 20 89 AF                  ..
        ldy     $A5                             ; AD9B A4 A5                    ..
        sty     CursorY                         ; AD9D 84 A2                    ..
        rts                                     ; AD9F 60                       `
; ----------------------------------------------------------------------------
LADA0:  ldy     CurMaxY_                        ; ADA0 A4 A6                    ..
        sty     CursorY                         ; ADA2 84 A2                    ..
        rts                                     ; ADA4 60                       `
; ----------------------------------------------------------------------------
LADA5:  ldy     CursorY                         ; ADA5 A4 A2                    ..
        cpy     CurMaxY_                        ; ADA7 C4 A6                    ..
        beq     LADB6                           ; ADA9 F0 0B                    ..
        jsr     LB059                           ; ADAB 20 59 B0                  Y.
        bcs     LADB3                           ; ADAE B0 03                    ..
        jsr     LB393                           ; ADB0 20 93 B3                  ..
LADB3:  inc     CursorY                         ; ADB3 E6 A2                    ..
        rts                                     ; ADB5 60                       `
; ----------------------------------------------------------------------------
LADB6:  lda     #$08                            ; ADB6 A9 08                    ..
        bit     $AA                             ; ADB8 24 AA                    $.
        bne     LADBD                           ; ADBA D0 01                    ..
        rts                                     ; ADBC 60                       `
; ----------------------------------------------------------------------------
LADBD:  jsr     LB393                           ; ADBD 20 93 B3                  ..
        bit     $AA                             ; ADC0 24 AA                    $.
        bvc     LADCC                           ; ADC2 50 08                    P.
        jsr     LAF4B                           ; ADC4 20 4B AF                  K.
        ldy     CurMaxY_                        ; ADC7 A4 A6                    ..
        sty     CursorY                         ; ADC9 84 A2                    ..
        rts                                     ; ADCB 60                       `
; ----------------------------------------------------------------------------
LADCC:  ldy     $A5                             ; ADCC A4 A5                    ..
        sty     CursorY                         ; ADCE 84 A2                    ..
        rts                                     ; ADD0 60                       `
; ----------------------------------------------------------------------------
LADD1:  ldx     CurMaxX_                        ; ADD1 A6 A4                    ..
        cpx     CursorX                         ; ADD3 E4 A1                    ..
        beq     LADDA                           ; ADD5 F0 03                    ..
        inc     CursorX                         ; ADD7 E6 A1                    ..
        rts                                     ; ADD9 60                       `
; ----------------------------------------------------------------------------
LADDA:  ldy     CursorY                         ; ADDA A4 A2                    ..
        cpy     CurMaxY_                        ; ADDC C4 A6                    ..
        beq     LADEF                           ; ADDE F0 0F                    ..
        jsr     LB059                           ; ADE0 20 59 B0                  Y.
        bcs     LADE8                           ; ADE3 B0 03                    ..
        jsr     LB393                           ; ADE5 20 93 B3                  ..
LADE8:  inc     CursorY                         ; ADE8 E6 A2                    ..
        ldx     $A3                             ; ADEA A6 A3                    ..
        stx     CursorX                         ; ADEC 86 A1                    ..
        rts                                     ; ADEE 60                       `
; ----------------------------------------------------------------------------
LADEF:  lda     $AA                             ; ADEF A5 AA                    ..
        bit     #$08                            ; ADF1 89 08                    ..
        bne     LADF6                           ; ADF3 D0 01                    ..
        rts                                     ; ADF5 60                       `
; ----------------------------------------------------------------------------
LADF6:  ldx     $A3                             ; ADF6 A6 A3                    ..
        stx     CursorX                         ; ADF8 86 A1                    ..
        jsr     LB393                           ; ADFA 20 93 B3                  ..
        bit     #$40                            ; ADFD 89 40                    .@
        bne     LAE04                           ; ADFF D0 03                    ..
        jmp     LAE6F                           ; AE01 4C 6F AE                 Lo.
; ----------------------------------------------------------------------------
LAE04:  ldy     CursorY                         ; AE04 A4 A2                    ..
        jmp     LAF4B                           ; AE06 4C 4B AF                 LK.
; ----------------------------------------------------------------------------
LAE09:  ldx     CursorX                         ; AE09 A6 A1                    ..
        cpx     $A3                             ; AE0B E4 A3                    ..
        beq     LAE12                           ; AE0D F0 03                    ..
        dec     CursorX                         ; AE0F C6 A1                    ..
        rts                                     ; AE11 60                       `
; ----------------------------------------------------------------------------
LAE12:  ldy     CursorY                         ; AE12 A4 A2                    ..
        cpy     $A5                             ; AE14 C4 A5                    ..
        beq     LAE28                           ; AE16 F0 10                    ..
        .byte   $C6                             ; AE18 C6                       .
LAE19:  ldx     #$A6                            ; AE19 A2 A6                    ..
        ldy     $86                             ; AE1B A4 86                    ..
        lda     ($88,x)                         ; AE1D A1 88                    ..
        jsr     LB059                           ; AE1F 20 59 B0                  Y.
        bcs     LAE27                           ; AE22 B0 03                    ..
        jsr     LB393                           ; AE24 20 93 B3                  ..
LAE27:  rts                                     ; AE27 60                       `
; ----------------------------------------------------------------------------
LAE28:  lda     $AA                             ; AE28 A5 AA                    ..
        bit     #$10                            ; AE2A 89 10                    ..
        bne     LAE2F                           ; AE2C D0 01                    ..
        rts                                     ; AE2E 60                       `
; ----------------------------------------------------------------------------
LAE2F:  jsr     LB393                           ; AE2F 20 93 B3                  ..
        ldx     CurMaxX_                        ; AE32 A6 A4                    ..
        stx     CursorX                         ; AE34 86 A1                    ..
        bit     $AA                             ; AE36 24 AA                    $.
        bvc     LAE42                           ; AE38 50 08                    P.
        jsr     LAF89                           ; AE3A 20 89 AF                  ..
        ldy     $A5                             ; AE3D A4 A5                    ..
        sty     CursorY                         ; AE3F 84 A2                    ..
        rts                                     ; AE41 60                       `
; ----------------------------------------------------------------------------
LAE42:  ldy     CurMaxY_                        ; AE42 A4 A6                    ..
        sty     CursorY                         ; AE44 84 A2                    ..
        rts                                     ; AE46 60                       `
; ----------------------------------------------------------------------------
LAE47:  jsr     LAE6F                           ; AE47 20 6F AE                  o.
        ldy     CurMaxY_                        ; AE4A A4 A6                    ..
LAE4C:  sty     CursorY                         ; AE4C 84 A2                    ..
        jsr     LAFC0                           ; AE4E 20 C0 AF                  ..
        ldy     CursorY                         ; AE51 A4 A2                    ..
        dey                                     ; AE53 88                       .
        cpy     $A5                             ; AE54 C4 A5                    ..
        bpl     LAE4C                           ; AE56 10 F4                    ..
        jmp     LB087                           ; AE58 4C 87 B0                 L..
; ----------------------------------------------------------------------------
LAE5B:  ldx     L0380                           ; AE5B AE 80 03                 ...
        stx     $A3                             ; AE5E 86 A3                    ..
        ldx     CurMaxX                         ; AE60 AE 81 03                 ...
        stx     CurMaxX_                        ; AE63 86 A4                    ..
        ldy     $037F                           ; AE65 AC 7F 03                 ...
LAE68:  sty     $A5                             ; AE68 84 A5                    ..
        ldy     CurMaxY                         ; AE6A AC 7E 03                 .~.
        sty     CurMaxY_                        ; AE6D 84 A6                    ..
LAE6F:  jsr     LB393                           ; AE6F 20 93 B3                  ..
        ldx     $A3                             ; AE72 A6 A3                    ..
        stx     CursorX                         ; AE74 86 A1                    ..
        ldy     $A5                             ; AE76 A4 A5                    ..
        sty     CursorY                         ; AE78 84 A2                    ..
        rts                                     ; AE7A 60                       `
; ----------------------------------------------------------------------------
LAE7B:  jsr     LAE09                           ; AE7B 20 09 AE                  ..
        jsr     LAEB1                           ; AE7E 20 B1 AE                  ..
LAE81:  ldx     CursorX                         ; AE81 A6 A1                    ..
        cpx     CurMaxX_                        ; AE83 E4 A4                    ..
        bne     LAE8E                           ; AE85 D0 07                    ..
        ldy     CursorY                         ; AE87 A4 A2                    ..
        jsr     LB059                           ; AE89 20 59 B0                  Y.
        bcc     LAEA1                           ; AE8C 90 13                    ..
LAE8E:  jsr     LADD1                           ; AE8E 20 D1 AD                  ..
        jsr     LAF41                           ; AE91 20 41 AF                  A.
        pha                                     ; AE94 48                       H
        jsr     LAE09                           ; AE95 20 09 AE                  ..
        pla                                     ; AE98 68                       h
        jsr     LAF1C                           ; AE99 20 1C AF                  ..
        jsr     LADD1                           ; AE9C 20 D1 AD                  ..
        bra     LAE81                           ; AE9F 80 E0                    ..
LAEA1:  lda     #$20                            ; AEA1 A9 20                    .
        jsr     LAF1C                           ; AEA3 20 1C AF                  ..
LAEA6:  ldx     $03EA                           ; AEA6 AE EA 03                 ...
        ldy     $03EB                           ; AEA9 AC EB 03                 ...
        stx     CursorX                         ; AEAC 86 A1                    ..
        sty     CursorY                         ; AEAE 84 A2                    ..
        rts                                     ; AEB0 60                       `
; ----------------------------------------------------------------------------
LAEB1:  ldx     CursorX                         ; AEB1 A6 A1                    ..
        ldy     CursorY                         ; AEB3 A4 A2                    ..
        .byte   $8E                             ; AEB5 8E                       .
LAEB6:  nop                                     ; AEB6 EA                       .
        .byte   $03                             ; AEB7 03                       .
        sty     $03EB                           ; AEB8 8C EB 03                 ...
        rts                                     ; AEBB 60                       `
; ----------------------------------------------------------------------------
LAEBC:  ldx     CursorX                         ; AEBC A6 A1                    ..
        ldy     CursorY                         ; AEBE A4 A2                    ..
        cpy     $03EB                           ; AEC0 CC EB 03                 ...
        bne     LAEC8                           ; AEC3 D0 03                    ..
        cpx     $03EA                           ; AEC5 EC EA 03                 ...
LAEC8:  rts                                     ; AEC8 60                       `
; ----------------------------------------------------------------------------
LAEC9:  inc     $A8                             ; AEC9 E6 A8                    ..
        bne     LAECF                           ; AECB D0 02                    ..
        dec     $A8                             ; AECD C6 A8                    ..
LAECF:  ldx     $A9                             ; AECF A6 A9                    ..
        beq     LAED5                           ; AED1 F0 02                    ..
        stz     $A8                             ; AED3 64 A8                    d.
LAED5:  lda     #$20                            ; AED5 A9 20                    .
        pha                                     ; AED7 48                       H
        jsr     LAEB1                           ; AED8 20 B1 AE                  ..
        dec     CursorX                         ; AEDB C6 A1                    ..
LAEDD:  jsr     LAC50                           ; AEDD 20 50 AC                  P.
        jsr     LAF41                           ; AEE0 20 41 AF                  A.
        tax                                     ; AEE3 AA                       .
        pla                                     ; AEE4 68                       h
        sta     (VidPtrLo)                      ; AEE5 92 C1                    ..
        phx                                     ; AEE7 DA                       .
        lda     CursorX                         ; AEE8 A5 A1                    ..
        cmp     CurMaxX_                        ; AEEA C5 A4                    ..
        bne     LAEDD                           ; AEEC D0 EF                    ..
        lda     $AA                             ; AEEE A5 AA                    ..
        bit     #$20                            ; AEF0 89 20                    .
        beq     LAF16                           ; AEF2 F0 22                    ."
        bit     #$04                            ; AEF4 89 04                    ..
        beq     LAF16                           ; AEF6 F0 1E                    ..
        cpx     #$20                            ; AEF8 E0 20                    .
        beq     LAF0F                           ; AEFA F0 13                    ..
        ldy     CursorY                         ; AEFC A4 A2                    ..
        cpy     CurMaxY_                        ; AEFE C4 A6                    ..
        bne     LAEDD                           ; AF00 D0 DB                    ..
        ldy     $03EB                           ; AF02 AC EB 03                 ...
        dey                                     ; AF05 88                       .
        cpy     $A5                             ; AF06 C4 A5                    ..
        bmi     LAEDD                           ; AF08 30 D3                    0.
        sty     $03EB                           ; AF0A 8C EB 03                 ...
        bra     LAEDD                           ; AF0D 80 CE                    ..
LAF0F:  ldy     CursorY                         ; AF0F A4 A2                    ..
        jsr     LB059                           ; AF11 20 59 B0                  Y.
        bcs     LAEDD                           ; AF14 B0 C7                    ..
LAF16:  pla                                     ; AF16 68                       h
        jmp     LAEA6                           ; AF17 4C A6 AE                 L..
; ----------------------------------------------------------------------------
LAF1A:  lda     #$20                            ; AF1A A9 20                    .
LAF1C:  ldx     CursorX                         ; AF1C A6 A1                    ..
        ldy     CursorY                         ; AF1E A4 A2                    ..
        pha                                     ; AF20 48                       H
        jsr     LAF2C                           ; AF21 20 2C AF                  ,.
        pla                                     ; AF24 68                       h
; This op puts the chr into the video RAM.
        sta     (VidPtrLo)                      ; AF25 92 C1                    ..
        rts                                     ; AF27 60                       `
; ----------------------------------------------------------------------------
LAF28:  ldy     CursorY                         ; AF28 A4 A2                    ..
        ldx     CursorX                         ; AF2A A6 A1                    ..
LAF2C:  cld                                     ; AF2C D8                       .
        txa                                     ; AF2D 8A                       .
        asl     a                               ; AF2E 0A                       .
        sta     VidPtrLo                        ; AF2F 85 C1                    ..
        tya                                     ; AF31 98                       .
        lsr     a                               ; AF32 4A                       J
        ror     VidPtrLo                        ; AF33 66 C1                    f.
        adc     VidMemHi                        ; AF35 65 A0                    e.
        sta     VidPtrHi                        ; AF37 85 C2                    ..
        rts                                     ; AF39 60                       `
; ----------------------------------------------------------------------------
LAF3A:  cld                                     ; AF3A D8                       .
        sec                                     ; AF3B 38                       8
        lda     CurMaxX_                        ; AF3C A5 A4                    ..
        sbc     $A3                             ; AF3E E5 A3                    ..
        rts                                     ; AF40 60                       `
; ----------------------------------------------------------------------------
LAF41:  ldx     CursorX                         ; AF41 A6 A1                    ..
        ldy     CursorY                         ; AF43 A4 A2                    ..
        jsr     LAF2C                           ; AF45 20 2C AF                  ,.
        lda     (VidPtrLo)                      ; AF48 B2 C1                    ..
        rts                                     ; AF4A 60                       `
; ----------------------------------------------------------------------------
LAF4B:  ldy     $A5                             ; AF4B A4 A5                    ..
        cpy     CursorY                         ; AF4D C4 A2                    ..
        beq     LAF7C                           ; AF4F F0 2B                    .+
        ldx     $A3                             ; AF51 A6 A3                    ..
        jsr     LAF2C                           ; AF53 20 2C AF                  ,.
        jsr     LAF3A                           ; AF56 20 3A AF                  :.
        sta     $F3                             ; AF59 85 F3                    ..
        ldx     $A5                             ; AF5B A6 A5                    ..
LAF5D:  lda     VidPtrLo                        ; AF5D A5 C1                    ..
        ldy     VidPtrHi                        ; AF5F A4 C2                    ..
        sta     $F1                             ; AF61 85 F1                    ..
        sty     $F2                             ; AF63 84 F2                    ..
        eor     #$80                            ; AF65 49 80                    I.
        sta     VidPtrLo                        ; AF67 85 C1                    ..
        bmi     LAF6E                           ; AF69 30 03                    0.
        iny                                     ; AF6B C8                       .
        sty     VidPtrHi                        ; AF6C 84 C2                    ..
LAF6E:  ldy     $F3                             ; AF6E A4 F3                    ..
LAF70:  lda     (VidPtrLo),y                    ; AF70 B1 C1                    ..
        sta     ($F1),y                         ; AF72 91 F1                    ..
        dey                                     ; AF74 88                       .
        bpl     LAF70                           ; AF75 10 F9                    ..
        inx                                     ; AF77 E8                       .
        cpx     CursorY                         ; AF78 E4 A2                    ..
        bne     LAF5D                           ; AF7A D0 E1                    ..
LAF7C:  jsr     LAFD3                           ; AF7C 20 D3 AF                  ..
        lda     #$C0                            ; AF7F A9 C0                    ..
        tsb     $037D                           ; AF81 0C 7D 03                 .}.
        ldy     CursorY                         ; AF84 A4 A2                    ..
        jmp     LAFC0                           ; AF86 4C C0 AF                 L..
; ----------------------------------------------------------------------------
LAF89:  ldy     CursorY                         ; AF89 A4 A2                    ..
        cpy     CurMaxY_                        ; AF8B C4 A6                    ..
        beq     LAFC0                           ; AF8D F0 31                    .1
        jsr     LAF3A                           ; AF8F 20 3A AF                  :.
        sta     $F3                             ; AF92 85 F3                    ..
        ldy     CurMaxY_                        ; AF94 A4 A6                    ..
LAF96:  phy                                     ; AF96 5A                       Z
        ldx     $A3                             ; AF97 A6 A3                    ..
        jsr     LAF2C                           ; AF99 20 2C AF                  ,.
        lda     VidPtrLo                        ; AF9C A5 C1                    ..
        ldy     VidPtrHi                        ; AF9E A4 C2                    ..
        eor     #$80                            ; AFA0 49 80                    I.
        bpl     LAFA5                           ; AFA2 10 01                    ..
        dey                                     ; AFA4 88                       .
LAFA5:  sta     $F1                             ; AFA5 85 F1                    ..
        sty     $F2                             ; AFA7 84 F2                    ..
        ldy     $F3                             ; AFA9 A4 F3                    ..
LAFAB:  lda     ($F1),y                         ; AFAB B1 F1                    ..
        sta     (VidPtrLo),y                    ; AFAD 91 C1                    ..
        dey                                     ; AFAF 88                       .
        bpl     LAFAB                           ; AFB0 10 F9                    ..
        ply                                     ; AFB2 7A                       z
        dey                                     ; AFB3 88                       .
        cpy     CursorY                         ; AFB4 C4 A2                    ..
        bne     LAF96                           ; AFB6 D0 DE                    ..
        jsr     LAFF3                           ; AFB8 20 F3 AF                  ..
        lda     #$80                            ; AFBB A9 80                    ..
        tsb     $037D                           ; AFBD 0C 7D 03                 .}.
LAFC0:  ldy     CursorY                         ; AFC0 A4 A2                    ..
        ldx     $A3                             ; AFC2 A6 A3                    ..
        jsr     LAF2C                           ; AFC4 20 2C AF                  ,.
        jsr     LAF3A                           ; AFC7 20 3A AF                  :.
        tay                                     ; AFCA A8                       .
; This fragments prints spaces (ie; clear) on screen.
        lda     #$20                            ; AFCB A9 20                    .
LAFCD:  sta     (VidPtrLo),y                    ; AFCD 91 C1                    ..
        dey                                     ; AFCF 88                       .
        bpl     LAFCD                           ; AFD0 10 FB                    ..
        rts                                     ; AFD2 60                       `
; ----------------------------------------------------------------------------
LAFD3:  jsr     LB020                           ; AFD3 20 20 B0                   .
        eor     $F1                             ; AFD6 45 F1                    E.
        and     $036A,x                         ; AFD8 3D 6A 03                 =j.
        sta     $F1                             ; AFDB 85 F1                    ..
        lda     $036A,x                         ; AFDD BD 6A 03                 .j.
        and     $F2                             ; AFE0 25 F2                    %.
        lsr     a                               ; AFE2 4A                       J
        ora     $F1                             ; AFE3 05 F1                    ..
        sta     $036A,x                         ; AFE5 9D 6A 03                 .j.
        rol     $036A,x                         ; AFE8 3E 6A 03                 >j.
LAFEB:  ror     $036A,x                         ; AFEB 7E 6A 03                 ~j.
        dex                                     ; AFEE CA                       .
        bpl     LAFEB                           ; AFEF 10 FA                    ..
        bra     LB013                           ; AFF1 80 20                    .
LAFF3:  jsr     LB020                           ; AFF3 20 20 B0                   .
        eor     $F2                             ; AFF6 45 F2                    E.
        and     $036A,x                         ; AFF8 3D 6A 03                 =j.
        sta     $F2                             ; AFFB 85 F2                    ..
        lda     $036A,x                         ; AFFD BD 6A 03                 .j.
        and     $F1                             ; B000 25 F1                    %.
        asl     a                               ; B002 0A                       .
        ora     $F2                             ; B003 05 F2                    ..
        sta     $036A,x                         ; B005 9D 6A 03                 .j.
        .byte   $7E                             ; B008 7E                       ~
LB009:  ror     a                               ; B009 6A                       j
        .byte   $03                             ; B00A 03                       .
LB00B:  rol     $036A,x                         ; B00B 3E 6A 03                 >j.
        inx                                     ; B00E E8                       .
        cpx     #$02                            ; B00F E0 02                    ..
        bne     LB00B                           ; B011 D0 F8                    ..
LB013:  ldy     $A5                             ; B013 A4 A5                    ..
        beq     LB01B                           ; B015 F0 04                    ..
        dey                                     ; B017 88                       .
        jsr     LB07B                           ; B018 20 7B B0                  {.
LB01B:  ldy     CurMaxY_                        ; B01B A4 A6                    ..
        jmp     LB07B                           ; B01D 4C 7B B0                 L{.
; ----------------------------------------------------------------------------
LB020:  .byte   $A4                             ; B020 A4                       .
LB021:  ldx     #$98                            ; B021 A2 98                    ..
        and     #$07                            ; B023 29 07                    ).
        tax                                     ; B025 AA                       .
        lda     LB049,x                         ; B026 BD 49 B0                 .I.
        sta     $F2                             ; B029 85 F2                    ..
        lda     LB051,x                         ; B02B BD 51 B0                 .Q.
        sta     $F1                             ; B02E 85 F1                    ..
LB030:  tya                                     ; B030 98                       .
        and     #$07                            ; B031 29 07                    ).
        tax                                     ; B033 AA                       .
        lda     PowersOfTwo,x                   ; B034 BD 41 B0                 .A.
        pha                                     ; B037 48                       H
        tya                                     ; B038 98                       .
        lsr     a                               ; B039 4A                       J
        lsr     a                               ; B03A 4A                       J
        lsr     a                               ; B03B 4A                       J
        and     #$01                            ; B03C 29 01                    ).
        tax                                     ; B03E AA                       .
        pla                                     ; B03F 68                       h
        rts                                     ; B040 60                       `
; ----------------------------------------------------------------------------
PowersOfTwo:
        .byte   $01,$02,$04,$08,$10,$20,$40,$80 ; B041 01 02 04 08 10 20 40 80  ..... @.
LB049:  .byte   $01,$03,$07,$0F,$1F,$3F,$7F,$FF ; B049 01 03 07 0F 1F 3F 7F FF  .....?..
LB051:  .byte   $FF,$FE,$FC,$F8,$F0,$E0,$C0,$80 ; B051 FF FE FC F8 F0 E0 C0 80  ........
; ----------------------------------------------------------------------------
LB059:  lda     #$04                            ; B059 A9 04                    ..
        and     $AA                             ; B05B 25 AA                    %.
        beq     LB06D                           ; B05D F0 0E                    ..
        cpy     #$10                            ; B05F C0 10                    ..
        bcs     LB06D                           ; B061 B0 0A                    ..
        jsr     LB030                           ; B063 20 30 B0                  0.
        and     $036A,x                         ; B066 3D 6A 03                 =j.
        beq     LB06D                           ; B069 F0 02                    ..
        sec                                     ; B06B 38                       8
        rts                                     ; B06C 60                       `
; ----------------------------------------------------------------------------
LB06D:  clc                                     ; B06D 18                       .
        rts                                     ; B06E 60                       `
; ----------------------------------------------------------------------------
LB06F:  bcc     LB07B                           ; B06F 90 0A                    ..
        jsr     LB030                           ; B071 20 30 B0                  0.
        ora     $036A,x                         ; B074 1D 6A 03                 .j.
        sta     $036A,x                         ; B077 9D 6A 03                 .j.
        rts                                     ; B07A 60                       `
; ----------------------------------------------------------------------------
LB07B:  .byte   $20                             ; B07B 20
        .byte   $30                             ; B07C 30                       0
LB07D:  bcs     LB0C8                           ; B07D B0 49                    .I
        bbs7    $3D,LB0EB+1                     ; B07F FF 3D 6A                 .=j
        .byte   $03                             ; B082 03                       .
        sta     $036A,x                         ; B083 9D 6A 03                 .j.
        rts                                     ; B086 60                       `
; ----------------------------------------------------------------------------
LB087:  stz     $036A                           ; B087 9C 6A 03                 .j.
        .byte   $9C                             ; B08A 9C                       .
LB08B:  .byte   $6B                             ; B08B 6B                       k
        .byte   $03                             ; B08C 03                       .
        rts                                     ; B08D 60                       `
; ----------------------------------------------------------------------------
LB08E:  cmp     #$22                            ; B08E C9 22                    ."
        bne     LB09A                           ; B090 D0 08                    ..
        bit     $A7                             ; B092 24 A7                    $.
        stz     $A7                             ; B094 64 A7                    d.
        bvs     LB09A                           ; B096 70 02                    p.
        dec     $A7                             ; B098 C6 A7                    ..
LB09A:  rts                                     ; B09A 60                       `
; ----------------------------------------------------------------------------
LB09B:  cmp     #$FF                            ; B09B C9 FF                    ..
        bne     LB0A2                           ; B09D D0 03                    ..
        lda     #$5E                            ; B09F A9 5E                    .^
        rts                                     ; B0A1 60                       `
; ----------------------------------------------------------------------------
LB0A2:  phx                                     ; B0A2 DA                       .
        pha                                     ; B0A3 48                       H
        lsr     a                               ; B0A4 4A                       J
        lsr     a                               ; B0A5 4A                       J
        lsr     a                               ; B0A6 4A                       J
        lsr     a                               ; B0A7 4A                       J
        lsr     a                               ; B0A8 4A                       J
        tax                                     ; B0A9 AA                       .
        pla                                     ; B0AA 68                       h
        eor     LB0B0,x                         ; B0AB 5D B0 B0                 ]..
        plx                                     ; B0AE FA                       .
        rts                                     ; B0AF 60                       `
; ----------------------------------------------------------------------------
LB0B0:  .byte   $80,$00                         ; B0B0 80 00                    ..
LB0B2:  .byte   $40,$20,$40,$C0,$80,$80         ; B0B2 40 20 40 C0 80 80        @ @...
; ----------------------------------------------------------------------------
LB0B8:  sta     $F1                             ; B0B8 85 F1                    ..
        and     #$3F                            ; B0BA 29 3F                    )?
LB0BC:  asl     $F1                             ; B0BC 06 F1                    ..
        bit     $F1                             ; B0BE 24 F1                    $.
        bpl     LB0C4                           ; B0C0 10 02                    ..
        ora     #$80                            ; B0C2 09 80                    ..
LB0C4:  bcc     LB0CA                           ; B0C4 90 04                    ..
        ldx     $A7                             ; B0C6 A6 A7                    ..
LB0C8:  bne     LB0CE                           ; B0C8 D0 04                    ..
LB0CA:  bvs     LB0CE                           ; B0CA 70 02                    p.
        ora     #$40                            ; B0CC 09 40                    .@
LB0CE:  cmp     #$DE                            ; B0CE C9 DE                    ..
        bne     LB0D4                           ; B0D0 D0 02                    ..
        lda     #$FF                            ; B0D2 A9 FF                    ..
LB0D4:  rts                                     ; B0D4 60                       `
; ----------------------------------------------------------------------------
; Just guessing: this table is a byte then a jump address. Maybe it's some
; kind of terminal escape sequence table or such, at least pointed routines
; are often touch cursor position zp locs, etc.
LB0D5:  .byte   $41                             ; B0D5 41                       A
; ----------------------------------------------------------------------------
LB0D6:  .addr   LB12A                           ; B0D6 2A B1                    *.
; ----------------------------------------------------------------------------
        .byte   $42                             ; B0D8 42                       B
; ----------------------------------------------------------------------------
        .addr   LB12F                           ; B0D9 2F B1                    /.
; ----------------------------------------------------------------------------
        .byte   $43                             ; B0DB 43                       C
; ----------------------------------------------------------------------------
        .addr   LB13A                           ; B0DC 3A B1                    :.
; ----------------------------------------------------------------------------
        .byte   $44                             ; B0DE 44                       D
; ----------------------------------------------------------------------------
        .addr   LAFC0                           ; B0DF C0 AF                    ..
; ----------------------------------------------------------------------------
        .byte   $45                             ; B0E1 45                       E
; ----------------------------------------------------------------------------
        .addr   LB2CA                           ; B0E2 CA B2                    ..
; ----------------------------------------------------------------------------
        .byte   $46                             ; B0E4 46                       F
; ----------------------------------------------------------------------------
LB0E5:  .addr   LB2D0                           ; B0E5 D0 B2                    ..
; ----------------------------------------------------------------------------
        .byte   $49                             ; B0E7 49                       I
; ----------------------------------------------------------------------------
        .addr   LB13D                           ; B0E8 3D B1                    =.
; ----------------------------------------------------------------------------
        .byte   $4A                             ; B0EA 4A                       J
; ----------------------------------------------------------------------------
LB0EB:  .addr   LB14A                           ; B0EB 4A B1                    J.
; ----------------------------------------------------------------------------
        .byte   $4B                             ; B0ED 4B                       K
; ----------------------------------------------------------------------------
        .addr   LB15A                           ; B0EE 5A B1                    Z.
; ----------------------------------------------------------------------------
        .byte   $4C                             ; B0F0 4C                       L
; ----------------------------------------------------------------------------
        .addr   LB180                           ; B0F1 80 B1                    ..
; ----------------------------------------------------------------------------
        .byte   $4D                             ; B0F3 4D                       M
; ----------------------------------------------------------------------------
        .addr   LB185                           ; B0F4 85 B1                    ..
; ----------------------------------------------------------------------------
        .byte   $4F                             ; B0F6 4F                       O
; ----------------------------------------------------------------------------
        .addr   LB220                           ; B0F7 20 B2                     .
; ----------------------------------------------------------------------------
        .byte   $50                             ; B0F9 50                       P
; ----------------------------------------------------------------------------
        .addr   LB198                           ; B0FA 98 B1                    ..
; ----------------------------------------------------------------------------
LB0FC:  .byte   $51                             ; B0FC 51                       Q
; ----------------------------------------------------------------------------
LB0FD:  .addr   LB18A                           ; B0FD 8A B1                    ..
; ----------------------------------------------------------------------------
        .byte   $54                             ; B0FF 54                       T
; ----------------------------------------------------------------------------
        .addr   LB1B3                           ; B100 B3 B1                    ..
; ----------------------------------------------------------------------------
        .byte   $56                             ; B102 56                       V
; ----------------------------------------------------------------------------
        .addr   LB1BE                           ; B103 BE B1                    ..
; ----------------------------------------------------------------------------
        .byte   $57                             ; B105 57                       W
; ----------------------------------------------------------------------------
        .addr   LB1CA                           ; B106 CA B1                    ..
; ----------------------------------------------------------------------------
        .byte   $59                             ; B108 59                       Y
; ----------------------------------------------------------------------------
        .addr   LAD41                           ; B109 41 AD                    A.
; ----------------------------------------------------------------------------
        .byte   $5A                             ; B10B 5A                       Z
; ----------------------------------------------------------------------------
        .addr   LAD44                           ; B10C 44 AD                    D.
; ----------------------------------------------------------------------------
LB10E:  bit     $036E                           ; B10E 2C 6E 03                 ,n.
        bmi     LB126                           ; B111 30 13                    0.
        bvc     LB126                           ; B113 50 11                    P.
        lda     $036E                           ; B115 AD 6E 03                 .n.
        and     #$DF                            ; B118 29 DF                    ).
LB11A:  ldx     #$36                            ; B11A A2 36                    .6
LB11C:  cmp     LB0D5,x                         ; B11C DD D5 B0                 ...
        beq     LB127                           ; B11F F0 06                    ..
        dex                                     ; B121 CA                       .
        dex                                     ; B122 CA                       .
        dex                                     ; B123 CA                       .
        bpl     LB11C                           ; B124 10 F6                    ..
LB126:  rts                                     ; B126 60                       `
; ----------------------------------------------------------------------------
LB127:  jmp     (LB0D6,x)                       ; B127 7C D6 B0                 |..
LB12A:  sta     $A9                             ; B12A 85 A9                    ..
        stz     $A8                             ; B12C 64 A8                    d.
        rts                                     ; B12E 60                       `
; ----------------------------------------------------------------------------
LB12F:  ldx     CursorX                         ; B12F A6 A1                    ..
        stx     CurMaxX_                        ; B131 86 A4                    ..
        ldy     CursorY                         ; B133 A4 A2                    ..
        sty     CurMaxY_                        ; B135 84 A6                    ..
        jmp     LB087                           ; B137 4C 87 B0                 L..
; ----------------------------------------------------------------------------
LB13A:  stz     $A9                             ; B13A 64 A9                    d.
        rts                                     ; B13C 60                       `
; ----------------------------------------------------------------------------
LB13D:  jsr     LAF89                           ; B13D 20 89 AF                  ..
        ldy     CursorY                         ; B140 A4 A2                    ..
        dey                                     ; B142 88                       .
        jsr     LB059                           ; B143 20 59 B0                  Y.
        iny                                     ; B146 C8                       .
        jmp     LB06F                           ; B147 4C 6F B0                 Lo.
; ----------------------------------------------------------------------------
LB14A:  ldx     $A3                             ; B14A A6 A3                    ..
        stx     CursorX                         ; B14C 86 A1                    ..
        ldy     CursorY                         ; B14E A4 A2                    ..
LB150:  dey                                     ; B150 88                       .
        jsr     LB059                           ; B151 20 59 B0                  Y.
        bcs     LB150                           ; B154 B0 FA                    ..
        iny                                     ; B156 C8                       .
        sty     CursorY                         ; B157 84 A2                    ..
        rts                                     ; B159 60                       `
; ----------------------------------------------------------------------------
LB15A:  dec     CursorY                         ; B15A C6 A2                    ..
LB15C:  inc     CursorY                         ; B15C E6 A2                    ..
        ldy     CursorY                         ; B15E A4 A2                    ..
        jsr     LB059                           ; B160 20 59 B0                  Y.
        bcs     LB15C                           ; B163 B0 F7                    ..
        ldx     CurMaxX_                        ; B165 A6 A4                    ..
        stx     CursorX                         ; B167 86 A1                    ..
        bra     LB16E                           ; B169 80 03                    ..
LB16B:  jsr     LAE09                           ; B16B 20 09 AE                  ..
LB16E:  jsr     LAF41                           ; B16E 20 41 AF                  A.
        cmp     #$20                            ; B171 C9 20                    .
        bne     LB17F                           ; B173 D0 0A                    ..
        cpx     $A3                             ; B175 E4 A3                    ..
        bne     LB16B                           ; B177 D0 F2                    ..
        dey                                     ; B179 88                       .
        jsr     LB059                           ; B17A 20 59 B0                  Y.
        bcs     LB16B                           ; B17D B0 EC                    ..
LB17F:  rts                                     ; B17F 60                       `
; ----------------------------------------------------------------------------
LB180:  lda     #$40                            ; B180 A9 40                    .@
        tsb     $AA                             ; B182 04 AA                    ..
        rts                                     ; B184 60                       `
; ----------------------------------------------------------------------------
LB185:  lda     #$40                            ; B185 A9 40                    .@
        trb     $AA                             ; B187 14 AA                    ..
        rts                                     ; B189 60                       `
; ----------------------------------------------------------------------------
LB18A:  jsr     LAEB1                           ; B18A 20 B1 AE                  ..
        jsr     LB15A                           ; B18D 20 5A B1                  Z.
        jsr     LAEBC                           ; B190 20 BC AE                  ..
        bcs     LB19E                           ; B193 B0 09                    ..
        jmp     LAEA6                           ; B195 4C A6 AE                 L..
; ----------------------------------------------------------------------------
LB198:  jsr     LAEB1                           ; B198 20 B1 AE                  ..
        jsr     LB14A                           ; B19B 20 4A B1                  J.
LB19E:  jsr     LAF1A                           ; B19E 20 1A AF                  ..
        jsr     LAEBC                           ; B1A1 20 BC AE                  ..
        bne     LB1A7                           ; B1A4 D0 01                    ..
        rts                                     ; B1A6 60                       `
; ----------------------------------------------------------------------------
LB1A7:  bpl     LB1AE                           ; B1A7 10 05                    ..
        jsr     LADD1                           ; B1A9 20 D1 AD                  ..
        bra     LB19E                           ; B1AC 80 F0                    ..
LB1AE:  jsr     LAE09                           ; B1AE 20 09 AE                  ..
        bra     LB19E                           ; B1B1 80 EB                    ..
LB1B3:  ldx     CursorX                         ; B1B3 A6 A1                    ..
        ldy     CursorY                         ; B1B5 A4 A2                    ..
        stx     $A3                             ; B1B7 86 A3                    ..
        sty     $A5                             ; B1B9 84 A5                    ..
        jmp     LB087                           ; B1BB 4C 87 B0                 L..
; ----------------------------------------------------------------------------
LB1BE:  jsr     LAEB1                           ; B1BE 20 B1 AE                  ..
        ldy     CurMaxY_                        ; B1C1 A4 A6                    ..
        sty     CursorY                         ; B1C3 84 A2                    ..
        jsr     LAF4B                           ; B1C5 20 4B AF                  K.
        bra     LB1D4                           ; B1C8 80 0A                    ..
LB1CA:  jsr     LAEB1                           ; B1CA 20 B1 AE                  ..
        ldy     $A5                             ; B1CD A4 A5                    ..
        sty     CursorY                         ; B1CF 84 A2                    ..
        jsr     LAF89                           ; B1D1 20 89 AF                  ..
LB1D4:  jsr     LB393                           ; B1D4 20 93 B3                  ..
        jmp     LAEA6                           ; B1D7 4C A6 AE                 L..
; ----------------------------------------------------------------------------
LB1DA:  jsr     LB2E4                           ; B1DA 20 E4 B2                  ..
        lda     #$08                            ; B1DD A9 08                    ..
        sta     VidMemHi                        ; B1DF 85 A0                    ..
        ldx     #$28                            ; B1E1 A2 28                    .(
        stx     $0368                           ; B1E3 8E 68 03                 .h.
        ldy     #$10                            ; B1E6 A0 10                    ..
LB1E8:  sty     $0369                           ; B1E8 8C 69 03                 .i.
        lda     #$0F                            ; B1EB A9 0F                    ..
        sta     CurMaxY                         ; B1ED 8D 7E 03                 .~.
        lda     #$4F                            ; B1F0 A9 4F                    .O
        sta     CurMaxX                         ; B1F2 8D 81 03                 ...
        stz     $037F                           ; B1F5 9C 7F 03                 ...
        stz     L0380                           ; B1F8 9C 80 03                 ...
        jsr     LAE5B                           ; B1FB 20 5B AE                  [.
        lda     #$00                            ; B1FE A9 00                    ..
        tax                                     ; B200 AA                       .
        ldy     VidMemHi                        ; B201 A4 A0                    ..
        clc                                     ; B203 18                       .
        jsr     LCDsetupGetOrSet                ; B204 20 28 B2                  (.
        jsr     LAE47                           ; B207 20 47 AE                  G.
        stz     $A7                             ; B20A 64 A7                    d.
        stz     $0382                           ; B20C 9C 82 03                 ...
        stz     $A9                             ; B20F 64 A9                    d.
        stz     $036E                           ; B211 9C 6E 03                 .n.
        stz     $A9                             ; B214 64 A9                    d.
        lda     #$ED                            ; B216 A9 ED                    ..
        sta     $AA                             ; B218 85 AA                    ..
        stz     $036F                           ; B21A 9C 6F 03                 .o.
        jsr     LAD41                           ; B21D 20 41 AD                  A.
LB220:  stz     $A7                             ; B220 64 A7                    d.
        stz     $A8                             ; B222 64 A8                    d.
LB224:  stz     $036C                           ; B224 9C 6C 03                 .l.
        rts                                     ; B227 60                       `
; ----------------------------------------------------------------------------
LCDsetupGetOrSet:
; This routine is called by RESET routine, with carry set.
; It seems it's the only part where locations $FF80 - $FF83 are written.
; $FF80-$FF83 is the write-only registers of the LCD controller.
; It's called first with carry set from $87B5,
; then called second with carry clear from $B204
        php                                     ; B228 08                       .
        sei                                     ; B229 78                       x
        bcc     LCDsetupSet                     ; B22A 90 09                    ..
        lda     $037A                           ; B22C AD 7A 03                 .z.
        ldx     $037B                           ; B22F AE 7B 03                 .{.
        ldy     $037C                           ; B232 AC 7C 03                 .|.
LCDsetupSet:
        and     #$03                            ; B235 29 03                    ).
        sta     $037A                           ; B237 8D 7A 03                 .z.
        stx     $037B                           ; B23A 8E 7B 03                 .{.
        sty     $037C                           ; B23D 8C 7C 03                 .|.
        ora     #$08                            ; B240 09 08                    ..
        sta     LFF82                           ; B242 8D 82 FF                 ...
        sta     LFF83                           ; B245 8D 83 FF                 ...
        stx     LFF80                           ; B248 8E 80 FF                 ...
        tya                                     ; B24B 98                       .
        asl     a                               ; B24C 0A                       .
        sta     KJ_SCINIT                       ; B24D 8D 81 FF                 ...
        lda     $037A                           ; B250 AD 7A 03                 .z.
        plp                                     ; B253 28                       (
        rts                                     ; B254 60                       `
; ----------------------------------------------------------------------------
LB255:  .word   $00A1,$00A2,$00A3,$00A4         ; B255 A1 00 A2 00 A3 00 A4 00  ........
        .word   $00A6,$00A5,$00A7,$037D         ; B25D A6 00 A5 00 A7 00 7D 03  ......}.
        .word   $00A8,$00A9,$00AA,$036F         ; B265 A8 00 A9 00 AA 00 6F 03  ......o.
        .word   $036C,$036D,$036A,$036B         ; B26D 6C 03 6D 03 6A 03 6B 03  l.m.j.k.
        .word   $036E,$0370,$0371,$0372         ; B275 6E 03 70 03 71 03 72 03  n.p.q.r.
        .word   $0373,$0374,$0375,$0376         ; B27D 73 03 74 03 75 03 76 03  s.t.u.v.
        .word   $0377,$0378,$0379,$00A0         ; B285 77 03 78 03 79 03 A0 00  w.x.y...
        .word   $037A,$037B,$037C               ; B28D 7A 03 7B 03 7C 03        z.{.|.
; ----------------------------------------------------------------------------
LB293:  stx     $F1                             ; B293 86 F1                    ..
        sty     $F2                             ; B295 84 F2                    ..
        jsr     LB2E4                           ; B297 20 E4 B2                  ..
        stz     $0382                           ; B29A 9C 82 03                 ...
        lda     #$F1                            ; B29D A9 F1                    ..
        sta     $034E                           ; B29F 8D 4E 03                 .N.
        sta     $0360                           ; B2A2 8D 60 03                 .`.
        ldy     #$00                            ; B2A5 A0 00                    ..
        ldx     #$00                            ; B2A7 A2 00                    ..
LB2A9:  lda     LB255,x                         ; B2A9 BD 55 B2                 .U.
        sta     VidPtrLo                        ; B2AC 85 C1                    ..
        lda     LB255+1,x                       ; B2AE BD 56 B2                 .V.
        sta     VidPtrHi                        ; B2B1 85 C2                    ..
        lda     (VidPtrLo)                      ; B2B3 B2 C1                    ..
        pha                                     ; B2B5 48                       H
        jsr     FROM_C67B                       ; B2B6 20 4A 03                  J.
        sta     (VidPtrLo)                      ; B2B9 92 C1                    ..
        pla                                     ; B2BB 68                       h
        jsr     FROM_C68D                       ; B2BC 20 5C 03                  \.
        iny                                     ; B2BF C8                       .
        inx                                     ; B2C0 E8                       .
        inx                                     ; B2C1 E8                       .
        cpx     #$3E                            ; B2C2 E0 3E                    .>
        bne     LB2A9                           ; B2C4 D0 E3                    ..
LB2C6:  sec                                     ; B2C6 38                       8
        jmp     LCDsetupGetOrSet                ; B2C7 4C 28 B2                 L(.
; ----------------------------------------------------------------------------
LB2CA:  lda     #$80                            ; B2CA A9 80                    ..
        tsb     $036F                           ; B2CC 0C 6F 03                 .o.
        rts                                     ; B2CF 60                       `
; ----------------------------------------------------------------------------
LB2D0:  lda     #$80                            ; B2D0 A9 80                    ..
        trb     $036F                           ; B2D2 1C 6F 03                 .o.
        rts                                     ; B2D5 60                       `
; ----------------------------------------------------------------------------
LB2D6:  jsr     LB2E4                           ; B2D6 20 E4 B2                  ..
        jsr     LAF28                           ; B2D9 20 28 AF                  (.
        lda     (VidPtrLo)                      ; B2DC B2 C1                    ..
        sta     $F0                             ; B2DE 85 F0                    ..
        sec                                     ; B2E0 38                       8
        ror     $EF                             ; B2E1 66 EF                    f.
        rts                                     ; B2E3 60                       `
; ----------------------------------------------------------------------------
LB2E4:  lda     #$FF                            ; B2E4 A9 FF                    ..
        trb     $EF                             ; B2E6 14 EF                    ..
        beq     LB2EE                           ; B2E8 F0 04                    ..
        lda     $F0                             ; B2EA A5 F0                    ..
        sta     (VidPtrLo)                      ; B2EC 92 C1                    ..
LB2EE:  rts                                     ; B2EE 60                       `
; ----------------------------------------------------------------------------
LB2EF:  lda     $0384                           ; B2EF AD 84 03                 ...
        bne     LB318                           ; B2F2 D0 24                    .$
        bit     $EF                             ; B2F4 24 EF                    $.
        bpl     LB318                           ; B2F6 10 20                    .
        dec     $EF                             ; B2F8 C6 EF                    ..
        bmi     LB318                           ; B2FA 30 1C                    0.
        bit     $036F                           ; B2FC 2C 6F 03                 ,o.
        bmi     LB305                           ; B2FF 30 04                    0.
        lda     #$A0                            ; B301 A9 A0                    ..
        sta     $EF                             ; B303 85 EF                    ..
LB305:  lda     $F0                             ; B305 A5 F0                    ..
        cmp     (VidPtrLo)                      ; B307 D2 C1                    ..
        bne     LB316                           ; B309 D0 0B                    ..
        bit     $03FC                           ; B30B 2C FC 03                 ,..
        bpl     LB314                           ; B30E 10 04                    ..
        and     #$80                            ; B310 29 80                    ).
        ora     #$1E                            ; B312 09 1E                    ..
LB314:  eor     #$80                            ; B314 49 80                    I.
LB316:  sta     (VidPtrLo)                      ; B316 92 C1                    ..
LB318:  rts                                     ; B318 60                       `
; ----------------------------------------------------------------------------
LB319:  lda     $80                             ; B319 A5 80                    ..
        tsb     $0382                           ; B31B 0C 82 03                 ...
        bne     LB362                           ; B31E D0 42                    .B
        jsr     LB393                           ; B320 20 93 B3                  ..
        bra     LB349                           ; B323 80 24                    .$
LB325:  lda     #$80                            ; B325 A9 80                    ..
        tsb     $0382                           ; B327 0C 82 03                 ...
        bne     LB362                           ; B32A D0 36                    .6
        jsr     LAEB1                           ; B32C 20 B1 AE                  ..
        stx     $03E8                           ; B32F 8E E8 03                 ...
        sty     $03E9                           ; B332 8C E9 03                 ...
        bra     LB33A                           ; B335 80 03                    ..
LB337:  jsr     LABD6                           ; B337 20 D6 AB                  ..
LB33A:  jsr     LB2D6                           ; B33A 20 D6 B2                  ..
        jsr     LB6DF                           ; B33D 20 DF B6                  ..
        pha                                     ; B340 48                       H
        jsr     LB2E4                           ; B341 20 E4 B2                  ..
        pla                                     ; B344 68                       h
        cmp     #$0D                            ; B345 C9 0D                    ..
        bne     LB337                           ; B347 D0 EE                    ..
LB349:  stz     $A7                             ; B349 64 A7                    d.
        jsr     LB15A                           ; B34B 20 5A B1                  Z.
        jsr     LAEB1                           ; B34E 20 B1 AE                  ..
        ldy     $03E9                           ; B351 AC E9 03                 ...
        bmi     LB35F                           ; B354 30 09                    0.
        sty     CursorY                         ; B356 84 A2                    ..
        ldx     $03E8                           ; B358 AE E8 03                 ...
        stx     CursorX                         ; B35B 86 A1                    ..
        bra     LB362                           ; B35D 80 03                    ..
LB35F:  jsr     LB14A                           ; B35F 20 4A B1                  J.
LB362:  jsr     LAEBC                           ; B362 20 BC AE                  ..
        bcc     LB36E                           ; B365 90 07                    ..
        lda     #$40                            ; B367 A9 40                    .@
        tsb     $0382                           ; B369 0C 82 03                 ...
        bne     LB387                           ; B36C D0 19                    ..
LB36E:  jsr     LAF41                           ; B36E 20 41 AF                  A.
        jsr     LB0B8                           ; B371 20 B8 B0                  ..
        jsr     LB08E                           ; B374 20 8E B0                  ..
        bit     $0382                           ; B377 2C 82 03                 ,..
        bvs     LB383                           ; B37A 70 07                    p.
        pha                                     ; B37C 48                       H
        jsr     LADD1                           ; B37D 20 D1 AD                  ..
        pla                                     ; B380 68                       h
LB381:  clc                                     ; B381 18                       .
        rts                                     ; B382 60                       `
; ----------------------------------------------------------------------------
LB383:  cmp     #$20                            ; B383 C9 20                    .
        bne     LB381                           ; B385 D0 FA                    ..
LB387:  jsr     LB15A                           ; B387 20 5A B1                  Z.
        stz     $A7                             ; B38A 64 A7                    d.
        stz     $0382                           ; B38C 9C 82 03                 ...
        lda     #$0D                            ; B38F A9 0D                    ..
        clc                                     ; B391 18                       .
        rts                                     ; B392 60                       `
; ----------------------------------------------------------------------------
LB393:  stz     $03E9                           ; B393 9C E9 03                 ...
        dec     $03E9                           ; B396 CE E9 03                 ...
        rts                                     ; B399 60                       `
; ----------------------------------------------------------------------------
; My guess: these tables help to decode the keyboard matrix read into actual
; characters. More tables, because of shifted, etc state.
KbdMat1:.byte   $40,$87,$86,$85,$88,$09,$0D,$14 ; B39A 40 87 86 85 88 09 0D 14  @.......
        .byte   $8A,$45,$53,$5A,$34,$41,$57,$33 ; B3A2 8A 45 53 5A 34 41 57 33  .ESZ4AW3
        .byte   $58,$54,$46,$43,$36,$44,$52,$35 ; B3AA 58 54 46 43 36 44 52 35  XTFC6DR5
        .byte   $56,$55,$48,$42,$38,$47,$59,$37 ; B3B2 56 55 48 42 38 47 59 37  VUHB8GY7
        .byte   $4E,$4F,$4B,$4D,$30,$4A,$49,$39 ; B3BA 4E 4F 4B 4D 30 4A 49 39  NOKM0JI9
        .byte   $2C,$2D,$3A,$2E,$91,$4C,$50,$11 ; B3C2 2C 2D 3A 2E 91 4C 50 11  ,-:..LP.
        .byte   $2F,$2B,$3D,$1B,$1D,$3B,$2A,$9D ; B3CA 2F 2B 3D 1B 1D 3B 2A 9D  /+=..;*.
        .byte   $8B,$51,$8C,$20,$32,$89,$13,$31 ; B3D2 8B 51 8C 20 32 89 13 31  .Q. 2..1
KbdMat2:.byte   $BA,$87,$86,$85,$88,$09,$8D,$94 ; B3DA BA 87 86 85 88 09 8D 94  ........
        .byte   $8A,$65,$73,$7A,$24,$61,$77,$23 ; B3E2 8A 65 73 7A 24 61 77 23  .esz$aw#
        .byte   $78,$74,$66,$63,$26,$64,$72,$25 ; B3EA 78 74 66 63 26 64 72 25  xtfc&dr%
        .byte   $76,$75,$68,$62,$28,$67,$79,$27 ; B3F2 76 75 68 62 28 67 79 27  vuhb(gy'
        .byte   $6E,$6F,$6B,$6D,$5E,$6A,$69,$29 ; B3FA 6E 6F 6B 6D 5E 6A 69 29  nokm^ji)
        .byte   $3C,$60,$5B,$3E,$91,$6C,$70,$11 ; B402 3C 60 5B 3E 91 6C 70 11  <`[>.lp.
        .byte   $3F,$7B,$7D,$1B,$1D,$5D,$A9,$9D ; B40A 3F 7B 7D 1B 1D 5D A9 9D  ?{}..]..
        .byte   $8B,$71,$8C,$A0,$22,$89,$93,$21 ; B412 8B 71 8C A0 22 89 93 21  .q.."..!
KbdMat3:.byte   $40,$87,$86,$85,$88,$09,$0D,$14 ; B41A 40 87 86 85 88 09 0D 14  @.......
        .byte   $8A,$65,$73,$7A,$34,$61,$77,$33 ; B422 8A 65 73 7A 34 61 77 33  .esz4aw3
        .byte   $78,$74,$66,$63,$36,$64,$72,$35 ; B42A 78 74 66 63 36 64 72 35  xtfc6dr5
        .byte   $76,$75,$68,$62,$38,$67,$79,$37 ; B432 76 75 68 62 38 67 79 37  vuhb8gy7
        .byte   $6E,$6F,$6B,$6D,$30,$6A,$69,$39 ; B43A 6E 6F 6B 6D 30 6A 69 39  nokm0ji9
        .byte   $2C,$2D,$3A,$2E,$91,$6C,$70,$11 ; B442 2C 2D 3A 2E 91 6C 70 11  ,-:..lp.
        .byte   $2F,$2B,$3D,$1B,$1D,$3B,$2A,$9D ; B44A 2F 2B 3D 1B 1D 3B 2A 9D  /+=..;*.
        .byte   $8B,$71,$8C,$20,$32,$89,$13,$31 ; B452 8B 71 8C 20 32 89 13 31  .q. 2..1
KbdMat4:.byte   $BA,$87,$86,$85,$88,$09,$8D,$94 ; B45A BA 87 86 85 88 09 8D 94  ........
        .byte   $8A,$B1,$AE,$AD,$24,$B0,$B3,$23 ; B462 8A B1 AE AD 24 B0 B3 23  ....$..#
        .byte   $BD,$A3,$BB,$BC,$26,$AC,$B2,$25 ; B46A BD A3 BB BC 26 AC B2 25  ....&..%
        .byte   $BE,$B8,$B4,$BF,$28,$A5,$B7,$27 ; B472 BE B8 B4 BF 28 A5 B7 27  ....(..'
        .byte   $AA,$B9,$A1,$A7,$5F,$B5,$A2,$29 ; B47A AA B9 A1 A7 5F B5 A2 29  ...._..)
        .byte   $2C,$5C,$A6,$2E,$91,$B6,$AF,$11 ; B482 2C 5C A6 2E 91 B6 AF 11  ,\......
        .byte   $A4,$7C,$FF,$1B,$1D,$A8,$7F,$9D ; B48A A4 7C FF 1B 1D A8 7F 9D  .|......
        .byte   $8B,$AB,$8A,$A0                 ; B492 8B AB 8A A0              ....
LB496:  .byte   $32,$89,$93,$31                 ; B496 32 89 93 31              2..1
KbdMat5:.byte   $80,$87,$86,$85,$88,$09,$0D,$14 ; B49A 80 87 86 85 88 09 0D 14  ........
        .byte   $8A,$05,$13,$1A,$34,$01,$17,$33 ; B4A2 8A 05 13 1A 34 01 17 33  ....4..3
        .byte   $18,$14,$06,$03,$36,$04,$12,$35 ; B4AA 18 14 06 03 36 04 12 35  ....6..5
        .byte   $16,$15,$08,$02,$38,$07,$19,$37 ; B4B2 16 15 08 02 38 07 19 37  ....8..7
        .byte   $0E,$0F,$0B,$0D,$1E,$0A,$09,$39 ; B4BA 0E 0F 0B 0D 1E 0A 09 39  .......9
        .byte   $12,$1C,$1B,$92,$91,$0C,$10,$11 ; B4C2 12 1C 1B 92 91 0C 10 11  ........
        .byte   $1F,$2B,$3D,$1B,$1D,$1D,$2A,$9D ; B4CA 1F 2B 3D 1B 1D 1D 2A 9D  .+=...*.
        .byte   $8B,$11,$8C,$20,$32,$89,$13,$31 ; B4D2 8B 11 8C 20 32 89 13 31  ... 2..1
; ----------------------------------------------------------------------------
LB4DA:  lda     #$09                            ; B4DA A9 09                    ..
        sta     $03F6                           ; B4DC 8D F6 03                 ...
        lda     #$1E                            ; B4DF A9 1E                    ..
        sta     $0367                           ; B4E1 8D 67 03                 .g.
        lda     #$01                            ; B4E4 A9 01                    ..
        sta     $0366                           ; B4E6 8D 66 03                 .f.
        sta     $0365                           ; B4E9 8D 65 03                 .e.
        lda     #$FF                            ; B4EC A9 FF                    ..
        sta     $038E                           ; B4EE 8D 8E 03                 ...
        lda     #$87                            ; B4F1 A9 87                    ..
        sta     L0336                           ; B4F3 8D 36 03                 .6.
        lda     #$FA                            ; B4F6 A9 FA                    ..
        sta     $0337                           ; B4F8 8D 37 03                 .7.
LB4FB:  php                                     ; B4FB 08                       .
        sei                                     ; B4FC 78                       x
        stz     $03F7                           ; B4FD 9C F7 03                 ...
        stz     $03F8                           ; B500 9C F8 03                 ...
        stz     $03F9                           ; B503 9C F9 03                 ...
        plp                                     ; B506 28                       (
        rts                                     ; B507 60                       `
; ----------------------------------------------------------------------------
KL_SCNKEY:
        lda     $F4                             ; B508 A5 F4                    ..
        beq     LB54C                           ; B50A F0 40                    .@
        dec     $F4                             ; B50C C6 F4                    ..
        lda     $AB                             ; B50E A5 AB                    ..
        and     #$07                            ; B510 29 07                    ).
        tax                                     ; B512 AA                       .
        lda     PowersOfTwo,x                   ; B513 BD 41 B0                 .A.
        eor     #$FF                            ; B516 49 FF                    I.
        sta     VIA1_PORTA                      ; B518 8D 01 F8                 ...
        lda     $AB                             ; B51B A5 AB                    ..
        lsr     a                               ; B51D 4A                       J
        lsr     a                               ; B51E 4A                       J
        lsr     a                               ; B51F 4A                       J
        tay                                     ; B520 A8                       .
        jsr     KBD_READ_VIA_SR                 ; B521 20 E4 B5                  ..
        and     PowersOfTwo,y                   ; B524 39 41 B0                 9A.
        beq     LB52E                           ; B527 F0 05                    ..
        lda     $0365                           ; B529 AD 65 03                 .e.
        sta     $F4                             ; B52C 85 F4                    ..
LB52E:  lda     $AB                             ; B52E A5 AB                    ..
        eor     #$07                            ; B530 49 07                    I.
        tax                                     ; B532 AA                       .
        lda     KbdMat1,x                       ; B533 BD 9A B3                 ...
        cmp     #$85                            ; B536 C9 85                    ..
        bcc     LB53E                           ; B538 90 04                    ..
        cmp     #$8D                            ; B53A C9 8D                    ..
        bcc     LB549                           ; B53C 90 0B                    ..
LB53E:  dec     $F5                             ; B53E C6 F5                    ..
        bpl     LB549                           ; B540 10 07                    ..
        lda     $0366                           ; B542 AD 66 03                 .f.
        sta     $F5                             ; B545 85 F5                    ..
        bne     LB585                           ; B547 D0 3C                    .<
LB549:  jmp     LB5FD                           ; B549 4C FD B5                 L..
; ----------------------------------------------------------------------------
LB54C:  lda     #$00                            ; B54C A9 00                    ..
        sta     VIA1_PORTA                      ; B54E 8D 01 F8                 ...
        jsr     KBD_READ_VIA_SR                 ; B551 20 E4 B5                  ..
        beq     LB549                           ; B554 F0 F3                    ..
        ldx     #$07                            ; B556 A2 07                    ..
LB558:  lda     PowersOfTwo,x                   ; B558 BD 41 B0                 .A.
        eor     #$FF                            ; B55B 49 FF                    I.
        sta     VIA1_PORTA                      ; B55D 8D 01 F8                 ...
        jsr     KBD_READ_VIA_SR                 ; B560 20 E4 B5                  ..
        bne     LB56A                           ; B563 D0 05                    ..
        dex                                     ; B565 CA                       .
        bpl     LB558                           ; B566 10 F0                    ..
        bra     LB549                           ; B568 80 DF                    ..
LB56A:  ldy     #$FF                            ; B56A A0 FF                    ..
LB56C:  iny                                     ; B56C C8                       .
        lsr     a                               ; B56D 4A                       J
        bcc     LB56C                           ; B56E 90 FC                    ..
        tya                                     ; B570 98                       .
        asl     a                               ; B571 0A                       .
        asl     a                               ; B572 0A                       .
        asl     a                               ; B573 0A                       .
        dec     a                               ; B574 3A                       :
LB575:  inc     a                               ; B575 1A                       .
        dex                                     ; B576 CA                       .
        bpl     LB575                           ; B577 10 FC                    ..
        sta     $AB                             ; B579 85 AB                    ..
LB57C           := * + 1
        lda     $0365                           ; B57B AD 65 03                 .e.
LB57F           := * + 1
        sta     $F4                             ; B57E 85 F4                    ..
        lda     $0367                           ; B580 AD 67 03                 .g.
        sta     $F5                             ; B583 85 F5                    ..
LB585:  lda     $AB                             ; B585 A5 AB                    ..
        eor     #$07                            ; B587 49 07                    I.
        tax                                     ; B589 AA                       .
LB58B           := * + 1
        jsr     LB5FD                           ; B58A 20 FD B5                  ..
        and     #$08                            ; B58D 29 08                    ).
        beq     LB5AC                           ; B58F F0 1B                    ..
        lda     #$02                            ; B591 A9 02                    ..
        and     $AA                             ; B593 25 AA                    %.
        beq     LB5AC                           ; B595 F0 15                    ..
        ldy     KbdMat1,x                       ; B597 BC 9A B3                 ...
        cpy     #$51                            ; B59A C0 51                    .Q
        bne     LB5A3                           ; B59C D0 05                    ..
        trb     $036D                           ; B59E 1C 6D 03                 .m.
        bra     LB5E1                           ; B5A1 80 3E                    .>
LB5A3:  cpy     #$53                            ; B5A3 C0 53                    .S
        bne     LB5AC                           ; B5A5 D0 05                    ..
        tsb     $036D                           ; B5A7 0C 6D 03                 .m.
        bra     LB5E1                           ; B5AA 80 35                    .5
LB5AC:  lda     StopKeyFlag                     ; B5AC A5 AD                    ..
        and     $038E                           ; B5AE 2D 8E 03                 -..
        ldy     KbdMat5,x                       ; B5B1 BC 9A B4                 ...
        bit     #$08                            ; B5B4 89 08                    ..
        bne     LB5D0                           ; B5B6 D0 18                    ..
        ldy     KbdMat4,x                       ; B5B8 BC 5A B4                 .Z.
        bit     #$10                            ; B5BB 89 10                    ..
        bne     LB5D0                           ; B5BD D0 11                    ..
        ldy     KbdMat2,x                       ; B5BF BC DA B3                 ...
        bit     #$04                            ; B5C2 89 04                    ..
        bne     LB5D0                           ; B5C4 D0 0A                    ..
        ldy     KbdMat3,x                       ; B5C6 BC 1A B4                 ...
        bit     #$02                            ; B5C9 89 02                    ..
        bne     LB5D0                           ; B5CB D0 03                    ..
        ldy     KbdMat1,x                       ; B5CD BC 9A B3                 ...
LB5D0:  tya                                     ; B5D0 98                       .
        ldy     $03FA                           ; B5D1 AC FA 03                 ...
LB5D4:  bne     LB5E1                           ; B5D4 D0 0B                    ..
        ldy     KbdMat1,x                       ; B5D6 BC 9A B3                 ...
        jsr     LFA84                           ; B5D9 20 84 FA                  ..
LB5DC:  sta     $AC                             ; B5DC 85 AC                    ..
        jsr     LB640                           ; B5DE 20 40 B6                  @.
LB5E1:  jmp     LBFBE                           ; B5E1 4C BE BF                 L..
; ----------------------------------------------------------------------------
KBD_READ_VIA_SR:
; It seems, CLCD's kbd is read through VIA's SR ... Interesting.
; AFAIK, port B of VIA is mainly used by IEC bus, but bit 0 for example seems
; to trigger (0->1) the keyboard "controller" to provide bits through serial
; transfer in SR-in.
        lda     VIA1_PORTB                      ; B5E4 AD 00 F8                 ...
        and     #$FE                            ; B5E7 29 FE                    ).
        sta     VIA1_PORTB                      ; B5E9 8D 00 F8                 ...
        inc     VIA1_PORTB                      ; B5EC EE 00 F8                 ...
        lda     VIA1_SR                         ; B5EF AD 0A F8                 ...
LB5F2:  lda     #$04                            ; B5F2 A9 04                    ..
LB5F4:  bit     VIA1_IFR                        ; B5F4 2C 0D F8                 ,..
        beq     LB5F4                           ; B5F7 F0 FB                    ..
        lda     VIA1_SR                         ; B5F9 AD 0A F8                 ...
        rts                                     ; B5FC 60                       `
; ----------------------------------------------------------------------------
LB5FD:  jsr     LB5F2                           ; B5FD 20 F2 B5                  ..
        sta     StopKeyFlag                     ; B600 85 AD                    ..
LB602:  and     #$14                            ; B602 29 14                    ).
        eor     #$14                            ; B604 49 14                    I.
        ora     $03FB                           ; B606 0D FB 03                 ...
        bne     LB613                           ; B609 D0 08                    ..
        jsr     LACEE                           ; B60B 20 EE AC                  ..
        lda     #$3C                            ; B60E A9 3C                    .<
        sta     $03FB                           ; B610 8D FB 03                 ...
LB613:  dec     $03FB                           ; B613 CE FB 03                 ...
        bpl     LB61B                           ; B616 10 03                    ..
        stz     $03FB                           ; B618 9C FB 03                 ...
LB61B:  lda     #$02                            ; B61B A9 02                    ..
        trb     StopKeyFlag                     ; B61D 14 AD                    ..
        beq     LB62F                           ; B61F F0 0E                    ..
        lda     $03FC                           ; B621 AD FC 03                 ...
        bit     #$40                            ; B624 89 40                    .@
        bne     LB634                           ; B626 D0 0C                    ..
        eor     #$C0                            ; B628 49 C0                    I.
        sta     $03FC                           ; B62A 8D FC 03                 ...
        bra     LB634                           ; B62D 80 05                    ..
LB62F:  lda     #$40                            ; B62F A9 40                    .@
        trb     $03FC                           ; B631 1C FC 03                 ...
LB634:  bit     $03FC                           ; B634 2C FC 03                 ,..
        bpl     LB63D                           ; B637 10 04                    ..
        lda     #$02                            ; B639 A9 02                    ..
        tsb     StopKeyFlag                     ; B63B 04 AD                    ..
LB63D:  lda     StopKeyFlag                     ; B63D A5 AD                    ..
        rts                                     ; B63F 60                       `
; ----------------------------------------------------------------------------
LB640:  php                                     ; B640 08                       .
        sei                                     ; B641 78                       x
        phx                                     ; B642 DA                       .
        ldx     $03F7                           ; B643 AE F7 03                 ...
        dex                                     ; B646 CA                       .
        bpl     LB64C                           ; B647 10 03                    ..
        ldx     $03F6                           ; B649 AE F6 03                 ...
LB64C:
LB64D           := * + 1
        cpx     $03F8                           ; B64C EC F8 03                 ...
        bne     LB655                           ; B64F D0 04                    ..
        plx                                     ; B651 FA                       .
        plp                                     ; B652 28                       (
        sec                                     ; B653 38                       8
        rts                                     ; B654 60                       `
; ----------------------------------------------------------------------------
LB655:  and     #$FF                            ; B655 29 FF                    ).
        beq     LB668                           ; B657 F0 0F                    ..
LB659:  ldx     $03F7                           ; B659 AE F7 03                 ...
        sta     $03EC,x                         ; B65C 9D EC 03                 ...
        dex                                     ; B65F CA                       .
        bpl     LB665                           ; B660 10 03                    ..
        ldx     $03F6                           ; B662 AE F6 03                 ...
LB665:  stx     $03F7                           ; B665 8E F7 03                 ...
LB668:  plx                                     ; B668 FA                       .
        plp                                     ; B669 28                       (
        clc                                     ; B66A 18                       .
        rts                                     ; B66B 60                       `
; ----------------------------------------------------------------------------
LB66C:  ldx     $03F8                           ; B66C AE F8 03                 ...
        lda     #$00                            ; B66F A9 00                    ..
        cpx     $03F7                           ; B671 EC F7 03                 ...
        beq     LB683                           ; B674 F0 0D                    ..
        lda     $03EC,x                         ; B676 BD EC 03                 ...
        dex                                     ; B679 CA                       .
        bpl     LB67F                           ; B67A 10 03                    ..
        ldx     $03F6                           ; B67C AE F6 03                 ...
LB67F:  stx     $03F8                           ; B67F 8E F8 03                 ...
        clc                                     ; B682 18                       .
LB683:  rts                                     ; B683 60                       `
; ----------------------------------------------------------------------------
LB684:  sta     $03F9                           ; B684 8D F9 03                 ...
        rts                                     ; B687 60                       `
; ----------------------------------------------------------------------------
LB688:  phx                                     ; B688 DA                       .
        phy                                     ; B689 5A                       Z
        lda     $03F9                           ; B68A AD F9 03                 ...
        stz     $03F9                           ; B68D 9C F9 03                 ...
        bne     LB6D1                           ; B690 D0 3F                    .?
        ldx     #$0C                            ; B692 A2 0C                    ..
        jsr     LD230                           ; B694 20 30 D2                  0.
        tax                                     ; B697 AA                       .
        bne     LB6D1                           ; B698 D0 37                    .7
        jsr     LB66C                           ; B69A 20 6C B6                  l.
        bcc     LB6C7                           ; B69D 90 28                    .(
        lda     #$0E                            ; B69F A9 0E                    ..
LB6A1:  jsr     L8C40                           ; B6A1 20 40 8C                  @.
        bcc     LB6C0                           ; B6A4 90 1A                    ..
        rol     $03FA                           ; B6A6 2E FA 03                 ...
        lda     StopKeyFlag                     ; B6A9 A5 AD                    ..
        lsr     a                               ; B6AB 4A                       J
        bcs     LB6BD                           ; B6AC B0 0F                    ..
        jsr     L8B46                           ; B6AE 20 46 8B                  F.
        bcc     LB6BD                           ; B6B1 90 0A                    ..
        bit     $039D                           ; B6B3 2C 9D 03                 ,..
        bpl     LB6BB                           ; B6B6 10 03                    ..
        jsr     L8C89                           ; B6B8 20 89 8C                  ..
LB6BB:  bra     LB6C7                           ; B6BB 80 0A                    ..
LB6BD:  jsr     L8C89                           ; B6BD 20 89 8C                  ..
LB6C0:  stz     $03FA                           ; B6C0 9C FA 03                 ...
LB6C3:  lda     #$00                            ; B6C3 A9 00                    ..
        bra     LB6D9                           ; B6C5 80 12                    ..
LB6C7:  ldx     #$0A                            ; B6C7 A2 0A                    ..
        jsr     LD230                           ; B6C9 20 30 D2                  0.
        ldx     #$0C                            ; B6CC A2 0C                    ..
        jsr     LD230                           ; B6CE 20 30 D2                  0.
LB6D1:  tax                                     ; B6D1 AA                       .
        beq     LB6D9                           ; B6D2 F0 05                    ..
        pha                                     ; B6D4 48                       H
        jsr     LBFBE                           ; B6D5 20 BE BF                  ..
        pla                                     ; B6D8 68                       h
LB6D9:  ply                                     ; B6D9 7A                       z
        plx                                     ; B6DA FA                       .
        cmp     #$00                            ; B6DB C9 00                    ..
        clc                                     ; B6DD 18                       .
        rts                                     ; B6DE 60                       `
; ----------------------------------------------------------------------------
LB6DF:  jsr     LBFF2                           ; B6DF 20 F2 BF                  ..
        jsr     LB688                           ; B6E2 20 88 B6                  ..
        beq     LB6DF                           ; B6E5 F0 F8                    ..
        rts                                     ; B6E7 60                       `
; ----------------------------------------------------------------------------
LB6E8:  lda     StopKeyFlag                     ; B6E8 A5 AD                    ..
        eor     #$01                            ; B6EA 49 01                    I.
        and     #$01                            ; B6EC 29 01                    ).
        bne     LB6F8                           ; B6EE D0 08                    ..
        php                                     ; B6F0 08                       .
        jsr     LFD2A                           ; B6F1 20 2A FD                  *.
        jsr     LB4FB                           ; B6F4 20 FB B4                  ..
        plp                                     ; B6F7 28                       (
LB6F8:  rts                                     ; B6F8 60                       `
; ----------------------------------------------------------------------------
LB6F9:  bcc     LB710                           ; B6F9 90 15                    ..
        sta     $03FD                           ; B6FB 8D FD 03                 ...
        txa                                     ; B6FE 8A                       .
        lsr     a                               ; B6FF 4A                       J
        clc                                     ; B700 18                       .
        cld                                     ; B701 D8                       .
        adc     VidMemHi                        ; B702 65 A0                    e.
        sta     $BE                             ; B704 85 BE                    ..
        txa                                     ; B706 8A                       .
LB707:  lsr     a                               ; B707 4A                       J
        tya                                     ; B708 98                       .
        bcc     LB70D                           ; B709 90 02                    ..
        ora     #$80                            ; B70B 09 80                    ..
LB70D:  sta     $BD                             ; B70D 85 BD                    ..
        rts                                     ; B70F 60                       `
; ----------------------------------------------------------------------------
LB710:  phx                                     ; B710 DA                       .
        phy                                     ; B711 5A                       Z
        .byte   $AE                             ; B712 AE                       .
        .byte   $FD                             ; B713 FD                       .
LB714:  .byte   $03                             ; B714 03                       .
        beq     LB754                           ; B715 F0 3D                    .=
        cpx     #$80                            ; B717 E0 80                    ..
        .byte   $F0                             ; B719 F0                       .
LB71A:  and     $0DC9,y                         ; B71A 39 C9 0D                 9..
        bne     LB729                           ; B71D D0 0A                    ..
LB71F:  lda     #$20                            ; B71F A9 20                    .
LB721:  clc                                     ; B721 18                       .
        jsr     LB6F9                           ; B722 20 F9 B6                  ..
        bcc     LB71F                           ; B725 90 F8                    ..
        bra     LB754                           ; B727 80 2B                    .+
LB729:  cmp     #$12                            ; B729 C9 12                    ..
        bne     LB734                           ; B72B D0 07                    ..
        lda     #$80                            ; B72D A9 80                    ..
        tsb     $03FD                           ; B72F 0C FD 03                 ...
        bra     LB750                           ; B732 80 1C                    ..
LB734:  cmp     #$92                            ; B734 C9 92                    ..
        bne     LB73F                           ; B736 D0 07                    ..
        lda     #$80                            ; B738 A9 80                    ..
        trb     $03FD                           ; B73A 1C FD 03                 ...
        bra     LB750                           ; B73D 80 11                    ..
LB73F:  dec     $03FD                           ; B73F CE FD 03                 ...
        jsr     LB09B                           ; B742 20 9B B0                  ..
        bit     $03FD                           ; B745 2C FD 03                 ,..
        bpl     LB74C                           ; B748 10 02                    ..
        eor     #$80                            ; B74A 49 80                    I.
LB74C:  sta     ($BD)                           ; B74C 92 BD                    ..
        inc     $BD                             ; B74E E6 BD                    ..
LB750:  clc                                     ; B750 18                       .
        ply                                     ; B751 7A                       z
        plx                                     ; B752 FA                       .
        rts                                     ; B753 60                       `
; ----------------------------------------------------------------------------
LB754:  sec                                     ; B754 38                       8
        ply                                     ; B755 7A                       z
        plx                                     ; B756 FA                       .
        rts                                     ; B757 60                       `
; ----------------------------------------------------------------------------
LB758:  cpx     #$00                            ; B758 E0 00                    ..
        beq     LB760                           ; B75A F0 04                    ..
        sta     $B0                             ; B75C 85 B0                    ..
        stx     $B1                             ; B75E 86 B1                    ..
LB760:  .byte   $A0                             ; B760 A0                       .
LB761:  brk                                     ; B761 00                       .
        lda     ($B0),y                         ; B762 B1 B0                    ..
        tax                                     ; B764 AA                       .
        iny                                     ; B765 C8                       .
        lda     ($B0),y                         ; B766 B1 B0                    ..
        asl     a                               ; B768 0A                       .
        sta     $F6                             ; B769 85 F6                    ..
        txa                                     ; B76B 8A                       .
        lsr     a                               ; B76C 4A                       J
        tax                                     ; B76D AA                       .
        ror     $F6                             ; B76E 66 F6                    f.
        adc     VidMemHi                        ; B770 65 A0                    e.
        sta     $F7                             ; B772 85 F7                    ..
        iny                                     ; B774 C8                       .
        lda     ($B0),y                         ; B775 B1 B0                    ..
        sta     $03FE                           ; B777 8D FE 03                 ...
        iny                                     ; B77A C8                       .
        lda     ($B0),y                         ; B77B B1 B0                    ..
        sta     $03FF                           ; B77D 8D FF 03                 ...
LB780:  iny                                     ; B780 C8                       .
        lda     ($B0),y                         ; B781 B1 B0                    ..
        sta     $0400                           ; B783 8D 00 04                 ...
        ldx     #$00                            ; B786 A2 00                    ..
LB788:  lda     L0470,x                         ; B788 BD 70 04                 .p.
        beq     LB799                           ; B78B F0 0C                    ..
        cpx     $03FE                           ; B78D EC FE 03                 ...
        beq     LB795                           ; B790 F0 03                    ..
        inx                                     ; B792 E8                       .
        bne     LB788                           ; B793 D0 F3                    ..
LB795:  sec                                     ; B795 38                       8
        lda     #$00                            ; B796 A9 00                    ..
        rts                                     ; B798 60                       `
; ----------------------------------------------------------------------------
LB799:  stx     $0403                           ; B799 8E 03 04                 ...
        stx     $0402                           ; B79C 8E 02 04                 ...
        jsr     LB8B3                           ; B79F 20 B3 B8                  ..
        lda     $0400                           ; B7A2 AD 00 04                 ...
LB7A5:  and     #$02                            ; B7A5 29 02                    ).
LB7A7:  beq     LB7AB                           ; B7A7 F0 02                    ..
        clc                                     ; B7A9 18                       .
        rts                                     ; B7AA 60                       `
; ----------------------------------------------------------------------------
LB7AB:  jsr     LB903                           ; B7AB 20 03 B9                  ..
LB7AE:  jsr     LBFF2                           ; B7AE 20 F2 BF                  ..
        jsr     LB688                           ; B7B1 20 88 B6                  ..
        bne     LB7BE                           ; B7B4 D0 08                    ..
        lda     StopKeyFlag                     ; B7B6 A5 AD                    ..
        and     #$01                            ; B7B8 29 01                    ).
        beq     LB7AE                           ; B7BA F0 F2                    ..
        lda     #$03                            ; B7BC A9 03                    ..
LB7BE:  sta     $0401                           ; B7BE 8D 01 04                 ...
        ldy     #$05                            ; B7C1 A0 05                    ..
LB7C3:  lda     ($B0),y                         ; B7C3 B1 B0                    ..
        beq     LB7DE                           ; B7C5 F0 17                    ..
        cmp     $0401                           ; B7C7 CD 01 04                 ...
        beq     LB7CF                           ; B7CA F0 03                    ..
        iny                                     ; B7CC C8                       .
        .byte   $D0                             ; B7CD D0                       .
LB7CE:  .byte   $F4                             ; B7CE F4                       .
LB7CF:  pha                                     ; B7CF 48                       H
        jsr     LB8B3                           ; B7D0 20 B3 B8                  ..
        ldx     $0402                           ; B7D3 AE 02 04                 ...
        lda     #$00                            ; B7D6 A9 00                    ..
        sta     L0470,x                         ; B7D8 9D 70 04                 .p.
        pla                                     ; B7DB 68                       h
        clc                                     ; B7DC 18                       .
        rts                                     ; B7DD 60                       `
; ----------------------------------------------------------------------------
LB7DE:  tax                                     ; B7DE AA                       .
        lda     $0401                           ; B7DF AD 01 04                 ...
LB7E2:  cmp     LB7F4,x                         ; B7E2 DD F4 B7                 ...
        beq     LB7EE                           ; B7E5 F0 07                    ..
        inx                                     ; B7E7 E8                       .
        cpx     #$06                            ; B7E8 E0 06                    ..
        bne     LB7E2                           ; B7EA D0 F6                    ..
        beq     LB80C                           ; B7EC F0 1E                    ..
LB7EE:  jsr     LB806                           ; B7EE 20 06 B8                  ..
        jmp     LB7AB                           ; B7F1 4C AB B7                 L..
; ----------------------------------------------------------------------------
LB7F4:  sty     $14,x                           ; B7F4 94 14                    ..
        ora     L939D,x                         ; B7F6 1D 9D 93                 ...
        .byte   $8D                             ; B7F9 8D                       .
LB7FA:  eor     $B8                             ; B7FA 45 B8                    E.
        jmp     (L89B8)                         ; B7FC 6C B8 89                 l..
; ----------------------------------------------------------------------------
        clv                                     ; B7FF B8                       .
        smb1    $B8                             ; B800 97 B8                    ..
        ldx     #$B8                            ; B802 A2 B8                    ..
        .byte   $AD                             ; B804 AD                       .
        clv                                     ; B805 B8                       .
LB806:  txa                                     ; B806 8A                       .
        asl     a                               ; B807 0A                       .
        tax                                     ; B808 AA                       .
        jmp     (LB7FA,x)                       ; B809 7C FA B7                 |..
LB80C:  tax                                     ; B80C AA                       .
        and     #$7F                            ; B80D 29 7F                    ).
        cmp     #$20                            ; B80F C9 20                    .
        bcc     LB7AE                           ; B811 90 9B                    ..
        txa                                     ; B813 8A                       .
        ldx     $0403                           ; B814 AE 03 04                 ...
        sta     L0470,x                         ; B817 9D 70 04                 .p.
        cpx     $0402                           ; B81A EC 02 04                 ...
        bne     LB82A                           ; B81D D0 0B                    ..
        ldx     $0402                           ; B81F AE 02 04                 ...
        cpx     $03FE                           ; B822 EC FE 03                 ...
        beq     LB82E                           ; B825 F0 07                    ..
        inc     $0402                           ; B827 EE 02 04                 ...
LB82A:  inx                                     ; B82A E8                       .
        stx     $0403                           ; B82B 8E 03 04                 ...
LB82E:  lda     $0400                           ; B82E AD 00 04                 ...
        and     #$01                            ; B831 29 01                    ).
        beq     LB83F                           ; B833 F0 0A                    ..
        cpx     $03FE                           ; B835 EC FE 03                 ...
        bne     LB83F                           ; B838 D0 05                    ..
        lda     #$00                            ; B83A A9 00                    ..
        jmp     LB7CF                           ; B83C 4C CF B7                 L..
; ----------------------------------------------------------------------------
LB83F:  jsr     LB8B3                           ; B83F 20 B3 B8                  ..
        jmp     LB7AB                           ; B842 4C AB B7                 L..
; ----------------------------------------------------------------------------
LB845:  ldx     $0402                           ; B845 AE 02 04                 ...
        cpx     $03FE                           ; B848 EC FE 03                 ...
        beq     LB869                           ; B84B F0 1C                    ..
        cpx     $0403                           ; B84D EC 03 04                 ...
        beq     LB869                           ; B850 F0 17                    ..
LB852:  lda     L0470,x                         ; B852 BD 70 04                 .p.
        sta     $0471,x                         ; B855 9D 71 04                 .q.
        cpx     $0403                           ; B858 EC 03 04                 ...
        beq     LB861                           ; B85B F0 04                    ..
        dex                                     ; B85D CA                       .
        jmp     LB852                           ; B85E 4C 52 B8                 LR.
; ----------------------------------------------------------------------------
LB861:  lda     #$20                            ; B861 A9 20                    .
        sta     L0470,x                         ; B863 9D 70 04                 .p.
        inc     $0402                           ; B866 EE 02 04                 ...
LB869:  jmp     LB8B3                           ; B869 4C B3 B8                 L..
; ----------------------------------------------------------------------------
        ldx     $0403                           ; B86C AE 03 04                 ...
        beq     LB886                           ; B86F F0 15                    ..
        dec     $0403                           ; B871 CE 03 04                 ...
        dex                                     ; B874 CA                       .
LB875:  lda     $0471,x                         ; B875 BD 71 04                 .q.
        sta     L0470,x                         ; B878 9D 70 04                 .p.
        cpx     $0402                           ; B87B EC 02 04                 ...
        beq     LB883                           ; B87E F0 03                    ..
        inx                                     ; B880 E8                       .
        bne     LB875                           ; B881 D0 F2                    ..
LB883:  dec     $0402                           ; B883 CE 02 04                 ...
LB886:  jmp     LB8B3                           ; B886 4C B3 B8                 L..
; ----------------------------------------------------------------------------
        lda     $0403                           ; B889 AD 03 04                 ...
        cmp     $0402                           ; B88C CD 02 04                 ...
        beq     LB894                           ; B88F F0 03                    ..
        .byte   $EE                             ; B891 EE                       .
LB892:  .byte   $03                             ; B892 03                       .
        .byte   $04                             ; B893 04                       .
LB894:  jmp     LB8B3                           ; B894 4C B3 B8                 L..
; ----------------------------------------------------------------------------
        lda     $0403                           ; B897 AD 03 04                 ...
        beq     LB89F                           ; B89A F0 03                    ..
        dec     $0403                           ; B89C CE 03 04                 ...
LB89F:  jmp     LB8B3                           ; B89F 4C B3 B8                 L..
; ----------------------------------------------------------------------------
        lda     #$00                            ; B8A2 A9 00                    ..
LB8A4:  .byte   $8D                             ; B8A4 8D                       .
LB8A5:  .byte   $02                             ; B8A5 02                       .
        tsb     $8D                             ; B8A6 04 8D                    ..
LB8A8:  .byte   $03                             ; B8A8 03                       .
        tsb     $4C                             ; B8A9 04 4C                    .L
        .byte   $B3                             ; B8AB B3                       .
        clv                                     ; B8AC B8                       .
LB8AD:  lda     $0403                           ; B8AD AD 03 04                 ...
        jmp     LB8A4                           ; B8B0 4C A4 B8                 L..
; ----------------------------------------------------------------------------
LB8B3:  .byte   $20                             ; B8B3 20
LB8B4:  cpx     $B2                             ; B8B4 E4 B2                    ..
        ldy     #$00                            ; B8B6 A0 00                    ..
        ldx     #$00                            ; B8B8 A2 00                    ..
        lda     $0403                           ; B8BA AD 03 04                 ...
        sec                                     ; B8BD 38                       8
        sbc     $03FF                           ; B8BE ED FF 03                 ...
        .byte   $90                             ; B8C1 90                       .
LB8C2:  php                                     ; B8C2 08                       .
        tax                                     ; B8C3 AA                       .
        lda     $03FF                           ; B8C4 AD FF 03                 ...
        sbc     #$01                            ; B8C7 E9 01                    ..
        bne     LB8CE                           ; B8C9 D0 03                    ..
LB8CB:  lda     $0403                           ; B8CB AD 03 04                 ...
LB8CE:  sta     $0404                           ; B8CE 8D 04 04                 ...
LB8D1:  .byte   $EC                             ; B8D1 EC                       .
LB8D2:  .byte   $02                             ; B8D2 02                       .
        tsb     $F0                             ; B8D3 04 F0                    ..
        ora     $70BD,x                         ; B8D5 1D BD 70                 ..p
        tsb     $DA                             ; B8D8 04 DA                    ..
        jsr     LB09B                           ; B8DA 20 9B B0                  ..
        plx                                     ; B8DD FA                       .
        sta     $0401                           ; B8DE 8D 01 04                 ...
        lda     $0400                           ; B8E1 AD 00 04                 ...
        and     #$80                            ; B8E4 29 80                    ).
        ora     $0401                           ; B8E6 0D 01 04                 ...
LB8E9:  sta     ($F6),y                         ; B8E9 91 F6                    ..
        inx                                     ; B8EB E8                       .
        iny                                     ; B8EC C8                       .
        cpy     $03FF                           ; B8ED CC FF 03                 ...
        bne     LB8D1                           ; B8F0 D0 DF                    ..
        rts                                     ; B8F2 60                       `
; ----------------------------------------------------------------------------
LB8F3:  lda     $0400                           ; B8F3 AD 00 04                 ...
        and     #$80                            ; B8F6 29 80                    ).
        ora     #$20                            ; B8F8 09 20                    .
LB8FA:  sta     ($F6),y                         ; B8FA 91 F6                    ..
        iny                                     ; B8FC C8                       .
        cpy     $03FF                           ; B8FD CC FF 03                 ...
        .byte   $D0                             ; B900 D0                       .
LB901:  sed                                     ; B901 F8                       .
        rts                                     ; B902 60                       `
; ----------------------------------------------------------------------------
LB903:  ldy     #$00                            ; B903 A0 00                    ..
        lda     ($B0),y                         ; B905 B1 B0                    ..
        tax                                     ; B907 AA                       .
        iny                                     ; B908 C8                       .
        lda     ($B0),y                         ; B909 B1 B0                    ..
        clc                                     ; B90B 18                       .
        .byte   $6D                             ; B90C 6D                       m
        .byte   $04                             ; B90D 04                       .
LB90E:  tsb     $A8                             ; B90E 04 A8                    ..
        clc                                     ; B910 18                       .
        jsr     PLOT_                           ; B911 20 01 FE                  ..
        jsr     LB2D6                           ; B914 20 D6 B2                  ..
        rts                                     ; B917 60                       `
; ----------------------------------------------------------------------------
LB918:  lda     $0385                           ; B918 AD 85 03                 ...
        and     #$1F                            ; B91B 29 1F                    ).
        bne     CHRIN__                         ; B91D D0 06                    ..
        .byte   $4C                             ; B91F 4C                       L
LB920:  dey                                     ; B920 88                       .
        .byte   $B6                             ; B921 B6                       .
LB922:  ply                                     ; B922 7A                       z
        plx                                     ; B923 FA                       .
LB924:  rts                                     ; B924 60                       `
; ----------------------------------------------------------------------------
CHRIN__:phx                                     ; B925 DA                       .
        phy                                     ; B926 5A                       Z
        lda     #$B9                            ; B927 A9 B9                    ..
        pha                                     ; B929 48                       H
        lda     #$21                            ; B92A A9 21                    .!
        pha                                     ; B92C 48                       H
        lda     $0385                           ; B92D AD 85 03                 ...
        and     #$1F                            ; B930 29 1F                    ).
        bne     LB937                           ; B932 D0 03                    ..
        jmp     LB325                           ; B934 4C 25 B3                 L%.
; ----------------------------------------------------------------------------
LB937:  cmp     #$02                            ; B937 C9 02                    ..
        bne     LB948                           ; B939 D0 0D                    ..
        .byte   $20                             ; B93B 20
LB93C:  asl     $48BF,x                         ; B93C 1E BF 48                 ..H
        lda     LFS2ndAddr                      ; B93F A5 C4                    ..
        and     #$0F                            ; B941 29 0F                    ).
        tax                                     ; B943 AA                       .
        pla                                     ; B944 68                       h
        jmp     LC3CB                           ; B945 4C CB C3                 L..
; ----------------------------------------------------------------------------
LB948:  bcs     LB94D                           ; B948 B0 03                    ..
        jmp     L8B3A                           ; B94A 4C 3A 8B                 L:.
; ----------------------------------------------------------------------------
LB94D:  cmp     #$03                            ; B94D C9 03                    ..
        .byte   $D0                             ; B94F D0                       .
LB950:  .byte   $03                             ; B950 03                       .
        .byte   $4C                             ; B951 4C                       L
LB952:  .byte   $19                             ; B952 19                       .
        .byte   $B3                             ; B953 B3                       .
LB954:  cmp     #$1E                            ; B954 C9 1E                    ..
        bne     LB95B                           ; B956 D0 03                    ..
        jmp     LBC5F                           ; B958 4C 5F BC                 L_.
; ----------------------------------------------------------------------------
LB95B:  bcc     LB960                           ; B95B 90 03                    ..
        jmp     LC2AD                           ; B95D 4C AD C2                 L..
; ----------------------------------------------------------------------------
LB960:  lda     ST                              ; B960 A5 BA                    ..
        bne     LB968                           ; B962 D0 04                    ..
        sec                                     ; B964 38                       8
        jmp     IECIN__                         ; B965 4C A5 BD                 L..
; ----------------------------------------------------------------------------
LB968:  lda     #$0D                            ; B968 A9 0D                    ..
        clc                                     ; B96A 18                       .
        rts                                     ; B96B 60                       `
; ----------------------------------------------------------------------------
CHROUT__:
        phx                                     ; B96C DA                       .
        phy                                     ; B96D 5A                       Z
        ldx     #$B9                            ; B96E A2 B9                    ..
        phx                                     ; B970 DA                       .
        ldx     #$21                            ; B971 A2 21                    .!
        phx                                     ; B973 DA                       .
LB974:  pha                                     ; B974 48                       H
        lda     L0386                           ; B975 AD 86 03                 ...
        and     #$1F                            ; B978 29 1F                    ).
        tax                                     ; B97A AA                       .
        pla                                     ; B97B 68                       h
LB97D           := * + 1
        cpx     #$01                            ; B97C E0 01                    ..
        bne     LB983                           ; B97E D0 03                    ..
        jmp     L8BAA                           ; B980 4C AA 8B                 L..
; ----------------------------------------------------------------------------
LB983:  bcs     LB988                           ; B983 B0 03                    ..
LB985:  jmp     ShowChar_                       ; B985 4C B3 AB                 L..
; ----------------------------------------------------------------------------
LB988:  cpx     #$03                            ; B988 E0 03                    ..
        beq     LB985                           ; B98A F0 F9                    ..
        bcs     LB994                           ; B98C B0 06                    ..
        jsr     LB9B0                           ; B98E 20 B0 B9                  ..
        jmp     LBF0C                           ; B991 4C 0C BF                 L..
; ----------------------------------------------------------------------------
LB994:  cpx     #$1E                            ; B994 E0 1E                    ..
        bne     LB9A7                           ; B996 D0 0F                    ..
        ldx     LFS2ndAddr                      ; B998 A6 C4                    ..
        pha                                     ; B99A 48                       H
        lda     LFS2ndAddr                      ; B99B A5 C4                    ..
        and     #$0F                            ; B99D 29 0F                    ).
        tax                                     ; B99F AA                       .
        pla                                     ; B9A0 68                       h
        jsr     LB9B0                           ; B9A1 20 B0 B9                  ..
        jmp     LC38C                           ; B9A4 4C 8C C3                 L..
; ----------------------------------------------------------------------------
LB9A7:  bcc     LB9AC                           ; B9A7 90 03                    ..
        jmp     LC271                           ; B9A9 4C 71 C2                 Lq.
; ----------------------------------------------------------------------------
LB9AC:  sec                                     ; B9AC 38                       8
        jmp     IECOUT__                        ; B9AD 4C 6C BD                 Ll.
; ----------------------------------------------------------------------------
LB9B0:  pha                                     ; B9B0 48                       H
LB9B1:  lda     LFS2ndAddr                      ; B9B1 A5 C4                    ..
        and     #$0F                            ; B9B3 29 0F                    ).
        tax                                     ; B9B5 AA                       .
        pla                                     ; B9B6 68                       h
        jmp     LC3D1                           ; B9B7 4C D1 C3                 L..
; ----------------------------------------------------------------------------
CHKIN__:jsr     LBAB5                           ; B9BA 20 B5 BA                  ..
        beq     LB9C2                           ; B9BD F0 03                    ..
        jmp     LBC56                           ; B9BF 4C 56 BC                 LV.
; ----------------------------------------------------------------------------
LB9C2:  jsr     LBAC4                           ; B9C2 20 C4 BA                  ..
        beq     LB9DC                           ; B9C5 F0 15                    ..
        cmp     #$1E                            ; B9C7 C9 1E                    ..
        bcs     LB9DC                           ; B9C9 B0 11                    ..
        cmp     #$01                            ; B9CB C9 01                    ..
        beq     LB9FE                           ; B9CD F0 2F                    ./
        cmp     #$03                            ; B9CF C9 03                    ..
        beq     LB9DC                           ; B9D1 F0 09                    ..
        bcs     LB9E1                           ; B9D3 B0 0C                    ..
        jsr     LBF4D                           ; B9D5 20 4D BF                  M.
        bcs     LB9E0                           ; B9D8 B0 06                    ..
        lda     LFSDevNum                       ; B9DA A5 C5                    ..
LB9DC:  sta     $0385                           ; B9DC 8D 85 03                 ...
        clc                                     ; B9DF 18                       .
LB9E0:  rts                                     ; B9E0 60                       `
; ----------------------------------------------------------------------------
LB9E1:  tax                                     ; B9E1 AA                       .
        jsr     SendTalk                        ; B9E2 20 91 BC                  ..
        bit     ST                              ; B9E5 24 BA                    $.
        bmi     LB9FB                           ; B9E7 30 12                    0.
        lda     LFS2ndAddr                      ; B9E9 A5 C4                    ..
        bpl     LB9F3                           ; B9EB 10 06                    ..
        jsr     LBD5B                           ; B9ED 20 5B BD                  [.
        jmp     LB9F6                           ; B9F0 4C F6 B9                 L..
; ----------------------------------------------------------------------------
LB9F3:  jsr     TALKSA__                        ; B9F3 20 55 BD                  U.
LB9F6:  txa                                     ; B9F6 8A                       .
        bit     ST                              ; B9F7 24 BA                    $.
        bpl     LB9DC                           ; B9F9 10 E1                    ..
LB9FB:  jmp     LBC5C                           ; B9FB 4C 5C BC                 L\.
; ----------------------------------------------------------------------------
LB9FE:  jsr     L9962                           ; B9FE 20 62 99                  b.
        bcc     LB9DC                           ; BA01 90 D9                    ..
        bra     LB9FB                           ; BA03 80 F6                    ..
CHKOUT__:
        jsr     LBAB5                           ; BA05 20 B5 BA                  ..
        beq     LBA0D                           ; BA08 F0 03                    ..
        jmp     LBC56                           ; BA0A 4C 56 BC                 LV.
; ----------------------------------------------------------------------------
LBA0D:  jsr     LBAC4                           ; BA0D 20 C4 BA                  ..
        bne     LBA15                           ; BA10 D0 03                    ..
        jmp     LBC62                           ; BA12 4C 62 BC                 Lb.
; ----------------------------------------------------------------------------
LBA15:  cmp     #$1E                            ; BA15 C9 1E                    ..
        bcs     LBA32                           ; BA17 B0 19                    ..
        cmp     #$02                            ; BA19 C9 02                    ..
        beq     LBA2B                           ; BA1B F0 0E                    ..
        bcs     LBA25                           ; BA1D B0 06                    ..
        jsr     L9962                           ; BA1F 20 62 99                  b.
        bcc     LBA32                           ; BA22 90 0E                    ..
        rts                                     ; BA24 60                       `
; ----------------------------------------------------------------------------
LBA25:  cmp     #$03                            ; BA25 C9 03                    ..
        beq     LBA32                           ; BA27 F0 09                    ..
        bne     LBA37                           ; BA29 D0 0C                    ..
LBA2B:  jsr     LBF4D                           ; BA2B 20 4D BF                  M.
        bcs     LBA36                           ; BA2E B0 06                    ..
        lda     LFSDevNum                       ; BA30 A5 C5                    ..
LBA32:  sta     L0386                           ; BA32 8D 86 03                 ...
        clc                                     ; BA35 18                       .
LBA36:  rts                                     ; BA36 60                       `
; ----------------------------------------------------------------------------
LBA37:  tax                                     ; BA37 AA                       .
        jsr     LISTEN__                        ; BA38 20 94 BC                  ..
        bit     ST                              ; BA3B 24 BA                    $.
        bmi     LBA50                           ; BA3D 30 11                    0.
        lda     LFS2ndAddr                      ; BA3F A5 C4                    ..
        bpl     LBA48                           ; BA41 10 05                    ..
        jsr     PORT1B_RESET_BIT3               ; BA43 20 4C BD                  L.
        bne     LBA4B                           ; BA46 D0 03                    ..
LBA48:  jsr     LSTNSA__                        ; BA48 20 46 BD                  F.
LBA4B:  txa                                     ; BA4B 8A                       .
        bit     ST                              ; BA4C 24 BA                    $.
        bpl     LBA32                           ; BA4E 10 E2                    ..
LBA50:  jmp     LBC5C                           ; BA50 4C 5C BC                 L\.
; ----------------------------------------------------------------------------
CLOSE__:ror     $0407                           ; BA53 6E 07 04                 n..
        jsr     LBAB8                           ; BA56 20 B8 BA                  ..
        beq     LBA5D                           ; BA59 F0 02                    ..
        clc                                     ; BA5B 18                       .
        rts                                     ; BA5C 60                       `
; ----------------------------------------------------------------------------
LBA5D:  jsr     LBAC4                           ; BA5D 20 C4 BA                  ..
        txa                                     ; BA60 8A                       .
        pha                                     ; BA61 48                       H
        lda     LFSDevNum                       ; BA62 A5 C5                    ..
        beq     LBA94                           ; BA64 F0 2E                    ..
        cmp     #$1E                            ; BA66 C9 1E                    ..
        bcs     LBA94                           ; BA68 B0 2A                    .*
        cmp     #$03                            ; BA6A C9 03                    ..
        beq     LBA94                           ; BA6C F0 26                    .&
        bcs     LBA7E                           ; BA6E B0 0E                    ..
        cmp     #$02                            ; BA70 C9 02                    ..
        bne     LBA79                           ; BA72 D0 05                    ..
        jsr     LC0E8                           ; BA74 20 E8 C0                  ..
        bra     LBA94                           ; BA77 80 1B                    ..
LBA79:  jsr     L9214                           ; BA79 20 14 92                  ..
        bra     LBA94                           ; BA7C 80 16                    ..
LBA7E:  bit     $0407                           ; BA7E 2C 07 04                 ,..
        bpl     LBA91                           ; BA81 10 0E                    ..
        lda     LFSDevNum                       ; BA83 A5 C5                    ..
        cmp     #$08                            ; BA85 C9 08                    ..
        bcc     LBA91                           ; BA87 90 08                    ..
        lda     LFS2ndAddr                      ; BA89 A5 C4                    ..
        and     #$0F                            ; BA8B 29 0F                    ).
        cmp     #$0F                            ; BA8D C9 0F                    ..
        beq     LBA94                           ; BA8F F0 03                    ..
LBA91:  jsr     LBC36                           ; BA91 20 36 BC                  6.
LBA94:  pla                                     ; BA94 68                       h
        tax                                     ; BA95 AA                       .
        dec     $0405                           ; BA96 CE 05 04                 ...
        cpx     $0405                           ; BA99 EC 05 04                 ...
        beq     LBAB3                           ; BA9C F0 15                    ..
        ldy     $0405                           ; BA9E AC 05 04                 ...
        lda     $02DB,y                         ; BAA1 B9 DB 02                 ...
        sta     $02DB,x                         ; BAA4 9D DB 02                 ...
        lda     $02E7,y                         ; BAA7 B9 E7 02                 ...
        sta     $02E7,x                         ; BAAA 9D E7 02                 ...
        lda     $02F3,y                         ; BAAD B9 F3 02                 ...
        sta     $02F3,x                         ; BAB0 9D F3 02                 ...
LBAB3:  clc                                     ; BAB3 18                       .
        rts                                     ; BAB4 60                       `
; ----------------------------------------------------------------------------
LBAB5:  stz     ST                              ; BAB5 64 BA                    d.
        txa                                     ; BAB7 8A                       .
LBAB8:  ldx     $0405                           ; BAB8 AE 05 04                 ...
LBABB:  dex                                     ; BABB CA                       .
        bmi     LBAD3                           ; BABC 30 15                    0.
        cmp     $02DB,x                         ; BABE DD DB 02                 ...
        bne     LBABB                           ; BAC1 D0 F8                    ..
        rts                                     ; BAC3 60                       `
; ----------------------------------------------------------------------------
LBAC4:  lda     $02DB,x                         ; BAC4 BD DB 02                 ...
        sta     LFSLogNum                       ; BAC7 85 C6                    ..
        lda     $02F3,x                         ; BAC9 BD F3 02                 ...
        sta     LFS2ndAddr                      ; BACC 85 C4                    ..
        lda     $02E7,x                         ; BACE BD E7 02                 ...
        sta     LFSDevNum                       ; BAD1 85 C5                    ..
LBAD3:  rts                                     ; BAD3 60                       `
; ----------------------------------------------------------------------------
LBAD4:  stz     $0405                           ; BAD4 9C 05 04                 ...
CLRCHN__:
        ldx     #$03                            ; BAD7 A2 03                    ..
        cpx     L0386                           ; BAD9 EC 86 03                 ...
        bcs     LBAE1                           ; BADC B0 03                    ..
        jsr     UNLSTN__                        ; BADE 20 90 BD                  ..
LBAE1:  cpx     $0385                           ; BAE1 EC 85 03                 ...
        bcs     LBAE9                           ; BAE4 B0 03                    ..
        jsr     UNTALK__                        ; BAE6 20 81 BD                  ..
LBAE9:  stx     L0386                           ; BAE9 8E 86 03                 ...
        stz     $0385                           ; BAEC 9C 85 03                 ...
        rts                                     ; BAEF 60                       `
; ----------------------------------------------------------------------------
Open__: ldx     LFSLogNum                       ; BAF0 A6 C6                    ..
        jsr     LBAB5                           ; BAF2 20 B5 BA                  ..
        bne     LBAFA                           ; BAF5 D0 03                    ..
        jmp     LBC53                           ; BAF7 4C 53 BC                 LS.
; ----------------------------------------------------------------------------
LBAFA:  ldx     $0405                           ; BAFA AE 05 04                 ...
        cpx     #$0C                            ; BAFD E0 0C                    ..
        bcc     LBB04                           ; BAFF 90 03                    ..
        jmp     LBC50                           ; BB01 4C 50 BC                 LP.
; ----------------------------------------------------------------------------
LBB04:  inc     $0405                           ; BB04 EE 05 04                 ...
        lda     LFSLogNum                       ; BB07 A5 C6                    ..
        sta     $02DB,x                         ; BB09 9D DB 02                 ...
        lda     LFS2ndAddr                      ; BB0C A5 C4                    ..
        ora     #$60                            ; BB0E 09 60                    .`
        sta     LFS2ndAddr                      ; BB10 85 C4                    ..
        sta     $02F3,x                         ; BB12 9D F3 02                 ...
        lda     LFSDevNum                       ; BB15 A5 C5                    ..
        sta     $02E7,x                         ; BB17 9D E7 02                 ...
        beq     LBB2F                           ; BB1A F0 13                    ..
        cmp     #$1E                            ; BB1C C9 1E                    ..
        beq     LBB2F                           ; BB1E F0 0F                    ..
        bcc     LBB25                           ; BB20 90 03                    ..
        jmp     LC219                           ; BB22 4C 19 C2                 L..
; ----------------------------------------------------------------------------
LBB25:  cmp     #$03                            ; BB25 C9 03                    ..
        beq     LBB2F                           ; BB27 F0 06                    ..
        bcc     LBB31                           ; BB29 90 06                    ..
        sec                                     ; BB2B 38                       8
        jsr     LBB40                           ; BB2C 20 40 BB                  @.
LBB2F:  clc                                     ; BB2F 18                       .
        rts                                     ; BB30 60                       `
; ----------------------------------------------------------------------------
LBB31:  cmp     #$02                            ; BB31 C9 02                    ..
        bne     LBB3B                           ; BB33 D0 06                    ..
        jsr     LBE52                           ; BB35 20 52 BE                  R.
        jmp     LC082                           ; BB38 4C 82 C0                 L..
; ----------------------------------------------------------------------------
LBB3B:  jmp     L9243                           ; BB3B 4C 43 92                 LC.
; ----------------------------------------------------------------------------
LBB3E:  clc                                     ; BB3E 18                       .
        rts                                     ; BB3F 60                       `
; ----------------------------------------------------------------------------
LBB40:  lda     LFS2ndAddr                      ; BB40 A5 C4                    ..
        bmi     LBB3E                           ; BB42 30 FA                    0.
        ldy     FNlength                        ; BB44 AC 87 03                 ...
        beq     LBB3E                           ; BB47 F0 F5                    ..
        stz     ST                              ; BB49 64 BA                    d.
        lda     LFSDevNum                       ; BB4B A5 C5                    ..
        jsr     LISTEN__                        ; BB4D 20 94 BC                  ..
        bit     ST                              ; BB50 24 BA                    $.
        bmi     LBB5F                           ; BB52 30 0B                    0.
        lda     LFS2ndAddr                      ; BB54 A5 C4                    ..
        ora     #$F0                            ; BB56 09 F0                    ..
        jsr     LSTNSA__                        ; BB58 20 46 BD                  F.
        lda     ST                              ; BB5B A5 BA                    ..
        bpl     LBB64                           ; BB5D 10 05                    ..
LBB5F:  pla                                     ; BB5F 68                       h
        pla                                     ; BB60 68                       h
        jmp     LBC5C                           ; BB61 4C 5C BC                 L\.
; ----------------------------------------------------------------------------
LBB64:  lda     FNlength                        ; BB64 AD 87 03                 ...
        beq     LBB7C                           ; BB67 F0 13                    ..
        ldy     #$00                            ; BB69 A0 00                    ..
LBB6B:  lda     #$AE                            ; BB6B A9 AE                    ..
        sta     $034E                           ; BB6D 8D 4E 03                 .N.
        jsr     FROM_C67B                       ; BB70 20 4A 03                  J.
        jsr     IECOUT__                        ; BB73 20 6C BD                  l.
        iny                                     ; BB76 C8                       .
        cpy     FNlength                        ; BB77 CC 87 03                 ...
        bne     LBB6B                           ; BB7A D0 EF                    ..
LBB7C:  jmp     LBC48                           ; BB7C 4C 48 BC                 LH.
; ----------------------------------------------------------------------------
; Maybe typo? :) Or it's only my English ... "SAVEING" ...
LBB7F:  jsr     ShowInLineText80                ; BB7F 20 56 FB                  V.
        .byte   "SAVEING "                      ; BB82 53 41 56 45 49 4E 47 20  SAVEING
        .byte   $00                             ; BB8A 00                       .
; ----------------------------------------------------------------------------
        bra     LBB9F                           ; BB8B 80 12                    ..
LBB8D:  jsr     ShowInLineText80                ; BB8D 20 56 FB                  V.
        .byte   "SEARCHING FOR "                ; BB90 53 45 41 52 43 48 49 4E  SEARCHIN
                                                ; BB98 47 20 46 4F 52 20        G FOR
        .byte   $00                             ; BB9E 00                       .
; ----------------------------------------------------------------------------
LBB9F:  bit     KernMsg                         ; BB9F 2C 83 03                 ,..
        bpl     LBBBF                           ; BBA2 10 1B                    ..
        ldy     FNlength                        ; BBA4 AC 87 03                 ...
        beq     LBBBC                           ; BBA7 F0 13                    ..
        ldy     #$00                            ; BBA9 A0 00                    ..
LBBAB:  lda     #$AE                            ; BBAB A9 AE                    ..
        sta     $034E                           ; BBAD 8D 4E 03                 .N.
        jsr     FROM_C67B                       ; BBB0 20 4A 03                  J.
        jsr     ShowChar_                       ; BBB3 20 B3 AB                  ..
        iny                                     ; BBB6 C8                       .
        cpy     FNlength                        ; BBB7 CC 87 03                 ...
        bne     LBBAB                           ; BBBA D0 EF                    ..
LBBBC:  jmp     PrintNewLine                    ; BBBC 4C D3 CA                 L..
; ----------------------------------------------------------------------------
LBBBF:  rts                                     ; BBBF 60                       `
; ----------------------------------------------------------------------------
LBBC0:  lda     LFSDevNum                       ; BBC0 A5 C5                    ..
        bne     LBBC7                           ; BBC2 D0 03                    ..
LBBC4:  jmp     LBC68                           ; BBC4 4C 68 BC                 Lh.
; ----------------------------------------------------------------------------
LBBC7:  cmp     #$03                            ; BBC7 C9 03                    ..
        beq     LBBC4                           ; BBC9 F0 F9                    ..
        cmp     #$02                            ; BBCB C9 02                    ..
        beq     LBBC4                           ; BBCD F0 F5                    ..
        ldy     FNlength                        ; BBCF AC 87 03                 ...
        bne     LBBD7                           ; BBD2 D0 03                    ..
        jmp     LBC65                           ; BBD4 4C 65 BC                 Le.
; ----------------------------------------------------------------------------
LBBD7:  cmp     #$01                            ; BBD7 C9 01                    ..
        bne     LBBE1                           ; BBD9 D0 06                    ..
        jsr     LBB7F                           ; BBDB 20 7F BB                  ..
        jmp     L9085                           ; BBDE 4C 85 90                 L..
; ----------------------------------------------------------------------------
LBBE1:  lda     #$61                            ; BBE1 A9 61                    .a
        sta     LFS2ndAddr                      ; BBE3 85 C4                    ..
        jsr     LBB40                           ; BBE5 20 40 BB                  @.
        jsr     LBB7F                           ; BBE8 20 7F BB                  ..
        lda     LFSDevNum                       ; BBEB A5 C5                    ..
        jsr     LISTEN__                        ; BBED 20 94 BC                  ..
        lda     LFS2ndAddr                      ; BBF0 A5 C4                    ..
        jsr     LSTNSA__                        ; BBF2 20 46 BD                  F.
        ldy     #$00                            ; BBF5 A0 00                    ..
        lda     $B7                             ; BBF7 A5 B7                    ..
        sta     $B9                             ; BBF9 85 B9                    ..
        lda     $B6                             ; BBFB A5 B6                    ..
        sta     $B8                             ; BBFD 85 B8                    ..
        lda     $B8                             ; BBFF A5 B8                    ..
        jsr     IECOUT__                        ; BC01 20 6C BD                  l.
        lda     $B9                             ; BC04 A5 B9                    ..
        jsr     IECOUT__                        ; BC06 20 6C BD                  l.
LBC09:  sec                                     ; BC09 38                       8
        lda     $B8                             ; BC0A A5 B8                    ..
        sbc     $B2                             ; BC0C E5 B2                    ..
        lda     $B9                             ; BC0E A5 B9                    ..
        sbc     $B3                             ; BC10 E5 B3                    ..
        bcs     LBC33                           ; BC12 B0 1F                    ..
        lda     #$B8                            ; BC14 A9 B8                    ..
        sta     $034E                           ; BC16 8D 4E 03                 .N.
        jsr     FROM_C67B                       ; BC19 20 4A 03                  J.
        jsr     IECOUT__                        ; BC1C 20 6C BD                  l.
        jsr     LFDB9                           ; BC1F 20 B9 FD                  ..
        bne     LBC2B                           ; BC22 D0 07                    ..
        jsr     LBC36                           ; BC24 20 36 BC                  6.
        lda     #$00                            ; BC27 A9 00                    ..
        sec                                     ; BC29 38                       8
        rts                                     ; BC2A 60                       `
; ----------------------------------------------------------------------------
LBC2B:  inc     $B8                             ; BC2B E6 B8                    ..
        bne     LBC09                           ; BC2D D0 DA                    ..
        inc     $B9                             ; BC2F E6 B9                    ..
        bne     LBC09                           ; BC31 D0 D6                    ..
LBC33:  jsr     UNLSTN__                        ; BC33 20 90 BD                  ..
LBC36:  bit     LFS2ndAddr                      ; BC36 24 C4                    $.
        bmi     LBC4B                           ; BC38 30 11                    0.
        lda     LFSDevNum                       ; BC3A A5 C5                    ..
        jsr     LISTEN__                        ; BC3C 20 94 BC                  ..
        lda     LFS2ndAddr                      ; BC3F A5 C4                    ..
        and     #$EF                            ; BC41 29 EF                    ).
        ora     #$E0                            ; BC43 09 E0                    ..
        jsr     LSTNSA__                        ; BC45 20 46 BD                  F.
LBC48:  jsr     UNLSTN__                        ; BC48 20 90 BD                  ..
LBC4B:  clc                                     ; BC4B 18                       .
        rts                                     ; BC4C 60                       `
; ----------------------------------------------------------------------------
LBC4D:  lda     #$00                            ; BC4D A9 00                    ..
        .byte   $2C                             ; BC4F 2C                       ,
LBC50:  lda     #$01                            ; BC50 A9 01                    ..
        .byte   $2C                             ; BC52 2C                       ,
LBC53:  lda     #$02                            ; BC53 A9 02                    ..
        .byte   $2C                             ; BC55 2C                       ,
LBC56:  lda     #$03                            ; BC56 A9 03                    ..
        .byte   $2C                             ; BC58 2C                       ,
LBC59:  lda     #$04                            ; BC59 A9 04                    ..
        .byte   $2C                             ; BC5B 2C                       ,
LBC5C:  lda     #$05                            ; BC5C A9 05                    ..
        .byte   $2C                             ; BC5E 2C                       ,
LBC5F:  lda     #$06                            ; BC5F A9 06                    ..
        .byte   $2C                             ; BC61 2C                       ,
LBC62:  lda     #$07                            ; BC62 A9 07                    ..
        .byte   $2C                             ; BC64 2C                       ,
LBC65:  lda     #$08                            ; BC65 A9 08                    ..
        .byte   $2C                             ; BC67 2C                       ,
LBC68:  lda     #$09                            ; BC68 A9 09                    ..
        .byte   $2C                             ; BC6A 2C                       ,
LBC6B:  lda     #$0A                            ; BC6B A9 0A                    ..
        pha                                     ; BC6D 48                       H
        jsr     LFD2A                           ; BC6E 20 2A FD                  *.
        bit     KernMsg                         ; BC71 2C 83 03                 ,..
        bvc     LBC8E                           ; BC74 50 18                    P.
        jsr     ShowInLineText                  ; BC76 20 5B FB                  [.
        .byte   $0D                             ; BC79 0D                       .
        .byte   "I/O ERROR #"                   ; BC7A 49 2F 4F 20 45 52 52 4F  I/O ERRO
                                                ; BC82 52 20 23                 R #
        .byte   $00                             ; BC85 00                       .
; ----------------------------------------------------------------------------
        pla                                     ; BC86 68                       h
        pha                                     ; BC87 48                       H
        jsr     L8850                           ; BC88 20 50 88                  P.
        jsr     PrintNewLine                    ; BC8B 20 D3 CA                  ..
LBC8E:  pla                                     ; BC8E 68                       h
        sec                                     ; BC8F 38                       8
        rts                                     ; BC90 60                       `
; ----------------------------------------------------------------------------
SendTalk:
        ora     #$40                            ; BC91 09 40                    .@
        .byte   $2C                             ; BC93 2C                       ,
LISTEN__:
        ora     #$20                            ; BC94 09 20                    .
; This routine seems to be used to send out a byte on the IEC bus.
LBC96:  pha                                     ; BC96 48                       H
        bit     $040B                           ; BC97 2C 0B 04                 ,..
        bpl     LBCA9                           ; BC9A 10 0D                    ..
        sec                                     ; BC9C 38                       8
        ror     $040A                           ; BC9D 6E 0A 04                 n..
        jsr     LBCCA                           ; BCA0 20 CA BC                  ..
        lsr     $040B                           ; BCA3 4E 0B 04                 N..
        lsr     $040A                           ; BCA6 4E 0A 04                 N..
LBCA9:  pla                                     ; BCA9 68                       h
        sta     $0408                           ; BCAA 8D 08 04                 ...
        sei                                     ; BCAD 78                       x
        jsr     PORT1B_RESET_BIT5               ; BCAE 20 2C BE                  ,.
        cmp     #$3F                            ; BCB1 C9 3F                    .?
        bne     LBCB8                           ; BCB3 D0 03                    ..
        jsr     PORT1B_RESET_BIT4               ; BCB5 20 1A BE                  ..
LBCB8:  lda     VIA1_PORTB                      ; BCB8 AD 00 F8                 ...
        ora     #$08                            ; BCBB 09 08                    ..
        sta     VIA1_PORTB                      ; BCBD 8D 00 F8                 ...
LBCC0:  sei                                     ; BCC0 78                       x
        jsr     PORT1B_SET_BIT4                 ; BCC1 20 23 BE                  #.
        jsr     PORT1B_RESET_BIT5               ; BCC4 20 2C BE                  ,.
        jsr     LBE4A                           ; BCC7 20 4A BE                  J.
LBCCA:  sei                                     ; BCCA 78                       x
        jsr     PORT1B_RESET_BIT5               ; BCCB 20 2C BE                  ,.
        jsr     PORT1B_WAIT_CHANGE              ; BCCE 20 3E BE                  >.
        bcs     LBD3A                           ; BCD1 B0 67                    .g
        jsr     PORT1B_RESET_BIT4               ; BCD3 20 1A BE                  ..
        bit     VIA1_PORTB                      ; BCD6 2C 00 F8                 ,..
        bvs     LBD3A                           ; BCD9 70 5F                    p_
        bit     $040A                           ; BCDB 2C 0A 04                 ,..
        bpl     LBCEA                           ; BCDE 10 0A                    ..
LBCE0:  jsr     PORT1B_WAIT_CHANGE              ; BCE0 20 3E BE                  >.
        bcc     LBCE0                           ; BCE3 90 FB                    ..
LBCE5:  jsr     PORT1B_WAIT_CHANGE              ; BCE5 20 3E BE                  >.
        bcs     LBCE5                           ; BCE8 B0 FB                    ..
LBCEA:  jsr     PORT1B_WAIT_CHANGE              ; BCEA 20 3E BE                  >.
        bcc     LBCEA                           ; BCED 90 FB                    ..
        jsr     PORT1B_SET_BIT4                 ; BCEF 20 23 BE                  #.
        lda     #$08                            ; BCF2 A9 08                    ..
        sta     $040C                           ; BCF4 8D 0C 04                 ...
LBCF7:  lda     VIA1_PORTB                      ; BCF7 AD 00 F8                 ...
        cmp     VIA1_PORTB                      ; BCFA CD 00 F8                 ...
        bne     LBCF7                           ; BCFD D0 F8                    ..
        eor     #$C0                            ; BCFF 49 C0                    I.
        asl     a                               ; BD01 0A                       .
        bcc     LBD3D                           ; BD02 90 39                    .9
        ror     $0408                           ; BD04 6E 08 04                 n..
        bcs     LBD0E                           ; BD07 B0 05                    ..
        jsr     PORT1B_SET_BIT5                 ; BD09 20 35 BE                  5.
        bne     LBD11                           ; BD0C D0 03                    ..
LBD0E:  jsr     PORT1B_RESET_BIT5               ; BD0E 20 2C BE                  ,.
LBD11:  jsr     PORT1B_RESET_BIT4               ; BD11 20 1A BE                  ..
        nop                                     ; BD14 EA                       .
        nop                                     ; BD15 EA                       .
        nop                                     ; BD16 EA                       .
        nop                                     ; BD17 EA                       .
        lda     VIA1_PORTB                      ; BD18 AD 00 F8                 ...
        and     #$DF                            ; BD1B 29 DF                    ).
        ora     #$10                            ; BD1D 09 10                    ..
        sta     VIA1_PORTB                      ; BD1F 8D 00 F8                 ...
        dec     $040C                           ; BD22 CE 0C 04                 ...
        bne     LBCF7                           ; BD25 D0 D0                    ..
        lda     #$04                            ; BD27 A9 04                    ..
        sta     VIA1_T2CH                       ; BD29 8D 09 F8                 ...
LBD2C:  lda     VIA1_IFR                        ; BD2C AD 0D F8                 ...
        and     #$20                            ; BD2F 29 20                    )
        bne     LBD3D                           ; BD31 D0 0A                    ..
        jsr     PORT1B_WAIT_CHANGE              ; BD33 20 3E BE                  >.
        bcs     LBD2C                           ; BD36 B0 F4                    ..
        cli                                     ; BD38 58                       X
        rts                                     ; BD39 60                       `
; ----------------------------------------------------------------------------
LBD3A:  lda     #$80                            ; BD3A A9 80                    ..
        .byte   $2C                             ; BD3C 2C                       ,
LBD3D:  lda     #$03                            ; BD3D A9 03                    ..
LBD3F:  jsr     SetST                           ; BD3F 20 CA FC                  ..
        cli                                     ; BD42 58                       X
        clc                                     ; BD43 18                       .
        bcc     LBD95                           ; BD44 90 4F                    .O
LSTNSA__:
        sta     $0408                           ; BD46 8D 08 04                 ...
        jsr     LBCC0                           ; BD49 20 C0 BC                  ..
PORT1B_RESET_BIT3:
        lda     VIA1_PORTB                      ; BD4C AD 00 F8                 ...
        and     #$F7                            ; BD4F 29 F7                    ).
        sta     VIA1_PORTB                      ; BD51 8D 00 F8                 ...
        rts                                     ; BD54 60                       `
; ----------------------------------------------------------------------------
TALKSA__:
        sta     $0408                           ; BD55 8D 08 04                 ...
        jsr     LBCC0                           ; BD58 20 C0 BC                  ..
LBD5B:  sei                                     ; BD5B 78                       x
        jsr     PORT1B_SET_BIT5                 ; BD5C 20 35 BE                  5.
        jsr     PORT1B_RESET_BIT3               ; BD5F 20 4C BD                  L.
        jsr     PORT1B_RESET_BIT4               ; BD62 20 1A BE                  ..
LBD65:  jsr     PORT1B_WAIT_CHANGE              ; BD65 20 3E BE                  >.
        bmi     LBD65                           ; BD68 30 FB                    0.
        cli                                     ; BD6A 58                       X
        rts                                     ; BD6B 60                       `
; ----------------------------------------------------------------------------
IECOUT__:
        bit     $040B                           ; BD6C 2C 0B 04                 ,..
        bmi     LBD77                           ; BD6F 30 06                    0.
        sec                                     ; BD71 38                       8
        ror     $040B                           ; BD72 6E 0B 04                 n..
        bne     LBD7C                           ; BD75 D0 05                    ..
LBD77:  pha                                     ; BD77 48                       H
        jsr     LBCCA                           ; BD78 20 CA BC                  ..
        pla                                     ; BD7B 68                       h
LBD7C:  sta     $0408                           ; BD7C 8D 08 04                 ...
        clc                                     ; BD7F 18                       .
        rts                                     ; BD80 60                       `
; ----------------------------------------------------------------------------
UNTALK__:
        sei                                     ; BD81 78                       x
        jsr     PORT1B_SET_BIT4                 ; BD82 20 23 BE                  #.
        lda     VIA1_PORTB                      ; BD85 AD 00 F8                 ...
        ora     #$08                            ; BD88 09 08                    ..
        sta     VIA1_PORTB                      ; BD8A 8D 00 F8                 ...
        lda     #$5F                            ; BD8D A9 5F                    ._
        .byte   $2C                             ; BD8F 2C                       ,
UNLSTN__:
        lda     #$3F                            ; BD90 A9 3F                    .?
        jsr     LBC96                           ; BD92 20 96 BC                  ..
LBD95:  jsr     PORT1B_RESET_BIT3               ; BD95 20 4C BD                  L.
LBD98:  txa                                     ; BD98 8A                       .
        ldx     #$0A                            ; BD99 A2 0A                    ..
LBD9B:  dex                                     ; BD9B CA                       .
        bne     LBD9B                           ; BD9C D0 FD                    ..
        tax                                     ; BD9E AA                       .
        jsr     PORT1B_RESET_BIT4               ; BD9F 20 1A BE                  ..
        jmp     PORT1B_RESET_BIT5               ; BDA2 4C 2C BE                 L,.
; ----------------------------------------------------------------------------
IECIN__:sei                                     ; BDA5 78                       x
        lda     #$00                            ; BDA6 A9 00                    ..
        sta     $040C                           ; BDA8 8D 0C 04                 ...
        jsr     PORT1B_RESET_BIT4               ; BDAB 20 1A BE                  ..
LBDAE:  jsr     PORT1B_WAIT_CHANGE              ; BDAE 20 3E BE                  >.
        bpl     LBDAE                           ; BDB1 10 FB                    ..
LBDB3:  lda     #$01                            ; BDB3 A9 01                    ..
        sta     VIA1_T2CH                       ; BDB5 8D 09 F8                 ...
        jsr     PORT1B_RESET_BIT5               ; BDB8 20 2C BE                  ,.
LBDBB:  lda     VIA1_IFR                        ; BDBB AD 0D F8                 ...
        and     #$20                            ; BDBE 29 20                    )
        bne     LBDC9                           ; BDC0 D0 07                    ..
        jsr     PORT1B_WAIT_CHANGE              ; BDC2 20 3E BE                  >.
        bmi     LBDBB                           ; BDC5 30 F4                    0.
        bpl     LBDE3                           ; BDC7 10 1A                    ..
LBDC9:  lda     $040C                           ; BDC9 AD 0C 04                 ...
        beq     LBDD3                           ; BDCC F0 05                    ..
        lda     #$02                            ; BDCE A9 02                    ..
        jmp     LBD3F                           ; BDD0 4C 3F BD                 L?.
; ----------------------------------------------------------------------------
LBDD3:  jsr     PORT1B_SET_BIT5                 ; BDD3 20 35 BE                  5.
        jsr     PORT1B_RESET_BIT4               ; BDD6 20 1A BE                  ..
        lda     #$40                            ; BDD9 A9 40                    .@
        jsr     SetST                           ; BDDB 20 CA FC                  ..
        inc     $040C                           ; BDDE EE 0C 04                 ...
        bne     LBDB3                           ; BDE1 D0 D0                    ..
LBDE3:  lda     #$08                            ; BDE3 A9 08                    ..
        sta     $040C                           ; BDE5 8D 0C 04                 ...
LBDE8:  lda     VIA1_PORTB                      ; BDE8 AD 00 F8                 ...
        cmp     VIA1_PORTB                      ; BDEB CD 00 F8                 ...
        bne     LBDE8                           ; BDEE D0 F8                    ..
        eor     #$C0                            ; BDF0 49 C0                    I.
        asl     a                               ; BDF2 0A                       .
        bpl     LBDE8                           ; BDF3 10 F3                    ..
        ror     $0409                           ; BDF5 6E 09 04                 n..
LBDF8:  lda     VIA1_PORTB                      ; BDF8 AD 00 F8                 ...
        cmp     VIA1_PORTB                      ; BDFB CD 00 F8                 ...
        bne     LBDF8                           ; BDFE D0 F8                    ..
        eor     #$C0                            ; BE00 49 C0                    I.
        asl     a                               ; BE02 0A                       .
        bmi     LBDF8                           ; BE03 30 F3                    0.
        dec     $040C                           ; BE05 CE 0C 04                 ...
        bne     LBDE8                           ; BE08 D0 DE                    ..
        jsr     PORT1B_SET_BIT5                 ; BE0A 20 35 BE                  5.
        bit     ST                              ; BE0D 24 BA                    $.
        bvc     LBE14                           ; BE0F 50 03                    P.
        jsr     LBD98                           ; BE11 20 98 BD                  ..
LBE14:  lda     $0409                           ; BE14 AD 09 04                 ...
        cli                                     ; BE17 58                       X
        clc                                     ; BE18 18                       .
        rts                                     ; BE19 60                       `
; ----------------------------------------------------------------------------
PORT1B_RESET_BIT4:
; Reset VIA1 port-B bit#4.
        lda     VIA1_PORTB                      ; BE1A AD 00 F8                 ...
        and     #$EF                            ; BE1D 29 EF                    ).
        sta     VIA1_PORTB                      ; BE1F 8D 00 F8                 ...
        rts                                     ; BE22 60                       `
; ----------------------------------------------------------------------------
PORT1B_SET_BIT4:
; Set VIA1 port-B bit#4.
        lda     VIA1_PORTB                      ; BE23 AD 00 F8                 ...
        ora     #$10                            ; BE26 09 10                    ..
        sta     VIA1_PORTB                      ; BE28 8D 00 F8                 ...
        rts                                     ; BE2B 60                       `
; ----------------------------------------------------------------------------
PORT1B_RESET_BIT5:
; Reset VIA1 port-B bit#5.
        lda     VIA1_PORTB                      ; BE2C AD 00 F8                 ...
        and     #$DF                            ; BE2F 29 DF                    ).
        sta     VIA1_PORTB                      ; BE31 8D 00 F8                 ...
        rts                                     ; BE34 60                       `
; ----------------------------------------------------------------------------
PORT1B_SET_BIT5:
; Set VIA1 port-B bit#5.
        lda     VIA1_PORTB                      ; BE35 AD 00 F8                 ...
        ora     #$20                            ; BE38 09 20                    .
        sta     VIA1_PORTB                      ; BE3A 8D 00 F8                 ...
        rts                                     ; BE3D 60                       `
; ----------------------------------------------------------------------------
PORT1B_WAIT_CHANGE:
; Waiting for change on port B of VIA1. The high two bits are inverted, and
; bit 7 moved to carry.
; Maybe used for CLK/DAT sense on IEC bus?
        lda     VIA1_PORTB                      ; BE3E AD 00 F8                 ...
        cmp     VIA1_PORTB                      ; BE41 CD 00 F8                 ...
        bne     PORT1B_WAIT_CHANGE              ; BE44 D0 F8                    ..
        eor     #$C0                            ; BE46 49 C0                    I.
        asl     a                               ; BE48 0A                       .
        rts                                     ; BE49 60                       `
; ----------------------------------------------------------------------------
LBE4A:  txa                                     ; BE4A 8A                       .
        ldx     #$B8                            ; BE4B A2 B8                    ..
LBE4D:  dex                                     ; BE4D CA                       .
        bne     LBE4D                           ; BE4E D0 FD                    ..
        tax                                     ; BE50 AA                       .
        rts                                     ; BE51 60                       `
; ----------------------------------------------------------------------------
LBE52:  stz     $0389                           ; BE52 9C 89 03                 ...
        stz     $0388                           ; BE55 9C 88 03                 ...
        lda     #$40                            ; BE58 A9 40                    .@
        sta     $038A                           ; BE5A 8D 8A 03                 ...
        lda     #$30                            ; BE5D A9 30                    .0
        sta     $038B                           ; BE5F 8D 8B 03                 ...
        lda     #$10                            ; BE62 A9 10                    ..
        sta     $038C                           ; BE64 8D 8C 03                 ...
        bra     LBE6C                           ; BE67 80 03                    ..
LBE69:  stz     ACIA_ST                         ; BE69 9C 81 F9                 ...
LBE6C:  php                                     ; BE6C 08                       .
        sei                                     ; BE6D 78                       x
        stz     $040F                           ; BE6E 9C 0F 04                 ...
        stz     $0410                           ; BE71 9C 10 04                 ...
        stz     $C3                             ; BE74 64 C3                    d.
        stz     $038D                           ; BE76 9C 8D 03                 ...
        plp                                     ; BE79 28                       (
        rts                                     ; BE7A 60                       `
; ----------------------------------------------------------------------------
LBE7B:  lda     ACIA_ST                         ; BE7B AD 81 F9                 ...
        bit     #$10                            ; BE7E 89 10                    ..
        beq     LBEB5                           ; BE80 F0 33                    .3
        ldx     $040E                           ; BE82 AE 0E 04                 ...
        lda     #$40                            ; BE85 A9 40                    .@
        bit     $C3                             ; BE87 24 C3                    $.
        bne     LBE9A                           ; BE89 D0 0F                    ..
        lda     #$20                            ; BE8B A9 20                    .
        bit     $C3                             ; BE8D 24 C3                    $.
        bne     LBEB5                           ; BE8F D0 24                    .$
        ldx     $040D                           ; BE91 AE 0D 04                 ...
        lda     #$80                            ; BE94 A9 80                    ..
        bit     $C3                             ; BE96 24 C3                    $.
        beq     LBEB5                           ; BE98 F0 1B                    ..
LBE9A:  stx     ACIA_DATA                       ; BE9A 8E 80 F9                 ...
        trb     $C3                             ; BE9D 14 C3                    ..
        cpx     #$00                            ; BE9F E0 00                    ..
        beq     LBEB5                           ; BEA1 F0 12                    ..
        lda     #$10                            ; BEA3 A9 10                    ..
        cpx     $0388                           ; BEA5 EC 88 03                 ...
        bne     LBEAE                           ; BEA8 D0 04                    ..
        tsb     $C3                             ; BEAA 04 C3                    ..
        bra     LBEB5                           ; BEAC 80 07                    ..
LBEAE:  cpx     $0389                           ; BEAE EC 89 03                 ...
        bne     LBEB5                           ; BEB1 D0 02                    ..
        trb     $C3                             ; BEB3 14 C3                    ..
LBEB5:  lda     ACIA_ST                         ; BEB5 AD 81 F9                 ...
        bit     #$08                            ; BEB8 89 08                    ..
        beq     LBF0B                           ; BEBA F0 4F                    .O
        ldx     ACIA_DATA                       ; BEBC AE 80 F9                 ...
        and     #$07                            ; BEBF 29 07                    ).
        bne     LBECE                           ; BEC1 D0 0B                    ..
        cpx     #$00                            ; BEC3 E0 00                    ..
        beq     LBED9                           ; BEC5 F0 12                    ..
        lda     #$20                            ; BEC7 A9 20                    .
        cpx     $0388                           ; BEC9 EC 88 03                 ...
        bne     LBED1                           ; BECC D0 03                    ..
LBECE:  tsb     $C3                             ; BECE 04 C3                    ..
        rts                                     ; BED0 60                       `
; ----------------------------------------------------------------------------
LBED1:  cpx     $0389                           ; BED1 EC 89 03                 ...
        bne     LBED9                           ; BED4 D0 03                    ..
        trb     $C3                             ; BED6 14 C3                    ..
        rts                                     ; BED8 60                       `
; ----------------------------------------------------------------------------
LBED9:  ldy     $038D                           ; BED9 AC 8D 03                 ...
        cpy     $038A                           ; BEDC CC 8A 03                 ...
        bcs     LBF0B                           ; BEDF B0 2A                    .*
        inc     $038D                           ; BEE1 EE 8D 03                 ...
        cpy     $038B                           ; BEE4 CC 8B 03                 ...
        bcc     LBEFB                           ; BEE7 90 12                    ..
        ldy     $0388                           ; BEE9 AC 88 03                 ...
        beq     LBEFB                           ; BEEC F0 0D                    ..
        lda     #$10                            ; BEEE A9 10                    ..
        bit     $C3                             ; BEF0 24 C3                    $.
        bne     LBEFB                           ; BEF2 D0 07                    ..
        sty     $040E                           ; BEF4 8C 0E 04                 ...
        lda     #$40                            ; BEF7 A9 40                    .@
        tsb     $C3                             ; BEF9 04 C3                    ..
LBEFB:  txa                                     ; BEFB 8A                       .
        ldx     $040F                           ; BEFC AE 0F 04                 ...
        bne     LBF04                           ; BEFF D0 03                    ..
        ldx     $038A                           ; BF01 AE 8A 03                 ...
LBF04:  dex                                     ; BF04 CA                       .
        sta     $04C0,x                         ; BF05 9D C0 04                 ...
        stx     $040F                           ; BF08 8E 0F 04                 ...
LBF0B:  rts                                     ; BF0B 60                       `
; ----------------------------------------------------------------------------
LBF0C:  tax                                     ; BF0C AA                       .
LBF0D:  lda     StopKeyFlag                     ; BF0D A5 AD                    ..
        lsr     a                               ; BF0F 4A                       J
        bit     $C3                             ; BF10 24 C3                    $.
        bpl     LBF16                           ; BF12 10 02                    ..
        bcc     LBF0D                           ; BF14 90 F7                    ..
LBF16:  stx     $040D                           ; BF16 8E 0D 04                 ...
        lda     #$80                            ; BF19 A9 80                    ..
        tsb     $C3                             ; BF1B 04 C3                    ..
        rts                                     ; BF1D 60                       `
; ----------------------------------------------------------------------------
LBF1E:  ldy     $038D                           ; BF1E AC 8D 03                 ...
        tya                                     ; BF21 98                       .
        beq     LBF4D                           ; BF22 F0 29                    .)
        dec     $038D                           ; BF24 CE 8D 03                 ...
        ldx     $0389                           ; BF27 AE 89 03                 ...
        beq     LBF3E                           ; BF2A F0 12                    ..
        cpy     $038C                           ; BF2C CC 8C 03                 ...
        bcs     LBF3E                           ; BF2F B0 0D                    ..
        lda     #$10                            ; BF31 A9 10                    ..
        bit     $C3                             ; BF33 24 C3                    $.
        beq     LBF3E                           ; BF35 F0 07                    ..
        stx     $040E                           ; BF37 8E 0E 04                 ...
        lda     #$40                            ; BF3A A9 40                    .@
        tsb     $C3                             ; BF3C 04 C3                    ..
LBF3E:  ldx     $0410                           ; BF3E AE 10 04                 ...
        bne     LBF46                           ; BF41 D0 03                    ..
        ldx     $038A                           ; BF43 AE 8A 03                 ...
LBF46:  dex                                     ; BF46 CA                       .
        lda     $04C0,x                         ; BF47 BD C0 04                 ...
        stx     $0410                           ; BF4A 8E 10 04                 ...
LBF4D:  clc                                     ; BF4D 18                       .
        rts                                     ; BF4E 60                       `
; ----------------------------------------------------------------------------
; Updates time-of-day (TOD) clock. Should be called at 60Hz frequency.
UDTIM__:dec     TOD_60HZ                        ; BF4F CE 8F 03                 ...
        bpl     LBFBD                           ; BF52 10 69                    .i
        lda     #$3B                            ; BF54 A9 3B                    .;
        sta     TOD_60HZ                        ; BF56 8D 8F 03                 ...
        lda     #$3B                            ; BF59 A9 3B                    .;
        inc     TOD_SECS                        ; BF5B EE 90 03                 ...
        cmp     TOD_SECS                        ; BF5E CD 90 03                 ...
        bcs     LBF7E                           ; BF61 B0 1B                    ..
        stz     TOD_SECS                        ; BF63 9C 90 03                 ...
        inc     TOD_MINS                        ; BF66 EE 91 03                 ...
        cmp     TOD_MINS                        ; BF69 CD 91 03                 ...
        bcs     LBF7E                           ; BF6C B0 10                    ..
        stz     TOD_MINS                        ; BF6E 9C 91 03                 ...
        inc     TOD_HOURS                       ; BF71 EE 92 03                 ...
        lda     #$17                            ; BF74 A9 17                    ..
        cmp     TOD_HOURS                       ; BF76 CD 92 03                 ...
        bcs     LBF7E                           ; BF79 B0 03                    ..
        stz     TOD_HOURS                       ; BF7B 9C 92 03                 ...
; this TOD stuff was easy, but I have no idea what the rest is ...
LBF7E:  lda     $0396                           ; BF7E AD 96 03                 ...
        ora     $0397                           ; BF81 0D 97 03                 ...
        beq     LBF93                           ; BF84 F0 0D                    ..
        dec     $0396                           ; BF86 CE 96 03                 ...
        bpl     LBF93                           ; BF89 10 08                    ..
        ldx     #$3B                            ; BF8B A2 3B                    .;
        stx     $0396                           ; BF8D 8E 96 03                 ...
        dec     $0397                           ; BF90 CE 97 03                 ...
LBF93:  lda     $0393                           ; BF93 AD 93 03                 ...
        and     #$FC                            ; BF96 29 FC                    ).
        ora     $0394                           ; BF98 0D 94 03                 ...
        ora     $0395                           ; BF9B 0D 95 03                 ...
        bne     LBFA8                           ; BF9E D0 08                    ..
        lda     $0393                           ; BFA0 AD 93 03                 ...
        beq     LBFBD                           ; BFA3 F0 18                    ..
        jsr     LC65C                           ; BFA5 20 5C C6                  \.
LBFA8:  dec     $0393                           ; BFA8 CE 93 03                 ...
        bpl     LBFBD                           ; BFAB 10 10                    ..
        lda     #$3B                            ; BFAD A9 3B                    .;
        sta     $0393                           ; BFAF 8D 93 03                 ...
        dec     $0394                           ; BFB2 CE 94 03                 ...
        bpl     LBFBD                           ; BFB5 10 06                    ..
        sta     $0394                           ; BFB7 8D 94 03                 ...
        dec     $0395                           ; BFBA CE 95 03                 ...
LBFBD:  rts                                     ; BFBD 60                       `
; ----------------------------------------------------------------------------
LBFBE:  php                                     ; BFBE 08                       .
        sei                                     ; BFBF 78                       x
        stz     $0396                           ; BFC0 9C 96 03                 ...
        lda     $0780                           ; BFC3 AD 80 07                 ...
        bne     LBFC9                           ; BFC6 D0 01                    ..
        dec     a                               ; BFC8 3A                       :
LBFC9:  sta     $0397                           ; BFC9 8D 97 03                 ...
        plp                                     ; BFCC 28                       (
        rts                                     ; BFCD 60                       `
; ----------------------------------------------------------------------------
LBFCE:  sei                                     ; BFCE 78                       x
        lda     TOD_HOURS                       ; BFCF AD 92 03                 ...
        ldx     TOD_MINS                        ; BFD2 AE 91 03                 ...
        ldy     TOD_SECS                        ; BFD5 AC 90 03                 ...
LBFD8:  sei                                     ; BFD8 78                       x
        sta     TOD_HOURS                       ; BFD9 8D 92 03                 ...
        stx     TOD_MINS                        ; BFDC 8E 91 03                 ...
        sty     TOD_SECS                        ; BFDF 8C 90 03                 ...
        cli                                     ; BFE2 58                       X
        rts                                     ; BFE3 60                       `
; ----------------------------------------------------------------------------
WaitXticks_:
; Waits for multiple of 1/60 seconds. Interrupt must be enabled, since it
; used TOD's 1/60 val.
; Input: X = number of 1/60 seconds.
        pha                                     ; BFE4 48                       H
LBFE5:  lda     TOD_60HZ                        ; BFE5 AD 8F 03                 ...
LBFE8:  cmp     TOD_60HZ                        ; BFE8 CD 8F 03                 ...
        beq     LBFE8                           ; BFEB F0 FB                    ..
        dex                                     ; BFED CA                       .
        bpl     LBFE5                           ; BFEE 10 F5                    ..
        pla                                     ; BFF0 68                       h
        rts                                     ; BFF1 60                       `
; ----------------------------------------------------------------------------
LBFF2:  pha                                     ; BFF2 48                       H
        phx                                     ; BFF3 DA                       .
        phy                                     ; BFF4 5A                       Z
        jsr     LC009                           ; BFF5 20 09 C0                  ..
        bcc     LBFFD                           ; BFF8 90 03                    ..
        jsr     L84C5                           ; BFFA 20 C5 84                  ..
LBFFD:  lda     $0335                           ; BFFD AD 35 03                 .5.
        beq     LC005                           ; C000 F0 03                    ..
        jsr     LFA78                           ; C002 20 78 FA                  x.
LC005:  ply                                     ; C005 7A                       z
        plx                                     ; C006 FA                       .
        pla                                     ; C007 68                       h
        rts                                     ; C008 60                       `
; ----------------------------------------------------------------------------
LC009:  lda     StopKeyFlag                     ; C009 A5 AD                    ..
        and     #$A0                            ; C00B 29 A0                    ).
        tax                                     ; C00D AA                       .
        php                                     ; C00E 08                       .
        sei                                     ; C00F 78                       x
        lda     $0396                           ; C010 AD 96 03                 ...
        ora     $0397                           ; C013 0D 97 03                 ...
        bne     LC019                           ; C016 D0 01                    ..
        inx                                     ; C018 E8                       .
LC019:  plp                                     ; C019 28                       (
        txa                                     ; C01A 8A                       .
        cmp     #$01                            ; C01B C9 01                    ..
        rts                                     ; C01D 60                       `
; ----------------------------------------------------------------------------
LC01E:  .byte   $01,$00,$01,$02,$00,$01,$02,$00 ; C01E 01 00 01 02 00 01 02 00  ........
        .byte   $01,$02,$00,$02                 ; C026 01 02 00 02              ....
LC02A:  .byte   $9D,$76,$51                     ; C02A 9D 76 51                 .vQ
LC02D:  .byte   $03,$00,$00,$00,$01,$01         ; C02D 03 00 00 00 01 01        ......
LC033:  .byte   $01,$02,$02,$02,$03,$03         ; C033 01 02 02 02 03 03        ......
LC039:  .byte   $8B,$9A,$AA,$BC                 ; C039 8B 9A AA BC              ....
LC03D:  .byte   $8C,$7E,$72,$67                 ; C03D 8C 7E 72 67              .~rg
LC041:  .byte   $A2,$09,$20,$E4,$BF,$08,$78,$C9 ; C041 A2 09 20 E4 BF 08 78 C9  .. ...x.
        .byte   $23,$D0,$02                     ; C049 23 D0 02                 #..
LC04C:  .byte   $A9,$0B,$29,$0F                 ; C04C A9 0B 29 0F              ..).
; ----------------------------------------------------------------------------
        tax                                     ; C050 AA                       .
        lda     #$C0                            ; C051 A9 C0                    ..
        tsb     VIA2_ACR                        ; C053 0C 8B F8                 ...
        ldy     LC01E,x                         ; C056 BC 1E C0                 ...
        lda     LC02A,y                         ; C059 B9 2A C0                 .*.
        sta     VIA2_T1CL                       ; C05C 8D 84 F8                 ...
        lda     #$01                            ; C05F A9 01                    ..
        sta     VIA2_T1CH                       ; C061 8D 85 F8                 ...
        ldy     LC02D,x                         ; C064 BC 2D C0                 .-.
        ldx     LC039,y                         ; C067 BE 39 C0                 .9.
LC06A:  lda     VIA2_PORTB                      ; C06A AD 80 F8                 ...
        eor     #$01                            ; C06D 49 01                    I.
        sta     VIA2_PORTB                      ; C06F 8D 80 F8                 ...
        lda     LC03D,y                         ; C072 B9 3D C0                 .=.
LC075:  dec     a                               ; C075 3A                       :
        bne     LC075                           ; C076 D0 FD                    ..
        dex                                     ; C078 CA                       .
        bne     LC06A                           ; C079 D0 EF                    ..
        lda     #$C0                            ; C07B A9 C0                    ..
        trb     VIA2_ACR                        ; C07D 1C 8B F8                 ...
        plp                                     ; C080 28                       (
        rts                                     ; C081 60                       `
; ----------------------------------------------------------------------------
LC082:  lda     #$AE                            ; C082 A9 AE                    ..
        sta     $034E                           ; C084 8D 4E 03                 .N.
        ldx     FNlength                        ; C087 AE 87 03                 ...
        beq     LC0A6                           ; C08A F0 1A                    ..
        stz     ACIA_ST                         ; C08C 9C 81 F9                 ...
        ldy     #$00                            ; C08F A0 00                    ..
        jsr     FROM_C67B                       ; C091 20 4A 03                  J.
        sta     ACIA_CTRL                       ; C094 8D 83 F9                 ...
        cpx     #$01                            ; C097 E0 01                    ..
        beq     LC0A6                           ; C099 F0 0B                    ..
        iny                                     ; C09B C8                       .
        jsr     FROM_C67B                       ; C09C 20 4A 03                  J.
        cpx     #$02                            ; C09F E0 02                    ..
        bne     LC0A8                           ; C0A1 D0 05                    ..
        sta     ACIA_CMD                        ; C0A3 8D 82 F9                 ...
LC0A6:  clc                                     ; C0A6 18                       .
        rts                                     ; C0A7 60                       `
; ----------------------------------------------------------------------------
LC0A8:  and     #$E0                            ; C0A8 29 E0                    ).
        sta     ACIA_CMD                        ; C0AA 8D 82 F9                 ...
        jsr     LC193                           ; C0AD 20 93 C1                  ..
        jsr     LC1A1                           ; C0B0 20 A1 C1                  ..
        jsr     LC1AD                           ; C0B3 20 AD C1                  ..
        ldy     #$02                            ; C0B6 A0 02                    ..
        jsr     FROM_C67B                       ; C0B8 20 4A 03                  J.
        cmp     #$41                            ; C0BB C9 41                    .A
        beq     LC0C3                           ; C0BD F0 04                    ..
        cmp     #$41                            ; C0BF C9 41                    .A
        bne     LC0CE                           ; C0C1 D0 0B                    ..
LC0C3:  jsr     LC1DF                           ; C0C3 20 DF C1                  ..
        bcs     LC0E3                           ; C0C6 B0 1B                    ..
        jsr     LC1BB                           ; C0C8 20 BB C1                  ..
        jmp     LC1B4                           ; C0CB 4C B4 C1                 L..
; ----------------------------------------------------------------------------
LC0CE:  jsr     LC1BB                           ; C0CE 20 BB C1                  ..
        jsr     LC189                           ; C0D1 20 89 C1                  ..
        lda     #$02                            ; C0D4 A9 02                    ..
        jsr     LC0F1                           ; C0D6 20 F1 C0                  ..
        bcs     LC0E3                           ; C0D9 B0 08                    ..
        jsr     LC1CD                           ; C0DB 20 CD C1                  ..
        bcs     LC0E3                           ; C0DE B0 03                    ..
        jmp     LC1B4                           ; C0E0 4C B4 C1                 L..
; ----------------------------------------------------------------------------
LC0E3:  lda     LFSLogNum                       ; C0E3 A5 C6                    ..
        jmp     LFCF1                           ; C0E5 4C F1 FC                 L..
; ----------------------------------------------------------------------------
LC0E8:  php                                     ; C0E8 08                       .
        sei                                     ; C0E9 78                       x
        jsr     LBE52                           ; C0EA 20 52 BE                  R.
        plp                                     ; C0ED 28                       (
        jmp     LC200                           ; C0EE 4C 00 C2                 L..
; ----------------------------------------------------------------------------
LC0F1:  pha                                     ; C0F1 48                       H
        and     #$7F                            ; C0F2 29 7F                    ).
        cmp     FNlength                        ; C0F4 CD 87 03                 ...
        bcc     LC0FC                           ; C0F7 90 03                    ..
        pla                                     ; C0F9 68                       h
        clc                                     ; C0FA 18                       .
        rts                                     ; C0FB 60                       `
; ----------------------------------------------------------------------------
LC0FC:  tay                                     ; C0FC A8                       .
        jsr     FROM_C67B                       ; C0FD 20 4A 03                  J.
        jsr     LC110                           ; C100 20 10 C1                  ..
        jsr     LC1F0                           ; C103 20 F0 C1                  ..
        pla                                     ; C106 68                       h
        inc     a                               ; C107 1A                       .
        bcs     LC10F                           ; C108 B0 05                    ..
        lda     StopKeyFlag                     ; C10A A5 AD                    ..
        lsr     a                               ; C10C 4A                       J
        bcc     LC0F1                           ; C10D 90 E2                    ..
LC10F:  rts                                     ; C10F 60                       `
; ----------------------------------------------------------------------------
LC110:  bit     #$40                            ; C110 89 40                    .@
        beq     LC116                           ; C112 F0 02                    ..
        and     #$DF                            ; C114 29 DF                    ).
LC116:  ldy     #$0F                            ; C116 A0 0F                    ..
LC118:  cmp     LC128,y                         ; C118 D9 28 C1                 .(.
        bne     LC123                           ; C11B D0 06                    ..
        ldx     LC138,y                         ; C11D BE 38 C1                 .8.
        jmp     (LC148,x)                       ; C120 7C 48 C1                 |H.
LC123:  dey                                     ; C123 88                       .
        bpl     LC118                           ; C124 10 F2                    ..
        clc                                     ; C126 18                       .
        rts                                     ; C127 60                       `
; ----------------------------------------------------------------------------
LC128:  .byte   $30,$31,$32,$33,$34,$35,$36,$37 ; C128 30 31 32 33 34 35 36 37  01234567
        .byte   $38,$39,$23,$2A,$52,$54,$57,$2C ; C130 38 39 23 2A 52 54 57 2C  89#*RTW,
LC138:  .byte   $00,$00,$00,$00,$00,$00,$00,$00 ; C138 00 00 00 00 00 00 00 00  ........
        .byte   $00,$00,$00,$00,$02,$04,$06,$08 ; C140 00 00 00 00 02 04 06 08  ........
; ----------------------------------------------------------------------------
LC148:  .addr   LC165                           ; C148 65 C1                    e.
        .addr   LC15A                           ; C14A 5A C1                    Z.
        .addr   LC152                           ; C14C 52 C1                    R.
        .addr   LC1CD                           ; C14E CD C1                    ..
        .addr   LC18C                           ; C150 8C C1                    ..
; ----------------------------------------------------------------------------
LC152:  tsx                                     ; C152 BA                       .
        lda     stack+3,x                       ; C153 BD 03 01                 ...
        ora     #$80                            ; C156 09 80                    ..
        bra     LC160                           ; C158 80 06                    ..
LC15A:  tsx                                     ; C15A BA                       .
        lda     stack+3,x                       ; C15B BD 03 01                 ...
        and     #$7F                            ; C15E 29 7F                    ).
LC160:  sta     stack+3,x                       ; C160 9D 03 01                 ...
        clc                                     ; C163 18                       .
        rts                                     ; C164 60                       `
; ----------------------------------------------------------------------------
LC165:  tsx                                     ; C165 BA                       .
        ldy     stack+3,x                       ; C166 BC 03 01                 ...
        bpl     LC170                           ; C169 10 05                    ..
        jsr     LC041                           ; C16B 20 41 C0                  A.
        clc                                     ; C16E 18                       .
        rts                                     ; C16F 60                       `
; ----------------------------------------------------------------------------
LC170:  cmp     #$30                            ; C170 C9 30                    .0
        bcc     LC188                           ; C172 90 14                    ..
        and     #$0F                            ; C174 29 0F                    ).
        bne     LC17A                           ; C176 D0 02                    ..
        lda     #$0A                            ; C178 A9 0A                    ..
LC17A:  pha                                     ; C17A 48                       H
        jsr     LC1C4                           ; C17B 20 C4 C1                  ..
        jsr     LC1BB                           ; C17E 20 BB C1                  ..
        pla                                     ; C181 68                       h
        dec     a                               ; C182 3A                       :
        bne     LC17A                           ; C183 D0 F5                    ..
        jsr     LC18C                           ; C185 20 8C C1                  ..
LC188:  rts                                     ; C188 60                       `
; ----------------------------------------------------------------------------
LC189:  jsr     LC18C                           ; C189 20 8C C1                  ..
LC18C:  ldx     #$3B                            ; C18C A2 3B                    .;
LC18E:  jsr     WaitXticks_                     ; C18E 20 E4 BF                  ..
        clc                                     ; C191 18                       .
        rts                                     ; C192 60                       `
; ----------------------------------------------------------------------------
LC193:  lda     #$02                            ; C193 A9 02                    ..
        trb     VIA2_PORTB                      ; C195 1C 80 F8                 ...
        bra     LC18C                           ; C198 80 F2                    ..
LC19A:  lda     #$02                            ; C19A A9 02                    ..
        tsb     VIA2_PORTB                      ; C19C 0C 80 F8                 ...
        clc                                     ; C19F 18                       .
        rts                                     ; C1A0 60                       `
; ----------------------------------------------------------------------------
LC1A1:  lda     #$01                            ; C1A1 A9 01                    ..
        tsb     ACIA_CMD                        ; C1A3 0C 82 F9                 ...
        rts                                     ; C1A6 60                       `
; ----------------------------------------------------------------------------
LC1A7:  lda     #$01                            ; C1A7 A9 01                    ..
        trb     ACIA_CMD                        ; C1A9 1C 82 F9                 ...
        rts                                     ; C1AC 60                       `
; ----------------------------------------------------------------------------
LC1AD:  lda     #$08                            ; C1AD A9 08                    ..
        tsb     VIA2_PORTB                      ; C1AF 0C 80 F8                 ...
        clc                                     ; C1B2 18                       .
        rts                                     ; C1B3 60                       `
; ----------------------------------------------------------------------------
LC1B4:  lda     #$08                            ; C1B4 A9 08                    ..
        trb     VIA2_PORTB                      ; C1B6 1C 80 F8                 ...
        clc                                     ; C1B9 18                       .
        rts                                     ; C1BA 60                       `
; ----------------------------------------------------------------------------
LC1BB:  lda     #$04                            ; C1BB A9 04                    ..
        tsb     ACIA_CMD                        ; C1BD 0C 82 F9                 ...
        ldx     #$02                            ; C1C0 A2 02                    ..
        bra     LC18E                           ; C1C2 80 CA                    ..
LC1C4:  lda     #$04                            ; C1C4 A9 04                    ..
        trb     ACIA_CMD                        ; C1C6 1C 82 F9                 ...
        ldx     #$04                            ; C1C9 A2 04                    ..
        bra     LC18E                           ; C1CB 80 C1                    ..
LC1CD:  lda     ACIA_ST                         ; C1CD AD 81 F9                 ...
        bit     #$20                            ; C1D0 89 20                    .
        beq     LC18C                           ; C1D2 F0 B8                    ..
        bit     #$40                            ; C1D4 89 40                    .@
        bne     LC1DD                           ; C1D6 D0 05                    ..
        lda     StopKeyFlag                     ; C1D8 A5 AD                    ..
        lsr     a                               ; C1DA 4A                       J
        bcc     LC1CD                           ; C1DB 90 F0                    ..
LC1DD:  sec                                     ; C1DD 38                       8
        rts                                     ; C1DE 60                       `
; ----------------------------------------------------------------------------
LC1DF:  ldy     #$78                            ; C1DF A0 78                    .x
LC1E1:  ldx     #$01                            ; C1E1 A2 01                    ..
        jsr     WaitXticks_                     ; C1E3 20 E4 BF                  ..
        jsr     LC1CD                           ; C1E6 20 CD C1                  ..
        bcc     LC1EF                           ; C1E9 90 04                    ..
        dey                                     ; C1EB 88                       .
        bne     LC1E1                           ; C1EC D0 F3                    ..
        sec                                     ; C1EE 38                       8
LC1EF:  rts                                     ; C1EF 60                       `
; ----------------------------------------------------------------------------
LC1F0:  lda     #$04                            ; C1F0 A9 04                    ..
        trb     ACIA_CMD                        ; C1F2 1C 82 F9                 ...
        lda     #$C8                            ; C1F5 A9 C8                    ..
LC1F7:  dec     a                               ; C1F7 3A                       :
        bne     LC1F7                           ; C1F8 D0 FD                    ..
        lda     #$04                            ; C1FA A9 04                    ..
        tsb     ACIA_CMD                        ; C1FC 0C 82 F9                 ...
        rts                                     ; C1FF 60                       `
; ----------------------------------------------------------------------------
LC200:  jsr     LC1B4                           ; C200 20 B4 C1                  ..
        jsr     LC1C4                           ; C203 20 C4 C1                  ..
        jsr     LC1A7                           ; C206 20 A7 C1                  ..
        jsr     LC19A                           ; C209 20 9A C1                  ..
        lda     #$80                            ; C20C A9 80                    ..
        jmp     SetST                           ; C20E 4C CA FC                 L..
; ----------------------------------------------------------------------------
LC211:  .byte   $04,$02,$00,$04,$06,$07,$09,$0B ; C211 04 02 00 04 06 07 09 0B  ........
; ----------------------------------------------------------------------------
LC219:  stz     $0411                           ; C219 9C 11 04                 ...
        lda     FNlength                        ; C21C AD 87 03                 ...
        beq     LC22A                           ; C21F F0 09                    ..
        cmp     #$08                            ; C221 C9 08                    ..
        beq     LC22C                           ; C223 F0 07                    ..
        lda     #$01                            ; C225 A9 01                    ..
        jsr     SetST                           ; C227 20 CA FC                  ..
LC22A:  clc                                     ; C22A 18                       .
        rts                                     ; C22B 60                       `
; ----------------------------------------------------------------------------
LC22C:  lda     #$AE                            ; C22C A9 AE                    ..
        sta     $034E                           ; C22E 8D 4E 03                 .N.
        ldy     #$07                            ; C231 A0 07                    ..
LC233:  jsr     FROM_C67B                       ; C233 20 4A 03                  J.
        sta     $0412,y                         ; C236 99 12 04                 ...
        dey                                     ; C239 88                       .
        bpl     LC233                           ; C23A 10 F7                    ..
        lda     $0415                           ; C23C AD 15 04                 ...
        ror     a                               ; C23F 6A                       j
        ror     a                               ; C240 6A                       j
        ror     a                               ; C241 6A                       j
        and     #$C0                            ; C242 29 C0                    ).
        ora     $0412                           ; C244 0D 12 04                 ...
        sta     $0415                           ; C247 8D 15 04                 ...
        jsr     RTC_ACCESS_ON                   ; C24A 20 66 C3                  f.
        lda     #$80                            ; C24D A9 80                    ..
        tsb     VIA2_PORTA                      ; C24F 0C 81 F8                 ...
        php                                     ; C252 08                       .
        sei                                     ; C253 78                       x
        ldy     #$0E                            ; C254 A0 0E                    ..
        lda     #$40                            ; C256 A9 40                    .@
        jsr     LC340                           ; C258 20 40 C3                  @.
        ldx     #$01                            ; C25B A2 01                    ..
LC25D:  lda     $0412,x                         ; C25D BD 12 04                 ...
        jsr     LC325                           ; C260 20 25 C3                  %.
        inx                                     ; C263 E8                       .
        cpx     #$08                            ; C264 E0 08                    ..
        bne     LC25D                           ; C266 D0 F5                    ..
        jsr     RTC_ACCESS_OFF                  ; C268 20 6F C3                  o.
        plp                                     ; C26B 28                       (
        stz     $0411                           ; C26C 9C 11 04                 ...
        clc                                     ; C26F 18                       .
        rts                                     ; C270 60                       `
; ----------------------------------------------------------------------------
LC271:  jsr     LC2CE                           ; C271 20 CE C2                  ..
        php                                     ; C274 08                       .
        sei                                     ; C275 78                       x
        sed                                     ; C276 F8                       .
        lda     $0412                           ; C277 AD 12 04                 ...
        ldx     $0415                           ; C27A AE 15 04                 ...
        bne     LC287                           ; C27D D0 08                    ..
        cmp     #$12                            ; C27F C9 12                    ..
        bne     LC290                           ; C281 D0 0D                    ..
        lda     #$00                            ; C283 A9 00                    ..
        bra     LC290                           ; C285 80 09                    ..
LC287:  dex                                     ; C287 CA                       .
        bne     LC290                           ; C288 D0 06                    ..
        cmp     #$12                            ; C28A C9 12                    ..
        beq     LC290                           ; C28C F0 02                    ..
        adc     #$12                            ; C28E 69 12                    i.
LC290:  jsr     LC375                           ; C290 20 75 C3                  u.
        sta     TOD_HOURS                       ; C293 8D 92 03                 ...
        lda     $0413                           ; C296 AD 13 04                 ...
        jsr     LC375                           ; C299 20 75 C3                  u.
        sta     TOD_MINS                        ; C29C 8D 91 03                 ...
        lda     $0414                           ; C29F AD 14 04                 ...
        jsr     LC375                           ; C2A2 20 75 C3                  u.
        sta     TOD_SECS                        ; C2A5 8D 90 03                 ...
        stz     $0411                           ; C2A8 9C 11 04                 ...
        plp                                     ; C2AB 28                       (
        rts                                     ; C2AC 60                       `
; ----------------------------------------------------------------------------
LC2AD:  ldx     $0411                           ; C2AD AE 11 04                 ...
        beq     LC2BD                           ; C2B0 F0 0B                    ..
        cpx     #$08                            ; C2B2 E0 08                    ..
        bcc     LC2C3                           ; C2B4 90 0D                    ..
        lda     #$0D                            ; C2B6 A9 0D                    ..
        stz     $0411                           ; C2B8 9C 11 04                 ...
        clc                                     ; C2BB 18                       .
        rts                                     ; C2BC 60                       `
; ----------------------------------------------------------------------------
LC2BD:  jsr     LC2CE                           ; C2BD 20 CE C2                  ..
        stz     $0411                           ; C2C0 9C 11 04                 ...
LC2C3:  ldx     $0411                           ; C2C3 AE 11 04                 ...
        lda     $0412,x                         ; C2C6 BD 12 04                 ...
        inc     $0411                           ; C2C9 EE 11 04                 ...
        clc                                     ; C2CC 18                       .
        rts                                     ; C2CD 60                       `
; ----------------------------------------------------------------------------
LC2CE:  jsr     RTC_ACCESS_ON                   ; C2CE 20 66 C3                  f.
        ldx     #$07                            ; C2D1 A2 07                    ..
LC2D3:  jsr     LC30E                           ; C2D3 20 0E C3                  ..
        sta     $0412,x                         ; C2D6 9D 12 04                 ...
        dex                                     ; C2D9 CA                       .
        bpl     LC2D3                           ; C2DA 10 F7                    ..
        jsr     RTC_ACCESS_OFF                  ; C2DC 20 6F C3                  o.
        jsr     RTC_ACCESS_ON                   ; C2DF 20 66 C3                  f.
        ldx     #$07                            ; C2E2 A2 07                    ..
LC2E4:  jsr     LC30E                           ; C2E4 20 0E C3                  ..
        cmp     $0412,x                         ; C2E7 DD 12 04                 ...
        bne     LC2CE                           ; C2EA D0 E2                    ..
        dex                                     ; C2EC CA                       .
        bne     LC2E4                           ; C2ED D0 F5                    ..
        jsr     RTC_ACCESS_OFF                  ; C2EF 20 6F C3                  o.
        lda     $0412                           ; C2F2 AD 12 04                 ...
        and     #$3F                            ; C2F5 29 3F                    )?
        sta     $0412                           ; C2F7 8D 12 04                 ...
        lda     $0416                           ; C2FA AD 16 04                 ...
        and     #$0F                            ; C2FD 29 0F                    ).
        sta     $0416                           ; C2FF 8D 16 04                 ...
        lda     $0415                           ; C302 AD 15 04                 ...
        rol     a                               ; C305 2A                       *
        rol     a                               ; C306 2A                       *
        rol     a                               ; C307 2A                       *
        and     #$03                            ; C308 29 03                    ).
        sta     $0415                           ; C30A 8D 15 04                 ...
        rts                                     ; C30D 60                       `
; ----------------------------------------------------------------------------
LC30E:  ldy     LC211,x                         ; C30E BC 11 C2                 ...
        phy                                     ; C311 5A                       Z
        jsr     LC352                           ; C312 20 52 C3                  R.
        sta     $0411                           ; C315 8D 11 04                 ...
        ply                                     ; C318 7A                       z
        iny                                     ; C319 C8                       .
        jsr     LC352                           ; C31A 20 52 C3                  R.
        asl     a                               ; C31D 0A                       .
        asl     a                               ; C31E 0A                       .
        asl     a                               ; C31F 0A                       .
        asl     a                               ; C320 0A                       .
        ora     $0411                           ; C321 0D 11 04                 ...
        rts                                     ; C324 60                       `
; ----------------------------------------------------------------------------
LC325:  pha                                     ; C325 48                       H
        and     #$0F                            ; C326 29 0F                    ).
        ldy     LC211,x                         ; C328 BC 11 C2                 ...
        jsr     LC337                           ; C32B 20 37 C3                  7.
        pla                                     ; C32E 68                       h
        lsr     a                               ; C32F 4A                       J
        lsr     a                               ; C330 4A                       J
        lsr     a                               ; C331 4A                       J
        lsr     a                               ; C332 4A                       J
        ldy     LC211,x                         ; C333 BC 11 C2                 ...
        iny                                     ; C336 C8                       .
LC337:  pha                                     ; C337 48                       H
        lda     #$40                            ; C338 A9 40                    .@
        jsr     LC340                           ; C33A 20 40 C3                  @.
        ply                                     ; C33D 7A                       z
        lda     #$20                            ; C33E A9 20                    .
LC340:  pha                                     ; C340 48                       H
        lda     #$7F                            ; C341 A9 7F                    ..
        trb     VIA2_PORTA                      ; C343 1C 81 F8                 ...
        tya                                     ; C346 98                       .
        tsb     VIA2_PORTA                      ; C347 0C 81 F8                 ...
        pla                                     ; C34A 68                       h
        tsb     VIA2_PORTA                      ; C34B 0C 81 F8                 ...
        trb     VIA2_PORTA                      ; C34E 1C 81 F8                 ...
        rts                                     ; C351 60                       `
; ----------------------------------------------------------------------------
; This quite odd routine reads (4 bit) data from the RTC chip. Odd, because
; port A of VIA#2 is configured as _output_ otherwise ... $40 is for AW
; (address write) signal for the RTC.
; Input: Y = RTC register number
; Output: A = read value
LC352:  lda     #$40                            ; C352 A9 40                    .@
        jsr     LC340                           ; C354 20 40 C3                  @.
        lda     #$1F                            ; C357 A9 1F                    ..
        tsb     VIA2_PORTA                      ; C359 0C 81 F8                 ...
        ldy     VIA2_PORTA                      ; C35C AC 81 F8                 ...
        trb     VIA2_PORTA                      ; C35F 1C 81 F8                 ...
        tya                                     ; C362 98                       .
        and     #$0F                            ; C363 29 0F                    ).
        rts                                     ; C365 60                       `
; ----------------------------------------------------------------------------
RTC_ACCESS_ON:
        stz     VIA2_PORTA                      ; C366 9C 81 F8                 ...
        lda     #$02                            ; C369 A9 02                    ..
        tsb     VIA1_PORTB                      ; C36B 0C 00 F8                 ...
        rts                                     ; C36E 60                       `
; ----------------------------------------------------------------------------
RTC_ACCESS_OFF:
        lda     #$02                            ; C36F A9 02                    ..
        trb     VIA1_PORTB                      ; C371 1C 00 F8                 ...
        rts                                     ; C374 60                       `
; ----------------------------------------------------------------------------
LC375:  pha                                     ; C375 48                       H
        lsr     a                               ; C376 4A                       J
        lsr     a                               ; C377 4A                       J
        lsr     a                               ; C378 4A                       J
        lsr     a                               ; C379 4A                       J
        tay                                     ; C37A A8                       .
        pla                                     ; C37B 68                       h
        cld                                     ; C37C D8                       .
        sec                                     ; C37D 38                       8
        sbc     LC382,y                         ; C37E F9 82 C3                 ...
        rts                                     ; C381 60                       `
; ----------------------------------------------------------------------------
LC382:  .byte   $00,$06,$0C,$12,$18,$1E,$24,$2A ; C382 00 06 0C 12 18 1E 24 2A  ......$*
        .byte   $30,$36                         ; C38A 30 36                    06
; ----------------------------------------------------------------------------
LC38C:  ldx     ST                              ; C38C A6 BA                    ..
        bne     LC3AC                           ; C38E D0 1C                    ..
        pha                                     ; C390 48                       H
        ldy     #$F0                            ; C391 A0 F0                    ..
LC393:  lda     VIA2_PORTB                      ; C393 AD 80 F8                 ...
        and     #$40                            ; C396 29 40                    )@
        bne     LC3B0                           ; C398 D0 16                    ..
        lda     StopKeyFlag                     ; C39A A5 AD                    ..
        lsr     a                               ; C39C 4A                       J
        lda     #$00                            ; C39D A9 00                    ..
        bcs     LC3AB                           ; C39F B0 0A                    ..
        ldx     #$01                            ; C3A1 A2 01                    ..
        jsr     WaitXticks_                     ; C3A3 20 E4 BF                  ..
        dey                                     ; C3A6 88                       .
        bne     LC393                           ; C3A7 D0 EA                    ..
        lda     #$01                            ; C3A9 A9 01                    ..
LC3AB:  plx                                     ; C3AB FA                       .
LC3AC:  sec                                     ; C3AC 38                       8
        jmp     SetST                           ; C3AD 4C CA FC                 L..
; ----------------------------------------------------------------------------
LC3B0:  ldx     #$03                            ; C3B0 A2 03                    ..
LC3B2:  dex                                     ; C3B2 CA                       .
        bpl     LC3B2                           ; C3B3 10 FD                    ..
        pla                                     ; C3B5 68                       h
        sta     VIA2_PORTA                      ; C3B6 8D 81 F8                 ...
        lda     #$20                            ; C3B9 A9 20                    .
        trb     VIA2_PORTB                      ; C3BB 1C 80 F8                 ...
        tsb     VIA2_PORTB                      ; C3BE 0C 80 F8                 ...
        lda     #$02                            ; C3C1 A9 02                    ..
        tsb     VIA2_PCR                        ; C3C3 0C 8C F8                 ...
        trb     VIA2_PCR                        ; C3C6 1C 8C F8                 ...
        clc                                     ; C3C9 18                       .
        rts                                     ; C3CA 60                       `
; ----------------------------------------------------------------------------
LC3CB:  pha                                     ; C3CB 48                       H
        lda     LC44A,x                         ; C3CC BD 4A C4                 .J.
        bra     LC3D5                           ; C3CF 80 04                    ..
LC3D1:  pha                                     ; C3D1 48                       H
        lda     LC444,x                         ; C3D2 BD 44 C4                 .D.
LC3D5:  cpx     #$00                            ; C3D5 E0 00                    ..
        bne     LC3DC                           ; C3D7 D0 03                    ..
        clc                                     ; C3D9 18                       .
LC3DA:  pla                                     ; C3DA 68                       h
        rts                                     ; C3DB 60                       `
; ----------------------------------------------------------------------------
LC3DC:  cpx     #$07                            ; C3DC E0 07                    ..
        bcs     LC3DA                           ; C3DE B0 FA                    ..
        plx                                     ; C3E0 FA                       .
        phy                                     ; C3E1 5A                       Z
        tay                                     ; C3E2 A8                       .
        txa                                     ; C3E3 8A                       .
LC3E4:  phy                                     ; C3E4 5A                       Z
        ldx     LC416,y                         ; C3E5 BE 16 C4                 ...
        jsr     LC3F1                           ; C3E8 20 F1 C3                  ..
        ply                                     ; C3EB 7A                       z
        iny                                     ; C3EC C8                       .
        bcs     LC3E4                           ; C3ED B0 F5                    ..
        ply                                     ; C3EF 7A                       z
        rts                                     ; C3F0 60                       `
; ----------------------------------------------------------------------------
LC3F1:  jmp     (LC3F4,x)                       ; C3F1 7C F4 C3                 |..
LC3F4:  .addr   LC486                           ; C3F4 86 C4                    ..
        .addr   LC4C5                           ; C3F6 C5 C4                    ..
        .addr   LC488                           ; C3F8 88 C4                    ..
        .addr   LC496                           ; C3FA 96 C4                    ..
        .addr   LC5BC                           ; C3FC BC C5                    ..
        .addr   LC5AE                           ; C3FE AE C5                    ..
        .addr   LC5E3                           ; C400 E3 C5                    ..
        .addr   LC5F7                           ; C402 F7 C5                    ..
        .addr   LC553                           ; C404 53 C5                    S.
        .addr   LC55D                           ; C406 5D C5                    ].
        .addr   LC4A4                           ; C408 A4 C4                    ..
        .addr   LC58A                           ; C40A 8A C5                    ..
        .addr   LC567                           ; C40C 67 C5                    g.
        .addr   LC4D3                           ; C40E D3 C4                    ..
        .addr   LC513                           ; C410 13 C5                    ..
        .addr   LC59B                           ; C412 9B C5                    ..
        .addr   LC451                           ; C414 51 C4                    Q.
; ----------------------------------------------------------------------------
LC416:  .byte   $02,$04,$06,$08,$0A,$0C,$00,$02 ; C416 02 04 06 08 0A 0C 00 02  ........
        .byte   $06,$08,$0A,$0C,$00,$02,$18,$06 ; C41E 06 08 0A 0C 00 02 18 06  ........
        .byte   $1E,$0A,$1C,$10,$00,$02,$16,$0E ; C426 1E 0A 1C 10 00 02 16 0E  ........
        .byte   $00,$02,$1A,$1C,$10,$00,$04,$06 ; C42E 00 02 1A 1C 10 00 04 06  ........
        .byte   $14,$00,$04,$12,$00,$04,$20,$00 ; C436 14 00 04 12 00 04 20 00  ...... .
        .byte   $06,$14,$00,$12,$00,$20         ; C43E 06 14 00 12 00 20        .....
LC444:  .byte   $00,$00,$07,$0D,$15,$15         ; C444 00 00 07 0D 15 15        ......
LC44A:  .byte   $19,$1E,$22,$25,$28,$2B,$2D     ; C44A 19 1E 22 25 28 2B 2D     .."%(+-
; ----------------------------------------------------------------------------
LC451:  cmp     #$5E                            ; C451 C9 5E                    .^
        bcc     LC462                           ; C453 90 0D                    ..
        cmp     #$80                            ; C455 C9 80                    ..
        bcs     LC462                           ; C457 B0 09                    ..
        sec                                     ; C459 38                       8
        sbc     #$5E                            ; C45A E9 5E                    .^
        tay                                     ; C45C A8                       .
        lda     LC464,y                         ; C45D B9 64 C4                 .d.
        clc                                     ; C460 18                       .
        rts                                     ; C461 60                       `
; ----------------------------------------------------------------------------
LC462:  sec                                     ; C462 38                       8
        rts                                     ; C463 60                       `
; ----------------------------------------------------------------------------
LC464:  .byte   $71,$7F,$62,$60,$7B,$AE,$BD,$AD ; C464 71 7F 62 60 7B AE BD AD  q.b`{...
        .byte   $B0,$B1,$3E,$7F,$7A,$56,$AC,$BB ; C46C B0 B1 3E 7F 7A 56 AC BB  ..>.zV..
        .byte   $BE,$BC,$B8,$68,$A9,$B2,$B3,$B1 ; C474 BE BC B8 68 A9 B2 B3 B1  ...h....
        .byte   $AB,$76,$6E,$6D,$B7,$AF,$67,$68 ; C47C AB 76 6E 6D B7 AF 67 68  .vnm..gh
        .byte   $78,$7E                         ; C484 78 7E                    x~
; ----------------------------------------------------------------------------
LC486:  clc                                     ; C486 18                       .
        rts                                     ; C487 60                       `
; ----------------------------------------------------------------------------
LC488:  cmp     #$41                            ; C488 C9 41                    .A
        bcc     LC494                           ; C48A 90 08                    ..
        cmp     #$5B                            ; C48C C9 5B                    .[
        bcs     LC494                           ; C48E B0 04                    ..
        eor     #$20                            ; C490 49 20                    I
        clc                                     ; C492 18                       .
        rts                                     ; C493 60                       `
; ----------------------------------------------------------------------------
LC494:  sec                                     ; C494 38                       8
        rts                                     ; C495 60                       `
; ----------------------------------------------------------------------------
LC496:  cmp     #$61                            ; C496 C9 61                    .a
        bcc     LC4A2                           ; C498 90 08                    ..
        cmp     #$7B                            ; C49A C9 7B                    .{
        bcs     LC4A2                           ; C49C B0 04                    ..
        eor     #$20                            ; C49E 49 20                    I
        clc                                     ; C4A0 18                       .
        rts                                     ; C4A1 60                       `
; ----------------------------------------------------------------------------
LC4A2:  sec                                     ; C4A2 38                       8
        rts                                     ; C4A3 60                       `
; ----------------------------------------------------------------------------
LC4A4:  ldx     #$04                            ; C4A4 A2 04                    ..
LC4A6:  cmp     LC4B5,x                         ; C4A6 DD B5 C4                 ...
        beq     LC4B0                           ; C4A9 F0 05                    ..
        dex                                     ; C4AB CA                       .
        bpl     LC4A6                           ; C4AC 10 F8                    ..
        sec                                     ; C4AE 38                       8
        rts                                     ; C4AF 60                       `
; ----------------------------------------------------------------------------
LC4B0:  lda     LC4BD,x                         ; C4B0 BD BD C4                 ...
        clc                                     ; C4B3 18                       .
        rts                                     ; C4B4 60                       `
; ----------------------------------------------------------------------------
LC4B5:  .byte   $7B,$7D,$7E,$60,$5F,$7B,$7D,$60 ; C4B5 7B 7D 7E 60 5F 7B 7D 60  {}~`_{}`
LC4BD:  .byte   $A6,$A8,$5F,$BA,$A4,$E6,$E8,$FA ; C4BD A6 A8 5F BA A4 E6 E8 FA  .._.....
; ----------------------------------------------------------------------------
LC4C5:  cmp     #$80                            ; C4C5 C9 80                    ..
        bcc     LC4D1                           ; C4C7 90 08                    ..
        cmp     #$A0                            ; C4C9 C9 A0                    ..
        bcs     LC4D1                           ; C4CB B0 04                    ..
        and     #$7F                            ; C4CD 29 7F                    ).
        clc                                     ; C4CF 18                       .
        rts                                     ; C4D0 60                       `
; ----------------------------------------------------------------------------
LC4D1:  sec                                     ; C4D1 38                       8
        rts                                     ; C4D2 60                       `
; ----------------------------------------------------------------------------
LC4D3:  cmp     #$60                            ; C4D3 C9 60                    .`
        bcc     LC4E4                           ; C4D5 90 0D                    ..
        cmp     #$80                            ; C4D7 C9 80                    ..
        bcs     LC4E4                           ; C4D9 B0 09                    ..
        sec                                     ; C4DB 38                       8
        sbc     #$60                            ; C4DC E9 60                    .`
LC4DE:  tay                                     ; C4DE A8                       .
        lda     LC4F3,y                         ; C4DF B9 F3 C4                 ...
        clc                                     ; C4E2 18                       .
        rts                                     ; C4E3 60                       `
; ----------------------------------------------------------------------------
LC4E4:  cmp     #$C0                            ; C4E4 C9 C0                    ..
        bcc     LC4F1                           ; C4E6 90 09                    ..
        cmp     #$E0                            ; C4E8 C9 E0                    ..
        bcs     LC4F1                           ; C4EA B0 05                    ..
        sec                                     ; C4EC 38                       8
        sbc     #$C0                            ; C4ED E9 C0                    ..
        bra     LC4DE                           ; C4EF 80 ED                    ..
LC4F1:  sec                                     ; C4F1 38                       8
        rts                                     ; C4F2 60                       `
; ----------------------------------------------------------------------------
LC4F3:  .byte   $61,$73,$60,$61,$7A,$7A,$7B,$7C ; C4F3 61 73 60 61 7A 7A 7B 7C  as`azz{|
        .byte   $7D,$63,$65,$64,$4C,$79,$78,$66 ; C4FB 7D 63 65 64 4C 79 78 66  }cedLyxf
        .byte   $63,$5E,$7B,$6B,$7C,$66,$77,$4F ; C503 63 5E 7B 6B 7C 66 77 4F  c^{k|fwO
        .byte   $7E,$7D,$6A,$62,$60,$60,$7F,$5F ; C50B 7E 7D 6A 62 60 60 7F 5F  ~}jb``._
; ----------------------------------------------------------------------------
LC513:  cmp     #$A0                            ; C513 C9 A0                    ..
        bcc     LC524                           ; C515 90 0D                    ..
        cmp     #$C0                            ; C517 C9 C0                    ..
        bcs     LC524                           ; C519 B0 09                    ..
        sec                                     ; C51B 38                       8
        sbc     #$A0                            ; C51C E9 A0                    ..
LC51E:  tay                                     ; C51E A8                       .
        lda     LC533,y                         ; C51F B9 33 C5                 .3.
        clc                                     ; C522 18                       .
        rts                                     ; C523 60                       `
; ----------------------------------------------------------------------------
LC524:  cmp     #$E0                            ; C524 C9 E0                    ..
        bcc     LC531                           ; C526 90 09                    ..
        cmp     #$FF                            ; C528 C9 FF                    ..
        bcs     LC531                           ; C52A B0 05                    ..
        sec                                     ; C52C 38                       8
        sbc     #$E0                            ; C52D E9 E0                    ..
        bra     LC51E                           ; C52F 80 ED                    ..
LC531:  sec                                     ; C531 38                       8
        rts                                     ; C532 60                       `
; ----------------------------------------------------------------------------
LC533:  .byte   $20,$7C,$7B,$7A,$7B,$7C,$74,$7D ; C533 20 7C 7B 7A 7B 7C 74 7D   |{z{|t}
        .byte   $76,$72,$7D,$76,$6C,$65,$63,$7B ; C53B 76 72 7D 76 6C 65 63 7B  vr}vlec{
        .byte   $66,$75,$73,$74,$7C,$7C,$7D,$7A ; C543 66 75 73 74 7C 7C 7D 7A  fust||}z
        .byte   $7A,$7B,$64,$6D,$6F,$64,$6E,$25 ; C54B 7A 7B 64 6D 6F 64 6E 25  z{dmodn%
; ----------------------------------------------------------------------------
LC553:  cmp     #$FF                            ; C553 C9 FF                    ..
        bne     LC55B                           ; C555 D0 04                    ..
        lda     #$7F                            ; C557 A9 7F                    ..
        clc                                     ; C559 18                       .
        rts                                     ; C55A 60                       `
; ----------------------------------------------------------------------------
LC55B:  sec                                     ; C55B 38                       8
        rts                                     ; C55C 60                       `
; ----------------------------------------------------------------------------
LC55D:  cmp     #$5F                            ; C55D C9 5F                    ._
        bne     LC565                           ; C55F D0 04                    ..
        lda     #$A4                            ; C561 A9 A4                    ..
        clc                                     ; C563 18                       .
        rts                                     ; C564 60                       `
; ----------------------------------------------------------------------------
LC565:  sec                                     ; C565 38                       8
        rts                                     ; C566 60                       `
; ----------------------------------------------------------------------------
LC567:  ldx     #$08                            ; C567 A2 08                    ..
LC569:  cmp     LC581,x                         ; C569 DD 81 C5                 ...
        beq     LC573                           ; C56C F0 05                    ..
        dex                                     ; C56E CA                       .
        bpl     LC569                           ; C56F 10 F8                    ..
        sec                                     ; C571 38                       8
        rts                                     ; C572 60                       `
; ----------------------------------------------------------------------------
LC573:  lda     LC578,x                         ; C573 BD 78 C5                 .x.
        clc                                     ; C576 18                       .
        rts                                     ; C577 60                       `
; ----------------------------------------------------------------------------
LC578:  .byte   $5B,$5C,$5D,$2D,$27,$5F,$5B,$5D ; C578 5B 5C 5D 2D 27 5F 5B 5D  [\]-'_[]
        .byte   $27                             ; C580 27                       '
LC581:  .byte   $A6,$7C,$A8,$5F,$BA,$A4,$E6,$E8 ; C581 A6 7C A8 5F BA A4 E6 E8  .|._....
        .byte   $FA                             ; C589 FA                       .
; ----------------------------------------------------------------------------
LC58A:  ldx     #$07                            ; C58A A2 07                    ..
LC58C:  cmp     LC4BD,x                         ; C58C DD BD C4                 ...
        beq     LC596                           ; C58F F0 05                    ..
        dex                                     ; C591 CA                       .
        bpl     LC58C                           ; C592 10 F8                    ..
        sec                                     ; C594 38                       8
        rts                                     ; C595 60                       `
; ----------------------------------------------------------------------------
LC596:  lda     LC4B5,x                         ; C596 BD B5 C4                 ...
        clc                                     ; C599 18                       .
        rts                                     ; C59A 60                       `
; ----------------------------------------------------------------------------
LC59B:  cmp     #$7B                            ; C59B C9 7B                    .{
        bcc     LC5AC                           ; C59D 90 0D                    ..
        cmp     #$80                            ; C59F C9 80                    ..
        bcs     LC5AC                           ; C5A1 B0 09                    ..
        sec                                     ; C5A3 38                       8
        sbc     #$60                            ; C5A4 E9 60                    .`
        tay                                     ; C5A6 A8                       .
        lda     LC4F3,y                         ; C5A7 B9 F3 C4                 ...
        clc                                     ; C5AA 18                       .
        rts                                     ; C5AB 60                       `
; ----------------------------------------------------------------------------
LC5AC:  sec                                     ; C5AC 38                       8
        rts                                     ; C5AD 60                       `
; ----------------------------------------------------------------------------
LC5AE:  cmp     #$C1                            ; C5AE C9 C1                    ..
        bcc     LC5BA                           ; C5B0 90 08                    ..
        cmp     #$DB                            ; C5B2 C9 DB                    ..
        bcs     LC5BA                           ; C5B4 B0 04                    ..
        eor     #$80                            ; C5B6 49 80                    I.
        clc                                     ; C5B8 18                       .
        rts                                     ; C5B9 60                       `
; ----------------------------------------------------------------------------
LC5BA:  sec                                     ; C5BA 38                       8
        rts                                     ; C5BB 60                       `
; ----------------------------------------------------------------------------
LC5BC:  ldx     #$0A                            ; C5BC A2 0A                    ..
LC5BE:  cmp     LC5CD,x                         ; C5BE DD CD C5                 ...
        beq     LC5C8                           ; C5C1 F0 05                    ..
        dex                                     ; C5C3 CA                       .
        bpl     LC5BE                           ; C5C4 10 F8                    ..
        sec                                     ; C5C6 38                       8
        rts                                     ; C5C7 60                       `
; ----------------------------------------------------------------------------
LC5C8:  lda     LC5D8,x                         ; C5C8 BD D8 C5                 ...
        clc                                     ; C5CB 18                       .
        rts                                     ; C5CC 60                       `
; ----------------------------------------------------------------------------
LC5CD:  .byte   $A6,$A8,$BA,$5F,$A4,$E6,$E8,$FA ; C5CD A6 A8 BA 5F A4 E6 E8 FA  ..._....
        .byte   $7B,$7E,$7F                     ; C5D5 7B 7E 7F                 {~.
LC5D8:  .byte   $7B,$7D,$60,$7E,$5F,$7B,$7D,$60 ; C5D8 7B 7D 60 7E 5F 7B 7D 60  {}`~_{}`
        .byte   $20,$20,$20                     ; C5E0 20 20 20
; ----------------------------------------------------------------------------
LC5E3:  cmp     #$A0                            ; C5E3 C9 A0                    ..
        bcc     LC5ED                           ; C5E5 90 06                    ..
        cmp     #$C0                            ; C5E7 C9 C0                    ..
        bcs     LC5ED                           ; C5E9 B0 02                    ..
        bra     LC5F1                           ; C5EB 80 04                    ..
LC5ED:  cmp     #$E0                            ; C5ED C9 E0                    ..
        bcc     LC5F5                           ; C5EF 90 04                    ..
LC5F1:  lda     #$20                            ; C5F1 A9 20                    .
        clc                                     ; C5F3 18                       .
        rts                                     ; C5F4 60                       `
; ----------------------------------------------------------------------------
LC5F5:  sec                                     ; C5F5 38                       8
        rts                                     ; C5F6 60                       `
; ----------------------------------------------------------------------------
LC5F7:  cmp     #$60                            ; C5F7 C9 60                    .`
        bcc     LC601                           ; C5F9 90 06                    ..
        cmp     #$80                            ; C5FB C9 80                    ..
        bcs     LC601                           ; C5FD B0 02                    ..
        bra     LC605                           ; C5FF 80 04                    ..
LC601:  cmp     #$A0                            ; C601 C9 A0                    ..
        bcc     LC609                           ; C603 90 04                    ..
LC605:  lda     #$20                            ; C605 A9 20                    .
        clc                                     ; C607 18                       .
        rts                                     ; C608 60                       `
; ----------------------------------------------------------------------------
LC609:  sec                                     ; C609 38                       8
        rts                                     ; C60A 60                       `
; ----------------------------------------------------------------------------
LC60B:  jmp     (LC60E,x)                       ; C60B 7C 0E C6                 |..
LC60E:  .addr   LC618                           ; C60E 18 C6                    ..
        .addr   LC61E                           ; C610 1E C6                    ..
        .addr   LC626                           ; C612 26 C6                    &.
        .addr   LC63F                           ; C614 3F C6                    ?.
        .addr   LC65C                           ; C616 5C C6                    \.
; ----------------------------------------------------------------------------
LC618:  jsr     LC63F                           ; C618 20 3F C6                  ?.
        bcs     LC634                           ; C61B B0 17                    ..
        rts                                     ; C61D 60                       `
; ----------------------------------------------------------------------------
LC61E:  sta     VIA2_T2CL                       ; C61E 8D 88 F8                 ...
        sty     VIA2_T2CH                       ; C621 8C 89 F8                 ...
        bra     LC63F                           ; C624 80 19                    ..
LC626:  php                                     ; C626 08                       .
        sei                                     ; C627 78                       x
        eor     #$FF                            ; C628 49 FF                    I.
        sta     $041A                           ; C62A 8D 1A 04                 ...
        tya                                     ; C62D 98                       .
        eor     #$FF                            ; C62E 49 FF                    I.
        sta     $041B                           ; C630 8D 1B 04                 ...
        .byte   $2C                             ; C633 2C                       ,
LC634:  php                                     ; C634 08                       .
        sei                                     ; C635 78                       x
        inc     $041A                           ; C636 EE 1A 04                 ...
        bne     LC63E                           ; C639 D0 03                    ..
        inc     $041B                           ; C63B EE 1B 04                 ...
LC63E:  .byte   $2C                             ; C63E 2C                       ,
LC63F:  php                                     ; C63F 08                       .
        sei                                     ; C640 78                       x
        lda     $041A                           ; C641 AD 1A 04                 ...
        ora     $041B                           ; C644 0D 1B 04                 ...
        beq     LC654                           ; C647 F0 0B                    ..
        lda     #$10                            ; C649 A9 10                    ..
        tsb     VIA2_ACR                        ; C64B 0C 8B F8                 ...
        sta     VIA2_SR                         ; C64E 8D 8A F8                 ...
        plp                                     ; C651 28                       (
        sec                                     ; C652 38                       8
        rts                                     ; C653 60                       `
; ----------------------------------------------------------------------------
LC654:  lda     #$10                            ; C654 A9 10                    ..
        trb     VIA2_ACR                        ; C656 1C 8B F8                 ...
        plp                                     ; C659 28                       (
        clc                                     ; C65A 18                       .
        rts                                     ; C65B 60                       `
; ----------------------------------------------------------------------------
LC65C:  lda     #$A0                            ; C65C A9 A0                    ..
        tay                                     ; C65E A8                       .
        jsr     LC61E                           ; C65F 20 1E C6                  ..
        lda     #$06                            ; C662 A9 06                    ..
        ldy     #$00                            ; C664 A0 00                    ..
        jmp     LC626                           ; C666 4C 26 C6                 L&.
; ----------------------------------------------------------------------------
; It seems the following routines will be copied from $0338 to the RAM and
; used from there. Guessed purpose: the ROM itself is not always paged in, so
; we need them to be in RAM. Note about the "dummy writes", those (maybe ...)
; used to set/reset flip-flops to switch on/off mapping of various parts of
; the memories, but dunno what exactly :(
; ----------------------------------------------------
; My best guess so far: dummy writes to ...
; * $FA00: enables lower parts of KERNAL to be "seen"
; * $FA80: disables the above but enable ROM mapped from $4000 to be seen
; * $FB00: disables all mapped, but the "high area"
; "High area" is the end of the KERNAL & some I/O registers from
; at $FA00 (or probably from $F800?) and needs to be always (?)
; seen.
; ----------------------------------------------------
; This will be $0338 in RAM. It's even used by BASIC for example, the guessed
; purpose: allow to use RAM for BASIC even at an area where there is BASIC
; ROM paged in (from $4000) during its execution. $033C will be the RAM zp
; loc of LDA (zp),Y op.
LC669:  sta     MMU_MODE_RAM                    ; C669 8D 00 FB                 ...
        lda     ($00),y                         ; C66C B1 00                    ..
        sta     MMU_MODE_APPL                   ; C66E 8D 80 FA                 ...
        rts                                     ; C671 60                       `
; ----------------------------------------------------------------------------
; This will be $0341 in RAM.
; $0345 will be the RAM zp loc of STA (zp),Y op.
; This routine is also used by BASIC.
; It seems ZP loc of STA is modified in RAM.
        sta     MMU_MODE_RAM                    ; C672 8D 00 FB                 ...
        sta     ($00),y                         ; C675 91 00                    ..
        sta     MMU_MODE_APPL                   ; C677 8D 80 FA                 ...
        rts                                     ; C67A 60                       `
; ----------------------------------------------------------------------------
; This will be $034A in RAM.
; $034E will be the RAM zp loc of LDA (zp),Y op.
        sta     MMU_MODE_RAM                    ; C67B 8D 00 FB                 ...
        lda     ($00),y                         ; C67E B1 00                    ..
        sta     MMU_MODE_KERN                   ; C680 8D 00 FA                 ...
        rts                                     ; C683 60                       `
; ----------------------------------------------------------------------------
; This will be $0353 in RAM.
; $0357 will be the RAM zp loc of LDA (zp),Y op.
        sta     MMU_MODE_APPL                   ; C684 8D 80 FA                 ...
        lda     ($00),y                         ; C687 B1 00                    ..
        sta     MMU_MODE_KERN                   ; C689 8D 00 FA                 ...
        rts                                     ; C68C 60                       `
; ----------------------------------------------------------------------------
; This will be $035C in RAM.
; $0360 will be the RAM zp loc of STA (zp),Y op.
        sta     MMU_MODE_RAM                    ; C68D 8D 00 FB                 ...
        sta     ($00),y                         ; C690 91 00                    ..
        sta     MMU_MODE_KERN                   ; C692 8D 00 FA                 ...
        rts                                     ; C695 60                       `
; ----------------------------------------------------------------------------
KL_RESTOR:
        ldx     #$90                            ; C696 A2 90                    ..
        ldy     #$FA                            ; C698 A0 FA                    ..
        clc                                     ; C69A 18                       .
KL_VECTOR:
        php                                     ; C69B 08                       .
        sei                                     ; C69C 78                       x
        stx     FNptr_lo                        ; C69D 86 AE                    ..
        sty     FNptr_hi                        ; C69F 84 AF                    ..
; This copies the routines from $C669 into the RAM from $338.
        ldx     #$2C                            ; C6A1 A2 2C                    .,
LC6A3:  lda     LC669,x                         ; C6A3 BD 69 C6                 .i.
        sta     FROM_C669,x                     ; C6A6 9D 38 03                 .8.
        dex                                     ; C6A9 CA                       .
        bpl     LC6A3                           ; C6AA 10 F7                    ..
        ldy     #$AE                            ; C6AC A0 AE                    ..
        sty     $034E                           ; C6AE 8C 4E 03                 .N.
        sty     $0360                           ; C6B1 8C 60 03                 .`.
        ldy     #$23                            ; C6B4 A0 23                    .#
LC6B6:  lda     RAMVEC_IRQ,y                    ; C6B6 B9 14 03                 ...
        bcs     LC6BE                           ; C6B9 B0 03                    ..
        jsr     FROM_C67B                       ; C6BB 20 4A 03                  J.
LC6BE:  sta     RAMVEC_IRQ,y                    ; C6BE 99 14 03                 ...
        bcc     LC6C6                           ; C6C1 90 03                    ..
        jsr     FROM_C68D                       ; C6C3 20 5C 03                  \.
LC6C6:  dey                                     ; C6C6 88                       .
        bpl     LC6B6                           ; C6C7 10 ED                    ..
        plp                                     ; C6C9 28                       (
        rts                                     ; C6CA 60                       `
; ----------------------------------------------------------------------------
LC6CB:  sei                                     ; C6CB 78                       x
        ldx     #$23                            ; C6CC A2 23                    .#
LC6CE:  ldy     RAMVEC_IRQ,x                    ; C6CE BC 14 03                 ...
        lda     $03C3,x                         ; C6D1 BD C3 03                 ...
        sta     RAMVEC_IRQ,x                    ; C6D4 9D 14 03                 ...
        tya                                     ; C6D7 98                       .
        sta     $03C3,x                         ; C6D8 9D C3 03                 ...
        dex                                     ; C6DB CA                       .
        bpl     LC6CE                           ; C6DC 10 F0                    ..
        rts                                     ; C6DE 60                       `
; ----------------------------------------------------------------------------
LC6DF:  stz     L03B7                           ; C6DF 9C B7 03                 ...
        stz     $03A1                           ; C6E2 9C A1 03                 ...
        ldx     #$FF                            ; C6E5 A2 FF                    ..
        stx     $03BB                           ; C6E7 8E BB 03                 ...
        txs                                     ; C6EA 9A                       .
        ldx     #$00                            ; C6EB A2 00                    ..
        jsr     LD230                           ; C6ED 20 30 D2                  0.
        jsr     ShowInLineText                  ; C6F0 20 5B FB                  [.
        .byte   $0D                             ; C6F3 0D                       .
        .byte   "COMMODORE LCD MONITOR"         ; C6F4 43 4F 4D 4D 4F 44 4F 52  COMMODOR
                                                ; C6FC 45 20 4C 43 44 20 4D 4F  E LCD MO
                                                ; C704 4E 49 54 4F 52           NITOR
        .byte   $00                             ; C709 00                       .
; ----------------------------------------------------------------------------
        bra     LC748                           ; C70A 80 3C                    .<
LC70C:  cld                                     ; C70C D8                       .
        ldx     #$05                            ; C70D A2 05                    ..
LC70F:  pla                                     ; C70F 68                       h
        sta     $03B5,x                         ; C710 9D B5 03                 ...
        dex                                     ; C713 CA                       .
        bpl     LC70F                           ; C714 10 F9                    ..
        jsr     LB2E4                           ; C716 20 E4 B2                  ..
        jsr     KL_RESTOR                       ; C719 20 96 C6                  ..
        jsr     LFD2A                           ; C71C 20 2A FD                  *.
        tsx                                     ; C71F BA                       .
        stx     $03BB                           ; C720 8E BB 03                 ...
        cpx     #$0A                            ; C723 E0 0A                    ..
        bcs     LC72A                           ; C725 B0 03                    ..
        ldx     #$FF                            ; C727 A2 FF                    ..
        txs                                     ; C729 9A                       .
LC72A:  php                                     ; C72A 08                       .
        jsr     ShowInLineText                  ; C72B 20 5B FB                  [.
        .byte   $0D                             ; C72E 0D                       .
        .byte   "BREAK"                         ; C72F 42 52 45 41 4B           BREAK
        .byte   $00                             ; C734 00                       .
; ----------------------------------------------------------------------------
        plp                                     ; C735 28                       (
        bcs     LC748                           ; C736 B0 10                    ..
        jsr     ShowInLineText                  ; C738 20 5B FB                  [.
        .byte   " STACK RESET"                  ; C73B 20 53 54 41 43 4B 20 52   STACK R
                                                ; C743 45 53 45 54              ESET
        .byte   $00                             ; C747 00                       .
; ----------------------------------------------------------------------------
LC748:  lda     #$C0                            ; C748 A9 C0                    ..
        sta     KernMsg                         ; C74A 8D 83 03                 ...
        lda     #$00                            ; C74D A9 00                    ..
        sta     $CB                             ; C74F 85 CB                    ..
        sta     $CC                             ; C751 85 CC                    ..
        cli                                     ; C753 58                       X
LC754:  jsr     LCC13                           ; C754 20 13 CC                  ..
        bra     LC767                           ; C757 80 0E                    ..
LC759:  jsr     KL_RESTOR                       ; C759 20 96 C6                  ..
        jsr     LFD2A                           ; C75C 20 2A FD                  *.
        jsr     ShowInLineText                  ; C75F 20 5B FB                  [.
        .byte   $1D,$1D                         ; C762 1D 1D                    ..
        .byte   ":?"                            ; C764 3A 3F                    :?
        .byte   $00                             ; C766 00                       .
; ----------------------------------------------------------------------------
LC767:  jsr     PrintNewLine                    ; C767 20 D3 CA                  ..
        stz     $CD                             ; C76A 64 CD                    d.
        ldx     #$00                            ; C76C A2 00                    ..
LC76E:  jsr     LFD3D                           ; C76E 20 3D FD                  =.
        sta     L0470,x                         ; C771 9D 70 04                 .p.
        stx     $CE                             ; C774 86 CE                    ..
        inx                                     ; C776 E8                       .
        cpx     #$50                            ; C777 E0 50                    .P
        beq     LC77F                           ; C779 F0 04                    ..
        cmp     #$0D                            ; C77B C9 0D                    ..
        bne     LC76E                           ; C77D D0 EF                    ..
LC77F:  jsr     LCAFD                           ; C77F 20 FD CA                  ..
        beq     LC767                           ; C782 F0 E3                    ..
        cmp     #$20                            ; C784 C9 20                    .
        beq     LC77F                           ; C786 F0 F7                    ..
        ldx     #$10                            ; C788 A2 10                    ..
LC78A:  cmp     LC88C,x                         ; C78A DD 8C C8                 ...
        beq     LC794                           ; C78D F0 05                    ..
        dex                                     ; C78F CA                       .
        bpl     LC78A                           ; C790 10 F8                    ..
        bmi     LC759                           ; C792 30 C5                    0.
LC794:  cpx     #$0E                            ; C794 E0 0E                    ..
        bcs     LC7A6                           ; C796 B0 0E                    ..
        txa                                     ; C798 8A                       .
        asl     a                               ; C799 0A                       .
        tax                                     ; C79A AA                       .
        lda     LC89E,x                         ; C79B BD 9E C8                 ...
        pha                                     ; C79E 48                       H
        lda     LC89D,x                         ; C79F BD 9D C8                 ...
        pha                                     ; C7A2 48                       H
        jmp     LCA75                           ; C7A3 4C 75 CA                 Lu.
; ----------------------------------------------------------------------------
LC7A6:  sta     $039F                           ; C7A6 8D 9F 03                 ...
        jsr     PrintNewLine                    ; C7A9 20 D3 CA                  ..
        jmp     LC9B9                           ; C7AC 4C B9 C9                 L..
; ----------------------------------------------------------------------------
        bcs     LC7B9                           ; C7AF B0 08                    ..
        jsr     LCB19                           ; C7B1 20 19 CB                  ..
        jsr     LCA75                           ; C7B4 20 75 CA                  u.
        bcc     LC7BF                           ; C7B7 90 06                    ..
LC7B9:  lda     #$07                            ; C7B9 A9 07                    ..
        sta     $C7                             ; C7BB 85 C7                    ..
        bne     LC7D0                           ; C7BD D0 11                    ..
LC7BF:  jsr     LCB22                           ; C7BF 20 22 CB                  ".
        lsr     a                               ; C7C2 4A                       J
        ror     $C7                             ; C7C3 66 C7                    f.
        lsr     a                               ; C7C5 4A                       J
        ror     $C7                             ; C7C6 66 C7                    f.
        lsr     a                               ; C7C8 4A                       J
        ror     $C7                             ; C7C9 66 C7                    f.
        lsr     a                               ; C7CB 4A                       J
        ror     $C7                             ; C7CC 66 C7                    f.
        sta     $C8                             ; C7CE 85 C8                    ..
LC7D0:  jsr     LFDB9                           ; C7D0 20 B9 FD                  ..
        beq     LC7E2                           ; C7D3 F0 0D                    ..
        jsr     LC8B9                           ; C7D5 20 B9 C8                  ..
        lda     #$10                            ; C7D8 A9 10                    ..
        jsr     LCB5D                           ; C7DA 20 5D CB                  ].
        jsr     LCB30                           ; C7DD 20 30 CB                  0.
        bcs     LC7D0                           ; C7E0 B0 EE                    ..
LC7E2:  jmp     LC767                           ; C7E2 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
        bcs     LC81B                           ; C7E5 B0 34                    .4
        lda     $C7                             ; C7E7 A5 C7                    ..
        ldy     $C8                             ; C7E9 A4 C8                    ..
        sta     $03B6                           ; C7EB 8D B6 03                 ...
        sty     $03B5                           ; C7EE 8C B5 03                 ...
        ldy     #$00                            ; C7F1 A0 00                    ..
LC7F3:  jsr     LCA75                           ; C7F3 20 75 CA                  u.
        bcs     LC81B                           ; C7F6 B0 23                    .#
        lda     $C7                             ; C7F8 A5 C7                    ..
        sta     L03B7,y                         ; C7FA 99 B7 03                 ...
        iny                                     ; C7FD C8                       .
        cpy     #$05                            ; C7FE C0 05                    ..
        bcc     LC7F3                           ; C800 90 F1                    ..
        jsr     LCA75                           ; C802 20 75 CA                  u.
        bcs     LC81B                           ; C805 B0 14                    ..
        lda     $C7                             ; C807 A5 C7                    ..
        bne     LC810                           ; C809 D0 05                    ..
        stz     $03A1                           ; C80B 9C A1 03                 ...
        bra     LC81B                           ; C80E 80 0B                    ..
LC810:  cmp     #$01                            ; C810 C9 01                    ..
        beq     LC818                           ; C812 F0 04                    ..
        cmp     #$02                            ; C814 C9 02                    ..
        bne     LC81B                           ; C816 D0 03                    ..
LC818:  sta     $03A1                           ; C818 8D A1 03                 ...
LC81B:  jsr     ShowInLineText                  ; C81B 20 5B FB                  [.
        .byte   $91,$91,$00                     ; C81E 91 91 00                 ...
; ----------------------------------------------------------------------------
        jmp     LC754                           ; C821 4C 54 C7                 LT.
; ----------------------------------------------------------------------------
        bcs     LC83A                           ; C824 B0 14                    ..
        jsr     LCB19                           ; C826 20 19 CB                  ..
        ldy     #$00                            ; C829 A0 00                    ..
LC82B:  jsr     LCA75                           ; C82B 20 75 CA                  u.
        bcs     LC83A                           ; C82E B0 0A                    ..
        lda     $C7                             ; C830 A5 C7                    ..
        jsr     LCC4B                           ; C832 20 4B CC                  K.
        iny                                     ; C835 C8                       .
        cpy     #$10                            ; C836 C0 10                    ..
        bcc     LC82B                           ; C838 90 F1                    ..
LC83A:  jsr     LB220                           ; C83A 20 20 B2                   .
        lda     #$91                            ; C83D A9 91                    ..
        jsr     ShowChar_                       ; C83F 20 B3 AB                  ..
        jsr     LC8B9                           ; C842 20 B9 C8                  ..
        jmp     LC767                           ; C845 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
        bcs     LC854                           ; C848 B0 0A                    ..
        lda     $C7                             ; C84A A5 C7                    ..
        sta     $03B6                           ; C84C 8D B6 03                 ...
        lda     $C8                             ; C84F A5 C8                    ..
        sta     $03B5                           ; C851 8D B5 03                 ...
LC854:  jsr     PrintNewLine                    ; C854 20 D3 CA                  ..
        ldx     $03BB                           ; C857 AE BB 03                 ...
        txs                                     ; C85A 9A                       .
        ldx     $03B5                           ; C85B AE B5 03                 ...
        ldy     $03B6                           ; C85E AC B6 03                 ...
        bne     LC864                           ; C861 D0 01                    ..
        dex                                     ; C863 CA                       .
LC864:  dey                                     ; C864 88                       .
        phx                                     ; C865 DA                       .
        phy                                     ; C866 5A                       Z
        ldx     $03A1                           ; C867 AE A1 03                 ...
        cpx     #$03                            ; C86A E0 03                    ..
        bcc     LC870                           ; C86C 90 02                    ..
        ldx     #$02                            ; C86E A2 02                    ..
LC870:  lda     LC886,x                         ; C870 BD 86 C8                 ...
        pha                                     ; C873 48                       H
        lda     LC889,x                         ; C874 BD 89 C8                 ...
        pha                                     ; C877 48                       H
        lda     L03B7                           ; C878 AD B7 03                 ...
        pha                                     ; C87B 48                       H
        ldx     $03B9                           ; C87C AE B9 03                 ...
        ldy     $03BA                           ; C87F AC BA 03                 ...
        lda     $03B8                           ; C882 AD B8 03                 ...
        rti                                     ; C885 40                       @
; ----------------------------------------------------------------------------
LC886:  .byte   $FD,$FD,$FD                     ; C886 FD FD FD                 ...
LC889:  .byte   "~zf"                           ; C889 7E 7A 66                 ~zf
LC88C:  .byte   "XMRGTCDA.HF>;WLSV"             ; C88C 58 4D 52 47 54 43 44 41  XMRGTCDA
                                                ; C894 2E 48 46 3E 3B 57 4C 53  .HF>;WLS
                                                ; C89C 56                       V
LC89D:  .byte   "%"                             ; C89D 25                       %
LC89E:  .byte   $84,$AE,$C7                     ; C89E 84 AE C7                 ...
        .byte   "S"                             ; C8A1 53                       S
        .byte   $C7                             ; C8A2 C7                       .
        .byte   "G"                             ; C8A3 47                       G
        .byte   $C8,$FD,$C8,$F5,$C8,$8E,$CC     ; C8A4 C8 FD C8 F5 C8 8E CC     .......
        .byte   "3"                             ; C8AB 33                       3
        .byte   $CF                             ; C8AC CF                       .
        .byte   "3"                             ; C8AD 33                       3
        .byte   $CF                             ; C8AE CF                       .
        .byte   "T"                             ; C8AF 54                       T
        .byte   $C9                             ; C8B0 C9                       .
        .byte   "S"                             ; C8B1 53                       S
        .byte   $CA                             ; C8B2 CA                       .
        .byte   "#"                             ; C8B3 23                       #
        .byte   $C8,$E4,$C7,$D0,$D0             ; C8B4 C8 E4 C7 D0 D0           .....
; ----------------------------------------------------------------------------
LC8B9:  jsr     ShowInLineText                  ; C8B9 20 5B FB                  [.
        .byte   $0D                             ; C8BC 0D                       .
        .byte   ">"                             ; C8BD 3E                       >
        .byte   $00                             ; C8BE 00                       .
        .byte   " "                             ; C8BF 20
        .byte   $C3,$CA,$A0,$00                 ; C8C0 C3 CA A0 00              ....
; ----------------------------------------------------------------------------
LC8C4:  tya                                     ; C8C4 98                       .
        and     #$03                            ; C8C5 29 03                    ).
        bne     LC8CF                           ; C8C7 D0 06                    ..
        jsr     ShowInLineText                  ; C8C9 20 5B FB                  [.
        .byte   "  "                            ; C8CC 20 20
        .byte   $00                             ; C8CE 00                       .
; ----------------------------------------------------------------------------
LC8CF:  jsr     LCC67                           ; C8CF 20 67 CC                  g.
        jsr     PrintHexByteAndSpace            ; C8D2 20 CD CA                  ..
        iny                                     ; C8D5 C8                       .
        cpy     #$10                            ; C8D6 C0 10                    ..
        bcc     LC8C4                           ; C8D8 90 EA                    ..
        jsr     ShowInLineText                  ; C8DA 20 5B FB                  [.
        .byte   ":"                             ; C8DD 3A                       :
        .byte   $12,$00                         ; C8DE 12 00                    ..
; ----------------------------------------------------------------------------
        ldy     #$00                            ; C8E0 A0 00                    ..
LC8E2:  jsr     LCC67                           ; C8E2 20 67 CC                  g.
        and     #$7F                            ; C8E5 29 7F                    ).
        cmp     #$20                            ; C8E7 C9 20                    .
        bcs     LC8ED                           ; C8E9 B0 02                    ..
        lda     #$2E                            ; C8EB A9 2E                    ..
LC8ED:  jsr     ShowChar_                       ; C8ED 20 B3 AB                  ..
        iny                                     ; C8F0 C8                       .
        cpy     #$10                            ; C8F1 C0 10                    ..
        bcc     LC8E2                           ; C8F3 90 ED                    ..
        rts                                     ; C8F5 60                       `
; ----------------------------------------------------------------------------
        stz     $D1                             ; C8F6 64 D1                    d.
        lda     #$00                            ; C8F8 A9 00                    ..
        sta     $D0                             ; C8FA 85 D0                    ..
        bra     LC909                           ; C8FC 80 0B                    ..
        lda     #$80                            ; C8FE A9 80                    ..
        sta     $D0                             ; C900 85 D0                    ..
        jsr     LCB7E                           ; C902 20 7E CB                  ~.
        bcs     LC952                           ; C905 B0 4B                    .K
        bra     LC913                           ; C907 80 0A                    ..
LC909:  jsr     LCB67                           ; C909 20 67 CB                  g.
        bcs     LC952                           ; C90C B0 44                    .D
        jsr     LCA75                           ; C90E 20 75 CA                  u.
        bcs     LC952                           ; C911 B0 3F                    .?
LC913:  jsr     PrintNewLine                    ; C913 20 D3 CA                  ..
        ldy     #$00                            ; C916 A0 00                    ..
LC918:  jsr     LCC67                           ; C918 20 67 CC                  g.
        bit     $D0                             ; C91B 24 D0                    $.
        bpl     LC922                           ; C91D 10 03                    ..
        jsr     LCC46                           ; C91F 20 46 CC                  F.
LC922:  pha                                     ; C922 48                       H
        jsr     LCC6A                           ; C923 20 6A CC                  j.
        sta     $D2                             ; C926 85 D2                    ..
        pla                                     ; C928 68                       h
        cmp     $D2                             ; C929 C5 D2                    ..
        beq     LC935                           ; C92B F0 08                    ..
        jsr     LFDB9                           ; C92D 20 B9 FD                  ..
        beq     LC94F                           ; C930 F0 1D                    ..
        jsr     PrintHexWordAndSpaceFromMem     ; C932 20 C3 CA                  ..
LC935:  lda     $D1                             ; C935 A5 D1                    ..
        beq     LC941                           ; C937 F0 08                    ..
        jsr     LCB30                           ; C939 20 30 CB                  0.
        jsr     LCB52                           ; C93C 20 52 CB                  R.
        bra     LC94A                           ; C93F 80 09                    ..
LC941:  inc     $C7                             ; C941 E6 C7                    ..
        bne     LC947                           ; C943 D0 02                    ..
        inc     $C8                             ; C945 E6 C8                    ..
LC947:  jsr     LCB5B                           ; C947 20 5B CB                  [.
LC94A:  jsr     LCB44                           ; C94A 20 44 CB                  D.
        bcs     LC918                           ; C94D B0 C9                    ..
LC94F:  jmp     LC767                           ; C94F 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LC952:  jmp     LC759                           ; C952 4C 59 C7                 LY.
; ----------------------------------------------------------------------------
        .byte   $20                             ; C955 20
        .byte   $67                             ; C956 67                       g
LC957:  .byte   $CB                             ; C957 CB                       .
        bcs     LC9B6                           ; C958 B0 5C                    .\
        ldy     #$00                            ; C95A A0 00                    ..
        jsr     LCAFD                           ; C95C 20 FD CA                  ..
        cmp     #$27                            ; C95F C9 27                    .'
        bne     LC975                           ; C961 D0 12                    ..
        jsr     LCAFD                           ; C963 20 FD CA                  ..
LC966:  sta     $0450,y                         ; C966 99 50 04                 .P.
        iny                                     ; C969 C8                       .
        jsr     LCAFD                           ; C96A 20 FD CA                  ..
        beq     LC98A                           ; C96D F0 1B                    ..
        cpy     #$20                            ; C96F C0 20                    .
        bne     LC966                           ; C971 D0 F3                    ..
        beq     LC98A                           ; C973 F0 15                    ..
LC975:  sty     $03A0                           ; C975 8C A0 03                 ...
        jsr     LCA73                           ; C978 20 73 CA                  s.
LC97B:  lda     $C7                             ; C97B A5 C7                    ..
        sta     $0450,y                         ; C97D 99 50 04                 .P.
        iny                                     ; C980 C8                       .
        jsr     LCA75                           ; C981 20 75 CA                  u.
        bcs     LC98A                           ; C984 B0 04                    ..
        cpy     #$20                            ; C986 C0 20                    .
        bne     LC97B                           ; C988 D0 F1                    ..
LC98A:  sty     $039F                           ; C98A 8C 9F 03                 ...
        jsr     PrintNewLine                    ; C98D 20 D3 CA                  ..
LC990:  ldx     #$00                            ; C990 A2 00                    ..
        ldy     #$00                            ; C992 A0 00                    ..
LC994:  jsr     LCC67                           ; C994 20 67 CC                  g.
        cmp     $0450,x                         ; C997 DD 50 04                 .P.
        bne     LC9AB                           ; C99A D0 0F                    ..
        iny                                     ; C99C C8                       .
        inx                                     ; C99D E8                       .
        cpx     $039F                           ; C99E EC 9F 03                 ...
        bne     LC994                           ; C9A1 D0 F1                    ..
        jsr     LFDB9                           ; C9A3 20 B9 FD                  ..
        beq     LC9B3                           ; C9A6 F0 0B                    ..
        jsr     PrintHexWordAndSpaceFromMem     ; C9A8 20 C3 CA                  ..
LC9AB:  jsr     LCB5B                           ; C9AB 20 5B CB                  [.
        jsr     LCB44                           ; C9AE 20 44 CB                  D.
        bcs     LC990                           ; C9B1 B0 DD                    ..
LC9B3:  jmp     LC767                           ; C9B3 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LC9B6:  jmp     LC759                           ; C9B6 4C 59 C7                 LY.
; ----------------------------------------------------------------------------
LC9B9:  ldy     #$01                            ; C9B9 A0 01                    ..
        sty     LFSDevNum                       ; C9BB 84 C5                    ..
        sty     LFS2ndAddr                      ; C9BD 84 C4                    ..
        dey                                     ; C9BF 88                       .
        sty     FNlength                        ; C9C0 8C 87 03                 ...
        sty     ST                              ; C9C3 84 BA                    ..
        sty     $0406                           ; C9C5 8C 06 04                 ...
        lda     #$04                            ; C9C8 A9 04                    ..
        sta     FNptr_hi                        ; C9CA 85 AF                    ..
        lda     #$50                            ; C9CC A9 50                    .P
        sta     FNptr_lo                        ; C9CE 85 AE                    ..
LC9D0:  jsr     LCAFD                           ; C9D0 20 FD CA                  ..
        beq     LCA33                           ; C9D3 F0 5E                    .^
        cmp     #$20                            ; C9D5 C9 20                    .
        beq     LC9D0                           ; C9D7 F0 F7                    ..
        cmp     #$22                            ; C9D9 C9 22                    ."
        bne     LC9F5                           ; C9DB D0 18                    ..
        ldx     $CD                             ; C9DD A6 CD                    ..
LC9DF:  cpx     $CE                             ; C9DF E4 CE                    ..
        bcs     LCA33                           ; C9E1 B0 50                    .P
        lda     L0470,x                         ; C9E3 BD 70 04                 .p.
        inx                                     ; C9E6 E8                       .
        cmp     #$22                            ; C9E7 C9 22                    ."
        beq     LC9F8                           ; C9E9 F0 0D                    ..
        sta     (FNptr_lo),y                    ; C9EB 91 AE                    ..
        inc     FNlength                        ; C9ED EE 87 03                 ...
        iny                                     ; C9F0 C8                       .
        cpy     #$11                            ; C9F1 C0 11                    ..
        bcc     LC9DF                           ; C9F3 90 EA                    ..
LC9F5:  jmp     LC759                           ; C9F5 4C 59 C7                 LY.
; ----------------------------------------------------------------------------
LC9F8:  stx     $CD                             ; C9F8 86 CD                    ..
        jsr     LCAFD                           ; C9FA 20 FD CA                  ..
        jsr     LCA75                           ; C9FD 20 75 CA                  u.
        bcs     LCA33                           ; CA00 B0 31                    .1
        lda     $C7                             ; CA02 A5 C7                    ..
        beq     LC9F5                           ; CA04 F0 EF                    ..
        cmp     #$03                            ; CA06 C9 03                    ..
        beq     LC9F5                           ; CA08 F0 EB                    ..
        sta     LFSDevNum                       ; CA0A 85 C5                    ..
        jsr     LCA75                           ; CA0C 20 75 CA                  u.
        bcs     LCA33                           ; CA0F B0 22                    ."
        jsr     LCB19                           ; CA11 20 19 CB                  ..
        jsr     LCA75                           ; CA14 20 75 CA                  u.
        bcs     LC9F5                           ; CA17 B0 DC                    ..
        jsr     PrintNewLine                    ; CA19 20 D3 CA                  ..
        ldx     $C7                             ; CA1C A6 C7                    ..
        ldy     $C8                             ; CA1E A4 C8                    ..
        lda     $039F                           ; CA20 AD 9F 03                 ...
        cmp     #$53                            ; CA23 C9 53                    .S
        bne     LC9F5                           ; CA25 D0 CE                    ..
        lda     #$00                            ; CA27 A9 00                    ..
        sta     LFS2ndAddr                      ; CA29 85 C4                    ..
        lda     #$CB                            ; CA2B A9 CB                    ..
        jsr     LFD82                           ; CA2D 20 82 FD                  ..
LCA30:  jmp     LC767                           ; CA30 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LCA33:  lda     $039F                           ; CA33 AD 9F 03                 ...
        cmp     #$56                            ; CA36 C9 56                    .V
        beq     LCA40                           ; CA38 F0 06                    ..
        cmp     #$4C                            ; CA3A C9 4C                    .L
        bne     LC9F5                           ; CA3C D0 B7                    ..
        lda     #$00                            ; CA3E A9 00                    ..
LCA40:  jsr     LFD63                           ; CA40 20 63 FD                  c.
        lda     ST                              ; CA43 A5 BA                    ..
        and     #$10                            ; CA45 29 10                    ).
        beq     LCA30                           ; CA47 F0 E7                    ..
        jsr     ShowInLineText                  ; CA49 20 5B FB                  [.
        .byte   "ERROR"                         ; CA4C 45 52 52 4F 52           ERROR
        .byte   $00                             ; CA51 00                       .
; ----------------------------------------------------------------------------
        bra     LCA30                           ; CA52 80 DC                    ..
        jsr     LCB67                           ; CA54 20 67 CB                  g.
        bcs     LCA70                           ; CA57 B0 17                    ..
        jsr     LCA75                           ; CA59 20 75 CA                  u.
        bcs     LCA70                           ; CA5C B0 12                    ..
        ldy     #$00                            ; CA5E A0 00                    ..
LCA60:  lda     $C7                             ; CA60 A5 C7                    ..
        jsr     LCC4B                           ; CA62 20 4B CC                  K.
        jsr     LCB5B                           ; CA65 20 5B CB                  [.
        jsr     LCB44                           ; CA68 20 44 CB                  D.
        bcs     LCA60                           ; CA6B B0 F3                    ..
        jmp     LC767                           ; CA6D 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LCA70:  jmp     LC759                           ; CA70 4C 59 C7                 LY.
; ----------------------------------------------------------------------------
LCA73:  dec     $CD                             ; CA73 C6 CD                    ..
LCA75:  lda     #$00                            ; CA75 A9 00                    ..
        sta     $C7                             ; CA77 85 C7                    ..
        sta     $C8                             ; CA79 85 C8                    ..
        sta     $039E                           ; CA7B 8D 9E 03                 ...
LCA7E:  jsr     LCAFD                           ; CA7E 20 FD CA                  ..
        beq     LCABD                           ; CA81 F0 3A                    .:
        cmp     #$20                            ; CA83 C9 20                    .
        beq     LCA7E                           ; CA85 F0 F7                    ..
LCA87:  cmp     #$20                            ; CA87 C9 20                    .
        beq     LCAB9                           ; CA89 F0 2E                    ..
        cmp     #$2C                            ; CA8B C9 2C                    .,
        beq     LCAB9                           ; CA8D F0 2A                    .*
        cmp     #$30                            ; CA8F C9 30                    .0
        bcc     LCABE                           ; CA91 90 2B                    .+
        cmp     #$47                            ; CA93 C9 47                    .G
        bcs     LCABE                           ; CA95 B0 27                    .'
        cmp     #$3A                            ; CA97 C9 3A                    .:
        bcc     LCAA1                           ; CA99 90 06                    ..
        cmp     #$41                            ; CA9B C9 41                    .A
        bcc     LCABE                           ; CA9D 90 1F                    ..
        sbc     #$08                            ; CA9F E9 08                    ..
LCAA1:  sbc     #$2F                            ; CAA1 E9 2F                    ./
        asl     a                               ; CAA3 0A                       .
        asl     a                               ; CAA4 0A                       .
        asl     a                               ; CAA5 0A                       .
        asl     a                               ; CAA6 0A                       .
        ldx     #$04                            ; CAA7 A2 04                    ..
LCAA9:  asl     a                               ; CAA9 0A                       .
        rol     $C7                             ; CAAA 26 C7                    &.
        rol     $C8                             ; CAAC 26 C8                    &.
        dex                                     ; CAAE CA                       .
        bne     LCAA9                           ; CAAF D0 F8                    ..
        inc     $039E                           ; CAB1 EE 9E 03                 ...
        jsr     LCAFD                           ; CAB4 20 FD CA                  ..
        bne     LCA87                           ; CAB7 D0 CE                    ..
LCAB9:  lda     $039E                           ; CAB9 AD 9E 03                 ...
        clc                                     ; CABC 18                       .
LCABD:  rts                                     ; CABD 60                       `
; ----------------------------------------------------------------------------
LCABE:  pla                                     ; CABE 68                       h
        pla                                     ; CABF 68                       h
        jmp     LC759                           ; CAC0 4C 59 C7                 LY.
; ----------------------------------------------------------------------------
PrintHexWordAndSpaceFromMem:
; Prints a hex word given at ZP locs and then a space.
; Input: $CC = high byte, $CB = low byte
        lda     $CB                             ; CAC3 A5 CB                    ..
        ldx     $CC                             ; CAC5 A6 CC                    ..
PrintHexWordAndSpace:
; Prints a hex word and then a space.
; Input: X = high byte, A = low byte
        pha                                     ; CAC7 48                       H
        txa                                     ; CAC8 8A                       .
        jsr     PrintHexByte                    ; CAC9 20 D8 CA                  ..
        pla                                     ; CACC 68                       h
PrintHexByteAndSpace:
        jsr     PrintHexByte                    ; CACD 20 D8 CA                  ..
PrintSpace:
        lda     #$20                            ; CAD0 A9 20                    .
        .byte   $2C                             ; CAD2 2C                       ,
PrintNewLine:
        lda     #$0D                            ; CAD3 A9 0D                    ..
        jmp     ShowChar_                       ; CAD5 4C B3 AB                 L..
; ----------------------------------------------------------------------------
PrintHexByte:
; Byte as hex print function, prints byte in A as hex number.
; X is saved to $39D and loaded back then.
        stx     $039D                           ; CAD8 8E 9D 03                 ...
        jsr     Byte2HexChars                   ; CADB 20 E8 CA                  ..
        jsr     ShowChar_                       ; CADE 20 B3 AB                  ..
        txa                                     ; CAE1 8A                       .
        ldx     $039D                           ; CAE2 AE 9D 03                 ...
        jmp     ShowChar_                       ; CAE5 4C B3 AB                 L..
; ----------------------------------------------------------------------------
Byte2HexChars:
; Byte to hex converter
; Input: A = byte
; Output: A = high nibble hex ASCII digit, X = low nibble hex ASCII digit
        pha                                     ; CAE8 48                       H
        jsr     Nibble2HexChar                  ; CAE9 20 F2 CA                  ..
        tax                                     ; CAEC AA                       .
        pla                                     ; CAED 68                       h
        lsr     a                               ; CAEE 4A                       J
        lsr     a                               ; CAEF 4A                       J
        lsr     a                               ; CAF0 4A                       J
        lsr     a                               ; CAF1 4A                       J
Nibble2HexChar:
; Nibble to hex converter
; Input: A = byte (low nibble is used only)
; Output: A = hex ASCII digit
        and     #$0F                            ; CAF2 29 0F                    ).
        cmp     #$0A                            ; CAF4 C9 0A                    ..
        bcc     LCAFA                           ; CAF6 90 02                    ..
        adc     #$06                            ; CAF8 69 06                    i.
LCAFA:  adc     #$30                            ; CAFA 69 30                    i0
        rts                                     ; CAFC 60                       `
; ----------------------------------------------------------------------------
LCAFD:  stx     $039D                           ; CAFD 8E 9D 03                 ...
        ldx     $CD                             ; CB00 A6 CD                    ..
        cpx     $CE                             ; CB02 E4 CE                    ..
        bcs     LCB15                           ; CB04 B0 0F                    ..
        lda     L0470,x                         ; CB06 BD 70 04                 .p.
        cmp     #$3A                            ; CB09 C9 3A                    .:
        beq     LCB15                           ; CB0B F0 08                    ..
        inc     $CD                             ; CB0D E6 CD                    ..
LCB0F:  php                                     ; CB0F 08                       .
        ldx     $039D                           ; CB10 AE 9D 03                 ...
        plp                                     ; CB13 28                       (
        rts                                     ; CB14 60                       `
; ----------------------------------------------------------------------------
LCB15:  lda     #$00                            ; CB15 A9 00                    ..
        beq     LCB0F                           ; CB17 F0 F6                    ..
LCB19:  lda     $C7                             ; CB19 A5 C7                    ..
        sta     $CB                             ; CB1B 85 CB                    ..
        lda     $C8                             ; CB1D A5 C8                    ..
        sta     $CC                             ; CB1F 85 CC                    ..
        rts                                     ; CB21 60                       `
; ----------------------------------------------------------------------------
LCB22:  sec                                     ; CB22 38                       8
        lda     $C7                             ; CB23 A5 C7                    ..
        sbc     $CB                             ; CB25 E5 CB                    ..
        sta     $C7                             ; CB27 85 C7                    ..
        lda     $C8                             ; CB29 A5 C8                    ..
        sbc     $CC                             ; CB2B E5 CC                    ..
        sta     $C8                             ; CB2D 85 C8                    ..
        rts                                     ; CB2F 60                       `
; ----------------------------------------------------------------------------
LCB30:  lda     #$01                            ; CB30 A9 01                    ..
LCB32:  sta     $039D                           ; CB32 8D 9D 03                 ...
        sec                                     ; CB35 38                       8
        lda     $C7                             ; CB36 A5 C7                    ..
        sbc     $039D                           ; CB38 ED 9D 03                 ...
        sta     $C7                             ; CB3B 85 C7                    ..
        lda     $C8                             ; CB3D A5 C8                    ..
        sbc     #$00                            ; CB3F E9 00                    ..
        sta     $C8                             ; CB41 85 C8                    ..
        rts                                     ; CB43 60                       `
; ----------------------------------------------------------------------------
LCB44:  sec                                     ; CB44 38                       8
        lda     $C9                             ; CB45 A5 C9                    ..
        sbc     #$01                            ; CB47 E9 01                    ..
        sta     $C9                             ; CB49 85 C9                    ..
        lda     $CA                             ; CB4B A5 CA                    ..
        sbc     #$00                            ; CB4D E9 00                    ..
        sta     $CA                             ; CB4F 85 CA                    ..
        rts                                     ; CB51 60                       `
; ----------------------------------------------------------------------------
LCB52:  lda     $CB                             ; CB52 A5 CB                    ..
        bne     LCB58                           ; CB54 D0 02                    ..
        dec     $CC                             ; CB56 C6 CC                    ..
LCB58:  dec     $CB                             ; CB58 C6 CB                    ..
        rts                                     ; CB5A 60                       `
; ----------------------------------------------------------------------------
LCB5B:  lda     #$01                            ; CB5B A9 01                    ..
LCB5D:  clc                                     ; CB5D 18                       .
        adc     $CB                             ; CB5E 65 CB                    e.
        sta     $CB                             ; CB60 85 CB                    ..
        bcc     LCB66                           ; CB62 90 02                    ..
        inc     $CC                             ; CB64 E6 CC                    ..
LCB66:  rts                                     ; CB66 60                       `
; ----------------------------------------------------------------------------
LCB67:  bcs     LCB7D                           ; CB67 B0 14                    ..
        jsr     LCB19                           ; CB69 20 19 CB                  ..
        jsr     LCA75                           ; CB6C 20 75 CA                  u.
        bcs     LCB7D                           ; CB6F B0 0C                    ..
        jsr     LCB22                           ; CB71 20 22 CB                  ".
        lda     $C7                             ; CB74 A5 C7                    ..
        sta     $C9                             ; CB76 85 C9                    ..
        lda     $C8                             ; CB78 A5 C8                    ..
        sta     $CA                             ; CB7A 85 CA                    ..
        clc                                     ; CB7C 18                       .
LCB7D:  rts                                     ; CB7D 60                       `
; ----------------------------------------------------------------------------
LCB7E:  bcs     LCBE0                           ; CB7E B0 60                    .`
        jsr     LCB19                           ; CB80 20 19 CB                  ..
        jsr     LCA75                           ; CB83 20 75 CA                  u.
        bcs     LCBE0                           ; CB86 B0 58                    .X
        lda     $C7                             ; CB88 A5 C7                    ..
        sta     $D2                             ; CB8A 85 D2                    ..
        lda     $C8                             ; CB8C A5 C8                    ..
        sta     $D3                             ; CB8E 85 D3                    ..
        jsr     LCA75                           ; CB90 20 75 CA                  u.
        lda     $C8                             ; CB93 A5 C8                    ..
        pha                                     ; CB95 48                       H
        lda     $C7                             ; CB96 A5 C7                    ..
        pha                                     ; CB98 48                       H
        cmp     $CB                             ; CB99 C5 CB                    ..
        bcc     LCBAB                           ; CB9B 90 0E                    ..
        bne     LCBA5                           ; CB9D D0 06                    ..
        lda     $C8                             ; CB9F A5 C8                    ..
        cmp     $CC                             ; CBA1 C5 CC                    ..
        bcc     LCBAB                           ; CBA3 90 06                    ..
LCBA5:  lda     #$01                            ; CBA5 A9 01                    ..
        sta     $D1                             ; CBA7 85 D1                    ..
        bra     LCBAD                           ; CBA9 80 02                    ..
LCBAB:  stz     $D1                             ; CBAB 64 D1                    d.
LCBAD:  lda     $D2                             ; CBAD A5 D2                    ..
        sta     $C7                             ; CBAF 85 C7                    ..
        lda     $D3                             ; CBB1 A5 D3                    ..
        sta     $C8                             ; CBB3 85 C8                    ..
        jsr     LCB22                           ; CBB5 20 22 CB                  ".
        lda     $C7                             ; CBB8 A5 C7                    ..
        sta     $C9                             ; CBBA 85 C9                    ..
        lda     $C8                             ; CBBC A5 C8                    ..
        sta     $CA                             ; CBBE 85 CA                    ..
        lda     $D1                             ; CBC0 A5 D1                    ..
        beq     LCBD9                           ; CBC2 F0 15                    ..
        lda     $D2                             ; CBC4 A5 D2                    ..
        sta     $CB                             ; CBC6 85 CB                    ..
        lda     $D3                             ; CBC8 A5 D3                    ..
        sta     $CC                             ; CBCA 85 CC                    ..
        pla                                     ; CBCC 68                       h
        clc                                     ; CBCD 18                       .
        adc     $C9                             ; CBCE 65 C9                    e.
        sta     $C7                             ; CBD0 85 C7                    ..
        pla                                     ; CBD2 68                       h
        adc     $CA                             ; CBD3 65 CA                    e.
        sta     $C8                             ; CBD5 85 C8                    ..
        clc                                     ; CBD7 18                       .
        rts                                     ; CBD8 60                       `
; ----------------------------------------------------------------------------
LCBD9:  pla                                     ; CBD9 68                       h
        sta     $C7                             ; CBDA 85 C7                    ..
        pla                                     ; CBDC 68                       h
        sta     $C8                             ; CBDD 85 C8                    ..
        clc                                     ; CBDF 18                       .
LCBE0:  rts                                     ; CBE0 60                       `
; ----------------------------------------------------------------------------
LCBE1:  jsr     ShowInLineText                  ; CBE1 20 5B FB                  [.
        .byte   $0D                             ; CBE4 0D                       .
        .byte   "   PC  SR AC XR YR SP MODE OPCO"; CBE5 20 20 20 50 43 20 20 53    PC  S
                                                ; CBED 52 20 41 43 20 58 52 20  R AC XR
                                                ; CBF5 59 52 20 53 50 20 4D 4F  YR SP MO
                                                ; CBFD 44 45 20 4F 50 43 4F     DE OPCO
        .byte   "DE   MNEMONIC"                 ; CC04 44 45 20 20 20 4D 4E 45  DE   MNE
                                                ; CC0C 4D 4F 4E 49 43           MONIC
        .byte   $00                             ; CC11 00                       .
; ----------------------------------------------------------------------------
        rts                                     ; CC12 60                       `
; ----------------------------------------------------------------------------
LCC13:  jsr     LCBE1                           ; CC13 20 E1 CB                  ..
        jsr     ShowInLineText                  ; CC16 20 5B FB                  [.
        .byte   $0D                             ; CC19 0D                       .
        .byte   "; "                            ; CC1A 3B 20                    ;
        .byte   $00                             ; CC1C 00                       .
; ----------------------------------------------------------------------------
; Prints PC as hex word, and registers?
        lda     $03B5                           ; CC1D AD B5 03                 ...
        jsr     PrintHexByte                    ; CC20 20 D8 CA                  ..
        ldy     #$00                            ; CC23 A0 00                    ..
LCC25:  lda     $03B6,y                         ; CC25 B9 B6 03                 ...
        jsr     PrintHexByteAndSpace            ; CC28 20 CD CA                  ..
        iny                                     ; CC2B C8                       .
        cpy     #$06                            ; CC2C C0 06                    ..
        bcc     LCC25                           ; CC2E 90 F5                    ..
        jsr     PrintSpace                      ; CC30 20 D0 CA                  ..
        lda     $03A1                           ; CC33 AD A1 03                 ...
        jsr     PrintHexByteAndSpace            ; CC36 20 CD CA                  ..
        lda     $03B6                           ; CC39 AD B6 03                 ...
        sta     $CB                             ; CC3C 85 CB                    ..
        lda     $03B5                           ; CC3E AD B5 03                 ...
        sta     $CC                             ; CC41 85 CC                    ..
        jmp     LCCC7                           ; CC43 4C C7 CC                 L..
; ----------------------------------------------------------------------------
LCC46:  pha                                     ; CC46 48                       H
        lda     #$C7                            ; CC47 A9 C7                    ..
        bra     LCC4E                           ; CC49 80 03                    ..
LCC4B:  pha                                     ; CC4B 48                       H
LCC4C:  lda     #$CB                            ; CC4C A9 CB                    ..
LCC4E:  sta     $0360                           ; CC4E 8D 60 03                 .`.
        sta     $0360                           ; CC51 8D 60 03                 .`.
        lda     $03A1                           ; CC54 AD A1 03                 ...
        and     #$03                            ; CC57 29 03                    ).
        asl     a                               ; CC59 0A                       .
        tax                                     ; CC5A AA                       .
        pla                                     ; CC5B 68                       h
        jmp     (LCC5F,x)                       ; CC5C 7C 5F CC                 |_.
LCC5F:  .addr   FROM_C68D                       ; CC5F 5C 03                    \.
        .addr   LFA72                           ; CC61 72 FA                    r.
        .addr   L035F                           ; CC63 5F 03                    _.
        .addr   FROM_C68D                       ; CC65 5C 03                    \.
; ----------------------------------------------------------------------------
LCC67:  lda     #$CB                            ; CC67 A9 CB                    ..
        .byte   $2C                             ; CC69 2C                       ,
LCC6A:  lda     #$C7                            ; CC6A A9 C7                    ..
        .byte   $2C                             ; CC6C 2C                       ,
LCC6D:  lda     #$D0                            ; CC6D A9 D0                    ..
        phx                                     ; CC6F DA                       .
        jsr     LCC77                           ; CC70 20 77 CC                  w.
        plx                                     ; CC73 FA                       .
        eor     #$00                            ; CC74 49 00                    I.
        rts                                     ; CC76 60                       `
; ----------------------------------------------------------------------------
LCC77:  sta     $034E                           ; CC77 8D 4E 03                 .N.
        sta     $0357                           ; CC7A 8D 57 03                 .W.
        lda     $03A1                           ; CC7D AD A1 03                 ...
        and     #$03                            ; CC80 29 03                    ).
        asl     a                               ; CC82 0A                       .
        tax                                     ; CC83 AA                       .
        jmp     (LCC87,x)                       ; CC84 7C 87 CC                 |..
LCC87:  .addr   FROM_C67B                       ; CC87 4A 03                    J.
        .addr   FROM_C684                       ; CC89 53 03                    S.
        .addr   L034D                           ; CC8B 4D 03                    M.
        .addr   FROM_C67B                       ; CC8D 4A 03                    J.
; ----------------------------------------------------------------------------
        bcs     LCC99                           ; CC8F B0 08                    ..
        jsr     LCB19                           ; CC91 20 19 CB                  ..
        jsr     LCA75                           ; CC94 20 75 CA                  u.
        bcc     LCC9F                           ; CC97 90 06                    ..
LCC99:  lda     #$14                            ; CC99 A9 14                    ..
        sta     $C7                             ; CC9B 85 C7                    ..
        bne     LCCA2                           ; CC9D D0 03                    ..
LCC9F:  jsr     LCB22                           ; CC9F 20 22 CB                  ".
LCCA2:  jsr     PrintNewLine                    ; CCA2 20 D3 CA                  ..
        jsr     LFDB9                           ; CCA5 20 B9 FD                  ..
        beq     LCCBB                           ; CCA8 F0 11                    ..
        jsr     LCCBE                           ; CCAA 20 BE CC                  ..
        inc     $CF                             ; CCAD E6 CF                    ..
        lda     $CF                             ; CCAF A5 CF                    ..
        jsr     LCB5D                           ; CCB1 20 5D CB                  ].
        lda     $CF                             ; CCB4 A5 CF                    ..
        jsr     LCB32                           ; CCB6 20 32 CB                  2.
        bcs     LCCA2                           ; CCB9 B0 E7                    ..
LCCBB:  jmp     LC767                           ; CCBB 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LCCBE:  jsr     ShowInLineText                  ; CCBE 20 5B FB                  [.
        .byte   ". "                            ; CCC1 2E 20                    .
        .byte   $00                             ; CCC3 00                       .
; ----------------------------------------------------------------------------
LCCC4:  jsr     PrintHexWordAndSpaceFromMem     ; CCC4 20 C3 CA                  ..
LCCC7:  jsr     PrintSpace                      ; CCC7 20 D0 CA                  ..
        ldy     #$00                            ; CCCA A0 00                    ..
        jsr     LCC67                           ; CCCC 20 67 CC                  g.
        sta     $03A2                           ; CCCF 8D A2 03                 ...
        jsr     LCD55                           ; CCD2 20 55 CD                  U.
        pha                                     ; CCD5 48                       H
        ldx     $CF                             ; CCD6 A6 CF                    ..
        inx                                     ; CCD8 E8                       .
LCCD9:  dex                                     ; CCD9 CA                       .
        bpl     LCCE6                           ; CCDA 10 0A                    ..
        jsr     ShowInLineText                  ; CCDC 20 5B FB                  [.
        .byte   "   "                           ; CCDF 20 20 20
        .byte   $00                             ; CCE2 00                       .
; ----------------------------------------------------------------------------
        jmp     LCCEC                           ; CCE3 4C EC CC                 L..
; ----------------------------------------------------------------------------
LCCE6:  jsr     LCC67                           ; CCE6 20 67 CC                  g.
        jsr     PrintHexByteAndSpace            ; CCE9 20 CD CA                  ..
LCCEC:  iny                                     ; CCEC C8                       .
        cpy     #$03                            ; CCED C0 03                    ..
        bcc     LCCD9                           ; CCEF 90 E8                    ..
        pla                                     ; CCF1 68                       h
        ldx     #$03                            ; CCF2 A2 03                    ..
        jsr     LCD98                           ; CCF4 20 98 CD                  ..
        ldx     #$06                            ; CCF7 A2 06                    ..
LCCF9:  cpx     #$03                            ; CCF9 E0 03                    ..
        bne     LCD11                           ; CCFB D0 14                    ..
        ldy     $CF                             ; CCFD A4 CF                    ..
        beq     LCD11                           ; CCFF F0 10                    ..
LCD01:  lda     $03B4                           ; CD01 AD B4 03                 ...
        cmp     #$E8                            ; CD04 C9 E8                    ..
        bcs     LCD39                           ; CD06 B0 31                    .1
        jsr     LCC67                           ; CD08 20 67 CC                  g.
        jsr     PrintHexByte                    ; CD0B 20 D8 CA                  ..
        dey                                     ; CD0E 88                       .
        bne     LCD01                           ; CD0F D0 F0                    ..
LCD11:  asl     $03B4                           ; CD11 0E B4 03                 ...
        bcc     LCD35                           ; CD14 90 1F                    ..
        lda     LCE12,x                         ; CD16 BD 12 CE                 ...
        jsr     ShowChar_                       ; CD19 20 B3 AB                  ..
        pha                                     ; CD1C 48                       H
        lda     $03A2                           ; CD1D AD A2 03                 ...
        cmp     #$7C                            ; CD20 C9 7C                    .|
        bne     LCD2C                           ; CD22 D0 08                    ..
        pla                                     ; CD24 68                       h
        lda     LCE1E,x                         ; CD25 BD 1E CE                 ...
        beq     LCD35                           ; CD28 F0 0B                    ..
        bra     LCD32                           ; CD2A 80 06                    ..
LCD2C:  pla                                     ; CD2C 68                       h
LCD2D:  lda     LCE18,x                         ; CD2D BD 18 CE                 ...
        beq     LCD35                           ; CD30 F0 03                    ..
LCD32:  jsr     ShowChar_                       ; CD32 20 B3 AB                  ..
LCD35:  dex                                     ; CD35 CA                       .
        bne     LCCF9                           ; CD36 D0 C1                    ..
        rts                                     ; CD38 60                       `
; ----------------------------------------------------------------------------
LCD39:  jsr     LCC67                           ; CD39 20 67 CC                  g.
        jsr     LCD48                           ; CD3C 20 48 CD                  H.
        clc                                     ; CD3F 18                       .
        adc     #$01                            ; CD40 69 01                    i.
        bne     LCD45                           ; CD42 D0 01                    ..
        inx                                     ; CD44 E8                       .
LCD45:  jmp     PrintHexWordAndSpace            ; CD45 4C C7 CA                 L..
; ----------------------------------------------------------------------------
LCD48:  ldx     $CC                             ; CD48 A6 CC                    ..
        tay                                     ; CD4A A8                       .
        bpl     LCD4E                           ; CD4B 10 01                    ..
        dex                                     ; CD4D CA                       .
LCD4E:  sec                                     ; CD4E 38                       8
        adc     $CB                             ; CD4F 65 CB                    e.
        bcc     LCD54                           ; CD51 90 01                    ..
        inx                                     ; CD53 E8                       .
LCD54:  rts                                     ; CD54 60                       `
; ----------------------------------------------------------------------------
LCD55:  lsr     a                               ; CD55 4A                       J
        tay                                     ; CD56 A8                       .
        bcc     LCD70                           ; CD57 90 17                    ..
        lsr     a                               ; CD59 4A                       J
        bcs     LCD7F                           ; CD5A B0 23                    .#
        tax                                     ; CD5C AA                       .
        cmp     #$22                            ; CD5D C9 22                    ."
        beq     LCD92                           ; CD5F F0 31                    .1
        lsr     a                               ; CD61 4A                       J
        lsr     a                               ; CD62 4A                       J
        lsr     a                               ; CD63 4A                       J
        ora     #$80                            ; CD64 09 80                    ..
        tay                                     ; CD66 A8                       .
        txa                                     ; CD67 8A                       .
        and     #$03                            ; CD68 29 03                    ).
        bcc     LCD6E                           ; CD6A 90 02                    ..
        adc     #$03                            ; CD6C 69 03                    i.
LCD6E:  ora     #$80                            ; CD6E 09 80                    ..
LCD70:  lsr     a                               ; CD70 4A                       J
        tax                                     ; CD71 AA                       .
        lda     LCDBF,x                         ; CD72 BD BF CD                 ...
        bcs     LCD7B                           ; CD75 B0 04                    ..
        lsr     a                               ; CD77 4A                       J
        lsr     a                               ; CD78 4A                       J
        lsr     a                               ; CD79 4A                       J
        lsr     a                               ; CD7A 4A                       J
LCD7B:  and     #$0F                            ; CD7B 29 0F                    ).
        bne     LCD83                           ; CD7D D0 04                    ..
LCD7F:  ldy     #$88                            ; CD7F A0 88                    ..
        lda     #$00                            ; CD81 A9 00                    ..
LCD83:  tax                                     ; CD83 AA                       .
        lda     LCE03,x                         ; CD84 BD 03 CE                 ...
        sta     $03B4                           ; CD87 8D B4 03                 ...
        and     #$03                            ; CD8A 29 03                    ).
        sta     $CF                             ; CD8C 85 CF                    ..
        tya                                     ; CD8E 98                       .
        ldy     #$00                            ; CD8F A0 00                    ..
        rts                                     ; CD91 60                       `
; ----------------------------------------------------------------------------
LCD92:  ldy     #$16                            ; CD92 A0 16                    ..
        lda     #$01                            ; CD94 A9 01                    ..
        bra     LCD83                           ; CD96 80 EB                    ..
LCD98:  tay                                     ; CD98 A8                       .
        lda     LCEA7,y                         ; CD99 B9 A7 CE                 ...
        tay                                     ; CD9C A8                       .
        lda     LCE25,y                         ; CD9D B9 25 CE                 .%.
        sta     $C9                             ; CDA0 85 C9                    ..
        iny                                     ; CDA2 C8                       .
        lda     LCE25,y                         ; CDA3 B9 25 CE                 .%.
        sta     $CA                             ; CDA6 85 CA                    ..
LCDA8:  lda     #$00                            ; CDA8 A9 00                    ..
        ldy     #$05                            ; CDAA A0 05                    ..
LCDAC:  asl     $CA                             ; CDAC 06 CA                    ..
        rol     $C9                             ; CDAE 26 C9                    &.
        rol     a                               ; CDB0 2A                       *
        dey                                     ; CDB1 88                       .
        bne     LCDAC                           ; CDB2 D0 F8                    ..
        adc     #$3F                            ; CDB4 69 3F                    i?
        jsr     ShowChar_                       ; CDB6 20 B3 AB                  ..
        dex                                     ; CDB9 CA                       .
        bne     LCDA8                           ; CDBA D0 EC                    ..
        jmp     PrintSpace                      ; CDBC 4C D0 CA                 L..
; ----------------------------------------------------------------------------
LCDBF:  .byte   $40,$22,$45,$33,$D8,$2F,$45,$39 ; CDBF 40 22 45 33 D8 2F 45 39  @"E3./E9
        .byte   $30,$22,$45,$33,$D8,$FF,$45,$99 ; CDC7 30 22 45 33 D8 FF 45 99  0"E3..E.
        .byte   $40,$02,$45,$33,$D8,$0F,$44,$09 ; CDCF 40 02 45 33 D8 0F 44 09  @.E3..D.
        .byte   $40,$22,$45,$B3,$D8,$FF,$44,$E9 ; CDD7 40 22 45 B3 D8 FF 44 E9  @"E...D.
        .byte   $D0,$22,$44,$33,$D8,$FC,$44,$39 ; CDDF D0 22 44 33 D8 FC 44 39  ."D3..D9
        .byte   $11,$22,$44,$33,$D8,$FC,$44,$9A ; CDE7 11 22 44 33 D8 FC 44 9A  ."D3..D.
        .byte   $10,$22,$44,$33,$D8,$0F,$44,$09 ; CDEF 10 22 44 33 D8 0F 44 09  ."D3..D.
        .byte   $10,$22,$44,$33,$D8,$0F,$44,$09 ; CDF7 10 22 44 33 D8 0F 44 09  ."D3..D.
        .byte   $62,$13,$7F,$A9                 ; CDFF 62 13 7F A9              b...
LCE03:  .byte   $00,$21,$81,$82,$00,$00,$59,$4D ; CE03 00 21 81 82 00 00 59 4D  .!....YM
        .byte   $49,$92,$86,$4A,$85,$9D,$4E     ; CE0B 49 92 86 4A 85 9D 4E     I..J..N
; Addressing mode characters for the monitor/(dis)assembler?
LCE12:  .byte   $91,$2C,$29,$2C,$23,$28         ; CE12 91 2C 29 2C 23 28        .,),#(
LCE18:  .byte   $24,$59,$00,$58,$24,$24         ; CE18 24 59 00 58 24 24        $Y.X$$
LCE1E:  .byte   $00,$58,$00,$58,$24,$24,$00     ; CE1E 00 58 00 58 24 24 00     .X.X$$.
; ----------------------------------------------------------------------------
LCE25:  ora     ($48),y                         ; CE25 11 48                    .H
        .byte   $13                             ; CE27 13                       .
        dex                                     ; CE28 CA                       .
        ora     $1A,x                           ; CE29 15 1A                    ..
        ora     $1908,y                         ; CE2B 19 08 19                 ...
        plp                                     ; CE2E 28                       (
        ora     $1AA4,y                         ; CE2F 19 A4 1A                 ...
        tax                                     ; CE32 AA                       .
        .byte   $1B                             ; CE33 1B                       .
        sty     $1B,x                           ; CE34 94 1B                    ..
        cpy     $5A1C                           ; CE36 CC 1C 5A                 ..Z
        trb     $1CC4                           ; CE39 1C C4 1C                 ...
        cld                                     ; CE3C D8                       .
        ora     $1DC8,x                         ; CE3D 1D C8 1D                 ...
        inx                                     ; CE40 E8                       .
        .byte   $23                             ; CE41 23                       #
        pha                                     ; CE42 48                       H
        .byte   $23                             ; CE43 23                       #
        lsr     a                               ; CE44 4A                       J
        .byte   $23                             ; CE45 23                       #
        .byte   $54                             ; CE46 54                       T
        .byte   $23                             ; CE47 23                       #
        ror     LA223                           ; CE48 6E 23 A2                 n#.
        bit     $72                             ; CE4B 24 72                    $r
        bit     $74                             ; CE4D 24 74                    $t
        and     #$88                            ; CE4F 29 88                    ).
        and     #$B2                            ; CE51 29 B2                    ).
        and     #$B4                            ; CE53 29 B4                    ).
        bit     $26,x                           ; CE55 34 26                    4&
        .byte   $53                             ; CE57 53                       S
        iny                                     ; CE58 C8                       .
        .byte   $53                             ; CE59 53                       S
        sbc     ($53)                           ; CE5A F2 53                    .S
        .byte   $F4                             ; CE5C F4                       .
        .byte   $5B                             ; CE5D 5B                       [
        ldx     #$5D                            ; CE5E A2 5D                    .]
        rol     $69                             ; CE60 26 69                    &i
        .byte   $44                             ; CE62 44                       D
        adc     #$72                            ; CE63 69 72                    ir
        adc     #$74                            ; CE65 69 74                    it
        adc     $7C26                           ; CE67 6D 26 7C                 m&|
        .byte   $22                             ; CE6A 22                       "
        sty     LFS2ndAddr                      ; CE6B 84 C4                    ..
        txa                                     ; CE6D 8A                       .
        .byte   $44                             ; CE6E 44                       D
        txa                                     ; CE6F 8A                       .
        .byte   $62                             ; CE70 62                       b
        txa                                     ; CE71 8A                       .
        adc     ($8A)                           ; CE72 72 8A                    r.
        stz     $8B,x                           ; CE74 74 8B                    t.
        .byte   $44                             ; CE76 44                       D
        .byte   $8B                             ; CE77 8B                       .
        .byte   $62                             ; CE78 62                       b
        .byte   $8B                             ; CE79 8B                       .
        adc     ($8B)                           ; CE7A 72 8B                    r.
        stz     $9C,x                           ; CE7C 74 9C                    t.
        inc     a                               ; CE7E 1A                       .
        stz     L9D26                           ; CE7F 9C 26 9D                 .&.
        .byte   $54                             ; CE82 54                       T
        sta     LA068,x                         ; CE83 9D 68 A0                 .h.
        iny                                     ; CE86 C8                       .
        lda     ($88,x)                         ; CE87 A1 88                    ..
        lda     ($8A,x)                         ; CE89 A1 8A                    ..
        lda     ($94,x)                         ; CE8B A1 94                    ..
        lda     $44                             ; CE8D A5 44                    .D
        lda     $72                             ; CE8F A5 72                    .r
        lda     $74                             ; CE91 A5 74                    .t
        lda     $76                             ; CE93 A5 76                    .v
        tay                                     ; CE95 A8                       .
        lda     ($A8)                           ; CE96 B2 A8                    ..
        ldy     $AC,x                           ; CE98 B4 AC                    ..
        dec     StopKeyFlag                     ; CE9A C6 AD                    ..
        asl     StopKeyFlag                     ; CE9C 06 AD                    ..
        and     (FNptr_lo)                      ; CE9E 32 AE                    2.
        .byte   $44                             ; CEA0 44                       D
        ldx     LAE68                           ; CEA1 AE 68 AE                 .h.
        sty     $00                             ; CEA4 84 00                    ..
        brk                                     ; CEA6 00                       .
LCEA7:  asl     $00,x                           ; CEA7 16 00                    ..
        ror     $04,x                           ; CEA9 76 04                    v.
        lsr     a                               ; CEAB 4A                       J
        tsb     $76                             ; CEAC 04 76                    .v
        tsb     $12                             ; CEAE 04 12                    ..
        lsr     $74                             ; CEB0 46 74                    Ft
        tsb     $1C                             ; CEB2 04 1C                    ..
        and     ($74)                           ; CEB4 32 74                    2t
        tsb     $3A                             ; CEB6 04 3A                    .:
        brk                                     ; CEB8 00                       .
        tsb     $5258                           ; CEB9 0C 58 52                 .XR
        cli                                     ; CEBC 58                       X
        tsb     $0E58                           ; CEBD 0C 58 0E                 .X.
        .byte   $02                             ; CEC0 02                       .
        tsb     $6258                           ; CEC1 0C 58 62                 .Xb
        rol     a                               ; CEC4 2A                       *
        tsb     $5C58                           ; CEC5 0C 58 5C                 .X\
        brk                                     ; CEC8 00                       .
        brk                                     ; CEC9 00                       .
        .byte   $42                             ; CECA 42                       B
        pha                                     ; CECB 48                       H
        .byte   $42                             ; CECC 42                       B
        sec                                     ; CECD 38                       8
        .byte   $42                             ; CECE 42                       B
        clc                                     ; CECF 18                       .
        bmi     LCED2                           ; CED0 30 00                    0.
LCED2:  .byte   $42                             ; CED2 42                       B
        jsr     L004E                           ; CED3 20 4E 00                  N.
        .byte   $42                             ; CED6 42                       B
        lsr     $6E00,x                         ; CED7 5E 00 6E                 ^.n
        phy                                     ; CEDA 5A                       Z
        bvc     LCF37                           ; CEDB 50 5A                    PZ
        sec                                     ; CEDD 38                       8
        phy                                     ; CEDE 5A                       Z
        inc     a                               ; CEDF 1A                       .
        brk                                     ; CEE0 00                       .
        ror     $665A                           ; CEE1 6E 5A 66                 nZf
        lsr     $38,x                           ; CEE4 56 38                    V8
        phy                                     ; CEE6 5A                       Z
        trb     $00                             ; CEE7 14 00                    ..
        jmp     (L2E6A)                         ; CEE9 6C 6A 2E                 lj.
; ----------------------------------------------------------------------------
        ply                                     ; CEEC 7A                       z
        jmp     (L066A)                         ; CEED 6C 6A 06                 lj.
; ----------------------------------------------------------------------------
        pla                                     ; CEF0 68                       h
        jmp     (L7E6A)                         ; CEF1 6C 6A 7E                 lj~
; ----------------------------------------------------------------------------
        jmp     (L6E6E,x)                       ; CEF4 7C 6E 6E                 |nn
        rti                                     ; CEF7 40                       @
; ----------------------------------------------------------------------------
        rol     $3E40,x                         ; CEF8 3E 40 3E                 >@>
        adc     ($70)                           ; CEFB 72 70                    rp
        rti                                     ; CEFD 40                       @
; ----------------------------------------------------------------------------
        rol     $3C08,x                         ; CEFE 3E 08 3C                 >.<
        rti                                     ; CF01 40                       @
; ----------------------------------------------------------------------------
        rol     $7822,x                         ; CF02 3E 22 78                 >"x
        rti                                     ; CF05 40                       @
; ----------------------------------------------------------------------------
        rol     a:$28,x                         ; CF06 3E 28 00                 >(.
        plp                                     ; CF09 28                       (
        rol     a                               ; CF0A 2A                       *
        rol     $2C,x                           ; CF0B 36 2C                    6,
        plp                                     ; CF0D 28                       (
        rol     a                               ; CF0E 2A                       *
        bpl     LCF35                           ; CF0F 10 24                    .$
        brk                                     ; CF11 00                       .
        rol     a                               ; CF12 2A                       *
        asl     a:$4C,x                         ; CF13 1E 4C 00                 .L.
        rol     a                               ; CF16 2A                       *
        rol     $00                             ; CF17 26 00                    &.
        rol     $32                             ; CF19 26 32                    &2
        bit     $44,x                           ; CF1B 34 44                    4D
        rol     $32                             ; CF1D 26 32                    &2
        asl     a                               ; CF1F 0A                       .
        rts                                     ; CF20 60                       `
; ----------------------------------------------------------------------------
        brk                                     ; CF21 00                       .
        and     ($64)                           ; CF22 32 64                    2d
        .byte   $54                             ; CF24 54                       T
        rol     $32                             ; CF25 26 32                    &2
        lsr     $02                             ; CF27 46 02                    F.
        bmi     LCF2B                           ; CF29 30 00                    0.
LCF2B:  pla                                     ; CF2B 68                       h
        bit     $6024,x                         ; CF2C 3C 24 60                 <$`
        bra     LCF3E                           ; CF2F 80 0D                    ..
        jsr     L2020                           ; CF31 20 20 20
        .byte   $90                             ; CF34 90                       .
LCF35:  .byte   $03                             ; CF35 03                       .
        .byte   $4C                             ; CF36 4C                       L
LCF37:  eor     $20C7,y                         ; CF37 59 C7 20                 Y.
        .byte   $19                             ; CF3A 19                       .
        .byte   $CB                             ; CF3B CB                       .
LCF3C:  ldx     #$00                            ; CF3C A2 00                    ..
LCF3E:  stx     $0451                           ; CF3E 8E 51 04                 .Q.
LCF41:  jsr     LCAFD                           ; CF41 20 FD CA                  ..
        bne     LCF4D                           ; CF44 D0 07                    ..
        cpx     #$00                            ; CF46 E0 00                    ..
        bne     LCF4D                           ; CF48 D0 03                    ..
        jmp     LC767                           ; CF4A 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LCF4D:  cmp     #$20                            ; CF4D C9 20                    .
        beq     LCF3C                           ; CF4F F0 EB                    ..
        sta     $D2,x                           ; CF51 95 D2                    ..
        inx                                     ; CF53 E8                       .
        cpx     #$03                            ; CF54 E0 03                    ..
        bne     LCF41                           ; CF56 D0 E9                    ..
LCF58:  dex                                     ; CF58 CA                       .
        bmi     LCF6E                           ; CF59 30 13                    0.
        lda     $D2,x                           ; CF5B B5 D2                    ..
        sec                                     ; CF5D 38                       8
        sbc     #$3F                            ; CF5E E9 3F                    .?
        ldy     #$05                            ; CF60 A0 05                    ..
LCF62:  lsr     a                               ; CF62 4A                       J
        ror     $0451                           ; CF63 6E 51 04                 nQ.
        ror     $0450                           ; CF66 6E 50 04                 nP.
        dey                                     ; CF69 88                       .
        bne     LCF62                           ; CF6A D0 F6                    ..
        bra     LCF58                           ; CF6C 80 EA                    ..
LCF6E:  stz     $C7                             ; CF6E 64 C7                    d.
        stz     $D5                             ; CF70 64 D5                    d.
        ldx     #$02                            ; CF72 A2 02                    ..
LCF74:  jsr     LCAFD                           ; CF74 20 FD CA                  ..
        beq     LCFC4                           ; CF77 F0 4B                    .K
        cmp     #$20                            ; CF79 C9 20                    .
        beq     LCF74                           ; CF7B F0 F7                    ..
        cmp     #$24                            ; CF7D C9 24                    .$
        beq     LCFAE                           ; CF7F F0 2D                    .-
        cmp     #$47                            ; CF81 C9 47                    .G
        bcs     LCFBC                           ; CF83 B0 37                    .7
        cmp     #$30                            ; CF85 C9 30                    .0
        bcc     LCFBC                           ; CF87 90 33                    .3
        cmp     #$3A                            ; CF89 C9 3A                    .:
        bcc     LCF93                           ; CF8B 90 06                    ..
        cmp     #$41                            ; CF8D C9 41                    .A
        bcc     LCFBC                           ; CF8F 90 2B                    .+
        adc     #$08                            ; CF91 69 08                    i.
LCF93:  and     #$0F                            ; CF93 29 0F                    ).
        ldy     #$03                            ; CF95 A0 03                    ..
LCF97:  asl     $C7                             ; CF97 06 C7                    ..
        rol     $C8                             ; CF99 26 C8                    &.
        dey                                     ; CF9B 88                       .
        bpl     LCF97                           ; CF9C 10 F9                    ..
        ora     $C7                             ; CF9E 05 C7                    ..
        sta     $C7                             ; CFA0 85 C7                    ..
        inc     $D5                             ; CFA2 E6 D5                    ..
        lda     $D5                             ; CFA4 A5 D5                    ..
        cmp     #$04                            ; CFA6 C9 04                    ..
        beq     LCFB6                           ; CFA8 F0 0C                    ..
        cmp     #$01                            ; CFAA C9 01                    ..
        bne     LCF74                           ; CFAC D0 C6                    ..
LCFAE:  inc     $D5                             ; CFAE E6 D5                    ..
        lda     #$24                            ; CFB0 A9 24                    .$
        sta     $0450,x                         ; CFB2 9D 50 04                 .P.
        inx                                     ; CFB5 E8                       .
LCFB6:  lda     #$30                            ; CFB6 A9 30                    .0
        sta     $0450,x                         ; CFB8 9D 50 04                 .P.
        inx                                     ; CFBB E8                       .
LCFBC:  sta     $0450,x                         ; CFBC 9D 50 04                 .P.
        inx                                     ; CFBF E8                       .
        cpx     #$10                            ; CFC0 E0 10                    ..
        bcc     LCF74                           ; CFC2 90 B0                    ..
LCFC4:  stx     $C9                             ; CFC4 86 C9                    ..
        ldx     #$00                            ; CFC6 A2 00                    ..
        stx     $D0                             ; CFC8 86 D0                    ..
LCFCA:  ldx     #$00                            ; CFCA A2 00                    ..
        stx     $D1                             ; CFCC 86 D1                    ..
        lda     $D0                             ; CFCE A5 D0                    ..
        jsr     LCD55                           ; CFD0 20 55 CD                  U.
        ldx     $03B4                           ; CFD3 AE B4 03                 ...
        stx     $CA                             ; CFD6 86 CA                    ..
        tax                                     ; CFD8 AA                       .
        lda     LCEA7,x                         ; CFD9 BD A7 CE                 ...
        tax                                     ; CFDC AA                       .
        inx                                     ; CFDD E8                       .
        lda     LCE25,x                         ; CFDE BD 25 CE                 .%.
        jsr     LD0B4                           ; CFE1 20 B4 D0                  ..
        dex                                     ; CFE4 CA                       .
        lda     LCE25,x                         ; CFE5 BD 25 CE                 .%.
        jsr     LD0B4                           ; CFE8 20 B4 D0                  ..
        ldx     #$06                            ; CFEB A2 06                    ..
LCFED:  cpx     #$03                            ; CFED E0 03                    ..
        bne     LD004                           ; CFEF D0 13                    ..
        ldy     $CF                             ; CFF1 A4 CF                    ..
        beq     LD004                           ; CFF3 F0 0F                    ..
LCFF5:  lda     $03B4                           ; CFF5 AD B4 03                 ...
        cmp     #$E8                            ; CFF8 C9 E8                    ..
        lda     #$30                            ; CFFA A9 30                    .0
        bcs     LD02F                           ; CFFC B0 31                    .1
        .byte   $20                             ; CFFE 20
        .byte   $B1                             ; CFFF B1                       .
LD000:  bne     $CF8A                           ; D000 D0 88                    ..
        bne     LCFF5                           ; D002 D0 F1                    ..
LD004:  asl     $03B4                           ; D004 0E B4 03                 ...
        bcc     LD01D                           ; D007 90 14                    ..
        lda     #$7C                            ; D009 A9 7C                    .|
        cmp     $D0                             ; D00B C5 D0                    ..
        beq     LD022                           ; D00D F0 13                    ..
        lda     LCE12,x                         ; D00F BD 12 CE                 ...
        .byte   $20                             ; D012 20
LD013:  .byte   $B4                             ; D013 B4                       .
LD014:  .byte   $D0                             ; D014 D0                       .
LD015:  lda     LCE18,x                         ; D015 BD 18 CE                 ...
        .byte   $F0                             ; D018 F0                       .
LD019:  .byte   $03                             ; D019 03                       .
LD01A:  jsr     LD0B4                           ; D01A 20 B4 D0                  ..
LD01D:  dex                                     ; D01D CA                       .
LD01E:  bne     LCFED                           ; D01E D0 CD                    ..
        bra     LD035                           ; D020 80 13                    ..
LD022:  lda     LCE12,x                         ; D022 BD 12 CE                 ...
        jsr     LD0B4                           ; D025 20 B4 D0                  ..
        lda     LCE1E,x                         ; D028 BD 1E CE                 ...
        beq     LD01D                           ; D02B F0 F0                    ..
        bra     LD01A                           ; D02D 80 EB                    ..
LD02F:  jsr     LD0B1                           ; D02F 20 B1 D0                  ..
        jsr     LD0B1                           ; D032 20 B1 D0                  ..
LD035:  lda     $C9                             ; D035 A5 C9                    ..
        cmp     $D1                             ; D037 C5 D1                    ..
        beq     LD03E                           ; D039 F0 03                    ..
        jmp     LD0C0                           ; D03B 4C C0 D0                 L..
; ----------------------------------------------------------------------------
LD03E:  ldy     $CF                             ; D03E A4 CF                    ..
        beq     LD073                           ; D040 F0 31                    .1
        lda     $CA                             ; D042 A5 CA                    ..
        cmp     #$9D                            ; D044 C9 9D                    ..
        bne     LD06A                           ; D046 D0 22                    ."
        lda     $C7                             ; D048 A5 C7                    ..
        sbc     $CB                             ; D04A E5 CB                    ..
        tax                                     ; D04C AA                       .
        lda     $C8                             ; D04D A5 C8                    ..
        sbc     $CC                             ; D04F E5 CC                    ..
        bcc     LD05B                           ; D051 90 08                    ..
        bne     LD0C7                           ; D053 D0 72                    .r
        cpx     #$82                            ; D055 E0 82                    ..
        bcs     LD0C7                           ; D057 B0 6E                    .n
        bcc     LD063                           ; D059 90 08                    ..
LD05B:  tay                                     ; D05B A8                       .
        iny                                     ; D05C C8                       .
        bne     LD0C7                           ; D05D D0 68                    .h
        cpx     #$82                            ; D05F E0 82                    ..
        bcc     LD0C7                           ; D061 90 64                    .d
LD063:  dex                                     ; D063 CA                       .
        dex                                     ; D064 CA                       .
        txa                                     ; D065 8A                       .
        ldy     $CF                             ; D066 A4 CF                    ..
        bne     LD06D                           ; D068 D0 03                    ..
LD06A:  lda     LFSLogNum,y                     ; D06A B9 C6 00                 ...
LD06D:  jsr     LCC4B                           ; D06D 20 4B CC                  K.
        dey                                     ; D070 88                       .
        bne     LD06A                           ; D071 D0 F7                    ..
LD073:  lda     $D0                             ; D073 A5 D0                    ..
        jsr     LCC4B                           ; D075 20 4B CC                  K.
        jsr     ShowInLineText                  ; D078 20 5B FB                  [.
        .byte   $0D,$91                         ; D07B 0D 91                    ..
        .byte   "A "                            ; D07D 41 20                    A
        .byte   $00                             ; D07F 00                       .
; ----------------------------------------------------------------------------
        jsr     LCCC4                           ; D080 20 C4 CC                  ..
        inc     $CF                             ; D083 E6 CF                    ..
        lda     $CF                             ; D085 A5 CF                    ..
        jsr     LCB5D                           ; D087 20 5D CB                  ].
        jsr     LB4FB                           ; D08A 20 FB B4                  ..
        lda     #$41                            ; D08D A9 41                    .A
        ldx     #$20                            ; D08F A2 20                    .
        jsr     LD0A9                           ; D091 20 A9 D0                  ..
        lda     $CC                             ; D094 A5 CC                    ..
        jsr     LD0A6                           ; D096 20 A6 D0                  ..
        lda     $CB                             ; D099 A5 CB                    ..
        jsr     LD0A6                           ; D09B 20 A6 D0                  ..
        lda     #$20                            ; D09E A9 20                    .
        jsr     LB640                           ; D0A0 20 40 B6                  @.
        jmp     LC767                           ; D0A3 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LD0A6:  jsr     Byte2HexChars                   ; D0A6 20 E8 CA                  ..
LD0A9:  phx                                     ; D0A9 DA                       .
        jsr     LB640                           ; D0AA 20 40 B6                  @.
        pla                                     ; D0AD 68                       h
        jmp     LB640                           ; D0AE 4C 40 B6                 L@.
; ----------------------------------------------------------------------------
LD0B1:  jsr     LD0B4                           ; D0B1 20 B4 D0                  ..
LD0B4:  stx     $039D                           ; D0B4 8E 9D 03                 ...
        ldx     $D1                             ; D0B7 A6 D1                    ..
        cmp     $0450,x                         ; D0B9 DD 50 04                 .P.
        beq     LD0CA                           ; D0BC F0 0C                    ..
        pla                                     ; D0BE 68                       h
        pla                                     ; D0BF 68                       h
LD0C0:  inc     $D0                             ; D0C0 E6 D0                    ..
        beq     LD0C7                           ; D0C2 F0 03                    ..
        jmp     LCFCA                           ; D0C4 4C CA CF                 L..
; ----------------------------------------------------------------------------
LD0C7:  jmp     LC759                           ; D0C7 4C 59 C7                 LY.
; ----------------------------------------------------------------------------
LD0CA:  inx                                     ; D0CA E8                       .
        stx     $D1                             ; D0CB 86 D1                    ..
        ldx     $039D                           ; D0CD AE 9D 03                 ...
        rts                                     ; D0D0 60                       `
; ----------------------------------------------------------------------------
        lda     #$01                            ; D0D1 A9 01                    ..
        bcs     LD0D7                           ; D0D3 B0 02                    ..
        lda     $C7                             ; D0D5 A5 C7                    ..
LD0D7:  sta     $03A3                           ; D0D7 8D A3 03                 ...
        jsr     LCBE1                           ; D0DA 20 E1 CB                  ..
        bra     LD11C                           ; D0DD 80 3D                    .=
LD0DF:  .byte   $20                             ; D0DF 20
        .byte   $16                             ; D0E0 16                       .
LD0E1:  cpy     LB920                           ; D0E1 CC 20 B9                 . .
        sbc     $12F0,x                         ; D0E4 FD F0 12                 ...
        dec     $03A3                           ; D0E7 CE A3 03                 ...
        bne     LD11C                           ; D0EA D0 30                    .0
        jsr     LB4FB                           ; D0EC 20 FB B4                  ..
        lda     #$57                            ; D0EF A9 57                    .W
        jsr     LB640                           ; D0F1 20 40 B6                  @.
        lda     #$20                            ; D0F4 A9 20                    .
        jsr     LB640                           ; D0F6 20 40 B6                  @.
        jmp     LC767                           ; D0F9 4C 67 C7                 Lg.
; ----------------------------------------------------------------------------
LD0FC:  tsx                                     ; D0FC BA                       .
        .byte   $D1                             ; D0FD D1                       .
LD0FE:  jsr     $D1D1                           ; D0FE 20 D1 D1                  ..
        rts                                     ; D101 60                       `
; ----------------------------------------------------------------------------
        ora     ($D2,x)                         ; D102 01 D2                    ..
        jmp     LD20B                           ; D104 4C 0B D2                 L..
; ----------------------------------------------------------------------------
        rti                                     ; D107 40                       @
; ----------------------------------------------------------------------------
        sbc     $D1                             ; D108 E5 D1                    ..
        jmp     (LD1E8)                         ; D10A 6C E8 D1                 l..
; ----------------------------------------------------------------------------
        .byte   $7C                             ; D10D 7C                       |
LD10E:  nop                                     ; D10E EA                       .
        nop                                     ; D10F EA                       .
        sta     MMU_MODE_KERN                   ; D110 8D 00 FA                 ...
        jmp     LD1A3                           ; D113 4C A3 D1                 L..
; ----------------------------------------------------------------------------
        sta     MMU_MODE_KERN                   ; D116 8D 00 FA                 ...
        jmp     LD17D                           ; D119 4C 7D D1                 L}.
; ----------------------------------------------------------------------------
LD11C:  ldx     #$0E                            ; D11C A2 0E                    ..
LD11E:  lda     LD10E,x                         ; D11E BD 0E D1                 ...
        sta     $0471,x                         ; D121 9D 71 04                 .q.
        dex                                     ; D124 CA                       .
        bpl     LD11E                           ; D125 10 F7                    ..
        jsr     LD216                           ; D127 20 16 D2                  ..
        sta     L0470                           ; D12A 8D 70 04                 .p.
        cmp     #$80                            ; D12D C9 80                    ..
        beq     LD139                           ; D12F F0 08                    ..
        bit     #$0F                            ; D131 89 0F                    ..
        bne     LD143                           ; D133 D0 0E                    ..
        bit     #$10                            ; D135 89 10                    ..
        beq     LD143                           ; D137 F0 0A                    ..
LD139:  lda     #$07                            ; D139 A9 07                    ..
        sta     $0471                           ; D13B 8D 71 04                 .q.
        jsr     LD216                           ; D13E 20 16 D2                  ..
        bra     LD168                           ; D141 80 25                    .%
LD143:  ldx     #$0F                            ; D143 A2 0F                    ..
LD145:  cmp     LD0FE,x                         ; D145 DD FE D0                 ...
        bne     LD14D                           ; D148 D0 03                    ..
        jmp     (LD0FC,x)                       ; D14A 7C FC D0                 |..
LD14D:  dex                                     ; D14D CA                       .
        dex                                     ; D14E CA                       .
        dex                                     ; D14F CA                       .
        bpl     LD145                           ; D150 10 F3                    ..
        jsr     LCD55                           ; D152 20 55 CD                  U.
        ldy     $CF                             ; D155 A4 CF                    ..
        beq     LD168                           ; D157 F0 0F                    ..
        jsr     LD216                           ; D159 20 16 D2                  ..
        sta     $0471                           ; D15C 8D 71 04                 .q.
        dey                                     ; D15F 88                       .
        beq     LD168                           ; D160 F0 06                    ..
        jsr     LD216                           ; D162 20 16 D2                  ..
        sta     $0472                           ; D165 8D 72 04                 .r.
LD168:  ldy     $03BA                           ; D168 AC BA 03                 ...
        lda     $03B8                           ; D16B AD B8 03                 ...
        ldx     $03BB                           ; D16E AE BB 03                 ...
        txs                                     ; D171 9A                       .
        ldx     L03B7                           ; D172 AE B7 03                 ...
        phx                                     ; D175 DA                       .
        ldx     $03B9                           ; D176 AE B9 03                 ...
        plp                                     ; D179 28                       (
        jmp     L0470                           ; D17A 4C 70 04                 Lp.
; ----------------------------------------------------------------------------
LD17D:  php                                     ; D17D 08                       .
        pha                                     ; D17E 48                       H
        phy                                     ; D17F 5A                       Z
        lda     $03B6                           ; D180 AD B6 03                 ...
        bne     LD188                           ; D183 D0 03                    ..
        dec     $03B5                           ; D185 CE B5 03                 ...
LD188:  dec     $03B6                           ; D188 CE B6 03                 ...
        jsr     LD216                           ; D18B 20 16 D2                  ..
        clc                                     ; D18E 18                       .
        tay                                     ; D18F A8                       .
        bpl     LD195                           ; D190 10 03                    ..
        dec     $03B5                           ; D192 CE B5 03                 ...
LD195:  adc     $03B6                           ; D195 6D B6 03                 m..
        bcc     LD19D                           ; D198 90 03                    ..
        inc     $03B5                           ; D19A EE B5 03                 ...
LD19D:  sta     $03B6                           ; D19D 8D B6 03                 ...
        ply                                     ; D1A0 7A                       z
        pla                                     ; D1A1 68                       h
        plp                                     ; D1A2 28                       (
LD1A3:  php                                     ; D1A3 08                       .
        stx     $03B9                           ; D1A4 8E B9 03                 ...
        plx                                     ; D1A7 FA                       .
        stx     L03B7                           ; D1A8 8E B7 03                 ...
        tsx                                     ; D1AB BA                       .
        stx     $03BB                           ; D1AC 8E BB 03                 ...
        sta     $03B8                           ; D1AF 8D B8 03                 ...
        sty     $03BA                           ; D1B2 8C BA 03                 ...
LD1B5:  cli                                     ; D1B5 58                       X
        cld                                     ; D1B6 D8                       .
        jmp     LD0DF                           ; D1B7 4C DF D0                 L..
; ----------------------------------------------------------------------------
        jsr     LD216                           ; D1BA 20 16 D2                  ..
        tax                                     ; D1BD AA                       .
        ldy     $03B5                           ; D1BE AC B5 03                 ...
        phy                                     ; D1C1 5A                       Z
        ldy     $03B6                           ; D1C2 AC B6 03                 ...
        phy                                     ; D1C5 5A                       Z
        jsr     LD216                           ; D1C6 20 16 D2                  ..
        dec     $03BB                           ; D1C9 CE BB 03                 ...
        dec     $03BB                           ; D1CC CE BB 03                 ...
        bra     LD1DD                           ; D1CF 80 0C                    ..
        plx                                     ; D1D1 FA                       .
        pla                                     ; D1D2 68                       h
        inx                                     ; D1D3 E8                       .
        bne     LD1D7                           ; D1D4 D0 01                    ..
        inc     a                               ; D1D6 1A                       .
LD1D7:  inc     $03BB                           ; D1D7 EE BB 03                 ...
        inc     $03BB                           ; D1DA EE BB 03                 ...
LD1DD:  sta     $03B5                           ; D1DD 8D B5 03                 ...
        stx     $03B6                           ; D1E0 8E B6 03                 ...
        bra     LD1B5                           ; D1E3 80 D0                    ..
        ldy     $03B9                           ; D1E5 AC B9 03                 ...
LD1E8:  ldy     #$00                            ; D1E8 A0 00                    ..
        jsr     LD216                           ; D1EA 20 16 D2                  ..
        pha                                     ; D1ED 48                       H
        jsr     LD216                           ; D1EE 20 16 D2                  ..
        sta     $D1                             ; D1F1 85 D1                    ..
        pla                                     ; D1F3 68                       h
        sta     $D0                             ; D1F4 85 D0                    ..
        jsr     LCC6D                           ; D1F6 20 6D CC                  m.
        pha                                     ; D1F9 48                       H
        iny                                     ; D1FA C8                       .
        jsr     LCC6D                           ; D1FB 20 6D CC                  m.
        plx                                     ; D1FE FA                       .
        bra     LD1DD                           ; D1FF 80 DC                    ..
        jsr     LD216                           ; D201 20 16 D2                  ..
        pha                                     ; D204 48                       H
        jsr     LD216                           ; D205 20 16 D2                  ..
        plx                                     ; D208 FA                       .
        bra     LD1DD                           ; D209 80 D2                    ..
LD20B:  pla                                     ; D20B 68                       h
        sta     L03B7                           ; D20C 8D B7 03                 ...
        plx                                     ; D20F FA                       .
        pla                                     ; D210 68                       h
        inc     $03BB                           ; D211 EE BB 03                 ...
        bra     LD1D7                           ; D214 80 C1                    ..
LD216:  phy                                     ; D216 5A                       Z
        ldy     #$00                            ; D217 A0 00                    ..
        lda     $03B6                           ; D219 AD B6 03                 ...
        sta     $D0                             ; D21C 85 D0                    ..
        lda     $03B5                           ; D21E AD B5 03                 ...
        sta     $D1                             ; D221 85 D1                    ..
        jsr     LCC6D                           ; D223 20 6D CC                  m.
        inc     $03B6                           ; D226 EE B6 03                 ...
        bne     LD22E                           ; D229 D0 03                    ..
        inc     $03B5                           ; D22B EE B5 03                 ...
LD22E:  ply                                     ; D22E 7A                       z
        rts                                     ; D22F 60                       `
; ----------------------------------------------------------------------------
LD230:  jmp     (LD233,x)                       ; D230 7C 33 D2                 |3.
LD233:  .addr   LD247                           ; D233 47 D2                    G.
        .addr   LD28C                           ; D235 8C D2                    ..
        .addr   LD255                           ; D237 55 D2                    U.
        .addr   LD297                           ; D239 97 D2                    ..
        .addr   LD26A                           ; D23B 6A D2                    j.
        .addr   LD263                           ; D23D 63 D2                    c.
        .addr   LD2B2                           ; D23F B2 D2                    ..
        .addr   LD318                           ; D241 18 D3                    ..
        .addr   LD252                           ; D243 52 D2                    R.
        .addr   LD294                           ; D245 94 D2                    ..
; ----------------------------------------------------------------------------
LD247:  stz     $041C                           ; D247 9C 1C 04                 ...
        sta     $F8                             ; D24A 85 F8                    ..
        sty     $F9                             ; D24C 84 F9                    ..
        stz     $041D                           ; D24E 9C 1D 04                 ...
        rts                                     ; D251 60                       `
; ----------------------------------------------------------------------------
LD252:  lda     #$10                            ; D252 A9 10                    ..
        .byte   $2C                             ; D254 2C                       ,
LD255:  lda     #$20                            ; D255 A9 20                    .
        ldx     $041C                           ; D257 AE 1C 04                 ...
        beq     LD262                           ; D25A F0 06                    ..
        tsb     $041C                           ; D25C 0C 1C 04                 ...
        stz     $041D                           ; D25F 9C 1D 04                 ...
LD262:  rts                                     ; D262 60                       `
; ----------------------------------------------------------------------------
LD263:  sta     $041D                           ; D263 8D 1D 04                 ...
        stz     $041E                           ; D266 9C 1E 04                 ...
        rts                                     ; D269 60                       `
; ----------------------------------------------------------------------------
LD26A:  sty     $C0                             ; D26A 84 C0                    ..
        sta     $BF                             ; D26C 85 BF                    ..
        lda     $041C                           ; D26E AD 1C 04                 ...
        beq     LD277                           ; D271 F0 04                    ..
        and     #$38                            ; D273 29 38                    )8
        beq     LD278                           ; D275 F0 01                    ..
LD277:  rts                                     ; D277 60                       `
; ----------------------------------------------------------------------------
LD278:  lda     $041D                           ; D278 AD 1D 04                 ...
        beq     LD28A                           ; D27B F0 0D                    ..
        lda     LD28B,x                         ; D27D BD 8B D2                 ...
        eor     $041C                           ; D280 4D 1C 04                 M..
        and     $07                             ; D283 25 07                    %.
        bne     LD28A                           ; D285 D0 03                    ..
        stz     $041D                           ; D287 9C 1D 04                 ...
LD28A:  .byte   $80                             ; D28A 80                       .
LD28B:  .byte   $0B                             ; D28B 0B                       .
LD28C:  sty     $039C                           ; D28C 8C 9C 03                 ...
        and     #$CF                            ; D28F 29 CF                    ).
        sta     $041C                           ; D291 8D 1C 04                 ...
LD294:  lda     #$10                            ; D294 A9 10                    ..
        .byte   $2C                             ; D296 2C                       ,
LD297:  lda     #$20                            ; D297 A9 20                    .
        ldx     $041C                           ; D299 AE 1C 04                 ...
        beq     LD2AA                           ; D29C F0 0C                    ..
        trb     $041C                           ; D29E 1C 1C 04                 ...
        lda     #$30                            ; D2A1 A9 30                    .0
        bit     $041C                           ; D2A3 2C 1C 04                 ,..
        bne     LD2AA                           ; D2A6 D0 02                    ..
        bvs     LD327                           ; D2A8 70 7D                    p}
LD2AA:  rts                                     ; D2AA 60                       `
; ----------------------------------------------------------------------------
LD2AB:  lda     $041D                           ; D2AB AD 1D 04                 ...
        stz     $041D                           ; D2AE 9C 1D 04                 ...
        rts                                     ; D2B1 60                       `
; ----------------------------------------------------------------------------
LD2B2:  lda     $041D                           ; D2B2 AD 1D 04                 ...
        cmp     #$85                            ; D2B5 C9 85                    ..
        bcc     LD2AB                           ; D2B7 90 F2                    ..
        cmp     #$8D                            ; D2B9 C9 8D                    ..
        bcs     LD2AB                           ; D2BB B0 EE                    ..
        tay                                     ; D2BD A8                       .
        ldx     LD28B,y                         ; D2BE BE 8B D2                 ...
        lda     $041C                           ; D2C1 AD 1C 04                 ...
        bit     #$30                            ; D2C4 89 30                    .0
        bne     LD2AB                           ; D2C6 D0 E3                    ..
        bit     #$08                            ; D2C8 89 08                    ..
        beq     LD2DB                           ; D2CA F0 0F                    ..
        txa                                     ; D2CC 8A                       .
        eor     $041C                           ; D2CD 4D 1C 04                 M..
        and     #$07                            ; D2D0 29 07                    ).
        bne     LD2DB                           ; D2D2 D0 07                    ..
        lda     #$BF                            ; D2D4 A9 BF                    ..
        sta     $0357                           ; D2D6 8D 57 03                 .W.
        bra     LD2FC                           ; D2D9 80 21                    .!
LD2DB:  bit     $041C                           ; D2DB 2C 1C 04                 ,..
        bvc     LD2AB                           ; D2DE 50 CB                    P.
        lda     #$F8                            ; D2E0 A9 F8                    ..
        sta     $0357                           ; D2E2 8D 57 03                 .W.
        ldy     $041E                           ; D2E5 AC 1E 04                 ...
        bne     LD2FC                           ; D2E8 D0 12                    ..
LD2EA:  dex                                     ; D2EA CA                       .
        bmi     LD2F9                           ; D2EB 30 0C                    0.
LD2ED:  jsr     FROM_C684                       ; D2ED 20 53 03                  S.
        iny                                     ; D2F0 C8                       .
        beq     LD2F9                           ; D2F1 F0 06                    ..
        cmp     #$00                            ; D2F3 C9 00                    ..
        bne     LD2ED                           ; D2F5 D0 F6                    ..
        beq     LD2EA                           ; D2F7 F0 F1                    ..
LD2F9:  sty     $041E                           ; D2F9 8C 1E 04                 ...
LD2FC:  ldy     $041E                           ; D2FC AC 1E 04                 ...
        inc     $041E                           ; D2FF EE 1E 04                 ...
        beq     LD309                           ; D302 F0 05                    ..
        jsr     FROM_C684                       ; D304 20 53 03                  S.
        bne     LD30F                           ; D307 D0 06                    ..
LD309:  stz     $041E                           ; D309 9C 1E 04                 ...
        stz     $041D                           ; D30C 9C 1D 04                 ...
LD30F:  rts                                     ; D30F 60                       `
; ----------------------------------------------------------------------------
        brk                                     ; D310 00                       .
        .byte   $02                             ; D311 02                       .
        tsb     $06                             ; D312 04 06                    ..
        ora     ($03,x)                         ; D314 01 03                    ..
        ora     $07                             ; D316 05 07                    ..
LD318:  ldx     $039C                           ; D318 AE 9C 03                 ...
        phx                                     ; D31B DA                       .
        sta     $039C                           ; D31C 8D 9C 03                 ...
        jsr     LD329                           ; D31F 20 29 D3                  ).
        plx                                     ; D322 FA                       .
        stx     $039C                           ; D323 8E 9C 03                 ...
        rts                                     ; D326 60                       `
; ----------------------------------------------------------------------------
LD327:  ldy     #$F8                            ; D327 A0 F8                    ..
LD329:  sty     $0357                           ; D329 8C 57 03                 .W.
        ldx     #$00                            ; D32C A2 00                    ..
        ldy     #$00                            ; D32E A0 00                    ..
LD330:  phx                                     ; D330 DA                       .
        phy                                     ; D331 5A                       Z
        ldy     LD366,x                         ; D332 BC 66 D3                 .f.
        ldx     $039C                           ; D335 AE 9C 03                 ...
        lda     #$89                            ; D338 A9 89                    ..
        sec                                     ; D33A 38                       8
        jsr     LB6F9                           ; D33B 20 F9 B6                  ..
        lda     #$65                            ; D33E A9 65                    .e
        ldy     #$09                            ; D340 A0 09                    ..
        sta     ($BD),y                         ; D342 91 BD                    ..
        ply                                     ; D344 7A                       z
LD345:  jsr     FROM_C684                       ; D345 20 53 03                  S.
        beq     LD359                           ; D348 F0 0F                    ..
        cmp     #$08                            ; D34A C9 08                    ..
        bcs     LD353                           ; D34C B0 05                    ..
        jsr     LD36E                           ; D34E 20 6E D3                  n.
        bra     LD356                           ; D351 80 03                    ..
LD353:  jsr     LD3A9                           ; D353 20 A9 D3                  ..
LD356:  iny                                     ; D356 C8                       .
        bne     LD345                           ; D357 D0 EC                    ..
LD359:  lda     #$0D                            ; D359 A9 0D                    ..
        jsr     LD3A9                           ; D35B 20 A9 D3                  ..
        iny                                     ; D35E C8                       .
        plx                                     ; D35F FA                       .
        inx                                     ; D360 E8                       .
        cpx     #$08                            ; D361 E0 08                    ..
        bcc     LD330                           ; D363 90 CB                    ..
        rts                                     ; D365 60                       `
; ----------------------------------------------------------------------------
LD366:  brk                                     ; D366 00                       .
        asl     a                               ; D367 0A                       .
        trb     $1E                             ; D368 14 1E                    ..
        plp                                     ; D36A 28                       (
        and     ($3C)                           ; D36B 32 3C                    2<
        .byte   $46                             ; D36D 46                       F
LD36E:  dec     a                               ; D36E 3A                       :
        beq     LD382                           ; D36F F0 11                    ..
        dec     a                               ; D371 3A                       :
        asl     a                               ; D372 0A                       .
        asl     a                               ; D373 0A                       .
        tax                                     ; D374 AA                       .
LD375:  lda     LD391,x                         ; D375 BD 91 D3                 ...
        jsr     LD3A9                           ; D378 20 A9 D3                  ..
        inx                                     ; D37B E8                       .
        txa                                     ; D37C 8A                       .
        and     #$03                            ; D37D 29 03                    ).
        bne     LD375                           ; D37F D0 F4                    ..
        rts                                     ; D381 60                       `
; ----------------------------------------------------------------------------
LD382:  phy                                     ; D382 5A                       Z
        ldy     #$00                            ; D383 A0 00                    ..
LD385:  lda     ($BF),y                         ; D385 B1 BF                    ..
        beq     LD38F                           ; D387 F0 06                    ..
        jsr     LD3A9                           ; D389 20 A9 D3                  ..
        iny                                     ; D38C C8                       .
        bne     LD385                           ; D38D D0 F6                    ..
LD38F:  ply                                     ; D38F 7A                       z
        rts                                     ; D390 60                       `
; ----------------------------------------------------------------------------
LD391:  .byte   "EXITQUITMOREexitquitmore"      ; D391 45 58 49 54 51 55 49 54  EXITQUIT
                                                ; D399 4D 4F 52 45 65 78 69 74  MOREexit
                                                ; D3A1 71 75 69 74 6D 6F 72 65  quitmore
; ----------------------------------------------------------------------------
LD3A9:  clc                                     ; D3A9 18                       .
        jmp     LB6F9                           ; D3AA 4C F9 B6                 L..
; ----------------------------------------------------------------------------
MEMBOT__:
        rol     a                               ; D3AD 2A                       *
        inc     a                               ; D3AE 1A                       .
        ror     a                               ; D3AF 6A                       j
        bcc     LD3E4                           ; D3B0 90 32                    .2
        phx                                     ; D3B2 DA                       .
        lda     #$FF                            ; D3B3 A9 FF                    ..
        sta     MemBotLoByte                    ; D3B5 8D 98 03                 ...
        lda     #$F7                            ; D3B8 A9 F7                    ..
        sta     MemBotHiByte                    ; D3BA 8D 99 03                 ...
        ldx     $020B                           ; D3BD AE 0B 02                 ...
        bne     LD3CE                           ; D3C0 D0 0C                    ..
        cmp     $020A                           ; D3C2 CD 0A 02                 ...
        bcc     LD3CE                           ; D3C5 90 07                    ..
        lda     $020A                           ; D3C7 AD 0A 02                 ...
        dec     a                               ; D3CA 3A                       :
        sta     MemBotHiByte                    ; D3CB 8D 99 03                 ...
LD3CE:  plx                                     ; D3CE FA                       .
        cpy     MemBotHiByte                    ; D3CF CC 99 03                 ...
        bcc     LD3DD                           ; D3D2 90 09                    ..
        bne     LD3E4                           ; D3D4 D0 0E                    ..
        cpx     MemBotLoByte                    ; D3D6 EC 98 03                 ...
        bcc     LD3DD                           ; D3D9 90 02                    ..
        bne     LD3E4                           ; D3DB D0 07                    ..
LD3DD:  stx     MemBotLoByte                    ; D3DD 8E 98 03                 ...
        sty     MemBotHiByte                    ; D3E0 8C 99 03                 ...
        clc                                     ; D3E3 18                       .
LD3E4:  php                                     ; D3E4 08                       .
        ldy     MemBotHiByte                    ; D3E5 AC 99 03                 ...
        stz     $020D                           ; D3E8 9C 0D 02                 ...
        sty     $020C                           ; D3EB 8C 0C 02                 ...
        jsr     LD3F6                           ; D3EE 20 F6 D3                  ..
        ldx     MemBotLoByte                    ; D3F1 AE 98 03                 ...
        plp                                     ; D3F4 28                       (
        rts                                     ; D3F5 60                       `
; ----------------------------------------------------------------------------
LD3F6:  cld                                     ; D3F6 D8                       .
        sec                                     ; D3F7 38                       8
        lda     $020A                           ; D3F8 AD 0A 02                 ...
        sbc     $020C                           ; D3FB ED 0C 02                 ...
        tax                                     ; D3FE AA                       .
LD400           := * + 1
LD401           := * + 2
        lda     $020B                           ; D3FF AD 0B 02                 ...
LD404           := * + 2
        sbc     $020D                           ; D402 ED 0D 02                 ...
        bcs     LD409                           ; D405 B0 02                    ..
        ldx     #$01                            ; D407 A2 01                    ..
LD409:  beq     LD40D                           ; D409 F0 02                    ..
        ldx     #$00                            ; D40B A2 00                    ..
LD40D:  dex                                     ; D40D CA                       .
        stx     $BC                             ; D40E 86 BC                    ..
        rts                                     ; D410 60                       `
; ----------------------------------------------------------------------------
LD411:  clc                                     ; D411 18                       .
        ldy     #$FF                            ; D412 A0 FF                    ..
        jsr     MEMBOT__                        ; D414 20 AD D3                  ..
        clc                                     ; D417 18                       .
        ldy     #$00                            ; D418 A0 00                    ..
MEMTOP__:
        bcs     LD42F                           ; D41A B0 13                    ..
        cpy     #$10                            ; D41C C0 10                    ..
        bcs     LD429                           ; D41E B0 09                    ..
        ldx     #$00                            ; D420 A2 00                    ..
        ldy     #$10                            ; D422 A0 10                    ..
        jsr     LD429                           ; D424 20 29 D4                  ).
        sec                                     ; D427 38                       8
        rts                                     ; D428 60                       `
; ----------------------------------------------------------------------------
LD429:  sty     MemTopHiByte                    ; D429 8C 9B 03                 ...
        stx     MemTopLoByte                    ; D42C 8E 9A 03                 ...
LD42F:  ldx     MemTopLoByte                    ; D42F AE 9A 03                 ...
        ldy     MemTopHiByte                    ; D432 AC 9B 03                 ...
        clc                                     ; D435 18                       .
        rts                                     ; D436 60                       `
; ----------------------------------------------------------------------------
LD437:  phx                                     ; D437 DA                       .
        phy                                     ; D438 5A                       Z
        cld                                     ; D439 D8                       .
        stz     $E5                             ; D43A 64 E5                    d.
        asl     a                               ; D43C 0A                       .
        sta     $E4                             ; D43D 85 E4                    ..
        asl     a                               ; D43F 0A                       .
        rol     $E5                             ; D440 26 E5                    &.
        adc     $E4                             ; D442 65 E4                    e.
        pha                                     ; D444 48                       H
        lda     $E5                             ; D445 A5 E5                    ..
        adc     #$F7                            ; D447 69 F7                    i.
        ldx     #$03                            ; D449 A2 03                    ..
        jsr     L8A87                           ; D44B 20 87 8A                  ..
        pla                                     ; D44E 68                       h
        sta     $E4                             ; D44F 85 E4                    ..
        ply                                     ; D451 7A                       z
        plx                                     ; D452 FA                       .
        stx     $DA                             ; D453 86 DA                    ..
        sty     $D9                             ; D455 84 D9                    ..
        lda     #$D9                            ; D457 A9 D9                    ..
        sta     $034E                           ; D459 8D 4E 03                 .N.
        sta     $0360                           ; D45C 8D 60 03                 .`.
        ldx     #$07                            ; D45F A2 07                    ..
LD461:  lda     #$00                            ; D461 A9 00                    ..
        cpx     #$06                            ; D463 E0 06                    ..
        bcs     LD46B                           ; D465 B0 04                    ..
        txa                                     ; D467 8A                       .
        tay                                     ; D468 A8                       .
        lda     ($E4),y                         ; D469 B1 E4                    ..
LD46B:  ldy     #$07                            ; D46B A0 07                    ..
LD46D:  asl     a                               ; D46D 0A                       .
        pha                                     ; D46E 48                       H
        jsr     FROM_C67B                       ; D46F 20 4A 03                  J.
        ror     a                               ; D472 6A                       j
        jsr     FROM_C68D                       ; D473 20 5C 03                  \.
        pla                                     ; D476 68                       h
        dey                                     ; D477 88                       .
        bpl     LD46D                           ; D478 10 F3                    ..
        dex                                     ; D47A CA                       .
        bpl     LD461                           ; D47B 10 E4                    ..
        jmp     L8A81                           ; D47D 4C 81 8A                 L..
; ----------------------------------------------------------------------------
        phx                                     ; D480 DA                       .
        ldx     #$7F                            ; D481 A2 7F                    ..
        brk                                     ; D483 00                       .
        brk                                     ; D484 00                       .
        brk                                     ; D485 00                       .
        brk                                     ; D486 00                       .
        ora     $84                             ; D487 05 84                    ..
        inc     $1A                             ; D489 E6 1A                    ..
        and     L861B                           ; D48B 2D 1B 86                 -..
        plp                                     ; D48E 28                       (
        rmb0    $FB                             ; D48F 07 FB                    ..
        sed                                     ; D491 F8                       .
        smb0    $99                             ; D492 87 99                    ..
        pla                                     ; D494 68                       h
        bit     #$01                            ; D495 89 01                    ..
        smb0    $23                             ; D497 87 23                    .#
        and     $DF,x                           ; D499 35 DF                    5.
        sbc     ($86,x)                         ; D49B E1 86                    ..
        lda     $5D                             ; D49D A5 5D                    .]
        smb6    $28                             ; D49F E7 28                    .(
        .byte   $83                             ; D4A1 83                       .
        eor     #$0F                            ; D4A2 49 0F                    I.
        phx                                     ; D4A4 DA                       .
        ldx     #$A5                            ; D4A5 A2 A5                    ..
        pla                                     ; D4A7 68                       h
        pha                                     ; D4A8 48                       H
        bpl     LD4AE                           ; D4A9 10 03                    ..
        jsr     L8FED                           ; D4AB 20 ED 8F                  ..
LD4AE:  lda     $63                             ; D4AE A5 63                    .c
        pha                                     ; D4B0 48                       H
        cmp     #$81                            ; D4B1 C9 81                    ..
        bcc     LD4BC                           ; D4B3 90 07                    ..
        lda     #$98                            ; D4B5 A9 98                    ..
        ldy     #$89                            ; D4B7 A0 89                    ..
        jsr     L8A1A                           ; D4B9 20 1A 8A                  ..
LD4BC:  lda     #$D6                            ; D4BC A9 D6                    ..
        ldy     #$94                            ; D4BE A0 94                    ..
        jsr     L9079                           ; D4C0 20 79 90                  y.
        pla                                     ; D4C3 68                       h
        cmp     #$81                            ; D4C4 C9 81                    ..
        bcc     LD4CF                           ; D4C6 90 07                    ..
        lda     #$78                            ; D4C8 A9 78                    .x
        ldy     #$94                            ; D4CA A0 94                    ..
        jsr     L8A14                           ; D4CC 20 14 8A                  ..
LD4CF:  pla                                     ; D4CF 68                       h
        bpl     LD4D5                           ; D4D0 10 03                    ..
        jmp     L8FED                           ; D4D2 4C ED 8F                 L..
; ----------------------------------------------------------------------------
LD4D5:  rts                                     ; D4D5 60                       `
; ----------------------------------------------------------------------------
        .byte   $0B                             ; D4D6 0B                       .
        ror     $B3,x                           ; D4D7 76 B3                    v.
        .byte   $83                             ; D4D9 83                       .
        lda     $79D3,x                         ; D4DA BD D3 79                 ..y
        asl     LA6F4,x                         ; D4DD 1E F4 A6                 ...
        sbc     $7B,x                           ; D4E0 F5 7B                    .{
        .byte   $83                             ; D4E2 83                       .
        .byte   $FC                             ; D4E3 FC                       .
        bcs     LD4F6                           ; D4E4 B0 10                    ..
        jmp     (L1F0C,x)                       ; D4E6 7C 0C 1F                 |..
        rmb6    $CA                             ; D4E9 67 CA                    g.
        jmp     (L53DE,x)                       ; D4EB 7C DE 53                 |.S
        .byte   $CB                             ; D4EE CB                       .
        cmp     ($7D,x)                         ; D4EF C1 7D                    .}
        trb     $64                             ; D4F1 14 64                    .d
        bvs     LD541                           ; D4F3 70 4C                    pL
        .byte   $7D                             ; D4F5 7D                       }
LD4F6:  smb3    $EA                             ; D4F6 B7 EA                    ..
        eor     ($7A),y                         ; D4F8 51 7A                    Qz
        adc     $3063,x                         ; D4FA 7D 63 30                 }c0
        dey                                     ; D4FD 88                       .
        ror     L927E,x                         ; D4FE 7E 7E 92                 ~~.
        .byte   $44                             ; D501 44                       D
        sta     $7E3A,y                         ; D502 99 3A 7E                 .:~
        jmp     L91CC                           ; D505 4C CC 91                 L..
; ----------------------------------------------------------------------------
        smb4    $7F                             ; D508 C7 7F                    ..
        tax                                     ; D50A AA                       .
        tax                                     ; D50B AA                       .
        tax                                     ; D50C AA                       .
        .byte   $13                             ; D50D 13                       .
        sta     ($00,x)                         ; D50E 81 00                    ..
        brk                                     ; D510 00                       .
        brk                                     ; D511 00                       .
        brk                                     ; D512 00                       .
        ldx     #$FF                            ; D513 A2 FF                    ..
        stx     stack+54                        ; D515 8E 36 01                 .6.
        jsr     L0380                           ; D518 20 80 03                  ..
        jsr     L77DD                           ; D51B 20 DD 77                  .w
        jsr     L77CB                           ; D51E 20 CB 77                  .w
        lda     $66                             ; D521 A5 66                    .f
        pha                                     ; D523 48                       H
        lda     $67                             ; D524 A5 67                    .g
        pha                                     ; D526 48                       H
        ldy     #$02                            ; D527 A0 02                    ..
LD529:  jsr     L42E4                           ; D529 20 E4 42                  .B
        dey                                     ; D52C 88                       .
        sta     $3F,y                           ; D52D 99 3F 00                 .?.
        bne     LD529                           ; D530 D0 F7                    ..
        jsr     L42E4                           ; D532 20 E4 42                  .B
        sta     stack+53                        ; D535 8D 35 01                 .5.
        tay                                     ; D538 A8                       .
        beq     LD546                           ; D539 F0 0B                    ..
LD53B:  dey                                     ; D53B 88                       .
        jsr     L42D0                           ; D53C 20 D0 42                  .B
        cmp     #$23                            ; D53F C9 23                    .#
LD541:  beq     LD549                           ; D541 F0 06                    ..
        tya                                     ; D543 98                       .
        bne     LD53B                           ; D544 D0 F5                    ..
LD546:  jmp     L795A                           ; D546 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LD549:  lda     #$3B                            ; D549 A9 3B                    .;
LD54B:  jsr     L794C                           ; D54B 20 4C 79                  Ly
        sty     $77                             ; D54E 84 77                    .w
        sty     stack+35                        ; D550 8C 23 01                 .#.
        jsr     L77DD                           ; D553 20 DD 77                  .w
        bit     $0F                             ; D556 24 0F                    $.
        bpl     LD593                           ; D558 10 39                    .9
        jsr     L9792                           ; D55A 20 92 97                  ..
        jsr     L98E5                           ; D55D 20 E5 98                  ..
        ldx     stack+43                        ; D560 AE 2B 01                 .+.
        beq     LD57A                           ; D563 F0 15                    ..
        ldx     #$00                            ; D565 A2 00                    ..
        sec                                     ; D567 38                       8
        lda     stack+49                        ; D568 AD 31 01                 .1.
        sbc     $78                             ; D56B E5 78                    .x
        bcc     LD57A                           ; D56D 90 0B                    ..
        ldx     #$3D                            ; D56F A2 3D                    .=
        cpx     stack+43                        ; D571 EC 2B 01                 .+.
        bne     LD579                           ; D574 D0 03                    ..
        lsr     a                               ; D576 4A                       J
        adc     #$00                            ; D577 69 00                    i.
LD579:  tax                                     ; D579 AA                       .
LD57A:  ldy     #$00                            ; D57A A0 00                    ..
LD57C:  txa                                     ; D57C 8A                       .
        beq     LD584                           ; D57D F0 05                    ..
        dex                                     ; D57F CA                       .
LD580:  lda     #$20                            ; D580 A9 20                    .
        bne     LD58C                           ; D582 D0 08                    ..
LD584:  cpy     $78                             ; D584 C4 78                    .x
        bcs     LD580                           ; D586 B0 F8                    ..
        jsr     L03B7                           ; D588 20 B7 03                  ..
        iny                                     ; D58B C8                       .
LD58C:  jsr     L98DE                           ; D58C 20 DE 98                  ..
        bne     LD57C                           ; D58F D0 EB                    ..
        beq     LD5BA                           ; D591 F0 27                    .'
LD593:  jsr     L8E35                           ; D593 20 35 8E                  5.
        ldy     #$FF                            ; D596 A0 FF                    ..
LD598:  iny                                     ; D598 C8                       .
        lda     stack,y                         ; D599 B9 00 01                 ...
        bne     LD598                           ; D59C D0 FA                    ..
        tya                                     ; D59E 98                       .
        jsr     L868C                           ; D59F 20 8C 86                  ..
        ldy     #$00                            ; D5A2 A0 00                    ..
        sta     LFF04                           ; D5A4 8D 04 FF                 ...
LD5A7:  lda     stack,y                         ; D5A7 B9 00 01                 ...
        beq     LD5B1                           ; D5AA F0 05                    ..
        sta     ($64),y                         ; D5AC 91 64                    .d
        iny                                     ; D5AE C8                       .
        bne     LD5A7                           ; D5AF D0 F6                    ..
LD5B1:  jsr     L86DF                           ; D5B1 20 DF 86                  ..
        jsr     L9792                           ; D5B4 20 92 97                  ..
        jsr     L95DA                           ; D5B7 20 DA 95                  ..
LD5BA:  jsr     L0386                           ; D5BA 20 86 03                  ..
        cmp     #$2C                            ; D5BD C9 2C                    .,
        beq     LD54B                           ; D5BF F0 8A                    ..
        sec                                     ; D5C1 38                       8
        ror     $77                             ; D5C2 66 77                    fw
        jsr     L98E5                           ; D5C4 20 E5 98                  ..
        pla                                     ; D5C7 68                       h
        tay                                     ; D5C8 A8                       .
        pla                                     ; D5C9 68                       h
        jsr     L8781                           ; D5CA 20 81 87                  ..
        jsr     L0386                           ; D5CD 20 86 03                  ..
        cmp     #$3B                            ; D5D0 C9 3B                    .;
        beq     LD5D7                           ; D5D2 F0 03                    ..
        jmp     L5595                           ; D5D4 4C 95 55                 L.U
; ----------------------------------------------------------------------------
LD5D7:  jmp     L0380                           ; D5D7 4C 80 03                 L..
; ----------------------------------------------------------------------------
        sta     LFF03                           ; D5DA 8D 03 FF                 ...
        lda     $1204                           ; D5DD AD 04 12                 ...
        sta     stack+51                        ; D5E0 8D 33 01                 .3.
        lda     #$FF                            ; D5E3 A9 FF                    ..
LD5E5:  sta     stack+50                        ; D5E5 8D 32 01                 .2.
        jmp     L95ED                           ; D5E8 4C ED 95                 L..
; ----------------------------------------------------------------------------
LD5EB:  stx     $80                             ; D5EB 86 80                    ..
LD5ED:  cpy     $78                             ; D5ED C4 78                    .x
        beq     LD624                           ; D5EF F0 33                    .3
        lda     stack,y                         ; D5F1 B9 00 01                 ...
        iny                                     ; D5F4 C8                       .
        cmp     #$20                            ; D5F5 C9 20                    .
        beq     LD5ED                           ; D5F7 F0 F4                    ..
        cmp     #$2D                            ; D5F9 C9 2D                    .-
        beq     LD5E5                           ; D5FB F0 E8                    ..
        cmp     #$2E                            ; D5FD C9 2E                    ..
        beq     LD5EB                           ; D5FF F0 EA                    ..
        cmp     #$45                            ; D601 C9 45                    .E
        beq     LD616                           ; D603 F0 11                    ..
        sta     stack,x                         ; D605 9D 00 01                 ...
        stx     stack+36                        ; D608 8E 24 01                 .$.
        inx                                     ; D60B E8                       .
        bit     $80                             ; D60C 24 80                    $.
        bpl     LD5ED                           ; D60E 10 DD                    ..
        inc     stack+42                        ; D610 EE 2A 01                 .*.
        jmp     L95ED                           ; D613 4C ED 95                 L..
; ----------------------------------------------------------------------------
LD616:  lda     stack,y                         ; D616 B9 00 01                 ...
        cmp     #$2D                            ; D619 C9 2D                    .-
        bne     LD620                           ; D61B D0 03                    ..
        ror     stack+40                        ; D61D 6E 28 01                 n(.
LD620:  iny                                     ; D620 C8                       .
        sty     stack+41                        ; D621 8C 29 01                 .).
LD624:  lda     $80                             ; D624 A5 80                    ..
        bpl     LD62A                           ; D626 10 02                    ..
        stx     $80                             ; D628 86 80                    ..
LD62A:  jsr     L98E5                           ; D62A 20 E5 98                  ..
        lda     stack+44                        ; D62D AD 2C 01                 .,.
        cmp     #$FF                            ; D630 C9 FF                    ..
        beq     LD65D                           ; D632 F0 29                    .)
        lda     stack+47                        ; D634 AD 2F 01                 ./.
        beq     LD678                           ; D637 F0 3F                    .?
        lda     stack+41                        ; D639 AD 29 01                 .).
        bne     LD650                           ; D63C D0 12                    ..
        ldx     stack+36                        ; D63E AE 24 01                 .$.
        jsr     L9767                           ; D641 20 67 97                  g.
        dec     stack+2,x                       ; D644 DE 02 01                 ...
        inx                                     ; D647 E8                       .
        stx     stack+41                        ; D648 8E 29 01                 .).
        jsr     L97EE                           ; D64B 20 EE 97                  ..
        beq     LD675                           ; D64E F0 25                    .%
LD650:  ldy     stack+46                        ; D650 AC 2E 01                 ...
        bne     LD66C                           ; D653 D0 17                    ..
        ldy     stack+50                        ; D655 AC 32 01                 .2.
        bmi     LD66C                           ; D658 30 12                    0.
        lda     stack+44                        ; D65A AD 2C 01                 .,.
LD65D:  beq     LD6C9                           ; D65D F0 6A                    .j
        dec     stack+44                        ; D65F CE 2C 01                 .,.
        bne     LD669                           ; D662 D0 05                    ..
        lda     stack+45                        ; D664 AD 2D 01                 .-.
        beq     LD6C9                           ; D667 F0 60                    .`
LD669:  inc     stack+39                        ; D669 EE 27 01                 .'.
LD66C:  jsr     L96E1                           ; D66C 20 E1 96                  ..
        jsr     L97AC                           ; D66F 20 AC 97                  ..
        jsr     L96E1                           ; D672 20 E1 96                  ..
LD675:  jmp     L980F                           ; D675 4C 0F 98                 L..
; ----------------------------------------------------------------------------
LD678:  ldy     stack+41                        ; D678 AC 29 01                 .).
        beq     LD693                           ; D67B F0 16                    ..
        sta     $78                             ; D67D 85 78                    .x
        sec                                     ; D67F 38                       8
        ror     stack+48                        ; D680 6E 30 01                 n0.
        ldy     $80                             ; D683 A4 80                    ..
        lda     stack+40                        ; D685 AD 28 01                 .(.
        bpl     LD690                           ; D688 10 06                    ..
        jsr     L971A                           ; D68A 20 1A 97                  ..
        jmp     L969C                           ; D68D 4C 9C 96                 L..
; ----------------------------------------------------------------------------
LD690:  jsr     L96FB                           ; D690 20 FB 96                  ..
LD693:  ldy     $80                             ; D693 A4 80                    ..
        beq     LD69C                           ; D695 F0 05                    ..
        jsr     L97F2                           ; D697 20 F2 97                  ..
        beq     LD6A2                           ; D69A F0 06                    ..
LD69C:  jsr     L97AC                           ; D69C 20 AC 97                  ..
        jmp     L96A5                           ; D69F 4C A5 96                 L..
; ----------------------------------------------------------------------------
LD6A2:  dec     stack+42                        ; D6A2 CE 2A 01                 .*.
        sec                                     ; D6A5 38                       8
        lda     stack+44                        ; D6A6 AD 2C 01                 .,.
        sbc     stack+42                        ; D6A9 ED 2A 01                 .*.
        bcc     LD6C9                           ; D6AC 90 1B                    ..
        sta     stack+39                        ; D6AE 8D 27 01                 .'.
        ldy     stack+46                        ; D6B1 AC 2E 01                 ...
        bne     LD6D1                           ; D6B4 D0 1B                    ..
        ldy     stack+50                        ; D6B6 AC 32 01                 .2.
        bmi     LD6D1                           ; D6B9 30 16                    0.
        tay                                     ; D6BB A8                       .
        beq     LD6C9                           ; D6BC F0 0B                    ..
        dey                                     ; D6BE 88                       .
        bne     LD6D4                           ; D6BF D0 13                    ..
        lda     stack+45                        ; D6C1 AD 2D 01                 .-.
        ora     stack+42                        ; D6C4 0D 2A 01                 .*.
        bne     LD675                           ; D6C7 D0 AC                    ..
LD6C9:  lda     #$2A                            ; D6C9 A9 2A                    .*
LD6CB:  jsr     L98DE                           ; D6CB 20 DE 98                  ..
        bne     LD6CB                           ; D6CE D0 FB                    ..
        rts                                     ; D6D0 60                       `
; ----------------------------------------------------------------------------
LD6D1:  tay                                     ; D6D1 A8                       .
        beq     LD675                           ; D6D2 F0 A1                    ..
LD6D4:  lda     stack+42                        ; D6D4 AD 2A 01                 .*.
        bne     LD675                           ; D6D7 D0 9C                    ..
        dec     stack+39                        ; D6D9 CE 27 01                 .'.
        inc     $77                             ; D6DC E6 77                    .w
        jmp     L9675                           ; D6DE 4C 75 96                 Lu.
; ----------------------------------------------------------------------------
        sec                                     ; D6E1 38                       8
        lda     stack+44                        ; D6E2 AD 2C 01                 .,.
        sbc     stack+42                        ; D6E5 ED 2A 01                 .*.
        beq     LD723                           ; D6E8 F0 39                    .9
        ldy     $80                             ; D6EA A4 80                    ..
        bcc     LD704                           ; D6EC 90 16                    ..
        sta     $78                             ; D6EE 85 78                    .x
LD6F0:  cpy     stack+36                        ; D6F0 CC 24 01                 .$.
        beq     LD6F7                           ; D6F3 F0 02                    ..
        bcs     LD6F8                           ; D6F5 B0 01                    ..
LD6F7:  iny                                     ; D6F7 C8                       .
LD6F8:  inc     stack+42                        ; D6F8 EE 2A 01                 .*.
        jsr     L9730                           ; D6FB 20 30 97                  0.
        dec     $78                             ; D6FE C6 78                    .x
        bne     LD6F0                           ; D700 D0 EE                    ..
        beq     LD721                           ; D702 F0 1D                    ..
LD704:  eor     #$FF                            ; D704 49 FF                    I.
        adc     #$01                            ; D706 69 01                    i.
        sta     $78                             ; D708 85 78                    .x
LD70A:  cpy     stack+35                        ; D70A CC 23 01                 .#.
        beq     LD716                           ; D70D F0 07                    ..
        dey                                     ; D70F 88                       .
        dec     stack+42                        ; D710 CE 2A 01                 .*.
        jmp     L9718                           ; D713 4C 18 97                 L..
; ----------------------------------------------------------------------------
LD716:  inc     $77                             ; D716 E6 77                    .w
        lda     #$80                            ; D718 A9 80                    ..
        jsr     L9732                           ; D71A 20 32 97                  2.
        dec     $78                             ; D71D C6 78                    .x
        bne     LD70A                           ; D71F D0 E9                    ..
LD721:  sty     $80                             ; D721 84 80                    ..
LD723:  rts                                     ; D723 60                       `
; ----------------------------------------------------------------------------
        bne     LD75F                           ; D724 D0 39                    .9
        eor     #$09                            ; D726 49 09                    I.
        sta     stack,x                         ; D728 9D 00 01                 ...
        dex                                     ; D72B CA                       .
        cpx     stack+41                        ; D72C EC 29 01                 .).
        rts                                     ; D72F 60                       `
; ----------------------------------------------------------------------------
        lda     #$00                            ; D730 A9 00                    ..
        ldx     stack+41                        ; D732 AE 29 01                 .).
        inx                                     ; D735 E8                       .
        bit     stack+48                        ; D736 2C 30 01                 ,0.
        bmi     LD74B                           ; D739 30 10                    0.
        eor     stack+40                        ; D73B 4D 28 01                 M(.
        beq     LD74B                           ; D73E F0 0B                    ..
LD740:  jsr     L9775                           ; D740 20 75 97                  u.
        jsr     L9724                           ; D743 20 24 97                  $.
        bcs     LD740                           ; D746 B0 F8                    ..
        jmp     L8959                           ; D748 4C 59 89                 LY.
; ----------------------------------------------------------------------------
LD74B:  lda     stack,x                         ; D74B BD 00 01                 ...
        dec     stack,x                         ; D74E DE 00 01                 ...
        cmp     #$30                            ; D751 C9 30                    .0
        jsr     L9724                           ; D753 20 24 97                  $.
        bcs     LD74B                           ; D756 B0 F3                    ..
        bit     stack+48                        ; D758 2C 30 01                 ,0.
        bpl     LD762                           ; D75B 10 05                    ..
        sty     $80                             ; D75D 84 80                    ..
LD75F:  pla                                     ; D75F 68                       h
        pla                                     ; D760 68                       h
        rts                                     ; D761 60                       `
; ----------------------------------------------------------------------------
LD762:  lda     stack+40                        ; D762 AD 28 01                 .(.
        eor     #$80                            ; D765 49 80                    I.
        sta     stack+40                        ; D767 8D 28 01                 .(.
        lda     #$30                            ; D76A A9 30                    .0
        sta     stack+1,x                       ; D76C 9D 01 01                 ...
        lda     #$31                            ; D76F A9 31                    .1
        sta     stack+2,x                       ; D771 9D 02 01                 ...
        rts                                     ; D774 60                       `
; ----------------------------------------------------------------------------
        lda     stack,x                         ; D775 BD 00 01                 ...
        inc     stack,x                         ; D778 FE 00 01                 ...
        cmp     #$39                            ; D77B C9 39                    .9
        rts                                     ; D77D 60                       `
; ----------------------------------------------------------------------------
        clc                                     ; D77E 18                       .
        iny                                     ; D77F C8                       .
        beq     LD787                           ; D780 F0 05                    ..
        cpy     stack+53                        ; D782 CC 35 01                 .5.
        bcc     LD78B                           ; D785 90 04                    ..
LD787:  ldy     $77                             ; D787 A4 77                    .w
        bne     LD75F                           ; D789 D0 D4                    ..
LD78B:  jsr     L42D0                           ; D78B 20 D0 42                  .B
        inc     stack+49                        ; D78E EE 31 01                 .1.
        rts                                     ; D791 60                       `
; ----------------------------------------------------------------------------
        jsr     L877D                           ; D792 20 7D 87                  }.
        sta     $78                             ; D795 85 78                    .x
        ldx     #$0A                            ; D797 A2 0A                    ..
        lda     #$00                            ; D799 A9 00                    ..
LD79B:  sta     stack+39,x                      ; D79B 9D 27 01                 .'.
        dex                                     ; D79E CA                       .
        bpl     LD79B                           ; D79F 10 FA                    ..
        stx     stack+38                        ; D7A1 8E 26 01                 .&.
        stx     $80                             ; D7A4 86 80                    ..
        stx     stack+37                        ; D7A6 8E 25 01                 .%.
        tax                                     ; D7A9 AA                       .
        tay                                     ; D7AA A8                       .
        rts                                     ; D7AB 60                       `
; ----------------------------------------------------------------------------
        clc                                     ; D7AC 18                       .
        lda     $80                             ; D7AD A5 80                    ..
        adc     stack+45                        ; D7AF 6D 2D 01                 m-.
        bcs     LD7ED                           ; D7B2 B0 39                    .9
        sec                                     ; D7B4 38                       8
        sbc     $77                             ; D7B5 E5 77                    .w
        bcc     LD7ED                           ; D7B7 90 34                    .4
        cmp     stack+36                        ; D7B9 CD 24 01                 .$.
        beq     LD7C0                           ; D7BC F0 02                    ..
        bcs     LD7ED                           ; D7BE B0 2D                    .-
LD7C0:  cmp     stack+35                        ; D7C0 CD 23 01                 .#.
        bcc     LD7ED                           ; D7C3 90 28                    .(
        tax                                     ; D7C5 AA                       .
        lda     stack,x                         ; D7C6 BD 00 01                 ...
        cmp     #$35                            ; D7C9 C9 35                    .5
        bcc     LD7ED                           ; D7CB 90 20                    .
LD7CD:  cpx     stack+35                        ; D7CD EC 23 01                 .#.
        beq     LD7DC                           ; D7D0 F0 0A                    ..
        dex                                     ; D7D2 CA                       .
        jsr     L9775                           ; D7D3 20 75 97                  u.
        stx     stack+36                        ; D7D6 8E 24 01                 .$.
        beq     LD7CD                           ; D7D9 F0 F2                    ..
        rts                                     ; D7DB 60                       `
; ----------------------------------------------------------------------------
LD7DC:  lda     #$31                            ; D7DC A9 31                    .1
        sta     stack,x                         ; D7DE 9D 00 01                 ...
        inx                                     ; D7E1 E8                       .
        stx     $80                             ; D7E2 86 80                    ..
        dec     $77                             ; D7E4 C6 77                    .w
        bpl     LD7ED                           ; D7E6 10 05                    ..
        inc     $77                             ; D7E8 E6 77                    .w
        inc     stack+42                        ; D7EA EE 2A 01                 .*.
LD7ED:  rts                                     ; D7ED 60                       `
; ----------------------------------------------------------------------------
        ldy     $80                             ; D7EE A4 80                    ..
        beq     LD809                           ; D7F0 F0 17                    ..
        ldy     stack+35                        ; D7F2 AC 23 01                 .#.
        lda     stack,y                         ; D7F5 B9 00 01                 ...
        cmp     #$30                            ; D7F8 C9 30                    .0
        rts                                     ; D7FA 60                       `
; ----------------------------------------------------------------------------
LD7FB:  inc     $80                             ; D7FB E6 80                    ..
        jsr     L9730                           ; D7FD 20 30 97                  0.
        inc     stack+35                        ; D800 EE 23 01                 .#.
        cpy     stack+36                        ; D803 CC 24 01                 .$.
        beq     LD7ED                           ; D806 F0 E5                    ..
        iny                                     ; D808 C8                       .
LD809:  jsr     L97F5                           ; D809 20 F5 97                  ..
        beq     LD7FB                           ; D80C F0 ED                    ..
        rts                                     ; D80E 60                       `
; ----------------------------------------------------------------------------
        lda     stack+37                        ; D80F AD 25 01                 .%.
        bmi     LD816                           ; D812 30 02                    0.
        inc     $77                             ; D814 E6 77                    .w
LD816:  ldx     stack+35                        ; D816 AE 23 01                 .#.
        dex                                     ; D819 CA                       .
        ldy     stack+52                        ; D81A AC 34 01                 .4.
        jsr     L42D0                           ; D81D 20 D0 42                  .B
        iny                                     ; D820 C8                       .
        cmp     #$2C                            ; D821 C9 2C                    .,
        bne     LD839                           ; D823 D0 14                    ..
        bit     stack+38                        ; D825 2C 26 01                 ,&.
        bmi     LD833                           ; D828 30 09                    0.
        sta     LFF03                           ; D82A 8D 03 FF                 ...
        lda     $1205                           ; D82D AD 05 12                 ...
        jmp     L989E                           ; D830 4C 9E 98                 L..
; ----------------------------------------------------------------------------
LD833:  lda     stack+51                        ; D833 AD 33 01                 .3.
        jmp     L989E                           ; D836 4C 9E 98                 L..
; ----------------------------------------------------------------------------
LD839:  cmp     #$2E                            ; D839 C9 2E                    ..
        bne     LD846                           ; D83B D0 09                    ..
        sta     LFF03                           ; D83D 8D 03 FF                 ...
        lda     $1206                           ; D840 AD 06 12                 ...
        jmp     L989E                           ; D843 4C 9E 98                 L..
; ----------------------------------------------------------------------------
LD846:  cmp     #$2B                            ; D846 C9 2B                    .+
        beq     LD885                           ; D848 F0 3B                    .;
        cmp     #$2D                            ; D84A C9 2D                    .-
        beq     LD880                           ; D84C F0 32                    .2
        cmp     #$5E                            ; D84E C9 5E                    .^
        bne     LD8BB                           ; D850 D0 69                    .i
        lda     #$45                            ; D852 A9 45                    .E
        jsr     L98DE                           ; D854 20 DE 98                  ..
        ldy     stack+41                        ; D857 AC 29 01                 .).
        jsr     L97F5                           ; D85A 20 F5 97                  ..
        bne     LD865                           ; D85D D0 06                    ..
        iny                                     ; D85F C8                       .
        jsr     L97F5                           ; D860 20 F5 97                  ..
        beq     LD86C                           ; D863 F0 07                    ..
LD865:  lda     #$2D                            ; D865 A9 2D                    .-
        bit     stack+40                        ; D867 2C 28 01                 ,(.
        bmi     LD86E                           ; D86A 30 02                    0.
LD86C:  lda     #$2B                            ; D86C A9 2B                    .+
LD86E:  jsr     L98DE                           ; D86E 20 DE 98                  ..
        ldx     stack+41                        ; D871 AE 29 01                 .).
        lda     stack,x                         ; D874 BD 00 01                 ...
        jsr     L98DE                           ; D877 20 DE 98                  ..
        ldy     stack+54                        ; D87A AC 36 01                 .6.
        jmp     L9894                           ; D87D 4C 94 98                 L..
; ----------------------------------------------------------------------------
LD880:  lda     stack+50                        ; D880 AD 32 01                 .2.
        bmi     LD833                           ; D883 30 AE                    0.
LD885:  lda     stack+50                        ; D885 AD 32 01                 .2.
        jmp     L989E                           ; D888 4C 9E 98                 L..
; ----------------------------------------------------------------------------
LD88B:  lda     $77                             ; D88B A5 77                    .w
        bne     LD8A7                           ; D88D D0 18                    ..
        cpx     stack+36                        ; D88F EC 24 01                 .$.
        beq     LD899                           ; D892 F0 05                    ..
        inx                                     ; D894 E8                       .
        lda     stack,x                         ; D895 BD 00 01                 ...
        .byte   $2C                             ; D898 2C                       ,
LD899:  lda     #$30                            ; D899 A9 30                    .0
        lsr     stack+38                        ; D89B 4E 26 01                 N&.
        jsr     L98DE                           ; D89E 20 DE 98                  ..
        beq     LD8A6                           ; D8A1 F0 03                    ..
        jmp     L981D                           ; D8A3 4C 1D 98                 L..
; ----------------------------------------------------------------------------
LD8A6:  rts                                     ; D8A6 60                       `
; ----------------------------------------------------------------------------
LD8A7:  dec     $77                             ; D8A7 C6 77                    .w
        lda     stack+37                        ; D8A9 AD 25 01                 .%.
        bmi     LD899                           ; D8AC 30 EB                    0.
        sec                                     ; D8AE 38                       8
        ror     stack+37                        ; D8AF 6E 25 01                 n%.
        sta     LFF03                           ; D8B2 8D 03 FF                 ...
        lda     $1207                           ; D8B5 AD 07 12                 ...
        jmp     L989B                           ; D8B8 4C 9B 98                 L..
; ----------------------------------------------------------------------------
LD8BB:  lda     stack+39                        ; D8BB AD 27 01                 .'.
        beq     LD88B                           ; D8BE F0 CB                    ..
        dec     stack+39                        ; D8C0 CE 27 01                 .'.
LD8C3:  beq     LD8C8                           ; D8C3 F0 03                    ..
        jmp     L9833                           ; D8C5 4C 33 98                 L3.
; ----------------------------------------------------------------------------
LD8C8:  lda     stack+46                        ; D8C8 AD 2E 01                 ...
        bmi     LD8C3                           ; D8CB 30 F6                    0.
        jsr     L42D0                           ; D8CD 20 D0 42                  .B
        cmp     #$2C                            ; D8D0 C9 2C                    .,
        bne     LD880                           ; D8D2 D0 AC                    ..
        lda     stack+51                        ; D8D4 AD 33 01                 .3.
        jsr     L98DE                           ; D8D7 20 DE 98                  ..
        iny                                     ; D8DA C8                       .
        jmp     L98CD                           ; D8DB 4C CD 98                 L..
; ----------------------------------------------------------------------------
        jsr     L5609                           ; D8DE 20 09 56                  .V
        dec     stack+49                        ; D8E1 CE 31 01                 .1.
        rts                                     ; D8E4 60                       `
; ----------------------------------------------------------------------------
        ldy     stack+54                        ; D8E5 AC 36 01                 .6.
        jsr     L977E                           ; D8E8 20 7E 97                  ~.
        jsr     L999A                           ; D8EB 20 9A 99                  ..
        bne     LD904                           ; D8EE D0 14                    ..
        sty     stack+52                        ; D8F0 8C 34 01                 .4.
        bcc     LD90F                           ; D8F3 90 1A                    ..
        tax                                     ; D8F5 AA                       .
LD8F6:  jsr     L977E                           ; D8F6 20 7E 97                  ~.
        bcs     LD900                           ; D8F9 B0 05                    ..
        jsr     L99A2                           ; D8FB 20 A2 99                  ..
        beq     LD90A                           ; D8FE F0 0A                    ..
LD900:  ldy     stack+52                        ; D900 AC 34 01                 .4.
        txa                                     ; D903 8A                       .
LD904:  jsr     L5609                           ; D904 20 09 56                  .V
        jmp     L98E8                           ; D907 4C E8 98                 L..
; ----------------------------------------------------------------------------
LD90A:  bcs     LD8F6                           ; D90A B0 EA                    ..
        ldy     stack+52                        ; D90C AC 34 01                 .4.
LD90F:  ldx     $77                             ; D90F A6 77                    .w
        bne     LD98D                           ; D911 D0 7A                    .z
        stx     stack+49                        ; D913 8E 31 01                 .1.
        dey                                     ; D916 88                       .
LD917:  dec     stack+49                        ; D917 CE 31 01                 .1.
LD91A:  jsr     L977E                           ; D91A 20 7E 97                  ~.
        bcs     LD993                           ; D91D B0 74                    .t
        cmp     #$2C                            ; D91F C9 2C                    .,
        beq     LD91A                           ; D921 F0 F7                    ..
        jsr     L9971                           ; D923 20 71 99                  q.
        bcc     LD917                           ; D926 90 EF                    ..
        cmp     #$2E                            ; D928 C9 2E                    ..
        bne     LD934                           ; D92A D0 08                    ..
        inx                                     ; D92C E8                       .
        cpx     #$02                            ; D92D E0 02                    ..
        bcc     LD91A                           ; D92F 90 E9                    ..
LD931:  jmp     L795A                           ; D931 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LD934:  jsr     L99A6                           ; D934 20 A6 99                  ..
        bne     LD944                           ; D937 D0 0B                    ..
        bcc     LD93E                           ; D939 90 03                    ..
        sta     stack+43                        ; D93B 8D 2B 01                 .+.
LD93E:  inc     stack+44,x                      ; D93E FE 2C 01                 .,.
        jmp     L991A                           ; D941 4C 1A 99                 L..
; ----------------------------------------------------------------------------
LD944:  cmp     #$24                            ; D944 C9 24                    .$
        bne     LD957                           ; D946 D0 0F                    ..
        bit     stack+37                        ; D948 2C 25 01                 ,%.
        bpl     LD93E                           ; D94B 10 F1                    ..
        clc                                     ; D94D 18                       .
        ror     stack+37                        ; D94E 6E 25 01                 n%.
        dec     stack+44                        ; D951 CE 2C 01                 .,.
        jmp     L993E                           ; D954 4C 3E 99                 L>.
; ----------------------------------------------------------------------------
LD957:  cmp     #$5E                            ; D957 C9 5E                    .^
        bne     LD971                           ; D959 D0 16                    ..
        ldx     #$02                            ; D95B A2 02                    ..
LD95D:  jsr     L977E                           ; D95D 20 7E 97                  ~.
        bcs     LD931                           ; D960 B0 CF                    ..
        cmp     #$5E                            ; D962 C9 5E                    .^
        bne     LD931                           ; D964 D0 CB                    ..
        dex                                     ; D966 CA                       .
        bpl     LD95D                           ; D967 10 F4                    ..
        inc     stack+47                        ; D969 EE 2F 01                 ./.
        jsr     L977E                           ; D96C 20 7E 97                  ~.
        bcs     LD993                           ; D96F B0 22                    ."
LD971:  cmp     #$2B                            ; D971 C9 2B                    .+
        bne     LD98E                           ; D973 D0 19                    ..
        lda     stack+50                        ; D975 AD 32 01                 .2.
        bpl     LD97F                           ; D978 10 05                    ..
        lda     #$2B                            ; D97A A9 2B                    .+
        sta     stack+50                        ; D97C 8D 32 01                 .2.
LD97F:  lda     stack+46                        ; D97F AD 2E 01                 ...
        bne     LD931                           ; D982 D0 AD                    ..
        ror     stack+46                        ; D984 6E 2E 01                 n..
        sty     stack+54                        ; D987 8C 36 01                 .6.
        inc     stack+49                        ; D98A EE 31 01                 .1.
LD98D:  rts                                     ; D98D 60                       `
; ----------------------------------------------------------------------------
LD98E:  cmp     #$2D                            ; D98E C9 2D                    .-
        beq     LD97F                           ; D990 F0 ED                    ..
        sec                                     ; D992 38                       8
LD993:  sty     stack+54                        ; D993 8C 36 01                 .6.
        dec     stack+54                        ; D996 CE 36 01                 .6.
        rts                                     ; D999 60                       `
; ----------------------------------------------------------------------------
        cmp     #$2B                            ; D99A C9 2B                    .+
        beq     LD9B3                           ; D99C F0 15                    ..
        cmp     #$2D                            ; D99E C9 2D                    .-
        beq     LD9B3                           ; D9A0 F0 11                    ..
        cmp     #$2E                            ; D9A2 C9 2E                    ..
        beq     LD9B3                           ; D9A4 F0 0D                    ..
        cmp     #$3D                            ; D9A6 C9 3D                    .=
        beq     LD9B3                           ; D9A8 F0 09                    ..
        cmp     #$3E                            ; D9AA C9 3E                    .>
        beq     LD9B3                           ; D9AC F0 05                    ..
        cmp     #$23                            ; D9AE C9 23                    .#
        bne     LD9B3                           ; D9B0 D0 01                    ..
        clc                                     ; D9B2 18                       .
LD9B3:  rts                                     ; D9B3 60                       `
; ----------------------------------------------------------------------------
        lda     $66                             ; D9B4 A5 66                    .f
        sta     $03D6                           ; D9B6 8D D6 03                 ...
        lda     $67                             ; D9B9 A5 67                    .g
        sta     $03D7                           ; D9BB 8D D7 03                 ...
        jsr     L77DD                           ; D9BE 20 DD 77                  .w
        jsr     L77CB                           ; D9C1 20 CB 77                  .w
        lda     $66                             ; D9C4 A5 66                    .f
        sta     $03D8                           ; D9C6 8D D8 03                 ...
        lda     $67                             ; D9C9 A5 67                    .g
        sta     $03D9                           ; D9CB 8D D9 03                 ...
        ldx     #$01                            ; D9CE A2 01                    ..
        stx     $67                             ; D9D0 86 67                    .g
        jsr     L0386                           ; D9D2 20 86 03                  ..
        cmp     #$29                            ; D9D5 C9 29                    .)
        beq     LD9DC                           ; D9D7 F0 03                    ..
        jsr     L8805                           ; D9D9 20 05 88                  ..
LD9DC:  jsr     L7944                           ; D9DC 20 44 79                  Dy
        ldx     $67                             ; D9DF A6 67                    .g
        bne     LD9E6                           ; D9E1 D0 03                    ..
        jmp     L7D16                           ; D9E3 4C 16 7D                 L.}
; ----------------------------------------------------------------------------
LD9E6:  dex                                     ; D9E6 CA                       .
        stx     $63                             ; D9E7 86 63                    .c
        ldx     #$03                            ; D9E9 A2 03                    ..
LD9EB:  lda     $03D6,x                         ; D9EB BD D6 03                 ...
        sta     $59,x                           ; D9EE 95 59                    .Y
        dex                                     ; D9F0 CA                       .
        bpl     LD9EB                           ; D9F1 10 F8                    ..
        ldy     #$02                            ; D9F3 A0 02                    ..
LD9F5:  lda     #$59                            ; D9F5 A9 59                    .Y
        jsr     L03AB                           ; D9F7 20 AB 03                  ..
        sta     $5D,y                           ; D9FA 99 5D 00                 .].
        lda     #$5B                            ; D9FD A9 5B                    .[
        jsr     L03AB                           ; D9FF 20 AB 03                  ..
        sta     $60,y                           ; DA02 99 60 00                 .`.
        dey                                     ; DA05 88                       .
        bpl     LD9F5                           ; DA06 10 ED                    ..
        lda     $60                             ; DA08 A5 60                    .`
        beq     LDA47                           ; DA0A F0 3B                    .;
LDA0C:  lda     #$00                            ; DA0C A9 00                    ..
        sta     $64                             ; DA0E 85 64                    .d
        clc                                     ; DA10 18                       .
        lda     $60                             ; DA11 A5 60                    .`
        adc     $63                             ; DA13 65 63                    ec
        bcs     LDA47                           ; DA15 B0 30                    .0
        cmp     $5D                             ; DA17 C5 5D                    .]
        bcc     LDA1D                           ; DA19 90 02                    ..
        bne     LDA47                           ; DA1B D0 2A                    .*
LDA1D:  ldy     $64                             ; DA1D A4 64                    .d
        cpy     $60                             ; DA1F C4 60                    .`
        beq     LDA42                           ; DA21 F0 1F                    ..
        tya                                     ; DA23 98                       .
        clc                                     ; DA24 18                       .
        adc     $63                             ; DA25 65 63                    ec
        tay                                     ; DA27 A8                       .
        lda     #$5E                            ; DA28 A9 5E                    .^
        jsr     L03AB                           ; DA2A 20 AB 03                  ..
        sta     $79                             ; DA2D 85 79                    .y
        ldy     $64                             ; DA2F A4 64                    .d
        lda     #$61                            ; DA31 A9 61                    .a
        jsr     L03AB                           ; DA33 20 AB 03                  ..
        cmp     $79                             ; DA36 C5 79                    .y
        beq     LDA3E                           ; DA38 F0 04                    ..
        inc     $63                             ; DA3A E6 63                    .c
        bne     LDA0C                           ; DA3C D0 CE                    ..
LDA3E:  inc     $64                             ; DA3E E6 64                    .d
        bne     LDA1D                           ; DA40 D0 DB                    ..
LDA42:  inc     $63                             ; DA42 E6 63                    .c
        lda     $63                             ; DA44 A5 63                    .c
        .byte   $2C                             ; DA46 2C                       ,
LDA47:  lda     #$00                            ; DA47 A9 00                    ..
        sta     LFF03                           ; DA49 8D 03 FF                 ...
        pha                                     ; DA4C 48                       H
        lda     $03D8                           ; DA4D AD D8 03                 ...
        ldy     $03D9                           ; DA50 AC D9 03                 ...
        jsr     L8781                           ; DA53 20 81 87                  ..
        sta     LFF03                           ; DA56 8D 03 FF                 ...
        lda     $03D6                           ; DA59 AD D6 03                 ...
        ldy     $03D7                           ; DA5C AC D7 03                 ...
        jsr     L8781                           ; DA5F 20 81 87                  ..
        pla                                     ; DA62 68                       h
        tay                                     ; DA63 A8                       .
        jmp     L84D0                           ; DA64 4C D0 84                 L..
; ----------------------------------------------------------------------------
        jsr     L9D82                           ; DA67 20 82 9D                  ..
        ldx     #$00                            ; DA6A A2 00                    ..
LDA6C:  inx                                     ; DA6C E8                       .
        sec                                     ; DA6D 38                       8
        sbc     #$5A                            ; DA6E E9 5A                    .Z
        bcs     LDA6C                           ; DA70 B0 FA                    ..
        dey                                     ; DA72 88                       .
        bpl     LDA6C                           ; DA73 10 F7                    ..
        stx     $1149                           ; DA75 8E 49 11                 .I.
        pha                                     ; DA78 48                       H
        adc     #$5A                            ; DA79 69 5A                    iZ
        jsr     L9A87                           ; DA7B 20 87 9A                  ..
        pla                                     ; DA7E 68                       h
        clc                                     ; DA7F 18                       .
        eor     #$FF                            ; DA80 49 FF                    I.
        adc     #$01                            ; DA82 69 01                    i.
        dec     $1149                           ; DA84 CE 49 11                 .I.
        ldx     #$FF                            ; DA87 A2 FF                    ..
LDA89:  inx                                     ; DA89 E8                       .
        sec                                     ; DA8A 38                       8
        sbc     #$0A                            ; DA8B E9 0A                    ..
        bcs     LDA89                           ; DA8D B0 FA                    ..
        adc     #$0A                            ; DA8F 69 0A                    i.
        sta     $8E                             ; DA91 85 8E                    ..
        txa                                     ; DA93 8A                       .
        asl     a                               ; DA94 0A                       .
        tax                                     ; DA95 AA                       .
        lda     L9F1D,x                         ; DA96 BD 1D 9F                 ...
        ldy     L9F1C,x                         ; DA99 BC 1C 9F                 ...
LDA9C:  clc                                     ; DA9C 18                       .
        dec     $8E                             ; DA9D C6 8E                    ..
        bmi     LDAAD                           ; DA9F 30 0C                    0.
        adc     L9F31,x                         ; DAA1 7D 31 9F                 }1.
        pha                                     ; DAA4 48                       H
        tya                                     ; DAA5 98                       .
        adc     L9F30,x                         ; DAA6 7D 30 9F                 }0.
        tay                                     ; DAA9 A8                       .
        pla                                     ; DAAA 68                       h
        bcc     LDA9C                           ; DAAB 90 EF                    ..
LDAAD:  pha                                     ; DAAD 48                       H
        ldx     #$00                            ; DAAE A2 00                    ..
        lda     $1149                           ; DAB0 AD 49 11                 .I.
        lsr     a                               ; DAB3 4A                       J
        bcs     LDAB8                           ; DAB4 B0 02                    ..
        ldx     #$02                            ; DAB6 A2 02                    ..
LDAB8:  pla                                     ; DAB8 68                       h
        sta     $114A,x                         ; DAB9 9D 4A 11                 .J.
        tya                                     ; DABC 98                       .
        sta     $114B,x                         ; DABD 9D 4B 11                 .K.
        rts                                     ; DAC0 60                       `
; ----------------------------------------------------------------------------
        ldy     #$19                            ; DAC1 A0 19                    ..
        bcc     LDAC7                           ; DAC3 90 02                    ..
        ldy     #$1B                            ; DAC5 A0 1B                    ..
LDAC7:  lda     $1149                           ; DAC7 AD 49 11                 .I.
        adc     #$02                            ; DACA 69 02                    i.
        lsr     a                               ; DACC 4A                       J
        lsr     a                               ; DACD 4A                       J
        php                                     ; DACE 08                       .
        jsr     L9D82                           ; DACF 20 82 9D                  ..
        cpy     #$FF                            ; DAD2 C0 FF                    ..
        bcc     LDADD                           ; DAD4 90 07                    ..
        txa                                     ; DAD6 8A                       .
        tay                                     ; DAD7 A8                       .
        jsr     L9D82                           ; DAD8 20 82 9D                  ..
        bcs     LDAE0                           ; DADB B0 03                    ..
LDADD:  jsr     L9DA1                           ; DADD 20 A1 9D                  ..
LDAE0:  plp                                     ; DAE0 28                       (
        bcs     LDAFE                           ; DAE1 B0 1B                    ..
        jmp     L9D91                           ; DAE3 4C 91 9D                 L..
; ----------------------------------------------------------------------------
        sta     $114E                           ; DAE6 8D 4E 11                 .N.
        ldx     #$23                            ; DAE9 A2 23                    .#
LDAEB:  asl     $114E                           ; DAEB 0E 4E 11                 .N.
        jsr     L9AC1                           ; DAEE 20 C1 9A                  ..
        sta     $1131,x                         ; DAF1 9D 31 11                 .1.
        tya                                     ; DAF4 98                       .
        sta     $1132,x                         ; DAF5 9D 32 11                 .2.
        inx                                     ; DAF8 E8                       .
        inx                                     ; DAF9 E8                       .
        cpx     #$2B                            ; DAFA E0 2B                    .+
        bcc     LDAEB                           ; DAFC 90 ED                    ..
LDAFE:  rts                                     ; DAFE 60                       `
; ----------------------------------------------------------------------------
        jsr     L87F3                           ; DAFF 20 F3 87                  ..
        cpx     #$02                            ; DB02 E0 02                    ..
        bcc     LDB16                           ; DB04 90 10                    ..
        beq     LDB0B                           ; DB06 F0 03                    ..
        jmp     L7D16                           ; DB08 4C 16 7D                 L.}
; ----------------------------------------------------------------------------
LDB0B:  jsr     L9C3C                           ; DB0B 20 3C 9C                  <.
        tay                                     ; DB0E A8                       .
        bcc     LDB13                           ; DB0F 90 02                    ..
        ldy     #$00                            ; DB11 A0 00                    ..
LDB13:  jmp     L84D0                           ; DB13 4C D0 84                 L..
; ----------------------------------------------------------------------------
LDB16:  txa                                     ; DB16 8A                       .
        asl     a                               ; DB17 0A                       .
        tax                                     ; DB18 AA                       .
        lda     $1131,x                         ; DB19 BD 31 11                 .1.
        tay                                     ; DB1C A8                       .
        lda     $1132,x                         ; DB1D BD 32 11                 .2.
LDB20:  jmp     L792A                           ; DB20 4C 2A 79                 L*y
; ----------------------------------------------------------------------------
        ldx     #$02                            ; DB23 A2 02                    ..
        ldy     #$06                            ; DB25 A0 06                    ..
LDB27:  lda     #$00                            ; DB27 A9 00                    ..
        sta     $113D,x                         ; DB29 9D 3D 11                 .=.
        sta     $113E,x                         ; DB2C 9D 3E 11                 .>.
        jsr     L9D8C                           ; DB2F 20 8C 9D                  ..
        bpl     LDB3C                           ; DB32 10 08                    ..
        dec     $113D,x                         ; DB34 DE 3D 11                 .=.
        dec     $113E,x                         ; DB37 DE 3E 11                 .>.
        bne     LDB47                           ; DB3A D0 0B                    ..
LDB3C:  cmp     #$00                            ; DB3C C9 00                    ..
        bne     LDB44                           ; DB3E D0 04                    ..
        cpy     #$00                            ; DB40 C0 00                    ..
        beq     LDB47                           ; DB42 F0 03                    ..
LDB44:  inc     $113D,x                         ; DB44 FE 3D 11                 .=.
LDB47:  sta     $1139,x                         ; DB47 9D 39 11                 .9.
        asl     a                               ; DB4A 0A                       .
        sta     $1141,x                         ; DB4B 9D 41 11                 .A.
        tya                                     ; DB4E 98                       .
        sta     $113A,x                         ; DB4F 9D 3A 11                 .:.
        rol     a                               ; DB52 2A                       *
        sta     $1142,x                         ; DB53 9D 42 11                 .B.
        dex                                     ; DB56 CA                       .
        dex                                     ; DB57 CA                       .
        ldy     #$04                            ; DB58 A0 04                    ..
        cpx     #$00                            ; DB5A E0 00                    ..
        beq     LDB27                           ; DB5C F0 C9                    ..
        ldx     #$0A                            ; DB5E A2 0A                    ..
        ldy     #$08                            ; DB60 A0 08                    ..
        jsr     L9D6F                           ; DB62 20 6F 9D                  o.
        lda     #$00                            ; DB65 A9 00                    ..
        rol     a                               ; DB67 2A                       *
        rol     a                               ; DB68 2A                       *
        sta     $1147                           ; DB69 8D 47 11                 .G.
        eor     #$02                            ; DB6C 49 02                    I.
        sta     $1148                           ; DB6E 8D 48 11                 .H.
        clc                                     ; DB71 18                       .
        lda     #$10                            ; DB72 A9 10                    ..
        adc     $1147                           ; DB74 6D 47 11                 mG.
        tay                                     ; DB77 A8                       .
        pha                                     ; DB78 48                       H
        eor     #$02                            ; DB79 49 02                    I.
        tax                                     ; DB7B AA                       .
        jsr     L9D6F                           ; DB7C 20 6F 9D                  o.
        sta     $1131,x                         ; DB7F 9D 31 11                 .1.
        tya                                     ; DB82 98                       .
        sta     $1132,x                         ; DB83 9D 32 11                 .2.
        pla                                     ; DB86 68                       h
        tay                                     ; DB87 A8                       .
        clc                                     ; DB88 18                       .
        lda     #$08                            ; DB89 A9 08                    ..
        adc     $1148                           ; DB8B 6D 48 11                 mH.
        tax                                     ; DB8E AA                       .
        jsr     L9D6F                           ; DB8F 20 6F 9D                  o.
        sta     $1145                           ; DB92 8D 45 11                 .E.
        sty     $1146                           ; DB95 8C 46 11                 .F.
LDB98:  jsr     L9BEE                           ; DB98 20 EE 9B                  ..
        ldy     $1148                           ; DB9B AC 48 11                 .H.
        sec                                     ; DB9E 38                       8
        lda     $1139,y                         ; DB9F B9 39 11                 .9.
        sbc     #$01                            ; DBA2 E9 01                    ..
        sta     $1139,y                         ; DBA4 99 39 11                 .9.
        bcs     LDBB4                           ; DBA7 B0 0B                    ..
        lda     $113A,y                         ; DBA9 B9 3A 11                 .:.
        sbc     #$00                            ; DBAC E9 00                    ..
        sta     $113A,y                         ; DBAE 99 3A 11                 .:.
        .byte   $B0                             ; DBB1 B0                       .
LDBB2:  ora     ($60,x)                         ; DBB2 01 60                    .`
LDBB4:  ldx     $1147                           ; DBB4 AE 47 11                 .G.
        lda     $1146                           ; DBB7 AD 46 11                 .F.
        bmi     LDBC2                           ; DBBA 30 06                    0.
        jsr     L9BDD                           ; DBBC 20 DD 9B                  ..
        ldx     $1148                           ; DBBF AE 48 11                 .H.
LDBC2:  clc                                     ; DBC2 18                       .
        lda     $1145                           ; DBC3 AD 45 11                 .E.
        adc     $1141,x                         ; DBC6 7D 41 11                 }A.
        sta     $1145                           ; DBC9 8D 45 11                 .E.
        lda     $1146                           ; DBCC AD 46 11                 .F.
        adc     $1142,x                         ; DBCF 7D 42 11                 }B.
        sta     $1146                           ; DBD2 8D 46 11                 .F.
        ldx     $1148                           ; DBD5 AE 48 11                 .H.
        jsr     L9BDD                           ; DBD8 20 DD 9B                  ..
        beq     LDB98                           ; DBDB F0 BB                    ..
        ldy     #$02                            ; DBDD A0 02                    ..
        clc                                     ; DBDF 18                       .
LDBE0:  lda     $1131,x                         ; DBE0 BD 31 11                 .1.
        adc     $113D,x                         ; DBE3 7D 3D 11                 }=.
        sta     $1131,x                         ; DBE6 9D 31 11                 .1.
        inx                                     ; DBE9 E8                       .
        dey                                     ; DBEA 88                       .
        bne     LDBE0                           ; DBEB D0 F3                    ..
        rts                                     ; DBED 60                       `
; ----------------------------------------------------------------------------
        lda     $116C                           ; DBEE AD 6C 11                 .l.
        ora     $116B                           ; DBF1 0D 6B 11                 .k.
        beq     LDC0C                           ; DBF4 F0 16                    ..
        inc     $1131                           ; DBF6 EE 31 11                 .1.
        bne     LDBFE                           ; DBF9 D0 03                    ..
        inc     $1132                           ; DBFB EE 32 11                 .2.
LDBFE:  jsr     L9C0C                           ; DBFE 20 0C 9C                  ..
        ldx     $1131                           ; DC01 AE 31 11                 .1.
        bne     LDC09                           ; DC04 D0 03                    ..
        dec     $1132                           ; DC06 CE 32 11                 .2.
LDC09:  dec     $1131                           ; DC09 CE 31 11                 .1.
LDC0C:  jsr     L9D17                           ; DC0C 20 17 9D                  ..
        bcs     LDC35                           ; DC0F B0 24                    .$
        jsr     L9C63                           ; DC11 20 63 9C                  c.
        jsr     L9CDB                           ; DC14 20 DB 9C                  ..
        sta     $116D                           ; DC17 8D 6D 11                 .m.
        lda     ($8C),y                         ; DC1A B1 8C                    ..
        ora     $116D                           ; DC1C 0D 6D 11                 .m.
        bit     $D8                             ; DC1F 24 D8                    $.
        bpl     LDC36                           ; DC21 10 13                    ..
        pha                                     ; DC23 48                       H
        ldx     $83                             ; DC24 A6 83                    ..
        lda     $116D                           ; DC26 AD 6D 11                 .m.
        and     L9F18,x                         ; DC29 3D 18 9F                 =..
        sta     $116D                           ; DC2C 8D 6D 11                 .m.
        pla                                     ; DC2F 68                       h
LDC30:  eor     $116D                           ; DC30 4D 6D 11                 Mm.
LDC33:  sta     ($8C),y                         ; DC33 91 8C                    ..
LDC35:  rts                                     ; DC35 60                       `
; ----------------------------------------------------------------------------
LDC36:  ldx     $83                             ; DC36 A6 83                    ..
        bne     LDC33                           ; DC38 D0 F9                    ..
        beq     LDC30                           ; DC3A F0 F4                    ..
        jsr     L9CD6                           ; DC3C 20 D6 9C                  ..
        bcs     LDC62                           ; DC3F B0 21                    .!
        sta     $116D                           ; DC41 8D 6D 11                 .m.
        lda     ($8C),y                         ; DC44 B1 8C                    ..
        and     $116D                           ; DC46 2D 6D 11                 -m.
LDC49:  rol     a                               ; DC49 2A                       *
        dex                                     ; DC4A CA                       .
        bpl     LDC49                           ; DC4B 10 FC                    ..
        rol     a                               ; DC4D 2A                       *
        bit     $8B                             ; DC4E 24 8B                    $.
        bmi     LDC58                           ; DC50 30 06                    0.
        and     #$03                            ; DC52 29 03                    ).
        cmp     $83                             ; DC54 C5 83                    ..
        clc                                     ; DC56 18                       .
        rts                                     ; DC57 60                       `
; ----------------------------------------------------------------------------
LDC58:  clc                                     ; DC58 18                       .
        and     #$03                            ; DC59 29 03                    ).
        beq     LDC60                           ; DC5B F0 03                    ..
        ldx     #$00                            ; DC5D A2 00                    ..
        rts                                     ; DC5F 60                       `
; ----------------------------------------------------------------------------
LDC60:  ldx     #$FF                            ; DC60 A2 FF                    ..
LDC62:  rts                                     ; DC62 60                       `
; ----------------------------------------------------------------------------
        lda     LC033,x                         ; DC63 BD 33 C0                 .3.
        sta     $8C                             ; DC66 85 8C                    ..
        lda     L9CBD,x                         ; DC68 BD BD 9C                 ...
        sta     $8D                             ; DC6B 85 8D                    ..
        lda     $83                             ; DC6D A5 83                    ..
        bne     LDC79                           ; DC6F D0 08                    ..
        lda     $03E2                           ; DC71 AD E2 03                 ...
        bit     $D8                             ; DC74 24 D8                    $.
        bpl     LDC80                           ; DC76 10 08                    ..
        rts                                     ; DC78 60                       `
; ----------------------------------------------------------------------------
LDC79:  cmp     #$02                            ; DC79 C9 02                    ..
        bne     LDC8D                           ; DC7B D0 10                    ..
        lda     $03E3                           ; DC7D AD E3 03                 ...
LDC80:  and     #$0F                            ; DC80 29 0F                    ).
        sta     $77                             ; DC82 85 77                    .w
        lda     ($8C),y                         ; DC84 B1 8C                    ..
        and     #$F0                            ; DC86 29 F0                    ).
        ora     $77                             ; DC88 05 77                    .w
        sta     ($8C),y                         ; DC8A 91 8C                    ..
        rts                                     ; DC8C 60                       `
; ----------------------------------------------------------------------------
LDC8D:  bcs     LDC9F                           ; DC8D B0 10                    ..
        lda     $03E2                           ; DC8F AD E2 03                 ...
        and     #$F0                            ; DC92 29 F0                    ).
        sta     $77                             ; DC94 85 77                    .w
        lda     ($8C),y                         ; DC96 B1 8C                    ..
        and     #$0F                            ; DC98 29 0F                    ).
        ora     $77                             ; DC9A 05 77                    .w
        sta     ($8C),y                         ; DC9C 91 8C                    ..
        rts                                     ; DC9E 60                       `
; ----------------------------------------------------------------------------
LDC9F:  lda     $8D                             ; DC9F A5 8D                    ..
        and     #$03                            ; DCA1 29 03                    ).
        ora     #$D8                            ; DCA3 09 D8                    ..
        sta     $8D                             ; DCA5 85 8D                    ..
        lda     #$00                            ; DCA7 A9 00                    ..
        sta     MMU_KERN_WINDOW                 ; DCA9 8D 00 FF                 ...
        sei                                     ; DCAC 78                       x
        lda     $01                             ; DCAD A5 01                    ..
        pha                                     ; DCAF 48                       H
        and     #$FE                            ; DCB0 29 FE                    ).
        sta     $01                             ; DCB2 85 01                    ..
        lda     $85                             ; DCB4 A5 85                    ..
        sta     ($8C),y                         ; DCB6 91 8C                    ..
        pla                                     ; DCB8 68                       h
        sta     $01                             ; DCB9 85 01                    ..
        cli                                     ; DCBB 58                       X
        rts                                     ; DCBC 60                       `
; ----------------------------------------------------------------------------
        trb     $1C1C                           ; DCBD 1C 1C 1C                 ...
        trb     $1C1C                           ; DCC0 1C 1C 1C                 ...
        trb     $1D1D                           ; DCC3 1C 1D 1D                 ...
        ora     $1D1D,x                         ; DCC6 1D 1D 1D                 ...
        ora     $1E1E,x                         ; DCC9 1D 1E 1E                 ...
        asl     $1E1E,x                         ; DCCC 1E 1E 1E                 ...
        asl     $1F1E,x                         ; DCCF 1E 1E 1F                 ...
        bbr1    $1F,LDCF4                       ; DCD2 1F 1F 1F                 ...
        bbr1    $20,LDCEF                       ; DCD5 1F 20 17                 . .
        sta     $33B0,x                         ; DCD8 9D B0 33                 ..3
        tya                                     ; DCDB 98                       .
        clc                                     ; DCDC 18                       .
        adc     LC033,x                         ; DCDD 7D 33 C0                 }3.
        sta     $8C                             ; DCE0 85 8C                    ..
        lda     LC04C,x                         ; DCE2 BD 4C C0                 .L.
        adc     #$00                            ; DCE5 69 00                    i.
        asl     $8C                             ; DCE7 06 8C                    ..
        rol     a                               ; DCE9 2A                       *
        asl     $8C                             ; DCEA 06 8C                    ..
        rol     a                               ; DCEC 2A                       *
        asl     $8C                             ; DCED 06 8C                    ..
LDCEF:  rol     a                               ; DCEF 2A                       *
        sta     $8D                             ; DCF0 85 8D                    ..
        .byte   $AD                             ; DCF2 AD                       .
        .byte   $33                             ; DCF3 33                       3
LDCF4:  ora     ($29),y                         ; DCF4 11 29                    .)
        rmb0    $A8                             ; DCF6 07 A8                    ..
        lda     $1131                           ; DCF8 AD 31 11                 .1.
        bit     $D8                             ; DCFB 24 D8                    $.
        php                                     ; DCFD 08                       .
        bpl     LDD01                           ; DCFE 10 01                    ..
        asl     a                               ; DD00 0A                       .
LDD01:  and     #$07                            ; DD01 29 07                    ).
        tax                                     ; DD03 AA                       .
        lda     L9D0F,x                         ; DD04 BD 0F 9D                 ...
        plp                                     ; DD07 28                       (
        bpl     LDD0E                           ; DD08 10 04                    ..
        inx                                     ; DD0A E8                       .
        ora     L9D0F,x                         ; DD0B 1D 0F 9D                 ...
LDD0E:  rts                                     ; DD0E 60                       `
; ----------------------------------------------------------------------------
        bra     LDD51                           ; DD0F 80 40                    .@
        jsr     L0810                           ; DD11 20 10 08                  ..
        tsb     $02                             ; DD14 04 02                    ..
        ora     (StopKeyFlag,x)                 ; DD16 01 AD                    ..
        and     ($11)                           ; DD18 32 11                    2.
        lsr     a                               ; DD1A 4A                       J
        bne     LDD3B                           ; DD1B D0 1E                    ..
        lda     $1131                           ; DD1D AD 31 11                 .1.
        ror     a                               ; DD20 6A                       j
        lsr     a                               ; DD21 4A                       J
        bit     $D8                             ; DD22 24 D8                    $.
        bmi     LDD27                           ; DD24 30 01                    0.
        lsr     a                               ; DD26 4A                       J
LDD27:  tay                                     ; DD27 A8                       .
        cpy     #$28                            ; DD28 C0 28                    .(
        bcs     LDD3B                           ; DD2A B0 0F                    ..
        lda     $1134                           ; DD2C AD 34 11                 .4.
        bne     LDD3B                           ; DD2F D0 0A                    ..
        lda     $1133                           ; DD31 AD 33 11                 .3.
        lsr     a                               ; DD34 4A                       J
        lsr     a                               ; DD35 4A                       J
        lsr     a                               ; DD36 4A                       J
        tax                                     ; DD37 AA                       .
        cmp     #$19                            ; DD38 C9 19                    ..
        rts                                     ; DD3A 60                       `
; ----------------------------------------------------------------------------
LDD3B:  sec                                     ; DD3B 38                       8
        rts                                     ; DD3C 60                       `
; ----------------------------------------------------------------------------
        lda     $116A                           ; DD3D AD 6A 11                 .j.
        beq     LDD59                           ; DD40 F0 17                    ..
        lda     $87                             ; DD42 A5 87                    ..
        ldy     $88                             ; DD44 A4 88                    ..
        jsr     L9D4D                           ; DD46 20 4D 9D                  M.
        lda     $89                             ; DD49 A5 89                    ..
        ldy     $8A                             ; DD4B A4 8A                    ..
        jsr     L9DA1                           ; DD4D 20 A1 9D                  ..
        .byte   $9D                             ; DD50 9D                       .
LDD51:  and     ($11),y                         ; DD51 31 11                    1.
        tya                                     ; DD53 98                       .
        inx                                     ; DD54 E8                       .
        sta     $1131,x                         ; DD55 9D 31 11                 .1.
        inx                                     ; DD58 E8                       .
LDD59:  rts                                     ; DD59 60                       `
; ----------------------------------------------------------------------------
        bcc     LDD63                           ; DD5A 90 07                    ..
        bcs     LDD72                           ; DD5C B0 14                    ..
        bcs     LDD6F                           ; DD5E B0 0F                    ..
        jsr     L9D82                           ; DD60 20 82 9D                  ..
LDD63:  clc                                     ; DD63 18                       .
        adc     $1131,x                         ; DD64 7D 31 11                 }1.
        pha                                     ; DD67 48                       H
        tya                                     ; DD68 98                       .
        adc     $1132,x                         ; DD69 7D 32 11                 }2.
        tay                                     ; DD6C A8                       .
        pla                                     ; DD6D 68                       h
        rts                                     ; DD6E 60                       `
; ----------------------------------------------------------------------------
LDD6F:  jsr     L9D82                           ; DD6F 20 82 9D                  ..
LDD72:  sec                                     ; DD72 38                       8
        sbc     $1131,x                         ; DD73 FD 31 11                 .1.
        sta     $59                             ; DD76 85 59                    .Y
        tya                                     ; DD78 98                       .
        sbc     $1132,x                         ; DD79 FD 32 11                 .2.
        tay                                     ; DD7C A8                       .
        php                                     ; DD7D 08                       .
        lda     $59                             ; DD7E A5 59                    .Y
        plp                                     ; DD80 28                       (
        rts                                     ; DD81 60                       `
; ----------------------------------------------------------------------------
        lda     $1131,y                         ; DD82 B9 31 11                 .1.
        pha                                     ; DD85 48                       H
        lda     $1132,y                         ; DD86 B9 32 11                 .2.
        tay                                     ; DD89 A8                       .
        pla                                     ; DD8A 68                       h
        rts                                     ; DD8B 60                       `
; ----------------------------------------------------------------------------
        jsr     L9D6F                           ; DD8C 20 6F 9D                  o.
        bpl     LDDA0                           ; DD8F 10 0F                    ..
        php                                     ; DD91 08                       .
        clc                                     ; DD92 18                       .
        eor     #$FF                            ; DD93 49 FF                    I.
        adc     #$01                            ; DD95 69 01                    i.
        pha                                     ; DD97 48                       H
        tya                                     ; DD98 98                       .
        eor     #$FF                            ; DD99 49 FF                    I.
        adc     #$00                            ; DD9B 69 00                    i.
        tay                                     ; DD9D A8                       .
        pla                                     ; DD9E 68                       h
        plp                                     ; DD9F 28                       (
LDDA0:  rts                                     ; DDA0 60                       `
; ----------------------------------------------------------------------------
        sty     $8E                             ; DDA1 84 8E                    ..
        sta     $8F                             ; DDA3 85 8F                    ..
        lda     $1131,x                         ; DDA5 BD 31 11                 .1.
        ldy     $1132,x                         ; DDA8 BC 32 11                 .2.
        php                                     ; DDAB 08                       .
        jsr     L9D8F                           ; DDAC 20 8F 9D                  ..
        sta     $1131,x                         ; DDAF 9D 31 11                 .1.
        tya                                     ; DDB2 98                       .
        sta     $1132,x                         ; DDB3 9D 32 11                 .2.
        lda     #$00                            ; DDB6 A9 00                    ..
        sta     $1177                           ; DDB8 8D 77 11                 .w.
        ldy     #$10                            ; DDBB A0 10                    ..
LDDBD:  lsr     $8E                             ; DDBD 46 8E                    F.
        ror     $8F                             ; DDBF 66 8F                    f.
        bcc     LDDD2                           ; DDC1 90 0F                    ..
        clc                                     ; DDC3 18                       .
        adc     $1131,x                         ; DDC4 7D 31 11                 }1.
        pha                                     ; DDC7 48                       H
        lda     $1177                           ; DDC8 AD 77 11                 .w.
        adc     $1132,x                         ; DDCB 7D 32 11                 }2.
        sta     $1177                           ; DDCE 8D 77 11                 .w.
        pla                                     ; DDD1 68                       h
LDDD2:  lsr     $1177                           ; DDD2 4E 77 11                 Nw.
        ror     a                               ; DDD5 6A                       j
        dey                                     ; DDD6 88                       .
        bne     LDDBD                           ; DDD7 D0 E4                    ..
        adc     #$00                            ; DDD9 69 00                    i.
        ldy     $1177                           ; DDDB AC 77 11                 .w.
        bcc     LDDE1                           ; DDDE 90 01                    ..
        iny                                     ; DDE0 C8                       .
LDDE1:  plp                                     ; DDE1 28                       (
        jmp     L9D8F                           ; DDE2 4C 8F 9D                 L..
; ----------------------------------------------------------------------------
        ldy     #$00                            ; DDE5 A0 00                    ..
        jsr     L9DEC                           ; DDE7 20 EC 9D                  ..
        ldy     #$02                            ; DDEA A0 02                    ..
        lda     $1135,y                         ; DDEC B9 35 11                 .5.
        sta     $1131,y                         ; DDEF 99 31 11                 .1.
        lda     $1136,y                         ; DDF2 B9 36 11                 .6.
        sta     $1132,y                         ; DDF5 99 32 11                 .2.
        rts                                     ; DDF8 60                       `
; ----------------------------------------------------------------------------
        jsr     L0386                           ; DDF9 20 86 03                  ..
        beq     LDE0A                           ; DDFC F0 0C                    ..
        jsr     L794A                           ; DDFE 20 4A 79                  Jy
        cmp     #$2C                            ; DE01 C9 2C                    .,
        beq     LDE0A                           ; DE03 F0 05                    ..
        jsr     L880E                           ; DE05 20 0E 88                  ..
        sec                                     ; DE08 38                       8
        rts                                     ; DE09 60                       `
; ----------------------------------------------------------------------------
LDE0A:  lda     #$00                            ; DE0A A9 00                    ..
        tay                                     ; DE0C A8                       .
LDE0D:  clc                                     ; DE0D 18                       .
        rts                                     ; DE0E 60                       `
; ----------------------------------------------------------------------------
        ldx     #$00                            ; DE0F A2 00                    ..
        jsr     L0386                           ; DE11 20 86 03                  ..
        beq     LDE0D                           ; DE14 F0 F7                    ..
        jsr     L794A                           ; DE16 20 4A 79                  Jy
        cmp     #$2C                            ; DE19 C9 2C                    .,
        beq     LDE0D                           ; DE1B F0 F0                    ..
        jsr     L87F0                           ; DE1D 20 F0 87                  ..
        sec                                     ; DE20 38                       8
        rts                                     ; DE21 60                       `
; ----------------------------------------------------------------------------
        jsr     LA067                           ; DE22 20 67 A0                  g.
        ldx     #$01                            ; DE25 A2 01                    ..
        jsr     L0386                           ; DE27 20 86 03                  ..
        beq     LDE3F                           ; DE2A F0 13                    ..
        cmp     #$2C                            ; DE2C C9 2C                    .,
        beq     LDE3F                           ; DE2E F0 0F                    ..
        jsr     L87F0                           ; DE30 20 F0 87                  ..
        cpx     #$04                            ; DE33 E0 04                    ..
        bcs     LDE42                           ; DE35 B0 0B                    ..
        cpx     #$02                            ; DE37 E0 02                    ..
        bit     $D8                             ; DE39 24 D8                    $.
        bmi     LDE3F                           ; DE3B 30 02                    0.
        bcs     LDE42                           ; DE3D B0 03                    ..
LDE3F:  stx     $83                             ; DE3F 86 83                    ..
        rts                                     ; DE41 60                       `
; ----------------------------------------------------------------------------
LDE42:  jmp     L7D16                           ; DE42 4C 16 7D                 L.}
; ----------------------------------------------------------------------------
        jsr     L0386                           ; DE45 20 86 03                  ..
        beq     LDE51                           ; DE48 F0 07                    ..
        jsr     L794A                           ; DE4A 20 4A 79                  Jy
        cmp     #$2C                            ; DE4D C9 2C                    .,
        bne     LDE63                           ; DE4F D0 12                    ..
LDE51:  ldy     #$00                            ; DE51 A0 00                    ..
LDE53:  lda     $1131,y                         ; DE53 B9 31 11                 .1.
        sta     $1131,x                         ; DE56 9D 31 11                 .1.
        inx                                     ; DE59 E8                       .
        iny                                     ; DE5A C8                       .
        cpy     #$04                            ; DE5B C0 04                    ..
        bne     LDE53                           ; DE5D D0 F4                    ..
        rts                                     ; DE5F 60                       `
; ----------------------------------------------------------------------------
        .byte   $20                             ; DE60 20
LDE61:  lsr     a                               ; DE61 4A                       J
        .byte   $79                             ; DE62 79                       y
LDE63:  stx     $1178                           ; DE63 8E 78 11                 .x.
        jsr     L9EFB                           ; DE66 20 FB 9E                  ..
        jsr     L0386                           ; DE69 20 86 03                  ..
        cmp     #$2C                            ; DE6C C9 2C                    .,
        beq     LDEC6                           ; DE6E F0 56                    .V
        cmp     #$3B                            ; DE70 C9 3B                    .;
        beq     LDE77                           ; DE72 F0 03                    ..
        jmp     L795A                           ; DE74 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LDE77:  jsr     L0380                           ; DE77 20 80 03                  ..
        jsr     L880E                           ; DE7A 20 0E 88                  ..
        sta     $77                             ; DE7D 85 77                    .w
        tya                                     ; DE7F 98                       .
        ldy     $77                             ; DE80 A4 77                    .w
        jsr     L9A6A                           ; DE82 20 6A 9A                  j.
        ldx     $1178                           ; DE85 AE 78 11                 .x.
        lda     $1131,x                         ; DE88 BD 31 11                 .1.
        sta     $1133,x                         ; DE8B 9D 33 11                 .3.
        lda     $1132,x                         ; DE8E BD 32 11                 .2.
        sta     $1134,x                         ; DE91 9D 34 11                 .4.
        jsr     L9D3D                           ; DE94 20 3D 9D                  =.
        lda     #$0E                            ; DE97 A9 0E                    ..
        sta     $1179                           ; DE99 8D 79 11                 .y.
        clc                                     ; DE9C 18                       .
        ldx     $1178                           ; DE9D AE 78 11                 .x.
LDEA0:  jsr     L9AC1                           ; DEA0 20 C1 9A                  ..
        sta     $1131,x                         ; DEA3 9D 31 11                 .1.
        tya                                     ; DEA6 98                       .
        sta     $1132,x                         ; DEA7 9D 32 11                 .2.
        ldy     #$00                            ; DEAA A0 00                    ..
        lsr     $1179                           ; DEAC 4E 79 11                 Ny.
        bcc     LDEB3                           ; DEAF 90 02                    ..
        .byte   $A0                             ; DEB1 A0                       .
LDEB2:  .byte   $02                             ; DEB2 02                       .
LDEB3:  jsr     L9D5E                           ; DEB3 20 5E 9D                  ^.
        sta     $1131,x                         ; DEB6 9D 31 11                 .1.
        tya                                     ; DEB9 98                       .
        sta     $1132,x                         ; DEBA 9D 32 11                 .2.
        inx                                     ; DEBD E8                       .
        inx                                     ; DEBE E8                       .
        lsr     $1179                           ; DEBF 4E 79 11                 Ny.
        bne     LDEA0                           ; DEC2 D0 DC                    ..
        clc                                     ; DEC4 18                       .
        rts                                     ; DEC5 60                       `
; ----------------------------------------------------------------------------
LDEC6:  jsr     L0380                           ; DEC6 20 80 03                  ..
        inc     $1178                           ; DEC9 EE 78 11                 .x.
        inc     $1178                           ; DECC EE 78 11                 .x.
        jsr     L9EFB                           ; DECF 20 FB 9E                  ..
        ldx     $1178                           ; DED2 AE 78 11                 .x.
        dex                                     ; DED5 CA                       .
        dex                                     ; DED6 CA                       .
        jsr     L9D3D                           ; DED7 20 3D 9D                  =.
        ldy     #$02                            ; DEDA A0 02                    ..
        ldx     $1178                           ; DEDC AE 78 11                 .x.
        inx                                     ; DEDF E8                       .
        inx                                     ; DEE0 E8                       .
LDEE1:  dex                                     ; DEE1 CA                       .
        dex                                     ; DEE2 CA                       .
        lsr     $1179                           ; DEE3 4E 79 11                 Ny.
        bcc     LDEF2                           ; DEE6 90 0A                    ..
        jsr     L9D60                           ; DEE8 20 60 9D                  `.
        sta     $1131,x                         ; DEEB 9D 31 11                 .1.
        tya                                     ; DEEE 98                       .
        sta     $1132,x                         ; DEEF 9D 32 11                 .2.
LDEF2:  ldy     #$00                            ; DEF2 A0 00                    ..
        cpx     $1178                           ; DEF4 EC 78 11                 .x.
        beq     LDEE1                           ; DEF7 F0 E8                    ..
        clc                                     ; DEF9 18                       .
        rts                                     ; DEFA 60                       `
; ----------------------------------------------------------------------------
        jsr     L0386                           ; DEFB 20 86 03                  ..
        cmp     #$AA                            ; DEFE C9 AA                    ..
        beq     LDF07                           ; DF00 F0 05                    ..
LDF02:  .byte   $C9                             ; DF02 C9                       .
LDF03:  .byte   $AB                             ; DF03 AB                       .
LDF04:  .byte   $F0                             ; DF04 F0                       .
LDF05:  .byte   $01                             ; DF05 01                       .
LDF06:  clc                                     ; DF06 18                       .
LDF07:  .byte   $2E                             ; DF07 2E                       .
LDF08:  adc     $2011,y                         ; DF08 79 11 20                 y.
        asl     $AE88                           ; DF0B 0E 88 AE                 ...
        sei                                     ; DF0E 78                       x
        ora     ($9D),y                         ; DF0F 11 9D                    ..
        and     ($11)                           ; DF11 32 11                    2.
        tya                                     ; DF13 98                       .
        sta     $1131,x                         ; DF14 9D 31 11                 .1.
        rts                                     ; DF17 60                       `
; ----------------------------------------------------------------------------
        bbs7    $AA,LDF70                       ; DF18 FF AA 55                 ..U
        brk                                     ; DF1B 00                       .
        brk                                     ; DF1C 00                       .
        brk                                     ; DF1D 00                       .
        bit     $5771                           ; DF1E 2C 71 57                 ,qW
        sta     a:$80                           ; DF21 8D 80 00                 ...
        ldy     $8F                             ; DF24 A4 8F                    ..
        cpy     $19                             ; DF26 C4 19                    ..
        .byte   $DD                             ; DF28 DD                       .
LDF29:  lda     ($F0)                           ; DF29 B2 F0                    ..
        bcc     LDF29                           ; DF2B 90 FC                    ..
        trb     IRQ_VECTOR+1                    ; DF2D 1C FF FF                 ...
        tsb     $72                             ; DF30 04 72                    .r
        tsb     $50                             ; DF32 04 50                    .P
        tsb     $0B                             ; DF34 04 0B                    ..
        .byte   $03                             ; DF36 03                       .
        tay                                     ; DF37 A8                       .
        .byte   $03                             ; DF38 03                       .
        plp                                     ; DF39 28                       (
        .byte   $02                             ; DF3A 02                       .
        bcc     LDF3E                           ; DF3B 90 01                    ..
        .byte   $E3                             ; DF3D E3                       .
LDF3E:  ora     ($28,x)                         ; DF3E 01 28                    .(
        brk                                     ; DF40 00                       .
        .byte   $63                             ; DF41 63                       c
        lda     $76                             ; DF42 A5 76                    .v
        beq     LDF47                           ; DF44 F0 01                    ..
        rts                                     ; DF46 60                       `
; ----------------------------------------------------------------------------
LDF47:  lda     $1211                           ; DF47 AD 11 12                 ...
        clc                                     ; DF4A 18                       .
        adc     #$24                            ; DF4B 69 24                    i$
        bcs     LDF5D                           ; DF4D B0 0E                    ..
        sta     $62                             ; DF4F 85 62                    .b
        cmp     $1213                           ; DF51 CD 13 12                 ...
        bcc     LDF60                           ; DF54 90 0A                    ..
        bne     LDF5D                           ; DF56 D0 05                    ..
        cpy     $1212                           ; DF58 CC 12 12                 ...
        bcc     LDF60                           ; DF5B 90 03                    ..
LDF5D:  jmp     L4D37                           ; DF5D 4C 37 4D                 L7M
; ----------------------------------------------------------------------------
LDF60:  dec     $76                             ; DF60 C6 76                    .v
        lda     $1210                           ; DF62 AD 10 12                 ...
        sta     $24                             ; DF65 85 24                    .$
        lda     $62                             ; DF67 A5 62                    .b
        sta     $25                             ; DF69 85 25                    .%
        ldx     $1210                           ; DF6B AE 10 12                 ...
        stx     $26                             ; DF6E 86 26                    .&
LDF70:  lda     $1211                           ; DF70 AD 11 12                 ...
        sta     $27                             ; DF73 85 27                    .'
        sec                                     ; DF75 38                       8
        sbc     #$1C                            ; DF76 E9 1C                    ..
        tay                                     ; DF78 A8                       .
        txa                                     ; DF79 8A                       .
        eor     #$FF                            ; DF7A 49 FF                    I.
        sta     $50                             ; DF7C 85 50                    .P
        tya                                     ; DF7E 98                       .
        eor     #$FF                            ; DF7F 49 FF                    I.
        sta     $51                             ; DF81 85 51                    .Q
        ldy     #$00                            ; DF83 A0 00                    ..
        inc     $50                             ; DF85 E6 50                    .P
        bne     LDF8D                           ; DF87 D0 04                    ..
        inc     $51                             ; DF89 E6 51                    .Q
        beq     LDFA5                           ; DF8B F0 18                    ..
LDF8D:  lda     $24                             ; DF8D A5 24                    .$
        bne     LDF93                           ; DF8F D0 02                    ..
        dec     $25                             ; DF91 C6 25                    .%
LDF93:  dec     $24                             ; DF93 C6 24                    .$
        lda     $26                             ; DF95 A5 26                    .&
        bne     LDF9B                           ; DF97 D0 02                    ..
        dec     $27                             ; DF99 C6 27                    .'
LDF9B:  dec     $26                             ; DF9B C6 26                    .&
        jsr     L03C0                           ; DF9D 20 C0 03                  ..
        sta     ($24),y                         ; DFA0 91 24                    .$
        jmp     L9F85                           ; DFA2 4C 85 9F                 L..
; ----------------------------------------------------------------------------
LDFA5:  clc                                     ; DFA5 18                       .
        lda     $1211                           ; DFA6 AD 11 12                 ...
        adc     #$24                            ; DFA9 69 24                    i$
        sta     $1211                           ; DFAB 8D 11 12                 ...
        lda     $2E                             ; DFAE A5 2E                    ..
        adc     #$24                            ; DFB0 69 24                    i$
        sta     $2E                             ; DFB2 85 2E                    ..
        lda     $44                             ; DFB4 A5 44                    .D
        adc     #$24                            ; DFB6 69 24                    i$
        sta     $44                             ; DFB8 85 44                    .D
        jsr     L4F4C                           ; DFBA 20 4C 4F                  LO
        jsr     L4F7F                           ; DFBD 20 7F 4F                  .O
        bit     $7F                             ; DFC0 24 7F                    $.
        bpl     LDFF1                           ; DFC2 10 2D                    .-
        ldx     #$24                            ; DFC4 A2 24                    .$
        bit     $76                             ; DFC6 24 76                    $v
        bmi     LDFCC                           ; DFC8 30 02                    0.
        ldx     #$DC                            ; DFCA A2 DC                    ..
LDFCC:  txa                                     ; DFCC 8A                       .
        clc                                     ; DFCD 18                       .
        adc     $3E                             ; DFCE 65 3E                    e>
        sta     $3E                             ; DFD0 85 3E                    .>
        txa                                     ; DFD2 8A                       .
        clc                                     ; DFD3 18                       .
        adc     $1203                           ; DFD4 6D 03 12                 m..
        sta     $1203                           ; DFD7 8D 03 12                 ...
        txa                                     ; DFDA 8A                       .
        clc                                     ; DFDB 18                       .
        adc     $120F                           ; DFDC 6D 0F 12                 m..
        sta     $120F                           ; DFDF 8D 0F 12                 ...
        jsr     L5044                           ; DFE2 20 44 50                  DP
LDFE5:  lda     $3F                             ; DFE5 A5 3F                    .?
        cmp     #$FF                            ; DFE7 C9 FF                    ..
        bne     LDFF2                           ; DFE9 D0 07                    ..
        lda     $40                             ; DFEB A5 40                    .@
        cmp     #$09                            ; DFED C9 09                    ..
        bne     LDFF2                           ; DFEF D0 01                    ..
LDFF1:  rts                                     ; DFF1 60                       `
; ----------------------------------------------------------------------------
LDFF2:  ldy     #$00                            ; DFF2 A0 00                    ..
        lda     ($3F),y                         ; DFF4 B1 3F                    .?
        cmp     #$81                            ; DFF6 C9 81                    ..
        bne     LE003                           ; DFF8 D0 09                    ..
        ldy     #$10                            ; DFFA A0 10                    ..
        jsr     LA055                           ; DFFC 20 55 A0                  U.
        lda     #$12                            ; DFFF A9 12                    ..
        bne     LE00A                           ; E001 D0 07                    ..
LE003:  ldy     #$04                            ; E003 A0 04                    ..
        jsr     LA055                           ; E005 20 55 A0                  U.
        lda     #$05                            ; E008 A9 05                    ..
LE00A:  clc                                     ; E00A 18                       .
        adc     $3F                             ; E00B 65 3F                    e?
        sta     $3F                             ; E00D 85 3F                    .?
        bcc     LDFE5                           ; E00F 90 D4                    ..
        inc     $40                             ; E011 E6 40                    .@
        bne     LDFE5                           ; E013 D0 D0                    ..
        lda     $76                             ; E015 A5 76                    .v
        bne     LE01A                           ; E017 D0 01                    ..
        rts                                     ; E019 60                       `
; ----------------------------------------------------------------------------
LE01A:  ldy     #$00                            ; E01A A0 00                    ..
        sty     $76                             ; E01C 84 76                    .v
        sty     $24                             ; E01E 84 24                    .$
        sty     $26                             ; E020 84 26                    .&
        lda     #$1C                            ; E022 A9 1C                    ..
        sta     $25                             ; E024 85 25                    .%
        lda     #$40                            ; E026 A9 40                    .@
        sta     $27                             ; E028 85 27                    .'
LE02A:  jsr     L03C0                           ; E02A 20 C0 03                  ..
        sta     ($24),y                         ; E02D 91 24                    .$
        iny                                     ; E02F C8                       .
        bne     LE02A                           ; E030 D0 F8                    ..
        inc     $25                             ; E032 E6 25                    .%
        inc     $27                             ; E034 E6 27                    .'
        lda     $1211                           ; E036 AD 11 12                 ...
        cmp     $27                             ; E039 C5 27                    .'
        bcs     LE02A                           ; E03B B0 ED                    ..
        sec                                     ; E03D 38                       8
        lda     $2E                             ; E03E A5 2E                    ..
        sbc     #$24                            ; E040 E9 24                    .$
        sta     $2E                             ; E042 85 2E                    ..
        lda     $1211                           ; E044 AD 11 12                 ...
        sbc     #$24                            ; E047 E9 24                    .$
        sta     $1211                           ; E049 8D 11 12                 ...
        lda     $44                             ; E04C A5 44                    .D
        sbc     #$24                            ; E04E E9 24                    .$
        sta     $44                             ; E050 85 44                    .D
        jmp     L9FBA                           ; E052 4C BA 9F                 L..
; ----------------------------------------------------------------------------
        lda     ($3F),y                         ; E055 B1 3F                    .?
        bit     $76                             ; E057 24 76                    $v
        bne     LE061                           ; E059 D0 06                    ..
        sec                                     ; E05B 38                       8
        sbc     #$24                            ; E05C E9 24                    .$
        sta     ($3F),y                         ; E05E 91 3F                    .?
        rts                                     ; E060 60                       `
; ----------------------------------------------------------------------------
LE061:  clc                                     ; E061 18                       .
        adc     #$24                            ; E062 69 24                    i$
        sta     ($3F),y                         ; E064 91 3F                    .?
        rts                                     ; E066 60                       `
; ----------------------------------------------------------------------------
        lda     $76                             ; E067 A5 76                    .v
        beq     LE06C                           ; E069 F0 01                    ..
        rts                                     ; E06B 60                       `
; ----------------------------------------------------------------------------
LE06C:  ldx     #$23                            ; E06C A2 23                    .#
        jmp     L4D39                           ; E06E 4C 39 4D                 L9M
; ----------------------------------------------------------------------------
        jsr     LA396                           ; E071 20 96 A3                  ..
        lda     $80                             ; E074 A5 80                    ..
        and     #$E6                            ; E076 29 E6                    ).
        beq     LE07D                           ; E078 F0 03                    ..
        jmp     L795A                           ; E07A 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LE07D:  ldy     #$01                            ; E07D A0 01                    ..
        ldx     #$01                            ; E07F A2 01                    ..
        lda     $80                             ; E081 A5 80                    ..
        and     #$11                            ; E083 29 11                    ).
        beq     LE08D                           ; E085 F0 06                    ..
        lsr     a                               ; E087 4A                       J
        bcc     LE08C                           ; E088 90 02                    ..
        inx                                     ; E08A E8                       .
        inx                                     ; E08B E8                       .
LE08C:  inx                                     ; E08C E8                       .
LE08D:  txa                                     ; E08D 8A                       .
        jsr     LA63C                           ; E08E 20 3C A6                  <.
        lda     #$00                            ; E091 A9 00                    ..
        tax                                     ; E093 AA                       .
        jsr     L927A                           ; E094 20 7A 92                  z.
        ldy     #$60                            ; E097 A0 60                    .`
        ldx     stack+28                        ; E099 AE 1C 01                 ...
        lda     #$00                            ; E09C A9 00                    ..
        jsr     L924A                           ; E09E 20 4A 92                  J.
        sec                                     ; E0A1 38                       8
        jsr     L90CB                           ; E0A2 20 CB 90                  ..
        bcc     LE0B0                           ; E0A5 90 09                    ..
        pha                                     ; E0A7 48                       H
        jsr     LA107                           ; E0A8 20 07 A1                  ..
        pla                                     ; E0AB 68                       h
        tax                                     ; E0AC AA                       .
        jmp     L4D39                           ; E0AD 4C 39 4D                 L9M
; ----------------------------------------------------------------------------
LE0B0:  ldx     #$00                            ; E0B0 A2 00                    ..
        jsr     LA81A                           ; E0B2 20 1A A8                  ..
        jsr     LFFC6                           ; E0B5 20 C6 FF                  ..
        ldy     #$03                            ; E0B8 A0 03                    ..
LE0BA:  sty     $1174                           ; E0BA 8C 74 11                 .t.
LE0BD:  jsr     L9256                           ; E0BD 20 56 92                  V.
        sta     $1175                           ; E0C0 8D 75 11                 .u.
        jsr     L9244                           ; E0C3 20 44 92                  D.
        bne     LE107                           ; E0C6 D0 3F                    .?
        jsr     L9256                           ; E0C8 20 56 92                  V.
        sta     $1176                           ; E0CB 8D 76 11                 .v.
        jsr     L9244                           ; E0CE 20 44 92                  D.
        bne     LE107                           ; E0D1 D0 34                    .4
        dec     $1174                           ; E0D3 CE 74 11                 .t.
        bne     LE0BD                           ; E0D6 D0 E5                    ..
        ldx     $1175                           ; E0D8 AE 75 11                 .u.
        lda     $1176                           ; E0DB AD 76 11                 .v.
        jsr     L8E25                           ; E0DE 20 25 8E                  %.
        lda     #$20                            ; E0E1 A9 20                    .
        jsr     L925C                           ; E0E3 20 5C 92                  \.
        jsr     L9256                           ; E0E6 20 56 92                  V.
        pha                                     ; E0E9 48                       H
        jsr     L9244                           ; E0EA 20 44 92                  D.
        bne     LE106                           ; E0ED D0 17                    ..
        pla                                     ; E0EF 68                       h
        beq     LE0F8                           ; E0F0 F0 06                    ..
        jsr     L925C                           ; E0F2 20 5C 92                  \.
        jmp     LA0E6                           ; E0F5 4C E6 A0                 L..
; ----------------------------------------------------------------------------
LE0F8:  lda     #$0D                            ; E0F8 A9 0D                    ..
        jsr     L925C                           ; E0FA 20 5C 92                  \.
        jsr     L9286                           ; E0FD 20 86 92                  ..
        beq     LE107                           ; E100 F0 05                    ..
        ldy     #$02                            ; E102 A0 02                    ..
        bne     LE0BA                           ; E104 D0 B4                    ..
LE106:  pla                                     ; E106 68                       h
LE107:  jsr     L9262                           ; E107 20 62 92                  b.
        lda     #$00                            ; E10A A9 00                    ..
        clc                                     ; E10C 18                       .
        jmp     L9268                           ; E10D 4C 68 92                 Lh.
; ----------------------------------------------------------------------------
        lda     #$22                            ; E110 A9 22                    ."
        jsr     LA398                           ; E112 20 98 A3                  ..
        jsr     LA744                           ; E115 20 44 A7                  D.
        jsr     LA14A                           ; E118 20 4A A1                  J.
        ldy     #$05                            ; E11B A0 05                    ..
        ldx     #$04                            ; E11D A2 04                    ..
        bit     $80                             ; E11F 24 80                    $.
        bvc     LE136                           ; E121 50 13                    P.
        ldx     #$08                            ; E123 A2 08                    ..
        bne     LE136                           ; E125 D0 0F                    ..
        lda     #$E2                            ; E127 A9 E2                    ..
        jsr     LA398                           ; E129 20 98 A3                  ..
        jsr     LA744                           ; E12C 20 44 A7                  D.
        jsr     LA14A                           ; E12F 20 4A A1                  J.
        ldy     #$16                            ; E132 A0 16                    ..
        ldx     #$05                            ; E134 A2 05                    ..
LE136:  txa                                     ; E136 8A                       .
        jsr     LA63C                           ; E137 20 3C A6                  <.
        jsr     L9262                           ; E13A 20 62 92                  b.
        lda     #$00                            ; E13D A9 00                    ..
        tax                                     ; E13F AA                       .
        jsr     L927A                           ; E140 20 7A 92                  z.
        jsr     L90CB                           ; E143 20 CB 90                  ..
        sec                                     ; E146 38                       8
        jmp     L9268                           ; E147 4C 68 92                 Lh.
; ----------------------------------------------------------------------------
        ldy     #$61                            ; E14A A0 61                    .a
LE14C:  iny                                     ; E14C C8                       .
        cpy     #$6F                            ; E14D C0 6F                    .o
        beq     LE15D                           ; E14F F0 0C                    ..
        jsr     LA81A                           ; E151 20 1A A8                  ..
        jsr     LFF5C                           ; E154 20 5C FF                  \.
        bcc     LE14C                           ; E157 90 F3                    ..
        sty     stack+29                        ; E159 8C 1D 01                 ...
        rts                                     ; E15C 60                       `
; ----------------------------------------------------------------------------
LE15D:  ldx     #$01                            ; E15D A2 01                    ..
        jmp     L4D39                           ; E15F 4C 39 4D                 L9M
; ----------------------------------------------------------------------------
        lda     #$F3                            ; E162 A9 F3                    ..
        jsr     LA398                           ; E164 20 98 A3                  ..
        jsr     LA7E2                           ; E167 20 E2 A7                  ..
        lda     $80                             ; E16A A5 80                    ..
        and     #$04                            ; E16C 29 04                    ).
        beq     LE176                           ; E16E F0 06                    ..
        lda     stack+27                        ; E170 AD 1B 01                 ...
        jmp     L9268                           ; E173 4C 68 92                 Lh.
; ----------------------------------------------------------------------------
LE176:  lda     stack+28                        ; E176 AD 1C 01                 ...
        jsr     LA81A                           ; E179 20 1A A8                  ..
        jmp     LFF4A                           ; E17C 4C 4A FF                 LJ.
; ----------------------------------------------------------------------------
        lda     #$66                            ; E17F A9 66                    .f
        jsr     LA398                           ; E181 20 98 A3                  ..
        jsr     LA725                           ; E184 20 25 A7                  %.
        ldy     #$05                            ; E187 A0 05                    ..
        lda     #$04                            ; E189 A9 04                    ..
        jsr     LA63C                           ; E18B 20 3C A6                  <.
        lda     #$00                            ; E18E A9 00                    ..
        tax                                     ; E190 AA                       .
        jsr     L927A                           ; E191 20 7A 92                  z.
        jmp     L9108                           ; E194 4C 08 91                 L..
; ----------------------------------------------------------------------------
        lda     #$01                            ; E197 A9 01                    ..
        bit     a:$A9                           ; E199 2C A9 00                 ,..
        sta     $0C                             ; E19C 85 0C                    ..
        lda     #$E6                            ; E19E A9 E6                    ..
        jsr     LA398                           ; E1A0 20 98 A3                  ..
        jsr     LA725                           ; E1A3 20 25 A7                  %.
        lda     #$00                            ; E1A6 A9 00                    ..
        sta     stack+29                        ; E1A8 8D 1D 01                 ...
        ldy     #$05                            ; E1AB A0 05                    ..
        lda     #$04                            ; E1AD A9 04                    ..
        jsr     LA63C                           ; E1AF 20 3C A6                  <.
        lda     #$00                            ; E1B2 A9 00                    ..
        tax                                     ; E1B4 AA                       .
        jsr     L927A                           ; E1B5 20 7A 92                  z.
        jmp     L9126                           ; E1B8 4C 26 91                 L&.
; ----------------------------------------------------------------------------
        lda     #$66                            ; E1BB A9 66                    .f
        ldx     #$F8                            ; E1BD A2 F8                    ..
        jsr     LA39A                           ; E1BF 20 9A A3                  ..
        jsr     LA725                           ; E1C2 20 25 A7                  %.
        lda     L0081                           ; E1C5 A5 81                    ..
        and     #$06                            ; E1C7 29 06                    ).
        cmp     #$06                            ; E1C9 C9 06                    ..
        beq     LE1D0                           ; E1CB F0 03                    ..
        jmp     L795A                           ; E1CD 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LE1D0:  ldy     #$05                            ; E1D0 A0 05                    ..
        lda     #$04                            ; E1D2 A9 04                    ..
        jsr     LA63C                           ; E1D4 20 3C A6                  <.
        lda     stack+31                        ; E1D7 AD 1F 01                 ...
        ldx     #$00                            ; E1DA A2 00                    ..
        jsr     L927A                           ; E1DC 20 7A 92                  z.
        ldx     stack+23                        ; E1DF AE 17 01                 ...
        ldy     stack+24                        ; E1E2 AC 18 01                 ...
        lda     #$5A                            ; E1E5 A9 5A                    .Z
        stx     $5A                             ; E1E7 86 5A                    .Z
        sty     $5B                             ; E1E9 84 5B                    .[
        ldx     stack+25                        ; E1EB AE 19 01                 ...
        ldy     stack+26                        ; E1EE AC 1A 01                 ...
        jmp     L9110                           ; E1F1 4C 10 91                 L..
; ----------------------------------------------------------------------------
        lda     #$E6                            ; E1F4 A9 E6                    ..
        ldx     #$FC                            ; E1F6 A2 FC                    ..
        jsr     LA39A                           ; E1F8 20 9A A3                  ..
        jsr     LA725                           ; E1FB 20 25 A7                  %.
        ldx     stack+23                        ; E1FE AE 17 01                 ...
        ldy     stack+24                        ; E201 AC 18 01                 ...
        lda     #$00                            ; E204 A9 00                    ..
        cpx     #$FF                            ; E206 E0 FF                    ..
        bne     LE210                           ; E208 D0 06                    ..
        cpy     #$FF                            ; E20A C0 FF                    ..
        bne     LE210                           ; E20C D0 02                    ..
        lda     #$FF                            ; E20E A9 FF                    ..
LE210:  sta     stack+29                        ; E210 8D 1D 01                 ...
        ldy     #$05                            ; E213 A0 05                    ..
        lda     #$04                            ; E215 A9 04                    ..
        jsr     LA63C                           ; E217 20 3C A6                  <.
        lda     stack+31                        ; E21A AD 1F 01                 ...
        ldx     #$00                            ; E21D A2 00                    ..
        jsr     L927A                           ; E21F 20 7A 92                  z.
        lda     #$00                            ; E222 A9 00                    ..
        ldx     stack+23                        ; E224 AE 17 01                 ...
        ldy     stack+24                        ; E227 AC 18 01                 ...
        jsr     LOAD                            ; E22A 20 D5 FF                  ..
        php                                     ; E22D 08                       .
        jsr     L9236                           ; E22E 20 36 92                  6.
        plp                                     ; E231 28                       (
        bcc     LE237                           ; E232 90 03                    ..
        jmp     L90C3                           ; E234 4C C3 90                 L..
; ----------------------------------------------------------------------------
LE237:  jsr     L9244                           ; E237 20 44 92                  D.
        and     #$BF                            ; E23A 29 BF                    ).
        beq     LE241                           ; E23C F0 03                    ..
        jmp     L915A                           ; E23E 4C 5A 91                 LZ.
; ----------------------------------------------------------------------------
LE241:  clc                                     ; E241 18                       .
        rts                                     ; E242 60                       `
; ----------------------------------------------------------------------------
        jsr     LA396                           ; E243 20 96 A3                  ..
        jsr     LA71E                           ; E246 20 1E A7                  ..
        and     #$01                            ; E249 29 01                    ).
        cmp     #$01                            ; E24B C9 01                    ..
        bne     LE2B0                           ; E24D D0 61                    .a
        jsr     L926E                           ; E24F 20 6E 92                  n.
        jsr     LA7B6                           ; E252 20 B6 A7                  ..
        bne     LE27C                           ; E255 D0 25                    .%
        ldy     #$1B                            ; E257 A0 1B                    ..
        lda     #$04                            ; E259 A9 04                    ..
        ldx     stack+32                        ; E25B AE 20 01                 . .
        beq     LE262                           ; E25E F0 02                    ..
        lda     #$06                            ; E260 A9 06                    ..
LE262:  jsr     LA373                           ; E262 20 73 A3                  s.
        jsr     LA74D                           ; E265 20 4D A7                  M.
        bit     $7F                             ; E268 24 7F                    $.
        bmi     LE27C                           ; E26A 30 10                    0.
        ldy     #$00                            ; E26C A0 00                    ..
        lda     #$7B                            ; E26E A9 7B                    .{
        jsr     L03AB                           ; E270 20 AB 03                  ..
        cmp     #$32                            ; E273 C9 32                    .2
        bcc     LE27C                           ; E275 90 05                    ..
        ldx     #$24                            ; E277 A2 24                    .$
        jmp     L4D39                           ; E279 4C 39 4D                 L9M
; ----------------------------------------------------------------------------
LE27C:  rts                                     ; E27C 60                       `
; ----------------------------------------------------------------------------
        jsr     LA396                           ; E27D 20 96 A3                  ..
        jsr     LA71E                           ; E280 20 1E A7                  ..
        jsr     LA7B6                           ; E283 20 B6 A7                  ..
        bne     LE2AF                           ; E286 D0 27                    .'
        ldy     #$37                            ; E288 A0 37                    .7
        lda     #$04                            ; E28A A9 04                    ..
        jsr     LA373                           ; E28C 20 73 A3                  s.
        jsr     LA74D                           ; E28F 20 4D A7                  M.
        bit     $7F                             ; E292 24 7F                    $.
        bmi     LE2AF                           ; E294 30 19                    0.
        lda     #$0D                            ; E296 A9 0D                    ..
        jsr     L925C                           ; E298 20 5C 92                  \.
        ldy     #$00                            ; E29B A0 00                    ..
LE29D:  lda     #$7B                            ; E29D A9 7B                    .{
        jsr     L03AB                           ; E29F 20 AB 03                  ..
        beq     LE2AA                           ; E2A2 F0 06                    ..
        jsr     L925C                           ; E2A4 20 5C 92                  \.
        iny                                     ; E2A7 C8                       .
        bne     LE29D                           ; E2A8 D0 F3                    ..
LE2AA:  lda     #$0D                            ; E2AA A9 0D                    ..
        jsr     L90D2                           ; E2AC 20 D2 90                  ..
LE2AF:  rts                                     ; E2AF 60                       `
; ----------------------------------------------------------------------------
LE2B0:  jmp     L795A                           ; E2B0 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
        lda     #$23                            ; E2B3 A9 23                    .#
        jsr     L794C                           ; E2B5 20 4C 79                  Ly
        jsr     L87F0                           ; E2B8 20 F0 87                  ..
        cpx     #$00                            ; E2BB E0 00                    ..
        beq     LE2F6                           ; E2BD F0 37                    .7
        stx     stack+27                        ; E2BF 8E 1B 01                 ...
        jsr     L880B                           ; E2C2 20 0B 88                  ..
        ldx     #$01                            ; E2C5 A2 01                    ..
        jsr     L9E11                           ; E2C7 20 11 9E                  ..
        cpx     #$00                            ; E2CA E0 00                    ..
        beq     LE2F6                           ; E2CC F0 28                    .(
        cpx     #$FF                            ; E2CE E0 FF                    ..
        beq     LE2F6                           ; E2D0 F0 24                    .$
        stx     stack+30                        ; E2D2 8E 1E 01                 ...
        lda     stack+27                        ; E2D5 AD 1B 01                 ...
        jsr     LA81A                           ; E2D8 20 1A A8                  ..
        jsr     LFF59                           ; E2DB 20 59 FF                  Y.
        bcs     LE2F9                           ; E2DE B0 19                    ..
        sty     $11ED                           ; E2E0 8C ED 11                 ...
        stx     stack+28                        ; E2E3 8E 1C 01                 ...
        lda     #$00                            ; E2E6 A9 00                    ..
        sta     stack+27                        ; E2E8 8D 1B 01                 ...
        lda     #$6F                            ; E2EB A9 6F                    .o
        sta     stack+29                        ; E2ED 8D 1D 01                 ...
        ldy     #$3B                            ; E2F0 A0 3B                    .;
        lda     #$04                            ; E2F2 A9 04                    ..
        bne     LE373                           ; E2F4 D0 7D                    .}
LE2F6:  jmp     L7D16                           ; E2F6 4C 16 7D                 L.}
; ----------------------------------------------------------------------------
LE2F9:  ldx     #$04                            ; E2F9 A2 04                    ..
        jmp     L4D39                           ; E2FB 4C 39 4D                 L9M
; ----------------------------------------------------------------------------
        jsr     LA396                           ; E2FE 20 96 A3                  ..
        ldy     #$FF                            ; E301 A0 FF                    ..
        lda     #$02                            ; E303 A9 02                    ..
        jsr     LA373                           ; E305 20 73 A3                  s.
        jmp     LA176                           ; E308 4C 76 A1                 Lv.
; ----------------------------------------------------------------------------
        jsr     LA396                           ; E30B 20 96 A3                  ..
        jsr     LA730                           ; E30E 20 30 A7                  0.
        jsr     L926E                           ; E311 20 6E 92                  n.
        ldy     #$21                            ; E314 A0 21                    .!
        ldx     #$01                            ; E316 A2 01                    ..
        lda     $80                             ; E318 A5 80                    ..
        and     #$10                            ; E31A 29 10                    ).
        beq     LE31F                           ; E31C F0 01                    ..
        inx                                     ; E31E E8                       .
LE31F:  txa                                     ; E31F 8A                       .
        bne     LE373                           ; E320 D0 51                    .Q
        jsr     LA396                           ; E322 20 96 A3                  ..
        and     #$30                            ; E325 29 30                    )0
        cmp     #$30                            ; E327 C9 30                    .0
        bne     LE331                           ; E329 D0 06                    ..
        lda     $80                             ; E32B A5 80                    ..
        and     #$C7                            ; E32D 29 C7                    ).
        beq     LE338                           ; E32F F0 07                    ..
LE331:  lda     $80                             ; E331 A5 80                    ..
        jsr     LA735                           ; E333 20 35 A7                  5.
        lda     $80                             ; E336 A5 80                    ..
LE338:  ldy     #$27                            ; E338 A0 27                    .'
        lda     #$08                            ; E33A A9 08                    ..
        bne     LE373                           ; E33C D0 35                    .5
        jsr     LA396                           ; E33E 20 96 A3                  ..
        jsr     LA735                           ; E341 20 35 A7                  5.
        ldy     #$0D                            ; E344 A0 0D                    ..
        lda     #$0C                            ; E346 A9 0C                    ..
        bne     LE373                           ; E348 D0 29                    .)
        lda     #$E4                            ; E34A A9 E4                    ..
        jsr     LA398                           ; E34C 20 98 A3                  ..
        jsr     LA73B                           ; E34F 20 3B A7                  ;.
        ldy     #$2F                            ; E352 A0 2F                    ./
        lda     #$08                            ; E354 A9 08                    ..
        bne     LE373                           ; E356 D0 1B                    ..
        lda     #$C7                            ; E358 A9 C7                    ..
        jsr     LA398                           ; E35A 20 98 A3                  ..
        and     #$30                            ; E35D 29 30                    )0
        cmp     #$30                            ; E35F C9 30                    .0
        beq     LE366                           ; E361 F0 03                    ..
        jmp     L795A                           ; E363 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LE366:  jsr     LA7B6                           ; E366 20 B6 A7                  ..
        bne     LE36C                           ; E369 D0 01                    ..
        rts                                     ; E36B 60                       `
; ----------------------------------------------------------------------------
LE36C:  jsr     LA176                           ; E36C 20 76 A1                  v.
        ldy     #$23                            ; E36F A0 23                    .#
        lda     #$04                            ; E371 A9 04                    ..
LE373:  jsr     LA63C                           ; E373 20 3C A6                  <.
        jsr     L9262                           ; E376 20 62 92                  b.
        lda     #$00                            ; E379 A9 00                    ..
        tax                                     ; E37B AA                       .
        jsr     L927A                           ; E37C 20 7A 92                  z.
        sec                                     ; E37F 38                       8
        jsr     L90CB                           ; E380 20 CB 90                  ..
        bcc     LE388                           ; E383 90 03                    ..
        jmp     L90C3                           ; E385 4C C3 90                 L..
; ----------------------------------------------------------------------------
LE388:  lda     stack+27                        ; E388 AD 1B 01                 ...
        sec                                     ; E38B 38                       8
        jmp     L9268                           ; E38C 4C 68 92                 Lh.
; ----------------------------------------------------------------------------
        .byte   $FF                             ; E38F FF                       .
        .byte   $FF                             ; E390 FF                       .
LE391:  bbs7    $FF,$FF                         ; E391 FF FF 00                 ...
        php                                     ; E394 08                       .
        bbr6    $A9,LE398                       ; E395 6F A9 00                 o..
LE398:  ldx     #$FF                            ; E398 A2 FF                    ..
        pha                                     ; E39A 48                       H
        txa                                     ; E39B 8A                       .
        pha                                     ; E39C 48                       H
LE39D:  lda     #$00                            ; E39D A9 00                    ..
        sta     $80                             ; E39F 85 80                    ..
        sta     L0081                           ; E3A1 85 81                    ..
        ldx     #$22                            ; E3A3 A2 22                    ."
LE3A5:  sta     stack,x                         ; E3A5 9D 00 01                 ...
        dex                                     ; E3A8 CA                       .
        bne     LE3A5                           ; E3A9 D0 FA                    ..
        ldx     #$06                            ; E3AB A2 06                    ..
LE3AD:  lda     LA38F,x                         ; E3AD BD 8F A3                 ...
        sta     stack+23,x                      ; E3B0 9D 17 01                 ...
        dex                                     ; E3B3 CA                       .
        bpl     LE3AD                           ; E3B4 10 F7                    ..
        ldx     $03D5                           ; E3B6 AE D5 03                 ...
        stx     stack+31                        ; E3B9 8E 1F 01                 ...
        jsr     L0386                           ; E3BC 20 86 03                  ..
        bne     LE3CF                           ; E3BF D0 0E                    ..
        pla                                     ; E3C1 68                       h
        and     L0081                           ; E3C2 25 81                    %.
        bne     LE431                           ; E3C4 D0 6B                    .k
        pla                                     ; E3C6 68                       h
        jsr     LA5F2                           ; E3C7 20 F2 A5                  ..
        lda     $80                             ; E3CA A5 80                    ..
        ldx     L0081                           ; E3CC A6 81                    ..
        rts                                     ; E3CE 60                       `
; ----------------------------------------------------------------------------
LE3CF:  cmp     #$23                            ; E3CF C9 23                    .#
        beq     LE41E                           ; E3D1 F0 4B                    .K
        cmp     #$57                            ; E3D3 C9 57                    .W
        beq     LE434                           ; E3D5 F0 5D                    .]
        cmp     #$4C                            ; E3D7 C9 4C                    .L
        beq     LE434                           ; E3D9 F0 59                    .Y
        cmp     #$52                            ; E3DB C9 52                    .R
        beq     LE408                           ; E3DD F0 29                    .)
        cmp     #$44                            ; E3DF C9 44                    .D
        beq     LE456                           ; E3E1 F0 73                    .s
        cmp     #$91                            ; E3E3 C9 91                    ..
        beq     LE40E                           ; E3E5 F0 27                    .'
        cmp     #$42                            ; E3E7 C9 42                    .B
        beq     LE419                           ; E3E9 F0 2E                    ..
        cmp     #$55                            ; E3EB C9 55                    .U
        beq     LE414                           ; E3ED F0 25                    .%
        cmp     #$50                            ; E3EF C9 50                    .P
        bne     LE3F6                           ; E3F1 D0 03                    ..
        jmp     LA48B                           ; E3F3 4C 8B A4                 L..
; ----------------------------------------------------------------------------
LE3F6:  cmp     #$49                            ; E3F6 C9 49                    .I
        beq     LE46F                           ; E3F8 F0 75                    .u
        cmp     #$22                            ; E3FA C9 22                    ."
        beq     LE405                           ; E3FC F0 07                    ..
        cmp     #$28                            ; E3FE C9 28                    .(
        beq     LE405                           ; E400 F0 03                    ..
        jmp     L795A                           ; E402 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LE405:  jmp     LA4B3                           ; E405 4C B3 A4                 L..
; ----------------------------------------------------------------------------
LE408:  jsr     L0380                           ; E408 20 80 03                  ..
        jmp     LA4D2                           ; E40B 4C D2 A4                 L..
; ----------------------------------------------------------------------------
LE40E:  jsr     LA559                           ; E40E 20 59 A5                  Y.
LE411:  jmp     LA4CE                           ; E411 4C CE A4                 L..
; ----------------------------------------------------------------------------
LE414:  jsr     LA564                           ; E414 20 64 A5                  d.
        bne     LE411                           ; E417 D0 F8                    ..
LE419:  jsr     LA575                           ; E419 20 75 A5                  u.
        beq     LE411                           ; E41C F0 F3                    ..
LE41E:  lda     #$04                            ; E41E A9 04                    ..
        jsr     LA5F2                           ; E420 20 F2 A5                  ..
        jsr     LA5C7                           ; E423 20 C7 A5                  ..
        cpx     #$00                            ; E426 E0 00                    ..
        beq     LE46C                           ; E428 F0 42                    .B
        stx     stack+27                        ; E42A 8E 1B 01                 ...
        lda     #$04                            ; E42D A9 04                    ..
        bne     LE411                           ; E42F D0 E0                    ..
LE431:  jmp     L795A                           ; E431 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LE434:  tax                                     ; E434 AA                       .
        lda     #$40                            ; E435 A9 40                    .@
        jsr     LA5F2                           ; E437 20 F2 A5                  ..
        cpx     #$57                            ; E43A E0 57                    .W
        bne     LE444                           ; E43C D0 06                    ..
        jsr     L0380                           ; E43E 20 80 03                  ..
        jmp     LA452                           ; E441 4C 52 A4                 LR.
; ----------------------------------------------------------------------------
LE444:  jsr     LA5C7                           ; E444 20 C7 A5                  ..
        cpx     #$00                            ; E447 E0 00                    ..
        beq     LE46C                           ; E449 F0 21                    .!
        cpx     #$FF                            ; E44B E0 FF                    ..
        beq     LE46C                           ; E44D F0 1D                    ..
        stx     stack+30                        ; E44F 8E 1E 01                 ...
        lda     #$40                            ; E452 A9 40                    .@
        bne     LE46A                           ; E454 D0 14                    ..
LE456:  lda     #$10                            ; E456 A9 10                    ..
        jsr     LA5F2                           ; E458 20 F2 A5                  ..
        jsr     LA5C7                           ; E45B 20 C7 A5                  ..
        cpx     #$02                            ; E45E E0 02                    ..
        bcs     LE46C                           ; E460 B0 0A                    ..
        stx     stack+18                        ; E462 8E 12 01                 ...
        stx     stack+20                        ; E465 8E 14 01                 ...
        lda     #$10                            ; E468 A9 10                    ..
LE46A:  bne     LE4CE                           ; E46A D0 62                    .b
LE46C:  jmp     L7D16                           ; E46C 4C 16 7D                 L.}
; ----------------------------------------------------------------------------
LE46F:  lda     stack+34                        ; E46F AD 22 01                 .".
        bne     LE431                           ; E472 D0 BD                    ..
        jsr     L0380                           ; E474 20 80 03                  ..
        sta     stack+32                        ; E477 8D 20 01                 . .
        jsr     L0380                           ; E47A 20 80 03                  ..
        sta     stack+33                        ; E47D 8D 21 01                 .!.
        lda     #$FF                            ; E480 A9 FF                    ..
        sta     stack+34                        ; E482 8D 22 01                 .".
        jsr     L0380                           ; E485 20 80 03                  ..
        jmp     LA4D2                           ; E488 4C D2 A4                 L..
; ----------------------------------------------------------------------------
        lda     #$02                            ; E48B A9 02                    ..
        jsr     LA5F7                           ; E48D 20 F7 A5                  ..
        jsr     LA5DA                           ; E490 20 DA A5                  ..
        sty     stack+23                        ; E493 8C 17 01                 ...
        sta     stack+24                        ; E496 8D 18 01                 ...
        lda     #$02                            ; E499 A9 02                    ..
LE49B:  ora     L0081                           ; E49B 05 81                    ..
        sta     L0081                           ; E49D 85 81                    ..
        bne     LE4D2                           ; E49F D0 31                    .1
LE4A1:  lda     #$04                            ; E4A1 A9 04                    ..
        jsr     LA5F7                           ; E4A3 20 F7 A5                  ..
        jsr     LA5DA                           ; E4A6 20 DA A5                  ..
        sty     stack+25                        ; E4A9 8C 19 01                 ...
        sta     stack+26                        ; E4AC 8D 1A 01                 ...
        lda     #$04                            ; E4AF A9 04                    ..
        bne     LE49B                           ; E4B1 D0 E8                    ..
        lda     #$01                            ; E4B3 A9 01                    ..
        jsr     LA590                           ; E4B5 20 90 A5                  ..
        sta     stack+17                        ; E4B8 8D 11 01                 ...
        ldy     #$00                            ; E4BB A0 00                    ..
LE4BD:  jsr     L03B7                           ; E4BD 20 B7 03                  ..
        sta     LFF03                           ; E4C0 8D 03 FF                 ...
        sta     $12B7,y                         ; E4C3 99 B7 12                 ...
        iny                                     ; E4C6 C8                       .
        cpy     stack+17                        ; E4C7 CC 11 01                 ...
        bcc     LE4BD                           ; E4CA 90 F1                    ..
        lda     #$01                            ; E4CC A9 01                    ..
LE4CE:  ora     $80                             ; E4CE 05 80                    ..
        sta     $80                             ; E4D0 85 80                    ..
LE4D2:  jsr     L0386                           ; E4D2 20 86 03                  ..
        bne     LE4F0                           ; E4D5 D0 19                    ..
LE4D7:  jmp     LA3C1                           ; E4D7 4C C1 A3                 L..
; ----------------------------------------------------------------------------
LE4DA:  cmp     #$91                            ; E4DA C9 91                    ..
        bne     LE4E1                           ; E4DC D0 03                    ..
        jmp     LA40E                           ; E4DE 4C 0E A4                 L..
; ----------------------------------------------------------------------------
LE4E1:  cmp     #$A4                            ; E4E1 C9 A4                    ..
        beq     LE4E7                           ; E4E3 F0 02                    ..
        bne     LE554                           ; E4E5 D0 6D                    .m
LE4E7:  jsr     L0380                           ; E4E7 20 80 03                  ..
        cmp     #$50                            ; E4EA C9 50                    .P
        bne     LE4FD                           ; E4EC D0 0F                    ..
        beq     LE4A1                           ; E4EE F0 B1                    ..
LE4F0:  cmp     #$2C                            ; E4F0 C9 2C                    .,
        bne     LE4DA                           ; E4F2 D0 E6                    ..
        jsr     L0380                           ; E4F4 20 80 03                  ..
        jmp     LA3CF                           ; E4F7 4C CF A3                 L..
; ----------------------------------------------------------------------------
LE4FA:  jsr     L0380                           ; E4FA 20 80 03                  ..
LE4FD:  cmp     #$44                            ; E4FD C9 44                    .D
        beq     LE511                           ; E4FF F0 10                    ..
        cmp     #$91                            ; E501 C9 91                    ..
        beq     LE524                           ; E503 F0 1F                    ..
        cmp     #$55                            ; E505 C9 55                    .U
        beq     LE52A                           ; E507 F0 21                    .!
        cmp     #$22                            ; E509 C9 22                    ."
        beq     LE52F                           ; E50B F0 22                    ."
        cmp     #$28                            ; E50D C9 28                    .(
        beq     LE52F                           ; E50F F0 1E                    ..
LE511:  lda     #$20                            ; E511 A9 20                    .
        jsr     LA5F2                           ; E513 20 F2 A5                  ..
        jsr     LA5C7                           ; E516 20 C7 A5                  ..
        cpx     #$02                            ; E519 E0 02                    ..
        bcs     LE556                           ; E51B B0 39                    .9
        stx     stack+20                        ; E51D 8E 14 01                 ...
        lda     #$20                            ; E520 A9 20                    .
        bne     LE53F                           ; E522 D0 1B                    ..
LE524:  jsr     LA559                           ; E524 20 59 A5                  Y.
        jmp     LA53F                           ; E527 4C 3F A5                 L?.
; ----------------------------------------------------------------------------
LE52A:  jsr     LA564                           ; E52A 20 64 A5                  d.
        bne     LE53F                           ; E52D D0 10                    ..
LE52F:  lda     #$02                            ; E52F A9 02                    ..
        jsr     LA590                           ; E531 20 90 A5                  ..
        sta     stack+19                        ; E534 8D 13 01                 ...
        stx     stack+21                        ; E537 8E 15 01                 ...
        sty     stack+22                        ; E53A 8C 16 01                 ...
        lda     #$02                            ; E53D A9 02                    ..
LE53F:  ora     $80                             ; E53F 05 80                    ..
        sta     $80                             ; E541 85 80                    ..
        jsr     L0386                           ; E543 20 86 03                  ..
        beq     LE4D7                           ; E546 F0 8F                    ..
        cmp     #$2C                            ; E548 C9 2C                    .,
        beq     LE4FA                           ; E54A F0 AE                    ..
        cmp     #$91                            ; E54C C9 91                    ..
        beq     LE524                           ; E54E F0 D4                    ..
        cmp     #$55                            ; E550 C9 55                    .U
        beq     LE52A                           ; E552 F0 D6                    ..
LE554:  bne     LE58D                           ; E554 D0 37                    .7
LE556:  jmp     L7D16                           ; E556 4C 16 7D                 L.}
; ----------------------------------------------------------------------------
        jsr     L0380                           ; E559 20 80 03                  ..
        cmp     #$42                            ; E55C C9 42                    .B
        beq     LE575                           ; E55E F0 15                    ..
        cmp     #$55                            ; E560 C9 55                    .U
        bne     LE58D                           ; E562 D0 29                    .)
        jsr     LA5C7                           ; E564 20 C7 A5                  ..
        cpx     #$1F                            ; E567 E0 1F                    ..
        bcs     LE5BE                           ; E569 B0 53                    .S
        cpx     #$04                            ; E56B E0 04                    ..
        bcc     LE5BE                           ; E56D 90 4F                    .O
        stx     stack+28                        ; E56F 8E 1C 01                 ...
        lda     #$08                            ; E572 A9 08                    ..
        rts                                     ; E574 60                       `
; ----------------------------------------------------------------------------
LE575:  lda     #$01                            ; E575 A9 01                    ..
        jsr     LA5F7                           ; E577 20 F7 A5                  ..
        jsr     LA5C7                           ; E57A 20 C7 A5                  ..
        cpx     #$10                            ; E57D E0 10                    ..
        bcs     LE556                           ; E57F B0 D5                    ..
        stx     stack+31                        ; E581 8E 1F 01                 ...
        lda     #$01                            ; E584 A9 01                    ..
        ora     L0081                           ; E586 05 81                    ..
        sta     L0081                           ; E588 85 81                    ..
        lda     #$00                            ; E58A A9 00                    ..
        rts                                     ; E58C 60                       `
; ----------------------------------------------------------------------------
LE58D:  jmp     L795A                           ; E58D 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
        jsr     LA5F2                           ; E590 20 F2 A5                  ..
        jsr     L8777                           ; E593 20 77 87                  w.
        tax                                     ; E596 AA                       .
        beq     LE556                           ; E597 F0 BD                    ..
        ldy     #$00                            ; E599 A0 00                    ..
        jsr     L03B7                           ; E59B 20 B7 03                  ..
        cmp     #$40                            ; E59E C9 40                    .@
        bne     LE5B4                           ; E5A0 D0 12                    ..
        lda     #$80                            ; E5A2 A9 80                    ..
        jsr     LA5F2                           ; E5A4 20 F2 A5                  ..
        lda     $80                             ; E5A7 A5 80                    ..
        ora     #$80                            ; E5A9 09 80                    ..
        sta     $80                             ; E5AB 85 80                    ..
        dex                                     ; E5AD CA                       .
        inc     $24                             ; E5AE E6 24                    .$
        bne     LE5B4                           ; E5B0 D0 02                    ..
        inc     $25                             ; E5B2 E6 25                    .%
LE5B4:  txa                                     ; E5B4 8A                       .
        cmp     #$11                            ; E5B5 C9 11                    ..
        bcs     LE5C2                           ; E5B7 B0 09                    ..
        ldx     $24                             ; E5B9 A6 24                    .$
        ldy     $25                             ; E5BB A4 25                    .%
        rts                                     ; E5BD 60                       `
; ----------------------------------------------------------------------------
LE5BE:  ldx     #$09                            ; E5BE A2 09                    ..
        bne     LE5C4                           ; E5C0 D0 02                    ..
LE5C2:  ldx     #$17                            ; E5C2 A2 17                    ..
LE5C4:  jmp     L4D39                           ; E5C4 4C 39 4D                 L9M
; ----------------------------------------------------------------------------
        jsr     L0380                           ; E5C7 20 80 03                  ..
        beq     LE58D                           ; E5CA F0 C1                    ..
        bcc     LE5D7                           ; E5CC 90 09                    ..
        jsr     L7947                           ; E5CE 20 47 79                  Gy
        jsr     L87F0                           ; E5D1 20 F0 87                  ..
        jmp     L7944                           ; E5D4 4C 44 79                 LDy
; ----------------------------------------------------------------------------
LE5D7:  jmp     L87F0                           ; E5D7 4C F0 87                 L..
; ----------------------------------------------------------------------------
        jsr     L0380                           ; E5DA 20 80 03                  ..
        beq     LE58D                           ; E5DD F0 AE                    ..
        bcc     LE5EF                           ; E5DF 90 0E                    ..
        jsr     L7947                           ; E5E1 20 47 79                  Gy
        jsr     L880E                           ; E5E4 20 0E 88                  ..
        jsr     L7944                           ; E5E7 20 44 79                  Dy
        ldy     $16                             ; E5EA A4 16                    ..
        lda     $17                             ; E5EC A5 17                    ..
        rts                                     ; E5EE 60                       `
; ----------------------------------------------------------------------------
LE5EF:  jmp     L880E                           ; E5EF 4C 0E 88                 L..
; ----------------------------------------------------------------------------
        and     $80                             ; E5F2 25 80                    %.
        bne     LE58D                           ; E5F4 D0 97                    ..
        rts                                     ; E5F6 60                       `
; ----------------------------------------------------------------------------
        and     L0081                           ; E5F7 25 81                    %.
        bne     LE58D                           ; E5F9 D0 92                    ..
        rts                                     ; E5FB 60                       `
; ----------------------------------------------------------------------------
        eor     #$D1                            ; E5FC 49 D1                    I.
        bit     $D1                             ; E5FE 24 D1                    $.
        dec     a                               ; E600 3A                       :
        sbc     ($F0),y                         ; E601 F1 F0                    ..
        cmp     ($3A),y                         ; E603 D1 3A                    .:
        sbc     ($2C),y                         ; E605 F1 2C                    .,
        sbc     ($2C,x)                         ; E607 E1 2C                    .,
        cpx     #$43                            ; E609 E0 43                    .C
        cmp     ($3A)                           ; E60B D2 3A                    .:
        sbc     ($3D)                           ; E60D F2 3D                    .=
        cmp     ($3A)                           ; E60F D2 3A                    .:
        sbc     ($2C)                           ; E611 F2 2C                    .,
        cmp     ($3A),y                         ; E613 D1 3A                    .:
        sbc     ($2C),y                         ; E615 F1 2C                    .,
        eor     (L004E,x)                       ; E617 41 4E                    AN
        cmp     ($3A),y                         ; E619 D1 3A                    .:
        sbc     ($2C),y                         ; E61B F1 2C                    .,
        bne     LE675                           ; E61D D0 56                    .V
        cmp     ($44),y                         ; E61F D1 44                    .D
        cmp     ($3D)                           ; E621 D2 3D                    .=
        cmp     ($43),y                         ; E623 D1 43                    .C
        cmp     ($3A)                           ; E625 D2 3A                    .:
        sbc     ($3D)                           ; E627 F2 3D                    .=
        cmp     ($3A),y                         ; E629 D1 3A                    .:
        sbc     ($52),y                         ; E62B F1 52                    .R
        cmp     ($3A),y                         ; E62D D1 3A                    .:
        sbc     ($3D)                           ; E62F F2 3D                    .=
        cmp     ($3A),y                         ; E631 D1 3A                    .:
        sbc     ($53),y                         ; E633 F1 53                    .S
        cmp     ($3A),y                         ; E635 D1 3A                    .:
        sbc     ($50),y                         ; E637 F1 50                    .P
        .byte   $C2                             ; E639 C2                       .
        .byte   $E2                             ; E63A E2                       .
        cpx     #$8D                            ; E63B E0 8D                    ..
        bpl     LE640                           ; E63D 10 01                    ..
        tya                                     ; E63F 98                       .
LE640:  pha                                     ; E640 48                       H
        jsr     LA7E2                           ; E641 20 E2 A7                  ..
        ldx     #$00                            ; E644 A2 00                    ..
LE646:  pla                                     ; E646 68                       h
        dec     stack+16                        ; E647 CE 10 01                 ...
        bmi     LE694                           ; E64A 30 48                    0H
        tay                                     ; E64C A8                       .
        iny                                     ; E64D C8                       .
        tya                                     ; E64E 98                       .
        pha                                     ; E64F 48                       H
        lda     LA5FC,y                         ; E650 B9 FC A5                 ...
        bpl     LE68C                           ; E653 10 37                    .7
        cmp     #$C2                            ; E655 C9 C2                    ..
        beq     LE6AB                           ; E657 F0 52                    .R
        cmp     #$D0                            ; E659 C9 D0                    ..
        beq     LE6BA                           ; E65B F0 5D                    .]
        cmp     #$E2                            ; E65D C9 E2                    ..
        beq     LE6D8                           ; E65F F0 77                    .w
        cmp     #$E1                            ; E661 C9 E1                    ..
        beq     LE6C6                           ; E663 F0 61                    .a
        cmp     #$F0                            ; E665 C9 F0                    ..
        beq     LE6B0                           ; E667 F0 47                    .G
        cmp     #$F1                            ; E669 C9 F1                    ..
        beq     LE6E2                           ; E66B F0 75                    .u
        cmp     #$F2                            ; E66D C9 F2                    ..
        beq     LE692                           ; E66F F0 21                    .!
        cmp     #$E0                            ; E671 C9 E0                    ..
        bne     LE67A                           ; E673 D0 05                    ..
LE675:  lda     stack+30                        ; E675 AD 1E 01                 ...
        bne     LE68C                           ; E678 D0 12                    ..
LE67A:  cmp     #$D1                            ; E67A C9 D1                    ..
        bne     LE683                           ; E67C D0 05                    ..
        lda     stack+18                        ; E67E AD 12 01                 ...
        bpl     LE68A                           ; E681 10 07                    ..
LE683:  cmp     #$D2                            ; E683 C9 D2                    ..
        bne     LE646                           ; E685 D0 BF                    ..
        lda     stack+20                        ; E687 AD 14 01                 ...
LE68A:  ora     #$30                            ; E68A 09 30                    .0
LE68C:  sta     $1100,x                         ; E68C 9D 00 11                 ...
        inx                                     ; E68F E8                       .
        bne     LE646                           ; E690 D0 B4                    ..
LE692:  beq     LE6F8                           ; E692 F0 64                    .d
LE694:  txa                                     ; E694 8A                       .
        pha                                     ; E695 48                       H
        ldx     #$00                            ; E696 A2 00                    ..
        ldy     #$11                            ; E698 A0 11                    ..
        jsr     L9250                           ; E69A 20 50 92                  P.
        lda     stack+27                        ; E69D AD 1B 01                 ...
        ldx     stack+28                        ; E6A0 AE 1C 01                 ...
        ldy     stack+29                        ; E6A3 AC 1D 01                 ...
        jsr     L924A                           ; E6A6 20 4A 92                  J.
        pla                                     ; E6A9 68                       h
        rts                                     ; E6AA 60                       `
; ----------------------------------------------------------------------------
LE6AB:  lda     $11ED                           ; E6AB AD ED 11                 ...
        bne     LE68C                           ; E6AE D0 DC                    ..
LE6B0:  bit     $80                             ; E6B0 24 80                    $.
        bmi     LE6B6                           ; E6B2 30 02                    0.
        bpl     LE646                           ; E6B4 10 90                    ..
LE6B6:  lda     #$40                            ; E6B6 A9 40                    .@
        bne     LE68C                           ; E6B8 D0 D2                    ..
LE6BA:  lda     stack+32                        ; E6BA AD 20 01                 . .
        sta     $1100,x                         ; E6BD 9D 00 11                 ...
        inx                                     ; E6C0 E8                       .
        lda     stack+33                        ; E6C1 AD 21 01                 .!.
        bne     LE68C                           ; E6C4 D0 C6                    ..
LE6C6:  lda     stack+30                        ; E6C6 AD 1E 01                 ...
        beq     LE6CF                           ; E6C9 F0 04                    ..
        lda     #$4C                            ; E6CB A9 4C                    .L
        bne     LE68C                           ; E6CD D0 BD                    ..
LE6CF:  lda     #$53                            ; E6CF A9 53                    .S
        sta     stack+30                        ; E6D1 8D 1E 01                 ...
        lda     #$57                            ; E6D4 A9 57                    .W
        bne     LE68C                           ; E6D6 D0 B4                    ..
LE6D8:  lda     $16                             ; E6D8 A5 16                    ..
        sta     $1100,x                         ; E6DA 9D 00 11                 ...
        lda     $17                             ; E6DD A5 17                    ..
        inx                                     ; E6DF E8                       .
        bne     LE68C                           ; E6E0 D0 AA                    ..
LE6E2:  ldy     stack+17                        ; E6E2 AC 11 01                 ...
        beq     LE71A                           ; E6E5 F0 33                    .3
        ldy     #$00                            ; E6E7 A0 00                    ..
LE6E9:  lda     $12B7,y                         ; E6E9 B9 B7 12                 ...
        sta     $1100,x                         ; E6EC 9D 00 11                 ...
        inx                                     ; E6EF E8                       .
        iny                                     ; E6F0 C8                       .
        cpy     stack+17                        ; E6F1 CC 11 01                 ...
        bne     LE6E9                           ; E6F4 D0 F3                    ..
        beq     LE71B                           ; E6F6 F0 23                    .#
LE6F8:  lda     stack+21                        ; E6F8 AD 15 01                 ...
        sta     $24                             ; E6FB 85 24                    .$
        lda     stack+22                        ; E6FD AD 16 01                 ...
        sta     $25                             ; E700 85 25                    .%
        ldy     stack+19                        ; E702 AC 13 01                 ...
        beq     LE71A                           ; E705 F0 13                    ..
        ldy     #$00                            ; E707 A0 00                    ..
LE709:  jsr     L03B7                           ; E709 20 B7 03                  ..
        sta     LFF03                           ; E70C 8D 03 FF                 ...
        sta     $1100,x                         ; E70F 9D 00 11                 ...
        inx                                     ; E712 E8                       .
        iny                                     ; E713 C8                       .
        cpy     stack+19                        ; E714 CC 13 01                 ...
        bne     LE709                           ; E717 D0 F0                    ..
        .byte   $24                             ; E719 24                       $
LE71A:  dex                                     ; E71A CA                       .
LE71B:  jmp     LA646                           ; E71B 4C 46 A6                 LF.
; ----------------------------------------------------------------------------
        and     #$E6                            ; E71E 29 E6                    ).
        beq     LE725                           ; E720 F0 03                    ..
LE722:  jmp     L795A                           ; E722 4C 5A 79                 LZy
; ----------------------------------------------------------------------------
LE725:  lda     $80                             ; E725 A5 80                    ..
        and     #$01                            ; E727 29 01                    ).
        cmp     #$01                            ; E729 C9 01                    ..
        bne     LE722                           ; E72B D0 F5                    ..
        lda     $80                             ; E72D A5 80                    ..
        rts                                     ; E72F 60                       `
; ----------------------------------------------------------------------------
        and     #$E7                            ; E730 29 E7                    ).
        bne     LE722                           ; E732 D0 EE                    ..
        rts                                     ; E734 60                       `
; ----------------------------------------------------------------------------
        and     #$C4                            ; E735 29 C4                    ).
        bne     LE722                           ; E737 D0 E9                    ..
        lda     $80                             ; E739 A5 80                    ..
        and     #$03                            ; E73B 29 03                    ).
        cmp     #$03                            ; E73D C9 03                    ..
        bne     LE722                           ; E73F D0 E1                    ..
        lda     $80                             ; E741 A5 80                    ..
        rts                                     ; E743 60                       `
; ----------------------------------------------------------------------------
        and     #$05                            ; E744 29 05                    ).
        cmp     #$05                            ; E746 C9 05                    ..
        bne     LE722                           ; E748 D0 D8                    ..
        lda     $80                             ; E74A A5 80                    ..
        rts                                     ; E74C 60                       `
; ----------------------------------------------------------------------------
        lda     $7A                             ; E74D A5 7A                    .z
        bne     LE76A                           ; E74F D0 19                    ..
        lda     #$28                            ; E751 A9 28                    .(
        sta     $7A                             ; E753 85 7A                    .z
        jsr     L928C                           ; E755 20 8C 92                  ..
        stx     $7B                             ; E758 86 7B                    .{
        sty     $7C                             ; E75A 84 7C                    .|
        ldy     #$28                            ; E75C A0 28                    .(
        sta     LFF04                           ; E75E 8D 04 FF                 ...
        lda     #$7A                            ; E761 A9 7A                    .z
        sta     ($7B),y                         ; E763 91 7B                    .{
        iny                                     ; E765 C8                       .
        lda     #$00                            ; E766 A9 00                    ..
        sta     ($7B),y                         ; E768 91 7B                    .{
LE76A:  ldx     stack+28                        ; E76A AE 1C 01                 ...
        bne     LE774                           ; E76D D0 05                    ..
        ldx     #$08                            ; E76F A2 08                    ..
        stx     stack+28                        ; E771 8E 1C 01                 ...
LE774:  lda     #$00                            ; E774 A9 00                    ..
        ldy     #$6F                            ; E776 A0 6F                    .o
        jsr     L924A                           ; E778 20 4A 92                  J.
        lda     #$00                            ; E77B A9 00                    ..
        jsr     L9250                           ; E77D 20 50 92                  P.
        jsr     L90CB                           ; E780 20 CB 90                  ..
        ldx     #$00                            ; E783 A2 00                    ..
        jsr     LFFC6                           ; E785 20 C6 FF                  ..
        bcs     LE7AA                           ; E788 B0 20                    .
        ldy     #$FF                            ; E78A A0 FF                    ..
LE78C:  iny                                     ; E78C C8                       .
        jsr     L9256                           ; E78D 20 56 92                  V.
        sta     LFF04                           ; E790 8D 04 FF                 ...
        cmp     #$0D                            ; E793 C9 0D                    ..
        beq     LE79D                           ; E795 F0 06                    ..
        sta     ($7B),y                         ; E797 91 7B                    .{
        cpy     #$28                            ; E799 C0 28                    .(
        bcc     LE78C                           ; E79B 90 EF                    ..
LE79D:  lda     #$00                            ; E79D A9 00                    ..
        sta     ($7B),y                         ; E79F 91 7B                    .{
        jsr     L9262                           ; E7A1 20 62 92                  b.
        lda     #$00                            ; E7A4 A9 00                    ..
        sec                                     ; E7A6 38                       8
        jmp     L9268                           ; E7A7 4C 68 92                 Lh.
; ----------------------------------------------------------------------------
LE7AA:  pha                                     ; E7AA 48                       H
        jsr     LA79D                           ; E7AB 20 9D A7                  ..
        jsr     LA7E2                           ; E7AE 20 E2 A7                  ..
        pla                                     ; E7B1 68                       h
        tax                                     ; E7B2 AA                       .
        jmp     L4D39                           ; E7B3 4C 39 4D                 L9M
; ----------------------------------------------------------------------------
        bit     $7F                             ; E7B6 24 7F                    $.
        bmi     LE7DF                           ; E7B8 30 25                    0%
        jsr     L9274                           ; E7BA 20 74 92                  t.
        .byte   "ARE YOU SURE?"                 ; E7BD 41 52 45 20 59 4F 55 20  ARE YOU
                                                ; E7C5 53 55 52 45 3F           SURE?
        .byte   $00                             ; E7CA 00                       .
; ----------------------------------------------------------------------------
        jsr     L9262                           ; E7CB 20 62 92                  b.
        jsr     L9256                           ; E7CE 20 56 92                  V.
        pha                                     ; E7D1 48                       H
LE7D2:  cmp     #$0D                            ; E7D2 C9 0D                    ..
        beq     LE7DB                           ; E7D4 F0 05                    ..
        jsr     L9256                           ; E7D6 20 56 92                  V.
        bne     LE7D2                           ; E7D9 D0 F7                    ..
LE7DB:  pla                                     ; E7DB 68                       h
        cmp     #$59                            ; E7DC C9 59                    .Y
        rts                                     ; E7DE 60                       `
; ----------------------------------------------------------------------------
LE7DF:  lda     #$00                            ; E7DF A9 00                    ..
        rts                                     ; E7E1 60                       `
; ----------------------------------------------------------------------------
        tya                                     ; E7E2 98                       .
        pha                                     ; E7E3 48                       H
        lda     $7A                             ; E7E4 A5 7A                    .z
        beq     LE7F5                           ; E7E6 F0 0D                    ..
        ldy     #$28                            ; E7E8 A0 28                    .(
        tya                                     ; E7EA 98                       .
        sta     LFF04                           ; E7EB 8D 04 FF                 ...
        sta     ($7B),y                         ; E7EE 91 7B                    .{
        iny                                     ; E7F0 C8                       .
        lda     #$FF                            ; E7F1 A9 FF                    ..
        sta     ($7B),y                         ; E7F3 91 7B                    .{
LE7F5:  lda     #$00                            ; E7F5 A9 00                    ..
        sta     LFF03                           ; E7F7 8D 03 FF                 ...
        sta     $7A                             ; E7FA 85 7A                    .z
        pla                                     ; E7FC 68                       h
        tay                                     ; E7FD A8                       .
        rts                                     ; E7FE 60                       `
; ----------------------------------------------------------------------------
        bit     $2030                           ; E7FF 2C 30 20                 ,0
        eor     $4B45,y                         ; E802 59 45 4B                 YEK
        tax                                     ; E805 AA                       .
        tya                                     ; E806 98                       .
        pha                                     ; E807 48                       H
        lda     #$00                            ; E808 A9 00                    ..
        jsr     L8E25                           ; E80A 20 25 8E                  %.
        pla                                     ; E80D 68                       h
        tay                                     ; E80E A8                       .
        rts                                     ; E80F 60                       `
; ----------------------------------------------------------------------------
        sta     $3C                             ; E810 85 3C                    .<
        dey                                     ; E812 88                       .
        tax                                     ; E813 AA                       .
        inx                                     ; E814 E8                       .
        bne     LE819                           ; E815 D0 02                    ..
        stx     $7F                             ; E817 86 7F                    ..
LE819:  rts                                     ; E819 60                       `
; ----------------------------------------------------------------------------
        pha                                     ; E81A 48                       H
        lda     #$00                            ; E81B A9 00                    ..
        sta     MMU_KERN_WINDOW                 ; E81D 8D 00 FF                 ...
        pla                                     ; E820 68                       h
        rts                                     ; E821 60                       `
; ----------------------------------------------------------------------------
        ldx     #$10                            ; E822 A2 10                    ..
LE824:  lda     $11D6,x                         ; E824 BD D6 11                 ...
        sta     LD000,x                         ; E827 9D 00 D0                 ...
        dex                                     ; E82A CA                       .
        bpl     LE824                           ; E82B 10 F7                    ..
        ldy     #$07                            ; E82D A0 07                    ..
LE82F:  lda     LD015                           ; E82F AD 15 D0                 ...
        and     $6CA0,y                         ; E832 39 A0 6C                 9.l
        beq     LE86F                           ; E835 F0 38                    .8
        ldx     $6DC6,y                         ; E837 BE C6 6D                 ..m
        lda     $117E,x                         ; E83A BD 7E 11                 .~.
        beq     LE86F                           ; E83D F0 30                    .0
        sta     $117F,x                         ; E83F 9D 7F 11                 ...
LE842:  tya                                     ; E842 98                       .
        asl     a                               ; E843 0A                       .
        tay                                     ; E844 A8                       .
        lda     $1180,x                         ; E845 BD 80 11                 ...
        sec                                     ; E848 38                       8
        sbc     #$01                            ; E849 E9 01                    ..
        inx                                     ; E84B E8                       .
        inx                                     ; E84C E8                       .
        iny                                     ; E84D C8                       .
        jsr     LA9BA                           ; E84E 20 BA A9                  ..
        dex                                     ; E851 CA                       .
        dex                                     ; E852 CA                       .
        dey                                     ; E853 88                       .
        lda     $1180,x                         ; E854 BD 80 11                 ...
        jsr     LA9BA                           ; E857 20 BA A9                  ..
        php                                     ; E85A 08                       .
        tya                                     ; E85B 98                       .
        lsr     a                               ; E85C 4A                       J
        tay                                     ; E85D A8                       .
        plp                                     ; E85E 28                       (
        bcc     LE86A                           ; E85F 90 09                    ..
        lda     $11E6                           ; E861 AD E6 11                 ...
        eor     $6CA0,y                         ; E864 59 A0 6C                 Y.l
        sta     $11E6                           ; E867 8D E6 11                 ...
LE86A:  dec     $117F,x                         ; E86A DE 7F 11                 ...
        bne     LE842                           ; E86D D0 D3                    ..
LE86F:  dey                                     ; E86F 88                       .
        bpl     LE82F                           ; E870 10 BD                    ..
        lda     LD019                           ; E872 AD 19 D0                 ...
        sta     LD019                           ; E875 8D 19 D0                 ...
        and     #$0E                            ; E878 29 0E                    ).
        beq     LE8C0                           ; E87A F0 44                    .D
        lsr     a                               ; E87C 4A                       J
        ldy     #$01                            ; E87D A0 01                    ..
LE87F:  lsr     a                               ; E87F 4A                       J
        bcc     LE8A2                           ; E880 90 20                    .
        pha                                     ; E882 48                       H
        lda     LD01E,y                         ; E883 B9 1E D0                 ...
        ora     $11E7,y                         ; E886 19 E7 11                 ...
        sta     $11E7,y                         ; E889 99 E7 11                 ...
        lda     #$00                            ; E88C A9 00                    ..
        sta     LD01E,y                         ; E88E 99 1E D0                 ...
        lda     $127F                           ; E891 AD 7F 12                 ...
        cpy     #$00                            ; E894 C0 00                    ..
        beq     LE899                           ; E896 F0 01                    ..
        lsr     a                               ; E898 4A                       J
LE899:  lsr     a                               ; E899 4A                       J
        bcc     LE8A1                           ; E89A 90 05                    ..
        lda     #$FF                            ; E89C A9 FF                    ..
        sta     $1276,y                         ; E89E 99 76 12                 .v.
LE8A1:  pla                                     ; E8A1 68                       h
LE8A2:  dey                                     ; E8A2 88                       .
        bpl     LE87F                           ; E8A3 10 DA                    ..
        lsr     a                               ; E8A5 4A                       J
        bcc     LE8C0                           ; E8A6 90 18                    ..
        lda     LD013                           ; E8A8 AD 13 D0                 ...
        sta     $11E9                           ; E8AB 8D E9 11                 ...
        lda     LD014                           ; E8AE AD 14 D0                 ...
        sta     $11EA                           ; E8B1 8D EA 11                 ...
        lda     $127F                           ; E8B4 AD 7F 12                 ...
        and     #$04                            ; E8B7 29 04                    ).
        beq     LE8C0                           ; E8B9 F0 05                    ..
        lda     #$FF                            ; E8BB A9 FF                    ..
        sta     $1278                           ; E8BD 8D 78 12                 .x.
LE8C0:  ldx     #$00                            ; E8C0 A2 00                    ..
LE8C2:  lda     $1224,x                         ; E8C2 BD 24 12                 .$.
        bmi     LE8EE                           ; E8C5 30 27                    0'
        lda     $1223,x                         ; E8C7 BD 23 12                 .#.
        sec                                     ; E8CA 38                       8
        sbc     $1222                           ; E8CB ED 22 12                 .".
        sta     $1223,x                         ; E8CE 9D 23 12                 .#.
        bcs     LE8EE                           ; E8D1 B0 1B                    ..
        lda     $1224,x                         ; E8D3 BD 24 12                 .$.
        sbc     #$00                            ; E8D6 E9 00                    ..
        sta     $1224,x                         ; E8D8 9D 24 12                 .$.
        bcs     LE8EE                           ; E8DB B0 11                    ..
        txa                                     ; E8DD 8A                       .
        lsr     a                               ; E8DE 4A                       J
        tay                                     ; E8DF A8                       .
        lda     $1230,y                         ; E8E0 B9 30 12                 .0.
        and     #$FE                            ; E8E3 29 FE                    ).
        pha                                     ; E8E5 48                       H
        lda     $7026,y                         ; E8E6 B9 26 70                 .&p
        tay                                     ; E8E9 A8                       .
        pla                                     ; E8EA 68                       h
        sta     LD404,y                         ; E8EB 99 04 D4                 ...
LE8EE:  inx                                     ; E8EE E8                       .
        inx                                     ; E8EF E8                       .
        cpx     #$06                            ; E8F0 E0 06                    ..
        bne     LE8C2                           ; E8F2 D0 CE                    ..
        ldy     #$02                            ; E8F4 A0 02                    ..
LE8F6:  lda     $1285,y                         ; E8F6 B9 85 12                 ...
        bpl     LE8FF                           ; E8F9 10 04                    ..
        dey                                     ; E8FB 88                       .
        bpl     LE8F6                           ; E8FC 10 F8                    ..
        rts                                     ; E8FE 60                       `
; ----------------------------------------------------------------------------
LE8FF:  clc                                     ; E8FF 18                       .
        lda     $129D,y                         ; E900 B9 9D 12                 ...
        adc     $1297,y                         ; E903 79 97 12                 y..
        sta     $129D,y                         ; E906 99 9D 12                 ...
        lda     $12A0,y                         ; E909 B9 A0 12                 ...
        adc     $129A,y                         ; E90C 79 9A 12                 y..
        sta     $12A0,y                         ; E90F 99 A0 12                 ...
        lda     $1294,y                         ; E912 B9 94 12                 ...
        tax                                     ; E915 AA                       .
        and     #$01                            ; E916 29 01                    ).
        beq     LE948                           ; E918 F0 2E                    ..
        bcc     LE92B                           ; E91A 90 0F                    ..
        sec                                     ; E91C 38                       8
        lda     $129D,y                         ; E91D B9 9D 12                 ...
        sbc     $128E,y                         ; E920 F9 8E 12                 ...
        lda     $12A0,y                         ; E923 B9 A0 12                 ...
        sbc     $1291,y                         ; E926 F9 91 12                 ...
        bcs     LE978                           ; E929 B0 4D                    .M
LE92B:  cpx     #$02                            ; E92B E0 02                    ..
        bcc     LE939                           ; E92D 90 0A                    ..
        jsr     LA9A4                           ; E92F 20 A4 A9                  ..
        lda     #$02                            ; E932 A9 02                    ..
        sta     $1294,y                         ; E934 99 94 12                 ...
        bne     LE96C                           ; E937 D0 33                    .3
LE939:  lda     $1288,y                         ; E939 B9 88 12                 ...
        sta     $129D,y                         ; E93C 99 9D 12                 ...
        lda     $128B,y                         ; E93F B9 8B 12                 ...
        sta     $12A0,y                         ; E942 99 A0 12                 ...
        jmp     LA978                           ; E945 4C 78 A9                 Lx.
; ----------------------------------------------------------------------------
LE948:  bcs     LE95E                           ; E948 B0 14                    ..
        lda     $12A0,y                         ; E94A B9 A0 12                 ...
        cmp     $128B,y                         ; E94D D9 8B 12                 ...
        bcc     LE978                           ; E950 90 26                    .&
        bne     LE95E                           ; E952 D0 0A                    ..
        lda     $129D,y                         ; E954 B9 9D 12                 ...
        cmp     $1288,y                         ; E957 D9 88 12                 ...
        bcc     LE978                           ; E95A 90 1C                    ..
        beq     LE978                           ; E95C F0 1A                    ..
LE95E:  cpx     #$02                            ; E95E E0 02                    ..
        bcc     LE96C                           ; E960 90 0A                    ..
        jsr     LA9A4                           ; E962 20 A4 A9                  ..
        lda     #$03                            ; E965 A9 03                    ..
        sta     $1294,y                         ; E967 99 94 12                 ...
        bne     LE939                           ; E96A D0 CD                    ..
LE96C:  lda     $128E,y                         ; E96C B9 8E 12                 ...
        sta     $129D,y                         ; E96F 99 9D 12                 ...
        lda     $1291,y                         ; E972 B9 91 12                 ...
        sta     $12A0,y                         ; E975 99 A0 12                 ...
LE978:  ldx     $7026,y                         ; E978 BE 26 70                 .&p
        lda     $129D,y                         ; E97B B9 9D 12                 ...
        sta     LD400,x                         ; E97E 9D 00 D4                 ...
        lda     $12A0,y                         ; E981 B9 A0 12                 ...
        sta     LD401,x                         ; E984 9D 01 D4                 ...
        tya                                     ; E987 98                       .
        tax                                     ; E988 AA                       .
        lda     $1282,x                         ; E989 BD 82 12                 ...
        bne     LE991                           ; E98C D0 03                    ..
        dec     $1285,x                         ; E98E DE 85 12                 ...
LE991:  dec     $1282,x                         ; E991 DE 82 12                 ...
        lda     $1285,x                         ; E994 BD 85 12                 ...
        bpl     LE9A1                           ; E997 10 08                    ..
        lda     #$08                            ; E999 A9 08                    ..
        ldx     $7026,y                         ; E99B BE 26 70                 .&p
        sta     LD404,x                         ; E99E 9D 04 D4                 ...
LE9A1:  jmp     LA8FB                           ; E9A1 4C FB A8                 L..
; ----------------------------------------------------------------------------
        lda     $1297,y                         ; E9A4 B9 97 12                 ...
        eor     #$FF                            ; E9A7 49 FF                    I.
        clc                                     ; E9A9 18                       .
        adc     #$01                            ; E9AA 69 01                    i.
        sta     $1297,y                         ; E9AC 99 97 12                 ...
        lda     $129A,y                         ; E9AF B9 9A 12                 ...
        eor     #$FF                            ; E9B2 49 FF                    I.
        adc     #$00                            ; E9B4 69 00                    i.
        sta     $129A,y                         ; E9B6 99 9A 12                 ...
        rts                                     ; E9B9 60                       `
; ----------------------------------------------------------------------------
        pha                                     ; E9BA 48                       H
        clc                                     ; E9BB 18                       .
        lda     $1181,x                         ; E9BC BD 81 11                 ...
        adc     $1185,x                         ; E9BF 7D 85 11                 }..
        sta     $1185,x                         ; E9C2 9D 85 11                 ...
        lda     $1182,x                         ; E9C5 BD 82 11                 ...
        adc     $1186,x                         ; E9C8 7D 86 11                 }..
        sta     $1186,x                         ; E9CB 9D 86 11                 ...
        pla                                     ; E9CE 68                       h
        bcc     LE9E4                           ; E9CF 90 13                    ..
        lsr     a                               ; E9D1 4A                       J
        lsr     a                               ; E9D2 4A                       J
        lda     $11D6,y                         ; E9D3 B9 D6 11                 ...
        bcs     LE9DD                           ; E9D6 B0 05                    ..
        adc     #$01                            ; E9D8 69 01                    i.
        jmp     LA9E1                           ; E9DA 4C E1 A9                 L..
; ----------------------------------------------------------------------------
LE9DD:  sbc     #$01                            ; E9DD E9 01                    ..
        cmp     #$FF                            ; E9DF C9 FF                    ..
        sta     $11D6,y                         ; E9E1 99 D6 11                 ...
LE9E4:  rts                                     ; E9E4 60                       `
; ----------------------------------------------------------------------------
        lda     #$84                            ; E9E5 A9 84                    ..
        jmp     LA9F1                           ; E9E7 4C F1 A9                 L..
; ----------------------------------------------------------------------------
        lda     #$85                            ; E9EA A9 85                    ..
        jmp     LA9F1                           ; E9EC 4C F1 A9                 L..
; ----------------------------------------------------------------------------
        lda     #$86                            ; E9EF A9 86                    ..
        pha                                     ; E9F1 48                       H
        jsr     L880E                           ; E9F2 20 0E 88                  ..
        jsr     LA81A                           ; E9F5 20 1A A8                  ..
        sty     LDF07                           ; E9F8 8C 07 DF                 ...
        sta     LDF08                           ; E9FB 8D 08 DF                 ...
        jsr     L880B                           ; E9FE 20 0B 88                  ..
        jsr     LA81A                           ; EA01 20 1A A8                  ..
        sty     LDF02                           ; EA04 8C 02 DF                 ...
        sta     LDF03                           ; EA07 8D 03 DF                 ...
        jsr     L880B                           ; EA0A 20 0B 88                  ..
        jsr     LA81A                           ; EA0D 20 1A A8                  ..
        sty     LDF04                           ; EA10 8C 04 DF                 ...
        sta     LDF05                           ; EA13 8D 05 DF                 ...
        jsr     L8805                           ; EA16 20 05 88                  ..
        cpx     #$10                            ; EA19 E0 10                    ..
        bcs     LEA2B                           ; EA1B B0 0E                    ..
        jsr     LA81A                           ; EA1D 20 1A A8                  ..
        stx     LDF06                           ; EA20 8E 06 DF                 ...
        pla                                     ; EA23 68                       h
        tay                                     ; EA24 A8                       .
        ldx     $03D5                           ; EA25 AE D5 03                 ...
        jmp     LFF50                           ; EA28 4C 50 FF                 LP.
; ----------------------------------------------------------------------------
LEA2B:  jmp     L7D16                           ; EA2B 4C 16 7D                 L.}
; ----------------------------------------------------------------------------
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA2E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA36 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA3E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA46 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA4E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA56 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA5E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA66 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA6E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA76 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA7E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA86 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA8E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA96 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EA9E FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAA6 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAAE FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAB6 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EABE FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAC6 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EACE FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAD6 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EADE FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF                 ; EAE6 FF FF FF FF              ....
LEAEA:  .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAEA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAF2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EAFA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB02 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB0A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB12 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB1A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB22 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB2A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB32 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB3A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB42 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB4A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB52 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB5A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB62 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB6A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB72 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB7A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB82 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB8A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB92 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EB9A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBA2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBAA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBB2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBBA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBC2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBCA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBD2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBDA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBE2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBEA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBF2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EBFA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC02 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC0A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC12 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC1A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC22 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC2A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC32 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC3A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC42 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC4A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC52 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC5A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC62 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC6A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC72 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC7A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC82 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC8A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC92 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EC9A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECA2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECAA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECB2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECBA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECC2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECCA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECD2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECDA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECE2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECEA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECF2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ECFA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED02 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED0A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED12 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED1A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED22 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED2A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED32 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED3A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED42 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED4A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED52 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED5A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED62 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED6A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED72 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED7A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED82 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED8A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED92 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; ED9A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDA2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDAA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDB2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDBA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDC2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDCA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDD2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDDA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDE2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDEA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDF2 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EDFA FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE02 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE0A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE12 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE1A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE22 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE2A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE32 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE3A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE42 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE4A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE52 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EE5A FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$7B,$E9,$77,$6A,$5F,$5E,$5D ; EE62 FF 7B E9 77 6A 5F 5E 5D  .{.wj_^]
        .byte   $BE,$21,$3D,$24,$37,$3F,$22,$55 ; EE6A BE 21 3D 24 37 3F 22 55  .!=$7?"U
        .byte   $20,$24,$4A,$30,$27,$3A,$4E,$2F ; EE72 20 24 4A 30 27 3A 4E 2F   $J0':N/
        .byte   $35,$4D,$4C,$4F,$40,$47,$46,$68 ; EE7A 35 4D 4C 4F 40 47 46 68  5MLO@GFh
        .byte   $69,$88,$15,$1F,$0C,$08,$1F,$0F ; EE82 69 88 15 1F 0C 08 1F 0F  i.......
        .byte   $19,$69,$5F,$71,$96,$05,$13,$11 ; EE8A 19 69 5F 71 96 05 13 11  .i_q....
        .byte   $74,$89,$05,$1E,$0D,$01,$43,$6D ; EE92 74 89 05 1E 0D 01 43 6D  t.....Cm
        .byte   $98,$06,$10,$13,$19,$67,$94,$1C ; EE9A 98 06 10 13 19 67 94 1C  .....g..
        .byte   $05,$75,$37,$19,$EE,$70,$70,$1D ; EEA2 05 75 37 19 EE 70 70 1D  .u7..pp.
        .byte   $F9,$61,$66,$66,$79,$79,$73,$38 ; EEAA F9 61 66 66 79 79 73 38  .affyys8
        .byte   $39,$E3,$6F,$7B,$6C,$78,$6F,$7F ; EEB2 39 E3 6F 7B 6C 78 6F 7F  9.o{lxo.
        .byte   $69,$19,$2F,$01,$E2,$6E,$6A,$05 ; EEBA 69 19 2F 01 E2 6E 6A 05  i./..nj.
        .byte   $EC,$5E,$48,$5D,$15,$3F,$DA,$5C ; EEC2 EC 5E 48 5D 15 3F DA 5C  .^H].?.\
        .byte   $4A,$56,$32,$D9,$51,$4E,$58,$5C ; EECA 4A 56 32 D9 51 4E 58 5C  JV2.QNX\
        .byte   $51,$06,$2A,$CF,$5A,$4E,$40,$46 ; EED2 51 06 2A CF 5A 4E 40 46  Q.*.ZN@F
        .byte   $2C,$D3,$43,$4D,$41,$4E,$47,$08 ; EEDA 2C D3 43 4D 41 4E 47 08  ,.CMANG.
        .byte   $09,$E9,$36,$B0,$B6,$B4,$DE,$BC ; EEE2 09 E9 36 B0 B6 B4 DE BC  ..6.....
        .byte   $AE,$BE,$A1,$DD,$B4,$B8,$B8,$D2 ; EEEA AE BE A1 DD B4 B8 B8 D2  ........
        .byte   $A0,$CB,$A7,$A8,$A3,$AA,$CE,$B9 ; EEF2 A0 CB A7 A8 A3 AA CE B9  ........
        .byte   $A4,$A6,$AF,$CF,$ED,$E7         ; EEFA A4 A6 AF CF ED E7        ......
; ----------------------------------------------------------------------------
        jmp     L84B0                           ; EF00 4C B0 84                 L..
; ----------------------------------------------------------------------------
        jmp     L792A                           ; EF03 4C 2A 79                 L*y
; ----------------------------------------------------------------------------
        jmp     L8E35                           ; EF06 4C 35 8E                 L5.
; ----------------------------------------------------------------------------
        jmp     L8052                           ; EF09 4C 52 80                 LR.
; ----------------------------------------------------------------------------
        jmp     L8811                           ; EF0C 4C 11 88                 L..
; ----------------------------------------------------------------------------
        jmp     L8C68                           ; EF0F 4C 68 8C                 Lh.
; ----------------------------------------------------------------------------
        jmp     L882A                           ; EF12 4C 2A 88                 L*.
; ----------------------------------------------------------------------------
        jmp     L882D                           ; EF15 4C 2D 88                 L-.
; ----------------------------------------------------------------------------
        jmp     L8841                           ; EF18 4C 41 88                 LA.
; ----------------------------------------------------------------------------
        jmp     L8844                           ; EF1B 4C 44 88                 LD.
; ----------------------------------------------------------------------------
        jmp     L8A20                           ; EF1E 4C 20 8A                 L .
; ----------------------------------------------------------------------------
        jmp     L8A23                           ; EF21 4C 23 8A                 L#.
; ----------------------------------------------------------------------------
        jmp     L8B3C                           ; EF24 4C 3C 8B                 L<.
; ----------------------------------------------------------------------------
        jmp     L8B3F                           ; EF27 4C 3F 8B                 L?.
; ----------------------------------------------------------------------------
        jmp     L89C6                           ; EF2A 4C C6 89                 L..
; ----------------------------------------------------------------------------
        jmp     L8CEE                           ; EF2D 4C EE 8C                 L..
; ----------------------------------------------------------------------------
        jmp     L8FAA                           ; EF30 4C AA 8F                 L..
; ----------------------------------------------------------------------------
        jmp     L8FED                           ; EF33 4C ED 8F                 L..
; ----------------------------------------------------------------------------
        jmp     L8FB1                           ; EF36 4C B1 8F                 L..
; ----------------------------------------------------------------------------
        jmp     L8FB4                           ; EF39 4C B4 8F                 L..
; ----------------------------------------------------------------------------
        jmp     L9026                           ; EF3C 4C 26 90                 L&.
; ----------------------------------------------------------------------------
        jmp     L93FC                           ; EF3F 4C FC 93                 L..
; ----------------------------------------------------------------------------
        jmp     L9403                           ; EF42 4C 03 94                 L..
; ----------------------------------------------------------------------------
        jmp     L944C                           ; EF45 4C 4C 94                 LL.
; ----------------------------------------------------------------------------
        jmp     L94A6                           ; EF48 4C A6 94                 L..
; ----------------------------------------------------------------------------
        jmp     L8C3A                           ; EF4B 4C 3A 8C                 L:.
; ----------------------------------------------------------------------------
        jmp     L8C77                           ; EF4E 4C 77 8C                 Lw.
; ----------------------------------------------------------------------------
        jmp     L8C4A                           ; EF51 4C 4A 8C                 LJ.
; ----------------------------------------------------------------------------
        jmp     L8C7A                           ; EF54 4C 7A 8C                 Lz.
; ----------------------------------------------------------------------------
        jmp     L8433                           ; EF57 4C 33 84                 L3.
; ----------------------------------------------------------------------------
        jmp     L8AAF                           ; EF5A 4C AF 8A                 L..
; ----------------------------------------------------------------------------
        jmp     L8A84                           ; EF5D 4C 84 8A                 L..
; ----------------------------------------------------------------------------
        jmp     L7A73                           ; EF60 4C 73 7A                 Lsz
; ----------------------------------------------------------------------------
        jmp     L8BC7                           ; EF63 4C C7 8B                 L..
; ----------------------------------------------------------------------------
        jmp     L8BF3                           ; EF66 4C F3 8B                 L..
; ----------------------------------------------------------------------------
        jmp     L8C1B                           ; EF69 4C 1B 8C                 L..
; ----------------------------------------------------------------------------
        jmp     L8C2B                           ; EF6C 4C 2B 8C                 L+.
; ----------------------------------------------------------------------------
        jmp     L4825                           ; EF6F 4C 25 48                 L%H
; ----------------------------------------------------------------------------
        jmp     L9B23                           ; EF72 4C 23 9B                 L#.
; ----------------------------------------------------------------------------
        jmp     L9BEE                           ; EF75 4C EE 9B                 L..
; ----------------------------------------------------------------------------
        jmp     L673E                           ; EF78 4C 3E 67                 L>g
; ----------------------------------------------------------------------------
        jmp     L5A93                           ; EF7B 4C 93 5A                 L.Z
; ----------------------------------------------------------------------------
        jmp     L51F0                           ; EF7E 4C F0 51                 L.Q
; ----------------------------------------------------------------------------
        jmp     L51F5                           ; EF81 4C F5 51                 L.Q
; ----------------------------------------------------------------------------
        jmp     L51D3                           ; EF84 4C D3 51                 L.Q
; ----------------------------------------------------------------------------
        jmp     L4F4C                           ; EF87 4C 4C 4F                 LLO
; ----------------------------------------------------------------------------
        jmp     L4307                           ; EF8A 4C 07 43                 L.C
; ----------------------------------------------------------------------------
        jmp     L5061                           ; EF8D 4C 61 50                 LaP
; ----------------------------------------------------------------------------
        jmp     L4AF3                           ; EF90 4C F3 4A                 L.J
; ----------------------------------------------------------------------------
        jmp     L78C5                           ; EF93 4C C5 78                 L.x
; ----------------------------------------------------------------------------
        jmp     L77DD                           ; EF96 4C DD 77                 L.w
; ----------------------------------------------------------------------------
        jmp     L5A9E                           ; EF99 4C 9E 5A                 L.Z
; ----------------------------------------------------------------------------
        jmp     L5A79                           ; EF9C 4C 79 5A                 LyZ
; ----------------------------------------------------------------------------
        jmp     L509D                           ; EF9F 4C 9D 50                 L.P
; ----------------------------------------------------------------------------
        jmp     L92DD                           ; EFA2 4C DD 92                 L..
; ----------------------------------------------------------------------------
        jmp     L4DCA                           ; EFA5 4C CA 4D                 L.M
; ----------------------------------------------------------------------------
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFA8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFB0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFB8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFC0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFC8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFD0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFD8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFE0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFE8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFF0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; EFF8 FF FF FF FF FF FF FF FF  ........
; ----------------------------------------------------------------------------
        jmp     LB021                           ; F000 4C 21 B0                 L!.
; ----------------------------------------------------------------------------
        jmp     LB009                           ; F003 4C 09 B0                 L..
; ----------------------------------------------------------------------------
        jmp     LB0B2                           ; F006 4C B2 B0                 L..
; ----------------------------------------------------------------------------
        jsr     LFF7D                           ; F009 20 7D FF                  }.
        .byte   $0D                             ; F00C 0D                       .
        .byte   "BREAK"                         ; F00D 42 52 45 41 4B           BREAK
        .byte   $07,$00                         ; F012 07 00                    ..
; ----------------------------------------------------------------------------
        pla                                     ; F014 68                       h
        sta     $02                             ; F015 85 02                    ..
        ldx     #$05                            ; F017 A2 05                    ..
LF019:  pla                                     ; F019 68                       h
        sta     $03,x                           ; F01A 95 03                    ..
        dex                                     ; F01C CA                       .
        bpl     LF019                           ; F01D 10 FA                    ..
        bmi     LF046                           ; F01F 30 25                    0%
        lda     #$00                            ; F021 A9 00                    ..
        sta     MMU_KERN_WINDOW                 ; F023 8D 00 FF                 ...
        sta     $06                             ; F026 85 06                    ..
        sta     $07                             ; F028 85 07                    ..
        sta     $08                             ; F02A 85 08                    ..
        sta     $05                             ; F02C 85 05                    ..
        lda     #$00                            ; F02E A9 00                    ..
        ldy     #$B0                            ; F030 A0 B0                    ..
        sta     $04                             ; F032 85 04                    ..
        sty     $03                             ; F034 84 03                    ..
        lda     #$0F                            ; F036 A9 0F                    ..
        sta     $02                             ; F038 85 02                    ..
        jsr     LFF7D                           ; F03A 20 7D FF                  }.
        .byte   $0D                             ; F03D 0D                       .
        .byte   "MONITOR"                       ; F03E 4D 4F 4E 49 54 4F 52     MONITOR
        .byte   $00                             ; F045 00                       .
; ----------------------------------------------------------------------------
LF046:  cld                                     ; F046 D8                       .
        tsx                                     ; F047 BA                       .
        stx     $09                             ; F048 86 09                    ..
        lda     #$C0                            ; F04A A9 C0                    ..
        jsr     SetMsg                          ; F04C 20 90 FF                  ..
        cli                                     ; F04F 58                       X
        jsr     LFF7D                           ; F050 20 7D FF                  }.
        .byte   $0D                             ; F053 0D                       .
        .byte   "    PC  SR AC XR YR SP"        ; F054 20 20 20 20 50 43 20 20      PC
                                                ; F05C 53 52 20 41 43 20 58 52  SR AC XR
                                                ; F064 20 59 52 20 53 50         YR SP
        .byte   $0D                             ; F06A 0D                       .
        .byte   "; "                            ; F06B 3B 20                    ;
        .byte   $1B                             ; F06D 1B                       .
        .byte   "Q"                             ; F06E 51                       Q
        .byte   $00                             ; F06F 00                       .
; ----------------------------------------------------------------------------
        lda     $02                             ; F070 A5 02                    ..
        jsr     LB8D2                           ; F072 20 D2 B8                  ..
        txa                                     ; F075 8A                       .
        jsr     LFFD2                           ; F076 20 D2 FF                  ..
        lda     $03                             ; F079 A5 03                    ..
        jsr     LB8C2                           ; F07B 20 C2 B8                  ..
        ldy     #$02                            ; F07E A0 02                    ..
LF080:  lda     $02,y                           ; F080 B9 02 00                 ...
        jsr     LB8A5                           ; F083 20 A5 B8                  ..
        iny                                     ; F086 C8                       .
        cpy     #$08                            ; F087 C0 08                    ..
        bcc     LF080                           ; F089 90 F5                    ..
LF08B:  jsr     LB8B4                           ; F08B 20 B4 B8                  ..
        ldx     #$00                            ; F08E A2 00                    ..
        stx     $7A                             ; F090 86 7A                    .z
        jsr     LFFCF                           ; F092 20 CF FF                  ..
        sta     $0200,x                         ; F095 9D 00 02                 ...
        inx                                     ; F098 E8                       .
        cpx     #$A1                            ; F099 E0 A1                    ..
        bcs     LF0BC                           ; F09B B0 1F                    ..
        cmp     #$0D                            ; F09D C9 0D                    ..
        .byte   $D0                             ; F09F D0                       .
LF0A0:  sbc     ($A9),y                         ; F0A0 F1 A9                    ..
LF0A2:  brk                                     ; F0A2 00                       .
        sta     $01FF,x                         ; F0A3 9D FF 01                 ...
LF0A6:  jsr     LB8E9                           ; F0A6 20 E9 B8                  ..
        beq     LF08B                           ; F0A9 F0 E0                    ..
        cmp     #$20                            ; F0AB C9 20                    .
        beq     LF0A6                           ; F0AD F0 F7                    ..
        jmp     (RAMVEC_WTF)                    ; F0AF 6C 2E 03                 l..
; ----------------------------------------------------------------------------
LF0B2:  ldx     #$15                            ; F0B2 A2 15                    ..
LF0B4:  cmp     LB0E5+1,x                       ; F0B4 DD E6 B0                 ...
        beq     LF0C5                           ; F0B7 F0 0C                    ..
        dex                                     ; F0B9 CA                       .
        bpl     LF0B4                           ; F0BA 10 F8                    ..
LF0BC:  jsr     LFF7D                           ; F0BC 20 7D FF                  }.
        .byte   $1D                             ; F0BF 1D                       .
        .byte   "?"                             ; F0C0 3F                       ?
        .byte   $00                             ; F0C1 00                       .
; ----------------------------------------------------------------------------
        jmp     LB08B                           ; F0C2 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF0C5:  cpx     #$13                            ; F0C5 E0 13                    ..
        bcs     LF0DB                           ; F0C7 B0 12                    ..
        cpx     #$0F                            ; F0C9 E0 0F                    ..
        bcs     LF0E0                           ; F0CB B0 13                    ..
        txa                                     ; F0CD 8A                       .
        asl     a                               ; F0CE 0A                       .
        tax                                     ; F0CF AA                       .
        lda     LB0FD,x                         ; F0D0 BD FD B0                 ...
        pha                                     ; F0D3 48                       H
        lda     LB0FC,x                         ; F0D4 BD FC B0                 ...
        pha                                     ; F0D7 48                       H
        jmp     LB7A7                           ; F0D8 4C A7 B7                 L..
; ----------------------------------------------------------------------------
LF0DB:  sta     $93                             ; F0DB 85 93                    ..
        jmp     LB337                           ; F0DD 4C 37 B3                 L7.
; ----------------------------------------------------------------------------
LF0E0:  jmp     LB9B1                           ; F0E0 4C B1 B9                 L..
; ----------------------------------------------------------------------------
        jmp     (L0A00)                         ; F0E3 6C 00 0A                 l..
; ----------------------------------------------------------------------------
        eor     ($43,x)                         ; F0E6 41 43                    AC
        .byte   $44                             ; F0E8 44                       D
        lsr     $47                             ; F0E9 46 47                    FG
        pha                                     ; F0EB 48                       H
        lsr     a                               ; F0EC 4A                       J
        eor     $5452                           ; F0ED 4D 52 54                 MRT
        cli                                     ; F0F0 58                       X
        rti                                     ; F0F1 40                       @
; ----------------------------------------------------------------------------
        rol     $3B3E                           ; F0F2 2E 3E 3B                 .>;
        bit     $2B                             ; F0F5 24 2B                    $+
        rol     $25                             ; F0F7 26 25                    &%
        jmp     L5653                           ; F0F9 4C 53 56                 LSV
; ----------------------------------------------------------------------------
        ora     $B4                             ; F0FC 05 B4                    ..
        bmi     LF0B2                           ; F0FE 30 B2                    0.
        tya                                     ; F100 98                       .
        lda     $DA,x                           ; F101 B5 DA                    ..
        .byte   $B3                             ; F103 B3                       .
        cmp     $B1,x                           ; F104 D5 B1                    ..
        cmp     LDEB2                           ; F106 CD B2 DE                 ...
        lda     ($51),y                         ; F109 B1 51                    .Q
        lda     ($4F),y                         ; F10B B1 4F                    .O
        bcs     LF142                           ; F10D B0 33                    .3
        lda     ($E2)                           ; F10F B2 E2                    ..
        bcs     LF0A2                           ; F111 B0 8F                    ..
        tsx                                     ; F113 BA                       .
        ora     $B4                             ; F114 05 B4                    ..
        tax                                     ; F116 AA                       .
        lda     ($93),y                         ; F117 B1 93                    ..
        lda     ($8E),y                         ; F119 B1 8E                    ..
        lda     ($0A)                           ; F11B B2 0A                    ..
        ldx     $68                             ; F11D A6 68                    .h
        lda     #$66                            ; F11F A9 66                    .f
        sei                                     ; F121 78                       x
        jsr     LFF74                           ; F122 20 74 FF                  t.
        cli                                     ; F125 58                       X
        ldx     $0AB2                           ; F126 AE B2 0A                 ...
        rts                                     ; F129 60                       `
; ----------------------------------------------------------------------------
        stx     $0AB2                           ; F12A 8E B2 0A                 ...
        ldx     #$66                            ; F12D A2 66                    .f
        stx     $02B9                           ; F12F 8E B9 02                 ...
        ldx     $68                             ; F132 A6 68                    .h
        sei                                     ; F134 78                       x
        jsr     LFF77                           ; F135 20 77 FF                  w.
        cli                                     ; F138 58                       X
        ldx     $0AB2                           ; F139 AE B2 0A                 ...
        rts                                     ; F13C 60                       `
; ----------------------------------------------------------------------------
        stx     $0AB2                           ; F13D 8E B2 0A                 ...
        ldx     #$66                            ; F140 A2 66                    .f
LF142:  stx     $02C8                           ; F142 8E C8 02                 ...
        ldx     $68                             ; F145 A6 68                    .h
        sei                                     ; F147 78                       x
        jsr     LFF7A                           ; F148 20 7A FF                  z.
        cli                                     ; F14B 58                       X
        php                                     ; F14C 08                       .
        ldx     $0AB2                           ; F14D AE B2 0A                 ...
        plp                                     ; F150 28                       (
        rts                                     ; F151 60                       `
; ----------------------------------------------------------------------------
        bcs     LF15C                           ; F152 B0 08                    ..
        jsr     LB901                           ; F154 20 01 B9                  ..
        jsr     LB7A7                           ; F157 20 A7 B7                  ..
        bcc     LF162                           ; F15A 90 06                    ..
LF15C:  lda     #$0B                            ; F15C A9 0B                    ..
        sta     $60                             ; F15E 85 60                    .`
        bne     LF177                           ; F160 D0 15                    ..
LF162:  jsr     LB90E                           ; F162 20 0E B9                  ..
        bcc     LF191                           ; F165 90 2A                    .*
        ldx     #$03                            ; F167 A2 03                    ..
        bit     $D7                             ; F169 24 D7                    $.
        bpl     LF16E                           ; F16B 10 01                    ..
        inx                                     ; F16D E8                       .
LF16E:  lsr     $62                             ; F16E 46 62                    Fb
        ror     $61                             ; F170 66 61                    fa
        ror     $60                             ; F172 66 60                    f`
        dex                                     ; F174 CA                       .
        bne     LF16E                           ; F175 D0 F7                    ..
LF177:  jsr     LFFE1                           ; F177 20 E1 FF                  ..
        beq     LF18E                           ; F17A F0 12                    ..
        jsr     LB1E8                           ; F17C 20 E8 B1                  ..
        lda     #$08                            ; F17F A9 08                    ..
        bit     $D7                             ; F181 24 D7                    $.
        bpl     LF186                           ; F183 10 01                    ..
        asl     a                               ; F185 0A                       .
LF186:  jsr     LB952                           ; F186 20 52 B9                  R.
        jsr     LB922                           ; F189 20 22 B9                  ".
        bcs     LF177                           ; F18C B0 E9                    ..
LF18E:  jmp     LB08B                           ; F18E 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF191:  jmp     LB0BC                           ; F191 4C BC B0                 L..
; ----------------------------------------------------------------------------
        jsr     LB974                           ; F194 20 74 B9                  t.
        ldy     #$00                            ; F197 A0 00                    ..
LF199:  jsr     LB7A7                           ; F199 20 A7 B7                  ..
        bcs     LF1A8                           ; F19C B0 0A                    ..
        lda     $60                             ; F19E A5 60                    .`
        sta     $05,y                           ; F1A0 99 05 00                 ...
        iny                                     ; F1A3 C8                       .
        cpy     #$05                            ; F1A4 C0 05                    ..
        bcc     LF199                           ; F1A6 90 F1                    ..
LF1A8:  jmp     LB08B                           ; F1A8 4C 8B B0                 L..
; ----------------------------------------------------------------------------
        bcs     LF1C9                           ; F1AB B0 1C                    ..
        jsr     LB901                           ; F1AD 20 01 B9                  ..
        ldy     #$00                            ; F1B0 A0 00                    ..
LF1B2:  jsr     LB7A7                           ; F1B2 20 A7 B7                  ..
        bcs     LF1C9                           ; F1B5 B0 12                    ..
        lda     $60                             ; F1B7 A5 60                    .`
        jsr     LB12A                           ; F1B9 20 2A B1                  *.
        iny                                     ; F1BC C8                       .
        bit     $D7                             ; F1BD 24 D7                    $.
        bpl     LF1C5                           ; F1BF 10 04                    ..
        cpy     #$10                            ; F1C1 C0 10                    ..
        bcc     LF1B2                           ; F1C3 90 ED                    ..
LF1C5:  cpy     #$08                            ; F1C5 C0 08                    ..
        bcc     LF1B2                           ; F1C7 90 E9                    ..
LF1C9:  jsr     LFF7D                           ; F1C9 20 7D FF                  }.
        .byte   $1B                             ; F1CC 1B                       .
        .byte   "O"                             ; F1CD 4F                       O
        .byte   $91,$00                         ; F1CE 91 00                    ..
; ----------------------------------------------------------------------------
        jsr     LB1E8                           ; F1D0 20 E8 B1                  ..
        jmp     LB08B                           ; F1D3 4C 8B B0                 L..
; ----------------------------------------------------------------------------
        jsr     LB974                           ; F1D6 20 74 B9                  t.
        ldx     $09                             ; F1D9 A6 09                    ..
        txs                                     ; F1DB 9A                       .
        jmp     LFF71                           ; F1DC 4C 71 FF                 Lq.
; ----------------------------------------------------------------------------
        jsr     LB974                           ; F1DF 20 74 B9                  t.
        jsr     LFF6E                           ; F1E2 20 6E FF                  n.
        jmp     LB08B                           ; F1E5 4C 8B B0                 L..
; ----------------------------------------------------------------------------
        jsr     LB8B4                           ; F1E8 20 B4 B8                  ..
        lda     #$3E                            ; F1EB A9 3E                    .>
        jsr     LFFD2                           ; F1ED 20 D2 FF                  ..
        jsr     LB892                           ; F1F0 20 92 B8                  ..
        ldy     #$00                            ; F1F3 A0 00                    ..
        beq     LF1FA                           ; F1F5 F0 03                    ..
LF1F7:  jsr     LB8A8                           ; F1F7 20 A8 B8                  ..
LF1FA:  jsr     LB11A                           ; F1FA 20 1A B1                  ..
        jsr     LB8C2                           ; F1FD 20 C2 B8                  ..
        iny                                     ; F200 C8                       .
        cpy     #$08                            ; F201 C0 08                    ..
        bit     $D7                             ; F203 24 D7                    $.
        bpl     LF209                           ; F205 10 02                    ..
        cpy     #$10                            ; F207 C0 10                    ..
LF209:  bcc     LF1F7                           ; F209 90 EC                    ..
        jsr     LFF7D                           ; F20B 20 7D FF                  }.
        .byte   ":"                             ; F20E 3A                       :
        .byte   $12,$00                         ; F20F 12 00                    ..
; ----------------------------------------------------------------------------
        ldy     #$00                            ; F211 A0 00                    ..
LF213:  jsr     LB11A                           ; F213 20 1A B1                  ..
        pha                                     ; F216 48                       H
        and     #$7F                            ; F217 29 7F                    ).
        cmp     #$20                            ; F219 C9 20                    .
        pla                                     ; F21B 68                       h
        bcs     LF220                           ; F21C B0 02                    ..
        lda     #$2E                            ; F21E A9 2E                    ..
LF220:  jsr     LFFD2                           ; F220 20 D2 FF                  ..
        iny                                     ; F223 C8                       .
        bit     $D7                             ; F224 24 D7                    $.
        bpl     LF22C                           ; F226 10 04                    ..
        cpy     #$10                            ; F228 C0 10                    ..
        bcc     LF213                           ; F22A 90 E7                    ..
LF22C:  cpy     #$08                            ; F22C C0 08                    ..
        bcc     LF213                           ; F22E 90 E3                    ..
        rts                                     ; F230 60                       `
; ----------------------------------------------------------------------------
        lda     #$00                            ; F231 A9 00                    ..
        bit     L80A9                           ; F233 2C A9 80                 ,..
        sta     $93                             ; F236 85 93                    ..
        lda     #$00                            ; F238 A9 00                    ..
        sta     $0AB3                           ; F23A 8D B3 0A                 ...
        jsr     LB983                           ; F23D 20 83 B9                  ..
        bcs     LF247                           ; F240 B0 05                    ..
        jsr     LB7A7                           ; F242 20 A7 B7                  ..
        bcc     LF24A                           ; F245 90 03                    ..
LF247:  jmp     LB0BC                           ; F247 4C BC B0                 L..
; ----------------------------------------------------------------------------
LF24A:  bit     $93                             ; F24A 24 93                    $.
        bpl     LF27A                           ; F24C 10 2C                    .,
        sec                                     ; F24E 38                       8
        lda     $66                             ; F24F A5 66                    .f
        sbc     $60                             ; F251 E5 60                    .`
        lda     $67                             ; F253 A5 67                    .g
        sbc     $61                             ; F255 E5 61                    .a
        bcs     LF27A                           ; F257 B0 21                    .!
        lda     $63                             ; F259 A5 63                    .c
        adc     $60                             ; F25B 65 60                    e`
        sta     $60                             ; F25D 85 60                    .`
        lda     $64                             ; F25F A5 64                    .d
        adc     $61                             ; F261 65 61                    ea
        sta     $61                             ; F263 85 61                    .a
        lda     $65                             ; F265 A5 65                    .e
        adc     $62                             ; F267 65 62                    eb
        sta     $62                             ; F269 85 62                    .b
        ldx     #$02                            ; F26B A2 02                    ..
LF26D:  lda     $0AB7,x                         ; F26D BD B7 0A                 ...
        sta     $66,x                           ; F270 95 66                    .f
        dex                                     ; F272 CA                       .
        bpl     LF26D                           ; F273 10 F8                    ..
        lda     #$80                            ; F275 A9 80                    ..
        sta     $0AB3                           ; F277 8D B3 0A                 ...
LF27A:  jsr     LB8B4                           ; F27A 20 B4 B8                  ..
        ldy     #$00                            ; F27D A0 00                    ..
LF27F:  jsr     LFFE1                           ; F27F 20 E1 FF                  ..
        beq     LF2CB                           ; F282 F0 47                    .G
        jsr     LB11A                           ; F284 20 1A B1                  ..
        ldx     #$60                            ; F287 A2 60                    .`
        stx     $02B9                           ; F289 8E B9 02                 ...
        stx     $02C8                           ; F28C 8E C8 02                 ...
        ldx     $62                             ; F28F A6 62                    .b
        sei                                     ; F291 78                       x
        bit     $93                             ; F292 24 93                    $.
        bpl     LF299                           ; F294 10 03                    ..
        jsr     LFF77                           ; F296 20 77 FF                  w.
LF299:  ldx     $62                             ; F299 A6 62                    .b
        jsr     LFF7A                           ; F29B 20 7A FF                  z.
        cli                                     ; F29E 58                       X
        beq     LF2AA                           ; F29F F0 09                    ..
        jsr     LB892                           ; F2A1 20 92 B8                  ..
        jsr     LB8A8                           ; F2A4 20 A8 B8                  ..
        jsr     LB8A8                           ; F2A7 20 A8 B8                  ..
LF2AA:  bit     $0AB3                           ; F2AA 2C B3 0A                 ,..
        bmi     LF2BA                           ; F2AD 30 0B                    0.
        inc     $60                             ; F2AF E6 60                    .`
        bne     LF2C3                           ; F2B1 D0 10                    ..
        inc     $61                             ; F2B3 E6 61                    .a
        bne     LF2C3                           ; F2B5 D0 0C                    ..
        jmp     LB0BC                           ; F2B7 4C BC B0                 L..
; ----------------------------------------------------------------------------
LF2BA:  jsr     LB922                           ; F2BA 20 22 B9                  ".
        jsr     LB960                           ; F2BD 20 60 B9                  `.
        jmp     LB2C6                           ; F2C0 4C C6 B2                 L..
; ----------------------------------------------------------------------------
LF2C3:  jsr     LB950                           ; F2C3 20 50 B9                  P.
        jsr     LB93C                           ; F2C6 20 3C B9                  <.
        bcs     LF27F                           ; F2C9 B0 B4                    ..
LF2CB:  jmp     LB08B                           ; F2CB 4C 8B B0                 L..
; ----------------------------------------------------------------------------
        jsr     LB983                           ; F2CE 20 83 B9                  ..
        bcs     LF334                           ; F2D1 B0 61                    .a
        ldy     #$00                            ; F2D3 A0 00                    ..
        jsr     LB8E9                           ; F2D5 20 E9 B8                  ..
        cmp     #$27                            ; F2D8 C9 27                    .'
        bne     LF2F2                           ; F2DA D0 16                    ..
        jsr     LB8E9                           ; F2DC 20 E9 B8                  ..
        cmp     #$00                            ; F2DF C9 00                    ..
        beq     LF334                           ; F2E1 F0 51                    .Q
LF2E3:  sta     $0A80,y                         ; F2E3 99 80 0A                 ...
        iny                                     ; F2E6 C8                       .
        jsr     LB8E9                           ; F2E7 20 E9 B8                  ..
        beq     LF307                           ; F2EA F0 1B                    ..
        cpy     #$20                            ; F2EC C0 20                    .
        bne     LF2E3                           ; F2EE D0 F3                    ..
        beq     LF307                           ; F2F0 F0 15                    ..
LF2F2:  sty     stack                           ; F2F2 8C 00 01                 ...
        jsr     LB7A5                           ; F2F5 20 A5 B7                  ..
LF2F8:  lda     $60                             ; F2F8 A5 60                    .`
        sta     $0A80,y                         ; F2FA 99 80 0A                 ...
        iny                                     ; F2FD C8                       .
        jsr     LB7A7                           ; F2FE 20 A7 B7                  ..
        bcs     LF307                           ; F301 B0 04                    ..
        cpy     #$20                            ; F303 C0 20                    .
        bne     LF2F8                           ; F305 D0 F1                    ..
LF307:  sty     $93                             ; F307 84 93                    ..
        jsr     LB8B4                           ; F309 20 B4 B8                  ..
LF30C:  ldy     #$00                            ; F30C A0 00                    ..
LF30E:  jsr     LB11A                           ; F30E 20 1A B1                  ..
        cmp     $0A80,y                         ; F311 D9 80 0A                 ...
        bne     LF324                           ; F314 D0 0E                    ..
        iny                                     ; F316 C8                       .
        cpy     $93                             ; F317 C4 93                    ..
        bne     LF30E                           ; F319 D0 F3                    ..
        jsr     LB892                           ; F31B 20 92 B8                  ..
        jsr     LB8A8                           ; F31E 20 A8 B8                  ..
        jsr     LB8A8                           ; F321 20 A8 B8                  ..
LF324:  jsr     LFFE1                           ; F324 20 E1 FF                  ..
        beq     LF331                           ; F327 F0 08                    ..
        jsr     LB950                           ; F329 20 50 B9                  P.
        jsr     LB93C                           ; F32C 20 3C B9                  <.
        bcs     LF30C                           ; F32F B0 DB                    ..
LF331:  jmp     LB08B                           ; F331 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF334:  jmp     LB0BC                           ; F334 4C BC B0                 L..
; ----------------------------------------------------------------------------
        ldy     #$01                            ; F337 A0 01                    ..
        sty     ST                              ; F339 84 BA                    ..
        sty     $B9                             ; F33B 84 B9                    ..
        dey                                     ; F33D 88                       .
        sty     LFSLogNum                       ; F33E 84 C6                    ..
        sty     $B7                             ; F340 84 B7                    ..
        sty     $C7                             ; F342 84 C7                    ..
        sty     $90                             ; F344 84 90                    ..
        lda     #$0A                            ; F346 A9 0A                    ..
        sta     $BC                             ; F348 85 BC                    ..
        lda     #$80                            ; F34A A9 80                    ..
        sta     $BB                             ; F34C 85 BB                    ..
LF34E:  jsr     LB8E9                           ; F34E 20 E9 B8                  ..
        beq     LF3AB                           ; F351 F0 58                    .X
        cmp     #$20                            ; F353 C9 20                    .
        beq     LF34E                           ; F355 F0 F7                    ..
        cmp     #$22                            ; F357 C9 22                    ."
        bne     LF370                           ; F359 D0 15                    ..
        ldx     $7A                             ; F35B A6 7A                    .z
LF35D:  lda     $0200,x                         ; F35D BD 00 02                 ...
        beq     LF3AB                           ; F360 F0 49                    .I
        inx                                     ; F362 E8                       .
        cmp     #$22                            ; F363 C9 22                    ."
        beq     LF373                           ; F365 F0 0C                    ..
        sta     ($BB),y                         ; F367 91 BB                    ..
        inc     $B7                             ; F369 E6 B7                    ..
        iny                                     ; F36B C8                       .
        cpy     #$11                            ; F36C C0 11                    ..
        bcc     LF35D                           ; F36E 90 ED                    ..
LF370:  jmp     LB0BC                           ; F370 4C BC B0                 L..
; ----------------------------------------------------------------------------
LF373:  stx     $7A                             ; F373 86 7A                    .z
        jsr     LB8E9                           ; F375 20 E9 B8                  ..
        beq     LF3AB                           ; F378 F0 31                    .1
        jsr     LB7A7                           ; F37A 20 A7 B7                  ..
        bcs     LF3AB                           ; F37D B0 2C                    .,
        lda     $60                             ; F37F A5 60                    .`
        sta     ST                              ; F381 85 BA                    ..
        jsr     LB7A7                           ; F383 20 A7 B7                  ..
        bcs     LF3AB                           ; F386 B0 23                    .#
        jsr     LB901                           ; F388 20 01 B9                  ..
        sta     LFSLogNum                       ; F38B 85 C6                    ..
        jsr     LB7A7                           ; F38D 20 A7 B7                  ..
        bcs     LF3D1                           ; F390 B0 3F                    .?
        jsr     LB8B4                           ; F392 20 B4 B8                  ..
        ldx     $60                             ; F395 A6 60                    .`
        ldy     $61                             ; F397 A4 61                    .a
        lda     $93                             ; F399 A5 93                    ..
        cmp     #$53                            ; F39B C9 53                    .S
        bne     LF370                           ; F39D D0 D1                    ..
        lda     #$00                            ; F39F A9 00                    ..
        sta     $B9                             ; F3A1 85 B9                    ..
        lda     #$66                            ; F3A3 A9 66                    .f
        jsr     SAVE                            ; F3A5 20 D8 FF                  ..
LF3A8:  jmp     LB08B                           ; F3A8 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF3AB:  lda     $93                             ; F3AB A5 93                    ..
        cmp     #$56                            ; F3AD C9 56                    .V
        beq     LF3B7                           ; F3AF F0 06                    ..
        cmp     #$4C                            ; F3B1 C9 4C                    .L
        bne     LF370                           ; F3B3 D0 BB                    ..
        lda     #$00                            ; F3B5 A9 00                    ..
LF3B7:  jsr     LOAD                            ; F3B7 20 D5 FF                  ..
        lda     $90                             ; F3BA A5 90                    ..
        and     #$10                            ; F3BC 29 10                    ).
        beq     LF3A8                           ; F3BE F0 E8                    ..
        lda     $93                             ; F3C0 A5 93                    ..
        beq     LF370                           ; F3C2 F0 AC                    ..
        jsr     LFF7D                           ; F3C4 20 7D FF                  }.
        .byte   " ERROR"                        ; F3C7 20 45 52 52 4F 52         ERROR
        .byte   $00                             ; F3CD 00                       .
; ----------------------------------------------------------------------------
        jmp     LB08B                           ; F3CE 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF3D1:  ldx     $66                             ; F3D1 A6 66                    .f
        ldy     $67                             ; F3D3 A4 67                    .g
        lda     #$00                            ; F3D5 A9 00                    ..
        sta     $B9                             ; F3D7 85 B9                    ..
        beq     LF3AB                           ; F3D9 F0 D0                    ..
        jsr     LB983                           ; F3DB 20 83 B9                  ..
        bcs     LF403                           ; F3DE B0 23                    .#
        lda     $68                             ; F3E0 A5 68                    .h
        cmp     $0AB9                           ; F3E2 CD B9 0A                 ...
        bne     LF403                           ; F3E5 D0 1C                    ..
        jsr     LB7A7                           ; F3E7 20 A7 B7                  ..
        bcs     LF403                           ; F3EA B0 17                    ..
        ldy     #$00                            ; F3EC A0 00                    ..
LF3EE:  lda     $60                             ; F3EE A5 60                    .`
        jsr     LB12A                           ; F3F0 20 2A B1                  *.
        jsr     LFFE1                           ; F3F3 20 E1 FF                  ..
        beq     LF400                           ; F3F6 F0 08                    ..
        jsr     LB950                           ; F3F8 20 50 B9                  P.
        jsr     LB93C                           ; F3FB 20 3C B9                  <.
        bcs     LF3EE                           ; F3FE B0 EE                    ..
LF400:  jmp     LB08B                           ; F400 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF403:  jmp     LB0BC                           ; F403 4C BC B0                 L..
; ----------------------------------------------------------------------------
        bcs     LF442                           ; F406 B0 3A                    .:
        jsr     LB901                           ; F408 20 01 B9                  ..
LF40B:  ldx     #$00                            ; F40B A2 00                    ..
        stx     $0AA1                           ; F40D 8E A1 0A                 ...
        stx     $0AB4                           ; F410 8E B4 0A                 ...
LF413:  jsr     LB8E9                           ; F413 20 E9 B8                  ..
        bne     LF41F                           ; F416 D0 07                    ..
        cpx     #$00                            ; F418 E0 00                    ..
        bne     LF41F                           ; F41A D0 03                    ..
        jmp     LB08B                           ; F41C 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF41F:  cmp     #$20                            ; F41F C9 20                    .
        beq     LF40B                           ; F421 F0 E8                    ..
        sta     $0AAC,x                         ; F423 9D AC 0A                 ...
        inx                                     ; F426 E8                       .
        cpx     #$03                            ; F427 E0 03                    ..
        bne     LF413                           ; F429 D0 E8                    ..
LF42B:  dex                                     ; F42B CA                       .
        bmi     LF445                           ; F42C 30 17                    0.
        lda     $0AAC,x                         ; F42E BD AC 0A                 ...
        sec                                     ; F431 38                       8
        sbc     #$3F                            ; F432 E9 3F                    .?
        ldy     #$05                            ; F434 A0 05                    ..
LF436:  lsr     a                               ; F436 4A                       J
        ror     $0AA1                           ; F437 6E A1 0A                 n..
        ror     $0AA0                           ; F43A 6E A0 0A                 n..
        dey                                     ; F43D 88                       .
        bne     LF436                           ; F43E D0 F6                    ..
        beq     LF42B                           ; F440 F0 E9                    ..
LF442:  jmp     LB0BC                           ; F442 4C BC B0                 L..
; ----------------------------------------------------------------------------
LF445:  ldx     #$02                            ; F445 A2 02                    ..
LF447:  lda     $0AB4                           ; F447 AD B4 0A                 ...
        bne     LF47C                           ; F44A D0 30                    .0
        jsr     LB7CE                           ; F44C 20 CE B7                  ..
        beq     LF47A                           ; F44F F0 29                    .)
        bcs     LF442                           ; F451 B0 EF                    ..
        lda     #$24                            ; F453 A9 24                    .$
        sta     $0AA0,x                         ; F455 9D A0 0A                 ...
        inx                                     ; F458 E8                       .
        lda     $62                             ; F459 A5 62                    .b
        bne     LF442                           ; F45B D0 E5                    ..
        ldy     #$04                            ; F45D A0 04                    ..
        lda     $0AB6                           ; F45F AD B6 0A                 ...
        cmp     #$08                            ; F462 C9 08                    ..
        bcc     LF46B                           ; F464 90 05                    ..
        cpy     $0AB4                           ; F466 CC B4 0A                 ...
        .byte   $F0                             ; F469 F0                       .
LF46A:  .byte   $06                             ; F46A 06                       .
LF46B:  lda     $61                             ; F46B A5 61                    .a
        bne     LF471                           ; F46D D0 02                    ..
        ldy     #$02                            ; F46F A0 02                    ..
LF471:  lda     #$30                            ; F471 A9 30                    .0
LF473:  sta     $0AA0,x                         ; F473 9D A0 0A                 ...
        inx                                     ; F476 E8                       .
        dey                                     ; F477 88                       .
        bne     LF473                           ; F478 D0 F9                    ..
LF47A:  dec     $7A                             ; F47A C6 7A                    .z
LF47C:  jsr     LB8E9                           ; F47C 20 E9 B8                  ..
        beq     LF48F                           ; F47F F0 0E                    ..
        cmp     #$20                            ; F481 C9 20                    .
        beq     LF447                           ; F483 F0 C2                    ..
        sta     $0AA0,x                         ; F485 9D A0 0A                 ...
        inx                                     ; F488 E8                       .
        cpx     #$0A                            ; F489 E0 0A                    ..
        bcc     LF447                           ; F48B 90 BA                    ..
        bcs     LF442                           ; F48D B0 B3                    ..
LF48F:  stx     $63                             ; F48F 86 63                    .c
        ldx     #$00                            ; F491 A2 00                    ..
        stx     $0AB1                           ; F493 8E B1 0A                 ...
        ldx     #$00                            ; F496 A2 00                    ..
        stx     $9F                             ; F498 86 9F                    ..
        lda     $0AB1                           ; F49A AD B1 0A                 ...
        .byte   $20                             ; F49D 20
LOAD__: eor     LAEB6,y                         ; F49E 59 B6 AE                 Y..
        tax                                     ; F4A1 AA                       .
        asl     a                               ; F4A2 0A                       .
        stx     $64                             ; F4A3 86 64                    .d
        tax                                     ; F4A5 AA                       .
        lda     LB761,x                         ; F4A6 BD 61 B7                 .a.
        jsr     LB57F                           ; F4A9 20 7F B5                  ..
        lda     LB721,x                         ; F4AC BD 21 B7                 .!.
        jsr     LB57F                           ; F4AF 20 7F B5                  ..
        ldx     #$06                            ; F4B2 A2 06                    ..
LF4B4:  cpx     #$03                            ; F4B4 E0 03                    ..
        bne     LF4CC                           ; F4B6 D0 14                    ..
        ldy     $0AAB                           ; F4B8 AC AB 0A                 ...
        beq     LF4CC                           ; F4BB F0 0F                    ..
LF4BD:  lda     $0AAA                           ; F4BD AD AA 0A                 ...
        cmp     #$E8                            ; F4C0 C9 E8                    ..
        lda     #$30                            ; F4C2 A9 30                    .0
        bcs     LF4E4                           ; F4C4 B0 1E                    ..
        jsr     LB57C                           ; F4C6 20 7C B5                  |.
        dey                                     ; F4C9 88                       .
        bne     LF4BD                           ; F4CA D0 F1                    ..
LF4CC:  asl     $0AAA                           ; F4CC 0E AA 0A                 ...
        bcc     LF4DF                           ; F4CF 90 0E                    ..
        lda     LB714,x                         ; F4D1 BD 14 B7                 ...
        jsr     LB57F                           ; F4D4 20 7F B5                  ..
        lda     LB71A,x                         ; F4D7 BD 1A B7                 ...
        beq     LF4DF                           ; F4DA F0 03                    ..
        jsr     LB57F                           ; F4DC 20 7F B5                  ..
LF4DF:  dex                                     ; F4DF CA                       .
        bne     LF4B4                           ; F4E0 D0 D2                    ..
        beq     LF4EA                           ; F4E2 F0 06                    ..
LF4E4:  jsr     LB57C                           ; F4E4 20 7C B5                  |.
        jsr     LB57C                           ; F4E7 20 7C B5                  |.
LF4EA:  lda     $63                             ; F4EA A5 63                    .c
        cmp     $9F                             ; F4EC C5 9F                    ..
        beq     LF4F3                           ; F4EE F0 03                    ..
        jmp     LB58B                           ; F4F0 4C 8B B5                 L..
; ----------------------------------------------------------------------------
LF4F3:  ldy     $0AAB                           ; F4F3 AC AB 0A                 ...
        beq     LF52A                           ; F4F6 F0 32                    .2
        lda     $64                             ; F4F8 A5 64                    .d
        cmp     #$9D                            ; F4FA C9 9D                    ..
        bne     LF521                           ; F4FC D0 23                    .#
        lda     $60                             ; F4FE A5 60                    .`
        sbc     $66                             ; F500 E5 66                    .f
        tax                                     ; F502 AA                       .
        lda     $61                             ; F503 A5 61                    .a
        sbc     $67                             ; F505 E5 67                    .g
        bcc     LF511                           ; F507 90 08                    ..
        bne     LF579                           ; F509 D0 6E                    .n
        cpx     #$82                            ; F50B E0 82                    ..
        bcs     LF579                           ; F50D B0 6A                    .j
        bcc     LF519                           ; F50F 90 08                    ..
LF511:  tay                                     ; F511 A8                       .
        iny                                     ; F512 C8                       .
        bne     LF579                           ; F513 D0 64                    .d
        cpx     #$82                            ; F515 E0 82                    ..
        bcc     LF579                           ; F517 90 60                    .`
LF519:  dex                                     ; F519 CA                       .
        dex                                     ; F51A CA                       .
        txa                                     ; F51B 8A                       .
        ldy     $0AAB                           ; F51C AC AB 0A                 ...
        bne     LF524                           ; F51F D0 03                    ..
LF521:  lda     $5F,y                           ; F521 B9 5F 00                 ._.
LF524:  jsr     LB12A                           ; F524 20 2A B1                  *.
        dey                                     ; F527 88                       .
        bne     LF521                           ; F528 D0 F7                    ..
LF52A:  lda     $0AB1                           ; F52A AD B1 0A                 ...
        jsr     LB12A                           ; F52D 20 2A B1                  *.
        jsr     LB8AD                           ; F530 20 AD B8                  ..
        jsr     LFF7D                           ; F533 20 7D FF                  }.
        .byte   "A "                            ; F536 41 20                    A
        .byte   $1B                             ; F538 1B                       .
        .byte   "Q"                             ; F539 51                       Q
        .byte   $00                             ; F53A 00                       .
; ----------------------------------------------------------------------------
        jsr     LB5DC                           ; F53B 20 DC B5                  ..
        inc     $0AAB                           ; F53E EE AB 0A                 ...
        lda     $0AAB                           ; F541 AD AB 0A                 ...
        jsr     LB952                           ; F544 20 52 B9                  R.
        lda     #$41                            ; F547 A9 41                    .A
        sta     FROM_C67B                       ; F549 8D 4A 03                 .J.
        lda     #$20                            ; F54C A9 20                    .
        sta     $034B                           ; F54E 8D 4B 03                 .K.
        sta     $0351                           ; F551 8D 51 03                 .Q.
        lda     $68                             ; F554 A5 68                    .h
        jsr     LB8D2                           ; F556 20 D2 B8                  ..
        stx     $034C                           ; F559 8E 4C 03                 .L.
        lda     $67                             ; F55C A5 67                    .g
        jsr     LB8D2                           ; F55E 20 D2 B8                  ..
        sta     L034D                           ; F561 8D 4D 03                 .M.
        stx     $034E                           ; F564 8E 4E 03                 .N.
        lda     $66                             ; F567 A5 66                    .f
        jsr     LB8D2                           ; F569 20 D2 B8                  ..
        sta     $034F                           ; F56C 8D 4F 03                 .O.
        stx     $0350                           ; F56F 8E 50 03                 .P.
        lda     #$08                            ; F572 A9 08                    ..
        sta     $D0                             ; F574 85 D0                    ..
        jmp     LB08B                           ; F576 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF579:  jmp     LB0BC                           ; F579 4C BC B0                 L..
; ----------------------------------------------------------------------------
        jsr     LB57F                           ; F57C 20 7F B5                  ..
        stx     $0AAF                           ; F57F 8E AF 0A                 ...
        ldx     $9F                             ; F582 A6 9F                    ..
        cmp     $0AA0,x                         ; F584 DD A0 0A                 ...
        beq     LF593                           ; F587 F0 0A                    ..
        pla                                     ; F589 68                       h
        pla                                     ; F58A 68                       h
        inc     $0AB1                           ; F58B EE B1 0A                 ...
        beq     LF579                           ; F58E F0 E9                    ..
        jmp     LB496                           ; F590 4C 96 B4                 L..
; ----------------------------------------------------------------------------
LF593:  inc     $9F                             ; F593 E6 9F                    ..
        ldx     $0AAF                           ; F595 AE AF 0A                 ...
        rts                                     ; F598 60                       `
; ----------------------------------------------------------------------------
        bcs     LF5A3                           ; F599 B0 08                    ..
        jsr     LB901                           ; F59B 20 01 B9                  ..
        jsr     LB7A7                           ; F59E 20 A7 B7                  ..
        bcc     LF5A9                           ; F5A1 90 06                    ..
LF5A3:  lda     #$14                            ; F5A3 A9 14                    ..
        sta     $60                             ; F5A5 85 60                    .`
        bne     LF5AE                           ; F5A7 D0 05                    ..
LF5A9:  jsr     LB90E                           ; F5A9 20 0E B9                  ..
        bcc     LF5D1                           ; F5AC 90 23                    .#
LF5AE:  jsr     LFF7D                           ; F5AE 20 7D FF                  }.
        .byte   $0D,$1B                         ; F5B1 0D 1B                    ..
        .byte   "Q"                             ; F5B3 51                       Q
        .byte   $00                             ; F5B4 00                       .
; ----------------------------------------------------------------------------
        jsr     LFFE1                           ; F5B5 20 E1 FF                  ..
        beq     LF5CE                           ; F5B8 F0 14                    ..
        jsr     LB5D4                           ; F5BA 20 D4 B5                  ..
        inc     $0AAB                           ; F5BD EE AB 0A                 ...
        lda     $0AAB                           ; F5C0 AD AB 0A                 ...
        jsr     LB952                           ; F5C3 20 52 B9                  R.
        lda     $0AAB                           ; F5C6 AD AB 0A                 ...
        jsr     LB924                           ; F5C9 20 24 B9                  $.
        bcs     LF5AE                           ; F5CC B0 E0                    ..
LF5CE:  jmp     LB08B                           ; F5CE 4C 8B B0                 L..
; ----------------------------------------------------------------------------
LF5D1:  jmp     LB0BC                           ; F5D1 4C BC B0                 L..
; ----------------------------------------------------------------------------
        lda     #$2E                            ; F5D4 A9 2E                    ..
        jsr     LFFD2                           ; F5D6 20 D2 FF                  ..
        jsr     LB8A8                           ; F5D9 20 A8 B8                  ..
        .byte   $20                             ; F5DC 20
SAVE__: sta     ($B8)                           ; F5DD 92 B8                    ..
        jsr     LB8A8                           ; F5DF 20 A8 B8                  ..
        ldy     #$00                            ; F5E2 A0 00                    ..
        jsr     LB11A                           ; F5E4 20 1A B1                  ..
        jsr     LB659                           ; F5E7 20 59 B6                  Y.
        pha                                     ; F5EA 48                       H
        ldx     $0AAB                           ; F5EB AE AB 0A                 ...
        inx                                     ; F5EE E8                       .
LF5EF:  dex                                     ; F5EF CA                       .
        bpl     LF5FC                           ; F5F0 10 0A                    ..
        jsr     LFF7D                           ; F5F2 20 7D FF                  }.
        .byte   "   "                           ; F5F5 20 20 20
        .byte   $00                             ; F5F8 00                       .
; ----------------------------------------------------------------------------
        jmp     LB602                           ; F5F9 4C 02 B6                 L..
; ----------------------------------------------------------------------------
LF5FC:  jsr     LB11A                           ; F5FC 20 1A B1                  ..
        jsr     LB8A5                           ; F5FF 20 A5 B8                  ..
        iny                                     ; F602 C8                       .
        cpy     #$03                            ; F603 C0 03                    ..
        bcc     LF5EF                           ; F605 90 E8                    ..
        pla                                     ; F607 68                       h
        ldx     #$03                            ; F608 A2 03                    ..
        jsr     LB6A1                           ; F60A 20 A1 B6                  ..
        ldx     #$06                            ; F60D A2 06                    ..
LF60F:  cpx     #$03                            ; F60F E0 03                    ..
        bne     LF62A                           ; F611 D0 17                    ..
        ldy     $0AAB                           ; F613 AC AB 0A                 ...
        beq     LF62A                           ; F616 F0 12                    ..
LF618:  lda     $0AAA                           ; F618 AD AA 0A                 ...
        cmp     #$E8                            ; F61B C9 E8                    ..
        php                                     ; F61D 08                       .
        jsr     LB11A                           ; F61E 20 1A B1                  ..
        plp                                     ; F621 28                       (
        bcs     LF641                           ; F622 B0 1D                    ..
        jsr     LB8C2                           ; F624 20 C2 B8                  ..
        dey                                     ; F627 88                       .
        bne     LF618                           ; F628 D0 EE                    ..
LF62A:  asl     $0AAA                           ; F62A 0E AA 0A                 ...
        bcc     LF63D                           ; F62D 90 0E                    ..
        lda     LB714,x                         ; F62F BD 14 B7                 ...
        jsr     LFFD2                           ; F632 20 D2 FF                  ..
        lda     LB71A,x                         ; F635 BD 1A B7                 ...
        beq     LF63D                           ; F638 F0 03                    ..
        jsr     LFFD2                           ; F63A 20 D2 FF                  ..
LF63D:  dex                                     ; F63D CA                       .
        bne     LF60F                           ; F63E D0 CF                    ..
        rts                                     ; F640 60                       `
; ----------------------------------------------------------------------------
LF641:  jsr     LB64D                           ; F641 20 4D B6                  M.
        clc                                     ; F644 18                       .
        adc     #$01                            ; F645 69 01                    i.
        bne     LF64A                           ; F647 D0 01                    ..
        inx                                     ; F649 E8                       .
LF64A:  jmp     LB89F                           ; F64A 4C 9F B8                 L..
; ----------------------------------------------------------------------------
        ldx     $67                             ; F64D A6 67                    .g
        tay                                     ; F64F A8                       .
        bpl     LF653                           ; F650 10 01                    ..
        dex                                     ; F652 CA                       .
LF653:  adc     $66                             ; F653 65 66                    ef
        bcc     LF658                           ; F655 90 01                    ..
        inx                                     ; F657 E8                       .
LF658:  rts                                     ; F658 60                       `
; ----------------------------------------------------------------------------
        tay                                     ; F659 A8                       .
        lsr     a                               ; F65A 4A                       J
        bcc     LF668                           ; F65B 90 0B                    ..
        lsr     a                               ; F65D 4A                       J
        bcs     LF677                           ; F65E B0 17                    ..
        cmp     #$22                            ; F660 C9 22                    ."
        beq     LF677                           ; F662 F0 13                    ..
        and     #$07                            ; F664 29 07                    ).
        ora     #$80                            ; F666 09 80                    ..
LF668:  lsr     a                               ; F668 4A                       J
        tax                                     ; F669 AA                       .
        lda     LB6C3,x                         ; F66A BD C3 B6                 ...
        bcs     LF673                           ; F66D B0 04                    ..
        lsr     a                               ; F66F 4A                       J
        lsr     a                               ; F670 4A                       J
        lsr     a                               ; F671 4A                       J
        lsr     a                               ; F672 4A                       J
LF673:  and     #$0F                            ; F673 29 0F                    ).
LF675:  bne     LF67B                           ; F675 D0 04                    ..
LF677:  ldy     #$80                            ; F677 A0 80                    ..
        lda     #$00                            ; F679 A9 00                    ..
LF67B:  tax                                     ; F67B AA                       .
        .byte   $BD                             ; F67C BD                       .
LF67D:  rmb0    $B7                             ; F67D 07 B7                    ..
        sta     $0AAA                           ; F67F 8D AA 0A                 ...
        and     #$03                            ; F682 29 03                    ).
        sta     $0AAB                           ; F684 8D AB 0A                 ...
        tya                                     ; F687 98                       .
        and     #$8F                            ; F688 29 8F                    ).
        tax                                     ; F68A AA                       .
        tya                                     ; F68B 98                       .
        ldy     #$03                            ; F68C A0 03                    ..
        cpx     #$8A                            ; F68E E0 8A                    ..
        beq     LF69D                           ; F690 F0 0B                    ..
LF692:  lsr     a                               ; F692 4A                       J
        bcc     LF69D                           ; F693 90 08                    ..
        lsr     a                               ; F695 4A                       J
LF696:  lsr     a                               ; F696 4A                       J
        ora     #$20                            ; F697 09 20                    .
        dey                                     ; F699 88                       .
        bne     LF696                           ; F69A D0 FA                    ..
        iny                                     ; F69C C8                       .
LF69D:  dey                                     ; F69D 88                       .
        bne     LF692                           ; F69E D0 F2                    ..
        rts                                     ; F6A0 60                       `
; ----------------------------------------------------------------------------
        tay                                     ; F6A1 A8                       .
        lda     LB721,y                         ; F6A2 B9 21 B7                 .!.
        sta     $63                             ; F6A5 85 63                    .c
        lda     LB761,y                         ; F6A7 B9 61 B7                 .a.
        sta     $64                             ; F6AA 85 64                    .d
LF6AC:  lda     #$00                            ; F6AC A9 00                    ..
        ldy     #$05                            ; F6AE A0 05                    ..
LF6B0:  asl     $64                             ; F6B0 06 64                    .d
        rol     $63                             ; F6B2 26 63                    &c
        rol     a                               ; F6B4 2A                       *
        dey                                     ; F6B5 88                       .
        bne     LF6B0                           ; F6B6 D0 F8                    ..
        adc     #$3F                            ; F6B8 69 3F                    i?
        jsr     LFFD2                           ; F6BA 20 D2 FF                  ..
        dex                                     ; F6BD CA                       .
        bne     LF6AC                           ; F6BE D0 EC                    ..
        jmp     LB8A8                           ; F6C0 4C A8 B8                 L..
; ----------------------------------------------------------------------------
        rti                                     ; F6C3 40                       @
; ----------------------------------------------------------------------------
        .byte   $02                             ; F6C4 02                       .
        eor     $03                             ; F6C5 45 03                    E.
        bne     LF6D1                           ; F6C7 D0 08                    ..
        rti                                     ; F6C9 40                       @
; ----------------------------------------------------------------------------
        ora     #$30                            ; F6CA 09 30                    .0
        .byte   $22                             ; F6CC 22                       "
        eor     $33                             ; F6CD 45 33                    E3
        bne     LF6D9                           ; F6CF D0 08                    ..
LF6D1:  rti                                     ; F6D1 40                       @
; ----------------------------------------------------------------------------
        ora     #$40                            ; F6D2 09 40                    .@
        .byte   $02                             ; F6D4 02                       .
        eor     $33                             ; F6D5 45 33                    E3
        bne     LF6E1                           ; F6D7 D0 08                    ..
LF6D9:  rti                                     ; F6D9 40                       @
; ----------------------------------------------------------------------------
        ora     #$40                            ; F6DA 09 40                    .@
        .byte   $02                             ; F6DC 02                       .
        eor     $B3                             ; F6DD 45 B3                    E.
        bne     LF6E9                           ; F6DF D0 08                    ..
LF6E1:  rti                                     ; F6E1 40                       @
; ----------------------------------------------------------------------------
        ora     #$00                            ; F6E2 09 00                    ..
        .byte   $22                             ; F6E4 22                       "
        .byte   $44                             ; F6E5 44                       D
        .byte   $33                             ; F6E6 33                       3
        bne     LF675                           ; F6E7 D0 8C                    ..
LF6E9:  .byte   $44                             ; F6E9 44                       D
        brk                                     ; F6EA 00                       .
        ora     ($22),y                         ; F6EB 11 22                    ."
        .byte   $44                             ; F6ED 44                       D
        .byte   $33                             ; F6EE 33                       3
        bne     LF67D                           ; F6EF D0 8C                    ..
        .byte   $44                             ; F6F1 44                       D
        txs                                     ; F6F2 9A                       .
        bpl     LF717                           ; F6F3 10 22                    ."
        .byte   $44                             ; F6F5 44                       D
        .byte   $33                             ; F6F6 33                       3
        bne     LF701                           ; F6F7 D0 08                    ..
        rti                                     ; F6F9 40                       @
; ----------------------------------------------------------------------------
        ora     #$10                            ; F6FA 09 10                    ..
        .byte   $22                             ; F6FC 22                       "
        .byte   $44                             ; F6FD 44                       D
        .byte   $33                             ; F6FE 33                       3
        .byte   $D0                             ; F6FF D0                       .
CharacterSet:
; This is the character set. It contains 6 bytes for each characters, and the
; bitmap is "rotated", ie the on screen the resolution is 6*8, not 8*6.
; Character set area is from $F700 to $F9FF, for 128 characters (codes > 128
; would mean inverse text probably?). The area from the point of view of the
; CPU also contains the VIA registers, it seems.
        .byte   $00                             ; F700 00                       .
LF701:  .byte   $3E,$41,$5D,$51,$5E,$00,$7E,$09 ; F701 3E 41 5D 51 5E 00 7E 09  >A]Q^.~.
        .byte   $09,$09,$7E,$00,$7F,$49,$49,$49 ; F709 09 09 7E 00 7F 49 49 49  ..~..III
        .byte   $36,$00,$3E,$41,$41,$41         ; F711 36 00 3E 41 41 41        6.>AAA
LF717:  .byte   $22,$00,$7F,$41,$41,$41,$3E,$00 ; F717 22 00 7F 41 41 41 3E 00  "..AAA>.
        .byte   $7F,$49,$49,$41,$41,$00,$7F,$09 ; F71F 7F 49 49 41 41 00 7F 09  .IIAA...
        .byte   $09,$01,$01,$00,$3E,$41,$41,$49 ; F727 09 01 01 00 3E 41 41 49  ....>AAI
        .byte   $3A,$00,$7F,$08,$08,$08,$7F,$00 ; F72F 3A 00 7F 08 08 08 7F 00  :.......
        .byte   $00,$41,$7F,$41,$00,$00,$20,$40 ; F737 00 41 7F 41 00 00 20 40  .A.A.. @
        .byte   $41,$3F,$01,$00,$7F,$08,$14,$22 ; F73F 41 3F 01 00 7F 08 14 22  A?....."
        .byte   $41,$00,$7F,$40,$40,$40,$40,$00 ; F747 41 00 7F 40 40 40 40 00  A..@@@@.
        .byte   $7F,$02,$04,$02,$7F,$00,$7F,$04 ; F74F 7F 02 04 02 7F 00 7F 04  ........
        .byte   $08,$10,$7F,$00,$3E,$41,$41,$41 ; F757 08 10 7F 00 3E 41 41 41  ....>AAA
        .byte   $3E,$00,$7F,$09,$09,$09,$06,$00 ; F75F 3E 00 7F 09 09 09 06 00  >.......
        .byte   $3E,$41,$51,$61,$7E,$00,$7F,$09 ; F767 3E 41 51 61 7E 00 7F 09  >AQa~...
        .byte   $09,$09,$76,$00,$26,$49,$49,$49 ; F76F 09 09 76 00 26 49 49 49  ..v.&III
        .byte   $32,$00,$01,$01,$7F,$01,$01,$00 ; F777 32 00 01 01 7F 01 01 00  2.......
        .byte   $3F,$40,$40,$40,$3F,$00,$0F,$30 ; F77F 3F 40 40 40 3F 00 0F 30  ?@@@?..0
        .byte   $40,$30,$0F,$00,$7F,$20,$10,$20 ; F787 40 30 0F 00 7F 20 10 20  @0... .
        .byte   $7F,$00,$63,$14,$08,$14,$63,$00 ; F78F 7F 00 63 14 08 14 63 00  ..c...c.
        .byte   $03,$04,$78,$04,$03,$00,$61,$51 ; F797 03 04 78 04 03 00 61 51  ..x...aQ
        .byte   $49,$45,$43,$00,$00,$7F,$41,$41 ; F79F 49 45 43 00 00 7F 41 41  IEC...AA
        .byte   $00,$00,$03,$04,$08,$10,$60,$00 ; F7A7 00 00 03 04 08 10 60 00  ......`.
        .byte   $00,$41,$41,$7F,$00,$00,$08,$04 ; F7AF 00 41 41 7F 00 00 08 04  .AA.....
        .byte   $02,$04,$08,$00,$08,$04,$08,$10 ; F7B7 02 04 08 00 08 04 08 10  ........
        .byte   $08,$00,$00,$00,$00,$00,$00,$00 ; F7BF 08 00 00 00 00 00 00 00  ........
        .byte   $00,$00,$5F,$00,$00,$00,$00,$03 ; F7C7 00 00 5F 00 00 00 00 03  .._.....
        .byte   $00,$03,$00,$00,$14,$7F,$14,$7F ; F7CF 00 03 00 00 14 7F 14 7F  ........
        .byte   $14,$00,$26,$49,$7F,$49,$32,$00 ; F7D7 14 00 26 49 7F 49 32 00  ..&I.I2.
        .byte   $63,$13,$08,$64,$63,$00,$3A,$45 ; F7DF 63 13 08 64 63 00 3A 45  c..dc.:E
        .byte   $2D,$12,$68,$00,$00,$04,$02,$01 ; F7E7 2D 12 68 00 00 04 02 01  -.h.....
        .byte   $00,$00,$00,$00,$3E,$41,$00,$00 ; F7EF 00 00 00 00 3E 41 00 00  ....>A..
        .byte   $00,$41,$3E,$00,$00,$00,$2A,$1C ; F7F7 00 41 3E 00 00 00 2A 1C  .A>...*.
        .byte   $08                             ; F7FF 08                       .
VIA1_PORTB:
        .byte   $1C                             ; F800 1C                       .
VIA1_PORTA:
        .byte   $2A                             ; F801 2A                       *
VIA1_DDRB:
        .byte   $00                             ; F802 00                       .
VIA1_DDRA:
        .byte   $08                             ; F803 08                       .
VIA1_T1CL:
        .byte   $08                             ; F804 08                       .
VIA1_T1CH:
        .byte   $3E                             ; F805 3E                       >
VIA1_T1LL:
        .byte   $08                             ; F806 08                       .
VIA1_T1LH:
        .byte   $08                             ; F807 08                       .
VIA1_T2CL:
        .byte   $00                             ; F808 00                       .
VIA1_T2CH:
        .byte   $00                             ; F809 00                       .
VIA1_SR:.byte   $80                             ; F80A 80                       .
VIA1_ACR:
        .byte   $60                             ; F80B 60                       `
VIA1_PCR:
        .byte   $00                             ; F80C 00                       .
VIA1_IFR:
        .byte   $00                             ; F80D 00                       .
VIA1_IER:
        .byte   $00                             ; F80E 00                       .
VIA1_PORTANHS:
        .byte   $08,$08,$08,$08,$08,$00,$00,$00 ; F80F 08 08 08 08 08 00 00 00  ........
        .byte   $60,$60,$00,$00,$60,$10,$08,$04 ; F817 60 60 00 00 60 10 08 04  ``..`...
        .byte   $03,$00,$3E,$61,$5D,$43,$3E,$00 ; F81F 03 00 3E 61 5D 43 3E 00  ..>a]C>.
        .byte   $00,$42,$7F,$40,$00,$00,$62,$51 ; F827 00 42 7F 40 00 00 62 51  .B.@..bQ
        .byte   $49,$49,$46,$00,$22,$41,$49,$49 ; F82F 49 49 46 00 22 41 49 49  IIF."AII
        .byte   $36,$00,$18,$14,$12,$7F,$10,$00 ; F837 36 00 18 14 12 7F 10 00  6.......
        .byte   $27,$49,$49,$49,$31,$00,$3E,$49 ; F83F 27 49 49 49 31 00 3E 49  'III1.>I
        .byte   $49,$49,$32,$00,$03,$01,$71,$09 ; F847 49 49 32 00 03 01 71 09  II2...q.
        .byte   $07,$00,$36,$49,$49,$49,$36,$00 ; F84F 07 00 36 49 49 49 36 00  ..6III6.
        .byte   $26,$49,$49,$49,$3E,$00,$00,$00 ; F857 26 49 49 49 3E 00 00 00  &III>...
        .byte   $24,$00,$00,$00,$00,$80,$44,$00 ; F85F 24 00 00 00 00 80 44 00  $.....D.
        .byte   $00,$00,$08,$14,$22,$41,$00,$00 ; F867 00 00 08 14 22 41 00 00  ...."A..
        .byte   $14,$14,$14,$14,$00,$00,$41,$22 ; F86F 14 14 14 14 00 00 41 22  ......A"
        .byte   $14,$08,$00,$00,$02,$01,$51,$09 ; F877 14 08 00 00 02 01 51 09  ......Q.
        .byte   $06                             ; F87F 06                       .
VIA2_PORTB:
        .byte   $18                             ; F880 18                       .
VIA2_PORTA:
        .byte   $18                             ; F881 18                       .
VIA2_DDRB:
        .byte   $18                             ; F882 18                       .
VIA2_DDRA:
        .byte   $18                             ; F883 18                       .
VIA2_T1CL:
        .byte   $18                             ; F884 18                       .
VIA2_T1CH:
        .byte   $18                             ; F885 18                       .
VIA2_T1LL:
        .byte   $00                             ; F886 00                       .
VIA2_T1LH:
        .byte   $18                             ; F887 18                       .
VIA2_T2CL:
        .byte   $4C                             ; F888 4C                       L
VIA2_T2CH:
        .byte   $7E                             ; F889 7E                       ~
VIA2_SR:.byte   $4C                             ; F88A 4C                       L
VIA2_ACR:
        .byte   $18                             ; F88B 18                       .
VIA2_PCR:
        .byte   $00                             ; F88C 00                       .
VIA2_IFR:
        .byte   $00                             ; F88D 00                       .
VIA2_IER:
        .byte   $FF                             ; F88E FF                       .
VIA2_PORTANHS:
        .byte   $FF,$00,$00,$18,$18,$18,$18,$18 ; F88F FF 00 00 18 18 18 18 18  ........
        .byte   $18,$0C,$0C,$0C,$0C,$0C,$0C,$06 ; F897 18 0C 0C 0C 0C 0C 0C 06  ........
        .byte   $06,$06,$06,$06,$06,$60,$60,$60 ; F89F 06 06 06 06 06 60 60 60  .....```
        .byte   $60,$60,$60,$00,$FF,$FF,$00,$00 ; F8A7 60 60 60 00 FF FF 00 00  ```.....
        .byte   $00,$00,$00,$00,$FF,$FF,$00,$18 ; F8AF 00 00 00 00 FF FF 00 18  ........
        .byte   $38,$F0,$E0,$00,$00,$00,$00,$07 ; F8B7 38 F0 E0 00 00 00 00 07  8.......
        .byte   $0F,$1C,$18,$18,$1C,$0F,$07,$00 ; F8BF 0F 1C 18 18 1C 0F 07 00  ........
        .byte   $00,$FF,$FF,$C0,$C0,$C0,$C0,$01 ; F8C7 00 FF FF C0 C0 C0 C0 01  ........
        .byte   $06,$08,$10,$60,$80,$80,$60,$10 ; F8CF 06 08 10 60 80 80 60 10  ...`..`.
        .byte   $08,$06,$01,$FF,$FF,$03,$03,$03 ; F8D7 08 06 01 FF FF 03 03 03  ........
        .byte   $03,$03,$03,$03,$03,$FF,$FF,$3C ; F8DF 03 03 03 03 03 FF FF 3C  .......<
        .byte   $7E,$7E,$7E,$7E,$3C,$60,$60,$60 ; F8E7 7E 7E 7E 7E 3C 60 60 60  ~~~~<```
        .byte   $60,$60,$60,$00,$0C,$1E,$3C,$1E ; F8EF 60 60 60 00 0C 1E 3C 1E  ```...<.
        .byte   $0C,$00,$FF,$FF,$00,$00,$00,$00 ; F8F7 0C 00 FF FF 00 00 00 00  ........
        .byte   $00,$E0,$F0,$38,$18,$81,$66,$18 ; F8FF 00 E0 F0 38 18 81 66 18  ...8..f.
        .byte   $18,$66,$81,$3C,$66,$42,$42,$66 ; F907 18 66 81 3C 66 42 42 66  .f.<fBBf
        .byte   $3C,$0C,$4C,$73,$73,$4C,$0C,$00 ; F90F 3C 0C 4C 73 73 4C 0C 00  <.LssL..
        .byte   $00,$00,$FF,$FF,$00,$00,$08,$1C ; F917 00 00 FF FF 00 00 08 1C  ........
        .byte   $3E,$1C,$08,$18,$18,$FF,$FF,$18 ; F91F 3E 1C 08 18 18 FF FF 18  >.......
        .byte   $18,$00,$00,$00,$77,$00,$00,$00 ; F927 18 00 00 00 77 00 00 00  ....w...
        .byte   $00,$FF,$FF,$00,$00,$08,$7C,$04 ; F92F 00 FF FF 00 00 08 7C 04  ......|.
        .byte   $04,$7C,$02,$01,$07,$0F,$1F,$7F ; F937 04 7C 02 01 07 0F 1F 7F  .|......
        .byte   $FF,$00,$00,$00,$00             ; F93F FF 00 00 00 00           .....
LF944:  .byte   $00,$00,$FF,$FF,$FF,$00,$00,$00 ; F944 00 00 FF FF FF 00 00 00  ........
        .byte   $F0,$F0,$F0,$F0,$F0,$F0,$01,$01 ; F94C F0 F0 F0 F0 F0 F0 01 01  ........
        .byte   $01,$01,$01,$01,$80,$80,$80,$80 ; F954 01 01 01 01 80 80 80 80  ........
        .byte   $80,$80,$FF,$00,$00,$00,$00,$00 ; F95C 80 80 FF 00 00 00 00 00  ........
        .byte   $00,$08,$08,$36,$41,$41,$00,$00 ; F964 00 08 08 36 41 41 00 00  ...6AA..
        .byte   $00,$00,$00,$FF,$00,$41,$41,$36 ; F96C 00 00 00 FF 00 41 41 36  .....AA6
        .byte   $08,$08,$FF,$7F,$1F,$0F,$07,$01 ; F974 08 08 FF 7F 1F 0F 07 01  ........
        .byte   $00,$00,$00,$00                 ; F97C 00 00 00 00              ....
ACIA_DATA:
        .byte   $FF                             ; F980 FF                       .
ACIA_ST:.byte   $FF                             ; F981 FF                       .
ACIA_CMD:
        .byte   $00                             ; F982 00                       .
ACIA_CTRL:
        .byte   $00,$FF,$FF,$18,$18,$00,$00,$00 ; F983 00 FF FF 18 18 00 00 00  ........
        .byte   $F0,$F0,$F0,$00,$00,$1F,$1F,$18 ; F98B F0 F0 F0 00 00 1F 1F 18  ........
        .byte   $18,$18,$18,$F8,$F8,$00,$00,$C0 ; F993 18 18 18 F8 F8 00 00 C0  ........
        .byte   $C0,$C0,$C0,$C0,$C0,$00,$00,$F8 ; F99B C0 C0 C0 C0 C0 00 00 F8  ........
        .byte   $F8,$18,$18,$18,$18,$1F,$1F,$18 ; F9A3 F8 18 18 18 18 1F 1F 18  ........
        .byte   $18,$18,$18,$F8,$F8,$18,$18,$18 ; F9AB 18 18 18 F8 F8 18 18 18  ........
        .byte   $18,$FF,$FF,$00,$00,$FF,$FF,$00 ; F9B3 18 FF FF 00 00 FF FF 00  ........
        .byte   $00,$00,$00,$FF,$FF,$FF,$00,$00 ; F9BB 00 00 00 FF FF FF 00 00  ........
        .byte   $00,$00,$00,$00,$FF,$FF,$FF,$03 ; F9C3 00 00 00 00 FF FF FF 03  ........
        .byte   $03,$03,$03,$03,$03,$07,$07,$07 ; F9CB 03 03 03 03 03 07 07 07  ........
        .byte   $07,$07,$07,$E0,$E0,$E0,$E0,$E0 ; F9D3 07 07 07 E0 E0 E0 E0 E0  ........
        .byte   $E0,$C0,$C0,$C0,$C0,$FF,$FF,$F0 ; F9DB E0 C0 C0 C0 C0 FF FF F0  ........
        .byte   $F0,$F0,$00,$00,$00,$00,$00,$00 ; F9E3 F0 F0 00 00 00 00 00 00  ........
        .byte   $0F,$0F,$0F,$18,$18,$1F,$1F,$00 ; F9EB 0F 0F 0F 18 18 1F 1F 00  ........
        .byte   $00,$0F,$0F,$0F,$00,$00,$00,$0F ; F9F3 00 0F 0F 0F 00 00 00 0F  ........
        .byte   $0F,$0F,$F0,$F0,$F0             ; F9FB 0F 0F F0 F0 F0           .....
; ----------------------------------------------------------------------------
MMU_MODE_KERN:
        sei                                     ; FA00 78                       x
        sta     MMU_MODE_KERN                   ; FA01 8D 00 FA                 ...
        jmp     L87C5                           ; FA04 4C C5 87                 L..
; ----------------------------------------------------------------------------
; The actual RESET routine, pointed by the RESET hardware vector. Notice the
; usage $FA00, seems to be a dummy write (no actual LDA before it, etc).
; Maybe it's just for enabling the lower part of the KERNAL to be mapped, so
; we can jump there, or something like that.
RESET:  sei                                     ; FA07 78                       x
        sta     MMU_MODE_KERN                   ; FA08 8D 00 FA                 ...
        jmp     KL_RESET                        ; FA0B 4C 34 85                 L4.
; ----------------------------------------------------------------------------
; The IRQ routine, pointed by the IRQ hardware vector. Note about the usage
; of $FC00 and $FA80 locations, seems to be dummy write, as with the RESET
; routine, but different addresses ...
IRQ:    pha                                     ; FA0E 48                       H
        phx                                     ; FA0F DA                       .
        phy                                     ; FA10 5A                       Z
        sta     MMU_MODE_SAVE                   ; FA11 8D 00 FC                 ...
        sta     MMU_MODE_APPL                   ; FA14 8D 80 FA                 ...
        tsx                                     ; FA17 BA                       .
        lda     stack+4,x                       ; FA18 BD 04 01                 ...
        and     #$10                            ; FA1B 29 10                    ).
        bne     LFA28                           ; FA1D D0 09                    ..
        lda     #$FA                            ; FA1F A9 FA                    ..
        pha                                     ; FA21 48                       H
        lda     #$5F                            ; FA22 A9 5F                    ._
        pha                                     ; FA24 48                       H
        jmp     (RAMVEC_IRQ)                    ; FA25 6C 14 03                 l..
; ----------------------------------------------------------------------------
LFA28:  jmp     (RAMVEC_BRK)                    ; FA28 6C 16 03                 l..
; ----------------------------------------------------------------------------
DEFVEC_BRK:
        sta     MMU_MODE_KERN                   ; FA2B 8D 00 FA                 ...
        jmp     LC70C                           ; FA2E 4C 0C C7                 L..
; ----------------------------------------------------------------------------
DEFVEC_IRQ:
; Default IRQ handler, where IRQ RAM vector ($314) points to by default.
        sta     MMU_MODE_KERN                   ; FA31 8D 00 FA                 ...
        lda     ACIA_ST                         ; FA34 AD 81 F9                 ...
        bpl     LFA3C                           ; FA37 10 03                    ..
        jsr     LBE7B                           ; FA39 20 7B BE                  {.
LFA3C:  bit     VIA1_IFR                        ; FA3C 2C 0D F8                 ,..
        bpl     LFA43                           ; FA3F 10 02                    ..
        bvs     LFA44                           ; FA41 70 01                    p.
LFA43:  rts                                     ; FA43 60                       `
; ----------------------------------------------------------------------------
LFA44:  lda     VIA1_T1CL                       ; FA44 AD 04 F8                 ...
        lda     VIA1_T1LL                       ; FA47 AD 06 F8                 ...
        jsr     KL_SCNKEY                       ; FA4A 20 08 B5                  ..
        jsr     LB2EF                           ; FA4D 20 EF B2                  ..
        jsr     UDTIM__                         ; FA50 20 4F BF                  O.
        jsr     LC618                           ; FA53 20 18 C6                  ..
        sta     MMU_MODE_APPL                   ; FA56 8D 80 FA                 ...
        jmp     (RAMVEC_NMI)                    ; FA59 6C 18 03                 l..
; ----------------------------------------------------------------------------
DEFVEC_NMI:
        sta     MMU_MODE_KERN                   ; FA5C 8D 00 FA                 ...
        rts                                     ; FA5F 60                       `
; ----------------------------------------------------------------------------
        ply                                     ; FA60 7A                       z
        plx                                     ; FA61 FA                       .
        pla                                     ; FA62 68                       h
        sta     MMU_MODE_RECALL                 ; FA63 8D 80 FB                 ...
NMI:    rti                                     ; FA66 40                       @
; ----------------------------------------------------------------------------
LFA67:  jsr     LFA6D                           ; FA67 20 6D FA                  m.
        jmp     LFD66                           ; FA6A 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
LFA6D:  phy                                     ; FA6D 5A                       Z
        pha                                     ; FA6E 48                       H
        jmp     LFD7A                           ; FA6F 4C 7A FD                 Lz.
; ----------------------------------------------------------------------------
LFA72:  sta     MMU_MODE_APPL                   ; FA72 8D 80 FA                 ...
        jmp     L035F                           ; FA75 4C 5F 03                 L_.
; ----------------------------------------------------------------------------
LFA78:  jsr     LFA7E                           ; FA78 20 7E FA                  ~.
LFA7B:  jmp     LFD66                           ; FA7B 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
LFA7E:
MMU_MODE_APPL   := * + 2
; An interesting example for addresses like $FA80 are write only registers,
; but on read, normal ROM content is read as opcodes, as $FA80 here is inside
; and opcode itself.
        sta     MMU_MODE_APPL                   ; FA7E 8D 80 FA                 ...
        jmp     (L0334)                         ; FA81 6C 34 03                 l4.
; ----------------------------------------------------------------------------
LFA84:  jsr     LFA8A                           ; FA84 20 8A FA                  ..
LFA87:  jmp     LFD66                           ; FA87 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
LFA8A:  sta     MMU_MODE_APPL                   ; FA8A 8D 80 FA                 ...
; Contains $FA87 by default.
        jmp     (L0336)                         ; FA8D 6C 36 03                 l6.
; ----------------------------------------------------------------------------
; Default values of "RAM vectors" copied to $314 into the RAM. The "missing"
; vector in the gap seems to be "monitor" entry (according to C128's ROM) but
; points to RTS in CLCD. The the last two vectors are unknown, not exists on
; C128.
        .addr   DEFVEC_IRQ                      ; FA90 31 FA                    1.
        .addr   DEFVEC_BRK                      ; FA92 2B FA                    +.
        .addr   DEFVEC_NMI                      ; FA94 5C FA                    \.
        .addr   DEFVEC_OPEN                     ; FA96 E7 FC                    ..
        .addr   DEFVEC_CLOSE                    ; FA98 FA FC                    ..
        .addr   DEFVEC_CHKIN                    ; FA9A 0D FD                    ..
        .addr   DEFVEC_CHKOUT                   ; FA9C 20 FD                     .
        .addr   DEFVEC_CLRCHN                   ; FA9E 33 FD                    3.
        .addr   DEFVEC_CHRIN                    ; FAA0 46 FD                    F.
        .addr   DEFVEC_CHROUT                   ; FAA2 59 FD                    Y.
        .addr   DEFVEC_STOP                     ; FAA4 C2 FD                    ..
        .addr   DEFVEC_GETIN                    ; FAA6 D5 FD                    ..
        .addr   DEFVEC_CLALL                    ; FAA8 E8 FD                    ..
        .addr   LFAB4                           ; FAAA B4 FA                    ..
        .addr   DEFVEC_LOAD                     ; FAAC 74 FD                    t.
        .addr   DEFVEC_SAVE                     ; FAAE 9B FD                    ..
        .addr   LFA7B                           ; FAB0 7B FA                    {.
        .addr   LFA87                           ; FAB2 87 FA                    ..
; ----------------------------------------------------------------------------
LFAB4:  rts                                     ; FAB4 60                       `
; ----------------------------------------------------------------------------
LFAB5:  sta     MMU_MODE_KERN                   ; FAB5 8D 00 FA                 ...
        jsr     LD437                           ; FAB8 20 37 D4                  7.
        sta     MMU_MODE_APPL                   ; FABB 8D 80 FA                 ...
        rts                                     ; FABE 60                       `
; ----------------------------------------------------------------------------
LFABF:  sta     MMU_MODE_KERN                   ; FABF 8D 00 FA                 ...
        jsr     LC009                           ; FAC2 20 09 C0                  ..
        sta     MMU_MODE_APPL                   ; FAC5 8D 80 FA                 ...
        rts                                     ; FAC8 60                       `
; ----------------------------------------------------------------------------
LFAC9:  sta     MMU_MODE_KERN                   ; FAC9 8D 00 FA                 ...
        jsr     LB6DF                           ; FACC 20 DF B6                  ..
        sta     MMU_MODE_APPL                   ; FACF 8D 80 FA                 ...
        rts                                     ; FAD2 60                       `
; ----------------------------------------------------------------------------
LFAD3:  sta     MMU_MODE_KERN                   ; FAD3 8D 00 FA                 ...
        jsr     L821D                           ; FAD6 20 1D 82                  ..
        sta     MMU_MODE_APPL                   ; FAD9 8D 80 FA                 ...
        rts                                     ; FADC 60                       `
; ----------------------------------------------------------------------------
LFADD:  sta     MMU_MODE_KERN                   ; FADD 8D 00 FA                 ...
        jsr     L8426                           ; FAE0 20 26 84                  &.
        sta     MMU_MODE_APPL                   ; FAE3 8D 80 FA                 ...
        rts                                     ; FAE6 60                       `
; ----------------------------------------------------------------------------
LFAE7:  sta     MMU_MODE_KERN                   ; FAE7 8D 00 FA                 ...
        jsr     L80E0                           ; FAEA 20 E0 80                  ..
        sta     MMU_MODE_APPL                   ; FAED 8D 80 FA                 ...
        rts                                     ; FAF0 60                       `
; ----------------------------------------------------------------------------
LFAF1:  sta     MMU_MODE_KERN                   ; FAF1 8D 00 FA                 ...
        jsr     LAA53                           ; FAF4 20 53 AA                  S.
        sta     MMU_MODE_APPL                   ; FAF7 8D 80 FA                 ...
        rts                                     ; FAFA 60                       `
; ----------------------------------------------------------------------------
LFAFB:  sta     MMU_MODE_KERN                   ; FAFB 8D 00 FA                 ...
MMU_MODE_RAM    := * + 2
        jsr     LA9E6                           ; FAFE 20 E6 A9                  ..
        sta     MMU_MODE_APPL                   ; FB01 8D 80 FA                 ...
        rts                                     ; FB04 60                       `
; ----------------------------------------------------------------------------
LFB05:  sta     MMU_MODE_KERN                   ; FB05 8D 00 FA                 ...
        jsr     L84FB                           ; FB08 20 FB 84                  ..
        sta     MMU_MODE_APPL                   ; FB0B 8D 80 FA                 ...
        rts                                     ; FB0E 60                       `
; ----------------------------------------------------------------------------
LFB0F:  sta     MMU_MODE_KERN                   ; FB0F 8D 00 FA                 ...
        jsr     LBFF2                           ; FB12 20 F2 BF                  ..
        sta     MMU_MODE_APPL                   ; FB15 8D 80 FA                 ...
        rts                                     ; FB18 60                       `
; ----------------------------------------------------------------------------
LFB19:  sta     MMU_MODE_KERN                   ; FB19 8D 00 FA                 ...
        jsr     LB09B                           ; FB1C 20 9B B0                  ..
        sta     MMU_MODE_APPL                   ; FB1F 8D 80 FA                 ...
        rts                                     ; FB22 60                       `
; ----------------------------------------------------------------------------
LFB23:  sta     MMU_MODE_KERN                   ; FB23 8D 00 FA                 ...
        jsr     L80C6                           ; FB26 20 C6 80                  ..
        sta     MMU_MODE_APPL                   ; FB29 8D 80 FA                 ...
        rts                                     ; FB2C 60                       `
; ----------------------------------------------------------------------------
LFB2D:  sta     MMU_MODE_KERN                   ; FB2D 8D 00 FA                 ...
        jsr     L81FB                           ; FB30 20 FB 81                  ..
        sta     MMU_MODE_APPL                   ; FB33 8D 80 FA                 ...
        rts                                     ; FB36 60                       `
; ----------------------------------------------------------------------------
LFB37:  sta     MMU_MODE_KERN                   ; FB37 8D 00 FA                 ...
        jsr     L8459                           ; FB3A 20 59 84                  Y.
        sta     MMU_MODE_APPL                   ; FB3D 8D 80 FA                 ...
        rts                                     ; FB40 60                       `
; ----------------------------------------------------------------------------
LFB41:  sta     MMU_MODE_KERN                   ; FB41 8D 00 FA                 ...
        jsr     L9B1B                           ; FB44 20 1B 9B                  ..
        sta     MMU_MODE_APPL                   ; FB47 8D 80 FA                 ...
        rts                                     ; FB4A 60                       `
; ----------------------------------------------------------------------------
LFB4B:  sta     MMU_MODE_APPL                   ; FB4B 8D 80 FA                 ...
        jmp     (L0300)                         ; FB4E 6C 00 03                 l..
; ----------------------------------------------------------------------------
ShowInLineText00:
; This stuff prints (zero terminated) string after the JSR to the screen (by
; using the return address from the stack). The multiple entry points seems
; to be about the fact that "kernal messages control byte" should be checked
; or not, and such ...
        pha                                     ; FB51 48                       H
        lda     #$00                            ; FB52 A9 00                    ..
        bra     LFB5E                           ; FB54 80 08                    ..
ShowInLineText80:
        pha                                     ; FB56 48                       H
        lda     #$80                            ; FB57 A9 80                    ..
        bra     LFB5E                           ; FB59 80 03                    ..
ShowInLineText:
        pha                                     ; FB5B 48                       H
        lda     #$01                            ; FB5C A9 01                    ..
LFB5E:  phx                                     ; FB5E DA                       .
        pha                                     ; FB5F 48                       H
        bra     LFB77                           ; FB60 80 15                    ..
LFB62:  plx                                     ; FB62 FA                       .
        phx                                     ; FB63 DA                       .
        bpl     LFB6B                           ; FB64 10 05                    ..
        bit     KernMsg                         ; FB66 2C 83 03                 ,..
        bpl     LFB71                           ; FB69 10 06                    ..
LFB6B:  sta     MMU_MODE_KERN                   ; FB6B 8D 00 FA                 ...
        jsr     ShowChar_                       ; FB6E 20 B3 AB                  ..
LFB71:  txa                                     ; FB71 8A                       .
        bne     LFB77                           ; FB72 D0 03                    ..
        sta     MMU_MODE_APPL                   ; FB74 8D 80 FA                 ...
LFB77:  tsx                                     ; FB77 BA                       .
        inc     stack+4,x                       ; FB78 FE 04 01                 ...
        bne     MMU_MODE_RECALL                 ; FB7B D0 03                    ..
        inc     stack+5,x                       ; FB7D FE 05 01                 ...
MMU_MODE_RECALL:
        lda     stack+4,x                       ; FB80 BD 04 01                 ...
        sta     $F1                             ; FB83 85 F1                    ..
        lda     stack+5,x                       ; FB85 BD 05 01                 ...
        sta     $F2                             ; FB88 85 F2                    ..
        lda     ($F1)                           ; FB8A B2 F1                    ..
        bne     LFB62                           ; FB8C D0 D4                    ..
        plx                                     ; FB8E FA                       .
        plx                                     ; FB8F FA                       .
        pla                                     ; FB90 68                       h
        rts                                     ; FB91 60                       `
; ----------------------------------------------------------------------------
; Code from here clearly shows many examples for the need to "dummy write"
; some "MMU registers" - $FA00 - (maybe only a flip-flop) before jumping to
; lower address in the KERNAL ROM.  Usually there is even an operation like
; that after the call - $FA80. My guess: the top of the kernal is always (?)
; mapped into the CPU address space, but lower addresses are not; so you need
; to "page in" first. However I don't know _exactly_ what happens with
; $FA00/$FA80 (set/reset a flip-flop, but what memory region is affected then
; exactly).
LFB92:  sta     MMU_MODE_KERN                   ; FB92 8D 00 FA                 ...
        jsr     LB758                           ; FB95 20 58 B7                  X.
        sta     MMU_MODE_APPL                   ; FB98 8D 80 FA                 ...
        rts                                     ; FB9B 60                       `
; ----------------------------------------------------------------------------
LFB9C:  sta     MMU_MODE_KERN                   ; FB9C 8D 00 FA                 ...
        jsr     LD230                           ; FB9F 20 30 D2                  0.
        sta     MMU_MODE_APPL                   ; FBA2 8D 80 FA                 ...
        rts                                     ; FBA5 60                       `
; ----------------------------------------------------------------------------
LFBA6:  sta     MMU_MODE_KERN                   ; FBA6 8D 00 FA                 ...
        jsr     LB293                           ; FBA9 20 93 B2                  ..
        sta     MMU_MODE_APPL                   ; FBAC 8D 80 FA                 ...
        rts                                     ; FBAF 60                       `
; ----------------------------------------------------------------------------
WaitXticks:
        sta     MMU_MODE_KERN                   ; FBB0 8D 00 FA                 ...
        jsr     WaitXticks_                     ; FBB3 20 E4 BF                  ..
        sta     MMU_MODE_APPL                   ; FBB6 8D 80 FA                 ...
        rts                                     ; FBB9 60                       `
; ----------------------------------------------------------------------------
LFBBA:  sta     MMU_MODE_KERN                   ; FBBA 8D 00 FA                 ...
        jsr     LC60B                           ; FBBD 20 0B C6                  ..
        sta     MMU_MODE_APPL                   ; FBC0 8D 80 FA                 ...
        rts                                     ; FBC3 60                       `
; ----------------------------------------------------------------------------
LFBC4:  sta     MMU_MODE_KERN                   ; FBC4 8D 00 FA                 ...
        pha                                     ; FBC7 48                       H
        bcs     LFBCF                           ; FBC8 B0 05                    ..
        jsr     LB2E4                           ; FBCA 20 E4 B2                  ..
        bra     LFBD2                           ; FBCD 80 03                    ..
LFBCF:  jsr     LB2D6                           ; FBCF 20 D6 B2                  ..
LFBD2:  pla                                     ; FBD2 68                       h
        jmp     LFD7A                           ; FBD3 4C 7A FD                 Lz.
; ----------------------------------------------------------------------------
LFBD6:  sta     MMU_MODE_KERN                   ; FBD6 8D 00 FA                 ...
        jsr     LB6F9                           ; FBD9 20 F9 B6                  ..
        sta     MMU_MODE_APPL                   ; FBDC 8D 80 FA                 ...
        rts                                     ; FBDF 60                       `
; ----------------------------------------------------------------------------
ShowChar:
        sta     MMU_MODE_KERN                   ; FBE0 8D 00 FA                 ...
        jsr     ShowChar_                       ; FBE3 20 B3 AB                  ..
        sta     MMU_MODE_APPL                   ; FBE6 8D 80 FA                 ...
        rts                                     ; FBE9 60                       `
; ----------------------------------------------------------------------------
LFBEA:  sta     MMU_MODE_KERN                   ; FBEA 8D 00 FA                 ...
        jsr     LCDsetupGetOrSet                ; FBED 20 28 B2                  (.
        sta     MMU_MODE_APPL                   ; FBF0 8D 80 FA                 ...
        rts                                     ; FBF3 60                       `
; ----------------------------------------------------------------------------
LFBF4:  sta     MMU_MODE_KERN                   ; FBF4 8D 00 FA                 ...
        jsr     LB684                           ; FBF7 20 84 B6                  ..
        sta     MMU_MODE_APPL                   ; FBFA 8D 80 FA                 ...
        rts                                     ; FBFD 60                       `
; ----------------------------------------------------------------------------
LFBFE:
MMU_MODE_SAVE   := * + 2
        sta     MMU_MODE_KERN                   ; FBFE 8D 00 FA                 ...
        jsr     LB688                           ; FC01 20 88 B6                  ..
        sta     MMU_MODE_APPL                   ; FC04 8D 80 FA                 ...
        rts                                     ; FC07 60                       `
; ----------------------------------------------------------------------------
LFC08:  sta     MMU_MODE_KERN                   ; FC08 8D 00 FA                 ...
        jsr     LB4FB                           ; FC0B 20 FB B4                  ..
        sta     MMU_MODE_APPL                   ; FC0E 8D 80 FA                 ...
        rts                                     ; FC11 60                       `
; ----------------------------------------------------------------------------
LFC12:  sta     MMU_MODE_KERN                   ; FC12 8D 00 FA                 ...
        jsr     LB640                           ; FC15 20 40 B6                  @.
        sta     MMU_MODE_APPL                   ; FC18 8D 80 FA                 ...
        rts                                     ; FC1B 60                       `
; ----------------------------------------------------------------------------
KR_SCINIT:
        sta     MMU_MODE_KERN                   ; FC1C 8D 00 FA                 ...
        jsr     KL_SCINIT                       ; FC1F 20 26 FC                  &.
        sta     MMU_MODE_APPL                   ; FC22 8D 80 FA                 ...
        rts                                     ; FC25 60                       `
; ----------------------------------------------------------------------------
KL_SCINIT:
        ldx     #$00                            ; FC26 A2 00                    ..
        jsr     LD230                           ; FC28 20 30 D2                  0.
        jmp     LB1DA                           ; FC2B 4C DA B1                 L..
; ----------------------------------------------------------------------------
KR_IOINIT:
        sta     MMU_MODE_KERN                   ; FC2E 8D 00 FA                 ...
        jsr     KL_IOINIT                       ; FC31 20 47 87                  G.
        sta     MMU_MODE_APPL                   ; FC34 8D 80 FA                 ...
        rts                                     ; FC37 60                       `
; ----------------------------------------------------------------------------
KR_RAMTAS:
        sta     MMU_MODE_KERN                   ; FC38 8D 00 FA                 ...
        jsr     KL_RAMTAS                       ; FC3B 20 A8 86                  ..
        sta     MMU_MODE_APPL                   ; FC3E 8D 80 FA                 ...
        rts                                     ; FC41 60                       `
; ----------------------------------------------------------------------------
KR_RESTOR:
        sta     MMU_MODE_KERN                   ; FC42 8D 00 FA                 ...
        jsr     KL_RESTOR                       ; FC45 20 96 C6                  ..
        sta     MMU_MODE_APPL                   ; FC48 8D 80 FA                 ...
        rts                                     ; FC4B 60                       `
; ----------------------------------------------------------------------------
KR_VECTOR:
        sta     MMU_MODE_KERN                   ; FC4C 8D 00 FA                 ...
        jsr     KL_VECTOR                       ; FC4F 20 9B C6                  ..
        sta     MMU_MODE_APPL                   ; FC52 8D 80 FA                 ...
        rts                                     ; FC55 60                       `
; ----------------------------------------------------------------------------
SetMsg_:sta     KernMsg                         ; FC56 8D 83 03                 ...
        rts                                     ; FC59 60                       `
; ----------------------------------------------------------------------------
LSTNSA_:sta     MMU_MODE_KERN                   ; FC5A 8D 00 FA                 ...
        jsr     LSTNSA__                        ; FC5D 20 46 BD                  F.
        sta     MMU_MODE_APPL                   ; FC60 8D 80 FA                 ...
        rts                                     ; FC63 60                       `
; ----------------------------------------------------------------------------
TALKSA_:sta     MMU_MODE_KERN                   ; FC64 8D 00 FA                 ...
        jsr     TALKSA__                        ; FC67 20 55 BD                  U.
        sta     MMU_MODE_APPL                   ; FC6A 8D 80 FA                 ...
        rts                                     ; FC6D 60                       `
; ----------------------------------------------------------------------------
MEMBOT_:sta     MMU_MODE_KERN                   ; FC6E 8D 00 FA                 ...
        jsr     MEMBOT__                        ; FC71 20 AD D3                  ..
        sta     MMU_MODE_APPL                   ; FC74 8D 80 FA                 ...
        rts                                     ; FC77 60                       `
; ----------------------------------------------------------------------------
MEMTOP_:sta     MMU_MODE_KERN                   ; FC78 8D 00 FA                 ...
        jsr     MEMTOP__                        ; FC7B 20 1A D4                  ..
        .byte   $8D                             ; FC7E 8D                       .
        .byte   $80                             ; FC7F 80                       .
MMU_MODE_TEST:
        plx                                     ; FC80 FA                       .
        rts                                     ; FC81 60                       `
; ----------------------------------------------------------------------------
KR_SCNKEY:
        sta     MMU_MODE_KERN                   ; FC82 8D 00 FA                 ...
        jsr     KL_SCNKEY                       ; FC85 20 08 B5                  ..
        sta     MMU_MODE_APPL                   ; FC88 8D 80 FA                 ...
        rts                                     ; FC8B 60                       `
; ----------------------------------------------------------------------------
IECIN_: sta     MMU_MODE_KERN                   ; FC8C 8D 00 FA                 ...
        jsr     IECIN__                         ; FC8F 20 A5 BD                  ..
        sta     MMU_MODE_APPL                   ; FC92 8D 80 FA                 ...
        rts                                     ; FC95 60                       `
; ----------------------------------------------------------------------------
IECOUT_:sta     MMU_MODE_KERN                   ; FC96 8D 00 FA                 ...
        jsr     IECOUT__                        ; FC99 20 6C BD                  l.
        sta     MMU_MODE_APPL                   ; FC9C 8D 80 FA                 ...
        rts                                     ; FC9F 60                       `
; ----------------------------------------------------------------------------
UNTALK_:sta     MMU_MODE_KERN                   ; FCA0 8D 00 FA                 ...
        jsr     UNTALK__                        ; FCA3 20 81 BD                  ..
        sta     MMU_MODE_APPL                   ; FCA6 8D 80 FA                 ...
        rts                                     ; FCA9 60                       `
; ----------------------------------------------------------------------------
UNLSTN_:sta     MMU_MODE_KERN                   ; FCAA 8D 00 FA                 ...
        jsr     UNLSTN__                        ; FCAD 20 90 BD                  ..
        sta     MMU_MODE_APPL                   ; FCB0 8D 80 FA                 ...
        rts                                     ; FCB3 60                       `
; ----------------------------------------------------------------------------
LISTEN_:sta     MMU_MODE_KERN                   ; FCB4 8D 00 FA                 ...
        jsr     LISTEN__                        ; FCB7 20 94 BC                  ..
        sta     MMU_MODE_APPL                   ; FCBA 8D 80 FA                 ...
        rts                                     ; FCBD 60                       `
; ----------------------------------------------------------------------------
TALK_:  sta     MMU_MODE_KERN                   ; FCBE 8D 00 FA                 ...
        jsr     SendTalk                        ; FCC1 20 91 BC                  ..
        sta     MMU_MODE_APPL                   ; FCC4 8D 80 FA                 ...
        rts                                     ; FCC7 60                       `
; ----------------------------------------------------------------------------
ReadST: lda     ST                              ; FCC8 A5 BA                    ..
SetST:  ora     ST                              ; FCCA 05 BA                    ..
        sta     ST                              ; FCCC 85 BA                    ..
        rts                                     ; FCCE 60                       `
; ----------------------------------------------------------------------------
SetLFS: sta     LFSLogNum                       ; FCCF 85 C6                    ..
        stx     LFSDevNum                       ; FCD1 86 C5                    ..
        sty     LFS2ndAddr                      ; FCD3 84 C4                    ..
        rts                                     ; FCD5 60                       `
; ----------------------------------------------------------------------------
SetNam: sta     FNlength                        ; FCD6 8D 87 03                 ...
        stx     FNptr_lo                        ; FCD9 86 AE                    ..
        sty     FNptr_hi                        ; FCDB 84 AF                    ..
        rts                                     ; FCDD 60                       `
; ----------------------------------------------------------------------------
Open_:  sta     MMU_MODE_APPL                   ; FCDE 8D 80 FA                 ...
        jsr     Open                            ; FCE1 20 C0 FF                  ..
        jmp     LFD66                           ; FCE4 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_OPEN:
        sta     MMU_MODE_KERN                   ; FCE7 8D 00 FA                 ...
        jsr     Open__                          ; FCEA 20 F0 BA                  ..
        sta     MMU_MODE_APPL                   ; FCED 8D 80 FA                 ...
        rts                                     ; FCF0 60                       `
; ----------------------------------------------------------------------------
LFCF1:  sta     MMU_MODE_APPL                   ; FCF1 8D 80 FA                 ...
        jsr     LFFC3                           ; FCF4 20 C3 FF                  ..
        jmp     LFD66                           ; FCF7 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_CLOSE:
        sta     MMU_MODE_KERN                   ; FCFA 8D 00 FA                 ...
        jsr     CLOSE__                         ; FCFD 20 53 BA                  S.
MMU_APPL_WINDOW1:
        sta     MMU_MODE_APPL                   ; FD00 8D 80 FA                 ...
        rts                                     ; FD03 60                       `
; ----------------------------------------------------------------------------
        sta     MMU_MODE_APPL                   ; FD04 8D 80 FA                 ...
        jsr     LFFC6                           ; FD07 20 C6 FF                  ..
        jmp     LFD66                           ; FD0A 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_CHKIN:
        sta     MMU_MODE_KERN                   ; FD0D 8D 00 FA                 ...
        jsr     CHKIN__                         ; FD10 20 BA B9                  ..
        sta     MMU_MODE_APPL                   ; FD13 8D 80 FA                 ...
        rts                                     ; FD16 60                       `
; ----------------------------------------------------------------------------
        sta     MMU_MODE_APPL                   ; FD17 8D 80 FA                 ...
        jsr     LFFC9                           ; FD1A 20 C9 FF                  ..
        jmp     LFD66                           ; FD1D 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_CHKOUT:
        sta     MMU_MODE_KERN                   ; FD20 8D 00 FA                 ...
        jsr     CHKOUT__                        ; FD23 20 05 BA                  ..
        sta     MMU_MODE_APPL                   ; FD26 8D 80 FA                 ...
        rts                                     ; FD29 60                       `
; ----------------------------------------------------------------------------
LFD2A:  sta     MMU_MODE_APPL                   ; FD2A 8D 80 FA                 ...
        jsr     LFFCC                           ; FD2D 20 CC FF                  ..
        jmp     LFD66                           ; FD30 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_CLRCHN:
        sta     MMU_MODE_KERN                   ; FD33 8D 00 FA                 ...
        jsr     CLRCHN__                        ; FD36 20 D7 BA                  ..
        sta     MMU_MODE_APPL                   ; FD39 8D 80 FA                 ...
        rts                                     ; FD3C 60                       `
; ----------------------------------------------------------------------------
LFD3D:  sta     MMU_MODE_APPL                   ; FD3D 8D 80 FA                 ...
        jsr     LFFCF                           ; FD40 20 CF FF                  ..
        jmp     LFD66                           ; FD43 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_CHRIN:
        sta     MMU_MODE_KERN                   ; FD46 8D 00 FA                 ...
        jsr     CHRIN__                         ; FD49 20 25 B9                  %.
        sta     MMU_MODE_APPL                   ; FD4C 8D 80 FA                 ...
        rts                                     ; FD4F 60                       `
; ----------------------------------------------------------------------------
        sta     MMU_MODE_APPL                   ; FD50 8D 80 FA                 ...
        jsr     LFFD2                           ; FD53 20 D2 FF                  ..
        jmp     LFD66                           ; FD56 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_CHROUT:
        sta     MMU_MODE_KERN                   ; FD59 8D 00 FA                 ...
        jsr     CHROUT__                        ; FD5C 20 6C B9                  l.
        sta     MMU_MODE_APPL                   ; FD5F 8D 80 FA                 ...
        rts                                     ; FD62 60                       `
; ----------------------------------------------------------------------------
LFD63:  jsr     LOAD_                           ; FD63 20 6A FD                  j.
LFD66:  sta     MMU_MODE_KERN                   ; FD66 8D 00 FA                 ...
        rts                                     ; FD69 60                       `
; ----------------------------------------------------------------------------
LOAD_:  stx     $B4                             ; FD6A 86 B4                    ..
        sty     $B5                             ; FD6C 84 B5                    ..
        sta     MMU_MODE_APPL                   ; FD6E 8D 80 FA                 ...
        jmp     (RAMVEC_LOAD)                   ; FD71 6C 30 03                 l0.
; ----------------------------------------------------------------------------
DEFVEC_LOAD:
LFD75           := * + 1
        sta     MMU_MODE_KERN                   ; FD74 8D 00 FA                 ...
        jsr     LOAD__                          ; FD77 20 38 95                  8.
LFD7A:  sta     MMU_MODE_APPL                   ; FD7A 8D 80 FA                 ...
        rts                                     ; FD7D 60                       `
; ----------------------------------------------------------------------------
MMU_APPL_WINDOW2:= * + 2
        sta     MMU_MODE_RAM                    ; FD7E 8D 00 FB                 ...
        rts                                     ; FD81 60                       `
; ----------------------------------------------------------------------------
LFD82:  jsr     SAVE_                           ; FD82 20 88 FD                  ..
        jmp     LFD66                           ; FD85 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
SAVE_:  stx     $B2                             ; FD88 86 B2                    ..
        sty     $B3                             ; FD8A 84 B3                    ..
        tax                                     ; FD8C AA                       .
        lda     $00,x                           ; FD8D B5 00                    ..
        sta     $B6                             ; FD8F 85 B6                    ..
        lda     $01,x                           ; FD91 B5 01                    ..
        sta     $B7                             ; FD93 85 B7                    ..
        sta     MMU_MODE_APPL                   ; FD95 8D 80 FA                 ...
        jmp     (RAMVEC_SAVE)                   ; FD98 6C 32 03                 l2.
; ----------------------------------------------------------------------------
DEFVEC_SAVE:
        sta     MMU_MODE_KERN                   ; FD9B 8D 00 FA                 ...
        jsr     LBBC0                           ; FD9E 20 C0 BB                  ..
        sta     MMU_MODE_APPL                   ; FDA1 8D 80 FA                 ...
        rts                                     ; FDA4 60                       `
; ----------------------------------------------------------------------------
LFDA5:  sta     MMU_MODE_KERN                   ; FDA5 8D 00 FA                 ...
        jsr     LBFD8                           ; FDA8 20 D8 BF                  ..
        sta     MMU_MODE_APPL                   ; FDAB 8D 80 FA                 ...
        rts                                     ; FDAE 60                       `
; ----------------------------------------------------------------------------
LFDAF:  sta     MMU_MODE_KERN                   ; FDAF 8D 00 FA                 ...
        jsr     LBFCE                           ; FDB2 20 CE BF                  ..
        sta     MMU_MODE_APPL                   ; FDB5 8D 80 FA                 ...
        rts                                     ; FDB8 60                       `
; ----------------------------------------------------------------------------
LFDB9:  sta     MMU_MODE_APPL                   ; FDB9 8D 80 FA                 ...
        jsr     LFFE1                           ; FDBC 20 E1 FF                  ..
        jmp     LFD66                           ; FDBF 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_STOP:
        sta     MMU_MODE_KERN                   ; FDC2 8D 00 FA                 ...
        jsr     LB6E8                           ; FDC5 20 E8 B6                  ..
        sta     MMU_MODE_APPL                   ; FDC8 8D 80 FA                 ...
        rts                                     ; FDCB 60                       `
; ----------------------------------------------------------------------------
        sta     MMU_MODE_APPL                   ; FDCC 8D 80 FA                 ...
        jsr     LFFE4                           ; FDCF 20 E4 FF                  ..
        jmp     LFD66                           ; FDD2 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_GETIN:
        sta     MMU_MODE_KERN                   ; FDD5 8D 00 FA                 ...
        jsr     LB918                           ; FDD8 20 18 B9                  ..
        sta     MMU_MODE_APPL                   ; FDDB 8D 80 FA                 ...
        rts                                     ; FDDE 60                       `
; ----------------------------------------------------------------------------
LFDDF:  sta     MMU_MODE_APPL                   ; FDDF 8D 80 FA                 ...
        jsr     LFFE7                           ; FDE2 20 E7 FF                  ..
        jmp     LFD66                           ; FDE5 4C 66 FD                 Lf.
; ----------------------------------------------------------------------------
DEFVEC_CLALL:
        sta     MMU_MODE_KERN                   ; FDE8 8D 00 FA                 ...
        jsr     LBAD4                           ; FDEB 20 D4 BA                  ..
        sta     MMU_MODE_APPL                   ; FDEE 8D 80 FA                 ...
        rts                                     ; FDF1 60                       `
; ----------------------------------------------------------------------------
UDTIM_: sta     MMU_MODE_KERN                   ; FDF2 8D 00 FA                 ...
        jsr     UDTIM__                         ; FDF5 20 4F BF                  O.
        sta     MMU_MODE_APPL                   ; FDF8 8D 80 FA                 ...
        rts                                     ; FDFB 60                       `
; ----------------------------------------------------------------------------
; SCREEN. Fetch number of screen rows and columns.
; On CLCD the screen's resolution is 80*16 chars.
LFDFC:  ldx     #$50                            ; FDFC A2 50                    .P
        ldy     #$10                            ; FDFE A0 10                    ..
MMU_APPL_WINDOW3:
        rts                                     ; FE00 60                       `
; ----------------------------------------------------------------------------
; PLOT.   Save or restore cursor position.
; Input:  Carry: 0 = Restore from input, 1 = Save to output; X = Cursor
; column
;         (if Carry = 0); Y = Cursor row (if Carry = 0).
; Output: X = Cursor column (if Carry = 1); Y = Cursor row (if Carry = 1).
;         Used registers: X, Y.
PLOT_:  bcs     LFE07                           ; FE01 B0 04                    ..
        sty     CursorX                         ; FE03 84 A1                    ..
        stx     CursorY                         ; FE05 86 A2                    ..
LFE07:  ldy     CursorX                         ; FE07 A4 A1                    ..
        ldx     CursorY                         ; FE09 A6 A2                    ..
        rts                                     ; FE0B 60                       `
; ----------------------------------------------------------------------------
; ?? Might be IOBASE. Fetch CIA #1 base address.
; Input: -
; Output: X/Y = CIA #1 base address .
; Used registers: X, Y.
; Though CLCD contains VIA, not CIA, but fair enough :) $F800 seems to be OK,
; as this is addr of VIA-1, indeed. It also helped me to be sure that F800 is
; really start of the VIA regs.
LFE0C:  ldx     #$00                            ; FE0C A2 00                    ..
        ldy     #$F8                            ; FE0E A0 F8                    ..
        rts                                     ; FE10 60                       `
; ----------------------------------------------------------------------------
; Seems to be an unused area.
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE11 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE19 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE21 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE29 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE31 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE39 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE41 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE49 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE51 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE59 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE61 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE69 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE71 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF     ; FE79 FF FF FF FF FF FF FF     .......
MMU_APPL_WINDOW4:
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE80 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE88 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE90 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FE98 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEA0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEA8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEB0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEB8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEC0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEC8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FED0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FED8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEE0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEE8 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEF0 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FEF8 FF FF FF FF FF FF FF FF  ........
MMU_KERN_WINDOW:
        .byte   $FF,$FF,$FF                     ; FF00 FF FF FF                 ...
LFF03:  .byte   $FF                             ; FF03 FF                       .
LFF04:  .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FF04 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF                 ; FF0C FF FF FF FF              ....
LFF10:  .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FF10 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; FF18 FF FF FF FF FF FF FF FF  ........
        .byte   $FF,$FF,$FF,$FF,$FF,$FF,$FF     ; FF20 FF FF FF FF FF FF FF     .......
; ----------------------------------------------------------------------------
        jmp     LFAB5                           ; FF27 4C B5 FA                 L..
; ----------------------------------------------------------------------------
        jmp     LFABF                           ; FF2A 4C BF FA                 L..
; ----------------------------------------------------------------------------
        jmp     LFAC9                           ; FF2D 4C C9 FA                 L..
; ----------------------------------------------------------------------------
        jmp     LFAD3                           ; FF30 4C D3 FA                 L..
; ----------------------------------------------------------------------------
        jmp     LFADD                           ; FF33 4C DD FA                 L..
; ----------------------------------------------------------------------------
        jmp     LFAE7                           ; FF36 4C E7 FA                 L..
; ----------------------------------------------------------------------------
        jmp     LFAF1                           ; FF39 4C F1 FA                 L..
; ----------------------------------------------------------------------------
        jmp     LFAFB                           ; FF3C 4C FB FA                 L..
; ----------------------------------------------------------------------------
; Power off with saving the state.
        jmp     LFB05                           ; FF3F 4C 05 FB                 L..
; ----------------------------------------------------------------------------
        jmp     LFB0F                           ; FF42 4C 0F FB                 L..
; ----------------------------------------------------------------------------
        jmp     LFB19                           ; FF45 4C 19 FB                 L..
; ----------------------------------------------------------------------------
LFF4A           := * + 2
        jmp     LFB23                           ; FF48 4C 23 FB                 L#.
; ----------------------------------------------------------------------------
        jmp     LFB2D                           ; FF4B 4C 2D FB                 L-.
; ----------------------------------------------------------------------------
LFF50           := * + 2
        jmp     LFB37                           ; FF4E 4C 37 FB                 L7.
; ----------------------------------------------------------------------------
        jmp     LFB41                           ; FF51 4C 41 FB                 LA.
; ----------------------------------------------------------------------------
        jmp     ShowInLineText00                ; FF54 4C 51 FB                 LQ.
; ----------------------------------------------------------------------------
LFF59           := * + 2
        jmp     LFB92                           ; FF57 4C 92 FB                 L..
; ----------------------------------------------------------------------------
LFF5C           := * + 2
        jmp     LFB9C                           ; FF5A 4C 9C FB                 L..
; ----------------------------------------------------------------------------
        jmp     LFBA6                           ; FF5D 4C A6 FB                 L..
; ----------------------------------------------------------------------------
        jmp     WaitXticks                      ; FF60 4C B0 FB                 L..
; ----------------------------------------------------------------------------
        jmp     LFBBA                           ; FF63 4C BA FB                 L..
; ----------------------------------------------------------------------------
        jmp     LFBC4                           ; FF66 4C C4 FB                 L..
; ----------------------------------------------------------------------------
        jmp     LFBD6                           ; FF69 4C D6 FB                 L..
; ----------------------------------------------------------------------------
LFF6E           := * + 2
        jmp     ShowChar                        ; FF6C 4C E0 FB                 L..
; ----------------------------------------------------------------------------
LFF71           := * + 2
        jmp     LFBEA                           ; FF6F 4C EA FB                 L..
; ----------------------------------------------------------------------------
LFF74           := * + 2
        jmp     LFBF4                           ; FF72 4C F4 FB                 L..
; ----------------------------------------------------------------------------
LFF77           := * + 2
        jmp     LFBFE                           ; FF75 4C FE FB                 L..
; ----------------------------------------------------------------------------
LFF7A           := * + 2
        jmp     LFC08                           ; FF78 4C 08 FC                 L..
; ----------------------------------------------------------------------------
LFF7D           := * + 2
        jmp     LFC12                           ; FF7B 4C 12 FC                 L..
; ----------------------------------------------------------------------------
        .byte   $FF                             ; FF7E FF                       .
        .byte   $FF                             ; FF7F FF                       .
LFF80:  .byte   $FF                             ; FF80 FF                       .
KJ_SCINIT:
LFF82           := * + 1
LFF83           := * + 2
; ------------------------------------------------------------------------------
; Begin of the table of the kernal vectors (well, compared with "standard
; KERNAL entries" on Commodore 64, I can just guess if there is not so much
; difference on the CLCD)
; ------------------------------------------------------------------------------
        jmp     KR_SCINIT                       ; FF81 4C 1C FC                 L..
; ----------------------------------------------------------------------------
KJ_IOINIT:
        jmp     KR_IOINIT                       ; FF84 4C 2E FC                 L..
; ----------------------------------------------------------------------------
KJ_RAMTAS:
        jmp     KR_RAMTAS                       ; FF87 4C 38 FC                 L8.
; ----------------------------------------------------------------------------
KJ_RESTOR:
        jmp     KR_RESTOR                       ; FF8A 4C 42 FC                 LB.
; ----------------------------------------------------------------------------
KJ_VECTOR:
        jmp     KR_VECTOR                       ; FF8D 4C 4C FC                 LL.
; ----------------------------------------------------------------------------
SetMsg: jmp     SetMsg_                         ; FF90 4C 56 FC                 LV.
; ----------------------------------------------------------------------------
LSTNSA: jmp     LSTNSA_                         ; FF93 4C 5A FC                 LZ.
; ----------------------------------------------------------------------------
TALKSA: jmp     TALKSA_                         ; FF96 4C 64 FC                 Ld.
; ----------------------------------------------------------------------------
MEMBOT: jmp     MEMBOT_                         ; FF99 4C 6E FC                 Ln.
; ----------------------------------------------------------------------------
MEMTOP: jmp     MEMTOP_                         ; FF9C 4C 78 FC                 Lx.
; ----------------------------------------------------------------------------
KJ_SCNKEY:
        jmp     KR_SCNKEY                       ; FF9F 4C 82 FC                 L..
; ----------------------------------------------------------------------------
; The following entry (three bytes) would be "SETTMO. Unknown. (Set serial
; bus timeout.)" according to the C64 KERNAL, however on CLCD it seems to be
; unused.
        rts                                     ; FFA2 60                       `
; ----------------------------------------------------------------------------
        rts                                     ; FFA3 60                       `
; ----------------------------------------------------------------------------
        rts                                     ; FFA4 60                       `
; ----------------------------------------------------------------------------
IECIN:  jmp     IECIN_                          ; FFA5 4C 8C FC                 L..
; ----------------------------------------------------------------------------
IECOUT: jmp     IECOUT_                         ; FFA8 4C 96 FC                 L..
; ----------------------------------------------------------------------------
UNTALK: jmp     UNTALK_                         ; FFAB 4C A0 FC                 L..
; ----------------------------------------------------------------------------
UNLSTN: jmp     UNLSTN_                         ; FFAE 4C AA FC                 L..
; ----------------------------------------------------------------------------
LISTEN: jmp     LISTEN_                         ; FFB1 4C B4 FC                 L..
; ----------------------------------------------------------------------------
; ??TALK. Send TALK command to serial bus.
; Input: A = Device number.
TALK:   jmp     TALK_                           ; FFB4 4C BE FC                 L..
; ----------------------------------------------------------------------------
; ??READST. Fetch status of current input/output device, value of ST
; variable. (For RS232, status is cleared.)
; Output: A = Device status.
        jmp     ReadST                          ; FFB7 4C C8 FC                 L..
; ----------------------------------------------------------------------------
; ??SETLFS. Set file parameters.
; Input: A = Logical number; X = Device number; Y = Secondary address.
        jmp     SetLFS                          ; FFBA 4C CF FC                 L..
; ----------------------------------------------------------------------------
; SETNAM. Set file name parameters.
; Input: A = File name length; X/Y = Pointer to file name.
        jmp     SetNam                          ; FFBD 4C D6 FC                 L..
; ----------------------------------------------------------------------------
; "OPEN". Must call SETLFS and SETNAM beforehands.
; RAMVEC_OPEN points to $FCE7 in RAM by default.
Open:   jmp     (RAMVEC_OPEN)                   ; FFC0 6C 1A 03                 l..
; ----------------------------------------------------------------------------
LFFC3:  jmp     (RAMVEC_CLOSE)                  ; FFC3 6C 1C 03                 l..
; ----------------------------------------------------------------------------
LFFC6:  jmp     (RAMVEC_CHKIN)                  ; FFC6 6C 1E 03                 l..
; ----------------------------------------------------------------------------
LFFC9:  jmp     (RAMVEC_CHKOUT)                 ; FFC9 6C 20 03                 l .
; ----------------------------------------------------------------------------
LFFCC:  jmp     (RAMVEC_CLRCHN)                 ; FFCC 6C 22 03                 l".
; ----------------------------------------------------------------------------
LFFCF:  jmp     (RAMVEC_CHRIN)                  ; FFCF 6C 24 03                 l$.
; ----------------------------------------------------------------------------
LFFD2:  jmp     (RAMVEC_CHROUT)                 ; FFD2 6C 26 03                 l&.
; ----------------------------------------------------------------------------
; ??LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.)
; Input: A: 0 = Load, 1-255 = Verify; X/Y = Load address (if secondary
; address = 0).
; Output: Carry: 0 = No errors, 1 = Error; A = KERNAL error code (if Carry =
; 1); X/Y = Address of last byte loaded/verified (if Carry = 0).
; Used registers: A, X, Y.
; Real address: $F49E.
LOAD:   jmp     LOAD_                           ; FFD5 4C 6A FD                 Lj.
; ----------------------------------------------------------------------------
; ??SAVE. Save file. (Must call SETLFS and SETNAM beforehands.)
; Input: A = Address of zero page register holding start address of memory
; area to save; X/Y = End address of memory area plus 1.
; Output: Carry: 0 = No errors, 1 = Error; A = KERNAL error code (if Carry =
; 1).
; Used registers: A, X, Y.
; Real address: $F5DD.
SAVE:   jmp     SAVE_                           ; FFD8 4C 88 FD                 L..
; ----------------------------------------------------------------------------
; ??SETTIM. Set Time of Day, at memory address $0390-$0392.
; Input: A/X/Y = New TOD value.
; Output: –
; Used registers: –
; Real address: $F6E4.
        jmp     LFDA5                           ; FFDB 4C A5 FD                 L..
; ----------------------------------------------------------------------------
; ??RDTIM. read Time of Day, at memory address $0390-$0392.
; Input: –
; Output: A/X/Y = Current TOD value.
; Used registers: A, X, Y.
        jmp     LFDAF                           ; FFDE 4C AF FD                 L..
; ----------------------------------------------------------------------------
; ??STOP. Query Stop key indicator, at memory address $0091; if pressed, call
; CLRCHN and clear keyboard buffer.
; Input: –
; Output: Zero: 0 = Not pressed, 1 = Pressed; Carry: 1 = Pressed.
; Used registers: A, X.
; Vector in RAM ($328) seems to point to $FDC2
LFFE1:  jmp     (RAMVEC_STOP)                   ; FFE1 6C 28 03                 l(.
; ----------------------------------------------------------------------------
; GETIN. Read byte from default input. (If not keyboard, must call OPEN and
; CHKIN beforehands.)
; Input: –
; Output: A = Byte read.
; Used registers: A, X, Y.
LFFE4:  jmp     (RAMVEC_GETIN)                  ; FFE4 6C 2A 03                 l*.
; ----------------------------------------------------------------------------
LFFE7:  jmp     (RAMVEC_CLALL)                  ; FFE7 6C 2C 03                 l,.
; ----------------------------------------------------------------------------
; ??Might be UDTIM. Update Time of Day, at memory address $0390-$0392, and
; Stop key indicator
UDTIM:  jmp     UDTIM_                          ; FFEA 4C F2 FD                 L..
; ----------------------------------------------------------------------------
; SCREEN. Fetch number of screen rows and columns.
        jmp     LFDFC                           ; FFED 4C FC FD                 L..
; ----------------------------------------------------------------------------
; PLOT. Save or restore cursor position.
; Input: Carry: 0 = Restore from input, 1 = Save to output; X = Cursor column
; (if Carry = 0); Y = Cursor row (if Carry = 0).
; Output: X = Cursor column (if Carry = 1); Y = Cursor row (if Carry = 1).
; Used registers: X, Y.
PLOT:   jmp     PLOT_                           ; FFF0 4C 01 FE                 L..
; ----------------------------------------------------------------------------
; ?? Might be IOBASE. Fetch CIA #1 base address.
; Input: -
; Output: X/Y = CIA #1 base address .
; Used registers: X, Y.
        jmp     LFE0C                           ; FFF3 4C 0C FE                 L..
; ----------------------------------------------------------------------------
; Four unused bytes, this is the same as with C64.
        .byte   $FF                             ; FFF6 FF                       .
        .byte   $FF                             ; FFF7 FF                       .
LFFF8:  .byte   $FF                             ; FFF8 FF                       .
        .byte   $FF                             ; FFF9 FF                       .
NMI_VECTOR:
; The 65xx hardware vectors (NMI, RESET, IRQ).
        .addr   NMI                             ; FFFA 66 FA                    f.
RES_VECTOR:
; This is the RESET vector.
        .addr   RESET                           ; FFFC 07 FA                    ..
IRQ_VECTOR:
        .addr   IRQ                             ; FFFE 0E FA                    ..