aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */