Basic syntax of assembler syscalls for reading and printing integers and strings Some basic instructions and pseudo ops: li,la,move,add,sub,lb,sb,syscall,j,ble,bgt,etc. Understanding of the basic assembler directives: .data, .text, .asciiz, etc.
- Program written in any high level language you choose (C, C++, Pascal, Fortran, Cobol, Lisp, Java, etc.) Be sure to comment and fully test this version.
- A revised version of the program with comments and notes indicating how each part will be converted into assembly language.
Relevant info would include: where labels will be created (and label names) and which registers will be used and for what purposes. (Do this prior to writting the MIPS version of the program)- Program written in MIPS Assembly - This should be well commented
- "Test Cases" - What test cases did you use to verify that you're program worked?
- Sample Runs: Show me the test cases for BOTH your high level language program and the Assembly version.
Use your test cases and comment the output to demonstrate that it worked as expected.
Your test cases should show that the program did work correctly.- Match the structure of the generated output as closely as possible
- Answer the following questions:
- What test cases did you use and why? (What was each case meant to test?)
(My advice is to write test cases BEFORE programming)
- What mistakes did you make in writing the program?
- How might you revise/improve the program?
- How long did this assignment take you?
- How long did you spend debugging?
- Were there any special debugging techniques that you used?
- Were there any special development techniques that you used?
Write a simple distance calculator to add distances in feet and inches and print the total number of yards, feet, and inches.
The program should allow the user to continue entering distances until they enter 0 feet and 0 inches.
Although the data entered will just be in feet and inches, the final sum should be in feet, inches and yards.
(See Sample Runs)
Run 1:
Enter the number of feet: 3
Enter the number of inches: 2
Enter the number of feet: 1
Enter the number of inches: 4
Enter the number of feet: 5
Enter the number of inches: 5
Enter the number of feet: 0
Enter the number of inches: 0
Total Distance: 3 yards, 0 feet, and 11 inches.
Run 2:
Enter the number of feet: 5
Enter the number of inches: 11
Enter the number of feet: 9
Enter the number of inches: 15
Enter the number of feet: 0
Enter the number of inches: 0
Total Distance: 5 yards, 1 feet, and 2 inches.
SPIM Setup:For this program you SHOULD load the trap file
You need to be sure that you are NOT emulating a bare machine