2013-11-09 23:01:11 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: GPL - See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS Virtual DOS Machine
|
2015-09-18 17:01:49 +00:00
|
|
|
* FILE: subsystems/mvdm/ntvdm/int32.h
|
2013-11-09 23:01:11 +00:00
|
|
|
* PURPOSE: 32-bit Interrupt Handlers
|
|
|
|
* PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
|
|
|
|
* Hermes Belusca-Maito (hermes.belusca@sfr.fr)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INT32_H_
|
|
|
|
#define _INT32_H_
|
|
|
|
|
2015-10-04 11:49:28 +00:00
|
|
|
/* INCLUDES *******************************************************************/
|
|
|
|
|
|
|
|
#include "cpu/callback.h"
|
|
|
|
|
2013-11-09 23:01:11 +00:00
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
|
|
|
|
/* 32-bit Interrupt Identifiers */
|
|
|
|
#define EMULATOR_MAX_INT32_NUM 0xFF + 1
|
|
|
|
|
2014-10-12 17:23:20 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// WARNING WARNING!!
|
|
|
|
// If you're changing the stack indices here, you then need
|
|
|
|
// to also fix the Int16To32 handler code in int32.c !!
|
|
|
|
//
|
|
|
|
|
|
|
|
// Custom variable pushed onto the stack for INT32 interrupts
|
|
|
|
#define STACK_INT_NUM 0
|
|
|
|
|
|
|
|
// This is the standard stack layout for an interrupt
|
|
|
|
#define STACK_IP 1
|
|
|
|
#define STACK_CS 2
|
|
|
|
#define STACK_FLAGS 3
|
|
|
|
|
2015-06-14 16:40:45 +00:00
|
|
|
// To be adjusted with the Int16To32 handler code in int32.c
|
|
|
|
#define Int16To32StubSize 17
|
2013-11-11 02:27:29 +00:00
|
|
|
|
2013-11-09 23:01:11 +00:00
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
|
|
|
|
typedef VOID (WINAPI *EMULATOR_INT32_PROC)(LPWORD Stack);
|
|
|
|
|
2014-09-30 23:47:23 +00:00
|
|
|
ULONG
|
|
|
|
RegisterInt16(IN ULONG FarPtr,
|
|
|
|
IN BYTE IntNumber,
|
|
|
|
IN LPBYTE CallbackCode,
|
|
|
|
IN SIZE_T CallbackSize,
|
|
|
|
OUT PSIZE_T CodeSize OPTIONAL);
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
RegisterInt32(IN ULONG FarPtr,
|
|
|
|
IN BYTE IntNumber,
|
|
|
|
IN EMULATOR_INT32_PROC IntHandler,
|
|
|
|
OUT PSIZE_T CodeSize OPTIONAL);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
Int32Call(IN PCALLBACK16 Context,
|
|
|
|
IN BYTE IntNumber);
|
|
|
|
|
|
|
|
VOID InitializeInt32(VOID);
|
2013-11-09 23:01:11 +00:00
|
|
|
|
2015-10-04 11:49:28 +00:00
|
|
|
#endif // _INT32_H_
|
|
|
|
|
|
|
|
/* EOF */
|