CSCI 2321 (Principles of Computer Design):
Sample Programs
MIPS assembler programs
- Example of simple procedure call:
call-addproc.s.
- Example of loop and array use:
simple version
array-loop-1.s
and slightly shorter version
array-loop-2.s.
- Example of recursive procedure call:
factorial.s.
- "Starter" program for testing code fragments in
the simulator:
starter.s.
- Examples of using simulator system calls to do simple
console I/O:
hello.s,
echo.s,
echoint.s.
See Appendix A for more about the simulator and
its system calls.