0

I'm working on MIPS in college and we are using Qtspim simulator for running MIPS instructions. I've googled on how to run MIPS code on my real machine (not any simulator like SPIM) but I couldn't find any comment. Is it possible to create an executable file from MIPS instructions?

On another lecture of mine (System Programming) we have been using MASM615 for compiling assembly instructions by using make32 command from the cmd. I'm looking for any similar tool. Are there any exist for MIPS?

phuclv
  • 37,963
  • 15
  • 156
  • 475
kotiloli
  • 45
  • 1
  • 4
  • If you want to run MIPS machine code, you'll need a MIPS CPU, which your computer probably doesn't have. Are you looking for a compiler that compiles MIPS assembly language into x86 machine code? I'm not sure that would have any advantage over simulation. – Max E. Mar 22 '13 at 23:40
  • http://github.com/dwelch67/ mpx_samples and pic32_samples are both mips based, show how to build mips executables from source code and for each system run them. the mpx is an opencores core that you can simulate on the pic32 is hardware you have to buy. Once you have a binary you need a mips processor to run it which is the reason for a simulator or buying mips hardware. some sony playstation hardware is mips based so you can use one of those simulators or hardware if you can hack them. the gcw-zero coming out soon is also mips based (and many other platforms) – old_timer Mar 24 '13 at 01:40

1 Answers1

1

Is it possible to create an executable file from MIPS instructions?

Yes, because an assembler is just a program that reads some input and produce some output files, therefore you can assemble for any architectures from any other architectures, in the same way as the possibility to cross-compile for other architectures from your PC

But executing the output file is an entirely different thing. Each architecture has its own machine language. Just like how humans can't understand people speaking other languages, machines only understand programs written in its language. That means MIPS hardware can only understand and run MIPS binaries. Other architectures like x86 can't interpret another instruction set with different instruction coding

So the only way for you is to use an emulator or simulator

See also

phuclv
  • 37,963
  • 15
  • 156
  • 475