Posted: November 16th, 2015

Computer Organization & Assembly Language Programming

Computer Organization & Assembly Language Programming

Objectives:
-write an assembly language program to:
-load addresses of variables or values of variables into registers.
-perform arithmetic and logical operations on variables
-use syscall operations to display integers and strings on the console window
Assignment Description:
Write a MIPS assembly language program that adds two integers and displays the sum and
the difference. In the .data section, define two variables num1 and num2 both words.
Initialize num1 to 50274 10 and num2 to CB7 16 (use 0xCB7 to initialize). Your main
procedure should load the values of num1 and num2 into two temporary registers, and
display them on the console window. Then add the values together, and use the print_int
system call function to display the sum on the console window. Also compute the difference of
two numbers and display it on the console window. (Reference: see Assignment 1) To print an
integer on the console window, you must put the integer to be printed in the $a0 register, and
Assignment

8/30/15, 1:36 PM
https://courses.eas.asu.edu/cse230/current/assignments/assignment2.html Page 2 of 2
the value 1 in the $v0 register. Then perform a syscall operation. This makes a call to the
PCSPIM operating system which will display the integer in $a0 on the console window.
Name your source code file assignment2.s.
Your output format should look as follows:
num1 is: XXX
num2 is: XXX
num1+num2 = XXX
num1-num2 = XXX
where XXX is the correct number for each.
What to turn in::
-Upload your assignment2.s file through the assignment submission link in the Blackboard by
the assignment deadline. You must have your name, email address, program description, and
other information in the header block as it was described in the assignment 1, and your
programs should be well commented.
Grading Criteria:
____/ 4 Documentation (header and comments)
____/ 1 Indentation (easy to read)
____/ 1 Spacing (easy to read)
____/ 4 Required procedures — just main for this assignment
____/ 2 Does it assemble?
____/ 8 Produces correct results?
Total points: 20

PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET A GOOD DISCOUNT 🙂

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Live Chat+1-631-333-0101EmailWhatsApp