iret and stack?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
cabron

iret and stack?

Post 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.
Guest

Re:iret and stack?

Post by Guest »

Don't hesitate to consult reference before asking.

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

Re:iret and stack?

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:iret and stack?

Post 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.
Post Reply