aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--whichbas.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/whichbas.c b/whichbas.c
index 8f44998..d4608ba 100644
--- a/whichbas.c
+++ b/whichbas.c
@@ -284,6 +284,23 @@ CALLBACK(handle_op) {
}
/* 5a: EXOR (infix num op) or BUMP( (pseudo-function, no OP_FUNC_LPAR) */
+ if(tok == 0x5a) {
+ /* XXX: incomplete */
+ if(last_cmd_pos == pos - 1) {
+ /* partial: if the last token was a command, this *can't*
+ be EXOR (it's infix). */
+ remove_type(BT_TURBO);
+ /* this won't quite work: */
+ /* } else if(program[pos - 1] == OP_NUM_ASSIGN) {
+ remove_type(BT_TURBO); */
+ } else if(program[pos - 1] >= 0x80) {
+ /* partial: if the last token was a variable, this can't
+ be BUMP (it's a function, last token has to be a command
+ or a regular operator). however, Turbo BASIC allows up to 256
+ variables, this only catches the first 128. */
+ remove_type(BT_BXL_BXE);
+ }
+ }
/* 5b: HEX$ (func, takes 1 num arg) or FIND( (pseudo-func, 3 args */
if(tok == 0x5b) {