        .word $c000
        * = $c000

lc000        lda #$00
        bit $03a9
        bit $06a9
        bit $09a9
        bit $0ca9
        bit $0fa9
        nop
        jmp lc01b
lc015        jmp lc5a1     ; SYS 49173
lc018        jmp lc695
lc01b        sta $62
        tsx
        stx lc81c
        lda #$33
        clc
        adc $62
        sta lc031
        lda #$c0
        adc #$00
        sta lc032
        lc031 = * + 1
        lc032 = * + 2
        jmp lc03c
lc033        jmp lc057
lc036        jmp lc40e
lc039        jmp lc3d6
lc03c        jmp lc4d4
lc03f        jmp lc51d
lc042        jmp lc5b0
lc045        jmp lc695
lc048         .byt $47,$4f,$4f
        .byt $42,$41,$44
        .byt $41,$43,$4b
        .byt $53,$2f,$42
        .byt $53
lc055        lc057 = * + 2
; Instruction parameter jumped to.
        eor $8d4e,y
lc058        ora $c8
        lda #$00
        sta lc800
        sta lc801
        sta lc802
lc065        lda #$00
        sta lc806
        sta lc807
lc06d        jsr lc681
        jsr lc0f8
        lda $96
        bne lc0cf
lc077        lda lc801
        sta lc800
        lda lc802
        sta lc801
        lda $0200
        sta lc802
        lda #$00
        sta lc804
        lda #$01
        sta lc803
lc093        lda lc805
        bit lc803
        beq lc0b1
lc09b        ldy lc804
        ldx #$00
lc0a0        lda lc800,x
        cmp lc048,y
        bne lc0b1
lc0a8        iny
        inx
        cpx #$03
        bne lc0a0
lc0ae        jmp lc0c4
lc0b1        asl lc803
        lda lc804
        clc
        adc #$03
        sta lc804
        cmp #$0f
        bne lc093
lc0c1        jmp lc065
lc0c4        lda #$ff
        sta lc806
        sta lc807
        jmp lc06d
lc0cf        inc lc806
        bne lc0d7
lc0d4        inc lc807
lc0d7        lda lc807
        ora lc806
        beq lc0f2
lc0df        lda lc806
        cmp #$07
        lda lc807
        cmp #$14
        bcc lc06d
lc0eb        lda #$01
        sta $96
        jmp lc564
lc0f2        lda #$00
        sta $96
        rts
lc0f7        nop
lc0f8        tya
        pha
        lda $029b
        cmp $029c
        beq lc118
lc102        ldy $029c
        lda ($f7),y
        pha
        inc $029c
        lda #$00
        sta $96
        pla
        sta $0200
        pla
        tay
        jmp lc123
lc118        lda #$02
        sta $96
        lda #$00
        sta $0200
        pla
        tay
lc123        pha
        lda #$03
        sta $ba
        pla
        rts
lc12a        ldx #$05
        jsr $ffc9
        ldx #$00
lc131        lda lc048,y
        jsr $ffd2
        iny
        inx
        cpx #$03
        bne lc131
lc13d        jmp $ffcc
lc140        sta lc808
        lda #$00
        sta lc80b
lc148        lda #$02
        sta $62
        ldy lc808
        jsr lc12a
lc152        lda #$04
        jsr lc057
        lda $96
        beq lc162
lc15b        dec $62
        bne lc152
lc15f        jmp lc148
lc162        ldy #$09
        jsr lc12a
        lda lc80d
        beq lc171
lc16c        lda lc808
        beq lc190
lc171        lda $c904
        sta lc809
        sta lc817
        jsr lc285
        lda $96
        cmp #$01
        beq lc18f
lc183        cmp #$02
        beq lc162
lc187        cmp #$04
        beq lc18f
lc18b        cmp #$08
        beq lc162
lc18f        rts
lc190        lda #$10
        jsr lc057
        lda $96
        bne lc162
lc199        lda #$0a
        sta lc809
lc19e        ldy #$0c
        jsr lc12a
        lda #$08
        jsr lc057
        lda $96
        beq lc1b1
lc1ac        dec lc809
        bne lc19e
lc1b1        rts
lc1b2        lda #$01
        sta lc80b
lc1b7        lda lc81e
        beq lc1c1
lc1bc        ldy #$00
        jsr lc12a
lc1c1        lda #$0b
        jsr lc057
        lda $96
        bne lc1b7
lc1ca        lda #$00
        sta lc81e
        lda lc804
        cmp #$00
        bne lc20b
lc1d6        lda lc80d
        bne lc243
lc1db        inc lc819
        bne lc1e3
lc1e0        inc lc81a
lc1e3        jsr lc36a
        ldy #$05
        iny
        lda ($64),y
        cmp #$ff
        bne lc205
lc1ef        lda #$01
        sta lc80d
        lda lc816
        eor #$01
        sta lc816
        jsr lc36a
        jsr lc34a
        jmp lc208
lc205        jsr lc305
lc208        lda #$2d
        lc20b = * + 1
; Instruction parameter jumped to.
        bit $3aa9
        jsr lc58c
        ldy #$06
        jsr lc12a
        lda #$08
        jsr lc057
        lda $96
        bne lc208
lc21e        jsr lc36a
        ldy #$04
        lda ($64),y
        sta lc809
        jsr lc377
        ldx #$05
        jsr $ffc9
        ldy #$00
lc232        lda ($64),y
        jsr $ffd2
        iny
        cpy lc809
        bne lc232
lc23d        jsr $ffcc
        lda #$00
        rts
lc243        lda #$2a
        jsr lc58c
        ldy #$06
        jsr lc12a
        lda #$08
        jsr lc057
        lda $96
        bne lc243
lc256        lda #$0a
        sta lc809
lc25b        ldy #$0c
        jsr lc12a
        lda #$10
        jsr lc057
        lda $96
        beq lc26e
lc269        dec lc809
        bne lc25b
lc26e        lda #$03
        sta lc809
lc273        ldy #$09
        jsr lc12a
        lda #$00
        jsr lc057
        dec lc809
        bne lc273
lc282        lda #$01
        rts
lc285        ldy #$00
lc287        lda #$00
        sta lc806
        sta lc807
lc28f        jsr lc681
        jsr lc0f8
        lda $96
        bne lc2d5
lc299        lda $0200
        sta $c900,y
        cpy #$03
        bcs lc2bf
lc2a3        sta lc800,y
        cpy #$02
        bne lc2bf
lc2aa        lda lc800
        cmp #$41
        bne lc2bf
lc2b1        lda lc801
        cmp #$43
        bne lc2bf
lc2b8        lda lc802
        cmp #$4b
        beq lc2ca
lc2bf        iny
        cpy lc809
        bne lc287
lc2c5        lda #$01
        sta $96
        rts
lc2ca        lda #$ff
        sta lc806
        sta lc807
        jmp lc28f
lc2d5        inc lc806
        bne lc2dd
lc2da        inc lc807
lc2dd        lda lc806
        ora lc807
        beq lc300
lc2e5        lda lc806
        cmp #$06
        lda lc807
        cmp #$10
        bne lc28f
lc2f1        lda #$02
        sta $96
        cpy #$00
        beq lc2fd
lc2f9        lda #$04
        sta $96
lc2fd        jmp lc564
lc300        lda #$08
        sta $96
        rts
lc305        lda lc816
        eor #$01
        sta lc816
        jsr lc36a
        ldy #$05
        lda lc819
        clc
        adc #$01
        sta ($64),y
        iny
        lda lc81a
        adc #$00
        sta ($64),y
        ldx #$02
        jsr $ffc6
        ldy #$07
lc329        jsr $ffcf
        sta ($64),y
        iny
        jsr $ffb7
        bne lc33e
lc334        cpy lc818
        bne lc329
lc339        tya
        pha
        jmp lc34b
lc33e        tya
        pha
        ldy #$05
        iny
        lda #$ff
        sta ($64),y
        jmp lc34b
lc34a        pha
lc34b        jsr $ffcc
        jsr lc5a1
        jsr lc57f
        jsr lc5a1
        ldy #$04
        lda ($64),y
        sta lc809
        jsr lc377
        pla
        ldy #$04
        sta ($64),y
        jsr lc386
        rts
lc36a        lda #$00
        sta $64
        lda lc816
        clc
        adc #$c9
        sta $65
        rts
lc377        lda #$00
        sta $64
        lda lc816
        eor #$01
        clc
        adc #$c9
        sta $65
        rts
lc386        lda #$00
        sta lc812
        sta lc813
        sta lc814
        sta lc815
        ldy #$04
lc396        lda lc812
        clc
        adc ($64),y
        sta lc812
        bcc lc3a4
lc3a1        inc lc813
lc3a4        lda lc814
        eor ($64),y
        sta lc814
        lda lc815
        rol
        rol lc814
        rol lc815
        iny
        cpy lc809
        bne lc396
lc3bc        ldy #$00
        lda lc812
        sta ($64),y
        iny
        lda lc813
        sta ($64),y
        iny
        lda lc814
        sta ($64),y
        iny
        lda lc815
        sta ($64),y
        rts
lc3d6        lda #$00
        sta lc80d
        sta lc80c
        sta lc81d
        lda #$01
        sta lc816
        lda #$ff
        sta lc819
        sta lc81a
        jsr lc377
        ldy #$04
        lda #$07
        sta ($64),y
        jsr lc36a
        ldy #$05
        lda #$00
        sta ($64),y
        iny
        sta ($64),y
lc403        jsr lc1b2
        beq lc403
lc408        lda #$00
        sta $0200
        rts
lc40e        lda #$01
        sta lc819
        lda #$00
        sta lc81a
        sta lc80d
        sta lc816
        sta $c905
        sta $c906
        sta lc80c
        lda #$07
        sta $c904
        lda #$00
lc42e        jsr lc140
        lda lc80d
        bne lc408
lc436        jsr lc48a
        bne lc477
lc43b        jsr $ffcc
        lda lc809
        cmp #$07
        beq lc45b
lc445        ldx #$02
        jsr $ffc9
        ldy #$07
lc44c        lda $c900,y
        jsr $ffd2
        iny
        cpy lc809
        bne lc44c
lc458        jsr $ffcc
lc45b        lda $c906
        cmp #$ff
        bne lc46a
lc462        lda #$01
        sta lc80d
        lda #$2a
        lc46a = * + 1
; Instruction parameter jumped to.
        bit $2da9
        jsr $ffd2
        jsr lc5a1
        lda #$00
        jmp lc42e
lc477        jsr $ffcc
        lda #$3a
        jsr $ffd2
        lda lc817
        sta $c904
        lda #$03
        jmp lc42e
lc48a        lda $c900
        sta lc80e
        lda $c901
        sta lc80f
        lda $c902
        sta lc810
        lda $c903
        sta lc811
        jsr lc36a
        lda lc817
        sta lc809
        jsr lc386
        lda $c900
        cmp lc80e
        bne lc4d1
lc4b6        lda $c901
        cmp lc80f
        bne lc4d1
lc4be        lda $c902
        cmp lc810
        bne lc4d1
lc4c6        lda $c903
        cmp lc811
        bne lc4d1
lc4ce        lda #$00
        rts
lc4d1        lda #$01
        rts
lc4d4        lda #$00
        sta lc819
        sta lc81a
        sta lc80d
        sta lc816
        sta lc80c
        lda #$07
        clc
        adc #$01
        sta $c904
        lda #$00
lc4ef        jsr lc140
        lda lc80d
        bne lc517
lc4f7        jsr lc48a
        bne lc50c
lc4fc        lda $c907
        sta lc81b
        lda #$01
        sta lc80d
        lda #$00
        jmp lc4ef
lc50c        lda lc817
        sta $c904
        lda #$03
        jmp lc4ef
lc517        lda #$00
        sta $0200
        rts
lc51d        lda #$00
        sta lc80d
        sta lc80c
        lda #$01
        sta lc816
        sta lc81d
        lda #$ff
        sta lc819
        sta lc81a
        jsr lc377
        ldy #$04
        lda #$07
        clc
        adc #$01
        sta ($64),y
        jsr lc36a
        ldy #$05
        lda #$ff
        sta ($64),y
        iny
        sta ($64),y
        ldy #$07
        lda lc81b
        sta ($64),y
        lda #$01
        sta lc81e
lc559        jsr lc1b2
        beq lc559
lc55e        lda #$00
        sta $0200
        rts
lc564        inc lc80c
        lda lc80c
        cmp #$03
        bcc lc57a
lc56e        lda #$00
        sta lc80c
        lda lc80b
        beq lc57f
lc578        bne lc58b
lc57a        lda lc80b
        beq lc58b
lc57f        ldx #$00
lc581        ldy #$00
lc583        iny
        bne lc583
lc586        inx
        cpx #$78
        bne lc581
lc58b        rts
lc58c        pha
        lda lc819
        ora lc81a
        beq lc59f
lc595        lda lc81d
        bne lc59f
lc59a        pla
        jsr $ffd2
        pha
lc59f        pla
        rts
lc5a1        jsr $ef7e  ; Set up to receive a new byte from RS-232
        lda $02a1
        cmp #$80
        beq lc5a1
lc5ab        cmp #$92
        beq lc5a1
lc5af        rts
lc5b0        jsr lc66d
lc5b3        jsr lc0f7
        lda $96
        bne lc5ce
lc5ba        lda $0200
        and #$7f
        sta $0200
        cmp #$08
        beq lc5d1
lc5c6        cmp #$0d
        beq lc5d1
lc5ca        cmp #$20
        bpl lc5d1
lc5ce        jmp lc61b
lc5d1        cmp #$61
        bcc lc5e2
lc5d5        cmp #$7b
        bcs lc5e2
lc5d9        sec
        sbc #$20
        sta $0200
        jmp lc5f0
lc5e2        cmp #$41
        bcc lc5f0
lc5e6        cmp #$5b
        bcs lc5f0
lc5ea        clc
        adc #$80
        sta $0200
lc5f0        cmp #$08
        bne lc5f9
lc5f4        lda #$14
        sta $0200
lc5f9        cmp #$22
        bne lc607
lc5fd        jsr $ffd2
        lda #$14
        jsr $ffd2
        lda #$22
lc607        lda $0200
        cmp #$0d
        bne lc615
lc60e        lda #$20
        jsr $ffd2
        lda #$0d
lc615        jsr $ffd2
        jsr lc66d
lc61b        jsr $ffe4
        beq lc5b3
lc620        sta $0200
        cmp #$13
        beq lc66c
lc627        cmp #$41
        bcc lc638
lc62b        cmp #$5b
        bcs lc638
lc62f        clc
        adc #$20
        sta $0200
        jmp lc649
lc638        lda $0200
        cmp #$c1
        bcc lc649
lc63f        cmp #$db
        bcs lc649
lc643        sec
        sbc #$80
        sta $0200
lc649        cmp #$14
        bne lc652
lc64d        lda #$08
        sta $0200
lc652        cmp #$83
        bne lc65b
lc656        lda #$10
        sta $0200
lc65b        ldx #$05
        jsr $ffc9
        lda $0200
        jsr $ffd2
        jsr $ffcc
        jmp lc5b0
lc66c        rts
lc66d        lda #$12
        jsr $ffd2
        lda #$20
        jsr $ffd2
        lda #$9d
        jsr $ffd2
        lda #$92
        jsr $ffd2
lc681        jmp lc820
lc684        nop
        nop
        nop
        nop
lc688        pla
        tsx
        cpx lc81c
        bne lc688
lc68f        lda #$01
        sta $0200
        rts
lc695        lda $0326
        cmp #$ba
        bne lc6a3
lc69c        lda $0327
        cmp #$c6
        beq lc6b9
lc6a3        lda $0326
        sta $cb02
        lda $0327
        sta $cb03
        lda #$ba
        sta $0326
        lda #$c6
        sta $0327
lc6b9        rts
lc6ba        pha
        lda $9a
        cmp #$03
        bne lc6c5
lc6c1        pla
        jmp ($cb02)
lc6c5        bcc lc6cb
lc6c7        pla
        jmp ($cb02)
lc6cb        lsr
        pla
        sta $9e
        txa
        pha
        tya
        pha
        bcc lc6f8
lc6d5        jsr $f80d
        bne lc6e8
lc6da        jsr $f864
        bcs lc6ed
lc6df        lda #$02
        ldy #$00
        sta ($b2),y
        iny
        sty $a6
lc6e8        lda $9e
        sta ($b2),y
lc6ec        clc
lc6ed        pla
        tay
        pla
        tax
        lda $9e
        bcc lc6f7
lc6f5        lda #$00
lc6f7        rts
lc6f8        jsr lc701
        jmp lc6ec
lc6fe        jsr lc712
lc701        ldy $029e
        iny
        cpy $029d
        beq lc6fe
lc70a        sty $029e
        dey
        lda $9e
        sta ($f9),y
lc712        lda $02a1
        lsr
        bcs lc736
lc718        lda #$10
        sta $dd0e
        lda $cb00
        sta $dd04
        lc724 = * + 1
; Instruction parameter jumped to.
        lda $cb01
        sta $dd05
        lda #$81
        jsr $ef3b
        jsr $ef06
        lda #$11
        sta $dd0e
lc736        rts
lc737        bne lc724
lc739        ldx $c3
        lda $c4
        jsr $bdcd
        lda #$20
        jsr $e716
lc745        jsr $ffa5
        ldx $90
        bne lc772
lc74c        cmp #$00
        beq lc768
lc750        jsr $e716
        jsr $ffe1
        beq lc772
lc758        jsr $ffe4
        beq lc745
lc75d        cmp #$20
        bne lc745
lc761        jsr $ffe4
        beq lc761
lc766        bne lc745
lc768        lda #$0d
        jsr $e716
        ldy #$02
        jmp lc724
lc772        jsr $f642
        rts
        .byt $00,$00,$00
        .byt $00,$24,$00
        .byt $00,$00,$00
        .byt $00
lc780        lda #$08
        sta $ba
        lda #$01
        ldx #$fa
        ldy #$c7
        jsr $ffbd
        lda #$60
        sta $b9
        jsr $f3d5
        lda $ba
        jsr $ffb4
        lda $b9
        jsr $ff96
        lda #$00
        sta $90
        ldy #$03
lc7a4        sty $b7
        jsr $ffa5
        sta $c3
        jsr $ffa5
        sta $c4
        ldy $90
        bne lc7f2
lc7b4        ldy $b7
        dey
        bne lc7a4
lc7b9        ldx $c3
        lda $c4
        jsr $bdcd
        lda #$20
        jsr $e716
lc7c5        jsr $ffa5
        ldx $90
        bne lc7f2
lc7cc        cmp #$00
        beq lc7e8
lc7d0        jsr $e716
        jsr $ffe1
        beq lc7f2
lc7d8        jsr $ffe4
        beq lc7c5
lc7dd        cmp #$20
        bne lc7c5
lc7e1        jsr $ffe4
        beq lc7e1
lc7e6        bne lc7c5
lc7e8        lda #$0d
        jsr $e716
        ldy #$02
        jmp lc7a4
lc7f2        jsr $f642
        rts
        .byt $00,$00,$00
        .byt $00,$24,$00
        .byt $00,$00,$00
        lc800 = * + 1
        lc801 = * + 2
        .byt $00,$ea,$ea
lc802         lc803 = * + 1
        lc804 = * + 2
        .byt $ea,$ea,$ea
lc805         lc806 = * + 1
        lc807 = * + 2
        .byt $ea,$ea,$ea
lc808         lc809 = * + 1
        .byt $ea,$ea
lc80a        nop
lc80b        nop
lc80c        nop
lc80d        nop
lc80e        nop
lc80f        nop
lc810        nop
lc811        nop
lc812        nop
lc813        nop
lc814        nop
lc815        nop
lc816        nop
lc817        nop
lc818        nop    ; Poked-in Block Size (default is 255)
lc819        nop
lc81a        nop
lc81b        nop    ; Poked in file type - 1=prg, 2=seq, 3=WordPro file 
lc81c        nop
lc81d        nop
lc81e        nop
        nop
lc820        lda $028d
        cmp #$02
        bne lc82d
lc827        jmp lc688
lc82a        jmp lc68f
lc82d        lda $dd01
        and #$10
        cmp #$10
        nop
        bne lc82a
lc837        beq lc827
lc839        nop
        nop
        nop
        nop
        nop
        nop
        nop
        ldx #$0d
        jsr $ffc3
        lda #$10
        ldx #$8e
        ldy #$c8
        jsr $ffbd
        lda #$0d
        ldx #$08
        ldy #$0d
        jsr $ffba
        jsr $ffc0
        ldx #$0d
        jsr $ffc6
lc85f        jsr $ffe4
        ldx #$01
        stx $d8
        jsr $ffd2
        lda $c6
        bne lc879
lc86d        lda $90
        and #$40
        beq lc85f
lc873        lda #$0d
        jsr $ffc3
        rts
lc879        lda #$00
        sta $c6
lc87d        lda $c6
        beq lc87d
lc881        lda #$00
        sta $c6
        lda $c5
        cmp #$3f
        beq lc873
lc88b        jmp lc86d
lc88e        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        rol
        lda #$00
        sta $8b
        sta $8c
        ldx #$0d
        jsr $ffc6
lc8a9        jsr $ffe4
        sta $0400
        inc $8c
        clc
        adc $8b
        adc #$00
        sta $8b
        lda $90
        beq lc8a9
lc8bc        jsr lc8c2
        jmp lc8e1
lc8c2        clc
        lda $8b
        adc $8c
        adc #$00
        pha
        lsr
        lsr
        lsr
        lsr
        jsr lc8d2
        pla
lc8d2        and #$0f
        clc
        adc #$f6
        bcc lc8db
lc8d9        adc #$06
lc8db        adc #$3a
        jmp $ffd2
        .byt $60
lc8e1        lda #$0d
        jsr $ffc3
        jsr $ffcc
        lda #$20
        sta $0400
        rts
