ReactOS  0.4.14-dev-614-gbfd8a84
vddsvc.h File Reference
#include <nt_vdd.h>
Include dependency graph for vddsvc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ICA_MASTER   0
 
#define ICA_SLAVE   1
 
#define VDDSimulateInterrupt(ms, line, count)   call_ica_hw_interrupt((ms), (line), (count))
 
#define Sim32FreeVDMPointer(Address, Size, Buffer, Mode)   TRUE
 
#define GetVDMAddress(usSeg, usOff)   (((ULONG)(usSeg) << 4) + (ULONG)(usOff))
 
#define GetVDMPointer(Address, Size, Mode)   Sim32GetVDMPointer(Address, Size, Mode)
 
#define FlushVDMPointer(Address, Size, Buffer, Mode)   Sim32FlushVDMPointer(Address, Size, Buffer, Mode)
 
#define FreeVDMPointer(Address, Size, Buffer, Mode)   Sim32FreeVDMPointer(Address, Size, Buffer, Mode)
 

Functions

VOID WINAPI call_ica_hw_interrupt (_In_ INT ms, _In_ BYTE line, _In_ INT count)
 
PBYTE WINAPI Sim32GetVDMPointer (_In_ ULONG Address, _In_ ULONG Size, _In_ BOOLEAN ProtectedMode)
 
BOOLEAN WINAPI Sim32FlushVDMPointer (_In_ ULONG Address, _In_ ULONG Size, _In_ PBYTE Buffer, _In_ BOOLEAN ProtectedMode)
 
PBYTE WINAPI Sim32pGetVDMPointer (_In_ ULONG Address, _In_ BOOLEAN ProtectedMode)
 
PVOID WINAPI getIntelRegistersPointer (VOID)
 
ULONG WINAPI getEAX (VOID)
 
VOID WINAPI setEAX (ULONG)
 
USHORT WINAPI getAX (VOID)
 
VOID WINAPI setAX (USHORT)
 
UCHAR WINAPI getAH (VOID)
 
VOID WINAPI setAH (UCHAR)
 
UCHAR WINAPI getAL (VOID)
 
VOID WINAPI setAL (UCHAR)
 
ULONG WINAPI getEBX (VOID)
 
VOID WINAPI setEBX (ULONG)
 
USHORT WINAPI getBX (VOID)
 
VOID WINAPI setBX (USHORT)
 
UCHAR WINAPI getBH (VOID)
 
VOID WINAPI setBH (UCHAR)
 
UCHAR WINAPI getBL (VOID)
 
VOID WINAPI setBL (UCHAR)
 
ULONG WINAPI getECX (VOID)
 
VOID WINAPI setECX (ULONG)
 
USHORT WINAPI getCX (VOID)
 
VOID WINAPI setCX (USHORT)
 
UCHAR WINAPI getCH (VOID)
 
VOID WINAPI setCH (UCHAR)
 
UCHAR WINAPI getCL (VOID)
 
VOID WINAPI setCL (UCHAR)
 
ULONG WINAPI getEDX (VOID)
 
VOID WINAPI setEDX (ULONG)
 
USHORT WINAPI getDX (VOID)
 
VOID WINAPI setDX (USHORT)
 
UCHAR WINAPI getDH (VOID)
 
VOID WINAPI setDH (UCHAR)
 
UCHAR WINAPI getDL (VOID)
 
VOID WINAPI setDL (UCHAR)
 
ULONG WINAPI getESP (VOID)
 
VOID WINAPI setESP (ULONG)
 
USHORT WINAPI getSP (VOID)
 
VOID WINAPI setSP (USHORT)
 
ULONG WINAPI getEBP (VOID)
 
VOID WINAPI setEBP (ULONG)
 
USHORT WINAPI getBP (VOID)
 
VOID WINAPI setBP (USHORT)
 
ULONG WINAPI getESI (VOID)
 
VOID WINAPI setESI (ULONG)
 
USHORT WINAPI getSI (VOID)
 
VOID WINAPI setSI (USHORT)
 
ULONG WINAPI getEDI (VOID)
 
VOID WINAPI setEDI (ULONG)
 
USHORT WINAPI getDI (VOID)
 
VOID WINAPI setDI (USHORT)
 
ULONG WINAPI getEIP (VOID)
 
VOID WINAPI setEIP (ULONG)
 
USHORT WINAPI getIP (VOID)
 
VOID WINAPI setIP (USHORT)
 
USHORT WINAPI getCS (VOID)
 
VOID WINAPI setCS (USHORT)
 
USHORT WINAPI getSS (VOID)
 
VOID WINAPI setSS (USHORT)
 
USHORT WINAPI getDS (VOID)
 
VOID WINAPI setDS (USHORT)
 
USHORT WINAPI getES (VOID)
 
VOID WINAPI setES (USHORT)
 
USHORT WINAPI getFS (VOID)
 
VOID WINAPI setFS (USHORT)
 
USHORT WINAPI getGS (VOID)
 
VOID WINAPI setGS (USHORT)
 
ULONG WINAPI getCF (VOID)
 
VOID WINAPI setCF (ULONG)
 
ULONG WINAPI getPF (VOID)
 
VOID WINAPI setPF (ULONG)
 
ULONG WINAPI getAF (VOID)
 
VOID WINAPI setAF (ULONG)
 
ULONG WINAPI getZF (VOID)
 
VOID WINAPI setZF (ULONG)
 
ULONG WINAPI getSF (VOID)
 
VOID WINAPI setSF (ULONG)
 
ULONG WINAPI getIF (VOID)
 
VOID WINAPI setIF (ULONG)
 
ULONG WINAPI getDF (VOID)
 
VOID WINAPI setDF (ULONG)
 
ULONG WINAPI getOF (VOID)
 
VOID WINAPI setOF (ULONG)
 
ULONG WINAPI getEFLAGS (VOID)
 
VOID WINAPI setEFLAGS (ULONG)
 
USHORT WINAPI getMSW (VOID)
 
VOID WINAPI setMSW (USHORT)
 

Macro Definition Documentation

◆ FlushVDMPointer

#define FlushVDMPointer (   Address,
  Size,
  Buffer,
  Mode 
)    Sim32FlushVDMPointer(Address, Size, Buffer, Mode)

Definition at line 97 of file vddsvc.h.

◆ FreeVDMPointer

#define FreeVDMPointer (   Address,
  Size,
  Buffer,
  Mode 
)    Sim32FreeVDMPointer(Address, Size, Buffer, Mode)

Definition at line 100 of file vddsvc.h.

◆ GetVDMAddress

#define GetVDMAddress (   usSeg,
  usOff 
)    (((ULONG)(usSeg) << 4) + (ULONG)(usOff))

Definition at line 92 of file vddsvc.h.

◆ GetVDMPointer

#define GetVDMPointer (   Address,
  Size,
  Mode 
)    Sim32GetVDMPointer(Address, Size, Mode)

Definition at line 94 of file vddsvc.h.

◆ ICA_MASTER

#define ICA_MASTER   0

Definition at line 32 of file vddsvc.h.

◆ ICA_SLAVE

#define ICA_SLAVE   1

Definition at line 33 of file vddsvc.h.

◆ Sim32FreeVDMPointer

#define Sim32FreeVDMPointer (   Address,
  Size,
  Buffer,
  Mode 
)    TRUE

Definition at line 90 of file vddsvc.h.

◆ VDDSimulateInterrupt

#define VDDSimulateInterrupt (   ms,
  line,
  count 
)    call_ica_hw_interrupt((ms), (line), (count))

Definition at line 42 of file vddsvc.h.

Function Documentation

◆ call_ica_hw_interrupt()

VOID WINAPI call_ica_hw_interrupt ( _In_ INT  ms,
_In_ BYTE  line,
_In_ INT  count 
)

◆ getAF()

ULONG WINAPI getAF ( VOID  )

Definition at line 594 of file registers.c.

595 {
596  return EmulatorContext.Flags.Af;
597 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getAH()

UCHAR WINAPI getAH ( VOID  )

Definition at line 128 of file registers.c.

129 {
130  return EmulatorContext.GeneralRegs[FAST486_REG_EAX].HighByte;
131 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosDiskService(), BiosKeyboardService(), BiosMiscService(), BiosTimeService(), ConDrvReadInput(), DosInt21h(), DosInt2Fh(), EmsIntHandler(), VidBiosVideoService(), and XmsBopProcedure().

◆ getAL()

UCHAR WINAPI getAL ( VOID  )

Definition at line 142 of file registers.c.

143 {
144  return EmulatorContext.GeneralRegs[FAST486_REG_EAX].LowByte;
145 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosDiskService(), BiosKeyboardIrq(), BiosMiscService(), BiosMousePs2Interface(), ConDrvReadInput(), DosInt21h(), DosInt2Fh(), EmsIntHandler(), VbeService(), and VidBiosVideoService().

◆ getAX()

◆ getBH()

UCHAR WINAPI getBH ( VOID  )

Definition at line 184 of file registers.c.

185 {
186  return EmulatorContext.GeneralRegs[FAST486_REG_EBX].HighByte;
187 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosDiskService(), BiosMiscService(), BiosMousePs2Interface(), VbeService(), and VidBiosVideoService().

◆ getBL()

UCHAR WINAPI getBL ( VOID  )

Definition at line 198 of file registers.c.

199 {
200  return EmulatorContext.GeneralRegs[FAST486_REG_EBX].LowByte;
201 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMiscService(), BiosMousePs2Interface(), DosInt21h(), VbeService(), VidBiosSetVideoMode(), VidBiosVideoService(), and XmsBopProcedure().

◆ getBP()

USHORT WINAPI getBP ( VOID  )

Definition at line 374 of file registers.c.

375 {
376  return EmulatorContext.GeneralRegs[FAST486_REG_EBP].LowWord;
377 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosKeyboardIrq(), BiosTimerIrq(), CallMouseUserHandlers(), DosCallDriver(), DosRestoreState(), DosSaveState(), and VidBiosVideoService().

◆ getBX()

◆ getCF()

ULONG WINAPI getCF ( VOID  )

Definition at line 566 of file registers.c.

567 {
568  return EmulatorContext.Flags.Cf;
569 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosKeyboardIrq(), BiosMiscService(), DosControlBreak(), and DosIdle().

◆ getCH()

UCHAR WINAPI getCH ( VOID  )

Definition at line 242 of file registers.c.

243 {
244  return EmulatorContext.GeneralRegs[FAST486_REG_ECX].HighByte;
245 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosDiskService(), DosInt21h(), and VidBiosVideoService().

◆ getCL()

UCHAR WINAPI getCL ( VOID  )

Definition at line 256 of file registers.c.

257 {
258  return EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowByte;
259 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosDiskService(), DosInt21h(), and VidBiosVideoService().

◆ getCS()

USHORT WINAPI getCS ( VOID  )

Definition at line 480 of file registers.c.

481 {
482  return EmulatorContext.SegmentRegs[FAST486_REG_CS].Selector;
483 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by Call16(), CmdStartComSpec32(), CmdStartExternalCommand(), ControlBop(), DeviceInterruptBop(), DosCmdInterpreterBop(), DosInitialize(), DosStart(), DosSystemBop(), KbdBiosINT(), KbdBiosIRQ(), setEIP(), setIP(), ThirdPartyVDDBop(), and VidBiosINT().

◆ getCX()

◆ getDF()

ULONG WINAPI getDF ( VOID  )

Definition at line 650 of file registers.c.

651 {
652  return EmulatorContext.Flags.Df;
653 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getDH()

UCHAR WINAPI getDH ( VOID  )

Definition at line 300 of file registers.c.

301 {
302  return EmulatorContext.GeneralRegs[FAST486_REG_EDX].HighByte;
303 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosDiskService(), DosInt21h(), VbeService(), and VidBiosVideoService().

◆ getDI()

USHORT WINAPI getDI ( VOID  )

◆ getDL()

UCHAR WINAPI getDL ( VOID  )

Definition at line 314 of file registers.c.

315 {
316  return EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowByte;
317 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosDiskService(), DosInt21h(), VbeService(), VidBiosSetVideoMode(), and VidBiosVideoService().

◆ getDS()

◆ getDX()

◆ getEAX()

ULONG WINAPI getEAX ( VOID  )

Definition at line 100 of file registers.c.

101 {
102  return EmulatorContext.GeneralRegs[FAST486_REG_EAX].Long;
103 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getEBP()

ULONG WINAPI getEBP ( VOID  )

Definition at line 360 of file registers.c.

361 {
362  return EmulatorContext.GeneralRegs[FAST486_REG_EBP].Long;
363 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getEBX()

ULONG WINAPI getEBX ( VOID  )

Definition at line 156 of file registers.c.

157 {
158  return EmulatorContext.GeneralRegs[FAST486_REG_EBX].Long;
159 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMiscService().

◆ getECX()

ULONG WINAPI getECX ( VOID  )

Definition at line 214 of file registers.c.

215 {
216  return EmulatorContext.GeneralRegs[FAST486_REG_ECX].Long;
217 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMiscService().

◆ getEDI()

ULONG WINAPI getEDI ( VOID  )

Definition at line 420 of file registers.c.

421 {
422  return EmulatorContext.GeneralRegs[FAST486_REG_EDI].Long;
423 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getEDX()

ULONG WINAPI getEDX ( VOID  )

Definition at line 272 of file registers.c.

273 {
274  return EmulatorContext.GeneralRegs[FAST486_REG_EDX].Long;
275 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMiscService().

◆ getEFLAGS()

ULONG WINAPI getEFLAGS ( VOID  )

Definition at line 680 of file registers.c.

681 {
682  return EmulatorContext.Flags.Long;
683 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by DosLoadExecutableInternal(), DosStart(), KbdBiosINT(), KbdBiosIRQ(), and VidBiosINT().

◆ getEIP()

ULONG WINAPI getEIP ( VOID  )

Definition at line 450 of file registers.c.

451 {
452  return EmulatorContext.InstPtr.Long;
453 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getES()

◆ getESI()

ULONG WINAPI getESI ( VOID  )

Definition at line 390 of file registers.c.

391 {
392  return EmulatorContext.GeneralRegs[FAST486_REG_ESI].Long;
393 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getESP()

ULONG WINAPI getESP ( VOID  )

Definition at line 330 of file registers.c.

331 {
332  return EmulatorContext.GeneralRegs[FAST486_REG_ESP].Long;
333 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getFS()

USHORT WINAPI getFS ( VOID  )

Definition at line 536 of file registers.c.

537 {
538  return EmulatorContext.SegmentRegs[FAST486_REG_FS].Selector;
539 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getGS()

USHORT WINAPI getGS ( VOID  )

Definition at line 550 of file registers.c.

551 {
552  return EmulatorContext.SegmentRegs[FAST486_REG_GS].Selector;
553 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getIF()

ULONG WINAPI getIF ( VOID  )

Definition at line 636 of file registers.c.

637 {
638  return EmulatorContext.Flags.If;
639 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by VbeResetExtendedRegisters(), and VbeSetExtendedRegisters().

◆ getIntelRegistersPointer()

PVOID WINAPI getIntelRegistersPointer ( VOID  )

Definition at line 29 of file registers.c.

30 {
31  /*
32  * Sync the Intel Registers x86 Context with our CPU context
33  */
34 
36  {
37  IntelRegPtr.Dr0 = EmulatorContext.DebugRegisters[FAST486_REG_DR0];
38  IntelRegPtr.Dr1 = EmulatorContext.DebugRegisters[FAST486_REG_DR1];
39  IntelRegPtr.Dr2 = EmulatorContext.DebugRegisters[FAST486_REG_DR2];
40  IntelRegPtr.Dr3 = EmulatorContext.DebugRegisters[FAST486_REG_DR3];
41  IntelRegPtr.Dr6 = EmulatorContext.DebugRegisters[FAST486_REG_DR6];
42  IntelRegPtr.Dr7 = EmulatorContext.DebugRegisters[FAST486_REG_DR7];
43  }
44 
45 #ifndef FAST486_NO_FPU
47  {
48  // IntelRegPtr.FloatSave = ;
51  // IntelRegPtr.FloatSave.TagWord = ;
52  // IntelRegPtr.FloatSave.ErrorOffset = ;
53  // IntelRegPtr.FloatSave.ErrorSelector = ;
54  // IntelRegPtr.FloatSave.DataOffset = ;
55  // IntelRegPtr.FloatSave.DataSelector = ;
56  // IntelRegPtr.FloatSave.RegisterArea = ; // This is a region of size SIZE_OF_80387_REGISTERS == 80 bytes
57  // IntelRegPtr.FloatSave.Cr0NpxState = ;
58  }
59 #endif
60 
62  {
63  IntelRegPtr.SegGs = EmulatorContext.SegmentRegs[FAST486_REG_GS].Selector;
64  IntelRegPtr.SegFs = EmulatorContext.SegmentRegs[FAST486_REG_FS].Selector;
65  IntelRegPtr.SegEs = EmulatorContext.SegmentRegs[FAST486_REG_ES].Selector;
66  IntelRegPtr.SegDs = EmulatorContext.SegmentRegs[FAST486_REG_DS].Selector;
67  }
68 
70  {
71  IntelRegPtr.Edi = EmulatorContext.GeneralRegs[FAST486_REG_EDI].Long;
72  IntelRegPtr.Esi = EmulatorContext.GeneralRegs[FAST486_REG_ESI].Long;
73  IntelRegPtr.Ebx = EmulatorContext.GeneralRegs[FAST486_REG_EBX].Long;
74  IntelRegPtr.Edx = EmulatorContext.GeneralRegs[FAST486_REG_EDX].Long;
75  IntelRegPtr.Ecx = EmulatorContext.GeneralRegs[FAST486_REG_ECX].Long;
76  IntelRegPtr.Eax = EmulatorContext.GeneralRegs[FAST486_REG_EAX].Long;
77  }
78 
80  {
81  IntelRegPtr.Ebp = EmulatorContext.GeneralRegs[FAST486_REG_EBP].Long;
82  IntelRegPtr.Eip = EmulatorContext.InstPtr.Long;
83  IntelRegPtr.SegCs = EmulatorContext.SegmentRegs[FAST486_REG_CS].Selector;
84  IntelRegPtr.EFlags = EmulatorContext.Flags.Long;
85  IntelRegPtr.Esp = EmulatorContext.GeneralRegs[FAST486_REG_ESP].Long;
86  IntelRegPtr.SegSs = EmulatorContext.SegmentRegs[FAST486_REG_SS].Selector;
87  }
88 
90  {
91  // IntelRegPtr.ExtendedRegisters = ;
92  }
93 
94  /* Return the address of the Intel Registers x86 Context */
95  return &IntelRegPtr;
96 }
#define CONTEXT_CONTROL
Definition: nt_native.h:1369
ULONG Dr3
Definition: x86context.h:88
X86CONTEXT IntelRegPtr
Definition: registers.c:23
#define CONTEXT_EXTENDED_REGISTERS
ULONG SegDs
Definition: x86context.h:105
#define CONTEXT_FLOATING_POINT
Definition: nt_native.h:1372
ULONG Dr0
Definition: x86context.h:85
#define CONTEXT_SEGMENTS
Definition: nt_native.h:1371
ULONG Dr7
Definition: x86context.h:90
ULONG SegCs
Definition: x86context.h:124
ULONG SegFs
Definition: x86context.h:103
ULONG SegEs
Definition: x86context.h:104
ULONG Dr6
Definition: x86context.h:89
#define CONTEXT_DEBUG_REGISTERS
Definition: nt_native.h:1373
ULONG SegSs
Definition: x86context.h:127
ULONG EFlags
Definition: x86context.h:125
FAST486_STATE EmulatorContext
Definition: cpu.c:39
ULONG ContextFlags
Definition: x86context.h:79
ULONG Dr2
Definition: x86context.h:87
ULONG Dr1
Definition: x86context.h:86
#define CONTEXT_INTEGER
Definition: nt_native.h:1370
X87FLOATING_SAVE_AREA FloatSave
Definition: x86context.h:96
ULONG SegGs
Definition: x86context.h:102

◆ getIP()

◆ getMSW()

USHORT WINAPI getMSW ( VOID  )

Definition at line 696 of file registers.c.

697 {
698  return LOWORD(EmulatorContext.ControlRegisters[FAST486_REG_CR0]);
699 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39
#define LOWORD(l)
Definition: pedump.c:82

◆ getOF()

ULONG WINAPI getOF ( VOID  )

Definition at line 664 of file registers.c.

665 {
666  return EmulatorContext.Flags.Of;
667 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getPF()

ULONG WINAPI getPF ( VOID  )

Definition at line 580 of file registers.c.

581 {
582  return EmulatorContext.Flags.Pf;
583 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getSF()

ULONG WINAPI getSF ( VOID  )

Definition at line 622 of file registers.c.

623 {
624  return EmulatorContext.Flags.Sf;
625 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ getSI()

USHORT WINAPI getSI ( VOID  )

Definition at line 404 of file registers.c.

405 {
406  return EmulatorContext.GeneralRegs[FAST486_REG_ESI].LowWord;
407 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosKeyboardIrq(), BiosMiscService(), BiosTimerIrq(), CallMouseUserHandlers(), CmdStartExternalCommand(), DosCallDriver(), DosInt21h(), DosInt2Fh(), DosRestoreState(), DosSaveState(), EmsIntHandler(), ThirdPartyVDDBop(), and XmsBopProcedure().

◆ getSP()

USHORT WINAPI getSP ( VOID  )

Definition at line 344 of file registers.c.

345 {
346  return EmulatorContext.GeneralRegs[FAST486_REG_ESP].LowWord;
347 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMouseIrq(), DosAbsoluteRead(), DosAbsoluteWrite(), DosInt21h(), DosLoadExecutableInternal(), DosRestoreState(), DosSaveState(), DosStart(), and DosTerminateProcess().

◆ getSS()

USHORT WINAPI getSS ( VOID  )

Definition at line 494 of file registers.c.

495 {
496  return EmulatorContext.SegmentRegs[FAST486_REG_SS].Selector;
497 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMouseIrq(), DosInt21h(), DosLoadExecutableInternal(), DosRestoreState(), DosSaveState(), DosStart(), DosTerminateProcess(), setESP(), and setSP().

◆ getZF()

ULONG WINAPI getZF ( VOID  )

Definition at line 608 of file registers.c.

609 {
610  return EmulatorContext.Flags.Zf;
611 }
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by ConDrvInputStatus().

◆ setAF()

VOID WINAPI setAF ( ULONG  )

Definition at line 601 of file registers.c.

602 {
603  EmulatorContext.Flags.Af = !!(Flag & 1);
604 }
Definition: xml2sdb.h:79
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setAH()

VOID WINAPI setAH ( UCHAR  )

Definition at line 135 of file registers.c.

136 {
137  EmulatorContext.GeneralRegs[FAST486_REG_EAX].HighByte = Value;
138 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosCharPrint(), BiosDiskService(), BiosKeyboardIrq(), BiosMiscService(), BiosMousePs2Interface(), BiosPs2Service(), ConDrvInputStatus(), ConDrvReadInput(), Dem_BiosCharPrint(), DosFastConOut(), DosInt21h(), EmsIntHandler(), and VbeService().

◆ setAL()

◆ setAX()

◆ setBH()

VOID WINAPI setBH ( UCHAR  )

Definition at line 191 of file registers.c.

192 {
193  EmulatorContext.GeneralRegs[FAST486_REG_EBX].HighByte = Value;
194 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosCharPrint(), BiosMousePs2Interface(), Dem_BiosCharPrint(), DosFastConOut(), DosInt21h(), VidBiosVideoService(), and XmsBopProcedure().

◆ setBL()

VOID WINAPI setBL ( UCHAR  )

Definition at line 205 of file registers.c.

206 {
207  EmulatorContext.GeneralRegs[FAST486_REG_EBX].LowByte = Value;
208 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosCharPrint(), BiosDiskService(), BiosMousePs2Interface(), Dem_BiosCharPrint(), DosFastConOut(), DosInt21h(), VidBiosVideoService(), XmsBopProcedure(), XmsLocalDisableA20(), and XmsLocalEnableA20().

◆ setBP()

VOID WINAPI setBP ( USHORT  )

Definition at line 381 of file registers.c.

382 {
383  EmulatorContext.GeneralRegs[FAST486_REG_EBP].LowWord = Value;
384 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosKeyboardIrq(), BiosTimerIrq(), CallMouseUserHandlers(), DosCallDriver(), DosLoadExecutableInternal(), DosRestoreState(), and VidBiosVideoService().

◆ setBX()

◆ setCF()

◆ setCH()

VOID WINAPI setCH ( UCHAR  )

Definition at line 249 of file registers.c.

250 {
251  EmulatorContext.GeneralRegs[FAST486_REG_ECX].HighByte = Value;
252 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosDiskService(), BiosTimeService(), DosMouseService(), and VidBiosVideoService().

◆ setCL()

VOID WINAPI setCL ( UCHAR  )

Definition at line 263 of file registers.c.

264 {
265  EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowByte = Value;
266 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosDiskService(), BiosMousePs2Interface(), BiosTimeService(), DosMouseService(), and VidBiosVideoService().

◆ setCS()

VOID WINAPI setCS ( USHORT  )

Definition at line 487 of file registers.c.

488 {
489  Fast486SetSegment(&EmulatorContext, FAST486_REG_CS, Value);
490 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetSegment(PFAST486_STATE State, FAST486_SEG_REGS Segment, USHORT Selector)
Definition: fast486.c:242
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by Bios32Post(), Call16(), DosInitialize(), KbdBiosINT(), KbdBiosIRQ(), and VidBiosINT().

◆ setCX()

VOID WINAPI setCX ( USHORT  )

Definition at line 235 of file registers.c.

236 {
237  EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowWord = Value;
238 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosDiskService(), BiosKeyboardIrq(), BiosMiscService(), BiosTimerIrq(), BiosTimeService(), CallMouseUserHandlers(), DosCallDriver(), DosInt21h(), DosLoadExecutableInternal(), DosMouseService(), DosRestoreState(), EmsIntHandler(), VbeService(), and VidBiosVideoService().

◆ setDF()

VOID WINAPI setDF ( ULONG  )

Definition at line 657 of file registers.c.

658 {
659  EmulatorContext.Flags.Df = !!(Flag & 1);
660 }
Definition: xml2sdb.h:79
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setDH()

VOID WINAPI setDH ( UCHAR  )

Definition at line 307 of file registers.c.

308 {
309  EmulatorContext.GeneralRegs[FAST486_REG_EDX].HighByte = Value;
310 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosDiskService(), BiosTimeService(), DosInt21h(), and VidBiosVideoService().

◆ setDI()

VOID WINAPI setDI ( USHORT  )

Definition at line 441 of file registers.c.

442 {
443  EmulatorContext.GeneralRegs[FAST486_REG_EDI].LowWord = Value;
444 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosDiskService(), BiosKeyboardIrq(), BiosTimerIrq(), CallMouseUserHandlers(), DosCallDriver(), DosLoadExecutableInternal(), DosMouseService(), and DosRestoreState().

◆ setDL()

VOID WINAPI setDL ( UCHAR  )

Definition at line 321 of file registers.c.

322 {
323  EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowByte = Value;
324 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosDiskService(), BiosMousePs2Interface(), BiosTimeService(), DosInt21h(), and VidBiosVideoService().

◆ setDS()

VOID WINAPI setDS ( USHORT  )

Definition at line 515 of file registers.c.

516 {
517  Fast486SetSegment(&EmulatorContext, FAST486_REG_DS, Value);
518 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetSegment(PFAST486_STATE State, FAST486_SEG_REGS Segment, USHORT Selector)
Definition: fast486.c:242
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by Bios32Post(), BiosKeyboardIrq(), BiosTimerIrq(), CallMouseUserHandlers(), DosBIOSInitialize(), DosCallDriver(), DosInt21h(), DosInt2Fh(), DosKRNLInitialize(), DosLoadExecutableInternal(), DosRestoreState(), and InitRomRange().

◆ setDX()

◆ setEAX()

VOID WINAPI setEAX ( ULONG  )

Definition at line 107 of file registers.c.

108 {
109  EmulatorContext.GeneralRegs[FAST486_REG_EAX].Long = Value;
110 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMiscService().

◆ setEBP()

VOID WINAPI setEBP ( ULONG  )

Definition at line 367 of file registers.c.

368 {
369  EmulatorContext.GeneralRegs[FAST486_REG_EBP].Long = Value;
370 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setEBX()

VOID WINAPI setEBX ( ULONG  )

Definition at line 163 of file registers.c.

164 {
165  EmulatorContext.GeneralRegs[FAST486_REG_EBX].Long = Value;
166 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMiscService().

◆ setECX()

VOID WINAPI setECX ( ULONG  )

Definition at line 221 of file registers.c.

222 {
223  EmulatorContext.GeneralRegs[FAST486_REG_ECX].Long = Value;
224 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosMiscService().

◆ setEDI()

VOID WINAPI setEDI ( ULONG  )

Definition at line 427 of file registers.c.

428 {
429  EmulatorContext.GeneralRegs[FAST486_REG_EDI].Long = Value;
430 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setEDX()

VOID WINAPI setEDX ( ULONG  )

Definition at line 279 of file registers.c.

280 {
281  EmulatorContext.GeneralRegs[FAST486_REG_EDX].Long = Value;
282 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setEFLAGS()

VOID WINAPI setEFLAGS ( ULONG  )

Definition at line 687 of file registers.c.

688 {
689  EmulatorContext.Flags.Long = Flags;
690 }
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by DosLoadExecutableInternal(), KbdBiosINT(), KbdBiosIRQ(), and VidBiosINT().

◆ setEIP()

VOID WINAPI setEIP ( ULONG  )

Definition at line 457 of file registers.c.

458 {
459  CpuExecute(getCS(), Value);
460 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
USHORT WINAPI getCS(VOID)
Definition: registers.c:480
VOID CpuExecute(WORD Segment, WORD Offset)
Definition: cpu.c:102

◆ setES()

VOID WINAPI setES ( USHORT  )

Definition at line 529 of file registers.c.

530 {
531  Fast486SetSegment(&EmulatorContext, FAST486_REG_ES, Value);
532 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetSegment(PFAST486_STATE State, FAST486_SEG_REGS Segment, USHORT Selector)
Definition: fast486.c:242
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosBootstrapLoader(), BiosDiskService(), BiosKeyboardIrq(), BiosMiscService(), BiosTimerIrq(), CallMouseUserHandlers(), DosCallDriver(), DosInt21h(), DosInt2Fh(), DosLoadExecutableInternal(), DosMouseService(), DosRestoreState(), and VidBiosVideoService().

◆ setESI()

VOID WINAPI setESI ( ULONG  )

Definition at line 397 of file registers.c.

398 {
399  EmulatorContext.GeneralRegs[FAST486_REG_ESI].Long = Value;
400 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setESP()

VOID WINAPI setESP ( ULONG  )

Definition at line 337 of file registers.c.

338 {
340 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetStack(PFAST486_STATE State, USHORT Segment, ULONG Offset)
Definition: fast486.c:227
USHORT WINAPI getSS(VOID)
Definition: registers.c:494
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setFS()

VOID WINAPI setFS ( USHORT  )

Definition at line 543 of file registers.c.

544 {
545  Fast486SetSegment(&EmulatorContext, FAST486_REG_FS, Value);
546 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetSegment(PFAST486_STATE State, FAST486_SEG_REGS Segment, USHORT Selector)
Definition: fast486.c:242
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setGS()

VOID WINAPI setGS ( USHORT  )

Definition at line 557 of file registers.c.

558 {
559  Fast486SetSegment(&EmulatorContext, FAST486_REG_GS, Value);
560 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetSegment(PFAST486_STATE State, FAST486_SEG_REGS Segment, USHORT Selector)
Definition: fast486.c:242
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setIF()

VOID WINAPI setIF ( ULONG  )

Definition at line 643 of file registers.c.

644 {
645  EmulatorContext.Flags.If = !!(Flag & 1);
646 }
Definition: xml2sdb.h:79
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by Bios32Post(), BiosInitialize(), VbeResetExtendedRegisters(), VbeSetExtendedRegisters(), and VgaSetRegisters().

◆ setIP()

VOID WINAPI setIP ( USHORT  )

Definition at line 471 of file registers.c.

472 {
473  CpuExecute(getCS(), Value);
474 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
USHORT WINAPI getCS(VOID)
Definition: registers.c:480
VOID CpuExecute(WORD Segment, WORD Offset)
Definition: cpu.c:102

Referenced by Bios32Post(), Call16(), ControlBop(), DosCmdInterpreterBop(), DosInitialize(), DosSystemBop(), KbdBiosINT(), KbdBiosIRQ(), ThirdPartyVDDBop(), and VidBiosINT().

◆ setMSW()

VOID WINAPI setMSW ( USHORT  )

Definition at line 703 of file registers.c.

704 {
705  /* Set the lower 16 bits (Machine Status Word) of CR0 */
706  EmulatorContext.ControlRegisters[FAST486_REG_CR0] &= 0xFFFF0000;
707  EmulatorContext.ControlRegisters[FAST486_REG_CR0] |= Value & 0xFFFF;
708 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setOF()

VOID WINAPI setOF ( ULONG  )

Definition at line 671 of file registers.c.

672 {
673  EmulatorContext.Flags.Of = !!(Flag & 1);
674 }
Definition: xml2sdb.h:79
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setPF()

VOID WINAPI setPF ( ULONG  )

Definition at line 587 of file registers.c.

588 {
589  EmulatorContext.Flags.Pf = !!(Flag & 1);
590 }
Definition: xml2sdb.h:79
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setSF()

VOID WINAPI setSF ( ULONG  )

Definition at line 629 of file registers.c.

630 {
631  EmulatorContext.Flags.Sf = !!(Flag & 1);
632 }
Definition: xml2sdb.h:79
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ setSI()

VOID WINAPI setSI ( USHORT  )

Definition at line 411 of file registers.c.

412 {
413  EmulatorContext.GeneralRegs[FAST486_REG_ESI].LowWord = Value;
414 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by BiosKeyboardIrq(), BiosTimerIrq(), CallMouseUserHandlers(), DosCallDriver(), DosInt21h(), DosLoadExecutableInternal(), and DosRestoreState().

◆ setSP()

VOID WINAPI setSP ( USHORT  )

Definition at line 351 of file registers.c.

352 {
354 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetStack(PFAST486_STATE State, USHORT Segment, ULONG Offset)
Definition: fast486.c:227
USHORT WINAPI getSS(VOID)
Definition: registers.c:494
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by Bios32Post(), BiosMouseIrq(), DosAbsoluteRead(), DosAbsoluteWrite(), DosBIOSInitialize(), DosKRNLInitialize(), DosLoadExecutableInternal(), DosRestoreState(), DosSaveState(), DosStart(), and DosTerminateProcess().

◆ setSS()

VOID WINAPI setSS ( USHORT  )

Definition at line 501 of file registers.c.

502 {
503  Fast486SetSegment(&EmulatorContext, FAST486_REG_SS, Value);
504 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
VOID NTAPI Fast486SetSegment(PFAST486_STATE State, FAST486_SEG_REGS Segment, USHORT Selector)
Definition: fast486.c:242
FAST486_STATE EmulatorContext
Definition: cpu.c:39

Referenced by Bios32Post(), DosBIOSInitialize(), DosKRNLInitialize(), DosLoadExecutableInternal(), and DosTerminateProcess().

◆ setZF()

VOID WINAPI setZF ( ULONG  )

Definition at line 615 of file registers.c.

616 {
617  EmulatorContext.Flags.Zf = !!(Flag & 1);
618 }
Definition: xml2sdb.h:79
FAST486_STATE EmulatorContext
Definition: cpu.c:39

◆ Sim32FlushVDMPointer()

BOOLEAN WINAPI Sim32FlushVDMPointer ( _In_ ULONG  Address,
_In_ ULONG  Size,
_In_ PBYTE  Buffer,
_In_ BOOLEAN  ProtectedMode 
)

◆ Sim32GetVDMPointer()

PBYTE WINAPI Sim32GetVDMPointer ( _In_ ULONG  Address,
_In_ ULONG  Size,
_In_ BOOLEAN  ProtectedMode 
)

◆ Sim32pGetVDMPointer()

PBYTE WINAPI Sim32pGetVDMPointer ( _In_ ULONG  Address,
_In_ BOOLEAN  ProtectedMode 
)