mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[NTVDM]
- Get rid of EmulatorGetRegister and EmulatorSetRegister and replace their calls with the proper definitions. - Get rid of the enums EMULATOR_REG_* and use the FAST486_REG_* definitions instead. svn path=/branches/ntvdm/; revision=61034
This commit is contained in:
parent
c519c1610e
commit
74933952b5
2 changed files with 63 additions and 108 deletions
|
@ -11,53 +11,10 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
|
||||||
#include "emulator.h"
|
#include "emulator.h"
|
||||||
|
#include "registers.h"
|
||||||
// TODO: Should be moved to fast486.h
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
EMULATOR_REG_EAX,
|
|
||||||
EMULATOR_REG_ECX,
|
|
||||||
EMULATOR_REG_EDX,
|
|
||||||
EMULATOR_REG_EBX,
|
|
||||||
EMULATOR_REG_ESP,
|
|
||||||
EMULATOR_REG_EBP,
|
|
||||||
EMULATOR_REG_ESI,
|
|
||||||
EMULATOR_REG_EDI,
|
|
||||||
|
|
||||||
EMULATOR_REG_ES,
|
|
||||||
EMULATOR_REG_CS,
|
|
||||||
EMULATOR_REG_SS,
|
|
||||||
EMULATOR_REG_DS,
|
|
||||||
EMULATOR_REG_FS,
|
|
||||||
EMULATOR_REG_GS
|
|
||||||
};
|
|
||||||
|
|
||||||
/* PUBLIC FUNCTIONS ***********************************************************/
|
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||||
|
|
||||||
ULONG EmulatorGetRegister(ULONG Register)
|
|
||||||
{
|
|
||||||
if (Register < EMULATOR_REG_ES)
|
|
||||||
{
|
|
||||||
return EmulatorContext.GeneralRegs[Register].Long;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return EmulatorContext.SegmentRegs[Register - EMULATOR_REG_ES].Selector;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID EmulatorSetRegister(ULONG Register, ULONG Value)
|
|
||||||
{
|
|
||||||
if (Register < EMULATOR_REG_ES)
|
|
||||||
{
|
|
||||||
EmulatorContext.GeneralRegs[Register].Long = Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Fast486SetSegment(&EmulatorContext, Register - EMULATOR_REG_ES, (USHORT)Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN EmulatorGetFlag(ULONG Flag)
|
BOOLEAN EmulatorGetFlag(ULONG Flag)
|
||||||
{
|
{
|
||||||
return (EmulatorContext.Flags.Long & Flag) ? TRUE : FALSE;
|
return (EmulatorContext.Flags.Long & Flag) ? TRUE : FALSE;
|
||||||
|
@ -84,112 +41,112 @@ ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getEAX(VOID)
|
getEAX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].Long;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EAX].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setEAX(ULONG Value)
|
setEAX(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].Long = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EAX].Long = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getAX(VOID)
|
getAX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].LowWord;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EAX].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setAX(USHORT Value)
|
setAX(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].LowWord = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EAX].LowWord = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getAH(VOID)
|
getAH(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].HighByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EAX].HighByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setAH(UCHAR Value)
|
setAH(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].HighByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EAX].HighByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getAL(VOID)
|
getAL(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].LowByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EAX].LowByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setAL(UCHAR Value)
|
setAL(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EAX].LowByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EAX].LowByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getEBX(VOID)
|
getEBX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].Long;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EBX].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setEBX(ULONG Value)
|
setEBX(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].Long = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EBX].Long = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getBX(VOID)
|
getBX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].LowWord;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EBX].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setBX(USHORT Value)
|
setBX(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].LowWord = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EBX].LowWord = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getBH(VOID)
|
getBH(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].HighByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EBX].HighByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setBH(UCHAR Value)
|
setBH(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].HighByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EBX].HighByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getBL(VOID)
|
getBL(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].LowByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EBX].LowByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setBL(UCHAR Value)
|
setBL(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EBX].LowByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EBX].LowByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,56 +155,56 @@ ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getECX(VOID)
|
getECX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].Long;
|
return EmulatorContext.GeneralRegs[FAST486_REG_ECX].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setECX(ULONG Value)
|
setECX(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].Long = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_ECX].Long = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getCX(VOID)
|
getCX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].LowWord;
|
return EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setCX(USHORT Value)
|
setCX(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].LowWord = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowWord = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getCH(VOID)
|
getCH(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].HighByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_ECX].HighByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setCH(UCHAR Value)
|
setCH(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].HighByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_ECX].HighByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getCL(VOID)
|
getCL(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].LowByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setCL(UCHAR Value)
|
setCL(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_ECX].LowByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_ECX].LowByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -256,56 +213,56 @@ ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getEDX(VOID)
|
getEDX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].Long;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EDX].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setEDX(ULONG Value)
|
setEDX(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].Long = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EDX].Long = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getDX(VOID)
|
getDX(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].LowWord;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setDX(USHORT Value)
|
setDX(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].LowWord = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowWord = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getDH(VOID)
|
getDH(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].HighByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EDX].HighByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setDH(UCHAR Value)
|
setDH(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].HighByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EDX].HighByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCHAR
|
UCHAR
|
||||||
CDECL
|
CDECL
|
||||||
getDL(VOID)
|
getDL(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].LowByte;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setDL(UCHAR Value)
|
setDL(UCHAR Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EDX].LowByte = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EDX].LowByte = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -314,28 +271,28 @@ ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getESP(VOID)
|
getESP(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorGetRegister(EMULATOR_REG_ESP);
|
return EmulatorContext.GeneralRegs[FAST486_REG_ESP].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setESP(ULONG Value)
|
setESP(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorSetStack(EmulatorGetRegister(EMULATOR_REG_SS), Value);
|
EmulatorSetStack(getSS(), Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getSP(VOID)
|
getSP(VOID)
|
||||||
{
|
{
|
||||||
return LOWORD(EmulatorGetRegister(EMULATOR_REG_ESP));
|
return EmulatorContext.GeneralRegs[FAST486_REG_ESP].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setSP(USHORT Value)
|
setSP(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorSetStack(EmulatorGetRegister(EMULATOR_REG_SS), Value);
|
EmulatorSetStack(getSS(), Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -344,28 +301,28 @@ ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getEBP(VOID)
|
getEBP(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EBP].Long;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EBP].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setEBP(ULONG Value)
|
setEBP(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EBP].Long = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EBP].Long = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getBP(VOID)
|
getBP(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EBP].LowWord;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EBP].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setBP(USHORT Value)
|
setBP(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EBP].LowWord = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EBP].LowWord = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -374,28 +331,28 @@ ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getESI(VOID)
|
getESI(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_ESI].Long;
|
return EmulatorContext.GeneralRegs[FAST486_REG_ESI].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setESI(ULONG Value)
|
setESI(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_ESI].Long = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_ESI].Long = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getSI(VOID)
|
getSI(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_ESI].LowWord;
|
return EmulatorContext.GeneralRegs[FAST486_REG_ESI].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setSI(USHORT Value)
|
setSI(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_ESI].LowWord = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_ESI].LowWord = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -404,28 +361,28 @@ ULONG
|
||||||
CDECL
|
CDECL
|
||||||
getEDI(VOID)
|
getEDI(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EDI].Long;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EDI].Long;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setEDI(ULONG Value)
|
setEDI(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EDI].Long = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EDI].Long = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getDI(VOID)
|
getDI(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorContext.GeneralRegs[EMULATOR_REG_EDI].LowWord;
|
return EmulatorContext.GeneralRegs[FAST486_REG_EDI].LowWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setDI(USHORT Value)
|
setDI(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorContext.GeneralRegs[EMULATOR_REG_EDI].LowWord = Value;
|
EmulatorContext.GeneralRegs[FAST486_REG_EDI].LowWord = Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -441,7 +398,7 @@ VOID
|
||||||
CDECL
|
CDECL
|
||||||
setEIP(ULONG Value)
|
setEIP(ULONG Value)
|
||||||
{
|
{
|
||||||
EmulatorExecute(EmulatorGetRegister(EMULATOR_REG_CS), Value);
|
EmulatorExecute(getCS(), Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
|
@ -455,7 +412,7 @@ VOID
|
||||||
CDECL
|
CDECL
|
||||||
setIP(USHORT Value)
|
setIP(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorExecute(EmulatorGetRegister(EMULATOR_REG_CS), Value);
|
EmulatorExecute(getCS(), Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,84 +421,84 @@ USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getCS(VOID)
|
getCS(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorGetRegister(EMULATOR_REG_CS);
|
return EmulatorContext.SegmentRegs[FAST486_REG_CS].Selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setCS(USHORT Value)
|
setCS(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorSetRegister(EMULATOR_REG_CS, Value);
|
Fast486SetSegment(&EmulatorContext, FAST486_REG_CS, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getSS(VOID)
|
getSS(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorGetRegister(EMULATOR_REG_SS);
|
return EmulatorContext.SegmentRegs[FAST486_REG_SS].Selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setSS(USHORT Value)
|
setSS(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorSetRegister(EMULATOR_REG_SS, Value);
|
Fast486SetSegment(&EmulatorContext, FAST486_REG_SS, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getDS(VOID)
|
getDS(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorGetRegister(EMULATOR_REG_DS);
|
return EmulatorContext.SegmentRegs[FAST486_REG_DS].Selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setDS(USHORT Value)
|
setDS(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorSetRegister(EMULATOR_REG_DS, Value);
|
Fast486SetSegment(&EmulatorContext, FAST486_REG_DS, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getES(VOID)
|
getES(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorGetRegister(EMULATOR_REG_ES);
|
return EmulatorContext.SegmentRegs[FAST486_REG_ES].Selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setES(USHORT Value)
|
setES(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorSetRegister(EMULATOR_REG_ES, Value);
|
Fast486SetSegment(&EmulatorContext, FAST486_REG_ES, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getFS(VOID)
|
getFS(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorGetRegister(EMULATOR_REG_FS);
|
return EmulatorContext.SegmentRegs[FAST486_REG_FS].Selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setFS(USHORT Value)
|
setFS(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorSetRegister(EMULATOR_REG_FS, Value);
|
Fast486SetSegment(&EmulatorContext, FAST486_REG_FS, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
USHORT
|
USHORT
|
||||||
CDECL
|
CDECL
|
||||||
getGS(VOID)
|
getGS(VOID)
|
||||||
{
|
{
|
||||||
return EmulatorGetRegister(EMULATOR_REG_GS);
|
return EmulatorContext.SegmentRegs[FAST486_REG_GS].Selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CDECL
|
CDECL
|
||||||
setGS(USHORT Value)
|
setGS(USHORT Value)
|
||||||
{
|
{
|
||||||
EmulatorSetRegister(EMULATOR_REG_GS, Value);
|
Fast486SetSegment(&EmulatorContext, FAST486_REG_GS, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
/* INCLUDES *******************************************************************/
|
/* INCLUDES *******************************************************************/
|
||||||
|
|
||||||
ULONG EmulatorGetRegister(ULONG Register);
|
|
||||||
VOID EmulatorSetRegister(ULONG Register, ULONG Value);
|
|
||||||
BOOLEAN EmulatorGetFlag(ULONG Flag);
|
BOOLEAN EmulatorGetFlag(ULONG Flag);
|
||||||
VOID EmulatorSetFlag(ULONG Flag);
|
VOID EmulatorSetFlag(ULONG Flag);
|
||||||
VOID EmulatorClearFlag(ULONG Flag);
|
VOID EmulatorClearFlag(ULONG Flag);
|
||||||
|
|
Loading…
Reference in a new issue