mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 01:31:55 +00:00
setcursor now updates OLDADR from COLCRS and ROWCRS
git-svn-id: svn://svn.cc65.org/cc65/trunk@1655 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
6598be68b2
commit
16af39de8d
@ -6,9 +6,9 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
.export _cgetc
|
.export _cgetc,setcursor
|
||||||
.import cursor
|
.import cursor,mul40
|
||||||
|
|
||||||
_cgetc:
|
_cgetc:
|
||||||
jsr setcursor
|
jsr setcursor
|
||||||
jsr @1
|
jsr @1
|
||||||
@ -26,8 +26,25 @@ _cgetc:
|
|||||||
|
|
||||||
.proc setcursor
|
.proc setcursor
|
||||||
|
|
||||||
lda OLDCHR ; get char at current cursor position
|
ldy #0
|
||||||
ldy #0 ; needed later
|
lda OLDCHR
|
||||||
|
sta (OLDADR),y
|
||||||
|
|
||||||
|
lda ROWCRS
|
||||||
|
jsr mul40
|
||||||
|
clc
|
||||||
|
adc SAVMSC ; add start of screen memory
|
||||||
|
sta OLDADR
|
||||||
|
txa
|
||||||
|
adc SAVMSC+1
|
||||||
|
sta OLDADR+1
|
||||||
|
lda COLCRS
|
||||||
|
adc OLDADR
|
||||||
|
sta OLDADR
|
||||||
|
bcc nc
|
||||||
|
inc OLDADR+1
|
||||||
|
nc: lda (OLDADR),y
|
||||||
|
sta OLDCHR
|
||||||
|
|
||||||
ldx cursor ; current cursor setting as requested by the user
|
ldx cursor ; current cursor setting as requested by the user
|
||||||
beq off
|
beq off
|
||||||
|
Loading…
Reference in New Issue
Block a user