core/com32.inc: fix bits 16/bits 32 confusion
authorH. Peter Anvin <hpa@zytor.com>
Wed, 13 May 2009 23:18:32 +0000 (16:18 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 13 May 2009 23:18:32 +0000 (16:18 -0700)
The unification dropped a bunch of bits 16/bits 32 that are needed to
make things work.  Add those back where needed.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/com32.inc

index bf02dca..63b1e64 100644 (file)
@@ -87,6 +87,8 @@ com32_start:
 com32_exit:
                mov bx,.rm
                jmp enter_rm
+
+               bits 16
 .rm:
                mov dword [PMESP],StackTop      ; Stop use of COM32 stack
                sti
@@ -95,6 +97,8 @@ com32_exit:
 ;
 ; 16-bit intcall/farcall handling code
 ;
+               bits 16
+
 com32_sys_rm:
                pop gs
                pop fs
@@ -202,7 +206,7 @@ com32_syscall:
                mov cl,11               ; 44 bytes
                rep movsd               ; Copy register block
 
-               add dword [word RealModeSSSP],54        ; Remove from stack
+               add word [word RealModeSSSP],54 ; Remove from stack
 
                popad
                popfd