From 1af6d65e6985038f1c8501686cdce22a4cbc6250 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 3 Jun 2024 18:47:39 -0400 Subject: add doc for protbas, remove protection options from unprotbas doc. --- unprotbas.rst | 57 +++++++++++++-------------------------------------------- 1 file changed, 13 insertions(+), 44 deletions(-) (limited to 'unprotbas.rst') diff --git a/unprotbas.rst b/unprotbas.rst index 1af8fd8..d24b1f3 100644 --- a/unprotbas.rst +++ b/unprotbas.rst @@ -2,9 +2,9 @@ unprotbas ========= -------------------------------------------------------------- -Unprotect or create LIST-protected Atari 8-bit BASIC programs -------------------------------------------------------------- +--------------------------------------------------- +Unprotect LIST-protected Atari 8-bit BASIC programs +--------------------------------------------------- .. include:: manhdr.rst @@ -13,26 +13,22 @@ SYNOPSIS unprotbas [**-v**] [**-f**] [**-n**] [**-g**] [**-c**] [**-r** | **-w**] **input-file** **output-file** -unprotbas [**-v**] [**-p** | **-pc** | **-pv**] [**-x**\[*r|NN*] **input-file** **output-file** - DESCRIPTION =========== -**unprotbas** modifies a LIST-protected Atari 8-bit BASIC program, -creating a new non-protected copy. See **DETAILS**, below, to -understand how the protection and unprotection works. It's also -capable of LIST-protecting an unprotected program (see the **-p** -option). +**unprotbas** modifies a tokenized LIST-protected Atari 8-bit BASIC +program, creating a new non-protected copy. See **DETAILS**, below, +to understand how the protection and unprotection works. **input-file** must be a tokenized (SAVEd) Atari BASIC program. Use *-* to read from standard input, but **unprotbas** will refuse to read from standard input if it's a terminal. -**output-file** will be the unprotected (or protected, with -**-p**) tokenized BASIC program. If it already exists, it will be -overwritten. Use *-* to write to standard output, but **unprotbas** -will refuse to write to standard output if it's a terminal (since -tokenized BASIC is binary data and may confuse the terminal). +**output-file** will be the unprotected tokenized BASIC program. If it +already exists, it will be overwritten. Use *-* to write to standard +output, but **unprotbas** will refuse to write to standard output if +it's a terminal (since tokenized BASIC is binary data and may confuse +the terminal). OPTIONS ======= @@ -88,42 +84,17 @@ Unprotection Options Read variable names from **varnames.txt**, and use them instead of generating the names. See **VARIABLE NAMES**, below. -Protection Options ------------------- -**-p**, **-pc**, **-pv** - LIST-protect the program, rather than unprotecting it. **-pc** sets - an invalid (0) next-line pointer on the last line of code. **-pv** - replaces the variable names with the Atari EOL character (**$9B**). - **-p** does both. None of the other options except **-v** (verbose) - and **-x** can be used with these. - -**-xr**, **-xNN** - Character to use for variable name protection, with **-p** or - **-pv**. *NN* is the character code in hex, e.g. **-x20** to use - a space. Default is **9b** (the EOL character). **-xr** means random - codes. Do not put a space between the **-x** and the hex digits or **r**. - This option only works if **-p** or **-pv** is used. - -**-s** - Shrink variable name table to one byte per variable name, with - **-p** or **-pv**. Programs protected this way are very similar to - ones protected with **PROTECT.BAS**. - EXIT STATUS =========== 0 **input-file** was protected, unprotection was successful. - With **-p**, **-pc**, **-pv**: **input-file** was not - protected, protection was successful. 1 I/O error, or **input-file** isn't a valid BASIC program. 2 **input-file** is already an unprotected BASIC program. - With **-p**, **-pc**, **-pv**: **input-file** is already a - protected BASIC program. DETAILS ======= @@ -185,7 +156,7 @@ Variable name table scrambling creates protected BASIC programs that only use variable name scrambling. - **unprotbas -pv** also does variable name scrambling. + **protbas**\(1) also does variable name scrambling. Bad next-line pointer Every line of tokenized BASIC contains a line length byte, which @@ -228,9 +199,7 @@ Bad next-line pointer fix bad pointers in protected programs, though it doesn't do anything about variable name scrambling. - **unprotbas -pc** also does this type of protection. It works by - adding a line 32767 to the program, with a bad next-line pointer. - This will fail if there's already a line 32767. + **protbas** also does this type of protection. One more thing **unprotbas** can do is remove extra data from the end of the file. It's possible for BASIC files to contain extra data that -- cgit v1.2.3