; ; 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", 2991, 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_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 .segment "RODATA" _k_expected_results: .byte $01 .byte $0A .res 7,$00 .byte $01 .byte $08 .res 7,$00 .byte $01 .byte $34 .res 7,$00 .byte $01 .byte $0A .res 7,$00 .byte $01 .byte $04 .res 7,$00 .byte $01 .byte $78 .res 7,$00 .byte $01 .byte $70 .res 7,$00 .byte $01 .byte $0A .res 7,$00 .byte $01 .byte $A8 .res 7,$00 .byte $02 .byte $30 .byte $34 .res 6,$00 .byte $01 .byte $10 .res 7,$00 .byte $01 .byte $00 .res 7,$00 .byte $01 .byte $FD .res 7,$00 .byte $01 .byte $EE .res 7,$00 .byte $01 .byte $EB .res 7,$00 .byte $01 .byte $D0 .res 7,$00 .byte $01 .byte $D3 .res 7,$00 .byte $01 .byte $2B .res 7,$00 _k_test_offsets: .byte $00 .byte $03 .byte $07 .byte $0B .byte $0D .byte $0F .byte $11 _k_test_counts: .byte $03 .byte $04 .byte $04 .byte $02 .byte $02 .byte $02 .byte $01 S0001: .byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$41,$42,$43,$44,$45,$46 .byte $00 S0003: .byte $4C,$4E,$4B,$20,$54,$37,$20,$3E,$20,$43,$48,$30,$00 S0005: .byte $53,$50,$45,$45,$44,$20,$43,$48,$41,$4E,$47,$45,$00 S0006: .byte $46,$45,$45,$44,$42,$20,$43,$48,$41,$4E,$47,$45,$00 S0002: .byte $4C,$4E,$4B,$20,$43,$48,$33,$20,$3E,$20,$54,$31,$00 S0007: .byte $4C,$46,$53,$52,$20,$43,$48,$41,$4E,$47,$45,$00 S0004: .byte $4C,$49,$4E,$4B,$20,$43,$48,$41,$49,$4E,$00 S0008: .byte $56,$4F,$4C,$55,$4D,$45,$20,$24,$30,$30,$00 S000A: .byte $50,$41,$53,$53,$00 ; --------------------------------------------------------------- ; 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", 54 lda #<(_tgi_static_stddrv) ldx #>(_tgi_static_stddrv) jsr _tgi_install .dbg line, "main.c", 55 jsr _tgi_init .dbg line, "main.c", 57 cli .dbg line, "main.c", 59 L0002: lda #$04 jsr pusha ldx #$00 txa jsr _tgi_ioctl stx tmp1 ora tmp1 bne L0002 .dbg line, "main.c", 60 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", 67 lda #$09 sta M0003 stz M0003+1 .dbg line, "main.c", 68 sta M0004 stz M0004+1 .dbg line, "main.c", 69 lda #$6C sta M0005 stz M0005+1 .dbg line, "main.c", 71 stz M0002 stz M0002+1 L0002: lda M0002 cmp #$07 lda M0002+1 sbc #$00 bvc L0006 eor #$80 L0006: bmi L001B .dbg line, "main.c", 119 rts .dbg line, "main.c", 73 L001B: 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", 74 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", 75 lda #$01 sta M0008 stz M0008+1 .dbg line, "main.c", 76 lda #$FF sta M0009 sta M0009+1 .dbg line, "main.c", 79 stz M000A stz M000A+1 L0008: lda M000A cmp M0007 lda M000A+1 sbc #$00 bvc L0018 eor #$80 L0018: bpl L001A .dbg line, "main.c", 81 lda M0006 clc adc M000A sta ptr1 lda #$00 adc M000A+1 clc adc #>(_g_results) sta ptr1+1 ldy #<(_g_results) lda (ptr1),y jsr pusha lda M0006 clc adc M000A pha lda #$00 adc M000A+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", 83 stz M0008 stz M0008+1 .dbg line, "main.c", 84 lda M000A+1 sta M0009+1 lda M000A sta M0009 .dbg line, "main.c", 85 bra L001A .dbg line, "main.c", 79 L000A: inc M000A bne L0008 inc M000A+1 bra L0008 .dbg line, "main.c", 89 L001A: lda #$09 jsr _tgi_setcolor .dbg line, "main.c", 90 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", 92 lda M0008 ora M0008+1 beq L000E .dbg line, "main.c", 94 lda #$0A jsr _tgi_setcolor .dbg line, "main.c", 95 lda M0004 clc adc M0005 pha lda M0004+1 adc M0005+1 tax pla jsr pushax lda M0003 ldx M0003+1 jsr pushax lda #<(S000A) ldx #>(S000A) .dbg line, "main.c", 97 jmp L0019 .dbg line, "main.c", 100 L000E: lda #$02 jsr _tgi_setcolor .dbg line, "main.c", 102 lda M0009 ldx M0009+1 ina bne L0011 inx L0011: cmp #$0A txa sbc #$00 bvs L0012 eor #$80 L0012: bpl L0010 .dbg line, "main.c", 104 lda M0009 ldx M0009+1 ina bne L0013 inx L0013: jsr pushax lda #$0A jsr tosdiva0 ldy #$30 jsr incaxy sta M0001 .dbg line, "main.c", 105 lda M0009 ldx M0009+1 ina bne L0014 inx L0014: jsr pushax ldx #$00 lda #$0A jsr tosmoda0 ldy #$30 jsr incaxy sta M0001+1 .dbg line, "main.c", 106 stz M0001+2 .dbg line, "main.c", 108 bra L0015 .dbg line, "main.c", 110 L0010: lda M0009 ldx M0009+1 ina bne L0016 inx L0016: ldy #$30 jsr incaxy sta M0001 .dbg line, "main.c", 111 stz M0001+1 .dbg line, "main.c", 114 L0015: lda M0004 clc adc M0005 pha lda M0004+1 adc M0005+1 tax pla jsr pushax lda M0003 ldx M0003+1 jsr pushax lda #<(M0001) ldx #>(M0001) L0019: jsr _tgi_outtextxy .dbg line, "main.c", 117 lda #$09 clc adc M0003 sta M0003 bcc L0017 inc M0003+1 .dbg line, "main.c", 71 L0017: 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 .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", 125 lda #$51 sta M0003 stz M0003+1 .dbg line, "main.c", 126 stz M0004 stz M0004+1 .dbg line, "main.c", 128 lda #$0F jsr _tgi_setcolor .dbg line, "main.c", 130 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", 142 rts .dbg line, "main.c", 132 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", 133 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", 134 lda #$12 clc adc M0004 sta M0004 bcc L0008 inc M0004+1 .dbg line, "main.c", 136 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", 138 lda #$09 clc adc M0003 sta M0003 bcc L000D inc M0003+1 .dbg line, "main.c", 139 L000D: stz M0004 stz M0004+1 .dbg line, "main.c", 130 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", 146 lda #$04 jsr pusha ldx #$00 lda #$01 jsr _tgi_ioctl .dbg line, "main.c", 147 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", 45 jsr _run_tests .dbg line, "main.c", 46 jsr _init .dbg line, "main.c", 47 jsr _paint_results .dbg line, "main.c", 48 jsr _paint_debug_results .dbg line, "main.c", 49 jmp _loop_forever .dbg line .endproc