2003-05-02 14:24:22 +00:00
|
|
|
;
|
|
|
|
; Written by Groepaz/Hitmen <groepaz@gmx.net>
|
|
|
|
; Cleanup by Ullrich von Bassewitz <uz@cc65.org>
|
|
|
|
;
|
|
|
|
; Set the cursor position
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export setcursor
|
2003-05-02 14:24:22 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.include "nes.inc"
|
2003-05-02 14:24:22 +00:00
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
.proc setcursor
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
tya
|
|
|
|
clc
|
|
|
|
adc addrlo,x
|
|
|
|
sta SCREEN_PTR
|
2003-05-02 14:24:22 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
lda addrhi,x
|
|
|
|
adc #0
|
|
|
|
sta SCREEN_PTR+1
|
2003-05-02 14:24:22 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
;-----------------------------------------------------------------------------
|
|
|
|
; Tables with screen addresses
|
|
|
|
|
|
|
|
addrlo: .repeat screenrows,line
|
2013-05-09 11:56:54 +00:00
|
|
|
.byte <($2000+((1*32))+(line*charsperline))
|
|
|
|
.endrepeat
|
2003-05-02 14:24:22 +00:00
|
|
|
|
|
|
|
addrhi: .repeat screenrows,line
|
2013-05-09 11:56:54 +00:00
|
|
|
.byte >($2000+((1*32))+(line*charsperline))
|
|
|
|
.endrepeat
|
2003-05-02 14:24:22 +00:00
|
|
|
|