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.
I have been trying to get task switching implemented in my OS for quite a while now, despite the immense amount of tutorials I have read.
To try to solve my problem I started to look through the Linux 0.01 source code to see how it was done. I came across a macro called switch_to() that did the actual task switching and noticed that it seemed to copy an undefined value to %dx and then jump to another undefined value.
The macro defines __tmp and then proceeds to use the values undefined, is there some other place in the code that these magically get a useful value inserted into them?
the 'm' code (i think) means that the data is placed in a temporary memory address instead of a register. the 'd' and 'c' before the tss and task mean to put the value passed into %edx and %ecx respectively.