Move_left invalid program counter value:0

When I run my code from the move_left task, Mars throws the Invalid Program Counter value error. After a little research I got the hint that this could be caused by an overwritten $ra register. However, since I follow the calling convention and store $ra on the stack before the jal on move_check and move_one , I don’t know exactly how to deal with the error. Many thanks and best regards Tim

There are a few ways this can happen.

Letting other people guess the reason is not the best way of figuring out what the actual reason is.

Instead, you can debug the test yourself. Create a testbox and run your test step by step, until you see what exactly causes the error at what exact place.


Thanks for the quick response I will try to write my own tests :slight_smile:

That’s not what I meant… Run the test box with the (already given) test you are currently failing, step by step (i.e. by using the step once button), to see where exactly the problem is.

1 Like