Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
373bd357
Commit
373bd357
authored
26 years ago
by
Ove Kåven
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed DPMI_CallRMProc (I think).
parent
c0fbd7e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
loader/dos/module.c
+28
-0
28 additions, 0 deletions
loader/dos/module.c
msdos/dpmi.c
+4
-3
4 additions, 3 deletions
msdos/dpmi.c
with
32 additions
and
3 deletions
loader/dos/module.c
+
28
−
0
View file @
373bd357
...
...
@@ -66,6 +66,33 @@ static void MZ_InitPSP( LPVOID lpPSP, LPCSTR cmdline, WORD env )
/* FIXME: integrate the PDB stuff from Wine (loader/task.c) */
}
static
char
int08
[]
=
{
0xCD
,
0x1C
,
/* int $0x1c */
0x50
,
/* pushw %ax */
0x1E
,
/* pushw %ds */
0xB8
,
0x40
,
0x00
,
/* movw $0x40,%ax */
0x8E
,
0xD8
,
/* movw %ax,%ds */
#if 0
0x83,0x06,0x6C,0x00,0x01, /* addw $1,(0x6c) */
0x83,0x16,0x6E,0x00,0x00, /* adcw $0,(0x6e) */
#else
0x66
,
0xFF
,
0x06
,
0x6C
,
0x00
,
/* incl (0x6c) */
#endif
0xB0
,
0x20
,
/* movb $0x20,%al */
0xE6
,
0x20
,
/* outb %al,$0x20 */
0x1F
,
/* popw %ax */
0x58
,
/* popw %ax */
0xCF
/* iret */
};
static
void
MZ_InitHandlers
(
LPDOSTASK
lpDosTask
)
{
WORD
seg
;
LPBYTE
start
=
DOSMEM_GetBlock
(
lpDosTask
->
hModule
,
sizeof
(
int08
),
&
seg
);
memcpy
(
start
,
int08
,
sizeof
(
int08
));
((
SEGPTR
*
)(
lpDosTask
->
img
))[
0x08
]
=
PTR_SEG_OFF_TO_SEGPTR
(
seg
,
0
);
}
static
char
enter_xms
[]
=
{
/* XMS hookable entry point */
0xEB
,
0x03
,
/* jmp entry */
...
...
@@ -121,6 +148,7 @@ static void MZ_InitDPMI( LPDOSTASK lpDosTask )
lpDosTask
->
call_ofs
=
size
-
1
;
memcpy
(
start
,
enter_pm
,
sizeof
(
enter_pm
));
memcpy
(
start
+
sizeof
(
enter_pm
),
wrap_rm
,
sizeof
(
wrap_rm
));
}
static
WORD
MZ_InitEnvironment
(
LPDOSTASK
lpDosTask
,
LPCSTR
env
,
LPCSTR
name
)
...
...
This diff is collapsed.
Click to expand it.
msdos/dpmi.c
+
4
−
3
View file @
373bd357
...
...
@@ -205,7 +205,7 @@ int DPMI_CallRMProc( CONTEXT *context, LPWORD stack, int args, int iret )
CS_reg
(
context
),
IP_reg
(
context
),
args
);
#ifdef MZ_SUPPORTED
FIXME
(
int31
,
"DPMI real-mode call using DOS VM task system,
u
ntested
!
\n
"
);
FIXME
(
int31
,
"DPMI real-mode call using DOS VM task system, n
ot fully
tested
\n
"
);
if
(
!
pModule
->
lpDosTask
)
{
TRACE
(
int31
,
"creating VM86 task
\n
"
);
if
(
MZ_InitTask
(
MZ_AllocDPMITask
(
pModule
->
self
)
)
<
32
)
{
...
...
@@ -217,7 +217,8 @@ int DPMI_CallRMProc( CONTEXT *context, LPWORD stack, int args, int iret )
alloc
=
1
;
/* allocate default stack */
stack16
=
addr
=
DOSMEM_GetBlock
(
pModule
->
self
,
64
,
&
(
SS_reg
(
context
))
);
SP_reg
(
context
)
=
64
-
2
;
if
(
!
stack16
)
{
stack16
+=
32
-
1
;
if
(
!
addr
)
{
ERR
(
int31
,
"could not allocate default stack
\n
"
);
return
1
;
}
...
...
@@ -225,7 +226,7 @@ int DPMI_CallRMProc( CONTEXT *context, LPWORD stack, int args, int iret )
stack16
=
CTX_SEG_OFF_TO_LIN
(
context
,
SS_reg
(
context
),
ESP_reg
(
context
));
addr
=
NULL
;
/* avoid gcc warning */
}
SP_reg
(
context
)
-=
args
*
sizeof
(
WORD
)
+
(
iret
?
1
:
0
);
SP_reg
(
context
)
-=
(
args
+
(
iret
?
1
:
0
))
*
sizeof
(
WORD
);
#else
stack16
=
THREAD_STACK16
(
thdb
);
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment