ReactOS 0.4.15-dev-7953-g1f49173
registers.c File Reference
#include "ntvdm.h"
#include <debug.h>
#include "emulator.h"
#include "cpu.h"
#include "x86context.h"
Include dependency graph for registers.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

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

Variables

X86CONTEXT IntelRegPtr
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file registers.c.

Function Documentation

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

◆ getAL()

UCHAR WINAPI getAL ( VOID  )

Definition at line 142 of file registers.c.

143{
144 return EmulatorContext.GeneralRegs[FAST486_REG_EAX].LowByte;
145}

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}

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}

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}

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}

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}

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}

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

◆ getCS()

◆ getCX()

◆ getDF()

ULONG WINAPI getDF ( VOID  )

Definition at line 650 of file registers.c.

651{
652 return EmulatorContext.Flags.Df;
653}

◆ getDH()

UCHAR WINAPI getDH ( VOID  )

Definition at line 300 of file registers.c.

301{
302 return EmulatorContext.GeneralRegs[FAST486_REG_EDX].HighByte;
303}

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

◆ getDI()

◆ getDL()

UCHAR WINAPI getDL ( VOID  )

Definition at line 314 of file registers.c.

315{
316 return EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowByte;
317}

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}

◆ getEBP()

ULONG WINAPI getEBP ( VOID  )

Definition at line 360 of file registers.c.

361{
362 return EmulatorContext.GeneralRegs[FAST486_REG_EBP].Long;
363}

◆ getEBX()

ULONG WINAPI getEBX ( VOID  )

Definition at line 156 of file registers.c.

157{
158 return EmulatorContext.GeneralRegs[FAST486_REG_EBX].Long;
159}

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}

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}

◆ getEDX()

ULONG WINAPI getEDX ( VOID  )

Definition at line 272 of file registers.c.

273{
274 return EmulatorContext.GeneralRegs[FAST486_REG_EDX].Long;
275}

Referenced by BiosMiscService().

◆ getEFLAGS()

ULONG WINAPI getEFLAGS ( VOID  )

Definition at line 680 of file registers.c.

681{
682 return EmulatorContext.Flags.Long;
683}

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}

◆ getES()

◆ getESI()

ULONG WINAPI getESI ( VOID  )

Definition at line 390 of file registers.c.

391{
392 return EmulatorContext.GeneralRegs[FAST486_REG_ESI].Long;
393}

◆ getESP()

ULONG WINAPI getESP ( VOID  )

Definition at line 330 of file registers.c.

331{
332 return EmulatorContext.GeneralRegs[FAST486_REG_ESP].Long;
333}

◆ getFS()

USHORT WINAPI getFS ( VOID  )

Definition at line 536 of file registers.c.

537{
538 return EmulatorContext.SegmentRegs[FAST486_REG_FS].Selector;
539}

◆ getGS()

USHORT WINAPI getGS ( VOID  )

Definition at line 550 of file registers.c.

551{
552 return EmulatorContext.SegmentRegs[FAST486_REG_GS].Selector;
553}

◆ getIF()

ULONG WINAPI getIF ( VOID  )

Definition at line 636 of file registers.c.

637{
638 return EmulatorContext.Flags.If;
639}

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;
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_DEBUG_REGISTERS
Definition: nt_native.h:1373
#define CONTEXT_CONTROL
Definition: nt_native.h:1369
#define CONTEXT_INTEGER
Definition: nt_native.h:1370
#define CONTEXT_FLOATING_POINT
Definition: nt_native.h:1372
#define CONTEXT_SEGMENTS
Definition: nt_native.h:1371
X86CONTEXT IntelRegPtr
Definition: registers.c:23
#define CONTEXT_EXTENDED_REGISTERS
ULONG SegEs
Definition: x86context.h:104
ULONG Dr6
Definition: x86context.h:89
ULONG SegDs
Definition: x86context.h:105
ULONG Dr2
Definition: x86context.h:87
ULONG ContextFlags
Definition: x86context.h:79
ULONG EFlags
Definition: x86context.h:125
ULONG Dr7
Definition: x86context.h:90
X87FLOATING_SAVE_AREA FloatSave
Definition: x86context.h:96
ULONG SegGs
Definition: x86context.h:102
ULONG SegSs
Definition: x86context.h:127
ULONG SegCs
Definition: x86context.h:124
ULONG Dr1
Definition: x86context.h:86
ULONG Dr3
Definition: x86context.h:88
ULONG Dr0
Definition: x86context.h:85
ULONG SegFs
Definition: x86context.h:103

◆ getIP()

◆ getMSW()

USHORT WINAPI getMSW ( VOID  )

Definition at line 696 of file registers.c.

697{
698 return LOWORD(EmulatorContext.ControlRegisters[FAST486_REG_CR0]);
699}
#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}

◆ getPF()

ULONG WINAPI getPF ( VOID  )

Definition at line 580 of file registers.c.

581{
582 return EmulatorContext.Flags.Pf;
583}

◆ getSF()

ULONG WINAPI getSF ( VOID  )

Definition at line 622 of file registers.c.

623{
624 return EmulatorContext.Flags.Sf;
625}

◆ getSI()

◆ getSP()

USHORT WINAPI getSP ( VOID  )

Definition at line 344 of file registers.c.

345{
346 return EmulatorContext.GeneralRegs[FAST486_REG_ESP].LowWord;
347}

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}

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}

Referenced by ConDrvInputStatus().

◆ setAF()

VOID WINAPI setAF ( ULONG  Flag)

Definition at line 601 of file registers.c.

602{
603 EmulatorContext.Flags.Af = !!(Flag & 1);
604}
Definition: xml2sdb.h:80

◆ setAH()

VOID WINAPI setAH ( UCHAR  Value)

Definition at line 135 of file registers.c.

136{
137 EmulatorContext.GeneralRegs[FAST486_REG_EAX].HighByte = Value;
138}
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

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

Definition at line 191 of file registers.c.

192{
193 EmulatorContext.GeneralRegs[FAST486_REG_EBX].HighByte = Value;
194}

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

◆ setBL()

◆ setBP()

VOID WINAPI setBP ( USHORT  Value)

Definition at line 381 of file registers.c.

382{
383 EmulatorContext.GeneralRegs[FAST486_REG_EBP].LowWord = Value;
384}

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

◆ setBX()

◆ setCF()

◆ setCH()

VOID WINAPI setCH ( UCHAR  Value)

Definition at line 249 of file registers.c.

250{
251 EmulatorContext.GeneralRegs[FAST486_REG_ECX].HighByte = Value;
252}

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

◆ setCL()

VOID WINAPI setCL ( UCHAR  Value)

Definition at line 263 of file registers.c.

264{
265 EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowByte = Value;
266}

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

◆ setCS()

VOID WINAPI setCS ( USHORT  Value)

Definition at line 487 of file registers.c.

488{
489 Fast486SetSegment(&EmulatorContext, FAST486_REG_CS, Value);
490}
VOID NTAPI Fast486SetSegment(PFAST486_STATE State, FAST486_SEG_REGS Segment, USHORT Selector)
Definition: fast486.c:242

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

◆ setCX()

◆ setDF()

VOID WINAPI setDF ( ULONG  Flag)

Definition at line 657 of file registers.c.

658{
659 EmulatorContext.Flags.Df = !!(Flag & 1);
660}

◆ setDH()

VOID WINAPI setDH ( UCHAR  Value)

Definition at line 307 of file registers.c.

308{
309 EmulatorContext.GeneralRegs[FAST486_REG_EDX].HighByte = Value;
310}

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

◆ setDI()

VOID WINAPI setDI ( USHORT  Value)

Definition at line 441 of file registers.c.

442{
443 EmulatorContext.GeneralRegs[FAST486_REG_EDI].LowWord = Value;
444}

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

◆ setDL()

VOID WINAPI setDL ( UCHAR  Value)

Definition at line 321 of file registers.c.

322{
323 EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowByte = Value;
324}

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

◆ setDS()

◆ setDX()

◆ setEAX()

VOID WINAPI setEAX ( ULONG  Value)

Definition at line 107 of file registers.c.

108{
109 EmulatorContext.GeneralRegs[FAST486_REG_EAX].Long = Value;
110}

Referenced by BiosMiscService().

◆ setEBP()

VOID WINAPI setEBP ( ULONG  Value)

Definition at line 367 of file registers.c.

368{
369 EmulatorContext.GeneralRegs[FAST486_REG_EBP].Long = Value;
370}

◆ setEBX()

VOID WINAPI setEBX ( ULONG  Value)

Definition at line 163 of file registers.c.

164{
165 EmulatorContext.GeneralRegs[FAST486_REG_EBX].Long = Value;
166}

Referenced by BiosMiscService().

◆ setECX()

VOID WINAPI setECX ( ULONG  Value)

Definition at line 221 of file registers.c.

222{
223 EmulatorContext.GeneralRegs[FAST486_REG_ECX].Long = Value;
224}

Referenced by BiosMiscService().

◆ setEDI()

VOID WINAPI setEDI ( ULONG  Value)

Definition at line 427 of file registers.c.

428{
429 EmulatorContext.GeneralRegs[FAST486_REG_EDI].Long = Value;
430}

◆ setEDX()

VOID WINAPI setEDX ( ULONG  Value)

Definition at line 279 of file registers.c.

280{
281 EmulatorContext.GeneralRegs[FAST486_REG_EDX].Long = Value;
282}

◆ setEFLAGS()

VOID WINAPI setEFLAGS ( ULONG  Flags)

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

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

◆ setEIP()

VOID WINAPI setEIP ( ULONG  Value)

Definition at line 457 of file registers.c.

458{
460}
USHORT WINAPI getCS(VOID)
Definition: registers.c:480
VOID CpuExecute(WORD Segment, WORD Offset)
Definition: cpu.c:102

◆ setES()

◆ setESI()

VOID WINAPI setESI ( ULONG  Value)

Definition at line 397 of file registers.c.

398{
399 EmulatorContext.GeneralRegs[FAST486_REG_ESI].Long = Value;
400}

◆ setESP()

VOID WINAPI setESP ( ULONG  Value)

Definition at line 337 of file registers.c.

338{
340}
VOID NTAPI Fast486SetStack(PFAST486_STATE State, USHORT Segment, ULONG Offset)
Definition: fast486.c:227
USHORT WINAPI getSS(VOID)
Definition: registers.c:494

◆ setFS()

VOID WINAPI setFS ( USHORT  Value)

Definition at line 543 of file registers.c.

544{
545 Fast486SetSegment(&EmulatorContext, FAST486_REG_FS, Value);
546}

◆ setGS()

VOID WINAPI setGS ( USHORT  Value)

Definition at line 557 of file registers.c.

558{
559 Fast486SetSegment(&EmulatorContext, FAST486_REG_GS, Value);
560}

◆ setIF()

VOID WINAPI setIF ( ULONG  Flag)

Definition at line 643 of file registers.c.

644{
645 EmulatorContext.Flags.If = !!(Flag & 1);
646}

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

◆ setIP()

◆ setMSW()

VOID WINAPI setMSW ( USHORT  Value)

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}

◆ setOF()

VOID WINAPI setOF ( ULONG  Flag)

Definition at line 671 of file registers.c.

672{
673 EmulatorContext.Flags.Of = !!(Flag & 1);
674}

◆ setPF()

VOID WINAPI setPF ( ULONG  Flag)

Definition at line 587 of file registers.c.

588{
589 EmulatorContext.Flags.Pf = !!(Flag & 1);
590}

◆ setSF()

VOID WINAPI setSF ( ULONG  Flag)

Definition at line 629 of file registers.c.

630{
631 EmulatorContext.Flags.Sf = !!(Flag & 1);
632}

◆ setSI()

VOID WINAPI setSI ( USHORT  Value)

Definition at line 411 of file registers.c.

412{
413 EmulatorContext.GeneralRegs[FAST486_REG_ESI].LowWord = Value;
414}

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

◆ setSP()

◆ setSS()

VOID WINAPI setSS ( USHORT  Value)

◆ setZF()

VOID WINAPI setZF ( ULONG  Flag)

Definition at line 615 of file registers.c.

616{
617 EmulatorContext.Flags.Zf = !!(Flag & 1);
618}

Variable Documentation

◆ IntelRegPtr

X86CONTEXT IntelRegPtr

Definition at line 23 of file registers.c.

Referenced by getIntelRegistersPointer().