test386 ready to run instruction tests under both DOS and Node.js now

This commit is contained in:
Jeff Parsons 2015-10-16 11:26:38 -07:00
commit 635fc494c9
5 changed files with 142 additions and 73 deletions

View file

@ -21,7 +21,7 @@
{ "id": "test386",
"name": "",
"addr": 983296,
"size": 65280,
"size": 65276,
"alias": 4294902016,
"file": "/tests/pc/80386/test386.json",
"notify": ""

View file

@ -7142,18 +7142,18 @@ if (DEBUGGER) {
case X86.OPCODE.LOOPZ:
case X86.OPCODE.LOOP:
this.nStep = nStep;
this.incAddr(dbgAddr, 2);
this.incAddr(dbgAddr, dbgAddr.fData32? 4 : 2);
break;
case X86.OPCODE.CALL:
if (fCallStep) {
this.nStep = nStep;
this.incAddr(dbgAddr, 3);
this.incAddr(dbgAddr, dbgAddr.fData32? 5 : 3);
}
break;
case X86.OPCODE.CALLF:
if (fCallStep) {
this.nStep = nStep;
this.incAddr(dbgAddr, 5);
this.incAddr(dbgAddr, dbgAddr.fData32? 7 : 5);
}
break;
case X86.OPCODE.GRP4W:
@ -7202,8 +7202,8 @@ if (DEBUGGER) {
}
/*
* A successful run will ultimately call stop(), which will in turn call clearTempBreakpoint(),
* which will clear nStep, so there's your assurance that nStep will be reset. Now we may
* have stopped for reasons unrelated to the temporary breakpoint, but that's OK.
* which will clear nStep, so there's your assurance that nStep will be reset. Now we may have
* stopped for reasons unrelated to the temporary breakpoint, but that's OK.
*/
} else {
this.doTrace(fRegs? "tr" : "t");

View file

@ -202,7 +202,7 @@ SerialPort.DL_DEFAULT = 0x180; // we select an arbitrary default Diviso
*/
/*
* Receiver Buffer Register (RBR.REG, offset 0; eg, 0x3F8 or 0x2F8)
* Receiver Buffer Register (RBR.REG, offset 0; eg, 0x3F8 or 0x2F8) on read, Transmitter Holding Register on write
*/
SerialPort.RBR = {REG: 0}; // (read)
@ -805,11 +805,13 @@ SerialPort.prototype.echoByte = function(b)
return true;
}
if (this.consoleOutput != null) {
this.consoleOutput += String.fromCharCode(b);
if (b == 0x0A || this.consoleOutput.length >= 1024) {
this.println(str.trim(this.consoleOutput));
this.println(this.consoleOutput);
this.consoleOutput = "";
}
if (b != 0x0A) {
this.consoleOutput += String.fromCharCode(b);
}
return true;
}
return false;