About the ESP0 field...

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.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

You don't need to push the stack and the stack segment in a CP0 task.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

Yeah, I realized that... Mainly when I also realized that the return address is meant to be before the arguments, and the arguments are pushed in reverse... Oops.

Now I have arguments working, I just put into my createthread function a va_list that goes through each argument and pushes them (via a printf-style format string).
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Yea I have something like that but I took it out for the example code. It just looked messy.
Post Reply