aboutsummaryrefslogtreecommitdiff
path: root/console.s
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-02-19 15:59:47 -0500
committerB. Watson <yalhcru@gmail.com>2016-02-19 15:59:47 -0500
commit8bcbde0e1515f5cfe2e96aa9d82073b83f4e4f7a (patch)
tree4cd440d71a9e39c9e9115d2901043f7d5f732577 /console.s
parent08fd9af5a9247f5c47b926259ed45cf6a437e67d (diff)
downloadtaipan-8bcbde0e1515f5cfe2e96aa9d82073b83f4e4f7a.tar.gz
shrink code, now 5976 bytes free. update cart.txt
Diffstat (limited to 'console.s')
-rw-r--r--console.s22
1 files changed, 17 insertions, 5 deletions
diff --git a/console.s b/console.s
index 7c7e18e..04524ab 100644
--- a/console.s
+++ b/console.s
@@ -2,9 +2,11 @@
.include "atari.inc"
.export _clrtobot, _clrtoeol, _clrtoline, _cspaces, _cblank, _backspace
+ .export _rvs_on, _rvs_off
.import mul40 ; from cc65's runtime
.importzp tmp3 ; ditto
+ .import _revflag ; conio/revers.s
.import bump_destptr ; these two are
.importzp destptr ; from draw_lorcha.s
.import _cspace
@@ -26,7 +28,9 @@
_clrtobot: ; same as clrtoline(24);
lda #24
- bne _clrtoline
+ ;bne _clrtoline
+ .byte $2c ; BIT absolute opcode
+ ; fall through to _clrtoeol
_clrtoeol:
lda ROWCRS
@@ -81,6 +85,11 @@ _cspaces:
bne @lp
rts
+_backspace:
+ dec COLCRS
+ lda #1
+ ; fall through to _cblank
+
_cblank:
tax
lda COLCRS
@@ -95,7 +104,10 @@ _cblank:
sta COLCRS
rts
-_backspace:
- dec COLCRS
- lda #1
- bne _cblank
+_rvs_on:
+ lda #$80
+ .byte $2c ; BIT absolute opcode
+_rvs_off:
+ lda #0
+ sta _revflag
+ rts