// ============================================
// output - Disassembled Source
// ============================================
// KickAssembler syntax
// Generated by Restore 64 v0.2.1 alpha build 298, 2026-04-11 21:37:17
// https://restore64.dev by datucker / Rabenauge
//
// Load address: $0801  End: $1209  (2569 bytes)
// Crunched with PuCrunch — depacked by emulation
// Packer entry: $080d (via BASIC SYS 2061)
// Entry point:  $0c00 (3072)
// IRQ handler:  $ea31 (irq_ea31)
// IRQ handler:  $0ca3 (irq_0ca3)
//
// Code: 590 bytes, Data: 1979 bytes
// Labels: 76, Subroutines: 5
//
// Verification: 2 line(s) auto-corrected to .byte for exact byte matching
//
// Cross-references: all OK
// ============================================


// --- Region $0c00-$0cd5 ---
.pc = $0c00 "main_0c00"

main_0c00:
        lda #$00
        sta $c8
        sta $a4
        sta $d011
        nop
        nop
        nop
        nop
        nop
        ldx #$00

loc_0c10:
        lda dat_0eac,x
        cmp #$00
        beq loc_0c1d
        jsr $ffd2
        inx
        bne loc_0c10

loc_0c1d:
        sei
        jsr sub_0d04
        lda #$a3
        ldy #$0c
        sta $0314
        sty $0315
        lda #$1b
        sta $d011
        lda #$7f
        sta $dc0d
        lda #$01
        sta $d01a
        lda #$13
        sta $d018
        cli

loc_0c40:
        jsr $ffe4
        beq loc_0c40
        sei
        jsr $fda3
        jsr $ff5b
        lda #$ea
        sta $0315
        lda #$31
        sta $0314
        lda #$f0
        sta $d01a
        sta $d020
        sta $d021
        ldx #$00

loc_0c63:
        lda dat_0c72,x
        sta $0400,x
        inx
        cpx #$31
        bne loc_0c63
        cli
        jmp $0400

dat_0c72:
        .byte $78,$a9,$00,$85,$01                   // x....

loc_0c77:
        ldx #$00

loc_0c79:
        lda $1200,x
        sta dat_0801,x
        inx
        bne loc_0c79
        inc $0409
        inc $040c
.label loc_0c89 = * + 1
        lda $0409
        cmp #$70
        bne loc_0c77
        lda #$c0
        sta $af
        sta $2e
        lda #$00
        sta $ae
        sta $2d
        lda #$37
        sta $01
        cli
        jmp $fce2

irq_0ca3:
        sei
        lda #$01
        sta $d019
        ldx $c8
        lda dat_0cd4,x
        sta $d021
        sta $d020
        lda $0ce0,x
        sta $d016
        lda $0cec,x
        sta $d012
        lda $0cf8,x
        sta $c8
        txa
        beq loc_0cce
        pla
        tay
        pla
        tax
        pla
        rti

loc_0cce:
        jsr sub_0e04
        jmp loc_0d25

dat_0cd4:
        .byte $00,$0b                               // ..

// --- Region $0d04-$0dda ---
.pc = $0d04 "sub_0d04"
// Referenced by: jsr from $0c1e

sub_0d04:
        lda #$0e
        sta $35
        lda #$0f
        sta $36
        lda #$00
        sta $02a7
        lda #$02
        sta $02a8
        ldx #$00
        lda #$20

loc_0d1a:
        sta $05e0,x
        inx
        cpx #$28
        bne loc_0d1a
        jmp loc_0d39

loc_0d25:
        ldy $da08
        ldx #$28

loc_0d2a:
        lda $d9df,x
        sta $d9e0,x
        dex
        bne loc_0d2a
        sty $d9e0
        jmp $ea31

loc_0d39:
        lda #$00
        tay
        sta $fb
        sta $fd
        sta $02
        lda #$d0
        sta $fc
        lda #$08
        sta $fe
        lda #$0a
        sta $03
        sei
        lda #$33
        sta $01

loc_0d53:
        lda #$00
        pha
        lda ($fb),y
        tax
        and #$80
        beq loc_0d61
        pla
        eor #$c0
        pha

loc_0d61:
        txa
        and #$40
        beq loc_0d6a
        pla
        eor #$30
        pha

loc_0d6a:
        txa
        and #$20
        beq loc_0d73
        pla
        eor #$0c
        pha

loc_0d73:
        txa
        and #$10
        beq loc_0d7c
        pla
        eor #$03
        pha

loc_0d7c:
        pla
        and #$fc
        sta ($fd),y
        lda #$00
        pha
        txa
        and #$08
        beq loc_0d8d
        pla
        eor #$c0
        pha

loc_0d8d:
        txa
        and #$04
        beq loc_0d96
        pla
        eor #$30
        pha

loc_0d96:
        txa
        and #$02
        beq loc_0d9f
        pla
        eor #$0c
        pha

loc_0d9f:
        txa
        and #$01
        beq loc_0da8
        pla
        eor #$03
        pha

loc_0da8:
        pla
        sta ($02),y
        iny
        bne loc_0d53
        inc $fc
        inc $fe
        inc $03
        lda $fc
        cmp #$d2
        bne loc_0d53
        lda #$37
        sta $01
        cli
        jsr sub_0dcd
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        rts
// Referenced by: jsr from $0dbf

sub_0dcd:
        ldx #$00

loc_0dcf:
        lda dat_0ddb,x
        sta $d9e0,x
        inx
        cpx #$29
        bne loc_0dcf
        rts

// --- Region $0e04-$0eab ---
.pc = $0e04 "sub_0e04"
// Referenced by: jsr from $0cce

sub_0e04:
        dec $02a8
        dec $02a8
        lda $02a8
        bne loc_0e14
        lda #$08
        sta $02a8

loc_0e14:
        ldx $02a8
        cpx #$08
        bne loc_0e26
        jsr sub_0e9e
        lda #$c7
        sta $0ce6
        jsr sub_0e73

loc_0e26:
        cpx #$07
        bne loc_0e2f
        lda #$c6
        sta $0ce6

loc_0e2f:
        cpx #$06
        bne loc_0e38
        lda #$c5
        sta $0ce6

loc_0e38:
        cpx #$05
        bne loc_0e41
        lda #$c4
        sta $0ce6

loc_0e41:
        cpx #$04
        bne loc_0e4a
        lda #$c3
        sta $0ce6

loc_0e4a:
        cpx #$03
        bne loc_0e53
        lda #$c2
        sta $0ce6

loc_0e53:
        cpx #$02
        bne loc_0e5c
        lda #$c1
        sta $0ce6

loc_0e5c:
        cpx #$01
        bne loc_0e65
        lda #$c0
        sta $0ce6

loc_0e65:
        rts

loc_0e66:
        lda #$0e
        sta $35
        lda #$0f
        sta $36
        lda #$00
        sta $02a7

// Referenced by: jsr from $0e23
sub_0e73: {
        lda $a4
        beq skip
        ldy $02a7
        lda ($35),y
        beq loc_0e66
        eor #$40
        sta $0607
        lda #$00
        sta $a4
        inc $02a7
        bne done
        inc $36
done:
        rts
skip:
        ldy $02a7
        lda ($35),y
        beq loc_0e66
        sta $0607
        lda #$01
        sta $a4
        rts
}
// Referenced by: jsr from $0e1b

sub_0e9e:
        ldx #$00

loc_0ea0:
        lda $05e1,x
        sta $05e0,x
        inx
        cpx #$28
        bne loc_0ea0
        rts

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

// --- Region $0801-$0bff ---
.pc = $0801 "dat_0801"

dat_0801:
        // === BASIC loader stub ===
        .byte $0b,$08                               // next line pointer ($080b)
        .byte $ef,$00                                                     // [corrected] was: .byte $00,$00                               // line number 0
        .byte $9e                                   // SYS token
        .byte $32,$30,$36,$31
        .byte $00                                   // end of line
        .byte $00,$00                               // end of BASIC program
        .byte $78,$2c,$30,$d0,$a9,$38,$85,$01,$a2,$34,$bd,$42,$08,$9d,$ff,$01 // x,0..8...4.B....
        .byte $ca,$d0,$f7,$a2,$e6,$bd,$75,$08,$9d,$f6,$00,$ca,$d0,$f7,$a0,$04 // ......u.........
        .byte $ca,$bd,$31,$08,$9d,$0a,$0d,$8a,$d0,$f6,$ce,$33,$08,$ce,$30,$08 // ..1........3..0.
        .byte $88,$d0,$ed,$4c,$18,$01,$48,$ad,$23,$0e,$2a,$85,$f7,$ee,$02,$02 // ...L..H.#.*.....
        .byte $d0,$03,$ee,$03,$02,$68,$60,$e8,$8a,$06,$f7,$d0,$03,$20,$00,$02 // .....h`...... ..
        .byte $90,$12,$e8,$e0,$08,$d0,$f2,$f0,$0b,$a2,$07,$e8,$06,$f7,$d0,$03 // ................
        .byte $20,$00,$02,$2a,$ca,$d0,$f5,$18,$60,$80,$01,$8d,$00,$0c,$e6,$fa //  ..*....`.......
        .byte $f0,$02,$ca,$60,$e6,$fb,$ca,$60,$a4,$f8,$a2,$02,$20,$2f,$02,$85 // ...`...`.... /..
        .byte $f8,$98,$a2,$06,$20,$2f,$02,$20,$f9,$00,$a0,$00,$98,$a2,$02,$20 // .... /. ....... 
        .byte $2f,$02,$c5,$f8,$d0,$ec,$20,$11,$02,$85,$2d,$4a,$d0,$45,$06,$f7 // /..... ...-J.E..
        .byte $d0,$03,$20,$00,$02,$90,$4a,$06,$f7,$d0,$03,$20,$00,$02,$90,$c8 // .. ...J.... ....
        .byte $c8,$20,$11,$02,$85,$2d,$c9,$80,$90,$0b,$a2,$01,$20,$26,$02,$85 // . ...-...... &..
        .byte $2d,$20,$11,$02,$a8,$20,$11,$02,$aa,$bd,$bc,$01,$e0,$20,$90,$06 // - ... ....... ..
        .byte $8a,$a2,$03,$20,$26,$02,$a6,$2d,$e8,$20,$f9,$00,$d0,$fb,$88,$d0 // ... &..-. ......
        .byte $f8,$f0,$a7,$20,$11,$02,$c9,$ff,$f0,$32,$e9,$00,$a2,$00,$20,$2f // ... .....2.... /
        .byte $02,$85,$2e,$20,$23,$02,$65,$fa,$a6,$2d,$8d,$94,$01,$a5,$fb,$e5 // ... #.e..-......
        .byte $2e,$8d,$95,$01,$e8,$b9,$aa,$aa,$91,$fa,$c8,$ca,$d0,$f7,$88,$98 // ................
        .byte $38,$65,$fa,$85,$fa,$90,$02,$e6,$fb,$4c,$18,$01,$a9,$37,$85,$01 // 8e.......L...7..
        .byte $2c,$30,$d0,$a5,$fa,$85,$2d,$a5,$fb,$85,$2e,$58,$4c,$00,$0c,$20 // ,0....-....XL.. 
        .byte $11,$00,$0b,$0c,$21,$2e,$ea,$05,$0f,$30,$39,$c8,$cd,$a9,$00,$85 // ....!....09.....
        .byte $c8,$85,$a4,$8d,$11,$d0,$5e,$38,$51,$00,$5e,$d6,$07,$64,$80,$78 // ......^8Q.^..d.x
        .byte $03,$10,$69,$7f,$f4,$68,$79,$a9,$e0,$80,$10,$36,$a6,$8e,$80,$32 // ..i..hy....6...2
        .byte $34,$50,$0e,$30,$54,$0e,$a4,$6d,$8d,$9a,$95,$3f,$c6,$86,$ee,$54 // 4P.0T..m...?...T
        .byte $80,$c6,$8d,$27,$b0,$9c,$68,$c6,$82,$96,$08,$39,$3f,$fc,$3e,$d3 // ...'..h....9?.>.
        .byte $62,$8f,$f4,$81,$4b,$7f,$f5,$3d,$51,$ac,$6d,$18,$b1,$a5,$53,$e0 // b...K..=Q.m...S.
        .byte $c6,$fc,$69,$02,$7e,$90,$e8,$31,$5a,$ab,$20,$c9,$4e,$80,$02,$74 // ..i.~..1Z. .N..t
        .byte $70,$18,$e8,$7a,$ac,$26,$47,$bb,$c5,$11,$a0,$34,$75,$00,$09,$49 // p..z.&G....4u..I
        .byte $74,$04,$21,$26,$fd,$fb,$82,$41,$3b,$83,$01,$2b,$53,$eb,$25,$4e // t.!&...A;..+S.%N
        .byte $1a,$1d,$15,$38,$10,$b5,$f0,$a5,$cc,$6f,$57,$42,$96,$d4,$9b,$a6 // ...8.....oWB....
        .byte $c2,$67,$f1,$7e,$29,$e1,$89,$11,$9d,$0a,$6c,$8b,$dd,$44,$77,$21 // .g.~).....l..Dw!
        .byte $6a,$aa,$f7,$81,$3d,$c5,$93,$eb,$b1,$3e,$84,$93,$eb,$e0,$31,$0f // j...=....>....1.
        .byte $e2,$91,$3d,$5d,$15,$0d,$15,$4d,$08,$18,$a0,$1c,$98,$4a,$1a,$00 // ..=]...M.....J..
        .byte $16,$18,$1e,$18,$17,$e5,$f5,$be,$7d,$5d,$1e,$9f,$e1,$62,$a3,$e7 // ........}]...b..
        .byte $28,$69,$ab,$2c,$6d,$c0,$40,$80,$c1,$01,$41,$81,$c2,$02,$42,$b3 // (i.,m.@...A...B.
        .byte $5e,$a4,$3a,$14,$d6,$a4,$3e,$14,$db,$22,$63,$69,$c0,$aa,$40,$a3 // ^.:...>.."ci..@.
        .byte $6a,$00,$b1,$86,$a4,$82,$77,$4c,$00,$a8,$98,$51,$a1,$f0,$a4,$c3 // j.....wL...Q....
        .byte $90,$da,$c0,$8d,$aa,$22,$8b,$dd,$fd,$94,$ed,$d9,$ca,$44,$f8,$c4 // .....".......D..
        .byte $fa,$52,$61,$8f,$52,$69,$d4,$42,$fd,$c2,$fe,$c2,$a6,$7e,$84,$2f // .Ra.Ri.B.....~./
        .byte $e5,$48,$44,$2f,$f5,$48,$54,$28,$1a,$2a,$99,$a2,$62,$73,$29,$22 // .HD/.HT(.*..bs)"
        .byte $c7,$ee,$a8,$a6,$03,$c0,$11,$5d,$09,$3a,$c0,$48,$8a,$29,$40,$eb // .......].:.H.)@.
        .byte $dc,$c3,$8f,$72,$0e,$bd,$c3,$38,$f7,$10,$eb,$dc,$0d,$21,$a0,$a7 // ...r...8.....!..
        .byte $4f,$92,$3f,$ac,$69,$27,$78,$43,$b6,$a0,$23,$b6,$a0,$13,$b6,$a0 // O.?.i'xC..#.....
        .byte $0b,$a6,$a4,$88,$16,$46,$85,$2f,$37,$e7,$37,$f7,$30,$1d,$2f,$e6 // .....F./7.7.0./.
        .byte $4e,$96,$84,$cb,$89,$c2,$41,$9a,$1a,$be,$3c,$14,$c0,$c9,$55,$b6 // N.....A...<...U.
        .byte $1a,$c2,$da,$24,$14,$e8,$7a,$a9,$80,$05,$6e,$4b,$65,$6c,$2d,$56 // ...$..z...nKel-V
        .byte $c2,$d9,$0f,$01,$7d,$0f,$30,$fc,$e4,$0f,$63,$f6,$b5,$3f,$74,$01 // ....}.0...c..?t.
        .byte $50,$dd,$80,$2a,$e4,$fd,$e0,$08,$d0,$0b,$20,$9e,$0e,$a9,$c7,$8d // P..*...... .....
        .byte $e6,$0c,$20,$53,$98,$77,$00,$3b,$1c,$b8,$cc,$7a,$70,$03,$31,$ef // .. S.w.;...zp.1.
        .byte $8a,$d7,$b8,$2b,$1e,$f8,$8d,$7b,$82,$31,$ef,$86,$d7,$b8,$1b,$1e // ...+...{.1......
        .byte $f8,$4d,$7b,$b5,$71,$82,$d7,$b8,$0b,$1e,$f8,$0c,$7b,$a9,$81,$e9 // .M{.q.......{...
        .byte $27,$a9,$69,$3c,$06,$2b,$13,$e6,$c4,$d7,$c3,$a1,$49,$2a,$40,$8d // '.i<.+......I*@.
        .byte $07,$06,$64,$12,$a4,$ee,$4f,$0d,$00,$2e,$63,$65,$30,$39,$74,$68 // ..d...O...ce09th
        .byte $35,$d4,$02,$9d,$4d,$17,$f0,$82,$ba,$8e,$e8,$5f,$37,$26,$bb,$17 // 5...M......_7&..
        .byte $c0,$a8,$2c,$24,$cc,$c4,$fc,$f8,$fe,$44,$c4,$27,$95,$3a,$76,$71 // ..,$.....D.'.:vq
        .byte $02,$3e,$3a,$ae,$aa,$a6,$a2,$9e,$9c,$f6,$9e,$a0,$6c,$f3,$2c,$b3 // .>:.........l.,.
        .byte $d4,$b4,$a3,$45,$2f,$2d,$17,$16,$8d,$18,$f3,$59,$d9,$20,$8d,$04 // ...E/-.....Y. ..
        .byte $dc,$d4,$3c,$32,$03,$19,$78,$9c,$dc,$e7,$f6,$7d,$00,$10,$0a,$04 // ..<2..x....}....
        .byte $04,$89,$90,$08,$09,$07,$83,$89,$00,$86,$90,$71,$ea,$05,$9e,$a1 // ...........q....
        .byte $60,$a1,$c5,$99,$da,$02,$07,$9f,$00,$84,$00,$21,$d9,$f8,$06,$1e // `..........!....
        .byte $1c,$2c,$0a,$24,$29,$c7,$90,$30,$78,$91,$00,$26,$6d,$85,$90,$67 // .,.$)..0x..&m..g
        .byte $76,$5e,$9a,$16,$98,$99,$67,$e9,$c9,$c1,$b6,$66,$0c,$e5,$c8,$68 // v^....g....f...h
        .byte $1e,$77,$6d,$d0,$c4,$83,$78,$de,$f2,$17,$01,$14,$03,$08,$cd,$51 // .wm...x........Q
        .byte $51,$4f,$0c,$80,$dc,$db,$0f,$c9,$3c,$b8,$20,$e2,$d0,$4c,$27,$8b // QO......<. ..L'.
        .byte $f0,$f0,$6f                           // ..o

// --- Region $0cd6-$0d03 ---
.pc = $0cd6 "Program $0cd6"
        .byte $0c,$0f,$0c,$0b,$00,$0b,$0c,$0f,$0c,$0b,$c8,$c8,$c8,$c8,$c8,$c8 // ................
        .byte $c8,$c8,$c8,$c8,$c8,$c8,$74,$7a,$7f,$85,$8a,$8f,$9c,$a1,$a6,$ac // ......tz........
        .byte $b1,$b7,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$00 // ..............

// --- Region $0ddb-$0e03 ---
.pc = $0ddb "dat_0ddb"

dat_0ddb:
        .byte $01,$0f,$0f,$0c,$0c,$0b,$0b,$00,$00,$0b,$0b,$0c,$0c,$0f,$01,$0f // ................
        .byte $0c,$0c,$0b,$0b,$00,$00,$0b,$0b,$0c,$0c,$0f,$01,$0f,$0c,$0c,$0b // ................
        .byte $0b,$00,$00,$0b,$0b,$0c,$0c,$0f,$0f   // .........

// --- Region $0eac-$1209 ---
.pc = $0eac "dat_0eac"

dat_0eac:
        .byte $9b,$93,$11,$11,$11,$11               // ......

txt_0eb2:
        .text "         B"
        .byte $c2                                   // 'B' | $80 (end-of-string marker)
        .byte $4c,$cc,$4f,$cf,$4f,$cf,$44,$c4,$27,$a7,$4e,$ce // L.O.O.D.'.N.

txt_0ec9:
        .text " G"
        .byte $c7                                   // 'G' | $80 (end-of-string marker)
        .byte $55,$d5,$54,$d4,$53,$d3               // U.T.S.

txt_0ed2:
        .text "        "
        .byte $11,$11,$11,$11,$11,$11,$11,$0d,$11,$11,$11,$11,$11,$11 // ..............

txt_0ee8:
        .text "    B"
        .byte $c2                                   // 'B' | $80 (end-of-string marker)
        .byte $52,$d2,$4f,$cf,$4b,$cb,$45,$c5,$4e,$ce // R.O.K.E.N.

txt_0ef8:
        .text " B"
        .byte $c2                                   // 'B' | $80 (end-of-string marker)
        .byte $59,$d9                               // Y.

txt_0efd:
        .text " T"
        .byte $d4                                   // 'T' | $80 (end-of-string marker)
        .byte $4d,$cd,$43,$c3                       // M.C.

txt_0f04:
        .text " 1"
        .byte $b1                                   // '1' | $80 (end-of-string marker)
        .byte $39,$b9,$39,$b9,$31,$b1,$00           // 9.9.1..

txt_0f0e:
        .encoding "screencode_mixed"
        .text " this program is broken, packed and converted for disk on"
        .encoding "petscii_upper"

txt_0f47:
        .text " 14-12-1986 "
        .byte $02,$19,$20,$14,$0d,$03               // .. ...

txt_0f59:
        .text " 1991 .....      "

txt_0f6a:
        .encoding "screencode_mixed"
        .text "watch out for my other version of this game"
        .encoding "petscii_upper"

txt_0f95:
        .text " !!!!      "

txt_0fa0:
        .encoding "screencode_mixed"
        .text "thanx to zcram! for the original"
        .encoding "petscii_upper"

txt_0fc0:
        .text " !!!!     "

txt_0fca:
        .encoding "screencode_mixed"
        .text "hyper dynamic greetings to: jazzcat, triad, zcram from c.c.soft, hotline!, all american friends, flash and the"
        .encoding "petscii_upper"

txt_1038:
        .text " 1001-"
        .byte $03,$12,$05,$17                       // ....

txt_1042:
        .text " ....    "

txt_104b:
        .encoding "screencode_mixed"
        .text "normal greetings to: twi (nero,theo and gizmo), ttf, trm, twr, softrunner, dynamite, skip, irata, firef. and the whole bunch of people i ever met or have spoken to"
        .encoding "petscii_upper"

txt_10ee:
        .text " !!!!!           "

txt_10ff:
        .encoding "screencode_mixed"
        .text "watch out for gauntlet"
        .encoding "petscii_upper"

txt_1115:
        .text " ...."

dat_111a:
        // === Fill data (35 bytes, $111a-$113c) ===
        .fill 35, $20

txt_113d:
        .encoding "screencode_mixed"
        .text "destroy any key on your keyboard to start the game"
        .encoding "petscii_upper"

txt_116f:
        .text "......."

dat_1176:
        // === Fill data (32 bytes, $1176-$1195) ===
        .fill 32, $20
        // === Sine/lookup table (42 bytes, range $00-$2a) ===
        .byte $2a,$14,$0d,$03                       // *...

txt_119a:
        .text "*                             "
        .byte $00                                   // string terminator
        .byte $00,$00,$00,$00,$00,$00,$00           // .......

dat_11c0:
        // === Fill data (64 bytes, $11c0-$11ff) ===
        .fill 64, $cd
        .byte $95,$6f,$d8,$de,$ee,$fe,$ff,$6e,$ff,$fe // .o.....n..
