CS 350 INTRODUCTION TO MIPS ASSEMBLY LANGUAGE
Types of MIPS | Memory Instructions | Arithmetic Instructions | Branch/Jump Instructions
Arithmetic Instructions
add example
C version:
f = (g + h)
[where f, g, and h are assigned to registers $s0, $s1, $s2]
MIPS version:
add $s0, $s1, $s2
sub example
C Version:
f = (i - j)
[where f, i, and h are assigned to registers $s0, $s3, $s4]
MIPS Version:
sub $s0, $s3, $s4
Types of MIPS | Memory Instructions | Arithmetic Instructions | Branch/Jump Instructions