diff options
-rw-r--r-- | whichbas.c | 33 |
1 files changed, 15 insertions, 18 deletions
@@ -256,24 +256,21 @@ CALLBACK(handle_cmd) { break; case 0x58: /* TRACE (optional + or -), EXTEND (BXE; no args) */ /* COMPLETE */ - if(nexttok == OP_PLUS || nexttok == OP_MINUS) { - bas_type = BT_TURBO; - print_result(); - } else { - /* In BXL, this looks to be an extra END token, that behaves the same - 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. But this code will - never see that, because we'd already detect EXTENDed BXE - based on the first 2 bytes of the file. - */ - remove_type(BT_BXE); - } + /* In BXL, this looks to be an extra END token, that behaves the same + as the regular one, but can't be entered in the editor. Assume + no BXL program contains this token. */ + /* 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. But this code will + never see that, because we'd already detect EXTENDed BXE + based on the first 2 bytes of the file. + */ + /* So, if we see this token, it *has* to be Turbo's TRACE, whether + or not it has an argument. */ + bas_type = BT_TURBO; + print_result(); break; case 0x59: /* TEXT or PROCEDURE */ /* COMPLETE */ |