Contact me | Login | Search | Sitemap | Site Notice

DOS-manipulation with POKEs

Disabling all DOS-commands with a small FOR-loop.

There are many articles related to changing DOS 3.3-functionality by applying different POKE-commands which directly change the data in distinct memory locations. In 1989 I tried a couple of those POKE-commands in order to develop a very simple method of copy protection for my programs.

Finally that copy protection was so elaborate that it took me quite some time to "crack" my own disks in 2017 to reveal what I was trying in 1989. Of course these POKEs applied within AppleSoft-programs are not a real hard to crack copy protection but it makes fun to play around with them. 

So for preservation purposes I will present these POKEs in the following paragraphs.

Using a text file for booting up in DOS 3.3

Bootfiles are normally AppleSoft or binary. But it is also possible to use a text file during the boot-process which prevents the user from pressing Ctrl-C or Reset in order to stop the execution of the startup file. So here is how it is done:

  • At the Basic-prompt type POKE 40514,20
  • Write a small HELLO-program e.g. in AppleSoft as a dummy an issue the command INIT HELLO in order to initialise a new disk - Caution: Of course all content on this disk will be erased now!
  • After initialisation delete the HELLO-program with DELETE HELLO
  • Write a textfile containing the commands you wish to be executed during boot up with any text editor e.g. using 'MAKE TEXT' and save it under the name 'HELLO' on your newly initialised disk.

Voilà, here you go! Every time you boot this disk, the textfile will be executed making it harder to interrupt the boot up-process.

Changing Basic-commands

If you issue the following POKE all Basic-commands will be interpreted as a 'RUN'-command:

  • POKE 214,128

Making the RESET-key to trigger a reboot

If you use the following POKE-command, pressing the Reset-key will lead to a reboot:

  • POKE 1012,0

Disable the read/write-head

If you issue the following POKEs the read/write-head of the Disk-][-Drive will be disabled:

  • POKE -18031,223
  • POKE -17234,223

Applying these POKEs will result in 'I/O-ERRORs'.

Disabling all DOS-commands

If you type in the following small AppleSoft FOR-loop, the DOS-command-table will be overwritten leaving all DOS-commands without function:

  •  FOR X = 43140 TO 43272 : POKE X,0 : NEXT X

If you try to issue e.g. a CATALOG-command afterwards you will get a 'NO DIRECT COMMAND'-error.