Program 4
Program 4
in MIPS Assembly
1. perform input and output operations from the keyboard and to the
screen
Specific Tasks:
Write and test a MIPS assembly language program to perform the following
actions in order:
2. Print a welcome message that include: your name, a title, and a brief
description of the program.
4. Prompt the user for an integer power for that floating point number
Your program should follow these loosely outlined steps in its implementation
(i.e., write the code for step 1, then for step2, etc.).
Enter the value 3.2 for the floating point value and -3 for the integer
exponent. Give a brief explanation of the results you obtain compared to the
results from a scientific calculator. Place this explanation in the comments at
the start of your program.
You will also need to include comments, whitespace, 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).
Sample Execution
Here is sample output from my solution program (your output may vary).
Submitting your program
You need to submit your complete assembly language program using
Canvas. The only file extension that is accepted is the ".asm" file created by
the MARS program.
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
4. Use the returned values, if any, from the registers designated in the
command description
Example:
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