1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ANTONII [103]
3 years ago
10

Write a MIPS assembly language program that adds the following two integers and displays the sum and the difference. In the .dat

a 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.
Computers and Technology
1 answer:
lara [203]3 years ago
4 0
You can modify this code

.data
msg1: .asciiz "Enter the first number: "
msg2: .asciiz "\nEnter the second number: "
result: .asciiz "\nThe result of addition is: "

.text
li $v0,4
la $a0,msg1
syscall

li $v0,5
syscall
move $t1,$v0

li $v0,4
la $a0,msg2
syscall

li $v0,5
syscall
move $t2,$v0

Add $t3,$t1,$t2

li $v0,4
la $a0,msg3
syscall

li $v0,1
move $a0,$t3
syscall

li $v0,10
syscall
You might be interested in
How does data structure affect the programs we use​
Semmy [17]

Answer The data structure and algorithm provide a set of techniques for that program in order for it to function. think of it like yt

Explanation:

7 0
3 years ago
Write Motherboard Components?​
Jet001 [13]

Answer:

These are the parts of a mother board or at least mine for my pc

Hope this helped.

A brainliest is always appreciated.

Explanation:

7 0
3 years ago
Kahnacademy sucksi am so mad i want to k ..<br> ill myself
ehidna [41]
No don’t do thattt ….
4 0
3 years ago
Which cell contains an absolute reference?
Softa [21]

Answer:

An absolute cell reference is a cell address that contain a dollar sign $ in row and column coordinate or both. We use absolute reference to keep row and column constant

Example: C5*$C$2

The reference to C2 is absolute and will not change when copied.

5 0
3 years ago
The way things are arranged on a publication is referred to as the _____.
MissTica
Answer: I’m pretty sure it’s layout
4 0
3 years ago
Other questions:
  • What would be the desired output of a home security system?
    6·1 answer
  • _____ software is used to play, create, and modify audio and video files.
    6·1 answer
  • What should you do when an error message pops up on the screen?
    7·2 answers
  • From the start screen you can
    12·2 answers
  • How would a static local variable be useful?
    5·1 answer
  • Write a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. Fo
    12·1 answer
  • A communications medium that carries a large amount of data at a fast speed is called
    14·1 answer
  • Create a class called Hangman. In this class, Create the following private variables: char word[40], progress[40], int word_leng
    11·1 answer
  • Write a method named collapse that accepts an array of integers as a parameter and returns a new array where each pair of intege
    6·1 answer
  • Part B How could installing new technology, such as scrubber machines, affect the factories required to install them? Name a pos
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!