r/programming•
FFFF00

Any good resources for learning MIPS32?

[removed]

Posted Mar 16, 2010, 11:51 PM UTC

811
pdq•

The good news is that MIPS is possibly the most straightforward assembly language to code or read. Compared to x86, it's a dream.

If your class is computer architecture related, you will probably be learning from Hennessy and Patterson, which is an excellent book covering hardware and software.

If you want to learn MIPS from a software perspective, check out the classic See MIPS Run.

6
FFFF00OP•

That is exactly the book we will be using. I will check out See MIPS Run as well, thanks for the suggestion!

2
TheSuperficial•

Compared to x86, it's a dream.

Compared to x86, reading Mandarin Chinese is easy. What a god-awful architecture.

+1 for "See MIPS Run", BTW.

2
jeffbell•

Welcome to the 90s! I used to know mips assembler. I've written code generators for mips.

There probably isn't much practical use to learn how to write large stretches of assembler. Even embedded systems people use C or better these days.

This would be interesting if you are studying computer architecture. The mips assembler code somewhat resembles the microcode that VAXes used, and some of the internal ops that modern processors use internally.

One fun thing to do is to write a very short C program, and use the right gcc switches to get it to output .s assembler files.

Keep in mind that the assembler usually buries the branch slots. You could compare what's in the assembler .s file to what shows up in the exec using 'od'.

3
[deleted]•

NestedVM is a Java VM for the MIPS processor I believe.

You might get something out of taking a look at the emulator, which allows GCC-compiled C to be run in pure java. See examples like sqlite3 running as pure Java.

2
gregcor•

Try MARS. It's a bit more straightforward than spim.

I'm taking a class with MIPS right now - link is here if you're interested in reading the lecture notes (posted Tues and Thurs). We're not that far in yet, some good introductory material there now (starting with lecture 8).

2
FFFF00OP•

That is a great resource, thank you! That is more of what i was looking for.

Some of the teachers at my school are nice enough to leave up lecture notes from past classes, unfortunately for this upcoming class that was not the case.

I will downloaded MARS, which definitely looks more refined than spim.

1
lucygucy•

My advice would be to find something to do with it; I guess my preference would be to pick up one of the PIC32 development boards and start playing with it; decide I'm going to do something which interests me and learn whilst I do it.

1
Ciznit•

I had a class that used MIPs last semester. Like pdq said, its an incredibly straight forward assembly language. The class I was in didn't have a text book or reference manual, and I did fine in it. I wouldn't worry too much about learning it ahead of time if I were you.

1
lulzitsareddit•

I'm taking a MIPS class right now. We're using the book "MIPS Assembly Language Programming" by Robert L. Britton. I've found it very clear and detailed, especially for someone like me with no prior experience with low level languages. If you have prior experience it may be a little slow.. but otherwise it's a great starting place as an introduction to assembly programming with MIPS.

1
deadsy•

Learn by doing. The best way to learn assembler (mips or otherwise) is to write some and make it work on a dev system. Most of the time you have no real business writing in assembler, but for CPU startup and low level exception handling it's obligatory. When you have to bring up a CPU from the reset exception vector (good ol' 0xBFC00000) it forces you to learn about aspects of the architecture that are not as well understood if you are dropped into the comparative luxury of a C environment.

1