copying the contents of Shadow registers to the custom chips hardware registers.) The OS jumps through VVBLKI ($0222hex/546dec) to begin the OS VBI Service Routine, and the OS VBI Routine exits with a jump through VVBLKD ($0224hex/548dec). By default VVBLKI points to the OS jump vector SYSVBV ($E45Fhex/58463dec) to begin the Vertical Blank Interrupt, and VVBLKD points to the OS jump vector XITVBV ($E462hex/58466dec). User programs can insert execution of custom code either before (Immediate) or after (Deferred) the Operating System's Vertical Blank Interrupt routines. Since the OS Vertical Blank interrupt could be called while a user program is updating the vectors, the Operating system provides a routine, SETVBV ($E45Chex/58460dec), that will safely update the VVBLKI or VVBLKD vectors to point to a new routine: To set a new jump target for VVBLKI (Immediate) set the Y register to the low byte of the target address, the X register to the high byte of the target address, and the Accumulator to 6, then JSR SETVBV. The user code called through VVBLKI simply needs to exit by jumping to the OS Vertical Blank with a JMP SYSVBV ($E45Fhex/58463dec). To set a new jump target for VVBLKD (Deferred) set the Y register to the low byte of the target address, the X register to the high byte of the target address, and the Accumulator to 7, then JSR SETVBV.. The user code called through VVBLKD must exit by jumping to the OS Vertical Blank exit routine with a JMP XITVBV ($E462hex/58466dec). When the CRITIC flag ($42hex/66dec) is non-zero execution of the Deferred Vertical Blank interrupt is suppressed regardless of the addresses in the vectors. The default value of CRITIC, 0, allows execution of both Immediate and Deferred Vertical Blank Interrupts. NMIRES $D40F Write Non-Maskable Interrupt (NMI) Reset Any value written to NMIRES resets the bits in NMIST which indicate the reason for the most recent Non-Maskable Interrupt. This is used by interrupt dispatch code in the Operating System and there would ordinarily not be a reason for a user program to write here. NMIST $D40F Read Non-Maskable Interrupt (NMI) Status The Operating System's Non-Maskable Interrupt dispatch routine reads this register to determine the reason for the interrupt and so which service routine to execute. The bit values: $20 - Reset key interrupt $40 - Vertical Blank Interrupt $80 - Display List Interrupt Display list The display list is the list of instructions