[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to prevent My AppleSoft Basic Program Listing



On 2012-12-30 23:29:01 +0000, Benoit0123 said:

mhwordwriter wrote:
hello i've written an applesoft basic game that uses shape table, .ml and
.scrn I have the game fulling working but the einstein or tasc compiler
doesn't work with it. How can I prevent someone from listing my code by
typing list?
any help is much appreciated

Applesoft has an internal "protection mechanism" which consists of setting
bit 7 of page zero location $D6 (mnemonic LOCK). When this bit is set, any
attempt to enter a command on the input line is interpreted as a RUN command
whatever the command is. Now, what could be a convenient way of setting this
bit as soon as the DOS loads the Applesoft file into RAM memory apart from
the obvious but weak method of setting this bit upon program init (and
hoping taht the program was RUNned directly from DOS instead of being loaded
then run in two steps).

HTHATS,
Beno�t

Here's what appears to be Apple's advice:

http://support.apple.com/kb/TA35395

Most of the known LIST-protection schemes rely on running the program first, which is pretty impractical. There's one approach at the following link that instead relies on running the program to unlock the code, which is a bit more interesting (but the unlocking mechanism is only obscured through backspaces in a REM statement):

http://apple2.org.za/gswv/a2zine/GS.WorldView/Resources/GS.TECH.INFO/AppleSoft/AppleLock.txt

Using an Applesoft compiler, if you can get it to work, is the only real way to obscure the code. As far as I know, no decompilers exist. One thing you could possibly do is to follow the "AppleLock" procedure except instead of putting in a taunt like "You can't list this!" put in something that just looks like "CALL 4864" (or something like that -- though that is completely off the top of my head, my recollection is that this is what Einstein-compiled programs look like). So, then, somebody who knows a little bit and is not particularly motivated might conclude that this WAS Einstein-compiled and therefore unlistable and would not pursue it further.