Program 6
Program 6
1. perform input and output operations from the keyboard and to the
screen
17. You will also need to include comments, white space, and blank
lines in your code to make it easy to read and to follow the
implementation of the pseudocode. While one comment per line is not
required, you are encouraged to include enough comments in you code
to allow easy tracing of the pseudocode logic through your assembly
implementation (see the Fibonacci example provided on Canvas).
18. Programs that do not include sufficient internal documentation
via comments will receive deductions as indicated in the assignment
rubric.
19. Sample Execution
20. Here is sample output from my solution program (your output
may vary).
21. CS 2810: Dynamic Memory Allocation - Linked List - Waldo Wildcat
Choice? 1
Choice? 2
Choice? 2
Choice? 2
Choice? 1
Choice? 3
Additional Information:
As shown in class, there are several system calls that are available for use in
the MIPS assembly language. These system calls must be used for input and
output in your programs.
2. Load any required argument values in $a0, $a1, $a2, or $f12 if the
system call requires them
Example:
read integer 5
read float 6
read double 7
exit (terminate 10
execution)
read a character 12
Memory Access:
lbu rt, offset(rs) Move byte at [rs + offset] into rt, extended
by zeros
Other commands:
blt rs, rt, label Branch if less than, if rs < rt, set program
counter to label
jal label Jump and link, store return address in $ra and
jump to label