Page 1 of 1

process swtich in x86 real mode how to save/restore ss:esp

Posted: Wed Feb 27, 2013 7:42 am
by descent
I write a process switch in dos, it can work switch proc_a, proc_b, but I don't know how to save/restore ss:esp. In protected mode, iret/int will save/restore ss:esp in different privilege.

my code:
https://github.com/descent/process/blob ... /process.S

Any suggestions are welcome.

Re: process swtich in x86 real mode how to save/restore ss:e

Posted: Wed Feb 27, 2013 8:26 am
by Combuster
Think about how you save all the other (segment) registers.