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
Felix Münchhalfen
wine
Commits
09537b76
Commit
09537b76
authored
22 years ago
by
Jukka Heinonen
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
DOSVM now exports DPMI Raw Mode Switch routine.
parent
b9627c14
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/winedos/int31.c
+21
-29
21 additions, 29 deletions
dlls/winedos/int31.c
dlls/winedos/winedos.spec
+1
-0
1 addition, 0 deletions
dlls/winedos/winedos.spec
with
22 additions
and
29 deletions
dlls/winedos/int31.c
+
21
−
29
View file @
09537b76
...
...
@@ -512,31 +512,23 @@ void WINAPI DPMI_FreeInternalRMCB( FARPROC16 proc )
/* DPMI Raw Mode Switch handler */
#if 0
void WINAPI DPMI_RawModeSwitch( SIGCONTEXT *context )
void
WINAPI
DOSVM_RawModeSwitch
(
CONTEXT86
*
context
)
{
LPDOSTASK lpDosTask = MZ_Current();
CONTEXT86
rm_ctx
;
int
ret
;
if (!lpDosTask) {
/* we could probably start a DPMI-only dosmod task here, but I doubt
anything other than real DOS apps want to call raw mode switch */
ERR("attempting raw mode switch without DOS task!\n");
ExitProcess(1);
}
/* initialize real-mode context as per spec */
memset
(
&
rm_ctx
,
0
,
sizeof
(
rm_ctx
));
rm_ctx.SegDs = AX_
si
g(context);
rm_ctx.SegEs = CX_
si
g(context);
rm_ctx.SegSs = DX_
si
g(context);
rm_ctx.Esp =
EBX_sig(
context
)
;
rm_ctx.SegCs = SI_
si
g(context);
rm_ctx.Eip =
EDI_sig(
context
)
;
rm_ctx.Ebp =
EBP_sig(
context
)
;
rm_ctx
.
SegDs
=
AX_
re
g
(
context
);
rm_ctx
.
SegEs
=
CX_
re
g
(
context
);
rm_ctx
.
SegSs
=
DX_
re
g
(
context
);
rm_ctx
.
Esp
=
context
->
Ebx
;
rm_ctx
.
SegCs
=
SI_
re
g
(
context
);
rm_ctx
.
Eip
=
context
->
Edi
;
rm_ctx
.
Ebp
=
context
->
Ebp
;
rm_ctx
.
SegFs
=
0
;
rm_ctx
.
SegGs
=
0
;
rm_ctx.EFlags =
EFL_sig(context)
; /* at least we need the IF flag */
rm_ctx
.
EFlags
=
context
->
EFlags
;
/* at least we need the IF flag */
/* enter real mode again */
TRACE
(
"re-entering real mode at %04lx:%04lx
\n
"
,
rm_ctx
.
SegCs
,
rm_ctx
.
Eip
);
...
...
@@ -545,26 +537,26 @@ void WINAPI DPMI_RawModeSwitch( SIGCONTEXT *context )
DOSVM_Enter will return and we will continue here */
if
(
ret
<
0
)
{
ERR
(
"Sync lost!
\n
"
);
/* if the sync was lost, there's no way to recover */
ExitProcess
(
1
);
}
/* alter protected-mode context as per spec */
DS_sig(context)
= LOWORD(rm_ctx.Eax);
ES_sig(context)
= LOWORD(rm_ctx.Ecx);
SS_sig(context)
= LOWORD(rm_ctx.Edx);
ESP_sig(context)
= rm_ctx.Ebx;
CS_sig(context)
= LOWORD(rm_ctx.Esi);
EIP_sig(context)
= rm_ctx.Edi;
EBP_sig(context)
= rm_ctx.Ebp;
FS_sig(context)
= 0;
GS_sig(context)
= 0;
context
->
SegDs
=
LOWORD
(
rm_ctx
.
Eax
);
context
->
SegEs
=
LOWORD
(
rm_ctx
.
Ecx
);
context
->
SegSs
=
LOWORD
(
rm_ctx
.
Edx
);
context
->
Esp
=
rm_ctx
.
Ebx
;
context
->
SegCs
=
LOWORD
(
rm_ctx
.
Esi
);
context
->
Eip
=
rm_ctx
.
Edi
;
context
->
Ebp
=
rm_ctx
.
Ebp
;
context
->
SegFs
=
0
;
context
->
SegGs
=
0
;
/* Return to new address and hope that we didn't mess up */
TRACE("re-entering protected mode at %04x:%08lx\n",
CS_sig(context), EIP_sig(
context
)
);
TRACE
(
"re-entering protected mode at %04
l
x:%08lx
\n
"
,
context
->
SegCs
,
context
->
Eip
);
}
#endif
/**********************************************************************
...
...
This diff is collapsed.
Click to expand it.
dlls/winedos/winedos.spec
+
1
−
0
View file @
09537b76
...
...
@@ -15,6 +15,7 @@ debug_channels (aspi console ddraw int int21 int31 module relay)
@ stdcall CallRMProc(ptr long) DOSVM_CallRMProc
@ stdcall AllocRMCB(ptr) DOSVM_AllocRMCB
@ stdcall FreeRMCB(ptr) DOSVM_FreeRMCB
@ stdcall RawModeSwitch(ptr) DOSVM_RawModeSwitch
# I/O functions
@ stdcall SetTimer(long) DOSVM_SetTimer
...
...
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