Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2325ee40
Commit
2325ee40
authored
Jul 31, 2000
by
Ove Kaaven
Committed by
Alexandre Julliard
Jul 31, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use MZ_Current() instead of pModule->lpDosTask. Cleaned up the RMCB32
assembly code a bit, and wrapped it in #ifdef __i386__.
parent
946a4448
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
dpmi.c
msdos/dpmi.c
+9
-10
No files found.
msdos/dpmi.c
View file @
2325ee40
...
...
@@ -10,12 +10,10 @@
#include "wine/winbase16.h"
#include "ldt.h"
#include "global.h"
#include "module.h"
#include "miscemu.h"
#include "msdos.h"
#include "dosexe.h"
#include "task.h"
#include "thread.h"
/* for !MZ_SUPPORTED */
#include "stackframe.h"
/* for !MZ_SUPPORTED */
#include "toolhelp.h"
#include "selectors.h"
#include "process.h"
...
...
@@ -183,6 +181,8 @@ static void INT_SetRealModeContext( REALMODECALL *call, CONTEXT86 *context )
call
->
ss
=
SS_reg
(
context
);
}
#ifdef __i386__
void
DPMI_CallRMCB32
(
RMCB
*
rmcb
,
UINT16
ss
,
DWORD
esp
,
UINT16
*
es
,
DWORD
*
edi
)
#if 0 /* original code, which early gccs puke on */
{
...
...
@@ -211,7 +211,6 @@ void DPMI_CallRMCB32(RMCB *rmcb, UINT16 ss, DWORD esp, UINT16*es, DWORD*edi)
__ASM_GLOBAL_FUNC
(
DPMI_CallRMCB32
,
"pushl %ebp
\n\t
"
"movl %esp,%ebp
\n\t
"
"subl $0x10,%esp
\n\t
"
"pushl %edi
\n\t
"
"pushl %esi
\n\t
"
"movl 0x8(%ebp),%eax
\n\t
"
...
...
@@ -220,7 +219,6 @@ __ASM_GLOBAL_FUNC(DPMI_CallRMCB32,
"movl 0x10(%eax),%ecx
\n\t
"
"movl 0xc(%eax),%edi
\n\t
"
"addl $0x4,%eax
\n\t
"
"movl %eax,-0x8(%ebp)
\n\t
"
"pushl %ebp
\n\t
"
"pushl %ebx
\n\t
"
"pushl %es
\n\t
"
...
...
@@ -244,6 +242,8 @@ __ASM_GLOBAL_FUNC(DPMI_CallRMCB32,
"ret"
)
#endif
#endif
/* __i386__ */
/**********************************************************************
* DPMI_CallRMCBProc
*
...
...
@@ -307,8 +307,7 @@ int DPMI_CallRMProc( CONTEXT86 *context, LPWORD stack, int args, int iret )
{
LPWORD
stack16
;
LPVOID
addr
=
NULL
;
/* avoid gcc warning */
TDB
*
pTask
=
(
TDB
*
)
GlobalLock16
(
GetCurrentTask
()
);
NE_MODULE
*
pModule
=
pTask
?
NE_GetPtr
(
pTask
->
hModule
)
:
NULL
;
LPDOSTASK
lpDosTask
=
MZ_Current
();
RMCB
*
CurrRMCB
;
int
alloc
=
0
,
already
=
0
;
BYTE
*
code
;
...
...
@@ -353,11 +352,11 @@ callrmproc_again:
while
(
CurrRMCB
&&
(
HIWORD
(
CurrRMCB
->
address
)
!=
CS_reg
(
context
)))
CurrRMCB
=
CurrRMCB
->
next
;
if
(
!
(
CurrRMCB
||
pModule
->
lpDosTask
))
{
if
(
!
(
CurrRMCB
||
lpDosTask
))
{
#ifdef MZ_SUPPORTED
FIXME
(
"DPMI real-mode call using DOS VM task system, not fully tested!
\n
"
);
TRACE
(
"creating VM86 task
\n
"
);
if
(
!
MZ_InitTask
(
MZ_AllocDPMITask
()
))
{
if
(
!
MZ_InitTask
(
lpDosTask
=
MZ_AllocDPMITask
()
))
{
ERR
(
"could not setup VM86 task
\n
"
);
return
1
;
}
...
...
@@ -397,7 +396,7 @@ callrmproc_again:
if
(
CurrRMCB
)
{
/* RMCB call, invoke protected-mode handler directly */
DPMI_CallRMCBProc
(
context
,
CurrRMCB
,
pModule
->
lpDosTask
?
pModule
->
lpDosTask
->
dpmi_flag
:
0
);
DPMI_CallRMCBProc
(
context
,
CurrRMCB
,
lpDosTask
?
lpDosTask
->
dpmi_flag
:
0
);
/* check if we returned to where we thought we would */
if
((
CS_reg
(
context
)
!=
DPMI_wrap_seg
)
||
(
LOWORD
(
EIP_reg
(
context
))
!=
0
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment