diff options
Diffstat (limited to 'whichbas.c')
-rw-r--r-- | whichbas.c | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -228,7 +228,7 @@ CALLBACK(handle_cmd) { 4 of them, this leaves 43 we can check. - Covered so far: 40 (93%) + Covered so far: 41 (95%) Unchecked tokens: @@ -239,10 +239,6 @@ CALLBACK(handle_cmd) { Again, not important, because it's highly unlikely any BXL/BXE program will contain NUM... because when it executes, it stops the program and goes back to the READY prompt (in auto-numbering mode). - - TODO: Unknown token, find out what it does: - 0x5A: BLOAD or... what? (Jindroush lists it as BXL_EXTEND for BXL and - ?5A? for BXE) */ switch(tok) { case 0x39: /* MOVE <args> or ENDWHILE */ @@ -390,6 +386,24 @@ CALLBACK(handle_cmd) { /* only BXL/BXL allows a scalar variable arg */ remove_type(BT_TURBO); } + break; + case 0x5a: /* TB: BLOAD; BXL: extension mechanism; BXE: invalid. */ + /* This is the token used for the BXL EXTEND.COM added commands, + from the Toolkit disk. It's followed by a byte ranging 0x10 + to 0x15 that specifies which extended command, e.g. 0x5a 0x11 means + EXIT, 0x5a 0x12 is PROCEDURE, 0x5a 0x13 is CALL. Although + these look BXE's extra commands, they aren't the same tokens, + and BXE will choke on them (RUN causes "Error- 33", LIST causes + a lockup). */ + if(nexttok >= 0x10 && nexttok <= 0x15) { + /* worth mentioning to the user... */ + fprintf(stderr, "Note: program requires EXTEND.COM from the Toolkit disk.\n"); + set_type(BT_BXL); + } else { + /* it's BLOAD if followed by e.g. OP_STRCONST or a variable */ + set_type(BT_TURBO); + } + break; case 0x5c: /* GO# (1 arg only) or SORTUP (optional 2nd arg of USING, but no comma) */ case 0x5d: /* # (1 arg only) or SORTDOWN (optional 2nd arg of USING, but no comma) */ /* COMPLETE but no longer needed (check_variables() already found the |