// ============================================
// output - Disassembled Source
// ============================================
// KickAssembler syntax
// Generated by Restore 64 v0.2.1 alpha build 298, 2026-04-11 21:36:53
// https://restore64.dev by datucker / Rabenauge
//
// Load address: $0801  End: $0c8a  (1162 bytes)
// Entry point:  $0813 (via BASIC SYS 2067)
// IRQ handler:  $08fd (irq_08fd)
//
// Code: 587 bytes, Data: 575 bytes
// Labels: 61, Subroutines: 9
//
// Cross-references: all OK
// ============================================


// --- Region $0813-$098b ---
.pc = $0813 "main_0813"

main_0813:
        jsr sub_0a75
        sei
        lda #$33
        sta $01
        ldx #$00
        txa

loc_081e:
.label smc_0820 = * + 2
        sta $ff00,x                                 // !SMC: modified by $0a7a
        inx
        bne loc_081e
        inc smc_0820
        ldy smc_0820
        cpy #$ff
        bne loc_081e
        ldx #$08
        ldy #$d4
        stx $fa
        sty $fb
        ldy #$f8
        stx $fc
        sty $fd
        ldy #$fa
        sty $ff
        stx $fe
        ldx #$00

loc_0844:
        ldy #$00

loc_0846:
        lda ($fa),y
        jsr sub_09ff
        iny
        cpy #$04
        bne loc_0846

loc_0850:
        lda ($fa),y
        jsr sub_0a09
        iny
        cpy #$08
        bne loc_0850
        clc
        lda $fa
        adc #$08
        sta $fa
        lda $fb
        adc #$00
        sta $fb
        cmp #$d6
        bne loc_0844
        ldx #$00

loc_086d:
        lda $0a67,x
        sta $fc00,x
        inx
        cpx #$20
        bne loc_086d
        lda #$80
        ldx #$0b
        ldy #$f5
        jsr sub_0a13
        ldx #$16

loc_0883:
        lda txt_0a87,x
        sta $0458,x
        lda #$07
        sta $d858,x
        dex
        bpl loc_0883
        jsr sub_09e6
        sei
        inc $d01a
        dec $dc0e
        lda #$fd
        sta $0314
        lda #$08
        sta $0315
        cli
        ldx #$00
        stx $d012
        lda #$1b
        sta $d011
        lda #$06
        sta $d022

loc_08b5:
        sta $db70,x
        pha
        lda #$20
        sta $f770,x
        pla
        inx
        cpx #$50
        bne loc_08b5
        lda #$0e
        sta $d023

loc_08c9:
        jmp loc_08c9

loc_08cc:
        lda #$37
        sta $01
        jsr $ff81
        jsr $ff84
        jsr $ff8a
        ldx #$00
        txa

loc_08dc:
        sta $d800,x
        sta $d900,x
        sta $da00,x
        sta $db00,x
        inx
        bne loc_08dc
        stx $d020
        stx $d021
        lda #$64
        ldx #$01
        ldy #$05
        jsr sub_0a13
        jmp loc_0a7f

irq_08fd:
        lda #$15
        sta $d018
        lda $dc01
        cmp #$ef
        beq loc_08cc
        lda #$03
        sta $dd00
        lda #$d0
        sta $d016
        lda #$02
        sta $d021
        sta $d020
        jsr sub_0a6f
        lda #$42

loc_0920:
        cmp $d012
        bne loc_0920
        ldx #$00

loc_0927:
        inc $d016
        lda $d012

loc_092d:
        cmp $d012
        beq loc_092d
        nop
        inx
        cpx #$08
        bne loc_0927
        ldx #$b2

loc_093a:
        dex
        bne loc_093a
        lda #$00
        sta $dd00
        lda #$df
        sta $d018
        inx
        stx $d020
        stx $d021
        lda #$cb

loc_0950:
        cmp $d012
        bne loc_0950
        ldx #$02

loc_0957:
        dex
        bne loc_0957
        lda #$06
        sta $d021
        sta $d020
        lda smc_09ab
        sta $d016
        lda #$e2

loc_096a:
        cmp $d012
        bne loc_096a
        ldx #$00

loc_0971:
        ldy $099a,x

loc_0974:
        dey
        bne loc_0974
        lda dat_098b,x
        sta $d021
        sta $d021
        inx
        cpx #$0f
        bne loc_0971
        inc $d019
        jmp $ea7e

dat_098b:
        .byte $01                                   // .

// --- Region $09aa-$09b2 ---
.pc = $09aa "sub_09aa"
// Referenced by: jsr from $0a6f; jmp from $0a72

sub_09aa:
.label smc_09ab = * + 1
        ldx #$c5                                    // !SMC: modified by $09de
        dex
        cpx #$bf
        bne loc_09de

dat_09b1:
        .byte $a9,$30                               // .0

// --- Region $09c8-$0a47 ---
.pc = $09c8 "loc_09c8"

loc_09c8:
        ldy #$00
        lda ($12),y
        beq sub_09e6
        sta $f797
        eor #$40
        sta $f7bf
        inc $12
        bne loc_09dc
        inc $13

loc_09dc:
        ldx #$c7

loc_09de:
        stx smc_09ab                                // SMC: modifies $09ab
        lda #$37
        sta $01
        rts
// Referenced by: jsr from $0891; branch from $09cc

sub_09e6:
        lda #$9e
        sta $12
        lda #$0a
        sta $13
        jmp loc_09c8
// Referenced by: jsr from $0a01; jmp from $0a06

sub_09f1:
        inc $fc
        bne loc_09f7
        inc $fd

loc_09f7:
        rts
// Referenced by: jsr from $0a0b; jmp from $0a10

sub_09f8:
        inc $fe
        bne loc_09fe
        inc $ff

loc_09fe:
        rts
// Referenced by: jsr from $0848

sub_09ff:
        sta ($fc,x)
        jsr sub_09f1
        sta ($fc,x)
        jmp sub_09f1
// Referenced by: jsr from $0852

sub_0a09:
        sta ($fe,x)
        jsr sub_09f8
        sta ($fe,x)
        jmp sub_09f8
// Referenced by: jsr from $087e, $08f7

sub_0a13:
        sta $02
        stx $08
        sty smc_0a35                                // SMC: modifies $0a35
        ldx #$00
        ldy #$00

loc_0a1e:
        lda dat_0a48,x
        beq loc_0a47
        sta $fb
        lda #$08
        sta $fc

loc_0a29:
        asl $fb
        bcc loc_0a3f
        lda #$30
        sta $01
        lda $02
.label smc_0a35 = * + 2
        sta $f568,y                                 // !SMC: modified by $0a17
        lda #$37
        sta $01
        lda $08
        sta $d968,y

loc_0a3f:
        iny
        dec $fc
        bne loc_0a29
        inx
        bne loc_0a1e

loc_0a47:
        rts

// --- Region $0a6f-$0a84 ---
.pc = $0a6f "sub_0a6f"
// Referenced by: jsr from $091b

sub_0a6f:
        jsr sub_09aa
        jmp sub_09aa
// Referenced by: jsr from $0813

sub_0a75:
        jsr $e544
        lda #$f0
        sta smc_0820                                // SMC: modifies $0820
        rts

dat_0a7e:
        .byte $00                                   // .

loc_0a7f:
        cli
        jmp loc_0c37

dat_0a83:
        .byte $00,$00                               // ..

// --- Region $0c37-$0c70 ---
.pc = $0c37 "loc_0c37"

loc_0c37:
        ldx #$00
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop

loc_0c62:
        lda dat_0c70,x
        sta $0340,x
        inx
        cpx #$60
        bne loc_0c62
        jmp $0340

dat_0c70:
        .byte $a2                                   // .

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

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

dat_0801:
        // === BASIC loader stub ===
        .byte $11,$08                               // next line pointer ($0811)
        .byte $c8,$07                               // line number 1992
        .byte $9e                                   // SYS token
        .text "2067 TRIAD"                          // SYS 2067 → main_0813
        .byte $00                                   // end of line
        .byte $00,$00                               // end of BASIC program

// --- Region $098c-$09a9 ---
.pc = $098c "Program $098c"
        .byte $06,$01,$07,$06,$07,$0f,$06,$0f,$06,$0c,$06,$0c,$0b,$06,$09,$01 // ................
        .byte $08,$08,$08,$08,$08,$08,$08,$01,$08,$08,$08,$08,$08,$08 // ..............

// --- Region $09b3-$09c7 ---
.pc = $09b3 "Program $09b3"
        .byte $85,$01,$a0,$00,$b9,$71,$f7,$99,$70,$f7,$b9,$99,$f7,$99,$98,$f7 // .....q..p.......
        .byte $c8,$c0,$28,$d0,$ef                   // ..(..

// --- Region $0a48-$0a6e ---
.pc = $0a48 "dat_0a48"

dat_0a48:
        .byte $ff,$7e,$60,$40,$fe,$18,$01,$60,$e0,$01,$18,$61,$61,$b0,$c1,$18 // .~`@...`...aa...
        .byte $7c,$63,$18,$c1,$18,$66,$66,$0c,$c1,$18,$61,$6f,$fe,$fe,$00,$fd // |c...ff...ao....
        .byte $e9,$e9,$e9,$e9,$e9,$e9,$d5           // .......

// --- Region $0a85-$0c36 ---
.pc = $0a85 "Program $0a85"
        .byte $00,$00                               // ..

txt_0a87:
        .encoding "screencode_mixed"
        .text "dealer quality software as a dutch man, i want to make a point with saying that the germans behave very lame in goteborg. before the match holland vs germany they started making wars. why? still didn't change since"
        .encoding "petscii_upper"

txt_0b5d:
        .text " '40 ? "

txt_0b64:
        .encoding "screencode_mixed"
        .text "we did! ofcourse we won this match like we will win the final (i hope"
        .encoding "petscii_upper"

txt_0ba9:
        .text "!)  "

txt_0bad:
        .encoding "screencode_mixed"
        .text "if we have to play versus the germans again, we surely will win again! no harm, just win on the field. see ya over there"
        .encoding "petscii_upper"

txt_0c25:
        .text "!     "
        .byte $13,$05,$01,$0c                       // ....

txt_0c2f:
        .text " '92   "
        .byte $00                                   // string terminator

// --- Region $0c71-$0c8a ---
.pc = $0c71 "Program $0c71"
        .byte $00,$bd,$8b,$0c,$9d,$0b,$08,$e8,$d0,$f7,$ee,$44,$03,$ee,$47,$03 // ...........D..G.
        .byte $ad,$44,$03,$c9,$a0,$d0,$ea,$4c,$e2,$fc // .D.....L..
