correct endianness for program counter push

This commit is contained in:
Sam M W 2023-04-15 21:01:08 +01:00
parent 239992ea6c
commit 1c31a73a2b
1 changed files with 1 additions and 1 deletions

View File

@ -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);