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.
/tmp/ccgqP61A.s: Assembler messages:
/tmp/ccgqP61A.s:255: Error: operand type mismatch for `mov'
/tmp/ccgqP61A.s:255: Error: operand type mismatch for `mov'
I'm afraid you wrote inline assembly using the Intel syntax, instead of the gcc-standard AT&T syntax.
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx
Clobbering registers without telling GCC is a bad idea.
It's impossible for GCC to generate valid code here - you're clobbering all of the registers it needs in order to access your task struct.
GCC uses AT&T syntax by default. If you want Intel syntax, make sure you're using the right command-line options.
The "g" constraint allows memory and immediate operands, but MOV with a control register as the destination only allows general purpose registers as the source.
Push all values from the struct onto the stack and it should work just fine.
Set EBP last and thats it.
Since you have to change all registers this isnt as easy as it seems because the data has to be stored atleast into one register so you can work with it.