Fixed ASRB and RORB instructions, added a new dump command ("ds"), and fixed timer function initialization

This commit is contained in:
Jeff 2016-11-10 06:10:54 -08:00 • committed by Jeff Parsons
commit eb6bf8a5a5
9 changed files with 434 additions and 408 deletions

View file

@ -2016,7 +2016,7 @@ CPUStatePDP11.prototype.updateDstByte = function(opCode, src, fnOp)
var reg = this.dstReg = opCode & PDP11.OPREG.MASK;
var mode = this.dstMode = (opCode & PDP11.OPMODE.MASK) >> PDP11.OPMODE.SHIFT;
if (!mode) {
this.regsGen[reg] = (this.regsGen[reg] & 0xff00) | fnOp.call(this, src, this.regsGen[reg]);
this.regsGen[reg] = (this.regsGen[reg] & 0xff00) | fnOp.call(this, src, this.regsGen[reg] & 0xff);
} else {
var addr = this.dstAddr = this.getAddr(mode, reg, PDP11.ACCESS.UPDATE_BYTE);
this.writeByteToPhysical(addr, fnOp.call(this, src, this.readByteFromPhysical(addr)));