// ============================================
// output - Disassembled Source
// ============================================
// KickAssembler syntax
// Generated by Restore 64 v0.2.1 alpha build 298, 2026-04-01 10:59:20
// https://restore64.dev by datucker / Rabenauge
//
// Load address: $0801  End: $0fff  (2047 bytes)
// Entry point:  $0ed0 (via BASIC SYS 3792)
// IRQ handler:  $ea31 (irq_ea31)
// IRQ handler:  $0e00 (irq_0e00)
//
// Code: 684 bytes, Data: 1363 bytes
// Labels: 58, Subroutines: 8
//
// Cross-references: all OK
// ============================================


// --- Region $088d-$08a0 ---
.pc = $088d "Program $088d"
        inc.abs $007b,x
        sed
        inc $fc06,x
        dec $c6
        dec $00
        ror $c0fe,x
        .byte $7c,$06,$fe                           // nop $fe06,x // ILLEGAL
        .byte $fc,$00,$f8                           // nop $f800,x // ILLEGAL

// --- Region $0980-$099d ---
.pc = $0980 "sub_0980"
// Referenced by: jsr from $0ef7

sub_0980:
        ldx #$00

loc_0982:
        lda txt_099e,x
        sta $04c8,x
        lda $09bd,x
        sta $07c0,x
        lda #$02
        sta $d8c8,x
        lda #$0e
        sta $dbc0,x
        inx
        cpx #$28
        bne loc_0982
        rts

// --- Region $0c40-$0c9d ---
.pc = $0c40 "sub_0c40"

// Referenced by: jsr from $0c90
sub_0c40: {
        nop
        nop
        nop
        lda #$00
        sta $d020
        sta $d021
        lda #$08
        jsr $ffd2
        ldx #$00
loop:
        lda txt_0ca0,x
        sta $07f8,x
        lda $0ca8,x
        sta $d000,x
        lda $0cb0,x
        sta $d027,x
        nop
        nop
        inx
        cpx #$08
        bne loop
        ldx #$ff
        stx $d015
        ldx #$0e
        stx $d01d
        rts
}

// Referenced by: jsr from $0c93
sub_0c76: {
        ldx #$00
loop:
        lda dat_0eb2,x
        sta $0800,x
        inx
        cpx #$10
        bne loop
        rts
}
// Referenced by: jsr from $0c96

sub_0c84:
        lda $d018
        and #$f0
        clc
        ora #$02
        sta $d018
        rts

loc_0c90:
        jsr sub_0c40
        jsr sub_0c76
        jsr sub_0c84
        jmp loc_0cc0

dat_0c9c:
        .byte $07,$60                               // .`

// --- Region $0cc0-$0eb1 ---
.pc = $0cc0 "loc_0cc0"

loc_0cc0:
        lda #$10
        sta $d010
        lda #$20
        sta $d008
        lda #$80
        sta $d009
        lda #$ff
        sta $d015
        lda #$01
        sta $d02c

loc_0cd9:
        ldy #$00

smc_0cdb:
        inc $07f8                                   // !SMC: modified by $0cf2, $0d05, $0ee9

smc_0cde:
        inc $07fc                                   // !SMC: modified by $0cf5, $0d08, $0eec
        jsr sub_0e58
        iny
        cpy #$05
        bne smc_0cdb
        lda smc_0cde
        cmp #$ee
        beq loc_0d03
        lda #$ee
        sta smc_0cdb                                // SMC: modifies $0cdb
        sta smc_0cde                                // SMC: modifies $0cde
        lda #$01
        sta $d027
        sta $d02b
        jmp loc_0d13

loc_0d03:
        lda #$ce
        sta smc_0cdb                                // SMC: modifies $0cdb
        sta smc_0cde                                // SMC: modifies $0cde
        lda #$0e
        sta $d027
        sta $d02b

loc_0d13:
        jsr $ffe4
        cmp #$20
        beq loc_0d82
        jmp loc_0cd9
// Referenced by: jsr from $0d4d; branch from $0d2c

sub_0d1d:
        dec $d003
        dec $d005
        dec $d007
        jsr sub_0e58
        lda $d003
        bne sub_0d1d
        rts

loc_0d2f:
        lda #$04
        sta smc_0e59                                // SMC: modifies $0e59
        jmp loc_0d4d
// Referenced by: jsr from $0d60

sub_0d37:
        lda $07f8
        sta $07f9
        lda #$ff
        sta $d002
        lda #$80
        sta $d003
        lda #$00
        sta $d01d
        rts

loc_0d4d:
        jsr sub_0d1d

loc_0d50:
        inc $d000
        dec $d008
        jsr sub_0e58
        lda $d008
        cmp #$ff
        bne loc_0d50
        jsr sub_0d37
        lda #$03
        sta $d015
        lda $d027
        sta $d028

loc_0d6e:
        inc $d000
        dec $d002
        lda $d000
        cmp $d002
        beq loc_0d93
        jsr sub_0e58
        jmp loc_0d6e

loc_0d82:
        lda #$31
        sta $0314
        lda #$ea
        sta $0315
        cli
        jsr $e544
        jmp loc_0d2f

loc_0d93:
        lda #$01
        sta $d015

loc_0d98:
        dec $d001
        jsr sub_0e58
        lda $d001
        bne loc_0d98
        dec $d015
        lda #$00
        sta $d418
        nop
        ldx #$00

loc_0dae:
        lda loc_0dc0,x
        sta $033c,x
        inx
        cpx #$40
        bne loc_0dae
        lda #$36
        sta $01
        jmp $033c

loc_0dc0:
        lda #$1b
        sta $d011
        lda #$15
        sta $d018
        lda #$01
        ldx #$08
        sta $fa
        stx $fb
        lda #$00
        ldx #$10
        sta $fc
        stx $fd

loc_0dda:
        ldy #$00

loc_0ddc:
        lda ($fc),y
        sta ($fa),y
        iny
        bne loc_0ddc
        inc $d020
        inc $fb
        inc $d021
        inc $fd
        lda $fd
        cmp #$b6
        bne loc_0dda
        lda #$00
        sta $d021
        lda #$37
        sta $01
        jmp $fce2

dat_0dff:
        .byte $ea                                   // .
irq_0e00: {
        lda #$0f
        nop
        ldy #$27
loop1:
        sta $da80,y
        dey
        bpl loop1
        dec $37
        lda $37
        and #$07
        cmp #$07
        bne skip
        ldx #$00
loop2:
        lda $0680,x
        sta $067f,x
        inx
        cpx #$27
        bne loop2
        inc $0e26
        lda $0fff
        sta $06a6
        inc $3d
        bne skip
        inc $3e
skip:
        lda $37
        and #$07
        ora #$00
        tax
loop3:
        lda $d012
        cmp #$ab
        bne loop3
        stx $d016
loop4:
        lda $d012
        cmp #$bb
        bne loop4
        lda #$00
        sta $d016
loop5:
        lda $d012
        cmp #$bc
        bne loop5
        jmp $ea31
}
// Referenced by: jsr from $0ce1, $0d26, $0d56, $0d7c, $0d9b

sub_0e58:
.label smc_0e59 = * + 1
        lda #$10                                    // !SMC: modified by $0d31, $0ef1
        sta dat_0c9c
        sta $0c9d

loc_0e60:
        dec $0c9d
        bne loc_0e60
        dec dat_0c9c
        bne loc_0e60
        rts
// Referenced by: jsr from $0ef4

sub_0e6b:
        ldx #$00

loc_0e6d:
        lda #$00
        sta $d400,x
        inx
        cpx #$19
        bne loc_0e6d
        lda #$00
        sta $d400
        lda #$05
        sta $d401
        sta $d408
        lda #$08
        sta $d407
        nop
        nop
        nop
        lda #$00
        sta $d405
        sta $d40c
        lda #$ff
        sta $d406
        sta $d40d
        lda #$20
        sta $d404
        sta $d40b
        lda #$0f
        sta $d418
        lda #$21
        sta $d404
        sta $d40b
        rts

// --- Region $0ed0-$0efe ---
.pc = $0ed0 "main_0ed0"

main_0ed0:
        sei
        lda #$00
        sta $0314
        lda #$0e
        sta $0315
        cli
        jsr $e544
        lda #$00
        sta $d020
        sta $d021
        lda #$ee
        sta smc_0cdb                                // SMC: modifies $0cdb
        sta smc_0cde                                // SMC: modifies $0cde
        lda #$10
        sta smc_0e59                                // SMC: modifies $0e59
        jsr sub_0e6b
        jsr sub_0980
        jmp loc_0c90

dat_0efd:
        .byte $ea,$ea                               // ..

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

// --- Region $0801-$088c ---
.pc = $0801 "dat_0801"

dat_0801:
        // === BASIC loader stub ===
        .byte $0b,$08                               // next line pointer ($080b)
        .byte $01,$00                               // line number 1
        .byte $9e                                   // SYS token
        .text "3792"                                // SYS 3792 → main_0ed0
        .byte $00                                   // end of line
        .byte $00,$00                               // end of BASIC program
        .byte $c6,$c6,$00,$fc,$fe,$06,$fc,$c6,$fe,$fc,$00,$7c,$fe,$c6,$c0,$c6 // ...........|....
        .byte $fe,$7c,$00,$fc,$fe,$06,$c6,$c6,$fe,$fc,$00,$7e,$fe,$c0,$fe,$c0 // .|.........~....
        .byte $fe,$7e,$00,$fe,$fe,$00,$fc,$c0,$c0,$c0,$00,$7c,$fe,$c0,$ce,$c6 // .~.........|....
        .byte $fe,$7c,$00,$c6,$c6,$c6,$f6,$c6,$c6,$c6,$00,$7e,$7e,$18,$18,$18 // .|.........~~...
        .byte $7e,$7e,$00,$7e,$7e,$0c,$cc,$cc,$fc,$78,$00,$cc,$d8,$f0,$f0,$d8 // ~~.~~....x......
        .byte $cc,$c6,$00,$c0,$c0,$c0,$c0,$c0,$fe,$7e,$00,$c6,$ee,$fe,$fe,$d6 // .........~......
        .byte $c6,$c6,$00,$cc,$ec,$fc,$fc,$dc,$cc,$cc,$00,$7c,$fe,$c6,$c6,$c6 // ...........|....
        .byte $fe,$7c,$00,$fc,$fe,$06,$fc,$c0,$c0,$c0,$00,$7c,$fe,$c6,$c6,$c6 // .|.........|....

// --- Region $08a1-$097f ---
.pc = $08a1 "dat_08a1"

dat_08a1:
        .byte $fc,$0c,$0c,$0c,$0c,$0c,$00,$c6,$c6,$c6,$c6,$c6,$fe,$7c,$00,$c6 // .............|..
        .byte $c6,$c6,$c6,$ee,$7c,$38,$00,$c6,$c6,$d6,$fe,$fe,$ee,$c6,$00,$c6 // ....|8..........
        .byte $ee,$7c,$38,$7c,$ee,$c6,$00,$66,$66,$66,$3c,$18,$18,$18,$00,$fe // .|8|...fff<.....
        .byte $fe,$1c,$38,$70,$fe,$fe,$00,$c0,$f8,$d8,$fe,$18,$06,$1e,$00,$00 // ..8p............
        .byte $00,$00,$00,$00,$00,$00,$00,$5a,$00,$00,$00,$00,$00,$00,$00,$aa // .......Z........
        .byte $00,$00,$00,$00,$00,$00,$00,$54,$00,$00,$00,$00,$00,$00,$00,$00 // .......T........
        .byte $00,$00,$00,$00,$00,$00,$00,$18,$18,$18,$18,$00,$18,$18,$00,$66 // ...............f
        .byte $66,$66,$00,$00,$00,$00,$00,$3e,$c0,$00,$00,$00,$00,$00,$00,$10 // ff.....>........
        .byte $7e,$d0,$7c,$16,$fc,$10,$00,$62,$d6,$dc,$7c,$76,$d6,$8c,$00,$70 // ~.|....b..|v...p
        .byte $d8,$73,$fe,$cc,$fe,$7b,$00,$18,$18,$18,$00,$00,$00,$00,$00,$18 // .s...{..........
        .byte $30,$60,$60,$60,$30,$18,$00,$30,$18,$0c,$0c,$0c,$18,$30,$00,$00 // 0```0..0.....0..
        .byte $54,$38,$7c,$38,$54,$00,$00,$00,$30,$30,$fc,$30,$30,$00,$00,$00 // T8|8T...00.00...
        .byte $00,$00,$00,$00,$30,$30,$60,$00,$00,$00,$fc,$00,$00,$00,$00,$00 // ....00`.........
        .byte $00,$00,$00,$00,$30,$30,$00,$06,$0e,$1c,$38,$70,$e0,$c0,$00 // ....00....8p...

// --- Region $099e-$0c3f ---
.pc = $099e "txt_099e"

txt_099e:
        .text "          "

txt_09a8:
        .encoding "screencode_mixed"
        .text "c r a c k e d   b y"
        .encoding "petscii_upper"

txt_09bb:
        .text "               "
        .byte $10,$12,$05,$13,$13,$20,$13,$10,$01,$03,$05 // ..... .....

txt_09d5:
        .text "                "
        .byte $87,$87,$87,$28,$d8,$81,$eb,$00,$00,$00,$00,$1e,$f8,$06,$00,$00 // ...(............

txt_09f5:
        .text "*./0*"
        .byte $00                                   // string terminator
        .byte $00,$00,$ea,$ea,$ea,$00,$ff,$00,$03,$ff,$c0,$0f,$ff,$f0,$1f,$ff // ................
        .byte $f8,$3f,$ff,$fc,$7f,$ff,$fe,$7f,$ff,$fe,$ff,$ff,$ff,$ff,$ff,$ff // .?..............
        .fill 15, $ff
        .byte $7f,$ff,$fe,$7f,$ff,$fe,$3f,$ff,$fc,$1f,$ff,$f8,$0f,$ff,$f0,$03 // ......?.........
        .byte $ff,$c0,$00,$ff,$00,$00,$00,$7e,$00,$01,$ff,$80,$03,$ff,$c0,$0f // .......~........
        .byte $ff,$f0,$0f,$ff,$f0,$1f,$ff,$f8,$1f,$ff,$f8,$3f,$ff,$fc,$3f,$ff // ...........?..?.
        .byte $fc,$3f,$ff,$fc,$3f,$ff,$fc,$3f,$ff,$fc,$3f,$ff,$fc,$3f,$ff,$fc // .?..?..?..?..?..
        .byte $1f,$ff,$f8,$1f,$ff,$f8,$0f,$ff,$f0,$0f,$ff,$f0,$03,$ff,$c0,$01 // ................
        .byte $ff,$80,$00,$7e,$00,$00,$00,$3c,$00,$00,$ff,$00,$01,$ff,$80,$03 // ...~...<........
        .byte $ff,$c0,$03,$ff,$c0,$07,$ff,$e0,$07,$ff,$e0,$07,$ff,$e0,$0f,$ff // ................
        .byte $f0,$0f,$ff,$f0,$0f,$ff,$f0,$0f,$ff,$f0,$0f,$ff,$f0,$07,$ff,$e0 // ................
        .byte $07,$ff,$e0,$07,$ff,$e0,$03,$ff,$c0,$03,$ff,$c0,$01,$ff,$80,$00 // ................
        .byte $ff,$00,$00,$3c,$00,$00,$00,$18,$00,$00,$3c,$00,$00,$7e,$00,$00 // ...<......<..~..
        .byte $ff,$00,$00,$ff,$00,$01,$ff,$80,$01,$ff,$80,$01,$ff,$80,$03,$ff // ................
        .byte $c0,$03,$ff,$c0,$03,$ff,$c0,$03,$ff,$c0,$03,$ff,$c0,$01,$ff,$80 // ................
        .byte $01,$ff,$80,$01,$ff,$80,$00,$ff,$00,$00,$ff,$00,$00,$7e,$00,$00 // .............~..
        .byte $3c,$00,$00,$18,$00,$00,$00,$18,$00,$00,$18,$00,$00,$3c,$00,$00 // <............<..
        .byte $3c,$00,$00,$7e,$00,$00,$7e,$00,$00,$7e,$00,$00,$7e,$00,$00,$ff // <..~..~..~..~...
        .byte $00,$00,$ff,$00,$00,$ff,$00,$00,$ff,$00,$00,$ff,$00,$00,$7e,$00 // ..............~.
        .byte $00,$7e,$00,$00,$7e,$00,$00,$7e,$00,$00,$3c,$00,$00,$3c,$00,$00 // .~..~..~..<..<..
        .byte $18,$00,$00,$18,$00,$00,$00,$18,$00,$00,$18,$00,$00,$18,$00,$00 // ................
        .byte $18,$00,$00,$18,$00,$00,$18,$00,$00,$3c,$00,$00,$3c,$00,$00,$3c // .........<..<..<
        .byte $00,$00,$3c,$00,$00,$3c,$00,$00,$3c,$00,$00,$3c,$00,$00,$3c,$00 // ..<..<..<..<..<.
        .byte $00,$3c,$00,$00,$3c,$00,$00,$18,$00,$00,$18,$00,$00,$18,$00,$00 // .<..<...........
        .byte $18,$00,$00,$18,$00,$00,$00,$00,$00,$00,$00,$00,$3f,$ff,$fc,$3f // ............?..?
        .byte $ff,$fc,$3f,$ff,$fc,$3f,$fe,$1c,$3f,$ff,$c4,$00,$00,$fc,$00,$00 // ..?..?..?.......
        .byte $00,$3f,$fe,$00,$3f,$fe,$00,$3f,$fa,$00,$3f,$e2,$00,$3f,$fe,$00 // .?..?..?..?..?..
        .byte $3f,$00,$00,$3f,$00,$00,$3f,$00,$00,$3f,$00,$00,$3d,$00,$00,$21 // ?..?..?..?..=..!
        .byte $00,$00,$3f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$3f,$ff,$fc,$3f // ..?.........?..?
        .byte $ff,$fc,$3f,$ff,$fc,$3f,$fe,$1c,$3f,$ff,$c4,$3f,$00,$fc,$00,$00 // ..?..?..?..?....
        .byte $00,$3f,$ff,$fc,$3f,$ff,$fc,$00,$7e,$00,$3f,$7e,$fc,$3f,$7e,$fc // .?..?...~.?~.?~.
        .byte $3f,$00,$fc,$3f,$00,$fc,$3f,$00,$fc,$3f,$00,$fc,$3d,$00,$f4,$21 // ?..?..?..?..=..!
        .byte $00,$84,$3f,$00,$fc,$00,$00,$00,$00,$00,$00,$00,$3f,$ff,$fc,$3f // ..?.........?..?
        .byte $ff,$fc,$3f,$ff,$fc,$3f,$fe,$1c,$3f,$ff,$c4,$00,$00,$fc,$00,$00 // ..?..?..?.......
        .byte $00,$3f,$00,$00,$3f,$00,$00,$3f,$00,$00,$3f,$00,$00,$3f,$00,$00 // .?..?..?..?..?..
        .byte $3f,$00,$fc,$3f,$ff,$fc,$3f,$ff,$f4,$3f,$ff,$f4,$3f,$ff,$f4,$3f // ?..?..?..?..?..?
        .byte $00,$04,$3f,$ff,$fc,$00               // ..?...

// --- Region $0c9e-$0cbf ---
.pc = $0c9e "Program $0c9e"
        .byte $00,$00                               // ..

txt_0ca0:
        .text "(./0("
        .byte $00                                   // string terminator
        .byte $00,$00,$30,$80,$5a,$80,$9a,$80,$da,$80,$01,$07,$07,$07,$01,$01 // ..0.Z...........
        .byte $01,$01,$00,$00,$00,$00,$00,$00,$00,$00 // ..........

// --- Region $0eb2-$0ecf ---
.pc = $0eb2 "dat_0eb2"

dat_0eb2:
        .fill 8, $00
        .byte $0c,$3e,$36,$66,$7e,$c6,$c6,$00,$ea,$ea,$ea,$ea,$ea,$ea,$ea,$ea // .>6f~...........
        .byte $ea,$ea,$ea,$ea,$ea,$ea               // ......

// --- Region $0eff-$0fff ---
.pc = $0eff "Program $0eff"
        .byte $ea                                   // .

txt_0f00:
        .encoding "screencode_mixed"
        .text " greetings to all american friends*softrunner*headbanger*radwar*ace*flash/cfb*cr.crew*icg*fbg*tcn*scc*dcs*psc*bcs*newlook!*bam*cruncher*alfie*tnc*bst*tcc* and of course to all the others we know"
        .encoding "petscii_upper"

txt_0fc2:
        .text "..."

dat_0fc5:
        // === Fill data (59 bytes, $0fc5-$0fff) ===
        .fill 59, $20
