ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
yeah I tried that already. Since i don't have a MIPS machine, I get something similar to MASM, which is different from MIPS.
Was your compiler a native compiler, or a MIPS cross compiler? I have used GCC on a Sun Sparc running Solaris that I built to be a MIPS cross-compiler. It built perfectly acceptable MIPS object modules and executables. I also used the -S option a few times during the testing of the cross-compiler to insure that it generated the same of sort MIPS assembler that a native MIPS GCC compiler generated.
A native compiler. Where do I download a MIPS cross compiler?
I don't know where to get a prebuilt cross compiler. I built the one that I used using normal gcc sources. It took a little tinkering to get it to compile properly on the Solaris system, but once that was taken care of, it worked fine.
I would presume that the latest gcc compiler would work. If it dosen't, then give the folks maintaining it an e-mail asking for help. They are very supportive.
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
According to gnu/gcc site "Cross-compilers for the MIPS as target using the MIPS assembler currently do not work, because the auxiliary programs mips-tdump.c and mips-tfile.c can't be compiled on anything but a MIPS. It does work to cross compile for a MIPS if you use the GNU assembler and linker"
Although the aside on generating mips assembly using a cross compiler is interesting, this sounds like a homework question. I recommend reading a book on mips assembly. After that it shouldn't be too hard :-)