system/cpu.js
function doADC( value ) {
		var t = A + value + flagC;
			
		flagV = !!((A ^ t) & (value ^ t) & 0x80) && 1;
		flagN = !!( t & 0x80 );
		flagC = ( t > 255 );
		flagZ = !( t & 0xff );

		writeA( t & 0xff );
	}
function doADC( value ) {
		var t = A + value + flagC;
			
		flagV = !!((A ^ t) & (value ^ t) & 0x80) && 1;
		flagN = !!( t & 0x80 );
		flagC = ( t > 255 );
		flagZ = !( t & 0xff );

		writeA( t & 0xff );
	}
function doADC ( value ) { var t = A + value + flagC ; flagV = ! ! ( ( A ^ t ) & ( value ^ t ) & 0x80 ) && 1 ; flagN = ! ! ( t & 0x80 ) ; flagC = ( t > 255 ) ; flagZ = ! ( t & 0xff ) ; writeA ( t & 0xff ) ; }
Actually performe add with carry.
Useful, as SBC is also a modified add-with-carry.
Actually performe add with carry . Useful as SBC is also a modified add - with - carry .