Classic Computer Magazine Archive COMPUTE! ISSUE 1 / FALL 1979 / PAGE 89

Non-Stop PETS, Old And New

Contributed by Micro Software Systems

This note provides a method for disabling the STOP key on either old (2001-4, 2001-8) or new (2001-16, 2001-32) PETs with a single algorithm, even though the locations and contents to be POKED are different. It is based on Len Lindsay's PET-POURRI column in the July 1979 issue of Kilobaud Microcomputing, but provides a correction and avoids a potential problem in the procedure he presented.

In PETs using Version 1 ROMs (models 2001-4 and 2001-8 which have not been modified), the STOP key is disabled with

10 POKE 537, 136

and re-enabled with

20 POKE 537, 133

PETs equipped with Version 2 ROMs (2001-16, 2001-32, and modified 2001-4 and 2001-8) may use the following to disable the STOP.

10 POKE 144, 49

To re-enable the STOP,

20 POKE 144, 46

A composite procedure, which will work on either machine, is based on the contents of memory location (50003) ... a fact which was brought to my attention by Ted Polczynski, attributed again to Len Lindsay. In the old ROM, PEEK (50003) gives a value of 0, while the new ROM returns a value of 1. The following BASIC program segment uses that value to adjust a POKE command for the machine it's running on.

To disable the STOP, use

10 PT = PEEK (50003) : SL = 537-393 * PT : DL = 136-87 * PT : POKE SL, DL

To re-enable the STOP, use

20 PT = PEEK (5003): SL = 537-393 * PT : DL = 133-87 * PT : POKE SL, DL

The advantage of this version of the routine is that it always pokes the same value into the control location, no matter how many times the program is run.

Versions of the form

POKE SL, PEEK (SL) + 3

can cause unpredicted results (including loss of control) if they are executed more than once.

Julian Allason, of Petsoft, is interested in acquiring European rights for programs for PET, TRS 80 and Apple personal computers. For more information, write him at: Applied Computer Techniques Limited, Petsoft Division, 5/6 Vicarage Road, Edgbaston, Birmingham B15 3ES

A new catalog listing books, software and merchandise from Creative Computing (P.O. Box 789-M, Morristown, NJ 07960) can be obtained by calling toll-free 800-631-8117.