1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 15:29:46 +00:00
cc65/libsrc/cbm510/kplot.s

67 lines
1.1 KiB
ArmAsm
Raw Normal View History

;
; Ullrich von Bassewitz, 13.09.2001
;
; PLOT routine for the 510.
;
.export PLOT
.import __VIDRAM_START__
.importzp crtc
.include "cbm510.inc"
.macpack generic
; ------------------------------------------------------------------------
;
.proc PLOT
bcs get
stx CURS_Y
sty CURS_X
lda LineLSBTab,x
sta SCREEN_PTR
sta CRAM_PTR
lda LineMSBTab,x
sta SCREEN_PTR+1
sub #>__VIDRAM_START__
add #>COLOR_RAM
sta CRAM_PTR+1
get: ldx CURS_Y
ldy CURS_X
rts
.endproc
; -------------------------------------------------------------------------
; Low bytes of the start address of the screen lines
.rodata
.macro LineLoTab
.repeat 25, I
.byte <(__VIDRAM_START__ + I * 40)
.endrep
.endmacro
LineLSBTab: LineLoTab
; -------------------------------------------------------------------------
; High bytes of the start address of the screen lines
.macro LineHiTab
.repeat 25, I
.byte >(__VIDRAM_START__ + I * 40)
.endrep
.endmacro
LineMSBTab: LineHiTab