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:
parent
a4613082f8
commit
1ec60573d5
6 changed files with 1315 additions and 1308 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue