mirror of
https://github.com/mre/mos6502.git
synced 2025-02-17 17:30:43 +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::JMP, OpInput::UseAddress(addr)) => self.jump(addr),
|
||||||
|
|
||||||
(Instruction::JSR, OpInput::UseAddress(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.push_on_stack(b);
|
||||||
}
|
}
|
||||||
self.jump(addr);
|
self.jump(addr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user