I/O Handling 145 As an example of the use of the Isr _access utility, suppose the ISR from page 141 is to be linked to select code 2 for asynchronous access. The following would be a sequence to establish such a linkage- LDB =(64*256)+(1*lE)+2 I::;DUFC:E I:::;OUkCr:: State Preservation and Restoration cally saves the state of some of the registers so that their values can be restored upon return When an interrupt is detected and an interrupt service routine is called, the processor automati- from the ISR. Other registers are left alone and if your service routine' uses them, it is up to your ISR to save them and restore them before returning from the ISR.
The registers which are automatically preserved are - A B C P Cb Pa Also, the state of the Overflow and Extend processor flags are preserved and restored before the return from the interrupt.