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
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
Zsolt Vadász
wine
Commits
e929a20e
Commit
e929a20e
authored
22 years ago
by
Jukka Heinonen
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
RawModeSwitch can now be used to return DPMI application back to
protected mode.
parent
4a0a2ee0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
msdos/dpmi.c
+40
-1
40 additions, 1 deletion
msdos/dpmi.c
with
40 additions
and
1 deletion
msdos/dpmi.c
+
40
−
1
View file @
e929a20e
...
...
@@ -33,6 +33,7 @@
#include
"selectors.h"
#include
"callback.h"
#include
"wine/debug.h"
#include
"stackframe.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
int31
);
...
...
@@ -198,7 +199,45 @@ static void RawModeSwitch( CONTEXT86 *context )
ERR
(
"could not setup real-mode calls
\n
"
);
return
;
}
else
Dosvm
.
RawModeSwitch
(
context
);
else
{
/*
* FIXME: This routine will not work if it is called
* from 32 bit DPMI program and the program returns
* to protected mode while ESP or EIP is over 0xffff.
* FIXME: This routine will not work if it is not called
* using 16-bit-to-Wine callback glue function.
*/
STACK16FRAME
frame
=
*
CURRENT_STACK16
;
Dosvm
.
RawModeSwitch
(
context
);
/*
* After this function returns to relay code, protected mode
* 16 bit stack will contain STACK16FRAME and single WORD
* (EFlags, see next comment).
*/
NtCurrentTeb
()
->
cur_stack
=
MAKESEGPTR
(
context
->
SegSs
,
context
->
Esp
-
sizeof
(
STACK16FRAME
)
-
sizeof
(
WORD
)
);
/*
* After relay code returns to glue function, protected
* mode 16 bit stack will contain interrupt return record:
* IP, CS and EFlags. Since EFlags is ignored, it won't
* need to be initialized.
*/
context
->
Esp
-=
3
*
sizeof
(
WORD
);
/*
* Restore stack frame so that relay code won't be confused.
* It should be noted that relay code overwrites IP and CS
* in STACK16FRAME with values taken from current CONTEXT86.
* These values are what is returned to glue function
* (see previous comment).
*/
*
CURRENT_STACK16
=
frame
;
}
}
/**********************************************************************
...
...
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