1
0
mirror of https://github.com/mre/mos6502.git synced 2024-11-24 11:31:00 +00:00

the program counter should wrap as well

This commit is contained in:
Sam M W 2022-10-18 09:42:51 +01:00
parent 7328eb416a
commit a3c4a7689f

View File

@ -68,7 +68,7 @@ impl CPU {
let am_out = am.process(self, slice);
// Increment program counter
self.registers.program_counter = self.registers.program_counter + num_bytes;
self.registers.program_counter = self.registers.program_counter.wrapping_add(num_bytes);
Some((instr, am_out))
}