mirror of
https://github.com/mre/mos6502.git
synced 2024-11-28 07:49:19 +00:00
correct endianness for program counter push
This commit is contained in:
parent
239992ea6c
commit
1c31a73a2b
@ -353,7 +353,7 @@ impl<M: Bus> CPU<M> {
|
||||
(Instruction::JMP, OpInput::UseAddress(addr)) => self.jump(addr),
|
||||
|
||||
(Instruction::JSR, OpInput::UseAddress(addr)) => {
|
||||
for b in self.registers.program_counter.wrapping_sub(1).to_le_bytes() {
|
||||
for b in self.registers.program_counter.wrapping_sub(1).to_be_bytes() {
|
||||
self.push_on_stack(b);
|
||||
}
|
||||
self.jump(addr);
|
||||
|
Loading…
Reference in New Issue
Block a user