src/cpu.c
void ora(byte b, int cycles, int pcIncrease) {
	log_instruction(pcIncrease - 1, "\tORA #$%02X\t", b);
	//Do the actual or operation, saving the result in the accumulator
	A = A | b;
	//Set the flags
	bit_val(&P, flagZ, A == 0x00);
	bit_val(&P, flagN, bit_test(A, 7));

	//Update cycles and pc
	cpu_cyclesThisSec += cycles;
	PC += pcIncrease;
}
/**
 * This is the one actually doing the magic. The result of the operation will be saved in A and after doing that
 * if the acumulator is zero, then we have to set the FlagZ to one. If the acumulator is negative then we set
 * the flagN to one.
 */
This is the one actually doing the magic. The result of the operation will be saved in A and after doing that
if the acumulator is zero, then we have to set the FlagZ to one. If the acumulator is negative then we set
the flagN to one.
This is the one actually doing the magic . The result of the operation will be saved in A and after doing that if the acumulator is zero then we have to set the FlagZ to one . If the acumulator is negative then we set the flagN to one .
void ora(byte b, int cycles, int pcIncrease) {
	log_instruction(pcIncrease - 1, "\tORA #$%02X\t", b);
	A = A | b;
	bit_val(&P, flagZ, A == 0x00);
	bit_val(&P, flagN, bit_test(A, 7));
	cpu_cyclesThisSec += cycles;
	PC += pcIncrease;
}
void ora ( byte b , int cycles , int pcIncrease ) { log_instruction ( pcIncrease - 1 , " \t \t " , b ) ; A = A | b ; bit_val ( & P , flagZ , A == 0x00 ) ; bit_val ( & P , flagN , bit_test ( A , 7 ) ) ; cpu_cyclesThisSec += cycles ; PC += pcIncrease ; }
This is the one actually doing the magic.
This is the one actually doing the magic .
//Do the actual or operation, saving the result in the accumulator //Set the flags //Update cycles and pc