la $a1, answer
    li $v1, 4
    syscall
    move $a0, $v0               # move value of recursion to print
    li $v0, 1                   # print integer value
    syscall                     # executes print
    li $v0,10                   # call to exit
    syscall                     # executes exit

The uncommented section is the area giving me problems, answer is a string to say 'the answer is'. I cannot for the life of my figure out how print correctly. Currently it prints a small decimal.

If I use $a0 and $v0 it prints 4 and if I use $a1 it is out of memory bounds.

Which syscall you should call there at line 3?
In the code you put no function code in $v0.
You put code 4 (print string) into $v1 though.

I assume you are using a simulator. MARS?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.