// ============================================
// output - Disassembled Source
// ============================================
// KickAssembler syntax
// Generated by Restore 64 v0.2.1 alpha build 298, 2026-04-11 21:35:14
// https://restore64.dev by datucker / Rabenauge
//
// Load address: $0800  End: $0eff  (1792 bytes)
// Crunched with Cruncher AB — depacked by emulation
// Packer entry: $080d (via BASIC SYS 2061)
// Entry point:  $088e (2190)
// IRQ handler:  $ea31 (irq_ea31)
// IRQ handler:  $09bf (irq_09bf)
//
// Code: 694 bytes, Data: 1098 bytes
// Labels: 57, Subroutines: 3
//
// Cross-references: all OK
// ============================================


// --- Region $088e-$08cf ---
.pc = $088e "main_088e"

main_088e:
        jsr sub_0910

loc_0891:
        lda $dc01
        cmp #$ef
        bne loc_0891
        jmp loc_089b

loc_089b:
        sei
        lda #$31
        sta $0314
        lda #$ea
        sta $0315
        jsr $e518
        lda #$00
        sta $d020
        sta $d021
        ldx #$07

loc_08b3:
        lda chr_08d0,x
        sta $0400,x
        lda #$04
        sta $d800,x
        dex
        bpl loc_08b3
        ldx #$58

loc_08c3:
        lda $08d8,x
        sta $0200,x
        dex
        bpl loc_08c3
        cli
        jmp $0200

// --- Region $0910-$0b51 ---
.pc = $0910 "sub_0910"

// Referenced by: jsr from $088e
sub_0910: {
        sei
        jsr $e544
        lda #$bf
        sta $0314
        lda #$09
        sta $0315
        lda #$1b
        sta $d011
        lda #$32
        sta $d012
        lda #$81
        sta $d01a
        lda #$00
        sta $0b6b
        sta $dc0e
        sta $8b
        sta $8c
        sta $8f
        sta $9b
        sta $9f
        sta $d020
        sta $d021
        ldx #$17
loop1:
        sta $d400,x
        dex
        bpl loop1
        lda #$01
        sta $a5
        jsr sub_0bb7
        ldx #$00
loop2:
        lda chr_0bc0,x
        sta $0400,x
        lda $0c50,x
        sta $0490,x
        lda #$0b
        sta $d800,x
        sta $d890,x
        lda #$0b
        sta $daa8,x
        sta $dae8,x
        inx
        bne loop2
        ldx #$27
loop3:
        lda $0d50,x
        sta $05e0,x
        lda $0d78,x
        sta $0630,x
        lda #$00
        sta $d9e0,x
        sta $da30,x
        dex
        bpl loop3
        lda #$f3
        sta $d417
        lda #$1f
        sta $d418
        lda #$f0
        sta $d406
        sta $d40d
        lda #$21
        sta $d404
        sta $d40b
        lda #$05
        sta $d401
        sta $d408
        sta $d400
        lda #$09
        sta $d022
        lda #$0d
        sta $d023
        cli
        rts
}

irq_09bf:
        dec $d019
        ldx #$05

loc_09c4:
        dex
        bne loc_09c4
        ldx #$01

loc_09c9:
        ldy #$08

loc_09cb:
        lda $0b62,y
        nop
        nop
        sta $d016
        inx
        dey
        beq loc_09c9
        cpx #$50
        beq $09e3
        lda #$7f

loc_09dd:
        lsr
        bne loc_09dd
        nop
        beq loc_09cb
        lda #$15
        sta $d018
        ldx #$bf

loc_09ea:
        dex
        bne loc_09ea
        ldx #$01

loc_09ef:
        ldy #$08

loc_09f1:
        lda $0b62,y
        nop
        nop
        sta $d016
        inx
        dey
        beq loc_09ef
        cpx #$18
        beq $0a09
        lda #$7f

loc_0a03:
        lsr
        bne loc_0a03
        nop
        beq loc_09f1
        dec $9b
        bpl loc_0a42
        lda #$01
        sta $9b
        ldy $0b6a
        ldx #$06

loc_0a16:
        lda $0b63,x
        sta $0b64,x
        dex
        bpl loc_0a16
        sty $0b63
        lda $8b
        sta $d416
        cmp #$ff
        bne loc_0a2f
        lda #$01
        sta $8c

loc_0a2f:
        cmp #$00
        bne loc_0a37

chr_0a33:
        // === Charset data (4 bytes, $0a33-$0a36) ===
        .byte $a9,$00,$85,$8c                       // char 0 (partial)

loc_0a37:
        lda $8c
        bne loc_0a40
        inc $8b
        jmp loc_0a42

loc_0a40:
        dec $8b

loc_0a42:
        lda $9f
        ora #$10
        sta $d016
        lda #$13
        sta $d018
        ldx #$26
        ldy #$00

loc_0a52:
        lda $d9e0,x
        sta $d9e1,x
        lda $da31,y
        sta $da30,y
        iny
        dex
        bpl loc_0a52
        dec $0b6b
        bpl loc_0a6c
        lda #$1c
        sta $0b6b

loc_0a6c:
        ldx $0b6b
        lda $0b6c,x
        sta $d9e0
        sta $da57
        lda #$fb

loc_0a7a:
        cmp $d012
        bne loc_0a7a
        ldx $a5

loc_0a81:
        dec $9f
        dex
        bne loc_0a81
        lda $9f
        bmi loc_0a8d
        jmp loc_0b2c

loc_0a8d:
        lda $9f
        and #$07
        sta $9f
        dec $8f
        bpl loc_0ab3
        lda #$07
        sta $8f
        ldy #$00
        lda ($a7),y
        cmp #$ff
        bne loc_0aa8
        jsr sub_0bb7
        lda ($a7),y

loc_0aa8:
        sta $9e
        jsr sub_0b89
        inc $a7
        bne loc_0ab3
        inc $a8

loc_0ab3:
        ldx #$27
        ldy #$00

loc_0ab7:
        lda $06a9,y
        sta $06a8,y
        lda $06d1,y
        sta $06d0,y
        lda $06f9,y
        sta $06f8,y
        lda $0721,y
        sta $0720,y
        lda $0749,y
        sta $0748,y
        lda $0771,y
        sta $0770,y
        lda $0799,y
        sta $0798,y
        lda $07c1,y
        sta $07c0,y
        iny
        dex
        bpl loc_0ab7
        ldx #$07

loc_0aed:
        asl $03e8,x
        lda #$20
        bcc loc_0af6
        lda #$21

loc_0af6:
        sta $03f0,x
        dex
        bpl loc_0aed
        lda $03f7
        sta $06cf
        lda $03f6
        sta $06f7
        lda $03f5
        sta $071f
        lda $03f4
        sta $0747
        lda $03f3
        sta $076f
        lda $03f2
        sta $0797
        lda $03f1
        sta $07bf
        lda $03f0
        sta $07e7

loc_0b2c:
        lda $dc00
        cmp #$7b
        bne loc_0b3a
        ldx $a5
        lda $0b5a,x
        sta $a5

loc_0b3a:
        cmp #$77
        bne loc_0b45
        ldx $a5
        lda chr_0b51,x
        sta $a5

loc_0b45:
        lda $0b63
        sta $d016
        dec $d019
        jmp $ea7e

chr_0b51:
        // === Charset data (1 bytes, $0b51-$0b51) ===
        .byte $00                                   // char 0 (partial)

// --- Region $0b89-$0bbf ---
.pc = $0b89 "sub_0b89"

// Referenced by: jsr from $0aaa
sub_0b89: {
        lda $9e
        sta $8d
        lda #$00
        sta $8e
        ldx #$03
        clc
loop1:
        rol $8d
        rol $8e
        dex
        bne loop1
        lda $8e
        adc #$d0
        sta $8e
        lda #$33
        sta $01
        ldy #$00
        ldx #$07
loop2:
        lda ($8d),y
        sta $03e8,x
        iny
        dex
        bpl loop2
        lda #$37
        sta $01
        rts
}
// Referenced by: jsr from $0951, $0aa3

sub_0bb7:
        lda #$a0
        sta $a7
        lda #$0d
        sta $a8
        rts

// ============================================
// Data blocks
// ============================================

// --- Region $0800-$0800 ---
.pc = $0800 "chr_0800"

chr_0800:
        // === Charset data (1 bytes, $0800-$0800) ===
        .byte $00                                   // char 0 (partial)

// --- Region $08d0-$090f ---
.pc = $08d0 "chr_08d0"

chr_08d0:
        // === Charset data (64 bytes, $08d0-$090f) ===
        .byte $03,$12,$01,$1a,$19,$21,$21,$21       // char 0 @+0
        .byte $78,$a9,$34,$85,$01,$a2,$00,$bd       // char 1 @+1
        .byte $00,$0f,$9d,$01,$08,$ca,$d0,$f7       // char 2 @+2
        .byte $ee,$09,$02,$ee,$0c,$02,$ad,$09       // char 3 @+3
        .byte $02,$c9,$00,$d0,$e8,$a9,$37,$85       // char 4 @+4
        .byte $01,$a2,$ff,$9a,$58,$4c,$e2,$fc       // char 5 @+5
        .byte $00,$00,$00,$00,$00,$00,$00,$00       // char 6 @+6
        .byte $54,$6c,$6c,$6c,$6c,$6c,$7c,$00       // char 7 @+7

// --- Region $0b52-$0b88 ---
.pc = $0b52 "Program $0b52"
        .byte $00,$01,$02,$03,$04,$05,$06           // char 0 (partial)
        .byte $07,$01,$02,$03,$04,$05,$06,$07       // char 1 @+1
        .byte $08,$08,$d9,$d9,$da,$da,$d9,$d9       // char 2 @+2
        .byte $d8,$d8,$11,$05,$05,$05,$07,$07       // char 3 @+3
        .byte $07,$03,$03,$03,$01,$01,$01,$03       // char 4 @+4
        .byte $03,$03,$07,$07,$07,$05,$05,$05       // char 5 @+5
        .byte $00,$00,$00,$00,$00,$00,$00,$00       // char 6 @+6

// --- Region $0bc0-$0eff ---
.pc = $0bc0 "chr_0bc0"

chr_0bc0:
        // === Charset data (832 bytes, $0bc0-$0eff) ===
        .byte $20,$20,$20,$20,$21,$21,$21,$21       // char 0 @+0
        .byte $20,$20,$21,$21,$21,$21,$21,$20       // char 1 @+1
        .byte $20,$20,$21,$21,$21,$21,$20,$20       // char 2 @+2
        .byte $21,$21,$21,$21,$21,$21,$20,$21       // char 3 @+3
        .byte $21,$20,$20,$21,$21,$20,$20,$20       // char 4 @+4
        .byte $20,$20,$20,$20,$20,$20,$20,$21       // char 5 @+5
        .byte $21,$20,$20,$20,$20,$20,$21,$21       // char 6 @+6
        .byte $20,$20,$20,$20,$20,$21,$21,$20       // char 7 @+7
        .byte $21,$21,$20,$20,$20,$20,$20,$20       // char 8 @+8
        .byte $20,$20,$20,$21,$21,$20,$20,$20       // char 9 @+9
        .byte $20,$20,$20,$21,$21,$20,$20,$21       // char 10 @+10
        .byte $21,$20,$21,$21,$20,$20,$21,$21       // char 11 @+11
        .byte $20,$21,$21,$20,$20,$21,$21,$20       // char 12 @+12
        .byte $21,$21,$20,$20,$21,$21,$20,$21       // char 13 @+13
        .byte $21,$20,$20,$21,$21,$20,$20,$20       // char 14 @+14
        .byte $20,$20,$20,$21,$21,$20,$20,$20       // char 15 @+15
        .byte $20,$20,$21,$21,$20,$20,$21,$21       // char 16 @+16
        .byte $20,$21,$21,$20,$20,$21,$21,$20       // char 17 @+17
        .byte $20,$20,$20,$21,$21,$20,$20,$21       // char 18 @+18
        .byte $21,$20,$20,$21,$21,$20,$20,$20       // char 19 @+19
        .byte $20,$20,$20,$21,$21,$20,$20,$20       // char 20 @+20
        .byte $20,$20,$21,$21,$20,$21,$21,$20       // char 21 @+21
        .byte $20,$21,$21,$21,$21,$21,$21,$20       // char 22 @+22
        .byte $20,$20,$21,$21,$20,$20,$20,$20       // char 23 @+23
        .byte $21,$21,$21,$21,$21,$20,$20,$20       // char 24 @+24
        .byte $20,$20,$20,$21,$21,$20,$20,$20       // char 25 @+25
        .byte $20,$20,$21,$21,$21,$21,$20,$20       // char 26 @+26
        .byte $20,$21,$21,$20,$20,$21,$21,$20       // char 27 @+27
        .byte $20,$21,$21,$20,$20,$20,$20,$20       // char 28 @+28
        .byte $20,$20,$20,$21,$21,$20,$20,$20       // char 29 @+29
        .byte $20,$20,$20,$21,$21,$20,$20,$21       // char 30 @+30
        .byte $21,$20,$21,$21,$20,$21,$21,$20       // char 31 @+31
        .byte $20,$21,$21,$20,$20,$21,$21,$20       // char 32 ' '
        .byte $21,$21,$20,$20,$21,$21,$20,$21       // char 33 '!'
        .byte $21,$20,$20,$21,$21,$20,$20,$20       // char 34 '"'
        .byte $20,$20,$20,$21,$21,$21,$21,$21       // char 35 '#'
        .byte $21,$20,$21,$21,$21,$20,$21,$21       // char 36 '$'
        .byte $20,$21,$21,$21,$20,$21,$21,$20       // char 37 '%'
        .byte $21,$21,$21,$21,$21,$21,$20,$21       // char 38 '&'
        .byte $21,$21,$21,$21,$21,$20,$20,$20       // char 39 '''
        .byte $20,$20,$20,$21,$21,$21,$21,$21       // char 40 '('
        .byte $21,$20,$21,$21,$21,$20,$21,$21       // char 41 ')'
        .byte $20,$21,$21,$21,$20,$21,$21,$20       // char 42 '*'
        .byte $21,$21,$21,$21,$21,$21,$20,$21       // char 43 '+'
        .byte $21,$21,$21,$21,$21,$20,$20,$20       // char 44 ','
        .byte $20,$20,$20,$20,$21,$21,$21,$21       // char 45 '-'
        .byte $20,$20,$21,$21,$21,$20,$21,$21       // char 46 '.'
        .byte $20,$21,$21,$21,$20,$21,$21,$20       // char 47 '/'
        .byte $21,$21,$21,$21,$21,$21,$20,$20       // char 48 '0'
        .byte $21,$21,$21,$21,$20,$20,$20,$20       // char 49 '1'
        .byte $20,$20,$20,$20,$20,$20,$20,$20       // char 50 '2'
        .byte $20,$20,$20,$20,$10,$12,$0f,$15       // char 51 '3'
        .byte $04,$0c,$19,$20,$10,$12,$05,$13       // char 52 '4'
        .byte $05,$0e,$14,$13                       // char 53 (partial)

txt_0d6c:
        .byte $20,$20,$20,$20                       // char 53 (partial)
        .byte $20,$20,$20,$20,$20,$20,$20,$20       // char 54 '6'
        .byte $20,$20,$20,$20,$20,$20,$20,$20       // char 55 '7'
        .byte $20,$20,$12,$05,$16,$05,$0e,$07       // char 56 '8'
        .byte $05,$20,$0f,$06,$20,$04,$05,$06       // char 57 '9'
        .byte $05,$0e,$04,$05,$12                   // char 58 (partial)

txt_0d95:
        .byte $21,$20,$20                           // char 58 (partial)
        .byte $20,$20,$20,$20,$20,$20,$20,$20       // char 59 ';'
        .byte $20,$27,$12,$05,$16,$05,$0e,$07       // char 60 '<'
        .byte $05,$20,$0f,$06,$20,$04,$05,$06       // char 61 '='
        .byte $05,$0e,$04,$05,$12,$27,$20,$02       // char 62 '>'
        .byte $19,$20,$05,$10,$19,$18,$20,$17       // char 63 '?'
        .byte $01,$13,$20,$03,$12,$01,$03,$0b       // char 64 '@'
        .byte $05,$04,$20,$02,$19,$20,$0e,$05       // char 65 'A'
        .byte $03,$20,$01,$0e,$04,$20,$09,$0d       // char 66 'B'
        .byte $10,$0f,$12,$14,$05,$04,$20,$14       // char 67 'C'
        .byte $0f,$20,$05,$15,$12,$0f,$10,$05       // char 68 'D'
        .byte $20,$02,$19,$20,$0d,$01,$12,$14       // char 69 'E'
        .byte $09,$0e,$2f,$03,$12,$01,$1a,$19       // char 70 'F'
        .byte $20,$0f,$0e                           // char 71 (partial)

txt_0dfb:
        .byte $20,$37,$2f,$39,$2f                   // char 71 (partial)
        .byte $38,$39,$21,$20,$20,$20,$20,$20       // char 72 'H'
        .byte $07,$12,$05,$05,$14,$09,$0e,$07       // char 73 'I'
        .byte $13,$20,$0f,$0e,$0c,$19,$20,$14       // char 74 'J'
        .byte $0f,$3a,$20,$20,$03,$0f,$13,$0d       // char 75 'K'
        .byte $0f,$13,$20,$2d,$20,$04,$03,$13       // char 76 'L'
        .byte $20,$2d,$20,$06,$34,$03,$07,$20       // char 77 'M'
        .byte $2d,$20,$10,$01,$0e,$09,$0e,$01       // char 78 'N'
        .byte $12,$0f                               // char 79 (partial)

txt_0e3a:
        .byte $20,$20,$2e,$2e,$2e,$09               // char 79 (partial)
        .byte $0e,$20,$05,$15,$12,$0f,$10,$05       // char 80 'P'

txt_0e48:
        .byte $20,$20,$20,$20,$05,$18,$0f,$04       // char 81 'Q'
        .byte $15,$13,$20,$01,$0e,$04,$20,$01       // char 82 'R'
        .byte $12,$03,$01,$0e,$01                   // char 83 (partial)

txt_0e5d:
        .byte $20,$20,$2e                           // char 83 (partial)
        .byte $2e,$2e,$09,$0e,$20,$14,$08,$05       // char 84 'T'
        .byte $20,$13,$14,$01,$14,$05,$13           // char 85 (partial)

txt_0e6f:
        .byte $21                                   // char 85 (partial)
        .byte $20,$20,$20,$20,$14,$05,$03,$08       // char 86 'V'
        .byte $0e,$09,$11,$15,$05,$2f,$06,$01       // char 87 'W'
        .byte $0e,$14,$01,$0c,$01,$0d,$05,$3a       // char 88 'X'
        .byte $20,$20,$06,$15,$03,$0b,$20,$0f       // char 89 'Y'
        .byte $06,$20,$19,$01,$20,$04,$01,$0d       // char 90 'Z'
        .byte $0e,$20,$0d,$0f,$14,$08,$05,$12       // char 91 '['
        .byte $06,$15,$03,$0b,$05,$12,$01,$13       // char 92 '\'
        .byte $13,$2e,$20,$13,$14,$01,$12,$16       // char 93 ']'
        .byte $05,$20,$09,$0e,$20,$08,$05,$0c       // char 94 '^'
        .byte $0c                                   // char 95 (partial)

txt_0eb9:
        .byte $2e,$2e,$2e,$20,$20,$20,$20           // char 95 (partial)
        .byte $20,$20,$20,$20,$20,$0c,$01,$04       // char 96 '`'
        .byte $01                                   // char 97 (partial)

txt_0ec9:
        .byte $21                                   // char 97 (partial)

dat_0eca:
        // === Fill data (54 bytes, $0eca-$0eff) ===
        .fill 54, $20
