diff options
author | B. Watson <urchlay@slackware.uk> | 2024-05-19 14:26:16 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-05-19 14:26:16 -0400 |
commit | a076240e441bf4b7e7f4f29cbfbb9fb2d3336c09 (patch) | |
tree | b967a6b5118803abba9f6e5afc9a79d69ba0f147 /unprotbas.1 | |
parent | bbffe594b2f9a42bd98e4e9de6dae65a2008e54e (diff) | |
download | bw-atari8-tools-a076240e441bf4b7e7f4f29cbfbb9fb2d3336c09.tar.gz |
unprotbas: implement -v option, fix doc about line 32768.
Diffstat (limited to 'unprotbas.1')
-rw-r--r-- | unprotbas.1 | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/unprotbas.1 b/unprotbas.1 index f770079..ff8cd36 100644 --- a/unprotbas.1 +++ b/unprotbas.1 @@ -35,12 +35,12 @@ unprotbas \- Unprotect LIST-protected Atari 8-bit BASIC programs unprotbas [\fB\-v\fP] [\fB\-f\fP] [\fB\-n\fP] [\fB\-g\fP] \fBinput\-file\fP \fBoutput\-file\fP .SH DESCRIPTION .sp -\fBunprotbas\fP modifies LIST\-protected Atari 8\-bit BASIC programs, +\fBunprotbas\fP modifies a LIST\-protected Atari 8\-bit BASIC program, creating a new non\-protected copy. See \fBDETAILS\fP, below, to understand how the protection and unprotection works. .sp -\fBinput\-file\fP must be a tokenized Atari BASIC program. Use \fI\-\fP to -read from standard input. +\fBinput\-file\fP must be a tokenized (SAVEd) Atari BASIC program. Use +\fI\-\fP to read from standard input. .sp \fBoutput\-file\fP will be the unprotected tokenized BASIC program. If it already exists, it will be overwritten. Use \fI\-\fP to write to standard @@ -55,14 +55,15 @@ will be treated as options. .INDENT 0.0 .TP .B \fB\-v\fP -Verbose operation. TODO: it\(aqs always verbose right now... +Verbose operation. .TP .B \fB\-f\fP Force the variable name table to be rebuilt, even if it looks OK. +This option cannot be combined with \fB\-n\fP\&. .TP .B \fB\-n\fP Don\(aqt rebuild the variable table (only fix the line pointers, if -needed). +needed). This option cannot be combined with \fB\-f\fP\&. .TP .B \fB\-g\fP Remove any "garbage" data from the end of the file. By default, @@ -150,11 +151,6 @@ generates only one\- and two\-character variable names, so the rebuilt table might be smaller. .TP .B Bad next\-line pointer -Generally, this is done with line number 32768. Yes, this line -number is outside the range BASIC accepts... but BASIC uses it -internally for immediate\-mode commands. And when SAVE or CSAVE are -executed, this line gets saved, too. -.sp Every line of tokenized BASIC contains a line length byte, which BASIC uses as a pointer to the next line of code. Before printing the READY prompt, BASIC iterates over every line of code in the @@ -171,10 +167,9 @@ use the RUN command with a filename, and if the program ever exits (due to END, STOP, an error, or the Break key), BASIC will get stuck again. .sp -This doesn\(aqt \fIhave\fP to be done with line 32768. Any line of code -that doesn\(aqt have to be traversed at runtime would work (in other -words, a regular line whose line number is higher than any code that -ever gets executed, usually the last line in the file). +This doesn\(aqt \fIhave\fP to be done with the last line in the +program. The "poisoned" line could be followed by more lines of +code, though they could never actually execute. .sp Line 32100 in the example above does this job, taking advantage of the STMCUR pointer used by BASIC, which holds the address of the |