aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-09 00:25:35 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-09 00:25:35 -0400
commit5934c31d6ef4e99512018cf671f4f501e53a3b35 (patch)
treeb51f46c6a73690bd3e16c82099e09dd974c401e4
parent87ab59df83efffaf0066308339da0fd228ad9cc9 (diff)
downloadbw-atari8-tools-5934c31d6ef4e99512018cf671f4f501e53a3b35.tar.gz
whichbas: Improve INPUT "PROMPT";VAR (only Turbo supports the semicolon).
-rw-r--r--whichbas.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/whichbas.c b/whichbas.c
index 490e517..a64ea00 100644
--- a/whichbas.c
+++ b/whichbas.c
@@ -158,7 +158,18 @@ CALLBACK(handle_cmd) {
/* TB, BXL, BXE all support INPUT "Prompt",VAR with the same tokenized
form. Atari BASIC doesn't allow string constants in INPUT args. */
if(nexttok == OP_STRCONST) {
+ int pos_after_string;
remove_type(BT_ATARI);
+ /* TB only: INPUT "Prompt";VAR is also supported (not in BXL/BXE) */
+ pos_after_string = pos + 3 + program[pos + 2];
+ if(verbose)
+ fprintf(stderr,
+ "===> INPUT with string prompt at line %d, "
+ "pos %04x, pos_after_string %04x (token %02x)\n",
+ lineno, pos, pos_after_string, program[pos_after_string]);
+ if(program[pos_after_string] == OP_SEMICOLON) {
+ remove_type(BT_BXL_BXE);
+ }
}
break;
case CMD_GET: