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
konstantin123 [22]
3 years ago
11

Write a program that echos back any inputted integer greater than 1, and exits when a 0 is entered. Your program should use a co

nditional branch when deciding whether to echo back the integer or exit the program. It should use a jump when looping back up to run the input+echo again.
Computers and Technology
1 answer:
denpristay [2]3 years ago
7 0

Answer:

MIPS Code:

.data

newline: .asciiz "\n" #newline variable

.text

MAINLOOP:

li $v0, 5 #syscall to get user interger and store in $v0

syscall

add $a0, $zero, $v0 #moving the user input to $a0 from $v0

beq $a0, 0, EXIT #branching to EXIT when $a0 is 0

li $v0, 1 #syscall to print integer in $a0

syscall

li $v0, 4 #syscall to print newline

la $a0, newline

syscall

j MAINLOOP #jumping to MAINLOOP

EXIT:

Sample Output:

6

6

7

7

3

3

0

You might be interested in
If no other row matches, the router will select the ________ row as its best match. First Last either First or Last, depending o
zzz [600]

Answer:

Last

Explanation:

Routing is a term in engineering which involves the process of selecting a path for traffic in a network or across multiple networks. It is applicable in circuit-switched networks, such as the public switched telephone network (PSTN), and computer networks, such as the Internet. It is mostly used as a term for IP Routing.

Hence, in IP Routing, the first step is comparing the packet's destination IP address to all rows, followed by selecting the nest-match row. However, If no other row matches, the router will select the LAST row as its best match.

6 0
3 years ago
What does a production proposal provide ?
aliina [53]

Answer:

information about the cast and crew

Explanation:

3 0
3 years ago
Read 2 more answers
When you sustain program implementation by staying true to the original design, it is termed A. Goals and objectives B. Program
Naya [18.7K]

Answer:

Program fidelity

Explanation:

7 0
3 years ago
Give the an example of the following .<br>a.)typing software<br>​
IceJOKER [234]
Max Type Pro

Stamina Typing Tutor.
3 0
3 years ago
Read 2 more answers
A thief has unfortunately captured your atm card number by placing a panel on top of the face of an atm, which was virtually und
Misha Larkins [42]
The item you described is a skimmer it is oftem=n placed and left for an amount of time or watched from afar than when no on is looking they run-up and extract it for its data
3 0
3 years ago
Other questions:
  • ________ is an open-source program supported by the Apache Foundation that manages thousands of computers and implements MapRedu
    5·1 answer
  • Write a telephone lookup program. Read a data set of 1,000 names and telephone numbers from a file that contains the numbers in
    5·1 answer
  • What is some effective writing techniques?
    7·1 answer
  • PLEASE HELP!
    12·2 answers
  • Hardware refers to programs and protocols used on a computer system.<br><br> True<br> False
    8·2 answers
  • 8.7 lesson practice question 1
    13·1 answer
  • What is the difference between coding with html and coding with python
    10·1 answer
  • Why is it important to think about the programming language to use?
    6·1 answer
  • Group of programs are software <br>​
    11·1 answer
  • The disk you inserted was not readable by this computer
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!