; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "65SC02" .smart on .autoimport on .case on .debuginfo on .importzp c_sp, sreg, regsave, regbank .importzp tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4 .macpack longbranch .dbg file, "main.c", 6111, 1794639822 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/lynx.h", 7273, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_mikey.h", 9393, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_suzy.h", 11804, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/tgi.h", 10994, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/tgi/tgi-error.h", 3568, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/target.h", 3090, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/6502.h", 5470, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/stdint.h", 5720, 1794640055 .dbg file, "../shared/util.h", 1382, 1794639822 .forceimport __STARTUP__ .dbg sym, "tgi_static_stddrv", "00", extern, "_tgi_static_stddrv" .dbg sym, "g_results", "00", extern, "_g_results" .import _tgi_static_stddrv .import _tgi_install .import _tgi_init .import _tgi_clear .import _tgi_setcolor .import _tgi_getxres .import _tgi_gettextwidth .import _tgi_outtextxy .import _tgi_ioctl .import _run_tests .import _g_results .export _main .segment "DATA" _k_test_names: .addr S0002 .addr S0003 .addr S0004 .addr S0005 .addr S0006 .addr S0007 .addr S0008 .addr S0009 .segment "RODATA" _k_expected_results: .byte $01 .byte $00 .res 7,$00 .byte $01 .byte $00 .res 7,$00 .byte $01 .byte $52 .res 7,$00 .byte $01 .byte $06 .res 7,$00 .byte $01 .byte $01 .res 7,$00 .byte $01 .byte $02 .res 7,$00 .byte $01 .byte $80 .res 7,$00 .byte $01 .byte $02 .res 7,$00 .byte $01 .byte $30 .res 7,$00 .byte $01 .byte $BB .res 7,$00 .byte $01 .byte $03 .res 7,$00 .byte $01 .byte $00 .res 7,$00 .byte $02 .byte $FF .byte $FE .res 6,$00 .byte $02 .byte $00 .byte $01 .res 6,$00 .byte $02 .byte $02 .byte $01 .res 6,$00 .byte $02 .byte $02 .byte $01 .res 6,$00 .byte $01 .byte $00 .res 7,$00 .byte $01 .byte $00 .res 7,$00 _k_test_offsets: .byte $00 .byte $01 .byte $02 .byte $07 .byte $09 .byte $0A .byte $0C .byte $10 _k_test_counts: .byte $01 .byte $01 .byte $05 .byte $02 .byte $01 .byte $02 .byte $04 .byte $02 _k_lynx_i_results: .byte $FF .byte $00 .byte $02 .byte $02 _k_lynx_ii_results: .byte $FE .byte $01 .byte $01 .byte $01 S0001: .byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$41,$42,$43,$44,$45,$46 .byte $00 S0009: .byte $55,$4E,$44,$43,$20,$4E,$4F,$50,$20,$49,$52,$51,$00 S0005: .byte $42,$52,$4B,$20,$32,$20,$42,$59,$54,$45,$53,$00 S0006: .byte $4A,$4D,$50,$20,$49,$4E,$44,$20,$46,$49,$58,$00 S0008: .byte $52,$4D,$42,$2F,$53,$4D,$42,$2F,$42,$42,$78,$00 S0007: .byte $55,$4E,$44,$4F,$43,$20,$4E,$4F,$50,$53,$00 S0003: .byte $44,$20,$46,$4C,$41,$47,$20,$49,$52,$51,$00 S0004: .byte $42,$43,$44,$20,$4D,$41,$54,$48,$00 S0002: .byte $53,$45,$49,$2F,$43,$4C,$49,$00 S000C: .byte $4C,$59,$4E,$58,$20,$31,$00 S000E: .byte $4C,$59,$4E,$58,$20,$32,$00 S0010: .byte $50,$41,$53,$53,$00 S000B := S0010+0 S000D := S0002+6 S000F := S0002+6 ; --------------------------------------------------------------- ; int __near__ is_valid_result (unsigned char actual, const struct $anon-struct-0018 *expected) ; --------------------------------------------------------------- .segment "CODE" .proc _is_valid_result: near .dbg func, "is_valid_result", "00", static, "_is_valid_result" .dbg sym, "actual", "00", auto, 2 .dbg sym, "expected", "00", auto, 0 .segment "CODE" .dbg line, "../shared/util.h", 24 jsr pushax .dbg line, "../shared/util.h", 26 stz M0001 stz M0001+1 L0002: lda M0001 ldx M0001+1 jsr pushax ldy #$03 jsr ldptr1ysp lda (ptr1) jsr tosicmp0 bpl L0003 .dbg line, "../shared/util.h", 28 ldy #$02 lda (c_sp),y sta sreg jsr ldax0sp ina bne L0008 inx L0008: clc adc M0001 sta ptr1 txa adc M0001+1 sta ptr1+1 lda (ptr1) cmp sreg bne L0004 .dbg line, "../shared/util.h", 29 ldx #$00 lda #$01 jmp incsp3 .dbg line, "../shared/util.h", 26 L0004: inc M0001 bne L0002 inc M0001+1 bra L0002 .dbg line, "../shared/util.h", 31 L0003: ldx #$00 txa .dbg line, "../shared/util.h", 32 jmp incsp3 .dbg line .segment "BSS" M0001: .res 2,$00 .endproc ; --------------------------------------------------------------- ; void __near__ hex2 (char *out, unsigned char v) ; --------------------------------------------------------------- .segment "CODE" .proc _hex2: near .dbg func, "hex2", "00", static, "_hex2" .dbg sym, "out", "00", auto, 1 .dbg sym, "v", "00", auto, 0 .segment "CODE" .dbg line, "../shared/util.h", 42 jsr pusha .dbg line, "../shared/util.h", 44 ldy #$02 jsr ldaxysp sta sreg stx sreg+1 lda (c_sp) lsr a lsr a lsr a lsr a and #$0F clc adc M0001 ldx M0001+1 bcc L0003 inx L0003: sta ptr1 stx ptr1+1 lda (ptr1) sta (sreg) .dbg line, "../shared/util.h", 45 ldy #$02 jsr ldaxysp ina bne L0002 inx L0002: sta sreg stx sreg+1 lda (c_sp) and #$0F clc adc M0001 ldx M0001+1 bcc L0004 inx L0004: sta ptr1 stx ptr1+1 lda (ptr1) sta (sreg) .dbg line, "../shared/util.h", 46 ldy #$02 jsr ldaxysp jsr incax2 sta ptr1 stx ptr1+1 lda #$00 sta (ptr1) .dbg line, "../shared/util.h", 47 jmp incsp3 .dbg line .segment "DATA" M0001: .addr S0001 .endproc ; --------------------------------------------------------------- ; void __near__ init (void) ; --------------------------------------------------------------- .segment "CODE" .proc _init: near .dbg func, "init", "00", static, "_init" .segment "CODE" .dbg line, "main.c", 85 lda #<(_tgi_static_stddrv) ldx #>(_tgi_static_stddrv) jsr _tgi_install .dbg line, "main.c", 86 jsr _tgi_init .dbg line, "main.c", 88 cli .dbg line, "main.c", 90 L0002: lda #$04 jsr pusha ldx #$00 txa jsr _tgi_ioctl stx tmp1 ora tmp1 bne L0002 .dbg line, "main.c", 91 jmp _tgi_clear .dbg line .endproc ; --------------------------------------------------------------- ; void __near__ paint_results (void) ; --------------------------------------------------------------- .segment "CODE" .proc _paint_results: near .dbg func, "paint_results", "00", static, "_paint_results" .segment "CODE" .dbg line, "main.c", 98 lda #$09 sta M0003 stz M0003+1 .dbg line, "main.c", 99 sta M0004 stz M0004+1 .dbg line, "main.c", 100 jsr _tgi_getxres sec sbc M0004 sta M0005 txa sbc M0004+1 sta M0005+1 .dbg line, "main.c", 102 stz M0002 stz M0002+1 L0002: lda M0002 cmp #$08 lda M0002+1 sbc #$00 bvc L0006 eor #$80 L0006: bmi L0039 .dbg line, "main.c", 192 rts .dbg line, "main.c", 104 L0039: lda M0002 sta ptr1 lda M0002+1 clc adc #>(_k_test_offsets) sta ptr1+1 ldy #<(_k_test_offsets) lda (ptr1),y sta M0006 .dbg line, "main.c", 105 lda M0002 sta ptr1 lda M0002+1 clc adc #>(_k_test_counts) sta ptr1+1 ldy #<(_k_test_counts) lda (ptr1),y sta M0007 .dbg line, "main.c", 106 lda #>(S000B) sta M0008+1 lda #<(S000B) sta M0008 .dbg line, "main.c", 107 stz M0009 stz M0009+1 .dbg line, "main.c", 108 lda #$01 sta M000A stz M000A+1 .dbg line, "main.c", 109 lda #$FF sta M000B sta M000B+1 .dbg line, "main.c", 112 stz M000C stz M000C+1 L0008: lda M000C cmp M0007 lda M000C+1 sbc #$00 bvc L0031 eor #$80 L0031: bpl L0009 .dbg line, "main.c", 114 lda M0006 clc adc M000C sta ptr1 lda #$00 adc M000C+1 clc adc #>(_g_results) sta ptr1+1 ldy #<(_g_results) lda (ptr1),y jsr pusha lda M0006 clc adc M000C pha lda #$00 adc M000C+1 tax pla jsr mulax9 clc adc #<(_k_expected_results) tay txa adc #>(_k_expected_results) tax tya jsr _is_valid_result stx tmp1 ora tmp1 bne L000A .dbg line, "main.c", 116 stz M000A stz M000A+1 .dbg line, "main.c", 117 lda M000C+1 sta M000B+1 lda M000C sta M000B .dbg line, "main.c", 118 bra L0009 .dbg line, "main.c", 112 L000A: inc M000C bne L0008 inc M000C+1 bra L0008 .dbg line, "main.c", 122 L0009: lda M0002+1 jne L0038 lda M0002 cmp #$06 jne L0038 lda M000A ora M000A+1 jeq L0038 .dbg line, "main.c", 124 lda #$01 sta M000D stz M000D+1 .dbg line, "main.c", 125 sta M000E stz M000E+1 .dbg line, "main.c", 127 stz M000C stz M000C+1 L0013: lda M000C cmp M0007 lda M000C+1 sbc #$00 bvc L0032 eor #$80 L0032: bpl L0014 .dbg line, "main.c", 129 lda M0006 clc adc M000C sta ptr1 lda #$00 adc M000C+1 clc adc #>(_g_results) sta ptr1+1 ldy #<(_g_results) lda (ptr1),y sta sreg lda M000C sta ptr1 lda M000C+1 clc adc #>(_k_lynx_i_results) sta ptr1+1 ldy #<(_k_lynx_i_results) lda (ptr1),y cmp sreg beq L0037 .dbg line, "main.c", 130 stz M000D stz M000D+1 .dbg line, "main.c", 131 L0037: lda M0006 clc adc M000C sta ptr1 lda #$00 adc M000C+1 clc adc #>(_g_results) sta ptr1+1 ldy #<(_g_results) lda (ptr1),y sta sreg lda M000C sta ptr1 lda M000C+1 clc adc #>(_k_lynx_ii_results) sta ptr1+1 ldy #<(_k_lynx_ii_results) lda (ptr1),y cmp sreg beq L0015 .dbg line, "main.c", 132 stz M000E stz M000E+1 .dbg line, "main.c", 127 L0015: inc M000C bne L0013 inc M000C+1 jmp L0013 .dbg line, "main.c", 135 L0014: lda M000D ora M000D+1 beq L001A .dbg line, "main.c", 137 lda #>(S000C) sta M0008+1 lda #<(S000C) sta M0008 .dbg line, "main.c", 138 lda #<(S000D) ldx #>(S000D) jsr _tgi_gettextwidth sta M0009 stx M0009+1 .dbg line, "main.c", 140 jmp L0038 L001A: lda M000E ora M000E+1 beq L001C .dbg line, "main.c", 142 lda #>(S000E) sta M0008+1 lda #<(S000E) sta M0008 .dbg line, "main.c", 143 lda #<(S000F) ldx #>(S000F) jsr _tgi_gettextwidth sta M0009 stx M0009+1 .dbg line, "main.c", 145 jmp L0038 .dbg line, "main.c", 147 L001C: ldy M0006 lda _g_results,y cmp _k_lynx_i_results bne L001F .dbg line, "main.c", 148 lda #<(_k_lynx_i_results) ldx #>(_k_lynx_i_results) bra L0020 L001F: lda #<(_k_lynx_ii_results) ldx #>(_k_lynx_ii_results) L0020: sta M000F stx M000F+1 .dbg line, "main.c", 150 stz M000A stz M000A+1 .dbg line, "main.c", 151 stz M000C stz M000C+1 L0021: lda M000C cmp M0007 lda M000C+1 sbc #$00 bvc L0033 eor #$80 L0033: bpl L0038 .dbg line, "main.c", 153 lda M0006 clc adc M000C sta ptr1 lda #$00 adc M000C+1 clc adc #>(_g_results) sta ptr1+1 ldy #<(_g_results) lda (ptr1),y sta sreg lda M000F clc adc M000C sta ptr1 lda M000F+1 adc M000C+1 sta ptr1+1 lda (ptr1) cmp sreg beq L0023 .dbg line, "main.c", 155 lda M000C+1 sta M000B+1 lda M000C sta M000B .dbg line, "main.c", 156 bra L0038 .dbg line, "main.c", 151 L0023: inc M000C bne L0021 inc M000C+1 bra L0021 .dbg line, "main.c", 162 L0038: lda #$09 jsr _tgi_setcolor .dbg line, "main.c", 163 lda M0004 ldx M0004+1 jsr pushax lda M0003 ldx M0003+1 jsr pushax lda M0002 ldx M0002+1 jsr aslax1 clc adc #<(_k_test_names) tay txa adc #>(_k_test_names) tax tya jsr ldaxi jsr _tgi_outtextxy .dbg line, "main.c", 165 lda M000A ora M000A+1 beq L0027 .dbg line, "main.c", 167 lda #$0A jsr _tgi_setcolor .dbg line, "main.c", 168 lda M0005 ldx M0005+1 jsr pushax lda M0008 ldx M0008+1 jsr _tgi_gettextwidth jsr tossubax clc adc M0009 pha txa adc M0009+1 tax pla jsr pushax lda M0003 ldx M0003+1 jsr pushax lda M0008 ldx M0008+1 .dbg line, "main.c", 170 jmp L0034 .dbg line, "main.c", 173 L0027: lda #$02 jsr _tgi_setcolor .dbg line, "main.c", 175 lda M000B ldx M000B+1 ina bne L002A inx L002A: cmp #$0A txa sbc #$00 bvs L002B eor #$80 L002B: bpl L0029 .dbg line, "main.c", 177 lda M000B ldx M000B+1 ina bne L002C inx L002C: jsr pushax lda #$0A jsr tosdiva0 ldy #$30 jsr incaxy sta M0001 .dbg line, "main.c", 178 lda M000B ldx M000B+1 ina bne L002D inx L002D: jsr pushax ldx #$00 lda #$0A jsr tosmoda0 ldy #$30 jsr incaxy sta M0001+1 .dbg line, "main.c", 179 stz M0001+2 .dbg line, "main.c", 181 bra L002E .dbg line, "main.c", 183 L0029: lda M000B ldx M000B+1 ina bne L002F inx L002F: ldy #$30 jsr incaxy sta M0001 .dbg line, "main.c", 184 stz M0001+1 .dbg line, "main.c", 187 L002E: lda M0005 ldx M0005+1 jsr pushax lda #<(S0010) ldx #>(S0010) jsr _tgi_gettextwidth jsr tossubax jsr pushax lda M0003 ldx M0003+1 jsr pushax lda #<(M0001) ldx #>(M0001) L0034: jsr _tgi_outtextxy .dbg line, "main.c", 190 lda #$09 clc adc M0003 sta M0003 bcc L0030 inc M0003+1 .dbg line, "main.c", 102 L0030: inc M0002 jne L0002 inc M0002+1 jmp L0002 .dbg line .segment "BSS" M0001: .res 4,$00 M0002: .res 2,$00 M0003: .res 2,$00 M0004: .res 2,$00 M0005: .res 2,$00 M0006: .res 1,$00 M0007: .res 1,$00 M0008: .res 2,$00 M0009: .res 2,$00 M000A: .res 2,$00 M000B: .res 2,$00 M000C: .res 2,$00 M000D: .res 2,$00 M000E: .res 2,$00 M000F: .res 2,$00 .endproc ; --------------------------------------------------------------- ; void __near__ paint_debug_results (void) ; --------------------------------------------------------------- .segment "CODE" .proc _paint_debug_results: near .dbg func, "paint_debug_results", "00", static, "_paint_debug_results" .segment "CODE" .dbg line, "main.c", 198 lda #$51 sta M0003 stz M0003+1 .dbg line, "main.c", 199 stz M0004 stz M0004+1 .dbg line, "main.c", 201 lda #$0F jsr _tgi_setcolor .dbg line, "main.c", 203 stz M0002 stz M0002+1 L0002: lda M0002 cmp #$12 lda M0002+1 sbc #$00 bvc L0006 eor #$80 L0006: bmi L000E .dbg line, "main.c", 215 rts .dbg line, "main.c", 205 L000E: lda #<(M0001) ldx #>(M0001) jsr pushax lda M0002 sta ptr1 lda M0002+1 clc adc #>(_g_results) sta ptr1+1 ldy #<(_g_results) lda (ptr1),y jsr _hex2 .dbg line, "main.c", 206 lda M0004 ldx M0004+1 jsr pushax lda M0003 ldx M0003+1 jsr pushax lda #<(M0001) ldx #>(M0001) jsr _tgi_outtextxy .dbg line, "main.c", 207 lda #$12 clc adc M0004 sta M0004 bcc L0008 inc M0004+1 .dbg line, "main.c", 209 L0008: lda M0002 ldx M0002+1 ina bne L000A inx L000A: jsr pushax ldx #$00 lda #$09 jsr tosmoda0 cpx #$00 bne L0004 cmp #$00 bne L0004 .dbg line, "main.c", 211 lda #$09 clc adc M0003 sta M0003 bcc L000D inc M0003+1 .dbg line, "main.c", 212 L000D: stz M0004 stz M0004+1 .dbg line, "main.c", 203 L0004: inc M0002 jne L0002 inc M0002+1 jmp L0002 .dbg line .segment "BSS" M0001: .res 4,$00 M0002: .res 2,$00 M0003: .res 2,$00 M0004: .res 2,$00 .endproc ; --------------------------------------------------------------- ; void __near__ loop_forever (void) ; --------------------------------------------------------------- .segment "CODE" .proc _loop_forever: near .dbg func, "loop_forever", "00", static, "_loop_forever" .segment "CODE" .dbg line, "main.c", 219 lda #$04 jsr pusha ldx #$00 lda #$01 jsr _tgi_ioctl .dbg line, "main.c", 220 L0004: bra L0004 .dbg line .endproc ; --------------------------------------------------------------- ; void __near__ main (void) ; --------------------------------------------------------------- .segment "CODE" .proc _main: near .dbg func, "main", "00", static, "_main" .segment "CODE" .dbg line, "main.c", 76 jsr _run_tests .dbg line, "main.c", 77 jsr _init .dbg line, "main.c", 78 jsr _paint_results .dbg line, "main.c", 79 jsr _paint_debug_results .dbg line, "main.c", 80 jmp _loop_forever .dbg line .endproc