IRET(interrupt return)中断返回,
中断服务程序的最后一条指令。
【指令功能】IRET(interrupt return)中断返回,
中断服务程序的最后一条指令。IRET指令将推入堆栈的段地址和偏移地址弹出,使程序返回到原来发生中断的地方。其作用是从中断中恢复中断前的状态,具体作用有如下三点:
1.恢复
IP(instruction pointer):IP←((SP)+1:(SP)),SP←SP+2
3.恢复中断前的
PSW(program status word),即恢复中断前的
标志寄存器的状态。
the IRET instruction 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. If the return is to another privilege level, the IRET instruction also pops the stack pointer and SS from the stack, before resuming program execution.