There is no fundamental difference just because a different interrupt is used. For all practical purpose the Restore-key works like the Apple II's Reset-key or the PC's Ctrl-Alt-Del key combination.
Most early microcomputers provided either a dedicated key (e.g. Apple ][), keyboard combination (e.g. PC clones), or dedicated hardware button (countless examples) to "Reset" the computer
Erm, sorry for nit-picking, but
the Apple II's Reset key is a dedicated reset button as it is direct connected to the CPU's reset line.
The PC's Ctrl-Alt-Del does not handle a dedicated CPU input like reset, but is a normal key press, detected by the BIOS keyboard handler if that one is still active.
However, on early Commodore computers (e.g. PET, VIC-20, C-64), there is no similar reset function. Instead, most machines had a weird key called RESTORE that is wired up to, of all things, the CPU's non-maskable interrupt line.
Exactly. NMI is, like Reset, an interrupt of the CPU that can not be ignored. Perfect for the purpose of pulling a system from any unwanted state - except unlike Reset, NMI allows resuming operation if deemed useful. And that's what Commodore did, depending on NMI handling.
This resulted in many Commodore users either routinely power-cycling their machines to reset them, or hacking a hardware reset switch to make up for this shortcoming.
I wouldn't blame that on the key combination, but rather on software that hijacked the NMI handler to provide some kind of 'protection'.
Notably, Commodore did add a reset switch to the C-128,
To support factual usage. Much like IBM with Ctrl-Alt-Del - that was also not intended for use by customers. :))
So what was Commodore thinking in providing a dedicated key for RESTORE while leaving out the reset functionality?
It provided exactly the same functionality as IBM or Apple did. A key (combination) that pulls the CPU from whatever it's doing, puts it under control of the KERNAL/BIOS/MONITOR to decide what to do next. In that aspect Commodore's way is not only the most clean, but also the most versatile one. Apple and IBM only left a choice of
- warm start as default, or
- whatever a user program wants to do
For the IBM-PC this means that when the keyboard interrupt handler detects the designated key-combination it calls the BIOS reset routine with a shortened sequence. This will of course only work as long as the default keyboard handler is invoked with a
INT 9h. As soon as some software installs their own, the machine will do whatever that software prefers - like opening the Windows login. :))
If the handler is taken over by a program, then only a real hardware reset will help - that's why all my PCs always had one. Also, modern power supplies simply cut off and shut down whenever the power button is pressed long enough - an addition in hindsight to enable a PC to "reset" even with the vector hooked by unfriendly software. Sounds kinda like Commodore's addition of a reset button with the C128, doesn't it?
On the Apple II Woz repurposed the CPU reset - or enhanced it - to handle reset vs. BASIC restart. When Reset is pressed a RESET is issued:
- the CPU fetches the RESET vector, pointing to
- the monitor reset routine to be invoked
- it does (like the PC) some initialization
- then checks if the warm-start vector in RAM at $03F2 is valid
- if no it performs a cold-start
- if yes, it jumps to wherever that vector points.
Ultimately whatever routine is hooked is executed - which of course again can be some user program. So not much different from the PC in the way that it can be hooked to suppress a warm boot/restart.
If not hooked, it uses the BASIC warm start entry point.
On the C64 it works like on the Apple. By pressing RESTORE an NMI is issued, the CPU fetches the NMI vector and
- the CPU fetches the RESET vector, pointing to
- the KERNAL NMI routine to be invoked
- It transfers control to the vector located at $0318
- if a user program hooked that vector, it does whatever this program wants
- If not, it checks if it's a CIA-NMI
- If not, it checks if there is a ROM-module to be activated
- If not, it tests for the RUN/STOP key was pressed
- if yes, BASIC warm start is executed
- If not, RS-232 functions are handled.
- It returns.
- offer the ability to do a warm start when invoked,
- can be hooked by user programs
- let user programs disable standard workings
Commodore's system offers in addition
- the ability to recover from unintended invocation
- is complete software controlled
So Commodore offered the same services as IBM or Apple do, but in addition it handles additional devices and allows a quiet recovery if nothing is to be done. Especially the last point is of interest, because it inherently swallows accidentally pressing of that dangerous Restore-key - in the Apple II there is no way to recover from an accidentally pressed Reset-key. They had to add a hardware switch to make it a two key combination.
Long story short: Commodore's implementation is a good implementation and on par, with what IBM or Apple offered. All three do have the same issues when their vectors get mangled.
P.S.: I guess it's obvious that I'm not even remotely a Commodore fanboi, and Woz' solution is for sure the most creative, using the least resources. Still, Commodore's middle of the road, schoolbook approach is to me the most favorable.