]> git.sur5r.net Git - cc65/commitdiff
Allow to override chars used for horizontal and vertical lines.
authorOliver Schmidt <ol.sc@web.de>
Mon, 12 Oct 2015 19:04:06 +0000 (21:04 +0200)
committerOliver Schmidt <ol.sc@web.de>
Mon, 12 Oct 2015 19:04:06 +0000 (21:04 +0200)
libsrc/cbm/chline.s
libsrc/cbm/clinechars.s [new file with mode: 0644]
libsrc/cbm/cvline.s

index 26603b2febbbcdcfa77dfcb1a6f36b8e6669e79d..fe7e7255d7ce2c272a5be2f513fa2a563990fa66 100644 (file)
@@ -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 (file)
index 0000000..5489657
--- /dev/null
@@ -0,0 +1,6 @@
+;
+; Chars used by chline () and cvline ()
+;
+
+        .exportzp       chlinechar = 64
+        .exportzp       cvlinechar = 93
index f310e43223ee39ca700295de8568104219a5ff64..2cf231e982d714b38b3c5c3feba9040783151239 100644 (file)
@@ -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