ReactOS  0.4.14-dev-606-g14ebc0b
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;
37  LPWORD Stack;
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 SEG_OFF_TO_PTR(seg, off)
Definition: emulator.h:28
smooth NULL
Definition: ftsmooth.c:416
unsigned short WORD
Definition: ntddk_ex.h:93
static EMULATOR_BOP_PROC BopProc[EMULATOR_MAX_BOP_NUM]
Definition: bop.c:25
uint16_t * LPWORD
Definition: typedefs.h:54
#define DPRINT1
Definition: precomp.h:8

Referenced by CpuInitialize().

◆ RegisterBop()

VOID RegisterBop ( BYTE  BopCode,
EMULATOR_BOP_PROC  BopHandler 
)