// ============================================
// output - Disassembled Source
// ============================================
// KickAssembler syntax
// Generated by Restore 64 v0.2.1 alpha build 298, 2026-04-11 21:35:11
// https://restore64.dev by datucker / Rabenauge
//
// Load address: $0801  End: $0aff  (767 bytes)
// Entry point:  $0816 (via BASIC SYS 2070)
//
// Code: 308 bytes, Data: 459 bytes
// Labels: 39, Subroutines: 3
//
// Cross-references: all OK
// ============================================


// --- Region $0816-$0905 ---
.pc = $0816 "main_0816"

main_0816:
        jsr $ff81
        lda #$0b
        jsr $e536
        lda #$9d
        ldy #$09
        jsr $ab1e
        ldx #$1f

loc_0827:
        lda $09c0,x
        sta $d400,x
        dex
        bpl loc_0827
        inx
        ldy #$00

loc_0833:
        lda tbl_09e0,y
        beq loc_083b
        iny
        bne loc_0833

loc_083b:
        sty $02
        lda #$28
        sec
        sbc $02
        lsr
        tay

loc_0844:
        lda tbl_09e0,x
        sta $06a8,y
        iny
        inx
        cpx $02
        bne loc_0844
        lda #$16
        sta $d018
        ldx #$01
        stx $fd
        dex
        stx $d020
        stx $d021
        stx $fb
        stx $fc
        stx $fe

loc_0866:
        ldy #$00

loc_0868:
        lda dat_096f,x
        asl dat_096f,x
        and #$80
        beq loc_0876
        lda #$40
        bne loc_0878

loc_0876:
        lda #$20

loc_0878:
.label smc_0879 = * + 1
.label smc_087a = * + 2
        sta $0540,y                                 // !SMC: modified by $0885, $088d
        iny
        cpy #$08
        bne loc_0868
        tya
        clc
        adc smc_0879
        sta smc_0879                                // SMC: modifies $0879
        lda smc_087a
        adc #$00
        sta smc_087a                                // SMC: modifies $087a
        inx
        cpx #$1e
        bne loc_0866
        ldy #$27

loc_0897:
        lda #$0c
        sta $d968,y
        sta $d9e0,y
        lda #$0f
        sta $d990,y
        sta $d9b8,y
        dey
        bpl loc_0897
        sei

loc_08ab:
        lda #$d0

loc_08ad:
        cmp $d012
        bne loc_08ad
        lda $fb
        sta $d016
        lda #$f0

loc_08b9:
        cmp $d012
        bne loc_08b9
        lda #$08
        sta $d016
        jsr sub_0929
        jsr sub_094f
        lda $dc01
        cmp #$ef
        bne loc_08ab
        sei
        ldy #$1f

loc_08d3:
        lda #$00
        sta $d400,y
        sta.abs $0090,y
        dey
        bpl loc_08d3
        ldx #$00

loc_08e0:
        lda $0b00,x
        sta $c000,x
        lda $0c00,x
        sta $c100,x
        lda $0d00,x
        sta $c200,x
        lda $0e00,x
        sta $c300,x
        lda $0f00,x
        sta $c400,x
        inx
        bne loc_08e0
        jmp $fce2

dat_0904:
        // === Fill data (2 bytes, $0904-$0905) ===
        .byte $ea,$ea                               // ..

// --- Region $0929-$096f ---
.pc = $0929 "sub_0929"
// Referenced by: jsr from $08c3

sub_0929:
        sec
        lda $fb
        sbc #$02
        bcc loc_0933
        sta $fb
        rts

loc_0933:
        lda #$07
        sta $fb
        ldy #$00

loc_0939:
        lda $0721,y
        sta $0720,y
        iny
        cpy #$28
        bne loc_0939
        ldx $fc
        lda txt_0a00,x
        sta $0747
        inc $fc
        rts
// Referenced by: jsr from $08c6

sub_094f:
        dec $fd
        beq loc_0954
        rts

loc_0954:
        lda #$03
        sta $fd
        lda $fe
        and #$0f
        sta $fe
        tax
        ldy #$00
        lda $098d,x

loc_0964:
        sta $daa8,y
        iny
        cpy #$28
        bne loc_0964
        inc $fe
        rts

dat_096f:
        .byte $f9                                   // .

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

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

dat_0801:
        // === BASIC loader stub ===
        .byte $11,$08                               // next line pointer ($0811)
        .byte $c6,$07                               // line number 1990
        .byte $9e                                   // SYS token
        .text "2070 CRUSH"                          // SYS 2070 → main_0816
        .byte $00                                   // end of line
        .byte $00,$00                               // end of BASIC program
        .byte $00,$00,$00                           // ...

// --- Region $0906-$0928 ---
.pc = $0906 "Program $0906"
        .fill 35, $ea

// --- Region $0970-$09e6 ---
.pc = $0970 "Program $0970"
        .byte $f1,$e3,$ef,$9e,$cd,$9b,$30,$6c,$cc,$f9,$9b,$33,$cf,$cc,$cd,$9b // ......0l...3....
        .byte $36,$0c,$cc,$cd,$9b,$36,$0c,$cc,$fc,$fb,$37,$ec,$de,$00,$00,$00 // 6....6....7.....
        .byte $09,$0b,$08,$0c,$0f,$07,$01,$07,$0f,$0c,$08,$0b,$09,$11,$11,$11 // ................
        .byte $11,$1d,$1d,$1d,$1d,$1d,$1d,$1d,$1d,$1d,$cd // ...........

txt_09ab:
        .text "ORE THAN JUST A TREE!"
        .byte $00                                   // string terminator
        .byte $04,$00,$00,$21,$00,$f0,$05,$04,$00,$00,$21,$00,$f0,$00,$00,$00 // ...!......!.....
        .byte $00,$00,$00,$00,$00,$0c,$03,$1f,$00,$00,$00,$00,$00,$00,$00 // ...............

tbl_09e0:
        .text "ENGLAND"

// --- Region $0a00-$0aff ---
.pc = $0a00 "txt_0a00"

txt_0a00:
        .text "     AIO BOYZ! "
        .byte $22                                   // double quote character
        .text "ENGLAND SOCCER CHALLENGE (O"
        .byte $12,$20,$17,$08,$01,$14,$05,$16,$05,$12 // . ........

txt_0a35:
        .text "?)"
        .byte $22                                   // double quote character
        .text " "
        .byte $17,$01,$13,$20,$03,$12,$01,$03,$0b,$05,$04,$20,$01,$0e,$04,$20 // ... ....... ... 
        .byte $0c,$05,$16,$05,$0c,$2d,$13,$08,$0f,$12,$14,$05,$04,$20,$02,$19 // .....-....... ..

txt_0a59:
        .text " CRUSH! T"
        .byte $08,$09,$13,$20,$16,$05,$12,$13,$09,$0f,$0e,$20,$01,$0c,$13,$0f // ... ....... ....
        .byte $20,$03,$0f,$0e,$14,$01,$09,$0e,$13,$20,$06,$01,$13,$14,$0c,$0f //  ........ ......
        .byte $01,$04                               // ..

txt_0a84:
        .text "..  G"
        .byte $12,$05,$05,$14,$13,$20,$14,$0f,$20,$01,$0c,$0c,$20,$19,$0f,$15 // ..... .. ... ...
        .byte $20,$17,$05,$0c,$0c,$2d,$08,$15,$0e,$07,$20,$08,$0f,$0d,$0f,$13 //  ....-.... .....
        .byte $20,$0f,$15,$14,$20,$14,$08,$05,$12,$05 //  ... .....

txt_0ab3:
        .text "..   I'"
        .byte $0d                                   // string terminator
        .byte $20,$09,$0e,$20,$01,$20,$08,$15,$12,$12,$19 //  .. . .....

txt_0ac6:
        .text "..  L"
        .byte $01,$14,$05,$12,$20,$07,$05,$05,$0b,$13 // .... .....

txt_0ad5:
        .text "... CRUSH F"
        .byte $01,$04,$09,$0e,$27,$20,$01,$17,$01,$19 // ....' ....

txt_0aea:
        .text ".... . .              "
