CSCI Assembler Language
Assignment 3.
Write a SPIM program to multiply two integers.
Details:
- DO NOT
USE ANY MIPS (SPIM) MULTIPLY COMMAND.
- Keep
your variables (num1, num2,
product) stored in memory.
- Test with the following data (decimal):
8 * 2
12 * 10
137 * 235
261 * 246
424007 * 25
- Use the SET VALUE option in the simulator to input the values
for the two numbers.
- Use the .WORD directive for
your variables.
- HAND IN THE FOLLOWING:
7.1. A listing of your assembly language program (complete with comments)
printed from Notepad.
7.2. The Data Segment and Register Segment sceen dump after the program is
loaded to show the variables' contents BEFORE the program is run. REPEAT
for each of the data sets
7.3. Set the initial values for the length and width.
7.4. Take a BEFORE "snapshot" of memory to show the initial
starting values. Print this out to hand in.
7.5. Run the program.
7.6 Take an AFTER "snapshot" of memory to show the resulting
values.
Print this out to hand in.
NOTE:
*** Label your spim.log output to describe what it is showing. THIS
IS VERY IMPORTANT!!
IMPORTANT:
*** Check the settings for the simulator. Make sure the only options
checked under Execution is: "Allow pseudo instructions"and "load trap file"