mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-25 14:54:28 +02:00
protect 386 registers from emm386 on 386 kernel build (prevent crash, workaround)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1136 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
696614a6c1
commit
6d9f6c60c0
@ -29,6 +29,7 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
%include "segs.inc"
|
%include "segs.inc"
|
||||||
|
%include "stacks.inc"
|
||||||
|
|
||||||
segment HMA_TEXT
|
segment HMA_TEXT
|
||||||
; EXECRH
|
; EXECRH
|
||||||
@ -65,11 +66,14 @@ segment HMA_TEXT
|
|||||||
pop di
|
pop di
|
||||||
pop si
|
pop si
|
||||||
|
|
||||||
|
Protect386Registers ; protect from drivers that destroy eg emm386
|
||||||
|
|
||||||
mov ax,[si+8] ; construct 'interrupt' address
|
mov ax,[si+8] ; construct 'interrupt' address
|
||||||
mov [bp+4],ax ; construct interrupt address
|
mov [bp+4],ax ; construct interrupt address
|
||||||
call far[bp+4] ; call far the interrupt
|
call far[bp+4] ; call far the interrupt
|
||||||
|
|
||||||
|
Restore386Registers
|
||||||
|
|
||||||
sti ; damm driver turn off ints
|
sti ; damm driver turn off ints
|
||||||
cld ; has gone backwards
|
cld ; has gone backwards
|
||||||
pop ds
|
pop ds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user