mirror of
https://github.com/mre/mos6502.git
synced 2024-11-25 02:33:26 +00:00
the program counter should wrap as well
This commit is contained in:
parent
7328eb416a
commit
a3c4a7689f
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user