]> git.sur5r.net Git - cc65/commitdiff
Shortened the code
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 8 Mar 2010 18:40:55 +0000 (18:40 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 8 Mar 2010 18:40:55 +0000 (18:40 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4620 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/c128/cputc.s

index d69170bce07af10d6b75d056bf53535bd36e292b..de1e824c69aad697f669939bc2207e094690d9be 100644 (file)
@@ -49,13 +49,15 @@ L3:         and     #$3F
 ; Output one character to the screen. We will disable scrolling while doing so
 
 cputdirect:
-        ldx     SCROLL
-        stx     ScrollSave      ; Save scroll flag
-        ldx     #$C0
-        stx     SCROLL          ; Disable scrolling
-        jsr     PRINT           ; Call kernal entry point
-        ldx     ScrollSave
-        stx     SCROLL          ; Restore old scroll flag
+        tax                     ; Save output char
+        lda     SCROLL
+        pha                     ; Save scroll flag
+        lda     #$C0
+        sta     SCROLL          ; Disable scrolling
+        txa                     ; Restore output char
+        jsr     PRINT
+        pla
+        sta     SCROLL          ; Restore old scroll flag
         rts
 
 ; Handle character if high bit set