Added MS-DOS 1.x and 2.0 directory listings (and fixed improper fault handling on 8086 machines)

This commit is contained in:
Jeff Parsons 2016-02-04 12:13:32 -08:00
commit c3215b7aca
6 changed files with 216 additions and 9 deletions

View file

@ -3776,6 +3776,18 @@ X86.fnXORw = function(dst, src)
*/
X86.fnGRPFault = function(dst, src)
{
/*
* This should NEVER be called on 8086/8088 CPUs, and yet we preset some of the handlers in aOpGrpPOPw,
* aOpGrp4b, and aOpGrp4w to call it. initProcessor() DOES patch aOpGrp4b[0x07] and aOpGrp4w[0x07] to
* fnGRPInvalid, but that's it.
*
* However, given the infrequency of this call, it's simpler to continue presetting all the handlers in
* aOpGrpPOPw to their post-8086 default, and deal with the appropriate 8086 behavior here (which for now,
* is to call fnGRPUndefined instead).
*/
if (this.model < X86.MODEL_80186) {
return X86.fnGRPUndefined.call(this, dst, src);
}
X86.fnFault.call(this, X86.EXCEPTION.GP_FAULT, 0);
return dst;
};