From 34de523f4d2360a920b7ee358c2821fe8293e76a Mon Sep 17 00:00:00 2001 From: ry755 Date: Thu, 27 Jan 2022 17:22:00 -0800 Subject: [PATCH] fox32: Set the stack pointer to the end of fast memory by default --- src/cpu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu.rs b/src/cpu.rs index 606a955..bb411d5 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -60,7 +60,7 @@ impl Cpu { pub fn new(bus: Bus) -> Self { Cpu { instruction_pointer: 0xF0000000, - stack_pointer: 0x02000000, + stack_pointer: bus.memory.fast_memory.len() as u32, register: [0; 32], flag: Flag { zero: false, carry: false }, halted: false,