cputdirect: ; accepts screen code
jsr putchar
- lda OLDADR ; update cursor position pointer
- clc
- adc #1
- sta OLDADR
- bcc l1
+ ; update cursor position pointer
+ ldy #0
+ lda OLDCHR
+ sta (OLDADR),y
+ inc OLDADR
+ bne L1
inc OLDADR+1
+L1: lda (OLDADR),y
+ sta OLDCHR
+ ora _revflag
+ sta (OLDADR),y
; advance cursor
-l1: inc COLCRS
+ inc COLCRS
lda COLCRS
cmp #40
bcc plot
ldy COLCRS
sta (ptr4),y
+ ; update OLDADR (maybe ROWCRS and COLCRS were changed)
sty tmp4
lda ptr4
clc
lda ptr4+1
adc #0
sta OLDADR+1
-
rts
.rodata