aboutsummaryrefslogtreecommitdiff
path: root/bas.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-07-08 22:45:32 -0400
committerB. Watson <urchlay@slackware.uk>2024-07-08 22:45:32 -0400
commit6f1133ef4cd268098d0695dbdf9d285748a4108c (patch)
tree709d4e48a6a600bc917c21058da683c85ed88e45 /bas.c
parentdbb9ac8e29103dc4dce5c9fe830ddb59e5b4e785 (diff)
downloadbw-atari8-tools-6f1133ef4cd268098d0695dbdf9d285748a4108c.tar.gz
whichbas: add -s (script mode) option.
Diffstat (limited to 'bas.c')
-rw-r--r--bas.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bas.c b/bas.c
index c729e19..7c7fa34 100644
--- a/bas.c
+++ b/bas.c
@@ -309,10 +309,14 @@ void walk_code(unsigned int startlineno, unsigned int endlineno) {
end = nextpos;
pos = linepos;
- if(offset < 6) {
+ if(offset < 5) {
+ /* actually, real Atari BASIC's minimum offset is 6. however, if you use
+ the "--" (line of dashes, command token 0x54) in Turbo BASIC XL, you
+ get an offset of 5, because there's no end-of-line after it.
+ it seems better to accomodate Turbo here. */
CALL(on_bad_line_length);
offset = program[linepos + 2]; /* on_bad_line_length fixed it (we hope) */
- if(offset < 6)
+ if(offset < 5)
die("Fatal: Program is code-protected; unprotect it first.");
}