In Apple II context, a memory location that contained a pointer to the set of instructions that the machine is to execute when recovering from an INTerrupt generated by the user pressing the RESET button. Typically points by default to the address of DOS on the Apple II+/IIe so as to initiate a disk restart. Sometimes, however, programs leave the reset vector in a strange state before crashing, leaving you with a machine won't do anything except continue to produce errors. Very annoying.

The reset vector contained the address that the 6502 processor (in an Apple II) would jump to when a reset was initiated. What was clever was the way the autostart ROM implemented it.

Essentially, you have a set of bytes in RAM. Two of these bytes are the memory location that should be JMP'ed to when a RESET occurs. The remainder of the bytes form a checksum based on the first two bytes. To set the reset vector, you would write the appropriate memory location into the two location bytes, then call a subroutine (built into the autostart ROM) which would set the checksum for you.

Now, here comes the clever part. When you first turn on the Apple II, a RESET is generated by the hardware automatically. Now, the memory location in the reset vector is going to be random if we just cold-started the system. So is the checksum. If the checksum is wrong, the autostart ROM will jump straight into the system's bootstrap procedure. You know, clearing the screen, printing "APPLE II" top and center, and searching for a valid floppy drive to boot from. This is very useful because jumping to a random address on boot is likely to cause unpredictable results.

If a program sets the reset vector manually, though, pressing RESET can do anything you want it to do. Applesoft BASIC, for instance, set the reset vector so that pressing RESET would stop the current program and return you to a command prompt.

This further proves that Steven Wozniak was a genius. He took one operation (RESET) and made it behave two different ways based on whether the reset was generated by powering the system up (cold start) or actually hitting RESET on the keyboard.

Log in or registerto write something here or to contact authors.