To help you refresh your MIPS assembly skills you are strongly encouraged to study this small collection of example programs. Each program demonstrates a small collection of features of the MIPS assembly language.
Before you continue you should already have cloned the
mips-examples
repository. If you have not done this already,
follow these instructions before you continue.
For each of the example files in the repository:
hello.s
.data
, .asciiz
and .text
li
and la
.print_string
and exit
.basics.s
.data
, .text
, .space
, .word
and .asciiz
.li
, la
, lw
, add
, addi
, sw
and move
.print_string
, print_int
, print_char
and exit
.jump_and_branches.s
if-then-else
and infinite loop
..data
, .text
, and .asciiz
.j
, blt
and bge
.
arrays.s
subroutines.s
jal
(Jump And Link) and jr
(Jump Register).$ra
(Return Address)