From 5e960d106e050abe01616618907a95dbe8bf7dd0 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Mon, 12 Oct 2015 21:04:06 +0200
Subject: [PATCH] Allow to override chars used for horizontal and vertical
lines.
---
libsrc/cbm/chline.s | 4 ++--
libsrc/cbm/clinechars.s | 6 ++++++
libsrc/cbm/cvline.s | 4 ++--
3 files changed, 10 insertions(+), 4 deletions(-)
create mode 100644 libsrc/cbm/clinechars.s
diff --git a/libsrc/cbm/chline.s b/libsrc/cbm/chline.s
index 26603b2fe..fe7e7255d 100644
--- a/libsrc/cbm/chline.s
+++ b/libsrc/cbm/chline.s
@@ -7,7 +7,7 @@
.export _chlinexy, _chline
.import popa, _gotoxy, cputdirect
- .importzp tmp1
+ .importzp tmp1, chlinechar
_chlinexy:
pha ; Save the length
@@ -19,7 +19,7 @@ _chline:
cmp #0 ; Is the length zero?
beq L9 ; Jump if done
sta tmp1
-L1: lda #64 ; Horizontal line, screen code
+L1: lda #chlinechar ; Horizontal line, screen code
jsr cputdirect ; Direct output
dec tmp1
bne L1
diff --git a/libsrc/cbm/clinechars.s b/libsrc/cbm/clinechars.s
new file mode 100644
index 000000000..54896574b
--- /dev/null
+++ b/libsrc/cbm/clinechars.s
@@ -0,0 +1,6 @@
+;
+; Chars used by chline () and cvline ()
+;
+
+ .exportzp chlinechar = 64
+ .exportzp cvlinechar = 93
diff --git a/libsrc/cbm/cvline.s b/libsrc/cbm/cvline.s
index f310e4322..2cf231e98 100644
--- a/libsrc/cbm/cvline.s
+++ b/libsrc/cbm/cvline.s
@@ -7,7 +7,7 @@
.export _cvlinexy, _cvline
.import popa, _gotoxy, putchar, newline
- .importzp tmp1
+ .importzp tmp1, cvlinechar
_cvlinexy:
pha ; Save the length
@@ -19,7 +19,7 @@ _cvline:
cmp #0 ; Is the length zero?
beq L9 ; Jump if done
sta tmp1
-L1: lda #93 ; Vertical bar
+L1: lda #cvlinechar ; Vertical bar
jsr putchar ; Write, no cursor advance
jsr newline ; Advance cursor to next line
dec tmp1
--
2.39.5