diff options
author | B. Watson <urchlay@slackware.uk> | 2024-07-07 02:38:51 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-07-07 02:38:51 -0400 |
commit | c71536ee8e43017bf6abd8f740a29121428f0394 (patch) | |
tree | dc0df33f8c154e47be0a7889cf2eaeff30ad7165 /bas.c | |
parent | b478d55399c493752bc86fe0c59d6070a1b506dc (diff) | |
download | bw-atari8-tools-c71536ee8e43017bf6abd8f740a29121428f0394.tar.gz |
bas.c: handle possibility of turbo/bxl/bxe hex constant.
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: |