From 6366242989d797ace5590e4f792192bc60d67d3f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 25 Mar 2025 00:16:41 -0400 Subject: listbas: improve support for OSS Integer BASIC. --- listbas.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'listbas.c') diff --git a/listbas.c b/listbas.c index c6c4992..acff568 100644 --- a/listbas.c +++ b/listbas.c @@ -360,7 +360,6 @@ void print_int_number(unsigned int pos, int hex) { fprintf(outfh, "%d", num); } if(color) color_off(); - printf("end of print_int_number()\n"); } void print_bcd_number(unsigned int pos, int hex) { @@ -757,6 +756,7 @@ void indent_line(const unsigned char tok) { case B_TURBO: turbo_indent_line(tok); return; case B_BXL: bxl_indent_line(tok); return; case B_BXE: bxe_indent_line(tok); return; + /* TODO: case B_INT: int_indent_line(tok); return; */ case B_ATARI: default: return; @@ -772,6 +772,8 @@ CALLBACK(print_cmd) { if(bas_type == B_APLUS) { if(tok == 0x52) return; + } else if(bas_type == B_INT) { + if(tok == 0x37) return; } else { if(tok == CMD_ILET) return; } @@ -785,7 +787,7 @@ CALLBACK(print_cmd) { if(bas_type == B_BXL && tok == 0x5a) name = get_bxl_ext_name(program[pos + 1]); - if(mixed_case && (bas_type == B_BXL || bas_type == B_BXE)) { + if(mixed_case /* && (bas_type == B_BXL || bas_type == B_BXE) */) { print_mixed_case(name); outchr(' '); } else { @@ -1154,14 +1156,18 @@ void init_bas_dialect() { if(autodetect) detect_bas_dialect(); - if(bas_type == B_INT) + if(bas_type == B_INT) { numconst_size = 2; + error_token = 0x38; + allow_hex_const = 1; + mixed_case = 1; + } - if(bas_type == B_TURBO || bas_type == B_BXL || bas_type == B_BXE || bas_type == B_INT) + if(bas_type == B_TURBO || bas_type == B_BXL || bas_type == B_BXE) allow_hex_const = 1; if(bas_type == B_APLUS) - aplus_errtok_hack = 1; + error_token = 0x53; if(bas_type == B_BXL) bxl_exttok_hack = 1; -- cgit v1.2.3