in my attempts to set up a multitasking environment, I get a page-fault in my timer handler whenever i try to use the stack. Maybe i'm not getting the kernel stack pointer correctly? This is how i do it:
(in nasm)
get_esp:
mov eax, esp;
sub eax, 8;
ret
should i do it in gcc inline assembly? and if so, how would i do that?
Thanks
multitasking
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:multitasking
honestly, i recommend you do not try to read/change the stack pointer from within a C code, but rather to handle the whole switch (e.g. pushing things, changing the pointer and popping things) in a full-asm snippet.