This is my scheduler:
Code: Select all
;----------------------------
pit_hndl:
???pushad
???push gs
???push fs
???push es
???push ds
???mov eax,1000h
???mov cr3,eax
;----------------------------
???mov eax,esp
???mov edi,[act_task]
???mov esi,edi
???add edi,12
???stosd
???lodsd
???mov [act_task],eax
???mov esi,eax
???add esi,4
???lodsd
???mov cr3,eax
;???lodsd
;???mov ss,eax
???add esi,4?????????;because no ring3 task
???lodsd
???mov esp,eax
;----------------------------
.end
???mov al,20h
???out 20h,al
???pop ds
???pop es
???pop fs
???pop gs
???popad
???iret
;----------------------------
;???vars
act_task???dd 0
;----------------------------