atticusr5 0 Junior Poster

Hello all,

So I am NEW to all this, and I have a quick question with some code of mine.

When I open this code in PC SPIM I get the following error:

spim: (parser) syntax error on line 18

move $a0, $t4 #move the number to print into $a0 THANKS IN ADVANCE!!!
^

# Devang N. Joshi -- 01/22/2011
# CSCI 211 Project One, Program One
# Registers used:
# $t0 - used to hold the first sum.
# $t1 - used to hold the first number.
# $t2 - used to hold the second number.
# $t3 - used to hold the third number.
# $t4 - used to hold the final sum before printing.
# $v0 - syscall parameter and return value.
# $a0 - syscall parameter.
main:
ori $t1, 1           # load 1 into $t1.
ori $t2, 2           # load 2 into $t2.
ori $t3, 3           # load 3 into $t3.
add $t0 , $t1 , $t2  # $t0 = $t1 + $t2
add $t4 , $t0 , $t3  # $t4 = $t0 + $t3
## Print out $t4.
move $a0, $t4        # move the number to print into $a0.
ori $v0, 1           # load syscall print_int into $v0.
syscall              # make the syscall.
ori $v0, 10          # syscall code 10 is for exit.
syscall              # make the syscall.
# end of add2.asm.