aboutsummaryrefslogtreecommitdiff
path: root/unprotbas.1
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-05-28 02:40:56 -0400
committerB. Watson <urchlay@slackware.uk>2024-05-28 02:40:56 -0400
commit2e7276175d10e35aeb307022184456e2292cad11 (patch)
tree5fad297869c0bafa02ceba1c4c95848535ee077c /unprotbas.1
parent9c8eabfffed88e6f7645106d9067af759f6dbe94 (diff)
downloadbw-atari8-tools-2e7276175d10e35aeb307022184456e2292cad11.tar.gz
unprotbas: tweak doc.
Diffstat (limited to 'unprotbas.1')
-rw-r--r--unprotbas.122
1 files changed, 16 insertions, 6 deletions
diff --git a/unprotbas.1 b/unprotbas.1
index 7149414..8719710 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-26" "0.2.1" "Urchlay's Atari 8-bit Tools"
+.TH "UNPROTBAS" 1 "2024-05-28" "0.2.1" "Urchlay's Atari 8-bit Tools"
.SH NAME
unprotbas \- Unprotect or create LIST-protected Atari 8-bit BASIC programs
.SH SYNOPSIS
@@ -201,8 +201,8 @@ prevents LIST, it actually prevents any immediate mode command:
after LOADing such a file, \fInothing\fP will work (even pressing RESET
won\(aqt get you out of it). The only way to use such a program is to
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.
+(due to END, STOP, an error, Break key, or even System Reset), BASIC
+will get stuck again.
.sp
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
@@ -212,9 +212,16 @@ Line 32100 in the example above does this job, taking advantage of
the STMCUR pointer used by BASIC, which holds the address of the
line of tokenized code currently being executed.
.sp
-\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.
+Each statement in the line also has a statement\-length byte. For
+lines with only one statement, its value is the same as the line
+length. For lines with multiple statements (separated by \fI:\fP), it\(aqs
+a pointer to the next statement, counting from the start of the
+current line. For the last statement on a line, it\(aqs a pointer to
+the next line of code, meaning it\(aqs identical to the line length.
+.sp
+\fBunprotbas\fP fixes bad line lengths by setting the line length to
+the statement length of the last statement. 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
@@ -255,6 +262,9 @@ The first 26 array variables will be \fIA(\fP to \fIZ(\fP, then \fIA1(\fP to
.UNINDENT
.UNINDENT
.sp
+Note that array variables have only the \fI(\fP as part of the name. The
+closing \fI)\fP is "cosmetic" and not part of the actual name.
+.sp
To properly reverse\-engineer the protected program, it\(aqs necessary to assign
meaningful variable names. \fBunprotbas\fP isn\(aqt smart enough to do this for you,
but it can semi\-automate the process.