src/cpu.c
void delta_memory(word memAddr, int delta, int cycles, int pcIncrease) {
	byte value = rmem_b(memAddr);
	value += delta;
	wmem_w(memAddr, value);

	bit_val(&P, flagZ, value == 0);
	bit_val(&P, flagN, bit_test(value, 7));

	PC += pcIncrease;
	cpu_cyclesThisSec += cycles;
}
/**
 * Applies the delta to the content of the memory address. Sets the Z and N flags as appropiate
 */
Applies the delta to the content of the memory address. Sets the Z and N flags as appropiate
Applies the delta to the content of the memory address . Sets the Z and N flags as appropiate
void delta_memory(word memAddr, int delta, int cycles, int pcIncrease) {
	byte value = rmem_b(memAddr);
	value += delta;
	wmem_w(memAddr, value);
	bit_val(&P, flagZ, value == 0);
	bit_val(&P, flagN, bit_test(value, 7));
	PC += pcIncrease;
	cpu_cyclesThisSec += cycles;
}
void delta_memory ( word memAddr , int delta , int cycles , int pcIncrease ) { byte value = rmem_b ( memAddr ) ; value += delta ; wmem_w ( memAddr , value ) ; bit_val ( & P , flagZ , value == 0 ) ; bit_val ( & P , flagN , bit_test ( value , 7 ) ) ; PC += pcIncrease ; cpu_cyclesThisSec += cycles ; }
Applies the delta to the content of the memory address.
Applies the delta to the content of the memory address .