fox32: Set the stack pointer to zero by default

This commit is contained in:
ry755 2022-02-11 20:33:39 -08:00 committed by Ry
parent f2adfa6b2b
commit eebeff2073

View File

@ -60,7 +60,7 @@ impl Cpu {
pub fn new(bus: Bus) -> Self { pub fn new(bus: Bus) -> Self {
Cpu { Cpu {
instruction_pointer: 0xF0000000, instruction_pointer: 0xF0000000,
stack_pointer: bus.memory.fast_memory.len() as u32, stack_pointer: 0x00000000,
register: [0; 32], register: [0; 32],
flag: Flag { zero: false, carry: false }, flag: Flag { zero: false, carry: false },
halted: false, halted: false,