Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:20, lovely222
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
image
Computers and Technology, 24.06.2019 06:30, toolazytobehuman
Me and category do i put them in because this is science
Answers: 1
image
Computers and Technology, 25.06.2019 07:00, ChHal1958
Afile named data. txt contains an unknown number of lines, each consisting of a single integer. write some code that creates two files, dataplus. txt and dataminus. txt, and copies all the lines of data1.txt that have positive integers to dataplus. txt, and all the lines of data1.txt that have negative integers to dataminus. txt. zeros are not copied anywhere.
Answers: 2
image
Computers and Technology, 25.06.2019 12:00, dariannalopez5902
The user needs to add a thick dark green border around a chart in powerpoint. the user can do this in chart tools by choosing?
Answers: 1
Do you know the correct answer?
Write a MIPS assembly language program that adds the following two integers and displays the sum and...

Questions in other subjects:

Konu
Mathematics, 30.05.2020 23:58
Konu
Mathematics, 30.05.2020 23:58