ReactOS 0.4.16-dev-306-g647d351
bop.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EMULATOR_BOP   0xC4C4
 
#define EMULATOR_MAX_BOP_NUM   0xFF + 1
 

Typedefs

typedef VOID(WINAPIEMULATOR_BOP_PROC) (LPWORD Stack)
 

Functions

VOID RegisterBop (BYTE BopCode, EMULATOR_BOP_PROC BopHandler)
 
VOID FASTCALL EmulatorBiosOperation (PFAST486_STATE State, UCHAR BopCode)
 

Macro Definition Documentation

◆ EMULATOR_BOP

#define EMULATOR_BOP   0xC4C4

Definition at line 16 of file bop.h.

◆ EMULATOR_MAX_BOP_NUM

#define EMULATOR_MAX_BOP_NUM   0xFF + 1

Definition at line 17 of file bop.h.

Typedef Documentation

◆ EMULATOR_BOP_PROC

typedef VOID(WINAPI * EMULATOR_BOP_PROC) (LPWORD Stack)

Definition at line 21 of file bop.h.

Function Documentation

◆ EmulatorBiosOperation()

VOID FASTCALL EmulatorBiosOperation ( PFAST486_STATE  State,
UCHAR  BopCode 
)

Definition at line 34 of file bop.c.

35{
36 WORD StackSegment, StackPointer;
38
39 /* Get the SS:SP */
40 StackSegment = State->SegmentRegs[FAST486_REG_SS].Selector;
41 StackPointer = State->GeneralRegs[FAST486_REG_ESP].LowWord;
42
43 /* Get the stack */
44 Stack = (LPWORD)SEG_OFF_TO_PTR(StackSegment, StackPointer);
45
46 /* Call the BOP handler */
47 if (BopProc[BopCode] != NULL)
48 BopProc[BopCode](Stack);
49 else
50 DPRINT1("Invalid BOP code: 0x%02X\n", BopCode);
51}
#define DPRINT1
Definition: precomp.h:8
static EMULATOR_BOP_PROC BopProc[EMULATOR_MAX_BOP_NUM]
Definition: bop.c:25
#define NULL
Definition: types.h:112
#define SEG_OFF_TO_PTR(seg, off)
Definition: emulator.h:32
unsigned short WORD
Definition: ntddk_ex.h:93
uint16_t * LPWORD
Definition: typedefs.h:56
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639

Referenced by CpuInitialize().

◆ RegisterBop()