Page 1 of 1

iret and stack?

Posted: Wed Jun 01, 2005 2:17 pm
by cabron
What do I need to put on the stack so that an IRET instruction will jump to a given location? I'm trying to do a context switch type deal by "returning" to a code entry point in an ISR.

Re:iret and stack?

Posted: Wed Jun 01, 2005 2:32 pm
by Guest
Don't hesitate to consult reference before asking.

http://nasm.sourceforge.net/doc/html/nasmdocb.html#section-B.4.127

Re:iret and stack?

Posted: Wed Jun 01, 2005 2:41 pm
by mystran
Ehm.. IA-32 Intel Architecture Software Developers Manual, volume 3, the Holy Bibble of PC OS development, tells you everything about interrupt/trap management you ever wanted (and didn't want) to know. Available (some where around the web) as a PDF.

Re:iret and stack?

Posted: Thu Jun 02, 2005 3:14 am
by Pype.Clicker
btw, you may want to get a look at the FAQ which gives you hints about performing a software task switch by simply swapping stacks.