Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1b260438
Commit
1b260438
authored
Oct 20, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe: Avoid using the CONTEXT86 type.
parent
16c9b10d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
257 additions
and
258 deletions
+257
-258
dosaspi.c
dlls/krnl386.exe16/dosaspi.c
+3
-3
dosdev.c
dlls/krnl386.exe16/dosdev.c
+10
-10
dosexe.c
dlls/krnl386.exe16/dosexe.c
+4
-4
dosexe.h
dlls/krnl386.exe16/dosexe.h
+48
-48
dosvm.c
dlls/krnl386.exe16/dosvm.c
+10
-10
error.c
dlls/krnl386.exe16/error.c
+1
-1
fpu.c
dlls/krnl386.exe16/fpu.c
+13
-13
global.c
dlls/krnl386.exe16/global.c
+1
-2
instr.c
dlls/krnl386.exe16/instr.c
+13
-13
int09.c
dlls/krnl386.exe16/int09.c
+2
-2
int10.c
dlls/krnl386.exe16/int10.c
+2
-2
int13.c
dlls/krnl386.exe16/int13.c
+3
-3
int15.c
dlls/krnl386.exe16/int15.c
+1
-1
int16.c
dlls/krnl386.exe16/int16.c
+2
-2
int21.c
dlls/krnl386.exe16/int21.c
+0
-0
int25.c
dlls/krnl386.exe16/int25.c
+1
-1
int26.c
dlls/krnl386.exe16/int26.c
+1
-1
int2f.c
dlls/krnl386.exe16/int2f.c
+10
-10
int31.c
dlls/krnl386.exe16/int31.c
+18
-18
int33.c
dlls/krnl386.exe16/int33.c
+4
-4
int67.c
dlls/krnl386.exe16/int67.c
+8
-8
interrupts.c
dlls/krnl386.exe16/interrupts.c
+33
-33
kernel16_private.h
dlls/krnl386.exe16/kernel16_private.h
+2
-2
ne_module.c
dlls/krnl386.exe16/ne_module.c
+3
-3
ne_segment.c
dlls/krnl386.exe16/ne_segment.c
+2
-2
relay.c
dlls/krnl386.exe16/relay.c
+6
-6
snoop.c
dlls/krnl386.exe16/snoop.c
+4
-4
task.c
dlls/krnl386.exe16/task.c
+2
-2
thunk.c
dlls/krnl386.exe16/thunk.c
+30
-30
timer.c
dlls/krnl386.exe16/timer.c
+3
-3
vxd.c
dlls/krnl386.exe16/vxd.c
+16
-16
wowthunk.c
dlls/krnl386.exe16/wowthunk.c
+1
-1
No files found.
dlls/krnl386.exe16/dosaspi.c
View file @
1b260438
...
...
@@ -62,7 +62,7 @@ DOSASPI_PostProc( SRB_ExecSCSICmd *lpPRB )
if
(
(
lpSRB16
->
cmd
.
SRB_Flags
&
SRB_POSTING
)
&&
lpSRB16
->
cmd
.
SRB_PostProc
)
{
CONTEXT
86
ctx
;
CONTEXT
ctx
;
/* The stack should look like this on entry to proc
* NOTE: the SDK draws the following diagram bass akwards, use this one
* to avoid being confused. Remember, the act of pushing something on
...
...
@@ -175,7 +175,7 @@ DWORD ASPI_SendASPIDOSCommand(DWORD ptrSRB)
return
retval
;
}
static
void
WINAPI
ASPI_DOS_func
(
CONTEXT
86
*
context
)
static
void
WINAPI
ASPI_DOS_func
(
CONTEXT
*
context
)
{
WORD
*
stack
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegSs
,
context
->
Esp
);
DWORD
ptrSRB
=
*
(
DWORD
*
)
&
stack
[
2
];
...
...
@@ -194,7 +194,7 @@ static void WINAPI ASPI_DOS_func(CONTEXT86 *context)
*
* returns the address of a real mode callback to ASPI_DOS_func()
*/
void
DOSVM_ASPIHandler
(
CONTEXT
86
*
context
)
void
DOSVM_ASPIHandler
(
CONTEXT
*
context
)
{
FARPROC16
*
p
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
);
TRACE
(
"DOS ASPI opening
\n
"
);
...
...
dlls/krnl386.exe16/dosdev.c
View file @
1b260438
...
...
@@ -77,10 +77,10 @@ static void *strategy_data[NB_SYSTEM_STRATEGIES];
/* prototypes */
static
void
WINAPI
nul_strategy
(
CONTEXT
86
*
ctx
);
static
void
WINAPI
nul_interrupt
(
CONTEXT
86
*
ctx
);
static
void
WINAPI
con_strategy
(
CONTEXT
86
*
ctx
);
static
void
WINAPI
con_interrupt
(
CONTEXT
86
*
ctx
);
static
void
WINAPI
nul_strategy
(
CONTEXT
*
ctx
);
static
void
WINAPI
nul_interrupt
(
CONTEXT
*
ctx
);
static
void
WINAPI
con_strategy
(
CONTEXT
*
ctx
);
static
void
WINAPI
con_interrupt
(
CONTEXT
*
ctx
);
/* devices */
static
const
WINEDEV
devs
[]
=
...
...
@@ -119,7 +119,7 @@ static struct _DOS_LISTOFLISTS * DOSMEM_LOL(void)
/* the device implementations */
static
void
do_lret
(
CONTEXT
86
*
ctx
)
static
void
do_lret
(
CONTEXT
*
ctx
)
{
WORD
*
stack
=
CTX_SEG_OFF_TO_LIN
(
ctx
,
ctx
->
SegSs
,
ctx
->
Esp
);
...
...
@@ -128,7 +128,7 @@ static void do_lret(CONTEXT86*ctx)
ctx
->
Esp
+=
2
*
sizeof
(
WORD
);
}
static
void
do_strategy
(
CONTEXT
86
*
ctx
,
int
id
,
int
extra
)
static
void
do_strategy
(
CONTEXT
*
ctx
,
int
id
,
int
extra
)
{
REQUEST_HEADER
*
hdr
=
CTX_SEG_OFF_TO_LIN
(
ctx
,
ctx
->
SegEs
,
ctx
->
Ebx
);
void
**
hdr_ptr
=
strategy_data
[
id
];
...
...
@@ -149,12 +149,12 @@ static REQUEST_HEADER * get_hdr(int id, void**extra)
return
hdr_ptr
?
*
hdr_ptr
:
NULL
;
}
static
void
WINAPI
nul_strategy
(
CONTEXT
86
*
ctx
)
static
void
WINAPI
nul_strategy
(
CONTEXT
*
ctx
)
{
do_strategy
(
ctx
,
SYSTEM_STRATEGY_NUL
,
0
);
}
static
void
WINAPI
nul_interrupt
(
CONTEXT
86
*
ctx
)
static
void
WINAPI
nul_interrupt
(
CONTEXT
*
ctx
)
{
REQUEST_HEADER
*
hdr
=
get_hdr
(
SYSTEM_STRATEGY_NUL
,
NULL
);
/* eat everything and recycle nothing */
...
...
@@ -172,12 +172,12 @@ static void WINAPI nul_interrupt(CONTEXT86*ctx)
do_lret
(
ctx
);
}
static
void
WINAPI
con_strategy
(
CONTEXT
86
*
ctx
)
static
void
WINAPI
con_strategy
(
CONTEXT
*
ctx
)
{
do_strategy
(
ctx
,
SYSTEM_STRATEGY_CON
,
sizeof
(
int
));
}
static
void
WINAPI
con_interrupt
(
CONTEXT
86
*
ctx
)
static
void
WINAPI
con_interrupt
(
CONTEXT
*
ctx
)
{
int
*
scan
;
REQUEST_HEADER
*
hdr
=
get_hdr
(
SYSTEM_STRATEGY_CON
,(
void
**
)
&
scan
);
...
...
dlls/krnl386.exe16/dosexe.c
View file @
1b260438
...
...
@@ -442,7 +442,7 @@ void __wine_load_dos_exe( LPCSTR filename, LPCSTR cmdline )
*
* this may only be called from existing DOS processes
*/
BOOL
MZ_Exec
(
CONTEXT
86
*
context
,
LPCSTR
filename
,
BYTE
func
,
LPVOID
paramblk
)
BOOL
MZ_Exec
(
CONTEXT
*
context
,
LPCSTR
filename
,
BYTE
func
,
LPVOID
paramblk
)
{
DWORD
binType
;
STARTUPINFOA
st
;
...
...
@@ -703,7 +703,7 @@ static void MZ_Launch( LPCSTR cmdtail, int length )
/***********************************************************************
* MZ_Exit
*/
void
MZ_Exit
(
CONTEXT
86
*
context
,
BOOL
cs_psp
,
WORD
retval
)
void
MZ_Exit
(
CONTEXT
*
context
,
BOOL
cs_psp
,
WORD
retval
)
{
if
(
DOSVM_psp
)
{
WORD
psp_seg
=
cs_psp
?
context
->
SegCs
:
DOSVM_psp
;
...
...
@@ -762,7 +762,7 @@ void __wine_load_dos_exe( LPCSTR filename, LPCSTR cmdline )
/***********************************************************************
* MZ_Exec
*/
BOOL
MZ_Exec
(
CONTEXT
86
*
context
,
LPCSTR
filename
,
BYTE
func
,
LPVOID
paramblk
)
BOOL
MZ_Exec
(
CONTEXT
*
context
,
LPCSTR
filename
,
BYTE
func
,
LPVOID
paramblk
)
{
/* can't happen */
SetLastError
(
ERROR_BAD_FORMAT
);
...
...
@@ -788,7 +788,7 @@ void MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg )
/***********************************************************************
* MZ_Exit
*/
void
MZ_Exit
(
CONTEXT
86
*
context
,
BOOL
cs_psp
,
WORD
retval
)
void
MZ_Exit
(
CONTEXT
*
context
,
BOOL
cs_psp
,
WORD
retval
)
{
DOSVM_Exit
(
retval
);
}
...
...
dlls/krnl386.exe16/dosexe.h
View file @
1b260438
...
...
@@ -64,9 +64,9 @@ typedef struct {
DWORD
offset
;
}
SEGPTR48
,
FARPROC48
;
typedef
void
(
*
DOSRELAY
)(
CONTEXT
86
*
,
void
*
);
typedef
void
(
WINAPI
*
RMCBPROC
)(
CONTEXT
86
*
);
typedef
void
(
WINAPI
*
INTPROC
)(
CONTEXT
86
*
);
typedef
void
(
*
DOSRELAY
)(
CONTEXT
*
,
void
*
);
typedef
void
(
WINAPI
*
RMCBPROC
)(
CONTEXT
*
);
typedef
void
(
WINAPI
*
INTPROC
)(
CONTEXT
*
);
#define DOS_PRIORITY_REALTIME 0
/* IRQ0 */
#define DOS_PRIORITY_KEYBOARD 1
/* IRQ1 */
...
...
@@ -83,7 +83,7 @@ extern struct DPMI_segments *DOSVM_dpmi_segments;
#endif
/* linux-i386 */
/*
* Declare some CONTEXT
86
.EFlags bits.
* Declare some CONTEXT.EFlags bits.
* IF_MASK is only pushed into real mode stack.
*/
#define V86_FLAG 0x00020000
...
...
@@ -334,8 +334,8 @@ typedef struct
}
WINEDEV
;
/* dosexe.c */
extern
BOOL
MZ_Exec
(
CONTEXT
86
*
context
,
LPCSTR
filename
,
BYTE
func
,
LPVOID
paramblk
);
extern
void
MZ_Exit
(
CONTEXT
86
*
context
,
BOOL
cs_psp
,
WORD
retval
);
extern
BOOL
MZ_Exec
(
CONTEXT
*
context
,
LPCSTR
filename
,
BYTE
func
,
LPVOID
paramblk
);
extern
void
MZ_Exit
(
CONTEXT
*
context
,
BOOL
cs_psp
,
WORD
retval
);
extern
BOOL
MZ_Current
(
void
);
extern
void
MZ_AllocDPMITask
(
void
);
extern
void
MZ_RunInThread
(
PAPCFUNC
proc
,
ULONG_PTR
arg
);
...
...
@@ -343,10 +343,10 @@ extern BOOL DOSVM_IsWin16(void);
extern
void
DOSVM_Exit
(
WORD
retval
);
/* dosvm.c */
extern
void
DOSVM_SendQueuedEvents
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_AcknowledgeIRQ
(
CONTEXT
86
*
);
extern
INT
DOSVM_Enter
(
CONTEXT
86
*
context
);
extern
void
DOSVM_Wait
(
CONTEXT
86
*
);
extern
void
DOSVM_SendQueuedEvents
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_AcknowledgeIRQ
(
CONTEXT
*
);
extern
INT
DOSVM_Enter
(
CONTEXT
*
context
);
extern
void
DOSVM_Wait
(
CONTEXT
*
);
extern
DWORD
DOSVM_Loop
(
HANDLE
hThread
);
extern
void
DOSVM_QueueEvent
(
INT
irq
,
INT
priority
,
DOSRELAY
relay
,
LPVOID
data
);
extern
void
DOSVM_PIC_ioport_out
(
WORD
port
,
BYTE
val
);
...
...
@@ -367,87 +367,87 @@ extern void DMA_ioport_out( WORD port, BYTE val );
extern
BYTE
DMA_ioport_in
(
WORD
port
);
/* dosaspi.c */
extern
void
DOSVM_ASPIHandler
(
CONTEXT
86
*
);
extern
void
DOSVM_ASPIHandler
(
CONTEXT
*
);
/* dosmem.c */
extern
BIOSDATA
*
DOSVM_BiosData
(
void
);
extern
void
DOSVM_start_bios_timer
(
void
);
/* fpu.c */
extern
void
WINAPI
DOSVM_Int34Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int35Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int36Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int37Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int38Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int39Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int3aHandler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int3bHandler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int3cHandler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int3dHandler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int3eHandler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int34Handler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int35Handler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int36Handler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int37Handler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int38Handler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int39Handler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int3aHandler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int3bHandler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int3cHandler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int3dHandler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_Int3eHandler
(
CONTEXT
*
);
/* int09.c */
extern
void
WINAPI
DOSVM_Int09Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int09Handler
(
CONTEXT
*
);
extern
void
DOSVM_Int09SendScan
(
BYTE
scan
,
BYTE
ascii
);
extern
BYTE
DOSVM_Int09ReadScan
(
BYTE
*
ascii
);
/* int10.c */
extern
void
WINAPI
DOSVM_Int10Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int10Handler
(
CONTEXT
*
);
extern
void
DOSVM_PutChar
(
BYTE
ascii
);
/* int13.c */
extern
void
WINAPI
DOSVM_Int13Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int13Handler
(
CONTEXT
*
);
/* int15.c */
extern
void
WINAPI
DOSVM_Int15Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int15Handler
(
CONTEXT
*
);
/* int16.c */
extern
void
WINAPI
DOSVM_Int16Handler
(
CONTEXT
86
*
);
extern
BOOL
DOSVM_Int16ReadChar
(
BYTE
*
,
BYTE
*
,
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int16Handler
(
CONTEXT
*
);
extern
BOOL
DOSVM_Int16ReadChar
(
BYTE
*
,
BYTE
*
,
CONTEXT
*
);
extern
int
DOSVM_Int16AddChar
(
BYTE
ascii
,
BYTE
scan
);
/* int21.c */
extern
void
WINAPI
DOSVM_Int21Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int21Handler
(
CONTEXT
*
);
/* int25.c */
BOOL
DOSVM_RawRead
(
BYTE
,
DWORD
,
DWORD
,
BYTE
*
,
BOOL
);
void
WINAPI
DOSVM_Int25Handler
(
CONTEXT
86
*
);
void
WINAPI
DOSVM_Int25Handler
(
CONTEXT
*
);
/* int26.c */
BOOL
DOSVM_RawWrite
(
BYTE
,
DWORD
,
DWORD
,
BYTE
*
,
BOOL
);
void
WINAPI
DOSVM_Int26Handler
(
CONTEXT
86
*
);
void
WINAPI
DOSVM_Int26Handler
(
CONTEXT
*
);
/* int2f.c */
extern
void
WINAPI
DOSVM_Int2fHandler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int2fHandler
(
CONTEXT
*
);
extern
void
MSCDEX_InstallCDROM
(
void
);
/* int31.c */
extern
void
WINAPI
DOSVM_Int31Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_RawModeSwitchHandler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int31Handler
(
CONTEXT
*
);
extern
void
WINAPI
DOSVM_RawModeSwitchHandler
(
CONTEXT
*
);
extern
BOOL
DOSVM_IsDos32
(
void
);
extern
FARPROC16
DPMI_AllocInternalRMCB
(
RMCBPROC
);
extern
int
DPMI_CallRMProc
(
CONTEXT
86
*
,
LPWORD
,
int
,
int
);
extern
BOOL
DOSVM_CheckWrappers
(
CONTEXT
86
*
);
extern
int
DPMI_CallRMProc
(
CONTEXT
*
,
LPWORD
,
int
,
int
);
extern
BOOL
DOSVM_CheckWrappers
(
CONTEXT
*
);
/* int33.c */
extern
void
WINAPI
DOSVM_Int33Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int33Handler
(
CONTEXT
*
);
extern
void
DOSVM_Int33Message
(
UINT
,
WPARAM
,
LPARAM
);
extern
void
DOSVM_Int33Console
(
MOUSE_EVENT_RECORD
*
);
/* int67.c */
extern
void
WINAPI
DOSVM_Int67Handler
(
CONTEXT
86
*
);
extern
void
EMS_Ioctl_Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int67Handler
(
CONTEXT
*
);
extern
void
EMS_Ioctl_Handler
(
CONTEXT
*
);
/* interrupts.c */
extern
void
__wine_call_int_handler
(
CONTEXT
86
*
,
BYTE
);
extern
void
DOSVM_CallBuiltinHandler
(
CONTEXT
86
*
,
BYTE
);
extern
BOOL
DOSVM_EmulateInterruptPM
(
CONTEXT
86
*
,
BYTE
);
extern
BOOL
DOSVM_EmulateInterruptRM
(
CONTEXT
86
*
,
BYTE
);
extern
void
__wine_call_int_handler
(
CONTEXT
*
,
BYTE
);
extern
void
DOSVM_CallBuiltinHandler
(
CONTEXT
*
,
BYTE
);
extern
BOOL
DOSVM_EmulateInterruptPM
(
CONTEXT
*
,
BYTE
);
extern
BOOL
DOSVM_EmulateInterruptRM
(
CONTEXT
*
,
BYTE
);
extern
FARPROC16
DOSVM_GetPMHandler16
(
BYTE
);
extern
FARPROC48
DOSVM_GetPMHandler48
(
BYTE
);
extern
FARPROC16
DOSVM_GetRMHandler
(
BYTE
);
extern
void
DOSVM_HardwareInterruptPM
(
CONTEXT
86
*
,
BYTE
);
extern
void
DOSVM_HardwareInterruptRM
(
CONTEXT
86
*
,
BYTE
);
extern
void
DOSVM_HardwareInterruptPM
(
CONTEXT
*
,
BYTE
);
extern
void
DOSVM_HardwareInterruptRM
(
CONTEXT
*
,
BYTE
);
extern
void
DOSVM_SetPMHandler16
(
BYTE
,
FARPROC16
);
extern
void
DOSVM_SetPMHandler48
(
BYTE
,
FARPROC48
);
extern
void
DOSVM_SetRMHandler
(
BYTE
,
FARPROC16
);
...
...
@@ -457,14 +457,14 @@ extern DWORD DOSVM_inport( int port, int size );
extern
void
DOSVM_outport
(
int
port
,
int
size
,
DWORD
value
);
/* relay.c */
void
DOSVM_RelayHandler
(
CONTEXT
86
*
);
void
DOSVM_BuildCallFrame
(
CONTEXT
86
*
,
DOSRELAY
,
LPVOID
);
void
DOSVM_RelayHandler
(
CONTEXT
*
);
void
DOSVM_BuildCallFrame
(
CONTEXT
*
,
DOSRELAY
,
LPVOID
);
/* soundblaster.c */
extern
void
SB_ioport_out
(
WORD
port
,
BYTE
val
);
extern
BYTE
SB_ioport_in
(
WORD
port
);
/* timer.c */
extern
void
WINAPI
DOSVM_Int08Handler
(
CONTEXT
86
*
);
extern
void
WINAPI
DOSVM_Int08Handler
(
CONTEXT
*
);
#endif
/* __WINE_DOSEXE_H */
dlls/krnl386.exe16/dosvm.c
View file @
1b260438
...
...
@@ -145,7 +145,7 @@ static BOOL DOSVM_HasPendingEvents( void )
* be called. This is because we may otherwise get a deadlock if
* another thread is waiting for the same critical section.
*/
static
void
DOSVM_SendOneEvent
(
CONTEXT
86
*
context
)
static
void
DOSVM_SendOneEvent
(
CONTEXT
*
context
)
{
LPDOSEVENT
event
=
pending_event
;
...
...
@@ -222,7 +222,7 @@ static void DOSVM_SendOneEvent( CONTEXT86 *context )
* This routine assumes that caller has already cleared TEB.vm86_pending
* and checked that interrupts are enabled.
*/
void
DOSVM_SendQueuedEvents
(
CONTEXT
86
*
context
)
void
DOSVM_SendQueuedEvents
(
CONTEXT
*
context
)
{
DWORD
old_cs
=
context
->
SegCs
;
DWORD
old_ip
=
context
->
Eip
;
...
...
@@ -323,7 +323,7 @@ void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data)
* which uses DPMI to thunk down to DOS services) */
if
(
irq
<
0
)
{
/* callback event, perform it with dummy context */
CONTEXT
86
context
;
CONTEXT
context
;
memset
(
&
context
,
0
,
sizeof
(
context
));
(
*
relay
)(
&
context
,
data
);
}
else
{
...
...
@@ -410,11 +410,11 @@ static void DOSVM_ProcessMessage(MSG *msg)
* interrupts and waits until some asynchronous event has been
* processed.
*/
void
DOSVM_Wait
(
CONTEXT
86
*
waitctx
)
void
DOSVM_Wait
(
CONTEXT
*
waitctx
)
{
if
(
DOSVM_HasPendingEvents
())
{
CONTEXT
86
context
=
*
waitctx
;
CONTEXT
context
=
*
waitctx
;
/*
* If DOSVM_Wait is called from protected mode we emulate
...
...
@@ -594,7 +594,7 @@ static LONG WINAPI exception_handler(EXCEPTION_POINTERS *eptr)
return
EXCEPTION_CONTINUE_SEARCH
;
}
INT
DOSVM_Enter
(
CONTEXT
86
*
context
)
INT
DOSVM_Enter
(
CONTEXT
*
context
)
{
INT
ret
=
0
;
if
(
!
ISV86
(
context
))
...
...
@@ -669,7 +669,7 @@ void DOSVM_PIC_ioport_out( WORD port, BYTE val)
/***********************************************************************
* DOSVM_Enter
*/
INT
DOSVM_Enter
(
CONTEXT
86
*
context
)
INT
DOSVM_Enter
(
CONTEXT
*
context
)
{
SetLastError
(
ERROR_NOT_SUPPORTED
);
return
-
1
;
...
...
@@ -678,7 +678,7 @@ INT DOSVM_Enter( CONTEXT86 *context )
/***********************************************************************
* DOSVM_Wait
*/
void
DOSVM_Wait
(
CONTEXT
86
*
waitctx
)
{
}
void
DOSVM_Wait
(
CONTEXT
*
waitctx
)
{
}
/***********************************************************************
* DOSVM_PIC_ioport_out
...
...
@@ -692,7 +692,7 @@ void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data)
{
if
(
irq
<
0
)
{
/* callback event, perform it with dummy context */
CONTEXT
86
context
;
CONTEXT
context
;
memset
(
&
context
,
0
,
sizeof
(
context
));
(
*
relay
)(
&
context
,
data
);
}
else
{
...
...
@@ -708,7 +708,7 @@ void DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data)
*
* This routine should be called by all internal IRQ handlers.
*/
void
WINAPI
DOSVM_AcknowledgeIRQ
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_AcknowledgeIRQ
(
CONTEXT
*
context
)
{
/*
* Send EOI to PIC.
...
...
dlls/krnl386.exe16/error.c
View file @
1b260438
...
...
@@ -283,7 +283,7 @@ void WINAPI LogParamError16(UINT16 uErr, FARPROC16 lpfn, LPVOID lpvParam)
/***********************************************************************
* K327 (KERNEL.327)
*/
void
WINAPI
HandleParamError
(
CONTEXT
86
*
context
)
void
WINAPI
HandleParamError
(
CONTEXT
*
context
)
{
UINT16
uErr
=
LOWORD
(
context
->
Ebx
);
FARPROC16
lpfn
=
(
FARPROC16
)
MAKESEGPTR
(
context
->
SegCs
,
context
->
Eip
);
...
...
dlls/krnl386.exe16/fpu.c
View file @
1b260438
...
...
@@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(int);
* The actual work is done by a single routine.
*/
static
void
FPU_ModifyCode
(
CONTEXT
86
*
context
,
BYTE
Opcode
);
static
void
FPU_ModifyCode
(
CONTEXT
*
context
,
BYTE
Opcode
);
/**********************************************************************
...
...
@@ -40,7 +40,7 @@ static void FPU_ModifyCode(CONTEXT86 *context, BYTE Opcode);
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int34Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int34Handler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x34 called-- FP opcode 0xd8
\n
"
);
FPU_ModifyCode
(
context
,
0xd8
);
...
...
@@ -55,7 +55,7 @@ void WINAPI DOSVM_Int34Handler(CONTEXT86 *context)
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int35Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int35Handler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x35 called-- FP opcode 0xd9
\n
"
);
FPU_ModifyCode
(
context
,
0xd9
);
...
...
@@ -70,7 +70,7 @@ void WINAPI DOSVM_Int35Handler(CONTEXT86 *context)
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int36Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int36Handler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x36 called-- FP opcode 0xda
\n
"
);
FPU_ModifyCode
(
context
,
0xda
);
...
...
@@ -85,7 +85,7 @@ void WINAPI DOSVM_Int36Handler(CONTEXT86 *context)
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int37Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int37Handler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x37 called-- FP opcode 0xdb
\n
"
);
FPU_ModifyCode
(
context
,
0xdb
);
...
...
@@ -103,7 +103,7 @@ void WINAPI DOSVM_Int37Handler(CONTEXT86 *context)
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int38Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int38Handler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x38 called-- FP opcode 0xdc
\n
"
);
FPU_ModifyCode
(
context
,
0xdc
);
...
...
@@ -118,7 +118,7 @@ void WINAPI DOSVM_Int38Handler(CONTEXT86 *context)
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int39Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int39Handler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x39 called-- FP opcode 0xdd
\n
"
);
FPU_ModifyCode
(
context
,
0xdd
);
...
...
@@ -133,7 +133,7 @@ void WINAPI DOSVM_Int39Handler(CONTEXT86 *context)
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int3aHandler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int3aHandler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x3a called-- FP opcode 0xde
\n
"
);
FPU_ModifyCode
(
context
,
0xde
);
...
...
@@ -148,7 +148,7 @@ void WINAPI DOSVM_Int3aHandler(CONTEXT86 *context)
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
DOSVM_Int3bHandler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int3bHandler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x3b called-- FP opcode 0xdf
\n
"
);
FPU_ModifyCode
(
context
,
0xdf
);
...
...
@@ -171,7 +171,7 @@ void WINAPI DOSVM_Int3bHandler(CONTEXT86 *context)
*
* 11011xxx should be the opcode instruction.
*/
void
WINAPI
DOSVM_Int3cHandler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int3cHandler
(
CONTEXT
*
context
)
{
FIXME
(
"Int 3C NOT Implemented
\n
"
);
INT_BARF
(
context
,
0x3c
);
...
...
@@ -185,7 +185,7 @@ void WINAPI DOSVM_Int3cHandler(CONTEXT86 *context)
*
* Opcode 0x90 is a NOP. It just fills space where the 3D was.
*/
void
WINAPI
DOSVM_Int3dHandler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int3dHandler
(
CONTEXT
*
context
)
{
TRACE
(
"Int 0x3d called-- Standalone FWAIT
\n
"
);
FPU_ModifyCode
(
context
,
0x90
);
...
...
@@ -203,7 +203,7 @@ void WINAPI DOSVM_Int3dHandler(CONTEXT86 *context)
* Direct access 4.0 modifies and does not restore this vector.
*
*/
void
WINAPI
DOSVM_Int3eHandler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int3eHandler
(
CONTEXT
*
context
)
{
FIXME
(
"Int 3E NOT Implemented
\n
"
);
INT_BARF
(
context
,
0x3e
);
...
...
@@ -219,7 +219,7 @@ void WINAPI DOSVM_Int3eHandler(CONTEXT86 *context)
*
* Code thanks to Ove Kaaven
*/
static
void
FPU_ModifyCode
(
CONTEXT
86
*
context
,
BYTE
Opcode
)
static
void
FPU_ModifyCode
(
CONTEXT
*
context
,
BYTE
Opcode
)
{
BYTE
*
code
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegCs
,
context
->
Eip
);
...
...
dlls/krnl386.exe16/global.c
View file @
1b260438
...
...
@@ -561,8 +561,7 @@ BOOL16 WINAPI GlobalUnlock16(
* *all* registers, even AX/DX !
*
*/
void
WINAPI
GlobalChangeLockCount16
(
HGLOBAL16
handle
,
INT16
delta
,
CONTEXT86
*
context
)
void
WINAPI
GlobalChangeLockCount16
(
HGLOBAL16
handle
,
INT16
delta
,
CONTEXT
*
context
)
{
if
(
delta
==
1
)
GlobalLock16
(
handle
);
...
...
dlls/krnl386.exe16/instr.c
View file @
1b260438
...
...
@@ -44,7 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(io);
#define ADD_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val)))
#define ISV86(context) ((context)->EFlags & 0x00020000)
static
inline
void
add_stack
(
CONTEXT
86
*
context
,
int
offset
)
static
inline
void
add_stack
(
CONTEXT
*
context
,
int
offset
)
{
if
(
ISV86
(
context
)
||
!
IS_SELECTOR_32BIT
(
context
->
SegSs
))
ADD_LOWORD
(
context
->
Esp
,
offset
);
...
...
@@ -52,7 +52,7 @@ static inline void add_stack( CONTEXT86 *context, int offset )
context
->
Esp
+=
offset
;
}
static
inline
void
*
make_ptr
(
CONTEXT
86
*
context
,
DWORD
seg
,
DWORD
off
,
int
long_addr
)
static
inline
void
*
make_ptr
(
CONTEXT
*
context
,
DWORD
seg
,
DWORD
off
,
int
long_addr
)
{
if
(
ISV86
(
context
))
return
(
void
*
)((
seg
<<
4
)
+
LOWORD
(
off
));
if
(
wine_ldt_is_system
(
seg
))
return
(
void
*
)
off
;
...
...
@@ -60,7 +60,7 @@ static inline void *make_ptr( CONTEXT86 *context, DWORD seg, DWORD off, int long
return
(
char
*
)
MapSL
(
MAKESEGPTR
(
seg
,
0
)
)
+
off
;
}
static
inline
void
*
get_stack
(
CONTEXT
86
*
context
)
static
inline
void
*
get_stack
(
CONTEXT
*
context
)
{
if
(
ISV86
(
context
))
return
(
void
*
)((
context
->
SegSs
<<
4
)
+
LOWORD
(
context
->
Esp
));
return
wine_ldt_get_ptr
(
context
->
SegSs
,
context
->
Esp
);
...
...
@@ -100,7 +100,7 @@ static inline struct idtr get_idtr(void)
*
* See Undocumented Windows, Chapter 5, __0040.
*/
static
BOOL
INSTR_ReplaceSelector
(
CONTEXT
86
*
context
,
WORD
*
sel
)
static
BOOL
INSTR_ReplaceSelector
(
CONTEXT
*
context
,
WORD
*
sel
)
{
if
(
*
sel
==
0x40
)
{
...
...
@@ -113,7 +113,7 @@ static BOOL INSTR_ReplaceSelector( CONTEXT86 *context, WORD *sel )
/* store an operand into a register */
static
void
store_reg
(
CONTEXT
86
*
context
,
BYTE
regmodrm
,
const
BYTE
*
addr
,
int
long_op
)
static
void
store_reg
(
CONTEXT
*
context
,
BYTE
regmodrm
,
const
BYTE
*
addr
,
int
long_op
)
{
switch
((
regmodrm
>>
3
)
&
7
)
{
...
...
@@ -157,7 +157,7 @@ static void store_reg( CONTEXT86 *context, BYTE regmodrm, const BYTE *addr, int
*
* Return the address of an instruction operand (from the mod/rm byte).
*/
static
BYTE
*
INSTR_GetOperandAddr
(
CONTEXT
86
*
context
,
BYTE
*
instr
,
static
BYTE
*
INSTR_GetOperandAddr
(
CONTEXT
*
context
,
BYTE
*
instr
,
int
long_addr
,
int
segprefix
,
int
*
len
)
{
int
mod
,
rm
,
base
=
0
,
index
=
0
,
ss
=
0
,
seg
=
0
,
off
;
...
...
@@ -317,7 +317,7 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT86 *context, BYTE *instr,
*
* Emulate the LDS (and LES,LFS,etc.) instruction.
*/
static
BOOL
INSTR_EmulateLDS
(
CONTEXT
86
*
context
,
BYTE
*
instr
,
int
long_op
,
static
BOOL
INSTR_EmulateLDS
(
CONTEXT
*
context
,
BYTE
*
instr
,
int
long_op
,
int
long_addr
,
int
segprefix
,
int
*
len
)
{
WORD
seg
;
...
...
@@ -361,7 +361,7 @@ static BOOL INSTR_EmulateLDS( CONTEXT86 *context, BYTE *instr, int long_op,
*
* input on an I/O port
*/
static
DWORD
INSTR_inport
(
WORD
port
,
int
size
,
CONTEXT
86
*
context
)
static
DWORD
INSTR_inport
(
WORD
port
,
int
size
,
CONTEXT
*
context
)
{
DWORD
res
=
DOSVM_inport
(
port
,
size
);
...
...
@@ -392,7 +392,7 @@ static DWORD INSTR_inport( WORD port, int size, CONTEXT86 *context )
*
* output on an I/O port
*/
static
void
INSTR_outport
(
WORD
port
,
int
size
,
DWORD
val
,
CONTEXT
86
*
context
)
static
void
INSTR_outport
(
WORD
port
,
int
size
,
DWORD
val
,
CONTEXT
*
context
)
{
DOSVM_outport
(
port
,
size
,
val
);
...
...
@@ -423,7 +423,7 @@ static void INSTR_outport( WORD port, int size, DWORD val, CONTEXT86 *context )
* Emulate a privileged instruction.
* Returns exception continuation status.
*/
DWORD
__wine_emulate_instruction
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
86
*
context
)
DWORD
__wine_emulate_instruction
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
{
int
prefix
,
segprefix
,
prefixlen
,
len
,
repX
,
long_op
,
long_addr
;
BYTE
*
instr
;
...
...
@@ -865,7 +865,7 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context )
LONG
CALLBACK
INSTR_vectored_handler
(
EXCEPTION_POINTERS
*
ptrs
)
{
EXCEPTION_RECORD
*
record
=
ptrs
->
ExceptionRecord
;
CONTEXT
86
*
context
=
ptrs
->
ContextRecord
;
CONTEXT
*
context
=
ptrs
->
ContextRecord
;
if
(
wine_ldt_is_system
(
context
->
SegCs
)
&&
(
record
->
ExceptionCode
==
EXCEPTION_ACCESS_VIOLATION
||
...
...
@@ -881,7 +881,7 @@ LONG CALLBACK INSTR_vectored_handler( EXCEPTION_POINTERS *ptrs )
/***********************************************************************
* DOS3Call (KERNEL.102)
*/
void
WINAPI
DOS3Call
(
CONTEXT
86
*
context
)
void
WINAPI
DOS3Call
(
CONTEXT
*
context
)
{
__wine_call_int_handler
(
context
,
0x21
);
}
...
...
@@ -890,7 +890,7 @@ void WINAPI DOS3Call( CONTEXT86 *context )
/***********************************************************************
* NetBIOSCall (KERNEL.103)
*/
void
WINAPI
NetBIOSCall16
(
CONTEXT
86
*
context
)
void
WINAPI
NetBIOSCall16
(
CONTEXT
*
context
)
{
__wine_call_int_handler
(
context
,
0x5c
);
}
...
...
dlls/krnl386.exe16/int09.c
View file @
1b260438
...
...
@@ -147,7 +147,7 @@ static void DOSVM_Int09UpdateKbdStatusFlags(BYTE scan, BOOL extended, BIOSDATA *
* See http://www.execpc.com/~geezer/osd/kbd/ for a very good description
* of keyboard mapping modes.
*/
void
WINAPI
DOSVM_Int09Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int09Handler
(
CONTEXT
*
context
)
{
BIOSDATA
*
data
=
DOSVM_BiosData
();
BYTE
ascii
,
scan
=
DOSVM_Int09ReadScan
(
&
ascii
);
...
...
@@ -210,7 +210,7 @@ void WINAPI DOSVM_Int09Handler( CONTEXT86 *context )
DOSVM_AcknowledgeIRQ
(
context
);
}
static
void
KbdRelay
(
CONTEXT
86
*
context
,
void
*
data
)
static
void
KbdRelay
(
CONTEXT
*
context
,
void
*
data
)
{
if
(
kbdinfo
.
queuelen
)
{
/* cleanup operation, called from DOSVM_PIC_ioport_out:
...
...
dlls/krnl386.exe16/int10.c
View file @
1b260438
...
...
@@ -812,7 +812,7 @@ static void INT10_InitializeVideoMode( BIOSDATA *data )
*
* Handler for VESA functions (int10 function 0x4f).
*/
static
void
INT10_HandleVESA
(
CONTEXT
86
*
context
)
static
void
INT10_HandleVESA
(
CONTEXT
*
context
)
{
BIOSDATA
*
data
=
DOSVM_BiosData
();
...
...
@@ -977,7 +977,7 @@ static void INT10_HandleVESA( CONTEXT86 *context )
*
* Added additional vga graphic support - 3/99
*/
void
WINAPI
DOSVM_Int10Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int10Handler
(
CONTEXT
*
context
)
{
BIOSDATA
*
data
=
DOSVM_BiosData
();
...
...
dlls/krnl386.exe16/int13.c
View file @
1b260438
...
...
@@ -58,7 +58,7 @@ static BYTE INT13_last_status;
* Despite what Ralf Brown says, at least functions 0x06 and 0x07
* seem to set carry, too.
*/
static
void
INT13_SetStatus
(
CONTEXT
86
*
context
,
BYTE
status
)
static
void
INT13_SetStatus
(
CONTEXT
*
context
,
BYTE
status
)
{
INT13_last_status
=
status
;
...
...
@@ -76,7 +76,7 @@ static void INT13_SetStatus( CONTEXT86 *context, BYTE status )
*
* Read floppy disk parameters.
*/
static
void
INT13_ReadFloppyParams
(
CONTEXT
86
*
context
)
static
void
INT13_ReadFloppyParams
(
CONTEXT
*
context
)
{
#ifdef linux
static
const
BYTE
floppy_params
[
2
][
13
]
=
...
...
@@ -184,7 +184,7 @@ static void INT13_ReadFloppyParams( CONTEXT86 *context )
*
* Handler for int 13h (disk I/O).
*/
void
WINAPI
DOSVM_Int13Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int13Handler
(
CONTEXT
*
context
)
{
TRACE
(
"AH=%02x
\n
"
,
AH_reg
(
context
)
);
...
...
dlls/krnl386.exe16/int15.c
View file @
1b260438
...
...
@@ -31,7 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(int);
*
* Handler for int 15h
*/
void
WINAPI
DOSVM_Int15Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int15Handler
(
CONTEXT
*
context
)
{
switch
(
AH_reg
(
context
))
{
...
...
dlls/krnl386.exe16/int16.c
View file @
1b260438
...
...
@@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(int);
* not currently listed here.
*/
void
WINAPI
DOSVM_Int16Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int16Handler
(
CONTEXT
*
context
)
{
BIOSDATA
*
data
=
NULL
;
BYTE
ascii
,
scan
;
...
...
@@ -160,7 +160,7 @@ void WINAPI DOSVM_Int16Handler( CONTEXT86 *context )
* Return value will always be TRUE and returned keystroke will be
* removed from buffer.
*/
int
DOSVM_Int16ReadChar
(
BYTE
*
ascii
,
BYTE
*
scan
,
CONTEXT
86
*
waitctx
)
int
DOSVM_Int16ReadChar
(
BYTE
*
ascii
,
BYTE
*
scan
,
CONTEXT
*
waitctx
)
{
BIOSDATA
*
data
=
DOSVM_BiosData
();
WORD
CurOfs
=
data
->
NextKbdCharPtr
;
...
...
dlls/krnl386.exe16/int21.c
View file @
1b260438
This diff is collapsed.
Click to expand it.
dlls/krnl386.exe16/int25.c
View file @
1b260438
...
...
@@ -80,7 +80,7 @@ BOOL DOSVM_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL f
*
* Handler for int 25h (absolute disk read).
*/
void
WINAPI
DOSVM_Int25Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int25Handler
(
CONTEXT
*
context
)
{
WCHAR
drivespec
[
4
]
=
{
'A'
,
':'
,
'\\'
,
0
};
BYTE
*
dataptr
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Ebx
);
...
...
dlls/krnl386.exe16/int26.c
View file @
1b260438
...
...
@@ -69,7 +69,7 @@ BOOL DOSVM_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL
*
* Handler for int 26h (absolute disk write).
*/
void
WINAPI
DOSVM_Int26Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int26Handler
(
CONTEXT
*
context
)
{
WCHAR
drivespec
[
4
]
=
{
'A'
,
':'
,
'\\'
,
0
};
BYTE
*
dataptr
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Ebx
);
...
...
dlls/krnl386.exe16/int2f.c
View file @
1b260438
...
...
@@ -60,15 +60,15 @@ typedef struct
WORD
cdrom_selector
;
/* Protected mode selector for CDROM_HEAP */
}
CDROM_HEAP
;
static
void
do_int2f_16
(
CONTEXT
86
*
context
);
static
void
MSCDEX_Handler
(
CONTEXT
86
*
context
);
static
void
do_int2f_16
(
CONTEXT
*
context
);
static
void
MSCDEX_Handler
(
CONTEXT
*
context
);
/**********************************************************************
* DOSVM_Int2fHandler
*
* Handler for int 2fh (multiplex).
*/
void
WINAPI
DOSVM_Int2fHandler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int2fHandler
(
CONTEXT
*
context
)
{
TRACE
(
"Subfunction 0x%X
\n
"
,
AX_reg
(
context
));
...
...
@@ -320,7 +320,7 @@ void WINAPI DOSVM_Int2fHandler( CONTEXT86 *context )
/**********************************************************************
* do_int2f_16
*/
static
void
do_int2f_16
(
CONTEXT
86
*
context
)
static
void
do_int2f_16
(
CONTEXT
*
context
)
{
DWORD
addr
;
...
...
@@ -949,7 +949,7 @@ static void MSCDEX_Request(BYTE *driver_request, BOOL dorealmode)
MSCDEX_Dump
(
"End"
,
driver_request
,
dorealmode
);
}
static
void
MSCDEX_Handler
(
CONTEXT
86
*
context
)
static
void
MSCDEX_Handler
(
CONTEXT
*
context
)
{
int
drive
,
count
;
char
*
p
;
...
...
@@ -1044,8 +1044,8 @@ static void MSCDEX_Handler(CONTEXT86* context)
}
/* prototypes */
static
void
WINAPI
cdrom_strategy
(
CONTEXT
86
*
ctx
);
static
void
WINAPI
cdrom_interrupt
(
CONTEXT
86
*
ctx
);
static
void
WINAPI
cdrom_strategy
(
CONTEXT
*
ctx
);
static
void
WINAPI
cdrom_interrupt
(
CONTEXT
*
ctx
);
/* device info */
static
const
WINEDEV
cdromdev
=
...
...
@@ -1058,7 +1058,7 @@ static const WINEDEV cdromdev =
static
REQUEST_HEADER
*
cdrom_driver_request
;
/* Return to caller */
static
void
do_lret
(
CONTEXT
86
*
ctx
)
static
void
do_lret
(
CONTEXT
*
ctx
)
{
WORD
*
stack
=
CTX_SEG_OFF_TO_LIN
(
ctx
,
ctx
->
SegSs
,
ctx
->
Esp
);
...
...
@@ -1067,13 +1067,13 @@ static void do_lret(CONTEXT86*ctx)
ctx
->
Esp
+=
2
*
sizeof
(
WORD
);
}
static
void
WINAPI
cdrom_strategy
(
CONTEXT
86
*
ctx
)
static
void
WINAPI
cdrom_strategy
(
CONTEXT
*
ctx
)
{
cdrom_driver_request
=
CTX_SEG_OFF_TO_LIN
(
ctx
,
ctx
->
SegEs
,
ctx
->
Ebx
);
do_lret
(
ctx
);
}
static
void
WINAPI
cdrom_interrupt
(
CONTEXT
86
*
ctx
)
static
void
WINAPI
cdrom_interrupt
(
CONTEXT
*
ctx
)
{
if
(
cdrom_driver_request
->
unit
>
CDROM_GetHeap
()
->
hdr
.
units
)
cdrom_driver_request
->
status
=
STAT_ERROR
|
1
;
/* unknown unit */
...
...
dlls/krnl386.exe16/int31.c
View file @
1b260438
...
...
@@ -151,7 +151,7 @@ static LONG WINAPI dpmi_exception_handler(EXCEPTION_POINTERS *eptr)
/**********************************************************************
* INT_GetRealModeContext
*/
static
void
INT_GetRealModeContext
(
REALMODECALL
*
call
,
CONTEXT
86
*
context
)
static
void
INT_GetRealModeContext
(
REALMODECALL
*
call
,
CONTEXT
*
context
)
{
context
->
Eax
=
call
->
eax
;
context
->
Ebx
=
call
->
ebx
;
...
...
@@ -175,7 +175,7 @@ static void INT_GetRealModeContext( REALMODECALL *call, CONTEXT86 *context )
/**********************************************************************
* INT_SetRealModeContext
*/
static
void
INT_SetRealModeContext
(
REALMODECALL
*
call
,
CONTEXT
86
*
context
)
static
void
INT_SetRealModeContext
(
REALMODECALL
*
call
,
CONTEXT
*
context
)
{
call
->
eax
=
context
->
Eax
;
call
->
ebx
=
context
->
Ebx
;
...
...
@@ -376,7 +376,7 @@ __ASM_GLOBAL_FUNC(DPMI_CallRMCB32,
*
* This routine does the hard work of calling a callback procedure.
*/
static
void
DPMI_CallRMCBProc
(
CONTEXT
86
*
context
,
RMCB
*
rmcb
,
WORD
flag
)
static
void
DPMI_CallRMCBProc
(
CONTEXT
*
context
,
RMCB
*
rmcb
,
WORD
flag
)
{
DWORD
old_vif
=
get_vm86_teb_info
()
->
dpmi_vif
;
...
...
@@ -408,7 +408,7 @@ static void DPMI_CallRMCBProc( CONTEXT86 *context, RMCB *rmcb, WORD flag )
DPMI_CallRMCB32
(
rmcb
,
ss
,
esp
,
&
es
,
&
edi
);
}
else
{
/* 16-bit DPMI client */
CONTEXT
86
ctx
=
*
context
;
CONTEXT
ctx
=
*
context
;
ctx
.
SegCs
=
rmcb
->
proc_sel
;
ctx
.
Eip
=
rmcb
->
proc_ofs
;
ctx
.
SegDs
=
ss
;
...
...
@@ -434,7 +434,7 @@ static void DPMI_CallRMCBProc( CONTEXT86 *context, RMCB *rmcb, WORD flag )
*
* This routine does the hard work of calling a real mode procedure.
*/
int
DPMI_CallRMProc
(
CONTEXT
86
*
context
,
LPWORD
stack
,
int
args
,
int
iret
)
int
DPMI_CallRMProc
(
CONTEXT
*
context
,
LPWORD
stack
,
int
args
,
int
iret
)
{
LPWORD
stack16
;
LPVOID
addr
=
NULL
;
/* avoid gcc warning */
...
...
@@ -540,9 +540,9 @@ callrmproc_again:
/**********************************************************************
* CallRMInt
*/
static
void
DOSVM_CallRMInt
(
CONTEXT
86
*
context
)
static
void
DOSVM_CallRMInt
(
CONTEXT
*
context
)
{
CONTEXT
86
realmode_ctx
;
CONTEXT
realmode_ctx
;
FARPROC16
rm_int
=
DOSVM_GetRMHandler
(
BL_reg
(
context
)
);
REALMODECALL
*
call
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegEs
,
...
...
@@ -569,12 +569,12 @@ static void DOSVM_CallRMInt( CONTEXT86 *context )
/**********************************************************************
* CallRMProc
*/
static
void
DOSVM_CallRMProc
(
CONTEXT
86
*
context
,
int
iret
)
static
void
DOSVM_CallRMProc
(
CONTEXT
*
context
,
int
iret
)
{
REALMODECALL
*
p
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegEs
,
context
->
Edi
);
CONTEXT
86
context16
;
CONTEXT
context16
;
TRACE
(
"RealModeCall: EAX=%08x EBX=%08x ECX=%08x EDX=%08x
\n
"
,
p
->
eax
,
p
->
ebx
,
p
->
ecx
,
p
->
edx
);
...
...
@@ -595,10 +595,10 @@ static void DOSVM_CallRMProc( CONTEXT86 *context, int iret )
/* (see dosmem.c, function DOSMEM_InitDPMI) */
static
void
StartPM
(
CONTEXT
86
*
context
)
static
void
StartPM
(
CONTEXT
*
context
)
{
UINT16
cs
,
ss
,
ds
,
es
;
CONTEXT
86
pm_ctx
;
CONTEXT
pm_ctx
;
DWORD
psp_ofs
=
(
DWORD
)(
DOSVM_psp
<<
4
);
PDB16
*
psp
=
(
PDB16
*
)
psp_ofs
;
HANDLE16
env_seg
=
psp
->
environment
;
...
...
@@ -731,9 +731,9 @@ static int DPMI_FreeRMCB( DWORD address )
*
* DPMI Raw Mode Switch handler
*/
void
WINAPI
DOSVM_RawModeSwitchHandler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_RawModeSwitchHandler
(
CONTEXT
*
context
)
{
CONTEXT
86
rm_ctx
;
CONTEXT
rm_ctx
;
int
ret
;
/* initialize real-mode context as per spec */
...
...
@@ -792,7 +792,7 @@ void WINAPI DOSVM_RawModeSwitchHandler( CONTEXT86 *context )
/**********************************************************************
* AllocRMCB
*/
static
void
DOSVM_AllocRMCB
(
CONTEXT
86
*
context
)
static
void
DOSVM_AllocRMCB
(
CONTEXT
*
context
)
{
RMCB
*
NewRMCB
=
DPMI_AllocRMCB
();
...
...
@@ -818,7 +818,7 @@ static void DOSVM_AllocRMCB( CONTEXT86 *context )
/**********************************************************************
* FreeRMCB
*/
static
void
DOSVM_FreeRMCB
(
CONTEXT
86
*
context
)
static
void
DOSVM_FreeRMCB
(
CONTEXT
*
context
)
{
FIXME
(
"callback address: %04x:%04x
\n
"
,
CX_reg
(
context
),
DX_reg
(
context
));
...
...
@@ -839,7 +839,7 @@ static BYTE * XMS_Offset( MOVEOFS *ofs )
/**********************************************************************
* XMS_Handler
*/
static
void
XMS_Handler
(
CONTEXT
86
*
context
)
static
void
XMS_Handler
(
CONTEXT
*
context
)
{
switch
(
AH_reg
(
context
))
{
...
...
@@ -920,7 +920,7 @@ static void XMS_Handler( CONTEXT86 *context )
*
* Check if this was really a wrapper call instead of an interrupt.
*/
BOOL
DOSVM_CheckWrappers
(
CONTEXT
86
*
context
)
BOOL
DOSVM_CheckWrappers
(
CONTEXT
*
context
)
{
if
(
context
->
SegCs
==
DOSVM_dpmi_segments
->
dpmi_seg
)
{
/* This is the protected mode switch */
...
...
@@ -956,7 +956,7 @@ BOOL DOSVM_CheckWrappers( CONTEXT86 *context )
*
* Handler for int 31h (DPMI).
*/
void
WINAPI
DOSVM_Int31Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int31Handler
(
CONTEXT
*
context
)
{
RESET_CFLAG
(
context
);
switch
(
AX_reg
(
context
))
...
...
dlls/krnl386.exe16/int33.c
View file @
1b260438
...
...
@@ -50,7 +50,7 @@ static struct
* - subfunction 0x00 (reset mouse)
* - subfunction 0x21 (software reset)
*/
static
void
INT33_ResetMouse
(
CONTEXT
86
*
context
)
static
void
INT33_ResetMouse
(
CONTEXT
*
context
)
{
memset
(
&
mouse_info
,
0
,
sizeof
(
mouse_info
)
);
...
...
@@ -75,7 +75,7 @@ static void INT33_ResetMouse( CONTEXT86 *context )
*
* Handler for int 33h (MS MOUSE).
*/
void
WINAPI
DOSVM_Int33Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int33Handler
(
CONTEXT
*
context
)
{
switch
(
AX_reg
(
context
))
{
...
...
@@ -199,10 +199,10 @@ typedef struct {
WORD
mask
,
but
,
x
,
y
,
mx
,
my
;
}
MCALLDATA
;
static
void
MouseRelay
(
CONTEXT
86
*
context
,
void
*
mdata
)
static
void
MouseRelay
(
CONTEXT
*
context
,
void
*
mdata
)
{
MCALLDATA
*
data
=
mdata
;
CONTEXT
86
ctx
=
*
context
;
CONTEXT
ctx
=
*
context
;
if
(
!
ISV86
(
&
ctx
))
{
...
...
dlls/krnl386.exe16/int67.c
View file @
1b260438
...
...
@@ -109,7 +109,7 @@ static void EMS_init(void)
*
* Get handle and allocate memory.
*/
static
void
EMS_alloc
(
CONTEXT
86
*
context
)
static
void
EMS_alloc
(
CONTEXT
*
context
)
{
int
hindex
=
1
;
/* handle zero is reserved for system */
...
...
@@ -140,7 +140,7 @@ static void EMS_alloc( CONTEXT86 *context )
*
* Get/set handle name.
*/
static
void
EMS_access_name
(
CONTEXT
86
*
context
)
static
void
EMS_access_name
(
CONTEXT
*
context
)
{
char
*
ptr
;
int
hindex
=
DX_reg
(
context
);
...
...
@@ -220,7 +220,7 @@ static BYTE EMS_map( WORD physical_page, WORD new_hindex, WORD new_logical_page
*
* Map multiple logical pages into physical pages.
*/
static
void
EMS_map_multiple
(
CONTEXT
86
*
context
)
static
void
EMS_map_multiple
(
CONTEXT
*
context
)
{
WORD
*
ptr
=
PTR_REAL_TO_LIN
(
context
->
SegDs
,
SI_reg
(
context
));
BYTE
status
=
0
;
...
...
@@ -248,7 +248,7 @@ static void EMS_map_multiple( CONTEXT86 *context )
*
* Free memory and release handle.
*/
static
void
EMS_free
(
CONTEXT
86
*
context
)
static
void
EMS_free
(
CONTEXT
*
context
)
{
int
hindex
=
DX_reg
(
context
);
int
i
;
...
...
@@ -282,7 +282,7 @@ static void EMS_free( CONTEXT86 *context )
*
* Save physical page mappings into handle specific save area.
*/
static
void
EMS_save_context
(
CONTEXT
86
*
context
)
static
void
EMS_save_context
(
CONTEXT
*
context
)
{
WORD
h
=
DX_reg
(
context
);
int
i
;
...
...
@@ -301,7 +301,7 @@ static void EMS_save_context( CONTEXT86 *context )
*
* Restore physical page mappings from handle specific save area.
*/
static
void
EMS_restore_context
(
CONTEXT
86
*
context
)
static
void
EMS_restore_context
(
CONTEXT
*
context
)
{
WORD
handle
=
DX_reg
(
context
);
int
i
;
...
...
@@ -324,7 +324,7 @@ static void EMS_restore_context( CONTEXT86 *context )
*
* Handler for interrupt 67h EMS routines.
*/
void
WINAPI
DOSVM_Int67Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int67Handler
(
CONTEXT
*
context
)
{
switch
AH_reg
(
context
)
{
...
...
@@ -461,7 +461,7 @@ void WINAPI DOSVM_Int67Handler( CONTEXT86 *context )
*
* Handler for interrupt 21h IOCTL routine for device "EMMXXXX0".
*/
void
EMS_Ioctl_Handler
(
CONTEXT
86
*
context
)
void
EMS_Ioctl_Handler
(
CONTEXT
*
context
)
{
assert
(
AH_reg
(
context
)
==
0x44
);
...
...
dlls/krnl386.exe16/interrupts.c
View file @
1b260438
...
...
@@ -34,18 +34,18 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
#define BCD_TO_BIN(x) ((x&15) + (x>>4)*10)
#define BIN_TO_BCD(x) ((x%10) + ((x/10)<<4))
static
void
WINAPI
DOSVM_Int11Handler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int12Handler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int17Handler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int19Handler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int1aHandler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int20Handler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int29Handler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int2aHandler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int41Handler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int4bHandler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int5cHandler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_DefaultHandler
(
CONTEXT
86
*
);
static
void
WINAPI
DOSVM_Int11Handler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int12Handler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int17Handler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int19Handler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int1aHandler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int20Handler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int29Handler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int2aHandler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int41Handler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int4bHandler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_Int5cHandler
(
CONTEXT
*
);
static
void
WINAPI
DOSVM_DefaultHandler
(
CONTEXT
*
);
static
FARPROC16
DOSVM_Vectors16
[
256
];
static
FARPROC48
DOSVM_Vectors48
[
256
];
...
...
@@ -133,7 +133,7 @@ static BOOL DOSVM_IsIRQ( BYTE intnum )
* Default interrupt handler. This will be used to emulate all
* interrupts that don't have their own interrupt handler.
*/
static
void
WINAPI
DOSVM_DefaultHandler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_DefaultHandler
(
CONTEXT
*
context
)
{
}
...
...
@@ -165,7 +165,7 @@ static INTPROC DOSVM_GetBuiltinHandler( BYTE intnum )
*
* Simple DOSRELAY that interprets its argument as INTPROC and calls it.
*/
static
void
DOSVM_IntProcRelay
(
CONTEXT
86
*
context
,
LPVOID
data
)
static
void
DOSVM_IntProcRelay
(
CONTEXT
*
context
,
LPVOID
data
)
{
INTPROC
proc
=
(
INTPROC
)
data
;
proc
(
context
);
...
...
@@ -176,7 +176,7 @@ static void DOSVM_IntProcRelay( CONTEXT86 *context, LPVOID data )
* DOSVM_PrepareIRQ
*
*/
static
void
DOSVM_PrepareIRQ
(
CONTEXT
86
*
context
,
BOOL
isbuiltin
)
static
void
DOSVM_PrepareIRQ
(
CONTEXT
*
context
,
BOOL
isbuiltin
)
{
/* Disable virtual interrupts. */
get_vm86_teb_info
()
->
dpmi_vif
=
0
;
...
...
@@ -207,7 +207,7 @@ static void DOSVM_PrepareIRQ( CONTEXT86 *context, BOOL isbuiltin )
* so that it actually contains two copies of eflags, one of which is
* popped during return from interrupt handler.
*/
static
void
DOSVM_PushFlags
(
CONTEXT
86
*
context
,
BOOL
islong
,
BOOL
isstub
)
static
void
DOSVM_PushFlags
(
CONTEXT
*
context
,
BOOL
islong
,
BOOL
isstub
)
{
if
(
islong
)
{
...
...
@@ -259,7 +259,7 @@ static void DOSVM_PushFlags( CONTEXT86 *context, BOOL islong, BOOL isstub )
* Pushes interrupt frame to stack and changes instruction
* pointer to interrupt handler.
*/
BOOL
DOSVM_EmulateInterruptPM
(
CONTEXT
86
*
context
,
BYTE
intnum
)
BOOL
DOSVM_EmulateInterruptPM
(
CONTEXT
*
context
,
BYTE
intnum
)
{
TRACE_
(
relay
)(
"Call DOS int 0x%02x ret=%04x:%08x
\n
"
" eax=%08x ebx=%08x ecx=%08x edx=%08x
\n
"
...
...
@@ -351,7 +351,7 @@ BOOL DOSVM_EmulateInterruptPM( CONTEXT86 *context, BYTE intnum )
* Pushes interrupt frame to stack and changes instruction
* pointer to interrupt handler.
*/
void
DOSVM_HardwareInterruptPM
(
CONTEXT
86
*
context
,
BYTE
intnum
)
void
DOSVM_HardwareInterruptPM
(
CONTEXT
*
context
,
BYTE
intnum
)
{
if
(
DOSVM_IsDos32
())
{
...
...
@@ -448,7 +448,7 @@ void DOSVM_HardwareInterruptPM( CONTEXT86 *context, BYTE intnum )
* Returns FALSE if this interrupt was caused by return
* from real mode wrapper.
*/
BOOL
DOSVM_EmulateInterruptRM
(
CONTEXT
86
*
context
,
BYTE
intnum
)
BOOL
DOSVM_EmulateInterruptRM
(
CONTEXT
*
context
,
BYTE
intnum
)
{
TRACE_
(
relay
)(
"Call DOS int 0x%02x ret=%04x:%08x
\n
"
" eax=%08x ebx=%08x ecx=%08x edx=%08x
\n
"
...
...
@@ -508,7 +508,7 @@ BOOL DOSVM_EmulateInterruptRM( CONTEXT86 *context, BYTE intnum )
* Either calls directly builtin handler or pushes interrupt frame to
* stack and changes instruction pointer to interrupt handler.
*/
void
DOSVM_HardwareInterruptRM
(
CONTEXT
86
*
context
,
BYTE
intnum
)
void
DOSVM_HardwareInterruptRM
(
CONTEXT
*
context
,
BYTE
intnum
)
{
FARPROC16
handler
=
DOSVM_GetRMHandler
(
intnum
);
...
...
@@ -703,7 +703,7 @@ void DOSVM_SetPMHandler48( BYTE intnum, FARPROC48 handler )
*
* Execute Wine interrupt handler procedure.
*/
void
DOSVM_CallBuiltinHandler
(
CONTEXT
86
*
context
,
BYTE
intnum
)
void
DOSVM_CallBuiltinHandler
(
CONTEXT
*
context
,
BYTE
intnum
)
{
/*
* FIXME: Make all builtin interrupt calls go via this routine.
...
...
@@ -719,7 +719,7 @@ void DOSVM_CallBuiltinHandler( CONTEXT86 *context, BYTE intnum )
/**********************************************************************
* __wine_call_int_handler (KERNEL.@)
*/
void
__wine_call_int_handler
(
CONTEXT
86
*
context
,
BYTE
intnum
)
void
__wine_call_int_handler
(
CONTEXT
*
context
,
BYTE
intnum
)
{
DOSMEM_InitDosMemory
();
DOSVM_CallBuiltinHandler
(
context
,
intnum
);
...
...
@@ -762,7 +762,7 @@ void __wine_call_int_handler( CONTEXT86 *context, BYTE intnum )
* All *nix systems either have a math processor or
* emulate one.
*/
static
void
WINAPI
DOSVM_Int11Handler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int11Handler
(
CONTEXT
*
context
)
{
int
diskdrives
=
0
;
int
parallelports
=
0
;
...
...
@@ -812,7 +812,7 @@ static void WINAPI DOSVM_Int11Handler( CONTEXT86 *context )
*
* Handler for int 12h (get memory size).
*/
static
void
WINAPI
DOSVM_Int12Handler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int12Handler
(
CONTEXT
*
context
)
{
SET_AX
(
context
,
640
);
}
...
...
@@ -823,7 +823,7 @@ static void WINAPI DOSVM_Int12Handler( CONTEXT86 *context )
*
* Handler for int 17h (printer - output character).
*/
static
void
WINAPI
DOSVM_Int17Handler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int17Handler
(
CONTEXT
*
context
)
{
switch
(
AH_reg
(
context
)
)
{
...
...
@@ -850,7 +850,7 @@ static void WINAPI DOSVM_Int17Handler( CONTEXT86 *context )
*
* Handler for int 19h (Reboot).
*/
static
void
WINAPI
DOSVM_Int19Handler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int19Handler
(
CONTEXT
*
context
)
{
TRACE
(
"Attempted Reboot
\n
"
);
ExitProcess
(
0
);
...
...
@@ -862,7 +862,7 @@ static void WINAPI DOSVM_Int19Handler( CONTEXT86 *context )
*
* Handler for int 1ah.
*/
static
void
WINAPI
DOSVM_Int1aHandler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int1aHandler
(
CONTEXT
*
context
)
{
switch
(
AH_reg
(
context
))
{
...
...
@@ -961,7 +961,7 @@ static void WINAPI DOSVM_Int1aHandler( CONTEXT86 *context )
*
* Handler for int 20h.
*/
static
void
WINAPI
DOSVM_Int20Handler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int20Handler
(
CONTEXT
*
context
)
{
if
(
DOSVM_IsWin16
())
DOSVM_Exit
(
0
);
...
...
@@ -977,7 +977,7 @@ static void WINAPI DOSVM_Int20Handler( CONTEXT86 *context )
*
* Handler for int 29h (fast console output)
*/
static
void
WINAPI
DOSVM_Int29Handler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int29Handler
(
CONTEXT
*
context
)
{
/* Yes, it seems that this is really all this interrupt does. */
DOSVM_PutChar
(
AL_reg
(
context
));
...
...
@@ -989,7 +989,7 @@ static void WINAPI DOSVM_Int29Handler( CONTEXT86 *context )
*
* Handler for int 2ah (network).
*/
static
void
WINAPI
DOSVM_Int2aHandler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int2aHandler
(
CONTEXT
*
context
)
{
switch
(
AH_reg
(
context
))
{
...
...
@@ -1005,7 +1005,7 @@ static void WINAPI DOSVM_Int2aHandler( CONTEXT86 *context )
/***********************************************************************
* DOSVM_Int41Handler
*/
static
void
WINAPI
DOSVM_Int41Handler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int41Handler
(
CONTEXT
*
context
)
{
if
(
ISV86
(
context
)
)
{
...
...
@@ -1049,7 +1049,7 @@ static void WINAPI DOSVM_Int41Handler( CONTEXT86 *context )
* DOSVM_Int4bHandler
*
*/
static
void
WINAPI
DOSVM_Int4bHandler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int4bHandler
(
CONTEXT
*
context
)
{
switch
(
AH_reg
(
context
))
{
...
...
@@ -1071,7 +1071,7 @@ static void WINAPI DOSVM_Int4bHandler( CONTEXT86 *context )
*
* Called from NetBIOSCall16.
*/
static
void
WINAPI
DOSVM_Int5cHandler
(
CONTEXT
86
*
context
)
static
void
WINAPI
DOSVM_Int5cHandler
(
CONTEXT
*
context
)
{
BYTE
*
ptr
;
ptr
=
MapSL
(
MAKESEGPTR
(
context
->
SegEs
,
BX_reg
(
context
))
);
...
...
dlls/krnl386.exe16/kernel16_private.h
View file @
1b260438
...
...
@@ -208,7 +208,7 @@ extern BOOL16 GLOBAL_MoveBlock( HGLOBAL16 handle, void *ptr, DWORD size );
extern
HGLOBAL16
GLOBAL_Alloc
(
WORD
flags
,
DWORD
size
,
HGLOBAL16
hOwner
,
unsigned
char
selflags
);
/* instr.c */
extern
DWORD
__wine_emulate_instruction
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
86
*
context
);
extern
DWORD
__wine_emulate_instruction
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
);
extern
LONG
CALLBACK
INSTR_vectored_handler
(
EXCEPTION_POINTERS
*
ptrs
);
/* ne_module.c */
...
...
@@ -237,7 +237,7 @@ extern void SELECTOR_FreeBlock( WORD sel );
(wine_ldt_is_system(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_32BIT))
/* relay16.c */
extern
int
relay_call_from_16
(
void
*
entry_point
,
unsigned
char
*
args16
,
CONTEXT
86
*
context
);
extern
int
relay_call_from_16
(
void
*
entry_point
,
unsigned
char
*
args16
,
CONTEXT
*
context
);
/* snoop16.c */
extern
void
SNOOP16_RegisterDLL
(
HMODULE16
,
LPCSTR
);
...
...
dlls/krnl386.exe16/ne_module.c
View file @
1b260438
...
...
@@ -1219,7 +1219,7 @@ DWORD NE_StartTask(void)
if
(
hInstance
>=
32
)
{
CONTEXT
86
context
;
CONTEXT
context
;
/* Enter instance handles into task struct */
...
...
@@ -2049,7 +2049,7 @@ HMODULE WINAPI MapHModuleSL(HMODULE16 hmod)
/***************************************************************************
* MapHInstLS (KERNEL.472)
*/
void
WINAPI
MapHInstLS16
(
CONTEXT
86
*
context
)
void
WINAPI
MapHInstLS16
(
CONTEXT
*
context
)
{
context
->
Eax
=
MapHModuleLS
(
(
HMODULE
)
context
->
Eax
);
}
...
...
@@ -2057,7 +2057,7 @@ void WINAPI MapHInstLS16( CONTEXT86 *context )
/***************************************************************************
* MapHInstSL (KERNEL.473)
*/
void
WINAPI
MapHInstSL16
(
CONTEXT
86
*
context
)
void
WINAPI
MapHInstSL16
(
CONTEXT
*
context
)
{
context
->
Eax
=
(
DWORD
)
MapHModuleSL
(
context
->
Eax
);
}
...
...
dlls/krnl386.exe16/ne_segment.c
View file @
1b260438
...
...
@@ -660,7 +660,7 @@ static BOOL NE_InitDLL( NE_MODULE *pModule )
{
SEGTABLEENTRY
*
pSegTable
;
WORD
hInst
,
ds
,
heap
;
CONTEXT
86
context
;
CONTEXT
context
;
pSegTable
=
NE_SEG_TABLE
(
pModule
);
...
...
@@ -787,7 +787,7 @@ static void NE_CallDllEntryPoint( NE_MODULE *pModule, DWORD dwReason )
}
else
{
CONTEXT
86
context
;
CONTEXT
context
;
WORD
args
[
8
];
memset
(
&
context
,
0
,
sizeof
(
context
)
);
...
...
dlls/krnl386.exe16/relay.c
View file @
1b260438
...
...
@@ -338,7 +338,7 @@ __ASM_GLOBAL_FUNC( call_entry_point,
*
* Same as relay_call_from_16 but doesn't print any debug information.
*/
static
int
relay_call_from_16_no_debug
(
void
*
entry_point
,
unsigned
char
*
args16
,
CONTEXT
86
*
context
,
static
int
relay_call_from_16_no_debug
(
void
*
entry_point
,
unsigned
char
*
args16
,
CONTEXT
*
context
,
const
CALLFROM16
*
call
)
{
unsigned
int
i
,
j
,
nb_args
=
0
;
...
...
@@ -432,7 +432,7 @@ static int relay_call_from_16_no_debug( void *entry_point, unsigned char *args16
*
* Replacement for the 16-bit relay functions when relay debugging is on.
*/
int
relay_call_from_16
(
void
*
entry_point
,
unsigned
char
*
args16
,
CONTEXT
86
*
context
)
int
relay_call_from_16
(
void
*
entry_point
,
unsigned
char
*
args16
,
CONTEXT
*
context
)
{
STACK16FRAME
*
frame
;
WORD
ordinal
;
...
...
@@ -620,7 +620,7 @@ static RELAY_Stack16 *RELAY_GetPointer( DWORD offset )
* Note: This might be called from signal handler, so the stack
* allocation algorithm must be signal safe.
*/
static
void
RELAY_MakeShortContext
(
CONTEXT
86
*
context
)
static
void
RELAY_MakeShortContext
(
CONTEXT
*
context
)
{
DWORD
offset
=
offsetof
(
RELAY_Stack16
,
stack_top
);
RELAY_Stack16
*
stack
=
RELAY_GetPointer
(
0
);
...
...
@@ -655,7 +655,7 @@ static void RELAY_MakeShortContext( CONTEXT86 *context )
* This stub is called by __wine_call_from_16_regs in order to marshall
* relay parameters.
*/
static
void
__stdcall
RELAY_RelayStub
(
DOSRELAY
proc
,
unsigned
char
*
args
,
CONTEXT
86
*
context
)
static
void
__stdcall
RELAY_RelayStub
(
DOSRELAY
proc
,
unsigned
char
*
args
,
CONTEXT
*
context
)
{
if
(
proc
)
{
...
...
@@ -691,7 +691,7 @@ static void __stdcall RELAY_RelayStub( DOSRELAY proc, unsigned char *args, CONTE
*
* Restore saved code and stack pointers and release stack block.
*/
void
DOSVM_RelayHandler
(
CONTEXT
86
*
context
)
void
DOSVM_RelayHandler
(
CONTEXT
*
context
)
{
RELAY_Stack16
*
stack
=
RELAY_GetPointer
(
context
->
Esp
);
...
...
@@ -715,7 +715,7 @@ void DOSVM_RelayHandler( CONTEXT86 *context )
* Modifies the context so that return to context calls DOSRELAY and
* only after return from DOSRELAY the original context will be returned to.
*/
void
DOSVM_BuildCallFrame
(
CONTEXT
86
*
context
,
DOSRELAY
relay
,
LPVOID
data
)
void
DOSVM_BuildCallFrame
(
CONTEXT
*
context
,
DOSRELAY
relay
,
LPVOID
data
)
{
WORD
code_sel
=
DOSVM_dpmi_segments
->
relay_code_sel
;
...
...
dlls/krnl386.exe16/snoop.c
View file @
1b260438
...
...
@@ -38,8 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(snoop);
#include "pshpack1.h"
static
void
WINAPI
SNOOP16_Entry
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
86
*
context
);
static
void
WINAPI
SNOOP16_Return
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
86
*
context
);
static
void
WINAPI
SNOOP16_Entry
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
*
context
);
static
void
WINAPI
SNOOP16_Return
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
*
context
);
typedef
struct
tagSNOOP16_FUN
{
/* code part */
...
...
@@ -237,7 +237,7 @@ SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
}
#define CALLER1REF (*(DWORD*)(MapSL( MAKESEGPTR(context->SegSs,LOWORD(context->Esp)+4))))
static
void
WINAPI
SNOOP16_Entry
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
86
*
context
)
{
static
void
WINAPI
SNOOP16_Entry
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
*
context
)
{
DWORD
ordinal
=
0
;
DWORD
entry
=
(
DWORD
)
MapSL
(
MAKESEGPTR
(
context
->
SegCs
,
LOWORD
(
context
->
Eip
))
)
-
5
;
WORD
xcs
=
context
->
SegCs
;
...
...
@@ -304,7 +304,7 @@ static void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT86 *context)
DPRINTF
(
") ret=%04x:%04x
\n
"
,
HIWORD
(
ret
->
origreturn
),
LOWORD
(
ret
->
origreturn
));
}
static
void
WINAPI
SNOOP16_Return
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
86
*
context
)
{
static
void
WINAPI
SNOOP16_Return
(
FARPROC
proc
,
LPBYTE
args
,
CONTEXT
*
context
)
{
SNOOP16_RETURNENTRY
*
ret
=
(
SNOOP16_RETURNENTRY
*
)((
char
*
)
MapSL
(
MAKESEGPTR
(
context
->
SegCs
,
LOWORD
(
context
->
Eip
))
)
-
5
);
/* We haven't found out the nrofargs yet. If we called a cdecl
...
...
dlls/krnl386.exe16/task.c
View file @
1b260438
...
...
@@ -615,7 +615,7 @@ void WINAPI ExitKernel16(void)
*
* Called by the application startup code.
*/
void
WINAPI
InitTask16
(
CONTEXT
86
*
context
)
void
WINAPI
InitTask16
(
CONTEXT
*
context
)
{
TDB
*
pTask
;
INSTANCEDATA
*
pinstance
;
...
...
@@ -1136,7 +1136,7 @@ void WINAPI SwitchStackTo16( WORD seg, WORD ptr, WORD top )
/***********************************************************************
* SwitchStackBack (KERNEL.109)
*/
void
WINAPI
SwitchStackBack16
(
CONTEXT
86
*
context
)
void
WINAPI
SwitchStackBack16
(
CONTEXT
*
context
)
{
STACK16FRAME
*
oldFrame
,
*
newFrame
;
INSTANCEDATA
*
pData
;
...
...
dlls/krnl386.exe16/thunk.c
View file @
1b260438
...
...
@@ -154,14 +154,14 @@ extern void QT_Thunk(void);
extern
void
QT_ThunkPrime
(
void
);
/* Push a DWORD on the 32-bit stack */
static
inline
void
stack32_push
(
CONTEXT
86
*
context
,
DWORD
val
)
static
inline
void
stack32_push
(
CONTEXT
*
context
,
DWORD
val
)
{
context
->
Esp
-=
sizeof
(
DWORD
);
*
(
DWORD
*
)
context
->
Esp
=
val
;
}
/* Pop a DWORD from the 32-bit stack */
static
inline
DWORD
stack32_pop
(
CONTEXT
86
*
context
)
static
inline
DWORD
stack32_pop
(
CONTEXT
*
context
)
{
DWORD
ret
=
*
(
DWORD
*
)
context
->
Esp
;
context
->
Esp
+=
sizeof
(
DWORD
);
...
...
@@ -187,7 +187,7 @@ void WINAPI LogApiThk( LPSTR func )
*
* NOTE: needs to preserve all registers!
*/
void
WINAPI
__regs_LogApiThkLSF
(
LPSTR
func
,
CONTEXT
86
*
context
)
void
WINAPI
__regs_LogApiThkLSF
(
LPSTR
func
,
CONTEXT
*
context
)
{
TRACE
(
"%s
\n
"
,
debugstr_a
(
func
)
);
}
...
...
@@ -198,7 +198,7 @@ DEFINE_REGS_ENTRYPOINT( LogApiThkLSF, 1 )
*
* NOTE: needs to preserve all registers!
*/
void
WINAPI
__regs_LogApiThkSL
(
LPSTR
func
,
CONTEXT
86
*
context
)
void
WINAPI
__regs_LogApiThkSL
(
LPSTR
func
,
CONTEXT
*
context
)
{
TRACE
(
"%s
\n
"
,
debugstr_a
(
func
)
);
}
...
...
@@ -209,7 +209,7 @@ DEFINE_REGS_ENTRYPOINT( LogApiThkSL, 1 )
*
* NOTE: needs to preserve all registers!
*/
void
WINAPI
__regs_LogCBThkSL
(
LPSTR
func
,
CONTEXT
86
*
context
)
void
WINAPI
__regs_LogCBThkSL
(
LPSTR
func
,
CONTEXT
*
context
)
{
TRACE
(
"%s
\n
"
,
debugstr_a
(
func
)
);
}
...
...
@@ -451,9 +451,9 @@ UINT WINAPI ThunkConnect32(
* FIXME: DDJ talks of certain register usage rules; I'm not sure
* whether we cover this 100%.
*/
void
WINAPI
__regs_QT_Thunk
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_QT_Thunk
(
CONTEXT
*
context
)
{
CONTEXT
86
context16
;
CONTEXT
context16
;
DWORD
argsize
;
context16
=
*
context
;
...
...
@@ -534,7 +534,7 @@ DEFINE_REGS_ENTRYPOINT( QT_Thunk, 0 )
* ESP is EBP-64 after return.
*
*/
void
WINAPI
__regs_FT_Prolog
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_FT_Prolog
(
CONTEXT
*
context
)
{
/* Build stack frame */
stack32_push
(
context
,
context
->
Ebp
);
...
...
@@ -576,12 +576,12 @@ DEFINE_REGS_ENTRYPOINT( FT_Prolog, 0 )
* of arguments, so that the single DWORD bitmap is no longer
* sufficient ...
*/
void
WINAPI
__regs_FT_Thunk
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_FT_Thunk
(
CONTEXT
*
context
)
{
DWORD
mapESPrelative
=
*
(
DWORD
*
)(
context
->
Ebp
-
20
);
DWORD
callTarget
=
*
(
DWORD
*
)(
context
->
Ebp
-
52
);
CONTEXT
86
context16
;
CONTEXT
context16
;
DWORD
i
,
argsize
;
DWORD
newstack
[
32
];
LPBYTE
oldstack
;
...
...
@@ -740,9 +740,9 @@ DWORD WINAPI ThunkInitLS(
* in the BL register by the called 16-bit routine.
*
*/
void
WINAPI
__regs_Common32ThkLS
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_Common32ThkLS
(
CONTEXT
*
context
)
{
CONTEXT
86
context16
;
CONTEXT
context16
;
DWORD
argsize
;
context16
=
*
context
;
...
...
@@ -799,9 +799,9 @@ DEFINE_REGS_ENTRYPOINT( Common32ThkLS, 0 )
* (Note that this function seems only to be used for
* OLECLI32 -> OLECLI and OLESVR32 -> OLESVR thunking.)
*/
void
WINAPI
__regs_OT_32ThkLSF
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_OT_32ThkLSF
(
CONTEXT
*
context
)
{
CONTEXT
86
context16
;
CONTEXT
context16
;
DWORD
argsize
;
context16
=
*
context
;
...
...
@@ -907,7 +907,7 @@ LPVOID WINAPI ThunkInitLSF(
* Note: The two DWORD arguments get popped off the stack.
*
*/
void
WINAPI
__regs_FT_PrologPrime
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_FT_PrologPrime
(
CONTEXT
*
context
)
{
DWORD
targetTableOffset
;
LPBYTE
relayCode
;
...
...
@@ -937,7 +937,7 @@ DEFINE_REGS_ENTRYPOINT( FT_PrologPrime, 0 )
* EAX start of relay code
*
*/
void
WINAPI
__regs_QT_ThunkPrime
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_QT_ThunkPrime
(
CONTEXT
*
context
)
{
DWORD
targetTableOffset
;
LPBYTE
relayCode
;
...
...
@@ -1013,7 +1013,7 @@ BOOL WINAPI SSOnBigStack(void)
*
* This must be a register routine as it has to preserve *all* registers.
*/
void
WINAPI
SSConfirmSmallStack
(
CONTEXT
86
*
context
)
void
WINAPI
SSConfirmSmallStack
(
CONTEXT
*
context
)
{
/* We are always on the small stack while in 16-bit code ... */
}
...
...
@@ -1053,7 +1053,7 @@ DWORD WINAPIV SSCall(
/**********************************************************************
* W32S_BackTo32 (KERNEL32.51)
*/
void
WINAPI
__regs_W32S_BackTo32
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_W32S_BackTo32
(
CONTEXT
*
context
)
{
LPDWORD
stack
=
(
LPDWORD
)
context
->
Esp
;
FARPROC
proc
=
(
FARPROC
)
context
->
Eip
;
...
...
@@ -1152,7 +1152,7 @@ FreeSLCallback(
* The SEGPTR is used by the caller!
*/
void
WINAPI
__regs_AllocMappedBuffer
(
CONTEXT
86
*
context
/* [in] EDI register: size of buffer to allocate */
CONTEXT
*
context
/* [in] EDI register: size of buffer to allocate */
)
{
HGLOBAL
handle
=
GlobalAlloc
(
0
,
context
->
Edi
+
8
);
DWORD
*
buffer
=
GlobalLock
(
handle
);
...
...
@@ -1187,7 +1187,7 @@ DEFINE_REGS_ENTRYPOINT( AllocMappedBuffer, 0 )
* Nothing.
*/
void
WINAPI
__regs_FreeMappedBuffer
(
CONTEXT
86
*
context
/* [in] EDI register: pointer to buffer */
CONTEXT
*
context
/* [in] EDI register: pointer to buffer */
)
{
if
(
context
->
Edi
)
{
...
...
@@ -1248,7 +1248,7 @@ BOOL16 WINAPI IsPeFormat16(
/***********************************************************************
* K32Thk1632Prolog (KERNEL32.@)
*/
void
WINAPI
__regs_K32Thk1632Prolog
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_K32Thk1632Prolog
(
CONTEXT
*
context
)
{
LPBYTE
code
=
(
LPBYTE
)
context
->
Eip
-
5
;
...
...
@@ -1310,7 +1310,7 @@ DEFINE_REGS_ENTRYPOINT( K32Thk1632Prolog, 0 )
/***********************************************************************
* K32Thk1632Epilog (KERNEL32.@)
*/
void
WINAPI
__regs_K32Thk1632Epilog
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_K32Thk1632Epilog
(
CONTEXT
*
context
)
{
LPBYTE
code
=
(
LPBYTE
)
context
->
Eip
-
13
;
...
...
@@ -1457,7 +1457,7 @@ UINT WINAPI ThunkConnect16(
* C16ThkSL (KERNEL.630)
*/
void
WINAPI
C16ThkSL
(
CONTEXT
86
*
context
)
void
WINAPI
C16ThkSL
(
CONTEXT
*
context
)
{
LPBYTE
stub
=
MapSL
(
context
->
Eax
),
x
=
stub
;
WORD
cs
=
wine_get_cs
();
...
...
@@ -1503,7 +1503,7 @@ void WINAPI C16ThkSL(CONTEXT86 *context)
* C16ThkSL01 (KERNEL.631)
*/
void
WINAPI
C16ThkSL01
(
CONTEXT
86
*
context
)
void
WINAPI
C16ThkSL01
(
CONTEXT
*
context
)
{
LPBYTE
stub
=
MapSL
(
context
->
Eax
),
x
=
stub
;
...
...
@@ -1980,7 +1980,7 @@ void WINAPI InitCBClient16( FARPROC glueLS )
/***********************************************************************
* CBClientGlueSL (KERNEL.604)
*/
void
WINAPI
CBClientGlueSL
(
CONTEXT
86
*
context
)
void
WINAPI
CBClientGlueSL
(
CONTEXT
*
context
)
{
/* Create stack frame */
SEGPTR
stackSeg
=
stack16_push
(
12
);
...
...
@@ -2007,7 +2007,7 @@ void WINAPI CBClientGlueSL( CONTEXT86 *context )
* CBClientThunkSL (KERNEL.620)
*/
extern
DWORD
CALL32_CBClient
(
FARPROC
proc
,
LPWORD
args
,
WORD
*
stackLin
,
DWORD
*
esi
);
void
WINAPI
CBClientThunkSL
(
CONTEXT
86
*
context
)
void
WINAPI
CBClientThunkSL
(
CONTEXT
*
context
)
{
/* Call 32-bit relay code */
...
...
@@ -2032,7 +2032,7 @@ void WINAPI CBClientThunkSL( CONTEXT86 *context )
* CBClientThunkSLEx (KERNEL.621)
*/
extern
DWORD
CALL32_CBClientEx
(
FARPROC
proc
,
LPWORD
args
,
WORD
*
stackLin
,
DWORD
*
esi
,
INT
*
nArgs
);
void
WINAPI
CBClientThunkSLEx
(
CONTEXT
86
*
context
)
void
WINAPI
CBClientThunkSLEx
(
CONTEXT
*
context
)
{
/* Call 32-bit relay code */
...
...
@@ -2135,7 +2135,7 @@ LPVOID WINAPI GetPK16SysVar(void)
/**********************************************************************
* CommonUnimpStub (KERNEL32.17)
*/
void
WINAPI
__regs_CommonUnimpStub
(
CONTEXT
86
*
context
)
void
WINAPI
__regs_CommonUnimpStub
(
CONTEXT
*
context
)
{
FIXME
(
"generic stub: %s
\n
"
,
((
LPSTR
)
context
->
Eax
?
(
LPSTR
)
context
->
Eax
:
"?"
));
...
...
@@ -2287,7 +2287,7 @@ INT WINAPIV k32wsprintfA(LPSTR buffer, LPCSTR spec, ...)
* Real prototype is:
* INT16 WINAPI Catch( LPCATCHBUF lpbuf );
*/
void
WINAPI
Catch16
(
LPCATCHBUF
lpbuf
,
CONTEXT
86
*
context
)
void
WINAPI
Catch16
(
LPCATCHBUF
lpbuf
,
CONTEXT
*
context
)
{
/* Note: we don't save the current ss, as the catch buffer is */
/* only 9 words long. Hopefully no one will have the silly */
...
...
@@ -2325,7 +2325,7 @@ void WINAPI Catch16( LPCATCHBUF lpbuf, CONTEXT86 *context )
* Real prototype is:
* INT16 WINAPI Throw( LPCATCHBUF lpbuf, INT16 retval );
*/
void
WINAPI
Throw16
(
LPCATCHBUF
lpbuf
,
INT16
retval
,
CONTEXT
86
*
context
)
void
WINAPI
Throw16
(
LPCATCHBUF
lpbuf
,
INT16
retval
,
CONTEXT
*
context
)
{
STACK16FRAME
*
pFrame
;
STACK32FRAME
*
frame32
;
...
...
dlls/krnl386.exe16/timer.c
View file @
1b260438
...
...
@@ -68,7 +68,7 @@ static DWORD TIMER_millis = 0;
* called. This function will be called even if application has its
* own IRQ handler that does not jump to builtin IRQ handler.
*/
static
void
TIMER_Relay
(
CONTEXT
86
*
context
,
void
*
data
)
static
void
TIMER_Relay
(
CONTEXT
*
context
,
void
*
data
)
{
InterlockedDecrement
(
&
TIMER_pending
);
}
...
...
@@ -160,10 +160,10 @@ void DOSVM_SetTimer( UINT ticks )
*
* DOS interrupt 08h handler (IRQ0 - TIMER).
*/
void
WINAPI
DOSVM_Int08Handler
(
CONTEXT
86
*
context
)
void
WINAPI
DOSVM_Int08Handler
(
CONTEXT
*
context
)
{
BIOSDATA
*
bios_data
=
DOSVM_BiosData
();
CONTEXT
86
nested_context
=
*
context
;
CONTEXT
nested_context
=
*
context
;
FARPROC16
int1c_proc
=
DOSVM_GetRMHandler
(
0x1c
);
nested_context
.
SegCs
=
SELECTOROF
(
int1c_proc
);
...
...
dlls/krnl386.exe16/vxd.c
View file @
1b260438
...
...
@@ -52,7 +52,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
vxd
);
typedef
DWORD
(
WINAPI
*
VxDCallProc
)(
DWORD
,
CONTEXT
86
*
);
typedef
DWORD
(
WINAPI
*
VxDCallProc
)(
DWORD
,
CONTEXT
*
);
typedef
BOOL
(
WINAPI
*
DeviceIoProc
)(
DWORD
,
LPVOID
,
DWORD
,
LPVOID
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
struct
vxd_module
...
...
@@ -287,7 +287,7 @@ done:
* VxDCall7 (KERNEL32.8)
* VxDCall8 (KERNEL32.9)
*/
void
WINAPI
__regs_VxDCall
(
DWORD
service
,
CONTEXT
86
*
context
)
void
WINAPI
__regs_VxDCall
(
DWORD
service
,
CONTEXT
*
context
)
{
unsigned
int
i
;
VxDCallProc
proc
=
NULL
;
...
...
@@ -321,7 +321,7 @@ DEFINE_REGS_ENTRYPOINT( VxDCall, 1 )
/***********************************************************************
* __wine_vxd_vmm (WPROCS.401)
*/
void
WINAPI
__wine_vxd_vmm
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_vmm
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -348,7 +348,7 @@ void WINAPI __wine_vxd_vmm ( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_pagefile (WPROCS.433)
*/
void
WINAPI
__wine_vxd_pagefile
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_pagefile
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -394,7 +394,7 @@ void WINAPI __wine_vxd_pagefile( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_reboot (WPROCS.409)
*/
void
WINAPI
__wine_vxd_reboot
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_reboot
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -415,7 +415,7 @@ void WINAPI __wine_vxd_reboot( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_vdd (WPROCS.410)
*/
void
WINAPI
__wine_vxd_vdd
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_vdd
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -436,7 +436,7 @@ void WINAPI __wine_vxd_vdd( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_vmd (WPROCS.412)
*/
void
WINAPI
__wine_vxd_vmd
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_vmd
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -457,7 +457,7 @@ void WINAPI __wine_vxd_vmd( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_vxdloader (WPROCS.439)
*/
void
WINAPI
__wine_vxd_vxdloader
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_vxdloader
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -499,7 +499,7 @@ void WINAPI __wine_vxd_vxdloader( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_shell (WPROCS.423)
*/
void
WINAPI
__wine_vxd_shell
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_shell
(
CONTEXT
*
context
)
{
unsigned
service
=
DX_reg
(
context
);
...
...
@@ -592,7 +592,7 @@ void WINAPI __wine_vxd_shell( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_comm (WPROCS.414)
*/
void
WINAPI
__wine_vxd_comm
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_comm
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -617,7 +617,7 @@ void WINAPI __wine_vxd_comm( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_timer (WPROCS.405)
*/
void
WINAPI
__wine_vxd_timer
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_timer
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -668,7 +668,7 @@ static DWORD CALLBACK timer_thread( void *arg )
/***********************************************************************
* __wine_vxd_timerapi (WPROCS.1490)
*/
void
WINAPI
__wine_vxd_timerapi
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_timerapi
(
CONTEXT
*
context
)
{
static
WORD
System_Time_Selector
;
...
...
@@ -702,7 +702,7 @@ void WINAPI __wine_vxd_timerapi( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_configmg (WPROCS.451)
*/
void
WINAPI
__wine_vxd_configmg
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_configmg
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -723,7 +723,7 @@ void WINAPI __wine_vxd_configmg( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_enable (WPROCS.455)
*/
void
WINAPI
__wine_vxd_enable
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_enable
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -744,7 +744,7 @@ void WINAPI __wine_vxd_enable( CONTEXT86 *context )
/***********************************************************************
* __wine_vxd_apm (WPROCS.438)
*/
void
WINAPI
__wine_vxd_apm
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_apm
(
CONTEXT
*
context
)
{
unsigned
service
=
AX_reg
(
context
);
...
...
@@ -814,7 +814,7 @@ void WINAPI __wine_vxd_apm( CONTEXT86 *context )
* service of the Win32s VxD. (Note that the offset is never reset.)
*
*/
void
WINAPI
__wine_vxd_win32s
(
CONTEXT
86
*
context
)
void
WINAPI
__wine_vxd_win32s
(
CONTEXT
*
context
)
{
switch
(
AX_reg
(
context
))
{
...
...
dlls/krnl386.exe16/wowthunk.c
View file @
1b260438
...
...
@@ -42,7 +42,7 @@ WINE_DECLARE_DEBUG_CHANNEL(snoop);
/* symbols exported from relay16.s */
extern
DWORD
WINAPI
wine_call_to_16
(
FARPROC16
target
,
DWORD
cbArgs
,
PEXCEPTION_HANDLER
handler
);
extern
void
WINAPI
wine_call_to_16_regs
(
CONTEXT
86
*
context
,
DWORD
cbArgs
,
PEXCEPTION_HANDLER
handler
);
extern
void
WINAPI
wine_call_to_16_regs
(
CONTEXT
*
context
,
DWORD
cbArgs
,
PEXCEPTION_HANDLER
handler
);
extern
void
__wine_call_to_16_ret
(
void
);
extern
void
CALL32_CBClient_Ret
(
void
);
extern
void
CALL32_CBClientEx_Ret
(
void
);
...
...
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