aboutsummaryrefslogtreecommitdiff
path: root/conio
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-04-19 13:48:30 -0400
committerB. Watson <yalhcru@gmail.com>2021-04-19 13:48:30 -0400
commitbd3b540db943c2ffdd246d88af212cfe41511d0f (patch)
tree84ae8ad2ef8f20a87895f3e8a4dc419aef8ecb91 /conio
parent231104ed9daf3903db0eedb7c9444c36fb63ee03 (diff)
downloadtaipan-bd3b540db943c2ffdd246d88af212cfe41511d0f.tar.gz
Save 3 bytes
Diffstat (limited to 'conio')
-rw-r--r--conio/chline.s23
-rw-r--r--conio/cputc.s4
2 files changed, 12 insertions, 15 deletions
diff --git a/conio/chline.s b/conio/chline.s
index 81cf2e9..5b7ce6c 100644
--- a/conio/chline.s
+++ b/conio/chline.s
@@ -1,5 +1,5 @@
; modified for taipan:
-; - commented out _chlinexy as taipan never uses it.
+; - removed _chlinexy as taipan never uses it.
; - get rid of the check for a 0 argument. taipan only calls chline()
; with constant non-zero args.
;
@@ -9,9 +9,9 @@
; void chline (unsigned char length);
;
- .export _chline
- .import popa, _gotoxy, cputdirect
- .importzp tmp1
+ .export _chline, _cspaces
+ .import cputdirect
+ .importzp tmp1, tmp2
.ifdef __ATARI5200__
CHRCODE = 14
@@ -19,17 +19,14 @@ CHRCODE = 14
CHRCODE = $12+64
.endif
-;_chlinexy:
-; pha ; Save the length
-; jsr popa ; Get y
-; jsr _gotoxy ; Call this one, will pop params
-; pla ; Restore the length
-
+_cspaces:
+ ldx #0
+ .byte $2c
_chline:
-; cmp #0 ; Is the length zero?
-; beq L9 ; Jump if done
+ ldx #CHRCODE
+ stx tmp2
sta tmp1
-L1: lda #CHRCODE ; Horizontal line, screen code
+L1: lda tmp2
jsr cputdirect ; Direct output
dec tmp1
bne L1
diff --git a/conio/cputc.s b/conio/cputc.s
index 4e29482..a34217f 100644
--- a/conio/cputc.s
+++ b/conio/cputc.s
@@ -60,8 +60,8 @@ cputdirect: ; accepts screen code
lda COLCRS
cmp #40
bcc plot
- lda #0
- sta COLCRS
+ ;lda #0
+ ;sta COLCRS
.export newline
_crlf: