subject

Write a MIPS assembly language program that adds the following two integers and displays the sum and the difference. In the .data section, define two variables num1 and num2 both words. Initialize num1 to 78591 10 and num2 to D5A 16 (use 0xD5A to initialize, Note that D5A is a hexadecimal number). Your main procedure/function 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 syscall for 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 the value 1 in the $v0 register. Then perform a syscall operation. This makes a call to the SPIM operating system which will display the integer in $a0 on the console window. Name your source code file assignment2.s.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
The computers in the sales department did not have enough data storage capacity to contain all the information the department needed to store, and it was taking a long time for team members to access the data they needed. to fix the problem, the technician installed new, larger hard drives on all the computers.
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
You know the right answer?
Write a MIPS assembly language program that adds the following two integers and displays the sum and...
Questions
question
Mathematics, 18.08.2019 22:50
question
Biology, 18.08.2019 22:50
question
History, 18.08.2019 22:50
question
Biology, 18.08.2019 22:50
Questions on the website: 13722360