Debugging with

I have started writing the check_victory.asm code. When I enter the board address and board length manually into the check_victory.asm file (by copying that part of the .data segment of the test_check_win.asm and adding “la $a0 board” and “li $a1 16” to the beginning), the check_victory.asm code already works as it should, ending with 0 in $v0 if no 2048 is in the board media segment and ending with 1 in $v0 if there is.

There is, however, an execution error with the last step (jr $ra), which is to be expected as there is no return address given.
However, I would expect this error not to occur when the check_victory.asm file is executed by, as it should call the file using “jal check_victory” and therefore enter the required return address into $ra. However, running in console results in:
“Running test_check_win_1… ERROR error: runtime failure, error message was:” with no error message. How am I supposed to debug this if there is no error message whatsoever?

The tests do call the subroutine via jal check_victory, so this cannot be the reason the program crashes. Can you push the current version of the code so me or the tutors can have a look at it?

Hi, I’ve found my mistake. I think debugging in Mars is going to take some getting used to, but I’m starting to get the hang of it. Thanks for your quick response though!

Seems like there is mistake in the test script. There is an error message, but it is not printed. Have a look at this post: Test Output Bugfix