ReactOS 0.4.15-dev-8235-gcd88a97
bop.c File Reference
#include "ntvdm.h"
#include <debug.h>
#include "emulator.h"
#include "bop.h"
Include dependency graph for bop.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

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

Variables

static EMULATOR_BOP_PROC BopProc [EMULATOR_MAX_BOP_NUM] = { NULL }
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file bop.c.

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()

Variable Documentation

◆ BopProc

Definition at line 25 of file bop.c.

Referenced by EmulatorBiosOperation(), and RegisterBop().