aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bas.c8
-rw-r--r--listbas.11
-rw-r--r--listbas.rst1
3 files changed, 8 insertions, 2 deletions
diff --git a/bas.c b/bas.c
index cf73fef..24508e4 100644
--- a/bas.c
+++ b/bas.c
@@ -115,13 +115,17 @@ void parse_header(void) {
vvstart = vvtp - TBL_OFFSET;
code_end = starp - TBL_OFFSET;
- if(lomem) die("This doesn't look like an Atari BASIC program (no $0000 signature).");
-
if(filelen < code_end) {
fprintf(stderr, "Warning: file is truncated: %d bytes, should be %d.\n", filelen, code_end);
}
if(verbose) dump_header_vars();
+
+ /* these checks are actually kind of conservative. */
+ if(lomem) die("Not an Atari BASIC program (no $0000 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).");
}
void update_header(void) {
diff --git a/listbas.1 b/listbas.1
index 146df50..ba293f2 100644
--- a/listbas.1
+++ b/listbas.1
@@ -220,6 +220,7 @@ looks very similar to how it would appear on the Atari.
\fBlistbas\fP does color syntax highlighting.
.IP \(bu 2
\fBlistbas\fP only supports Atari BASIC, not Turbo BASIC or BASIC XL/XE.
+This is a bug, not a feature...
.IP \(bu 2
\fBlistbas\fP doesn\(aqt show information about the variables. Use \fBvxrefbas\fP(1)
for that.
diff --git a/listbas.rst b/listbas.rst
index 46a44a4..63eb575 100644
--- a/listbas.rst
+++ b/listbas.rst
@@ -188,6 +188,7 @@ protection.
- **listbas** does color syntax highlighting.
- **listbas** only supports Atari BASIC, not Turbo BASIC or BASIC XL/XE.
+ This is a bug, not a feature...
- **listbas** doesn't show information about the variables. Use **vxrefbas**\(1)
for that.