2

For Some purpose , I am writing a MIPS file for finding the second largest element of an array

How do I run it to get the output?

I need the command lines for spim stimulator

Iam using Ubuntu 16.04 xenial by the way

  • what is a "MIPS file"? Assembly? C code? machine Code? – Marcus Müller Aug 26 '16 at 12:43
  • "compile" indicates is source code... but if you actually meant "compile", you would already have answered your own question. – Marcus Müller Aug 26 '16 at 12:44
  • Assembly file @MarcusMüller .Sorry , I need to run and test it. I need the commands for it – Karthik Priyatham Aug 26 '16 at 12:47
  • Is there any particular reason why you can't use a GUI version of SPIM, e.g. QtSPim? If you really must use the command line version, google _"spim command line"_ for instructions. – Michael Aug 26 '16 at 13:04
  • @KarthikPriyatham well, then you'll need an *assembler* to *assemble* your *assembly*. What you specifically need depends on what (and if at all) OS you run on your (simulated) MIPS, which kind of assembly you have, which ABI you want... etc. – Marcus Müller Aug 26 '16 at 13:06
  • 2
    @MarcusMüller: The OP is trying to use a MIPS simulator called SPIM, which can take assembly code files and assemble and run them. It's unclear from the question exactly what the problem is though, since GUI versions of SPIM exists which are very easy to use, and for the command-line version it should just be a matter of googling a command reference. – Michael Aug 26 '16 at 14:36
  • I've used `spim` [the command line utility. IMO, hard to use], `QtSpim` [the GUI version], and `mars` [GUI based] simulators. I had a hard time finding the install package for `spim/QtSpim`, relative to `mars`. I prefer `mars` for a variety of other reasons. See: http://courses.missouristate.edu/KenVollmar/mars/ – Craig Estey Aug 27 '16 at 02:02

1 Answers1

1

I can think of a few legit reasons for needing to run a MIPS simulator via command line instead of a GUI. If that is your situation than I would suggest using MARS instead of QtSpim. You can download it at http://courses.missouristate.edu/kenvollmar/mars/

MARS does have a full GUI but unlike QtSpim it can also run via CLI. Its a Java implementation so it will run on any OS.

LJ in NJ
  • 196
  • 1
  • 1
  • 12