diff options
-rw-r--r-- | bas.c | 8 | ||||
-rw-r--r-- | bas.h | 1 | ||||
-rw-r--r-- | listbas.c | 3 |
3 files changed, 12 insertions, 0 deletions
@@ -27,6 +27,9 @@ int allow_hex_const = 0; an A+ program so it can handle this token correctly. */ int aplus_errtok_hack = 0; +/* BASIC XL token 0x5a is followed by a single "subtoken", this skips it. */ +int bxl_exttok_hack = 0; + unsigned short lomem; unsigned short vntp; unsigned short vntd; @@ -373,7 +376,12 @@ void walk_code(unsigned int startlineno, unsigned int endlineno) { while(pos < end) { /* loop over tokens within a statement */ pos++; CALL(on_cmd_token); + switch(program[pos]) { + case 0x5a: + if(bxl_exttok_hack) pos++; /* skip subtoken */ + pos++; + break; case CMD_REM: case CMD_DATA: case CMD_ERROR: @@ -204,6 +204,7 @@ extern char *output_filename; extern int verbose; extern int allow_hex_const; extern int aplus_errtok_hack; +extern int bxl_exttok_hack; extern void set_self(const char *argv0); extern void die(const char *msg); @@ -701,6 +701,9 @@ int main(int argc, char **argv) { if(bas_type == B_APLUS) aplus_errtok_hack = 1; + if(bas_type == B_BXL) + bxl_exttok_hack = 1; + init_token_tables(); readfile(); |