MIPS – Fetch address not aligned on word boundary

I’m pretty new to assembly programming and programming in general and I’m doing my best to learn. I’ve been having trouble storing inputs to variables, can you help me please? The problem seems to occur when I load the addresses of n1 and n2, or something like that. I have tried looking at similar problems … Read more

Converting a C program to MIPS

Currently you’re generating code for x86-64 – you need to select a MIPS compiler from the popup menu above the assembly pane: After you’ve done that you’ll probably see generated code like this: Note that the compiler has optimised away some of the redundant operations in the original C code. If you want to see an … Read more

MIPS: lw (load word) instruction

They are not the same, although in some circumstances they will behave alike. The format of the lw instruction is as follows: where RegDest and RegSource are MIPS registers, and Offset is an immediate. It means, load into register RegDest the word contained in the address resulting from adding the contents of register RegSource and the Offset … Read more