I have this code:
timer_s:
pusha
push ds
push es
push fs
push gs
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov eax, esp
push eax
mov eax, timer_call
call eax
pop eax
mov esp,eax
pop gs
pop fs
pop es
pop ds
popa
add esp, 8
iret
-----------------------
struct reg
{
unsigned int gs, fs, es, ds;
unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax;
unsigned int int_no, err_code;
unsigned int eip, cs, eflags, useresp, ss;
};
void timer_call(struct reg *r){
//?
}
And what i must do here ?
I think, I must change registers.
How to change crX ?
I know , how to create process.I have correct GDT and working hw task switching, but i want software.
Software multitasking.
Re:Software multitasking.
try reading the FAQ especially http://www.osdev.org/osfaq2/index.php/Context%20Switching
Re:Software multitasking.
Or you could try looking at my little tutorial, if that helps...
http://hosted.cjmovie.net/TutMultitask.htm
And for those of you who've been wondering, no I'm not dead, just been busy .
http://hosted.cjmovie.net/TutMultitask.htm
And for those of you who've been wondering, no I'm not dead, just been busy .