D.4.3 Power-Up Routine For same peripherals, it is necessary ta initialize the hardware at power-up time. It is suggested that a power-up routine be included to do the initialization through software for these peripherals. Power-up Link should be set in the Header Field as described above. Power-up routines are executed whenever the system is reset by either hardware or software. The console software searches all peripheral DSR for power-up routine addresses and executes them if they are found. Each power-up routine can use RO-R10. Upon entry, R12 is set to the beginning address of the CRU space for that peripheral DSR (note that this address is used to enable the DSR ROM). R11 contains the return address. R13 and R165 contain the memory-mapped addresses of GROM Read Data and VDP Write Address, respectively. All VOP and GROM operations can be indexed from these two registers. The power-up routine may use VDP RAM from 0 to the location pointed by CPU RAM >70, offset from workspace pointer - >E0). It can use all CPU RAM except location >55, <6D, and >CO through >DF offset from workspace pointer - >E0. All power-up routines must return with B *R11. D.4.4 Interrupt Routine If the peripheral issues Interrupt Request to the 9900 CPU, the DSR should alsn inctude an interrupt routine and Interrupt Link in the Header as described above. Every interrupt that is not recognized as console interrupt (VDP or 9901 Timer) causes the console software to execute every interrupt routine it can find. The interrupt routine must check to see whether the Interrupt Request is raised by this peripheral. If it 1s not, exit by B ¥RII1. The interrupt routine may use R1-R8, and R10. The contents of R11-R15 are the same as those of the Power-up Routine Section. The interrupt routine and Main DSR can split the allocation of CPU RAM from >4A to >6D offset from workspace pointer — sFO ). All interrupt routines end with B *R11. Interrupt Request raised by the peripheral must be cleared before exit. To exit DSR, do INCT Ril B *R11 56