feat: modification de la gestion des contextes pour un usage plus étendu
This commit is contained in:
parent
5af55420ca
commit
4e91970166
|
@ -272,29 +272,49 @@ endp installirqhandler
|
||||||
interruptionbloc db '/interrupts',0
|
interruptionbloc db '/interrupts',0
|
||||||
|
|
||||||
|
|
||||||
PROC savecontext far
|
PROC savecontext FAR
|
||||||
ARG @pointer:word
|
ARG @pointer:word
|
||||||
USES si
|
USES eax,si,ds
|
||||||
push [word ptr ss:bp]
|
|
||||||
push esi
|
|
||||||
pushfd
|
pushfd
|
||||||
mov si,[@pointer]
|
push eax
|
||||||
pop [dword ptr cs:(regs si).seflags]
|
push ebx
|
||||||
pop [dword ptr cs:(regs si).sesi]
|
push ecx
|
||||||
pop bp
|
push edx
|
||||||
mov [cs:(regs si).seax],eax
|
push esi
|
||||||
mov [cs:(regs si).sebx],ebx
|
push edi
|
||||||
mov [cs:(regs si).secx],ecx
|
push ds
|
||||||
mov [cs:(regs si).sedx],edx
|
push es
|
||||||
mov [cs:(regs si).sedi],edi
|
push fs
|
||||||
mov [cs:(regs si).sebp],ebp
|
push gs
|
||||||
mov [cs:(regs si).sesp],esp
|
push ss
|
||||||
mov [cs:(regs si).scs],cs
|
mov si,[@pointer]
|
||||||
mov [cs:(regs si).sds],ds
|
mov ds,[ss:bp+4]
|
||||||
mov [cs:(regs si).ses],es
|
mov eax,ebp
|
||||||
mov [cs:(regs si).sfs],fs
|
mov ax,[word ptr ss:bp]
|
||||||
mov [cs:(regs si).sgs],gs
|
push eax
|
||||||
mov [cs:(regs si).sss],ss
|
push [word ptr ss:bp+4]
|
||||||
|
xor eax,eax
|
||||||
|
mov ax,[word ptr ss:bp+2]
|
||||||
|
push eax
|
||||||
|
mov ax,bp
|
||||||
|
add ax,4
|
||||||
|
push eax
|
||||||
|
pop [(regs si).sesp]
|
||||||
|
pop [(regs si).seip]
|
||||||
|
pop [(regs si).scs]
|
||||||
|
pop [(regs si).sebp]
|
||||||
|
pop [(regs si).sss]
|
||||||
|
pop [(regs si).sgs]
|
||||||
|
pop [(regs si).sfs]
|
||||||
|
pop [(regs si).ses]
|
||||||
|
pop [(regs si).sds]
|
||||||
|
pop [(regs si).sedi]
|
||||||
|
pop [(regs si).sesi]
|
||||||
|
pop [(regs si).sedx]
|
||||||
|
pop [(regs si).secx]
|
||||||
|
pop [(regs si).sebx]
|
||||||
|
pop [(regs si).seax]
|
||||||
|
pop [(regs si).seflags]
|
||||||
ret
|
ret
|
||||||
endp savecontext
|
endp savecontext
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue