CSCI 2321 (Principles of Computer Design):
Sample Programs
MIPS assembler programs
- "Starter" program for testing code fragments in
the simulator:
starter.s.
- Example of simple procedure call:
call-addproc.s.
- "Hello world" program:
hello.s.
- Program to get and echo a line of text:
echo.s.
- Program to get and echo an integer:
echoint.s.
- Factorial examples:
- GCD example(s):
- Program to define and demo function with pointer parameters
divide.s.
- Program to get and echo a float:
echofloat.s.
- Program to compute square root using Newton's method:
newton.s.
- Program to say whether line of text is a palindrome:
palindrome.s.
C programs
Other files
Examples of using LaTeX's TikZ library to draw
circuit and state-machine diagrams as in Appendix B
here.