Visit Atarimax Store

Free-Net Logo
The Atari SIG Historical Archive
Created and hosted by:

Article #7 (51 is last):
Newsgroups: freenet.sci.comp.atari.product.8bit.tricks
From: aa700@cleveland.Freenet.Edu (Michael Current)
Subject: Protecting your software, cont'd
Posted-By: xx004 (aa700 - Michael Current)
Reply-To: aa700@cleveland.Freenet.Edu (Michael Current)
Date: Tue Jan 28 22:36:12 1992

Reprinted from the A.C.E.C. BBS (614)-471-8559

Bits of BASIC
"Protecting" Your 8-Bit Software (Cont'd)
By M. Olin (MACE, WAUG)

Last month (MAM, January '88), I discussed some ways to keep prying eyes from
viewing your software coding routines by making it very difficult to LIST your
BASIC programs.  This month I thought it might be nice to describe an
interesting technique that  could help prevent COPYing of your programs as
well.  The operations described herein are designed for use with Atari DOS
2.x and may not work with other DOSes.  As always, there are methods which
will circumvent the procedure described below, so there are no guarantees
implied in this writing.  Nonetheless, it  makes for interesting
experimentation which is always encouraged! (REMEMBER: keep a backup copy of
your programs in case something should not work as expected.  The
modifications described below should never be performed on your original

You are, we shall assume, well aware that choosing item 'A' from  the DOS menu
screen will give you a directory listing of the files  that are on the disk in
Drive #1.  On requesting this command, one  quickly notices the standard
format of the data that is retrieved  from the Directory Entry Table (sectors
#361-368):  the first byte  indicates if the file is write-locked (an asterisk
is displayed,)  bytes #3-10 are the file name, #11-13 are the file extender,
and  #15-17 indicate the amount of disk space used by this file (in  number of

As you take a closer look at the display, you will quickly notice  the
filenames are all in upper case alpha characters.  Digits 0-9  are allowed in
all positions, excluding the very first character  which MUST be A-Z;
punctuation and imbedded spaces are taboo.  Our  exercise today will be to
alter this condition, thereby allowing  other characters to be used.  Once
this is done, your files can be  named in such a manner as to permit the use
of the more cryptic  Atascii graphics character set which would make the
Directory  listing virtually illegible.

We will do this, as you will soon see, by altering some important memory
locations within the DOS program.  The result will be that, without having a
copy of your  DOS disk, the "enemy" will not be able to use the COPY command
from the DOS command menu to move your program onto another disk. S/He simply
will not be able to make DOS find your program, hence the COPY command will
not work.
re's how it's done:  by changing two memory locations in the DOS  "Decode
Filenames" routine, additional characters are allowed.   POKEing memory
location 3818 with a new value (try using 1, the  Atascii CTRL-A character)
will determine the lowest Atascii  character code permitted for use when
defining a filename.  We  will then POKE location 3822 with the Atascii value
(try using 57,  the Atascii code for the number 0) that represents the highest
Atascii character code permitted for use.  Once the changes are  made, we
simply enter the "DOS" command from BASIC, then create  new DOS files on the
target disk using the 'H' WRITE DOS FILES  command.  The changes that we have
made will only work if a disk  containing the modified DOS is booted.  Notice
that the highest  allowable character is LOWER THAN 'A' (Atascii 65) therefore
NO  standard alpha characters will be accepted at all!

When you are done writing your program, you can SAVE it to this  new disk by
simply holding the Control key down while specifying  the filename in the SAVE
"D:filename" command.  If your BASIC  program makes regular use of disk-based
data files, you will also  need to make sure these files are appropriately
named within your  BASIC code.

By experimenting with this idea, you will find any number of ways  to alter
your program names, and the insights you will gain into  the inner working of
Atari DOS will be of great benefit to you in  the future.

 Michael Current, Cleveland Free-Net 8-bit Atari SIGOp   -->>  go atari8  <<--
   The Cleveland Free-Net Atari SIG is the Central Atari Information Network
      Internet: / UUCP: ...!umn-cs!ccnfld!currentm
      BITNET: / Cleveland Free-Net: aa700

Visit Atarimax Store