system/cpu.js
function branch( flag ) {
		var offset = read(),
			prevHigh = PC & HIGH,
			curHigh = 0;

		if ( flag ) {
			// branching burns a cycle
			burn(1);

			if ( offset & 0x80 ) {
				offset = -complement( offset );
			}

			PC += offset;
			curHigh = PC & HIGH;

			if ( prevHigh !== curHigh ) {
				// crossing page boundary, burns a cycle
				burn(1);
			}
		}
	}
function branch( flag ) {
		var offset = read(),
			prevHigh = PC & HIGH,
			curHigh = 0;

		if ( flag ) {
			// branching burns a cycle
			burn(1);

			if ( offset & 0x80 ) {
				offset = -complement( offset );
			}

			PC += offset;
			curHigh = PC & HIGH;

			if ( prevHigh !== curHigh ) {
				// crossing page boundary, burns a cycle
				burn(1);
			}
		}
	}
function branch ( flag ) { var offset = read ( ) , prevHigh = PC & HIGH , curHigh = 0 ; if ( flag ) { // branching burns a cycle burn ( 1 ) ; if ( offset & 0x80 ) { offset = - complement ( offset ) ; } PC += offset ; curHigh = PC & HIGH ; if ( prevHigh !== curHigh ) { // crossing page boundary, burns a cycle burn ( 1 ) ; } } }
Helper function for all branching operations.
@param {boolean} flag - If true, do branch. Otherwise do nothing.
Helper function for all branching operations .