Page 1 of 1

multitasking

Posted: Fri Aug 27, 2004 3:21 pm
by northfuse
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

Re:multitasking

Posted: Sat Aug 28, 2004 5:53 am
by Pype.Clicker
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.