Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I execute MIPS assembly programs on an x86 linux?

Are there any command line interpreters or any other set of programs around for x86 linux in order to run MIPS assembly programs?

I'd like to be able to write simple MIPS assembly programs and run them from the console on my local machine.

I know of SPIM but it requires X Windows and I'm curious if there are better options out there.

Edit: Turns out it doesn't require X Windows. I still have issues with SPIM. Not the best in my humble opinion. Qemu / Cross compiled toolchain is a little more work but I have less quirks.

like image 936
mmcdole Avatar asked Jan 21 '09 07:01

mmcdole


2 Answers

Incidentally, Spim does not require X Windows. It has a console interface as well. Run either spim or xspim.

like image 196
Rob Kennedy Avatar answered Sep 19 '22 18:09

Rob Kennedy


You will need either a cross compilation toolchain, or to build your own cross binutils. For a prebuilt toolchain, you can visit code sourcery. If you just want to compile assembly, then all you need is binutils. There are some guidelines on the Linux Mips wiki

For the emulation part, QEmu would be my choice.

like image 45
shodanex Avatar answered Sep 20 '22 18:09

shodanex