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
4324b477
Commit
4324b477
authored
Jun 03, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay loading of interrupt table functions until they are needed.
parent
de304909
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
60 deletions
+26
-60
wprocs.spec
dlls/kernel/wprocs.spec
+0
-0
builtin.c
if1632/builtin.c
+1
-58
builtin16.h
include/builtin16.h
+0
-1
instr.c
memory/instr.c
+6
-0
interrupts.c
msdos/interrupts.c
+19
-1
No files found.
dlls/kernel/wprocs.spec
View file @
4324b477
This diff is collapsed.
Click to expand it.
if1632/builtin.c
View file @
4324b477
...
...
@@ -17,7 +17,6 @@
#include "heap.h"
#include "module.h"
#include "miscemu.h"
#include "neexe.h"
#include "stackframe.h"
#include "user.h"
#include "process.h"
...
...
@@ -42,21 +41,11 @@ typedef struct
static
const
BUILTIN16_DESCRIPTOR
*
builtin_dlls
[
MAX_DLLS
];
static
int
nb_dlls
;
/* list of DLLs that should always be loaded at startup */
static
const
char
*
const
always_load
[]
=
{
"system"
,
"display"
,
"wprocs"
,
NULL
};
/* Ordinal number for interrupt 0 handler in WPROCS.DLL */
#define FIRST_INTERRUPT_ORDINAL 100
/***********************************************************************
* BUILTIN_DoLoadModule16
*
* Load a built-in Win16 module. Helper function for BUILTIN_LoadModule
* and BUILTIN_Init.
* Load a built-in Win16 module. Helper function for BUILTIN_LoadModule.
*/
static
HMODULE16
BUILTIN_DoLoadModule16
(
const
BUILTIN16_DESCRIPTOR
*
descr
)
{
...
...
@@ -144,38 +133,6 @@ static HMODULE16 BUILTIN_DoLoadModule16( const BUILTIN16_DESCRIPTOR *descr )
/***********************************************************************
* BUILTIN_Init
*
* Load all built-in modules marked as 'always used'.
*/
BOOL
BUILTIN_Init
(
void
)
{
WORD
vector
;
HMODULE16
hModule
;
const
char
*
const
*
ptr
=
always_load
;
while
(
*
ptr
)
{
if
(
!
BUILTIN_LoadModule
(
*
ptr
))
return
FALSE
;
ptr
++
;
}
/* Set interrupt vectors from entry points in WPROCS.DLL */
hModule
=
GetModuleHandle16
(
"WPROCS"
);
for
(
vector
=
0
;
vector
<
256
;
vector
++
)
{
FARPROC16
proc
=
NE_GetEntryPoint
(
hModule
,
FIRST_INTERRUPT_ORDINAL
+
vector
);
assert
(
proc
);
INT_SetPMHandler
(
vector
,
proc
);
}
return
TRUE
;
}
/***********************************************************************
* BUILTIN_LoadModule
*
* Load a built-in module.
...
...
@@ -288,17 +245,3 @@ void BUILTIN_RegisterDLL( const BUILTIN16_DESCRIPTOR *descr )
assert
(
nb_dlls
<
MAX_DLLS
);
builtin_dlls
[
nb_dlls
++
]
=
descr
;
}
/**********************************************************************
* BUILTIN_DefaultIntHandler
*
* Default interrupt handler.
*/
void
WINAPI
BUILTIN_DefaultIntHandler
(
CONTEXT86
*
context
)
{
WORD
ordinal
;
char
name
[
80
];
BUILTIN_GetEntryPoint16
(
CURRENT_STACK16
,
name
,
&
ordinal
);
INT_BARF
(
context
,
ordinal
-
FIRST_INTERRUPT_ORDINAL
);
}
include/builtin16.h
View file @
4324b477
...
...
@@ -81,7 +81,6 @@ typedef struct
const
void
*
rsrc
;
/* resources data */
}
BUILTIN16_DESCRIPTOR
;
extern
BOOL
BUILTIN_Init
(
void
);
extern
HMODULE16
BUILTIN_LoadModule
(
LPCSTR
name
);
extern
LPCSTR
BUILTIN_GetEntryPoint16
(
struct
_STACK16FRAME
*
frame
,
LPSTR
name
,
WORD
*
pOrd
);
extern
void
BUILTIN_RegisterDLL
(
const
BUILTIN16_DESCRIPTOR
*
descr
);
...
...
memory/instr.c
View file @
4324b477
...
...
@@ -680,6 +680,12 @@ BOOL INSTR_EmulateInstruction( CONTEXT86 *context )
{
FARPROC16
addr
=
INT_GetPMHandler
(
instr
[
1
]
);
WORD
*
stack
=
(
WORD
*
)
STACK_PTR
(
context
);
if
(
!
addr
)
{
FIXME
(
"no handler for interrupt %02x, ignoring it
\n
"
,
instr
[
1
]);
EIP_reg
(
context
)
+=
prefixlen
+
2
;
return
TRUE
;
}
/* Push the flags and return address on the stack */
*
(
--
stack
)
=
LOWORD
(
EFL_reg
(
context
));
*
(
--
stack
)
=
CS_reg
(
context
);
...
...
msdos/interrupts.c
View file @
4324b477
...
...
@@ -6,14 +6,19 @@
#include <sys/types.h>
#include "windef.h"
#include "wine/winbase16.h"
#include "miscemu.h"
#include "msdos.h"
#include "module.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
int
)
DEFAULT_DEBUG_CHANNEL
(
int
)
;
static
FARPROC16
INT_Vectors
[
256
];
/* Ordinal number for interrupt 0 handler in WPROCS.DLL */
#define FIRST_INTERRUPT 100
/**********************************************************************
* INT_GetPMHandler
...
...
@@ -22,6 +27,19 @@ static FARPROC16 INT_Vectors[256];
*/
FARPROC16
INT_GetPMHandler
(
BYTE
intnum
)
{
if
(
!
INT_Vectors
[
intnum
])
{
static
HMODULE16
wprocs
;
if
(
!
wprocs
)
{
if
((
wprocs
=
GetModuleHandle16
(
"wprocs"
))
<
32
)
{
ERR
(
"could not load wprocs.dll
\n
"
);
return
0
;
}
}
INT_Vectors
[
intnum
]
=
NE_GetEntryPoint
(
wprocs
,
FIRST_INTERRUPT
+
intnum
);
}
return
INT_Vectors
[
intnum
];
}
...
...
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