plat/msdos386: fix: RM int 0x21 calls was clobbering high halves
of esi and edi registers
This commit is contained in:
parent
cba54b205b
commit
f8a6f92752
|
@ -3,14 +3,8 @@
|
||||||
! $State$
|
! $State$
|
||||||
! $Revision$
|
! $Revision$
|
||||||
|
|
||||||
! Declare segments (the order is important).
|
#include "libsysasm.h"
|
||||||
|
|
||||||
.sect .text
|
|
||||||
.sect .rom
|
|
||||||
.sect .data
|
|
||||||
.sect .bss
|
|
||||||
|
|
||||||
.sect .text
|
|
||||||
.use16
|
.use16
|
||||||
exe_header:
|
exe_header:
|
||||||
.data2 0x5a4d ! magic number
|
.data2 0x5a4d ! magic number
|
||||||
|
@ -319,12 +313,12 @@ int21:
|
||||||
o32 or ebx, 0x210000
|
o32 or ebx, 0x210000
|
||||||
! Simulate interrupt in the high half of ebx.
|
! Simulate interrupt in the high half of ebx.
|
||||||
interrupt:
|
interrupt:
|
||||||
mov (dpmi_eax), ax
|
o32 mov (dpmi_eax), eax
|
||||||
mov (dpmi_ebx), bx
|
o32 mov (dpmi_ebx), ebx
|
||||||
mov (dpmi_ecx), cx
|
o32 mov (dpmi_ecx), ecx
|
||||||
mov (dpmi_edx), dx
|
o32 mov (dpmi_edx), edx
|
||||||
mov (dpmi_esi), si
|
o32 mov (dpmi_esi), esi
|
||||||
mov (dpmi_edi), di
|
o32 mov (dpmi_edi), edi
|
||||||
pushf
|
pushf
|
||||||
pop (dpmi_flags)
|
pop (dpmi_flags)
|
||||||
mov ax, (rseg)
|
mov ax, (rseg)
|
||||||
|
@ -340,12 +334,12 @@ interrupt:
|
||||||
xor cx, cx
|
xor cx, cx
|
||||||
int 0x31 ! simulate DOS interrupt
|
int 0x31 ! simulate DOS interrupt
|
||||||
pop es
|
pop es
|
||||||
o32 movzx eax, (dpmi_eax)
|
o32 mov eax, (dpmi_eax)
|
||||||
o32 movzx ebx, (dpmi_ebx)
|
o32 mov ebx, (dpmi_ebx)
|
||||||
o32 movzx ecx, (dpmi_ecx)
|
o32 mov ecx, (dpmi_ecx)
|
||||||
o32 movzx edx, (dpmi_edx)
|
o32 mov edx, (dpmi_edx)
|
||||||
o32 movzx esi, (dpmi_esi)
|
o32 mov esi, (dpmi_esi)
|
||||||
o32 movzx edi, (dpmi_edi)
|
o32 mov edi, (dpmi_edi)
|
||||||
push (dpmi_flags)
|
push (dpmi_flags)
|
||||||
popf
|
popf
|
||||||
ret
|
ret
|
||||||
|
@ -410,7 +404,6 @@ stack:
|
||||||
.space 512
|
.space 512
|
||||||
dosstack:
|
dosstack:
|
||||||
|
|
||||||
TRANSFER_BUFFER_SIZE = 32*1024
|
|
||||||
transfer_buffer:
|
transfer_buffer:
|
||||||
.space TRANSFER_BUFFER_SIZE
|
.space TRANSFER_BUFFER_SIZE
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue