From 7fc45e8ac37dde5026a8b6bc1e8190e69107f94a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 22 May 2024 16:00:57 -0400 Subject: unprotbas: handle corner case where 129 vars are in the table. --- unprotbas.rst | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'unprotbas.rst') diff --git a/unprotbas.rst b/unprotbas.rst index 752acd7..6ba560c 100644 --- a/unprotbas.rst +++ b/unprotbas.rst @@ -206,20 +206,33 @@ Load the unprotected program on the Atari and LIST it (or use **chkbas** to get listing), and edit **varnames.txt** in a text editor. As you figure out what each variable's purpose is, change its name -in the text file. Don't delete any lines from the file, and don't -add any. Don't get rid of the *$* or *(* at the end of any line. You -may enter the names in lowercase (**unprotbas** will convert them to -uppercase). Remember to follow the rules for BASIC variable names: -only letters and numbers allowed, and the first character must be -a letter. No duplicates of the same type are allowed (you can have -*FOO* and *FOO$*, but not two numerics called *FOO*). +in the text file. When editing the file: + +- Don't add or delete any lines. +- Don't get rid of the *$* or *(* at the end of any line. +- You may enter the names in lowercase (**unprotbas** will convert them to uppercase). +- Remember to follow the rules for BASIC variable names: + The first character must be a letter, other characters must be a letter + or a number, and only the last character can be *$* or *(*. +- No duplicates of the same type are allowed (you can have *FOO* and *FOO$*, + but not two numerics called *FOO*). When you're finished, re-run **unprotbas**, this time with the **-r** -option. The unprotected program will use your variable names, rather -than generating new ones. +option. If all is well, the unprotected program will use your variable +names, rather than generating new ones. If you broke the rules, you +should get an informative error message explaining what and where the +problem is. This process can also be used for regular unprotected programs. Use **-n -w** the first time, to save the existing variable names to **varnames.txt** rather than generating new ones. +NOTES +===== + +Atari BASIC has a limit of 128 variables in a program. It's actually +possible for the variable name table (and the variable value table) +to contain 129 variables, though the last one won't be usable in the +program. + .. include:: manftr.rst -- cgit v1.2.3