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 /whichbas.c | |
parent | b478d55399c493752bc86fe0c59d6070a1b506dc (diff) | |
download | bw-atari8-tools-c71536ee8e43017bf6abd8f740a29121428f0394.tar.gz |
bas.c: handle possibility of turbo/bxl/bxe hex constant.
Diffstat (limited to 'whichbas.c')
-rw-r--r-- | whichbas.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |