diff options
author | B. Watson <urchlay@slackware.uk> | 2024-07-07 05:26:20 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-07-07 05:26:20 -0400 |
commit | 5e1afcfaf3f2fa3cee4d2a2f7648880b5cfa5831 (patch) | |
tree | 6b423e5f030de207bf151acefc6a75133e9ed2ef | |
parent | 4cc4f909a55b470fcdef9e61456fb161ed7f5759 (diff) | |
download | bw-atari8-tools-5e1afcfaf3f2fa3cee4d2a2f7648880b5cfa5831.tar.gz |
whichbas: consolidate op logic.
-rw-r--r-- | whichbas.c | 30 |
1 files changed, 8 insertions, 22 deletions
@@ -322,38 +322,24 @@ CALLBACK(handle_op) { /* 5d: see 5a, above (same logic). */ /* 5e! FRAC (num func, 1 arg) or DPEEK (num func, 1 arg), can't tell apart :( */ - if(tok == 0x5f) { - /* TIME$ in TB, SYS (function) in BXL/BXE */ - if(nexttok == OP_FUNC_LPAR) { - remove_type(BT_TURBO); - } - } - - if(tok == 0x60) { - /* TIME in TB, VSTICK (function) in BXL/BXE */ + /* 5f: TIME$ in TB, SYS (function) in BXL/BXE */ + /* 60: TIME in TB, VSTICK (function) in BXL/BXE */ + /* 61: MOD (infix op) in TB, HSTICK (function) in BXL/BXE */ + /* 62: EXEC (infix op, with ON) in TB, PMADR (function) in BXL/BXE */ + if(tok == 0x5f || tok == 0x60 || tok == 0x61 || tok == 0x62) { if(nexttok == OP_FUNC_LPAR) { remove_type(BT_TURBO); + } else { + remove_type(BT_BXL_BXE); } } - if(tok == 0x61) { - /* MOD (infix op) in TB, HSTICK (function) in BXL/BXE */ - if(nexttok == OP_FUNC_LPAR) - remove_type(BT_TURBO); - } - - if(tok == 0x62) { - /* EXEC (infix op, with ON) in TB, PMADR (function) in BXL/BXE */ - if(nexttok == OP_FUNC_LPAR) - remove_type(BT_TURBO); - } - /* 63! RND (func, 1 num arg) or ERR (func, 1 num arg), can't tell apart */ /* 64! RAND (func, 1 num arg) or TAB (func, 1 num arg), can't tell apart */ /* 65! TRUNC (func, 1 num arg) or PEN (func, 1 num arg), can't tell apart */ if(tok == 0x66 || tok == 0x67 || tok == 0x68) { - /* either %0 %1 %2 (TB), or LEFT$ RIGHT$ MID$ (BXL/XE) */ + /* either %0 %1 %2 (TB), or LEFT$ RIGHT$ MID$ (BXL/XE, *no* OP_FUNC_LPAR) */ if(nexttok == OP_STRCONST || nexttok >= 0x80) { /* %0 %1 %2 can't be followed by a string constant *or* a variable */ remove_type(BT_TURBO); |