Re: Can some other instructions just follow the IRET?





"zhangyue.zl@xxxxxxxxx" wrote:

I think I get it.
This Interrupt Service Program is a seperate Task,so when
returning,this Task's EIP will be saved into its TSS.But at this time
EIP points to the end of the Interrupt Service Program.So next time
when this Interrupt Service Program is trigered again,it will begin
executing and end immediately.So we have to use JMP to make the EIP
point to the begin of the Interrupt Service Program and then save EIP
into its TSS.Am I right? But if so,it looks we have to write JMP
before IRETD.


The difference between


start: iretd
; code for interrupt routine
;
;
jmp start

and

start:
; code for interrupt routine
;
;
iretd
jmp start


is, that in the first case the very first interrupt isn't serviced
(or you have to initialize the IP with the address of the first
instruction after the iretd).
.



Relevant Pages

  • Re: Can some other instructions just follow the IRET?
    ... This Interrupt Service Program is a seperate Task,so when ... EIP points to the end of the Interrupt Service Program.So next time ... when this Interrupt Service Program is trigered again,it will begin ... But if so,it looks we have to write JMP ...
    (alt.lang.asm)
  • Re: Can some other instructions just follow the IRET?
    ... EIP points to the end of the Interrupt Service Program.So next time ... when this Interrupt Service Program is trigered again,it will begin ... Correct except the EIP value saved into TSS, it does not point to the begin of ISR, it points to the instruction next to the IRET. ... No, if JMP before IRETD, ISR will never return. ...
    (alt.lang.asm)