Posted: Wed Jun 06, 2007 1:17 pm
i assumed you were using software task-switching, since most people do (its easier to get it working correctly, and faster... sometimes... maybe...) -- and the code you have posted seems to agree
ya you should, CS is the only segment selector stored on stack without privilege change, and its only CS and SS with a privilege change, so you should be popping 0 into DS, which will GPF...
idk why its working... it shouldnt be
unless the code your iret returns to isnt using DS... that is possible -- actually, that is quite likely, a lot of simple code wont (the kind used to test multi-tasking)
ya you should, CS is the only segment selector stored on stack without privilege change, and its only CS and SS with a privilege change, so you should be popping 0 into DS, which will GPF...
idk why its working... it shouldnt be
unless the code your iret returns to isnt using DS... that is possible -- actually, that is quite likely, a lot of simple code wont (the kind used to test multi-tasking)