Skip to content
Commit f38514b0 authored by cyrozap's avatar cyrozap
Browse files

Properly initialize registers, the stack, .data, and .bss

The mode-switch binary failed to run in the emulator because it wasn't
initializing the stack pointer. It probably worked when running on real
hardware only because the stack pointer was already initialized there,
and this code simply reused it.

While we're initializing the stack pointer, we might as well initialize
everything else, too, so this change also initializes the
general-purpose registers, the link register, and the .data and .bss
sections of the binary (even though this code doesn't use them).
parent 19f296cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment