From c71536ee8e43017bf6abd8f740a29121428f0394 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 7 Jul 2024 02:38:51 -0400 Subject: bas.c: handle possibility of turbo/bxl/bxe hex constant. --- whichbas.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'whichbas.c') diff --git a/whichbas.c b/whichbas.c index dabf414..f2b1f4d 100644 --- a/whichbas.c +++ b/whichbas.c @@ -68,6 +68,8 @@ void print_result(void) { name = "Not Atari BASIC; probably either Turbo or BXL/BXE"; } + if(verbose) fprintf(stderr, " final bas_type %02x\n", bas_type); + fputs(name, stdout); putchar('\n'); @@ -96,7 +98,7 @@ CALLBACK(handle_cmd) { if(tok <= CMD_ERROR) return; /* legal in BASIC, ignore */ remove_type(BT_ATARI); - if(tok >= 0x5b) remove_type(BT_BXL); + if(tok >= 0x59) remove_type(BT_BXL); nexttok = program[pos + 1]; has_args = !(nexttok == OP_EOS || nexttok == OP_EOL); @@ -335,7 +337,7 @@ CALLBACK(handle_end_stmt) { break; default: break; } - if(verbose) fprintf(stderr, " now %02x\n", bas_type); + if(verbose) fprintf(stderr, " bas_type now %02x\n", bas_type); } void foreign(const char *name) { @@ -406,6 +408,7 @@ int main(int argc, char **argv) { readfile(); parse_header(); + allow_hex_const = 1; on_cmd_token = handle_cmd; on_exp_token = handle_op; on_end_stmt = handle_end_stmt; -- cgit v1.2.3