aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--whichbas.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/whichbas.c b/whichbas.c
index ca4d6b4..c8012da 100644
--- a/whichbas.c
+++ b/whichbas.c
@@ -319,6 +319,25 @@ CALLBACK(handle_op) {
remove_type(BT_BXL_BXE);
}
break;
+ case 0x5e: /* FRAC (num func, 1 arg) or DPEEK (num func, 1 arg) in BXL...
+ however BXE has an optional 2nd arg. */
+ {
+ /* partial: This detects the 2nd arg for simple cases where the
+ 1st arg is a constant or a numeric variable, but not if the
+ 1st arg is an expression or an array element. */
+ int has2 = 0;
+ if(nexttok2 == OP_NUMCONST || nexttok == OP_HEXCONST) {
+ if(program[pos + 9] == OP_ARR_COMMA)
+ has2 = 1;
+ } else if(nexttok2 >= 0x80 && program[pos + 3] == OP_ARR_COMMA) {
+ has2 = (get_vartype(nexttok2) == TYPE_SCALAR);
+ }
+ if(has2) {
+ bas_type = BT_BXE;
+ print_result();
+ }
+ }
+ break;
case 0x5f: /* TIME$ in TB, SYS (function) in BXL/BXE */
case 0x60: /* TIME in TB, VSTICK (function) in BXL/BXE */
case 0x61: /* MOD (infix op) in TB, HSTICK (function) in BXL/BXE */