From 40a4d72267bf344805faa5f3b957f066603946fd Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Tue, 3 Jun 2003 18:06:53 +0000 Subject: [PATCH] Some more 0x0f prefixed instructions related to protected mode. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1040 --- src/cpu/core_16/prefix_of.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/cpu/core_16/prefix_of.h b/src/cpu/core_16/prefix_of.h index 21c1d46e..55450955 100644 --- a/src/cpu/core_16/prefix_of.h +++ b/src/cpu/core_16/prefix_of.h @@ -97,12 +97,38 @@ switch(Fetchb()) { } } break; + case 0x20: /* MOV Rd.CRx */ + { + GetRM; + Bitu which=(rm >> 3) & 7; + if (rm >= 0xc0 ) { + GetEArd; + *eard=CPU_GET_CRX(which); + } else { + GetEAa; + LOG(LOG_CPU,LOG_ERROR)("MOV XXX,CR%d with non-register",which); + } + } + break; + case 0x22: /* MOV CRx,Rd */ + { + GetRM; + Bitu which=(rm >> 3) & 7; + if (rm >= 0xc0 ) { + GetEArd; + if (!CPU_SET_CRX(which,*eard)) goto decode_end; + } else { + GetEAa; + LOG(LOG_CPU,LOG_ERROR)("MOV CR%,XXX with non-register",which); + } + } + break; case 0x23: /* MOV DRx,Rd */ { GetRM; Bitu which=(rm >> 3) & 7; if (rm >= 0xc0 ) { - GetEArw; + GetEArd; } else { GetEAa; LOG(LOG_CPU,LOG_ERROR)("MOV DR%,XXX with non-register",which);