Added HLT instruction
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1053
This commit is contained in:
parent
94ea572dc1
commit
5794ebcb0e
4 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 },
|
||||
|
|
|
@ -44,6 +44,7 @@ enum {
|
|||
D_RETFw,D_RETFd,
|
||||
D_RETFwIw,D_RETFdIw,
|
||||
D_CPUID,
|
||||
D_HLT,
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue