aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--whichbas.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/whichbas.c b/whichbas.c
index d6e4163..9700457 100644
--- a/whichbas.c
+++ b/whichbas.c
@@ -170,14 +170,12 @@ CALLBACK(handle_cmd) {
0x49: LOCK or UNPROTECT (take the same args)
0x4B: RENAME in both Turbo and BXL/XE (take the same args)
0x60: CLS or HITCLR (no args either way)
- This leaves 40 we can check.
- Covered so far: 36 (90%)
+ This leaves 42 we can check.
+ Covered so far: 38 (90%)
TODO: Unknown tokens:
0x54: ??? in TB (find out what), LVAR in BXL/BXE.
0x5A: BLOAD or... what? (Jindroush lists it as ?5A?)
TODO:
- 0x42: Maybe: BPUT or RGET (take the same args... but not quite!)
- 0x43: Maybe: BGET or BPUT (take the same args... but not quite!)
0x5B: BRUN or CALL (both take a string, CALL allows "USING" though)
0x5F: PAINT (req 2 args) or NUM (optional 2 args, probly not appear in program)
*/
@@ -495,6 +493,22 @@ CALLBACK(handle_end_stmt) {
remove_type(BT_BXL_BXE);
}
break;
+ case 0x42: /* BPUT or RGET */
+ /* partial:
+ Turbo BGET always takes 3 args, BXL/BXE RGET takes 2 or more.
+ We can at least rule out Turbo if there aren't exactly 3 args. */
+ if(comma_count != 2) {
+ remove_type(BT_TURBO);
+ }
+ break;
+ case 0x43: /* BGET or BPUT */
+ /* partial:
+ Turbo BGET and BPUT always take 3 args. So does BXL BPUT.
+ BXE BPUT takes 3 args and an optional 4th. */
+ if(comma_count != 2) {
+ remove_type(BT_TURBO | BT_BXL);
+ }
+ break;
case 0x55: /* RENUM in both (TB req 3 args, BXL up to two) */
if(comma_count == 2) {
remove_type(BT_BXL_BXE);