Closed tobiasgrosser closed 2 years ago
It seems you are writing outside of allocated memory (yes, the error message could probably be improved). The error seems to be your use of the stack pointer, sp
should be decremented (stack grows "down") in this emulator (I think that's how I learned it in uni, but I always get the directions confused).
Have you tried:
addi a0, zero, 1
addi sp, sp, -4
li t1, 1
sw t1, -4(sp)
Indeed. Let's close this for now.
this code breaks with:
while it works in https://www.kvakil.me/venus/. Any idea what I am doing wrong?