aboutsummaryrefslogtreecommitdiff
path: root/protbas.rst
diff options
context:
space:
mode:
Diffstat (limited to 'protbas.rst')
-rw-r--r--protbas.rst76
1 files changed, 76 insertions, 0 deletions
diff --git a/protbas.rst b/protbas.rst
new file mode 100644
index 0000000..56fb7c1
--- /dev/null
+++ b/protbas.rst
@@ -0,0 +1,76 @@
+=======
+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.
+
+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.
+
+.. include:: genopts.rst
+
+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