Answer to Question #143579 in Assembler for Promise Omiponle

Question #143579
Explain what happens from the time of an interrupt request, (i.e., IRQ line is asserted),
through the start of executing an interrupt service routine, and then how control returns
to the interrupted program. Assume that the interrupt request does not occur at the
same time as any other interrupt request. (Note: ere are many steps involved, so
take your time and be specific.)
1
Expert's answer
2020-11-17T14:42:14-0500

After the interrupt handler completes its work, there should be return from interrupt.

Return from interrupt:

   Pop from stack and restore DS

   Restore interrupted procedure state with POPA

   Enable interrupts with STI

   IRET

 

In Real-Address Mode, the IRET instruction preforms a far return to the interrupted program or procedure. During this operation, the processor pops the return instruction pointer, return code segment selector, and EFLAGS image from the stack to the EIP, CS, and EFLAGS registers, respectively, and then resumes execution of the interrupted program or procedure.

 

In Protected Mode, the action of the IRET instruction depends on the settings of the NT (nested task) and VM flags in the EFLAGS register and the VM flag in the EFLAGS image stored on the current stack. Depending on the setting of these flags, the processor performs the different types of interrupt returns.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS