mirror of
https://github.com/cc65/cc65.git
synced 2024-10-19 16:24:46 +00:00
e1a9115fd4
git-svn-id: svn://svn.cc65.org/cc65/trunk@920 b7a2c559-68d2-44c3-8de9-860c34a00d81
66 lines
1.0 KiB
ArmAsm
66 lines
1.0 KiB
ArmAsm
;
|
|
; Ullrich von Bassewitz, 13.09.2001
|
|
;
|
|
; PLOT routine for the 510.
|
|
;
|
|
|
|
.export k_plot
|
|
.importzp crtc
|
|
|
|
.include "zeropage.inc"
|
|
.include "io.inc"
|
|
|
|
.macpack generic
|
|
|
|
; ------------------------------------------------------------------------
|
|
;
|
|
|
|
.proc k_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 #>VIDEO_RAM
|
|
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 <(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
|
|
|
|
|