Implemented opJSR, removed more "negative address" tests (eg, in pushWord); bad addresses should result in special exceptions, not negative return values

This commit is contained in:
Jeff 2016-09-26 09:43:05 -07:00 committed by Jeff Parsons
commit 1ec60573d5
6 changed files with 1315 additions and 1308 deletions

View file

@ -854,10 +854,11 @@ PDP11.opIOT = function(opCode)
*/
PDP11.opJSR = function(opCode)
{
/*
* TODO: Implement
*/
this.regOp = -1;
var addr = this.getVirtualByMode(opCode, PDP11.ACCESS.VIRT);
var reg = (opCode >> PDP11.SRCMODE.SHIFT) & PDP11.OPREG.MASK;
this.pushWord(this.regsGen[reg]);
this.regsGen[reg] = this.regsGen[PDP11.REG.PC];
this.regsGen[PDP11.REG.PC] = addr;
this.nStepCycles -= 1;
};