views:

46

answers:

1

I'm having a lot of trouble getting my compiled assembly file working on SPIM. Basically I want to write a c++ file, and then generate a .s file that I can open in SPIM without error. This means that the assembly must be in MIPS32 ABI using MIPS I instructions (some MIPS II). How do I do this? Right now I'm using g++ but I'm having major errors when I try ot run the file in SPIM. I'm working on MAC OSx 10.6.3 and I'm compiling remotely on a linux machine. Is there a special compiler I can use that will make this easy for me?

A: 

Give the compiler -S option, it will generate the assembly code. Then you will have to edit the code so that SPIM accepts it.

zvrba
By the way, C++ requires a considerable run-time support from other libraries. Try that first with an ordinary C program.
zvrba