Un-Crashing On Upgrade ROM Computers
Jim Butterfield, Toronto
If you do much work in machine language, sooner or later you'll write a program that will crash.
Formerly, you were out of luck. Unless you were lucky enough to stumble into a type 1 crash — which would take you to the Machine Language Monitor, or to an ?INVALID NUMERIC statement — your only remedy would be to reset, and wipe memory.
Type 2 crashes (tight loops) could be guarded against with a little preparation involving fiddling with the interrupt structure. But the nasty type 3 crash (X2 codes) cannot be fixed without kicking the Reset line; and Reset means memory test, and memory test means you'll have to reload your program.
No more. On upgrade ROMs, you can come out of a hard crash with memory preserved.
Method: Set the diagnostic sense pin to ground; then kick the Reset line. The processor will re-awaken in the Machine Language Monitor with memory preserved.
There's more: you're not yet out of the woods. Type a semicolon followed by RETURN; PET will respond with a question mark. Now move the cursor back to your register display line, and change the Stack Pointer (SP) value from 01 to F8. This strange procedure is important: you must follow it exactly. Once you've done so, you're clear. You may return to Basic with an X if you like or proceed in the MLM.
Hardware: To make the diagnostic sense pin: take a standard 12-pin edge connector and wire pin 5 (diagnostic sense) to pin N (ground). Key the connector so it sits on the parallel user port. Plug it in whenever you want to un-crash, but don't leave it on the machine.
The Reset button is a little trickier, since you have to know where to connect it. Check with someone who's knowledgeable on PET hardware.
Commercial sources: International Technical Systems. Box 264, Woodbridge VA 22194 makes a Reset button.
Gord Reithmeier, 411 Duplex Avenue, Apt. 11, Toronto Canada M4R 1V2, makes two uncrashing devices, either of which fits on the Parallel User Port; they include a diagnostic pin toggle switch and a Reset button. An IC clip snakes inside PET's cover to connect to the reset line. Instructions are included. The basic unit sells for $20; or for $30 the unit also includes the Poor Man's D/A converter.
Song data and sequencing data which are compatible with the MTU music software for PET computers are available from F. Covitz, Deer Hill Rd., Lebanon, N.J. 08833. Price is $1.00 per page. Write him for a list of current offerings.