]> git.sur5r.net Git - cc65/commitdiff
some fixes for last change
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 4 Nov 2002 23:30:19 +0000 (23:30 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 4 Nov 2002 23:30:19 +0000 (23:30 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1485 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/cputc.s

index 3ff3f0858b05346750b6a6fa016ee2c6719ee02b..ca3f920284bb6ae95cf8890d847729f770484b8b 100644 (file)
@@ -45,15 +45,20 @@ L4: cmp     #$0A            ; LF
 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
@@ -96,6 +101,7 @@ L3:  clc
        ldy     COLCRS
        sta     (ptr4),y
 
+       ; update OLDADR (maybe ROWCRS and COLCRS were changed)
        sty     tmp4
        lda     ptr4
        clc
@@ -104,7 +110,6 @@ L3: clc
        lda     ptr4+1
        adc     #0
        sta     OLDADR+1
-
        rts
 
        .rodata