aboutsummaryrefslogtreecommitdiff
path: root/bas.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-07 02:38:51 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-07 02:38:51 -0400
commitc71536ee8e43017bf6abd8f740a29121428f0394 (patch)
treedc0df33f8c154e47be0a7889cf2eaeff30ad7165 /bas.c
parentb478d55399c493752bc86fe0c59d6070a1b506dc (diff)
downloadbw-atari8-tools-c71536ee8e43017bf6abd8f740a29121428f0394.tar.gz
bas.c: handle possibility of turbo/bxl/bxe hex constant.
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: