Fixed the 8080's subByteBorrow(), and improved the Debugger's doDump()

This commit is contained in:
Jeff Parsons 2016-04-29 08:30:21 -07:00
commit a64a6e7e05
3 changed files with 31 additions and 23 deletions

View file

@ -848,7 +848,7 @@ CPUSim.prototype.subByte = function(src)
*/
CPUSim.prototype.subByteBorrow = function(src)
{
src = -(src + (this.resultZeroCarry & 0x100)? 1 : 0) & 0xff;
src = -(src + ((this.resultZeroCarry & 0x100)? 1 : 0)) & 0xff;
this.resultAuxOverflow = this.regA ^ src;
return this.resultParitySign = (this.resultZeroCarry = (this.regA + src) ^ 0x100) & 0xff;
};