diff options
author | B. Watson <urchlay@slackware.uk> | 2024-07-08 23:01:09 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-07-08 23:01:09 -0400 |
commit | 8a1009c65d31c0814efdcbf484dfc600530f8820 (patch) | |
tree | 74f82bca245514b408c4b3f38c8d943d7d4d43c1 | |
parent | fac773ef377c6439fa589d1c2a76c817b349a379 (diff) | |
download | bw-atari8-tools-8a1009c65d31c0814efdcbf484dfc600530f8820.tar.gz |
whichbas: improve detection of TRACE/EXTEND, cmd token 0x59.
-rw-r--r-- | whichbas.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -225,11 +225,19 @@ CALLBACK(handle_cmd) { } break; case 0x58: /* TRACE (optional + or -), EXTEND (BXE; no args) */ - /* EXTEND can't show up in a program except maybe line 32768, e.g. - EXTEND:SAVE "D:BLAH". */ - remove_type(BT_BXL); - if(lineno < 32768) { - remove_type(BT_BXE); + 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); + if(lineno < 32768) { + /* EXTEND can't show up in a program except maybe line 32768, e.g. + EXTEND:SAVE "D:BLAH". */ + remove_type(BT_BXE); + } } break; case 0x59: /* TEXT or PROCEDURE */ |