[mvdm] Fix missing pointer dereference
[reactos.git] / subsystems / mvdm / ntvdm / int32.h
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
42 typedef VOID (WINAPI *EMULATOR_INT32_PROC)(LPWORD Stack);
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
58 Int32Call(IN PCALLBACK16 Context,
59 IN BYTE IntNumber);
60
61 VOID InitializeInt32(VOID);
62
63 #endif // _INT32_H_
64
65 /* EOF */