VOGONS


First post, by danoon

User metadata
Rank Member
Rank
Member

Normal core

CASE_D(0x8c)												/* Mov Ew,Sw */
{
GetRM;Bit16u val;Bitu which=(rm>>3)&7;
switch (which) {
case 0x00: /* MOV Ew,ES */
val=SegValue(es);break;
case 0x01: /* MOV Ew,CS */
val=SegValue(cs);break;
case 0x02: /* MOV Ew,SS */
val=SegValue(ss);break;
case 0x03: /* MOV Ew,DS */
val=SegValue(ds);break;
case 0x04: /* MOV Ew,FS */
val=SegValue(fs);break;
case 0x05: /* MOV Ew,GS */
val=SegValue(gs);break;
default:
LOG(LOG_CPU,LOG_ERROR)("CPU:8c:Illegal RM Byte");
goto illegal_opcode;
}
if (rm >= 0xc0 ) {GetEArd;*eard=val;}
else {GetEAa;SaveMw(eaa,val);}
break;
}

Should that GetEard be GetEarw?

Reply 3 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I've checked sandpile and AMD docs, both define the instruction as register-dword but
memory-word only function (the first using zero-extension of the seg reg) so the current
implementation in dosbox matches this (if i'm not completely misreading the bochs sources
this is what they're doing as well).