aboutsummaryrefslogtreecommitdiff
path: root/bas.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-03-25 01:01:12 -0400
committerB. Watson <urchlay@slackware.uk>2025-03-25 01:01:12 -0400
commitffada20937251cc163f7b51b8b16f99f3d1dfe4b (patch)
tree56b5079491ae753a1dddec84e6c7f04294bb9e6b /bas.c
parent6366242989d797ace5590e4f792192bc60d67d3f (diff)
downloadbw-atari8-tools-ffada20937251cc163f7b51b8b16f99f3d1dfe4b.tar.gz
listbas: fix printing TO in OSS Integer BASIC.
Diffstat (limited to 'bas.c')
-rw-r--r--bas.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/bas.c b/bas.c
index c582c2e..fad6a08 100644
--- a/bas.c
+++ b/bas.c
@@ -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).");