ch06 - Chapter 6 Exercise Solutions E6.1 Interrupt service...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 6 Exercise Solutions E6.1 Interrupt service routine. E6.2 The main advantage is that the CPU can still perform some other operations when waiting for I/O to be completed. E6.3 To handle interrupts, we need to (1) write the interrupt service routine (2) set up interrupt vectors in the interrupt vector table (3) enable the interrupt E6.4 We must clear the I bit of the CCR register within the interrupt service routine. E6.5 In some applications, the user may want the request from a particular interrupt source to be serviced as soon as possible. Raising it to the highest priority will make that happen. E6.6 The address for the IRQ vector table entry starts at $FFF2. The following directives will initialize the vector of IRQ properly: ORG $FFF2 FDB $E200 E6.7 The last instruction in most interrupt service routine is RTI. This instruction will pop the stack to the CPU registers in the following order: CCR, B, A, X, Y, PC Since the contents of the PC will be replaced by the address of the interrupted instruction, the...
View Full Document

Page1 / 2

ch06 - Chapter 6 Exercise Solutions E6.1 Interrupt service...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online