ReactOS  0.4.14-dev-358-gbef841c
int32.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: GPL - See COPYING in the top level directory
3  * PROJECT: ReactOS Virtual DOS Machine
4  * FILE: subsystems/mvdm/ntvdm/int32.h
5  * PURPOSE: 32-bit Interrupt Handlers
6  * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7  * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8  */
9 
10 #ifndef _INT32_H_
11 #define _INT32_H_
12 
13 /* INCLUDES *******************************************************************/
14 
15 #include "cpu/callback.h"
16 
17 /* DEFINES ********************************************************************/
18 
19 /* 32-bit Interrupt Identifiers */
20 #define EMULATOR_MAX_INT32_NUM 0xFF + 1
21 
22 
23 //
24 // WARNING WARNING!!
25 // If you're changing the stack indices here, you then need
26 // to also fix the Int16To32 handler code in int32.c !!
27 //
28 
29 // Custom variable pushed onto the stack for INT32 interrupts
30 #define STACK_INT_NUM 0
31 
32 // This is the standard stack layout for an interrupt
33 #define STACK_IP 1
34 #define STACK_CS 2
35 #define STACK_FLAGS 3
36 
37 // To be adjusted with the Int16To32 handler code in int32.c
38 #define Int16To32StubSize 17
39 
40 /* FUNCTIONS ******************************************************************/
41 
43 
44 ULONG
45 RegisterInt16(IN ULONG FarPtr,
46  IN BYTE IntNumber,
47  IN LPBYTE CallbackCode,
48  IN SIZE_T CallbackSize,
49  OUT PSIZE_T CodeSize OPTIONAL);
50 
51 ULONG
52 RegisterInt32(IN ULONG FarPtr,
53  IN BYTE IntNumber,
54  IN EMULATOR_INT32_PROC IntHandler,
55  OUT PSIZE_T CodeSize OPTIONAL);
56 
57 VOID
59  IN BYTE IntNumber);
60 
62 
63 #endif // _INT32_H_
64 
65 /* EOF */
#define IN
Definition: typedefs.h:38
VOID Int32Call(IN PCALLBACK16 Context, IN BYTE IntNumber)
Definition: int32.c:151
unsigned char * LPBYTE
Definition: typedefs.h:52
ULONG_PTR * PSIZE_T
Definition: typedefs.h:78
ULONG RegisterInt32(IN ULONG FarPtr, IN BYTE IntNumber, IN EMULATOR_INT32_PROC IntHandler, OUT PSIZE_T CodeSize OPTIONAL)
Definition: int32.c:118
#define WINAPI
Definition: msvc.h:8
ULONG RegisterInt16(IN ULONG FarPtr, IN BYTE IntNumber, IN LPBYTE CallbackCode, IN SIZE_T CallbackSize, OUT PSIZE_T CodeSize OPTIONAL)
Definition: int32.c:100
#define VOID
Definition: acefi.h:82
unsigned char BYTE
Definition: mem.h:68
uint16_t * LPWORD
Definition: typedefs.h:54
VOID InitializeInt32(VOID)
Definition: int32.c:194
ULONG_PTR SIZE_T
Definition: typedefs.h:78
VOID(WINAPI * EMULATOR_INT32_PROC)(LPWORD Stack)
Definition: int32.h:42
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68