aboutsummaryrefslogtreecommitdiff
path: root/unprotbas.1
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-05-23 02:06:34 -0400
committerB. Watson <urchlay@slackware.uk>2024-05-23 02:06:34 -0400
commite504bcb1a7f45062c575615c22c09c1c9d3eab70 (patch)
tree100fad376a759043bce13567892bba7130da56f9 /unprotbas.1
parent7fc45e8ac37dde5026a8b6bc1e8190e69107f94a (diff)
downloadbw-atari8-tools-e504bcb1a7f45062c575615c22c09c1c9d3eab70.tar.gz
unprotbas: document findings about ERROR 4.
Diffstat (limited to 'unprotbas.1')
-rw-r--r--unprotbas.123
1 files changed, 19 insertions, 4 deletions
diff --git a/unprotbas.1 b/unprotbas.1
index b2e44f5..de1f947 100644
--- a/unprotbas.1
+++ b/unprotbas.1
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
-.TH "UNPROTBAS" 1 "2024-05-22" "0.2.1" "Urchlay's Atari 8-bit Tools"
+.TH "UNPROTBAS" 1 "2024-05-23" "0.2.1" "Urchlay's Atari 8-bit Tools"
.SH NAME
unprotbas \- Unprotect LIST-protected Atari 8-bit BASIC programs
.SH SYNOPSIS
@@ -160,6 +160,10 @@ the rebuilt table will be larger. Other types of scrambling leave
the variable name table at its original size, but \fBunprotbas\fP
generates only one\- and two\-character variable names, so the rebuilt
table might be smaller.
+.sp
+The program \fBPROTECT.BAS\fP, found on Disk 2 of the Holmes Archive,
+creates protected BASIC programs that only use variable name
+scrambling.
.TP
.B Bad next\-line pointer
Every line of tokenized BASIC contains a line length byte, which
@@ -189,6 +193,10 @@ line of tokenized code currently being executed.
\fBunprotbas\fP fixes this simply by calculating what the pointer
should be (based on the tokens in the line) and changing it. No
information is lost by doing this.
+.sp
+The program \fBUNPROTEC\fP, from the \fIPirate\(aqs Treasure Chest\fP, can
+fix bad pointers in protected programs, though it doesn\(aqt do
+anything about variable name scrambling.
.UNINDENT
.sp
One more thing \fBunprotbas\fP can do is remove extra data from the end
@@ -263,9 +271,16 @@ This process can also be used for regular unprotected programs. Use
.SH NOTES
.sp
Atari BASIC has a limit of 128 variables in a program. It\(aqs actually
-possible for the variable name table (and the variable value table)
-to contain 129 variables, though the last one won\(aqt be usable in the
-program.
+possible for the variable name table to contain up to 256 variables,
+though the 129th and further ones won\(aqt be usable in the program. The
+variable value table can hold more than 256 values, though the
+variable numbers wrap around once they pass 255. The attempt to add
+variables past the 128th causes BASIC to respond with \fIERROR\- 4\fP, but
+the variable does get added to the tables. \fBunprotbas\fP will preserve
+these extra (useless) entries in the tables, though it will complain
+"Warning: variable #XXX value is corrupt" for value table entries
+256 and up. This is a pathological case, and shouldn\(aqt happen with
+programs that aren\(aqt deliberately written to test this behaviour.
.SH COPYRIGHT
.sp
WTFPL. See \fI\%http://www.wtfpl.net/txt/copying/\fP for details.