4

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!

quetzalcoatl
  • 32,194
  • 8
  • 68
  • 107
BraedenP
  • 7,125
  • 4
  • 33
  • 42

1 Answers1

0

See here for information on stepping through and debugging a MARS program.

markgz
  • 6,054
  • 1
  • 19
  • 41
  • 1
    I get how to do that. I'm trying to specify a file as input. For now, I've resorted to typing all the lines in manually, but I'd really love for that to be automated. – BraedenP Feb 11 '12 at 06:26