From 6d9f6c60c0cf87c9a592ee433688b02e45ecbc49 Mon Sep 17 00:00:00 2001 From: Kenneth J Davis Date: Sun, 24 Jul 2005 09:34:10 +0000 Subject: [PATCH] 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 --- kernel/execrh.asm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/execrh.asm b/kernel/execrh.asm index 87ce4c9..ba28486 100644 --- a/kernel/execrh.asm +++ b/kernel/execrh.asm @@ -29,6 +29,7 @@ ; %include "segs.inc" + %include "stacks.inc" segment HMA_TEXT ; EXECRH @@ -65,11 +66,14 @@ segment HMA_TEXT pop di 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 call far[bp+4] ; call far the interrupt + Restore386Registers + sti ; damm driver turn off ints cld ; has gone backwards pop ds