The University of Arizona
banner image

CSc 252 -- MIPS Code Examples

bats1.s
bats2.s
Sample programs based on the program found on
Slides 10-16 of the 3-MIPSintro slides.
HelloWorld1.s
HelloWorld2.s
Sample programs based on the program found on
Slides 24-26 of the 3-MIPSintro slides.
for1.s Sample for loop program from Slides 32-34 of the
3-MIPSintro slides.
while1.s Sample while loop program from Slides 35-39 of the
3-MIPSintro slides.
funcExample1.s Sample zap1 function program from Slides 73-78 of the
3-MIPSintro slides.
funcExample2.s Sample zap2 function program from Slides 79-81 of the
3-MIPSintro slides.
array2.s How to store and print an array of strings in assembly language.
array1.s How to store and print an array of integers.
fibonacci-register.s Sample fibonacci function program using registers
to hold the intermediate value, from Slides 92-95
of the 3-MIPSintro slides.
fibonacci-local.s Sample fibonacci function program using local
variables to hold the intermediate value, from
Slides 96-98 of the 3-MIPSintro slides.
records1.s Sample records program from Slides 101-108 of the
Records, Structs slides.
records2.s Sample records program from Slides 109-116 of the
Records, Structs slides.