diff options
author | B. Watson <urchlay@slackware.uk> | 2025-03-25 01:01:12 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2025-03-25 01:01:12 -0400 |
commit | ffada20937251cc163f7b51b8b16f99f3d1dfe4b (patch) | |
tree | 56b5079491ae753a1dddec84e6c7f04294bb9e6b /bas.c | |
parent | 6366242989d797ace5590e4f792192bc60d67d3f (diff) | |
download | bw-atari8-tools-ffada20937251cc163f7b51b8b16f99f3d1dfe4b.tar.gz |
listbas: fix printing TO in OSS Integer BASIC.
Diffstat (limited to 'bas.c')
-rw-r--r-- | bas.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -117,7 +117,6 @@ void parse_header(void) { int vntp_offset; lomem = getword(0); - if(lomem == 0x77) lomem = 0; vntp = getword(2); vntd = getword(4); vvtp = getword(6); @@ -145,7 +144,15 @@ void parse_header(void) { if(verbose) dump_header_vars(); /* these checks are actually kind of conservative. */ - if(lomem) die("Not an Atari BASIC program (no $0000 signature)."); + if(lomem == 0x77) { + if(verbose) + fprintf(stderr, "OSS Integer BASIC $7700 signature found, OK.\n"); + } else if(lomem == 0) { + if(verbose) + fprintf(stderr, "BASIC $0000 signature found, OK.\n"); + } else { + die("Not an Atari BASIC program (no $0000 or $7700 signature)."); + } if(vntp < 0x100) die("Not an Atari BASIC program (invalid VNTP)."); if(vvtp < vntd) die("Not an Atari BASIC program (invalid VVTP)."); if(starp < vvtp) die("Not an Atari BASIC program (invalid STARP)."); |