From 6f1133ef4cd268098d0695dbdf9d285748a4108c Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 8 Jul 2024 22:45:32 -0400 Subject: whichbas: add -s (script mode) option. --- bas.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bas.c') 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."); } -- cgit v1.2.3