aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-09 14:44:13 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-09 14:44:13 -0400
commit93bed7b51d4217472ac854b88b6afa406e724e44 (patch)
tree84e15d3e991cf9eda535cf49b5944626cb496ac4
parent13d05dd17595a4c3a1461ba4827cc14533888e33 (diff)
downloadbw-atari8-tools-93bed7b51d4217472ac854b88b6afa406e724e44.tar.gz
whichbas: restore TRACE/EXTEND logic.
-rw-r--r--whichbas.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/whichbas.c b/whichbas.c
index 5fa48a6..fdda5bf 100644
--- a/whichbas.c
+++ b/whichbas.c
@@ -255,8 +255,7 @@ CALLBACK(handle_cmd) {
}
break;
case 0x58: /* TRACE (optional + or -), EXTEND (BXE; no args) */
- /* PARTIAL: TRACE +/- detected, TRACE without arg can't be
- told from EXTEND. */
+ /* COMPLETE (except for unlikely direct mode EXTEND) */
if(nexttok == OP_PLUS || nexttok == OP_MINUS) {
bas_type = BT_TURBO;
print_result();
@@ -265,6 +264,15 @@ CALLBACK(handle_cmd) {
as the regular one, but can't be entered in the editor. Assume
no BXL program contains this token. */
remove_type(BT_BXL);
+ /* In BXE, EXTEND can't actually appear in a program (it's direct
+ mode only). The only way to get EXTEND into a BXE program is
+ to do a direct mode command like:
+ EXTEND:SAVE "D:PROG"
+ ...which of course puts it at line 32768. So if this token
+ appears on any other line, it must be Turbo's TRACE. */
+ if(lineno < 32768) {
+ remove_type(BT_BXE);
+ }
}
break;
case 0x59: /* TEXT or PROCEDURE */