diff options
Diffstat (limited to 'bas.c')
-rw-r--r-- | bas.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -11,6 +11,7 @@ #include "bas.h" int verbose = 0; +int allow_hex_const = 0; unsigned short lomem; unsigned short vntp; unsigned short vntd; @@ -340,9 +341,16 @@ void walk_code(unsigned int startlineno, unsigned int endlineno) { tok = program[pos]; switch(tok) { case OP_NUMCONST: - CALL(on_exp_token); + case OP_HEXCONST: + if(allow_hex_const) { + CALL(on_exp_token); + } else { + fprintf(stderr, "%s: found Turbo/BXL/BXE hex constant at line %d, skipping\n", self, lineno); + } pos++; - CALL(on_num_const); + if(allow_hex_const) { + CALL(on_num_const); + } pos += 6; break; case OP_STRCONST: |