aboutsummaryrefslogtreecommitdiff
path: root/protbas.rst
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-06-13 15:31:49 -0400
committerB. Watson <urchlay@slackware.uk>2024-06-13 15:31:49 -0400
commitec9bb5b6b6512fcf157119b8075b6df0a8decff5 (patch)
tree2cd8a220efb89e58c6bc217ffc5b2c90a9ca4ec3 /protbas.rst
parent9d1ce7321f27d47b76cba907127af777d6672188 (diff)
downloadbw-atari8-tools-ec9bb5b6b6512fcf157119b8075b6df0a8decff5.tar.gz
add missing files.
Diffstat (limited to 'protbas.rst')
-rw-r--r--protbas.rst86
1 files changed, 86 insertions, 0 deletions
diff --git a/protbas.rst b/protbas.rst
new file mode 100644
index 0000000..5ceb838
--- /dev/null
+++ b/protbas.rst
@@ -0,0 +1,86 @@
+=======
+protbas
+=======
+
+---------------------------------------
+LIST-protect Atari 8-bit BASIC programs
+---------------------------------------
+
+.. include:: manhdr.rst
+
+SYNOPSIS
+========
+
+protbas [**-v**] [**-nc | **-nv**] [**-s**] [**-xr** | **-xNN**] **input-file** **output-file**
+
+DESCRIPTION
+===========
+
+**protbas** reads a tokenized Atari 8-bit BASIC program and writes a
+LIST-protected copy of the program. See the **DETAILS** section of the
+**unprotbas**\(1) man page, to understand how the protection works.
+
+**input-file** must be a tokenized (SAVEd) Atari BASIC program. Use
+*-* to read from standard input, but **protbas** will refuse to
+read from standard input if it's a terminal.
+
+**output-file** will be the protected tokenized BASIC program. If it
+already exists, it will be overwritten. Use *-* to write to standard
+output, but **protbas** will refuse to write to standard output if
+it's a terminal (since tokenized BASIC is binary data and may confuse
+the terminal).
+
+The code protection 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.
+
+OPTIONS
+=======
+
+Options may appear in any order. The first non-option argument is used
+for **input-file**; the second is **output-file**. A third non-option
+argument is an error.
+
+General Options
+---------------
+**--help**
+ Print usage message and exit.
+
+**--version**
+ Print version number and exit.
+
+**-v**
+ Verbose operation. When displaying a number in verbose mode, it will
+ be prefixed with *$* if it's in hex, or no prefix for decimal.
+
+Protection Options
+------------------
+**-nc**
+ Do not code-protect the program; only protect the variable names.
+
+**-nv**
+ Do not protect the variable names; only code-protect the program.
+
+**-s**
+ Shrink variable name table to minimum size, one byte per variable
+ name. Programs protected this way are very similar to ones
+ protected with **PROTECT.BAS**.
+
+**-xr**, **-x** *NN*
+ Character to use for variable name protection. *NN* is the
+ character code in hex, e.g. **-x20** to use a space. Default is
+ **9b** (the EOL character). **-xr** means random codes.
+
+EXIT STATUS
+===========
+
+0
+ **input-file** was unprotected, protection was successful.
+
+1
+ I/O error, or **input-file** isn't a valid BASIC program.
+
+2
+ **input-file** is already a protected BASIC program.
+
+.. include:: manftr.rst