Let's stop on any un(re)implemented opcode for now

This commit is contained in:
Jeff 2016-09-26 10:02:21 -07:00 • committed by Jeff Parsons
commit 5b25dc91ae
2 changed files with 1061 additions and 1053 deletions

View file

@ -1644,6 +1644,11 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles)
this.decode(opCode); this.decode(opCode);
if (this.regOp < 0) { if (this.regOp < 0) {
this.regsGen[7] = (this.regsGen[7] - 2) & 0xffff;
this.println("unimplemented");
break;
}
switch (opCode & 0xF000) /*0170000*/ { // Double operand instructions xxSSDD switch (opCode & 0xF000) /*0170000*/ { // Double operand instructions xxSSDD
case 0x1000: /*0010000*/ // MOV 01SSDD case 0x1000: /*0010000*/ // MOV 01SSDD
//LOG_INSTRUCTION(opCode, 2, "MOV"); //LOG_INSTRUCTION(opCode, 2, "MOV");
@ -2695,7 +2700,6 @@ CPUStatePDP11.prototype.stepCPU = function(nMinCycles)
// } // }
// } // }
} }
}
} while (this.nStepCycles > 0); } while (this.nStepCycles > 0);
} }

View file

@ -1872,7 +1872,7 @@ if (DEBUGGER) {
* @this {DebuggerPDP11} * @this {DebuggerPDP11}
* @param {DbgAddrPDP11} dbgAddr * @param {DbgAddrPDP11} dbgAddr
* @param {string} [sComment] is an associated comment * @param {string} [sComment] is an associated comment
* @param {number} [nSequence] is an associated sequence number, undefined if none * @param {number|null} [nSequence] is an associated sequence number, undefined if none
* @return {string} (and dbgAddr is updated to the next instruction) * @return {string} (and dbgAddr is updated to the next instruction)
*/ */
DebuggerPDP11.prototype.getInstruction = function(dbgAddr, sComment, nSequence) DebuggerPDP11.prototype.getInstruction = function(dbgAddr, sComment, nSequence)
@ -1911,7 +1911,11 @@ if (DEBUGGER) {
* operand, and the second element is a comment containing an alternate representation of the operand. * operand, and the second element is a comment containing an alternate representation of the operand.
*/ */
if (typeof sOperand != "string") { if (typeof sOperand != "string") {
if (!sComment) sComment = sOperand[1]; /*
* TODO: Stop overriding the comment and sequence values once cycle counts become legitimate.
*/
/* if (!sComment) */ sComment = sOperand[1];
nSequence = null;
sOperand = sOperand[0]; sOperand = sOperand[0];
} }