// ============================================
// output - Disassembled Source
// ============================================
// KickAssembler syntax
// Generated by Restore 64 v0.2.1 alpha build 298, 2026-04-11 21:35:15
// https://restore64.dev by datucker / Rabenauge
//
// Load address: $0801  End: $0eff  (1791 bytes)
// Entry point:  $0828 (via BASIC SYS 2088)
//
// Code: 362 bytes, Data: 1429 bytes
// Labels: 68, Subroutines: 5
//
// Cross-references: all OK
// ============================================


// --- Region $0828-$082a ---
.pc = $0828 "main_0828"

main_0828:
        jmp loc_0841

// --- Region $0841-$0968 ---
.pc = $0841 "loc_0841"

loc_0841:
        lda #$02
        sta $d025
        lda #$07
        sta $d017
        lda #$00
        sta $d015
        sta $d01d
        sta $d020
        sta $d021
        lda #$69
        ldy #$09
        jsr $ab1e
        ldy #$00

loc_0862:
        lda $0a67,y
        jsr $ffd2
        lda #$2a
        sta $af
        jsr sub_0aa0
        iny
        cpy #$14
        bne loc_0862
        lda #$9e
        sta $d001
        sta $d003
        sta $d005
        lda #$91
        sta $d000
        lda #$a8
        sta $d002
        lda #$c3
        sta $d004
        ldx #$02

loc_0890:
        lda #$05
        sta $d027,x
        lda #$32
        sta $07f8,x
        dex
        bpl loc_0890
        lda #$07
        sta $d015
        lda #$00
        sta $02
        lda #$38
        sta $03
        lda #$01
        sta $04
        jsr sub_0a7c
        lda #$01
        sta $02
        lda #$39
        sta $03
        lda #$02
        sta $04
        jsr sub_0a7c
        lda #$02
        sta $02
        lda #$3a
        sta $03
        lda #$04
        sta $04
        jsr sub_0a7c
        lda #$f0
        sta $af
        jsr sub_0aa0
        jsr sub_0950
        jsr sub_0950
        lda #$00
        sta $d015
        sta $d017
        sta $d01d
        sta $d025
        ldx #$06

loc_08ec:
        sta $d000,x
        dex
        bne loc_08ec
        lda #$93
        jsr $ffd2
        lda #$ff
        sta $f7
        lda #$0e
        sta $f8
        lda #$01
        sta $f9
        lda #$6f
        sta $fa
        lda #$01
        sta $fb
        lda #$a0
        sta $fc
        ldx #$00

loc_0911:
        lda loc_091f,x
        sta $033c,x
        inx
        cpx #$30
        bne loc_0911
        jmp $033c

loc_091f:
        ldx #$00

loc_0921:
        lda ($f9,x)
        sta ($fb,x)
        sec
        lda $fb
        sbc #$01
        sta $fb
        lda $fc
        sbc #$00
        sta $fc
        sec
        lda $f9
        sbc #$01
        sta $f9
        lda $fa
        sbc #$00
        sta $fa
        lda $f8
        cmp $fa
        bne loc_0921
        lda $f7
        cmp $f9
        bne loc_0921
        jmp $fce2

dat_094e:
        .byte $ea,$ea                               // ..
// Referenced by: jsr from $08d6, $08d9

sub_0950:
        ldx #$82

loc_0952:
        ldy #$01

loc_0954:
        sty $d027
        sty $d028
        sty $d029
        jsr sub_0ab3
        iny
        cpy #$10
        bne loc_0954
        dex
        bne loc_0952
        rts

// --- Region $0a7c-$0abc ---
.pc = $0a7c "sub_0a7c"

// Referenced by: jsr from $08ae, $08bd, $08cc
sub_0a7c: {
        lda $04
        sta $d01c
        ldx #$32
        ldy $02
loop:
        txa
        sta $07f8,y
        lda #$23
        sta $af
        jsr sub_0aa0
        inx
        cpx #$37
        bne loop
        lda #$00
        sta $d01c
        lda $03
        sta $07f8,y
        rts
}

// Referenced by: jsr from $086c, $08d3, $0a8d
sub_0aa0: {
        txa
        ldx #$00
        stx $ae
loop:
        dec $ae
        ldx $ae
        bne loop
        dec $af
        ldx $af
        bne loop
        tax
        rts
}
// Referenced by: jsr from $095d

sub_0ab3:
        sty $02
        ldy #$16

loc_0ab7:
        iny
        bne loc_0ab7
        ldy $02
        rts

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

// --- Region $0801-$0827 ---
.pc = $0801 "dat_0801"

dat_0801:
        // === BASIC loader stub ===
        .byte $23,$08                               // next line pointer ($0823)
        .byte $c0,$07                               // line number 1984
        .byte $9e                                   // SYS token
        .text " 2088CRACKED BY PMK."        // SYS 2088 → main_0828
        .byte $00                                   // end of line
        .byte $00,$00                               // end of BASIC program
        .byte $00,$00,$2d                           // ..-

// --- Region $082b-$0840 ---
.pc = $082b "dat_082b"

dat_082b:
        .byte $10,$a9,$0e,$48,$a9,$c0,$48,$a2,$02,$bd,$1e,$08,$4a,$6a,$65,$10 // ...H..H.....Jje.
        .byte $85,$10,$ca,$d0,$f4,$60               // .....`

// --- Region $0969-$0a7b ---
.pc = $0969 "dat_0969"

dat_0969:
        .byte $93,$11,$9f                           // ...

txt_096c:
        .text "        DANISH CRACKERS PRESENTS"
        .byte $0d                                   // string terminator
        .byte $0d                                   // .

txt_098e:
        .text "     "
        .byte $05,$12,$a9,$92,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2 // ................
        .fill 16, $a2
        .byte $12,$df,$0d                           // ...

txt_09b6:
        .text "     "
        .byte $12,$a1,$1c,$ac,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2 // ................
        .fill 14, $a2
        .byte $bb,$05,$92,$a1,$0d                   // .....

txt_09de:
        .text "     "
        .byte $12,$a1,$92,$1c,$a1,$9f               // ......

txt_09e9:
        .text "     FALCON PATROL II     "
        .byte $1c,$12,$a1,$05,$92,$a1,$0d           // .......

txt_0a0a:
        .text "     "
        .byte $12,$a1,$1c,$bc,$92,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2 // ................
        .fill 15, $a2
        .byte $12,$be,$05,$92,$a1,$0d               // ......

txt_0a34:
        .text "     "
        .byte $05,$df,$12,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2,$a2 // ................
        .fill 15, $a2
        .byte $92,$a9,$0d,$0d,$0d,$0d,$1d,$1d,$1d,$1d,$1d,$1d,$1d,$1d,$00,$1d // ................
        .byte $1d,$1d,$1d,$9e                       // ....

txt_0a6c:
        .text "CRACKED 1984 BY"
        .byte $0d                                   // string terminator

// --- Region $0abd-$0c80 ---
.pc = $0abd "txt_0abd"

txt_0abd:
        .text "E "
        .byte $b2                                   // '2' | $80 (end-of-string marker)

txt_0ac0:
        .text " $7000"
        .byte $00                                   // string terminator
        .byte $cd,$0a,$c2,$01
        .byte $3b,$00,$d9,$0a,$cc,$01,$ac,$b2
        .text "$080"
        .byte $31,$00,$df,$0a,$d6,$01,$3b,$00,$e5,$0a,$e0,$01,$3b,$00,$eb,$0a // 1.....;.....;...
        .byte $ea,$01,$3b,$00,$0a,$0b,$f4,$01       // ..;.....

txt_0aef:
        .text "; "
        .byte $ac                                   // ',' | $80 (end-of-string marker)
        .byte $ac,$20,$20,$83                       // .  .

txt_0af6:
        .text " FOR BASIC LINE  **"
        .byte $00                                   // string terminator
        .byte $10,$0b,$fe,$01,$3b,$00,$2d,$0b,$08,$02 // ....;.-...

txt_0b14:
        .text ".BYT $23,8,$C0,7,$9E,$20"
        .byte $00                                   // string terminator
        .byte $4a,$0b,$12,$02,$2e,$c6               // J.....

txt_0b33:
        .text " "
        .byte $22                                   // double quote character
        .text "2088"
        .byte $22                                   // double quote character
        .text " ; 2088 "
        .byte $b2                                   // '2' | $80 (end-of-string marker)

txt_0b43:
        .text " $0828"
        .byte $00                                   // string terminator
        .byte $6b,$0b,$1c,$02                       // k...

txt_0b4e:
        .text ".BYT 20,20,20,20,20,20,20,20"
        .byte $00                                   // string terminator
        .byte $80,$0b,$26,$02,$2e,$c6               // ..&...

txt_0b71:
        .text " "
        .byte $22                                   // double quote character
        .text "CRACKED BY "
        .byte $22                                   // double quote character
        .byte $00                                   // string terminator
        .byte $94,$0b,$30,$02                       // ..0.

txt_0b84:
        .text "CHECK ."
        .byte $c6                                   // 'F' | $80 (end-of-string marker)

txt_0b8c:
        .text " "
        .byte $22                                   // double quote character
        .text "PMK."
        .byte $22                                   // double quote character
        .byte $00                                   // string terminator
        .byte $a5,$0b,$3a,$02                       // ..:.

txt_0b98:
        .text ".BYT 0,0,0,0"
        .byte $00                                   // string terminator
        .byte $ab,$0b,$44,$02,$3b,$00,$b1,$0b,$4e,$02,$3b,$00,$be,$0b,$58,$02 // ..D.;...N.;...X.
        .byte $ac,$b2                               // ..

txt_0bb7:
        .text " $0828"
        .byte $00                                   // string terminator
        .byte $c4,$0b,$62,$02,$3b,$00,$d7,$0b,$6c,$02 // ..b.;...l.

txt_0bc8:
        .text "LDA #0:STA $10"
        .byte $00                                   // string terminator
        .byte $ec,$0b,$76,$02                       // ..v.

txt_0bdb:
        .text "LDA #"
        .byte $b1                                   // '1' | $80 (end-of-string marker)
        .byte $45,$b0                               // E.

txt_0be3:
        .text "UT : PHA"
        .byte $00                                   // string terminator
        .byte $01,$0c,$80,$02                       // ....

txt_0bf0:
        .text "LDA #"
        .byte $b3                                   // '3' | $80 (end-of-string marker)
        .byte $45,$b0                               // E.

txt_0bf8:
        .text "UT : PHA"
        .byte $00                                   // string terminator
        .byte $0c,$0c,$8a,$02                       // ....

txt_0c05:
        .text "LDX #2"
        .byte $00                                   // string terminator
        .byte $21,$0c,$94,$02,$cb                   // !....

txt_0c11:
        .text "FER LDA CHECK,X"
        .byte $00                                   // string terminator
        .byte $32,$0c,$9e,$02                       // 2...

txt_0c25:
        .text "LSR A : R"
        .byte $b0                                   // '0' | $80 (end-of-string marker)
        .byte $20,$41,$00,$3e,$0c,$a8,$02           //  A.>...

txt_0c36:
        .text "ADC $10"
        .byte $00                                   // string terminator
        .byte $4a,$0c,$b2,$02                       // J...

txt_0c42:
        .text "STA $10"
        .byte $00                                   // string terminator
        .byte $52,$0c,$bc,$02,$44,$45,$58,$00,$5f,$0c,$c6,$02 // R...DEX._...

txt_0c56:
        .text "BNE "
        .byte $cb                                   // 'K' | $80 (end-of-string marker)
        .byte $46,$45,$52,$00,$86,$0c,$d0,$02       // FER.....

txt_0c63:
        .text "RTS ; JMP E"
        .byte $b0                                   // '0' | $80 (end-of-string marker)

txt_0c6f:
        .text "UT ; "
        .byte $8b                                   // .

txt_0c75:
        .text " $10 "
        .byte $b2                                   // '2' | $80 (end-of-string marker)

txt_0c7b:
        .text " #$26"
        .byte $00                                   // string terminator

// --- Region $0cd9-$0ce0 ---
.pc = $0cd9 "dat_0cd9"

dat_0cd9:
        .byte $04,$00,$00,$40,$00,$00,$28           // ...@..(

dat_0ce0:
        // === Fill data (1 bytes, $0ce0-$0ce0) ===
        .byte $00                                   // .

// --- Region $0d13-$0d29 ---
.pc = $0d13 "dat_0d13"

dat_0d13:
        .byte $60,$40,$00,$00,$00,$00,$04,$00,$00,$40,$00,$00,$28,$80,$00,$00 // `@.......@..(...
        .byte $00,$00,$82,$00,$00,$01               // ......

dat_0d29:
        // === Fill data (1 bytes, $0d29-$0d29) ===
        .byte $00                                   // .

// --- Region $0d4d-$0eff ---
.pc = $0d4d "dat_0d4d"

dat_0d4d:
        .byte $20,$00,$00,$00,$04,$04,$60,$40,$02,$04,$00,$00,$04,$00,$00,$40 //  .....`@.......@
        .byte $00,$00,$28,$80,$00,$00,$00,$00,$92,$00,$00,$01,$04,$02,$00,$00 // ..(.............
        .byte $00,$00,$00,$00,$04,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 // ................
        .byte $00,$00,$00,$00,$00,$00,$20,$00,$00,$00,$02,$00,$02,$01,$00,$00 // ...... .........
        .byte $20,$00,$00,$00,$04,$04,$60,$40,$02,$04,$00,$00,$04,$08,$00,$40 //  .....`@.......@
        .byte $04,$00,$28,$80,$20,$00,$00,$00,$92,$00,$00,$01,$04,$02,$00,$00 // ..(. ...........
        .byte $00,$80,$40,$00,$84,$00,$10,$00,$10,$08,$04,$00,$00,$00,$00,$00 // ..@.............
        .byte $00,$00,$00,$00,$00,$00,$20,$00,$00,$00,$02,$00,$02,$01,$00,$00 // ...... .........
        .byte $00,$00,$00,$00,$04,$00,$00,$00,$00,$00,$00,$00,$00,$08,$00,$00 // ................
        .byte $04,$00,$00,$00,$20,$00,$00,$00,$00,$00,$00,$00,$04,$00,$00,$00 // .... ...........
        .byte $00,$00,$00,$00,$00,$00,$10,$00,$10,$08,$04,$00,$00,$00,$00,$00 // ................
        .byte $00,$00,$00,$1f,$fe,$00,$1f,$ff,$80,$1f,$ff,$c0,$1e,$03,$e0,$1e // ................
        .byte $01,$e0,$1e,$01,$e0,$1e,$03,$e0,$1f,$ff,$c0,$1f,$ff,$80,$1f,$fe // ................
        .byte $00,$1e,$00,$00,$1e,$00,$00,$1e,$00,$00,$1e,$00,$00,$1e,$00,$00 // ................
        .byte $1e,$00,$00,$1e,$00,$00,$1e,$00,$00,$1e,$00,$00,$1e,$00,$00,$1e // ................
        .byte $00,$00,$00,$f0,$00,$0f,$f8,$00,$1f,$fc,$00,$3f,$fe,$00,$7f,$ff // ...........?....
        .byte $00,$ff,$ff,$81,$ff,$f7,$c3,$ef,$f3,$e7,$cf,$f1,$ff,$8f,$f0,$ff // ................
        .byte $0f,$f0,$7e,$0f,$f0,$3c,$0f,$f0,$00,$0f,$f0,$00,$0f,$f0,$00,$0f // ..~..<..........
        .byte $f0,$00,$0f,$f0,$00,$0f,$f0,$00,$0f,$f0,$00,$0f,$f0,$00,$0f,$f0 // ................
        .byte $00,$0f,$00,$1e,$00,$f8,$1e,$01,$f0,$1e,$03,$e0,$1e,$07,$c0,$1e // ................
        .byte $0f,$80,$1e,$1f,$00,$1e,$3e,$00,$1e,$7c,$00,$1e,$f8,$00,$1f,$f0 // ......>..|......
        .byte $00,$1f,$e0,$00,$1f,$e0,$00,$1f,$f8,$00,$1f,$7c,$00,$1e,$3e,$00 // ...........|..>.
        .byte $1e,$1f,$00,$1e,$0f,$80,$1e,$07,$c0,$1e,$03,$e0,$1e,$01,$f0,$1e // ................
        .byte $00,$f8,$00,$ea,$a9,$bf,$85,$02,$a9,$0e,$85,$03,$a9,$41,$85,$04 // .............A..
        .byte $a9,$08,$85,$05,$a2,$00,$a1,$04,$45,$10,$81,$04,$18,$a5,$04,$69 // ........E......i
        .byte $01,$85,$04,$a5,$05,$69,$00,$85,$05,$c5,$03,$d0,$e9,$a5,$04,$c5 // .....i..........
        .byte $02,$d0,$e3,$4c,$41,$08,$0e,$42,$04   // ...LA..B.

txt_0ef6:
        .text "JSR "
        .byte $bd                                   // '=' | $80 (end-of-string marker)
        .byte $4c,$4f,$00,$14,$0f                   // LO...
