; ; File generated by cc65 v 2.19 - Git fe19dd1 ; .fopt compiler,"cc65 v 2.19 - Git fe19dd1" .setcpu "6502" .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, "cbm510/pencalib.c", 2726, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/conio.h", 10106, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/stdarg.h", 2913, 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/cbm.h", 12033, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/stddef.h", 3037, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/cbm510.h", 6594, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_vic2.h", 10835, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_sid.h", 3626, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_6526.h", 3962, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_6551.h", 2957, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/_6525.h", 3410, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/cbm_filetype.h", 4949, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/mouse.h", 8806, 1794640055 .dbg file, "/data/emu/lynx-python/reference/src/cc65/include/pen.h", 3700, 1794640055 .import _peekbsys .import _pokebsys .import _clrscr .import _cputsxy .import _revers .import _textcolor .import _bgcolor .import _cvlinexy .import _cclearxy .import _screensize .import _mouse_hide .import _mouse_show .import _mouse_move .import _mouse_buttons .import _mouse_info .export _pen_calibrate .segment "RODATA" S0004: .byte $C6,$49,$4E,$49,$53,$48,$20,$42,$59,$20,$43,$4C,$49,$43,$4B,$49 .byte $4E,$47,$20,$4F,$46,$46,$20,$42,$41,$52,$2E,$00 S0002: .byte $C1,$44,$4A,$55,$53,$54,$20,$42,$59,$20,$43,$4C,$49,$43,$4B,$49 .byte $4E,$47,$20,$4F,$4E,$20,$4C,$49,$4E,$45,$2E,$00 ; --------------------------------------------------------------- ; void __near__ __fastcall__ pen_calibrate (unsigned char *XOffset) ; --------------------------------------------------------------- .segment "CODE" .proc _pen_calibrate: near .dbg func, "pen_calibrate", "00", static, "_pen_calibrate" .dbg sym, "XOffset", "00", auto, 0 .dbg sym, "oldBg", "00", auto, -1 .dbg sym, "oldText", "00", auto, -2 .dbg sym, "oldRev", "00", auto, -3 .dbg sym, "sprite0Color", "00", auto, -4 .dbg sym, "width", "00", auto, -5 .dbg sym, "width2", "00", auto, -6 .dbg sym, "height", "00", auto, -7 .dbg sym, "height4", "00", auto, -8 .dbg sym, "height8", "00", auto, -9 .dbg sym, "info", "00", auto, -14 .segment "CODE" .dbg line, "cbm510/pencalib.c", 29 jsr pushax .dbg line, "cbm510/pencalib.c", 30 lda #$06 jsr _bgcolor jsr pusha .dbg line, "cbm510/pencalib.c", 31 lda #$0F jsr _textcolor jsr pusha .dbg line, "cbm510/pencalib.c", 32 lda #$01 jsr _revers jsr pusha .dbg line, "cbm510/pencalib.c", 33 ldx #$D8 lda #$27 jsr _peekbsys jsr pusha .dbg line, "cbm510/pencalib.c", 37 ldy #$0A jsr subysp lda #$09 jsr leaa0sp jsr pushax lda #$09 jsr leaa0sp jsr _screensize .dbg line, "cbm510/pencalib.c", 38 ldy #$09 lda (c_sp),y lsr a dey sta (c_sp),y .dbg line, "cbm510/pencalib.c", 39 dey lda (c_sp),y lsr a lsr a dey sta (c_sp),y .dbg line, "cbm510/pencalib.c", 40 asl a asl a asl a dey sta (c_sp),y .dbg line, "cbm510/pencalib.c", 44 jsr _clrscr .dbg line, "cbm510/pencalib.c", 45 lda #$00 jsr pusha ldy #$07 lda (c_sp),y jsr pusha ldy #$08 lda (c_sp),y jsr pusha0 ldy #$0D lda (c_sp),y jsr tosumula0 jsr _cclearxy .dbg line, "cbm510/pencalib.c", 46 ldy #$08 lda (c_sp),y jsr pusha ldy #$07 lda (c_sp),y clc adc #$01 jsr pusha ldy #$08 lda (c_sp),y sec sbc #$02 jsr _cvlinexy .dbg line, "cbm510/pencalib.c", 47 lda #$00 jsr _revers .dbg line, "cbm510/pencalib.c", 51 ldy #$08 ldx #$00 lda (c_sp),y ldy #$0E jsr decaxy jsr pusha ldy #$08 lda (c_sp),y lsr a clc adc #$01 jsr pusha lda #<(S0002) ldx #>(S0002) jsr _cputsxy .dbg line, "cbm510/pencalib.c", 52 ldy #$08 ldx #$00 lda (c_sp),y ldy #$0E jsr decaxy jsr pusha ldy #$08 lda (c_sp),y lsr a clc adc #$03 jsr pusha lda #<(S0004) ldx #>(S0004) jsr _cputsxy .dbg line, "cbm510/pencalib.c", 54 ldx #$D8 lda #$27 jsr pushax lda #$0C jsr _pokebsys .dbg line, "cbm510/pencalib.c", 55 jsr _mouse_show .dbg line, "cbm510/pencalib.c", 56 ldy #$08 ldx #$00 lda (c_sp),y jsr shlax3 jsr pushax ldy #$07 ldx #$00 lda (c_sp),y lsr a jsr _mouse_move .dbg line, "cbm510/pencalib.c", 61 L0005: jsr _mouse_buttons and #$10 bne L0005 .dbg line, "cbm510/pencalib.c", 66 L0007: lda c_sp ldx c_sp+1 jsr _mouse_info .dbg line, "cbm510/pencalib.c", 67 ldy #$04 lda (c_sp),y and #$10 beq L0007 .dbg line, "cbm510/pencalib.c", 71 dey jsr ldaxysp ldy #$05 cmp (c_sp),y txa sbc #$00 bvc L0013 eor #$80 L0013: bmi L0003 jsr pushwysp ldy #$07 ldx #$00 lda (c_sp),y asl a bcc L0012 inx L0012: jsr tosicmp bpl L0003 .dbg line, "cbm510/pencalib.c", 81 ldy #$0F jsr ldaxysp jsr pushax sta ptr1 stx ptr1+1 ldx #$00 lda (ptr1,x) jsr pusha0 ldy #$07 jsr pushwysp ldy #$0E ldx #$00 lda (c_sp),y jsr shlax3 jsr incax4 jsr tossubax jsr pushax lda #$02 jsr tosdiva0 jsr tosaddax ldy #$00 jsr staspidx .dbg line, "cbm510/pencalib.c", 82 jmp L0005 .dbg line, "cbm510/pencalib.c", 86 L0003: jsr _mouse_buttons and #$10 bne L0003 .dbg line, "cbm510/pencalib.c", 88 jsr _mouse_hide .dbg line, "cbm510/pencalib.c", 89 ldx #$D8 lda #$27 jsr pushax ldy #$0C lda (c_sp),y jsr _pokebsys .dbg line, "cbm510/pencalib.c", 90 ldy #$0B lda (c_sp),y jsr _revers .dbg line, "cbm510/pencalib.c", 91 ldy #$0C lda (c_sp),y jsr _textcolor .dbg line, "cbm510/pencalib.c", 92 ldy #$0D lda (c_sp),y jsr _bgcolor .dbg line, "cbm510/pencalib.c", 93 jsr _clrscr .dbg line, "cbm510/pencalib.c", 94 ldy #$10 jmp addysp .dbg line .endproc