aboutsummaryrefslogtreecommitdiff
path: root/bas.c
diff options
context:
space:
mode:
Diffstat (limited to 'bas.c')
-rw-r--r--bas.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/bas.c b/bas.c
index 13385f1..595ed97 100644
--- a/bas.c
+++ b/bas.c
@@ -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: