Blob Blame History Raw
From e7bb0aad19ca0636e1fba54c6f9b7dae55f91e08 Mon Sep 17 00:00:00 2001
From: jede <jede@oric.org>
Date: Sun, 21 Jul 2019 11:01:14 +0200
Subject: [PATCH 028/170] Fix comment and gotox force colour change

---
 libsrc/telestrat/cputc.s | 2 +-
 libsrc/telestrat/gotox.s | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libsrc/telestrat/cputc.s b/libsrc/telestrat/cputc.s
index 4b8e4fef..38f8af84 100644
--- a/libsrc/telestrat/cputc.s
+++ b/libsrc/telestrat/cputc.s
@@ -34,7 +34,7 @@ do_not_change_color_foreground:
     dec     SCRX                 ; Dec SCRX in order to place attribute before the right position
 
     pha
-    txa                          ; Swap X to A because, X contains CHARCOLOR
+    txa                          ; Swap X to A because, X contains BGCOLOR
     ORA     #%00010000           ; Add 16 because background color is an attribute between 16 and 23. 17 is red background for example
     BRK_TELEMON  XFWR            ; Change color on the screen (background)
     pla
diff --git a/libsrc/telestrat/gotox.s b/libsrc/telestrat/gotox.s
index cd8828d6..7a172071 100644
--- a/libsrc/telestrat/gotox.s
+++ b/libsrc/telestrat/gotox.s
@@ -2,10 +2,15 @@
 ; jede jede@oric.org 2017-02-25
 ;
     .export    _gotox
+    .import    OLD_CHARCOLOR, OLD_BGCOLOR
 
     .include   "telestrat.inc"
 
 .proc _gotox
    sta    SCRX
+
+   lda     #$FF
+   sta     OLD_CHARCOLOR         
+   sta     OLD_BGCOLOR          
    rts
 .endproc
-- 
2.26.0