哪位高手解释一下下面这个函数,里面有汇编指令
代码来自国人写的Raw-OS操作系统。
最好详细些,谢谢!
unsigned int store_eax;
void port_task_switch(void)
{
_asm{
mov [store_eax], eax
lea eax, nextstart
push eax
mov eax, [store_eax]
pushfd
pushad
add esp, -200
fsave [esp]
mov ebx, [raw_task_active]
mov [ebx], esp
}
raw_task_active = high_ready_obj;
= raw_task_active->restore_flag;
_asm{
mov ebx, [raw_task_active]
mov esp, [ebx]
frstor [esp]
add esp, 200
popad
popfd
ret
}
nextstart:
return;
}