; ; 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", 2941, 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 .segment "RODATA" _k_expected_results: .byte $01 .byte $08 .res 7,$00 .byte $01 .byte $3F .res 7,$00 .byte $01 .byte $00 .res 7,$00 .byte $01 .byte $08 .res 7,$00 .byte $01 .byte $00 .res 7,$00 .byte $01 .byte $7F .res 7,$00 .byte $01 .byte $FF .res 7,$00 .byte $01 .byte $FE .res 7,$00 .byte $01 .byte $FD .res 7,$00 .byte $01 .byte $0F .res 7,$00 .byte $01 .byte $80 .res 7,$00 .byte $01 .byte $ED .res 7,$00 .byte $01 .byte $10 .res 7,$00 .byte $01 .byte $7F .res 7,$00 .byte $01 .byte $80 .res 7,$00 .byte $01 .byte $EB .res 7,$00 .byte $01 .byte $40 .res 7,$00 .byte $01 .byte $3F .res 7,$00 _k_test_offsets: .byte $00 .byte $03 .byte $06 .byte $0B .byte $0E .byte $0F _k_test_counts: .byte $03 .byte $03 .byte $05 .byte $03 .byte $01 .byte $03 S0001: .byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$41,$42,$43,$44,$45,$46 .byte $00 S0005: .byte $4D,$41,$58,$20,$4C,$45,$4E,$47,$54,$48,$00 S0002: .byte $43,$54,$4C,$42,$20,$52,$44,$2F,$57,$52,$00 S0007: .byte $4C,$4F,$4E,$47,$20,$54,$45,$53,$54,$00 S0004: .byte $49,$4E,$54,$45,$47,$52,$41,$54,$45,$00 S0006: .byte $43,$4C,$49,$50,$50,$49,$4E,$47,$00 S0003: .byte $4F,$4E,$45,$53,$48,$4F,$54,$00 S0009: .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", 52 lda #<(_tgi_static_stddrv) ldx #>(_tgi_static_stddrv) jsr _tgi_install .dbg line, "main.c", 53 jsr _tgi_init .dbg line, "main.c", 55 cli .dbg line, "main.c", 57 L0002: lda #$04 jsr pusha ldx #$00 txa jsr _tgi_ioctl stx tmp1 ora tmp1 bne L0002 .dbg line, "main.c", 58 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", 65 lda #$09 sta M0003 stz M0003+1 .dbg line, "main.c", 66 sta M0004 stz M0004+1 .dbg line, "main.c", 67 lda #$6C sta M0005 stz M0005+1 .dbg line, "main.c", 69 stz M0002 stz M0002+1 L0002: lda M0002 cmp #$06 lda M0002+1 sbc #$00 bvc L0006 eor #$80 L0006: bmi L001B .dbg line, "main.c", 117 rts .dbg line, "main.c", 71 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", 72 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", 73 lda #$01 sta M0008 stz M0008+1 .dbg line, "main.c", 74 lda #$FF sta M0009 sta M0009+1 .dbg line, "main.c", 77 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", 79 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", 81 stz M0008 stz M0008+1 .dbg line, "main.c", 82 lda M000A+1 sta M0009+1 lda M000A sta M0009 .dbg line, "main.c", 83 bra L001A .dbg line, "main.c", 77 L000A: inc M000A bne L0008 inc M000A+1 bra L0008 .dbg line, "main.c", 87 L001A: lda #$09 jsr _tgi_setcolor .dbg line, "main.c", 88 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", 90 lda M0008 ora M0008+1 beq L000E .dbg line, "main.c", 92 lda #$0A jsr _tgi_setcolor .dbg line, "main.c", 93 lda M0004 clc adc M0005 pha lda M0004+1 adc M0005+1 tax pla jsr pushax lda M0003 ldx M0003+1 jsr pushax lda #<(S0009) ldx #>(S0009) .dbg line, "main.c", 95 jmp L0019 .dbg line, "main.c", 98 L000E: lda #$02 jsr _tgi_setcolor .dbg line, "main.c", 100 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", 102 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", 103 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", 104 stz M0001+2 .dbg line, "main.c", 106 bra L0015 .dbg line, "main.c", 108 L0010: lda M0009 ldx M0009+1 ina bne L0016 inx L0016: ldy #$30 jsr incaxy sta M0001 .dbg line, "main.c", 109 stz M0001+1 .dbg line, "main.c", 112 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", 115 lda #$09 clc adc M0003 sta M0003 bcc L0017 inc M0003+1 .dbg line, "main.c", 69 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", 123 lda #$51 sta M0003 stz M0003+1 .dbg line, "main.c", 124 stz M0004 stz M0004+1 .dbg line, "main.c", 126 lda #$0F jsr _tgi_setcolor .dbg line, "main.c", 128 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", 140 rts .dbg line, "main.c", 130 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", 131 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", 132 lda #$12 clc adc M0004 sta M0004 bcc L0008 inc M0004+1 .dbg line, "main.c", 134 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", 136 lda #$09 clc adc M0003 sta M0003 bcc L000D inc M0003+1 .dbg line, "main.c", 137 L000D: stz M0004 stz M0004+1 .dbg line, "main.c", 128 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", 144 lda #$04 jsr pusha ldx #$00 lda #$01 jsr _tgi_ioctl .dbg line, "main.c", 145 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", 43 jsr _run_tests .dbg line, "main.c", 44 jsr _init .dbg line, "main.c", 45 jsr _paint_results .dbg line, "main.c", 46 jsr _paint_debug_results .dbg line, "main.c", 47 jmp _loop_forever .dbg line .endproc