Okay, I'm not familiar with MARS so this is an experiment
Stick the following at the top of your asm file and comment out where they exist elsewhere in your code!
A # in MARS
is the same as // in Java
.data robot_x: .word 0 robot_y: .word 0 robot_m_x: .word 0 robot_m_y: .word 0 robot_instructions: .space 244 MsgRS1: .asciiz "Robot is at a safe place" MsgRS2: .asciiz "Robot falls into Chasm" MsgRS3: .asciiz "Robot falls into the trap" MsgRS4: .asciiz "Robot reaches Destination" MsgRS5: .asciiz "Robot fails to reach Destination" .text #main: la $a0, MsgRS1 # load address of print heading li $v0, 4 # specify Print String service syscall # print heading jr $ra # return
Get it to compile then run. Should get a printed line! Robot is...