Optimized branch()

This commit is contained in:
Jeff 2016-09-27 21:51:24 -07:00 • committed by Jeff Parsons
commit ed189527d0
4 changed files with 268 additions and 260 deletions

View file

@ -1546,11 +1546,10 @@ CPUStatePDP11.prototype.writeByteByMode = function(addressMode, data, writeFlags
*
* @this {CPUStatePDP11}
* @param {number} opCode
* @return {number} (PC +/- the word delta specified in the opCode)
*/
CPUStatePDP11.prototype.branch = function(opCode)
{
return (this.regsGen[PDP11.REG.PC] + ((opCode << 24) >> 23)) & 0xffff;
this.setPC(this.regsGen[PDP11.REG.PC] + ((opCode << 24) >> 23));
};
/**