aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-04-07 15:35:30 -0400
committerB. Watson <yalhcru@gmail.com>2021-04-07 15:35:30 -0400
commitf7481c4eaf95e176dd0a736ed1af46b6dd06a2b0 (patch)
treea3bb93dc5f6404611fd48db1ff5ba1bfe1ddd114
parentb779a07339320b99e6e598699a208c99ff1ed5d3 (diff)
downloadtaipan-f7481c4eaf95e176dd0a736ed1af46b6dd06a2b0.tar.gz
Make port status updates smoother
-rw-r--r--console.s9
-rw-r--r--taipan.c16
2 files changed, 17 insertions, 8 deletions
diff --git a/console.s b/console.s
index af044d2..809d0c2 100644
--- a/console.s
+++ b/console.s
@@ -2,7 +2,7 @@
.include "atari.inc"
.include "conio/mul40.s"
- .export _clrtobot, _clrtoeol, _clr_screen, _clrtoline, _cspaces, _cblank, _backspace, _cprint_pipe, _cprint_bang, _cspace, _cputc_s, _comma_space, _cprint_colon_space, _cprint_question_space, _cprint_period, _cprint_taipan_prompt, _crlf, _plus_or_space, _gotox0y, _cputc0, _set_orders
+ .export _clrtobot, _clrtoeol, _clr_screen, _clrtoline, _cspaces, _cblank, _cblankto, _backspace, _cprint_pipe, _cprint_bang, _cspace, _cputc_s, _comma_space, _cprint_colon_space, _cprint_question_space, _cprint_period, _cprint_taipan_prompt, _crlf, _plus_or_space, _gotox0y, _cputc0, _set_orders
.export _rvs_on, _rvs_off
.importzp tmp3 ; ditto
@@ -86,6 +86,13 @@ clrloop:
done:
rts
+_cblankto:
+ sec
+ sbc COLCRS
+ beq done
+ bcs _cblank
+ rts
+
_cspaces:
sta tmp3
@lp:
diff --git a/taipan.c b/taipan.c
index a221e6d..bb81eb1 100644
--- a/taipan.c
+++ b/taipan.c
@@ -149,6 +149,8 @@ extern void cprint_taipan_prompt(void);
/* our own clr_screen(), don't use conio's clrscr() */
extern void clr_screen(void);
+extern void __fastcall__ cblankto(unsigned char dest);
+
/* avoid calling/linking conio's revers() function. This saves us
49 bytes (2 per call to revers(), plus these functions are smaller
than conio's revers() because they return void) */
@@ -614,7 +616,7 @@ bignum(big0) = BIG_0;
0..999999 stet
1M..10M-1 1.23 Million
10M..100M-1 10.2 Million, 100 Million
- 100M..1B-1 100 Million, 999 Billion
+ 100M..1M-1 100 Million, 999 Million
1B..10B-1 1.23 Billion
10B..100B-1 10.2 Billion, 100 Billion
100B..1T-1 100 Billion
@@ -1735,17 +1737,17 @@ void port_stats(void)
gotoxy(21, 4);
in_use = warehouse_in_use();
- cblank(5);
cprintuint(in_use);
+ cblankto(26);
gotoxy(21, 6);
- cblank(5);
cprintuint(10000 - in_use);
+ cblankto(26);
for(i = 0; i < 4; ++i) {
gotoxy(12, i + 3);
- cblank(5);
cprintuint(hkw_[i]);
+ cblankto(18);
}
/*
@@ -1808,12 +1810,12 @@ void port_stats(void)
cprintuint(year);
gotoxy(30, 6);
- cblank(10);
rvs_on();
if(port == 4 || port == 5) cspace();
// cputs(location[port]);
print_msg(location[port]);
rvs_off();
+ clrtoeol();
gotoxy(28, 9);
clrtoeol();
@@ -1826,16 +1828,16 @@ void port_stats(void)
cprintuint(status);
gotoxy(6, 14);
- cblank(14);
cprintfancy(cash);
+ cblankto(20);
gotoxy(26, 14);
- cblank(13);
#ifdef BIGNUM
cprintfancy_big(bank);
#else
cprintfancy(bank);
#endif
+ clrtoeol();
}
void mchenry(void) {