1
0
Fork 0

Added HLT instruction

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1053
This commit is contained in:
Sjoerd van der Berg 2003-06-14 07:24:17 +00:00
parent 94ea572dc1
commit 5794ebcb0e
4 changed files with 10 additions and 2 deletions

View file

@ -103,7 +103,7 @@ bool CPU_IRET(bool use32);
bool CPU_SetSegGeneral(SegNames seg,Bitu value);
void CPU_CPUID(void);
void CPU_HLT(void);
//Flag Handling
Bitu get_CF(void);
@ -386,6 +386,9 @@ struct CPUBlock {
struct {
Bitu prefix,entry;
} full;
struct {
Bitu eip,cs;
} hlt;
};
extern CPUBlock cpu;

View file

@ -469,6 +469,10 @@ l_M_Ed:
case D_CPUID:
CPU_CPUID();
goto nextopcode;
case D_HLT:
SaveIP();
CPU_HLT();
return 0x0;
default:
LOG(LOG_CPU,LOG_ERROR)("LOAD:Unhandled code %d opcode %X",inst.code.load,inst.entry);
break;

View file

@ -172,7 +172,7 @@ static OpCode OpCodeTable[1024]={
/* 0xf0 - 0xf7 */
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
{L_PREREPNE ,0 ,0 ,0 },{L_PREREP ,0 ,0 ,0 },
{0 ,0 ,0 ,0 },{D_CMC ,0 ,0 ,0 },
{D_HLT ,0 ,0 ,0 },{D_CMC ,0 ,0 ,0 },
{L_MODRM ,8 ,0 ,M_GRP },{L_MODRM ,9 ,0 ,M_GRP },
/* 0xf8 - 0xff */
{D_CLC ,0 ,0 ,0 },{D_STC ,0 ,0 ,0 },

View file

@ -44,6 +44,7 @@ enum {
D_RETFw,D_RETFd,
D_RETFwIw,D_RETFdIw,
D_CPUID,
D_HLT,
};