I'm testing a MIPS Assembly program in MARS, and would like to specify a file to take as input during execution (sort of like what I can accomplish by redirecting stdin with the following UNIX command):
spim -file [filename].s < [input_file]
Is there a way to accomplish something like this in MARS? This is a homework assignment and I'm limited to the standard MIPS syscalls, so I can't use MARS' extended file operations set.
I'm also open to other methods of doing this (in any MIPS simulator). I just need a way to step through the program and debug as it's running. The MIPS solution above just runs until it finishes or throws an exception, at which point I can't step back or examine memory contents.
Any advice would be greatly appreciated!