Question: Interrupt handler ILOC: Save registers. Subtract Store Store Store MoveControl And Branch_if _IR30 TESTKBD Call SP SP. #12 LINK_reg, 8(SP) R2. 4(SP) R3, (SP) R2.

 Interrupt handler ILOC: Save registers. Subtract Store Store Store MoveControl AndBranch_if _IR30 TESTKBD Call SP SP. #12 LINK_reg, 8(SP) R2. 4(SP) R3,

Interrupt handler ILOC: Save registers. Subtract Store Store Store MoveControl And Branch_if _IR30 TESTKBD Call SP SP. #12 LINK_reg, 8(SP) R2. 4(SP) R3, (SP) R2. IPENDINGCheck contents of IPENDING R3, R2, #4 Check if display raised the request. If not, check if keyboard Call the display ISR. Check if keyboard raised the request. If not, then check next device. Call the keyboard ISR. Check for other interrupts DISR R3, R2, #2 TESTKBD: And Branch_if _IR3-0 NEXT Call KISR NEXT Load Load Load Add Return-from-interrupt R3, (SP) R2. 4(SP) LINK_reg, 8(SP) SP SP. #12 Restore registers. Main program START Set up parameters for ISRs. Enable interrupts in the keyboard interface. Enable interrupts in the display interface Move StoreByte Move StoreByte MoveControl Or MoveControl MoveControl Or MoveControl next instruction R2, #2 R2, KBD_CONT R2. #4 R2, DISP_CONT R2, IENABLE R2, R2, #6 IENABLE, R2 R2. PS R2, R2, #1 PS. R2 Enable interrupts in the processor control register. Set interrupt-enable bit in PS Keyboard interrupt-service routine KISR: Return Display interrupt-service routine DISR: Return Figure 3.9 A RISC-style program that initializes and handles interrupts Interrupt handler ILOC: Save registers. Subtract Store Store Store MoveControl And Branch_if _IR30 TESTKBD Call SP SP. #12 LINK_reg, 8(SP) R2. 4(SP) R3, (SP) R2. IPENDINGCheck contents of IPENDING R3, R2, #4 Check if display raised the request. If not, check if keyboard Call the display ISR. Check if keyboard raised the request. If not, then check next device. Call the keyboard ISR. Check for other interrupts DISR R3, R2, #2 TESTKBD: And Branch_if _IR3-0 NEXT Call KISR NEXT Load Load Load Add Return-from-interrupt R3, (SP) R2. 4(SP) LINK_reg, 8(SP) SP SP. #12 Restore registers. Main program START Set up parameters for ISRs. Enable interrupts in the keyboard interface. Enable interrupts in the display interface Move StoreByte Move StoreByte MoveControl Or MoveControl MoveControl Or MoveControl next instruction R2, #2 R2, KBD_CONT R2. #4 R2, DISP_CONT R2, IENABLE R2, R2, #6 IENABLE, R2 R2. PS R2, R2, #1 PS. R2 Enable interrupts in the processor control register. Set interrupt-enable bit in PS Keyboard interrupt-service routine KISR: Return Display interrupt-service routine DISR: Return Figure 3.9 A RISC-style program that initializes and handles interrupts

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!