1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-31 11:29:16 +00:00
cc65/libsrc/cbm510/kplot.s
cuz c4a49faf48 Working in P500 code
git-svn-id: svn://svn.cc65.org/cc65/trunk@919 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-14 09:52:30 +00:00

91 lines
1.3 KiB
ArmAsm

;
; Ullrich von Bassewitz, 13.09.2001
;
; PLOT routine for the 510.
;
.export k_plot
.importzp crtc
.include "zeropage.inc"
.include "io.inc"
; ------------------------------------------------------------------------
;
.proc k_plot
bcc set
ldx CURS_Y
ldy CURS_X
rts
set: stx CURS_Y
sty CURS_X
lda LineLSBTab,x
sta CharPtr
lda LineMSBTab,x
sta CharPtr+1
.if 0
lda IndReg
pha
lda #$0F
sta IndReg
ldy #$00
clc
sei
sta (crtc),y
lda CharPtr
adc CURS_X
iny
sta (crtc),y
dey
lda #$0E
sta (crtc),y
iny
lda (crtc),y
and #$F8
sta sedt1
lda CharPtr+1
adc #$00
and #$07
ora sedt1
sta (crtc),y
cli
pla
sta IndReg
.endif
rts
.endproc
; -------------------------------------------------------------------------
; Low bytes of the start address of the screen lines
.rodata
.macro LineLoTab
.repeat 25, I
.byte <(VIDEO_RAM + I * 40)
.endrep
.endmacro
LineLSBTab: LineLoTab
; -------------------------------------------------------------------------
; High bytes of the start address of the screen lines
.macro LineHiTab
.repeat 25, I
.byte >(VIDEO_RAM + I * 40)
.endrep
.endmacro
LineMSBTab: LineHiTab