MIPS Assembly/Programming Style

This page is going to talk about programming style and code formatting techniques in MIPS Assembly. Programming style is an arbitrary construct that is dependent on the individual programmer, but this page will show some common styles anyway.

Good, consistent programming style for assembly languages in general is arguably more important than for higher-level languages, as you don't have the luxury of abstracting even the simplest of operations away. For that reason, comments are even more important than in higher-level languages! The necessity of dealing with the nitty-gritty means your program will grow in lines of code very quickly, and someone's going to have to read it. Why not make their life easier?

There are several styles and conventions one may adhere to. Doesn't matter too much which one you use, but be consistent!