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
insens350 [35]
3 years ago
10

Using MARS/MIPS

Computers and Technology
1 answer:
slega [8]3 years ago
5 0

Answer:

Explanation:

MIPS program which increments from 0 to 15 and display results in Decimal on the console

In this program the user defined procedures print_int and print_eot were used to print the integer values and new line characters(\n) respectively.the mechanisam of the loop is explaine in the comment section of the program.

     addi $s0, $0, 0

     addi $s1, $0, 15

print_int:

              li $v0, 1                # system call to print integer

              syscall                

              jr $ra                     # return

print_eol:                      # prints "\n"

            li $v0, 4            

              la $a0, linebrk      

              syscall              

              jr $ra                  # return

main: . . .          

              li $a0, 0                # print 0

              jal print_int         # print value in $a0

loop:   move $a0, $s0           # print loop count

       jal print_int        

       jal print_eol           # print "\n" character

       addi $s0, $s0, 1        # increment loop count by 1

       ble $s1, $s0, loop      # exit if $s1<$s0

beq $s0, $0, end

end:

MIPS progam to increment from 0 to 15 and display results in Hexadecimal on the console

this program is slightly differed from the previous program in this program the system call issued in print_int is implemented with a system call that prints numbers in hex.

addi $s0, $0, 15

     addi $s1, $0, 0

print_int:

   li      $v0,34                  # syscall number for "print hex"

   syscall                         # issue the syscall

              jr $ra                     # return

print_eol:                      # prints "\n"

            li $v0, 4            

              la $a0, linebrk      

              syscall              

              jr $ra                  # return

main: . . .          

              li $a0, 0                # print 0

              jal print_int         # print value in $a0

loop:   move $a0, $s0           # print loop count

       jal print_int        

       jal print_eol           # print "\n" character

       addi $s0, $s0, 1        # increment loop count by 1

       ble $s1, $s0, loop      # exit if $s0>$s1

beq $s0, $0, end

end:

You might be interested in
What is the role of the computer in banking system?
Daniel [21]

Answer: In banks, computers are used for keeping account information of customer accounts. Banks use technology to carry out payments effectively and successfully. Computers help bankers keep a record of and verify financial records much quicker. Hope this is helpful.

3 0
2 years ago
Which of the following modes of replication requires a very low latency network connection and ensures data remains in synch wit
Sindrei [870]

Option B

Synchronous replication modes of replication requires a very low latency network connection and ensures data remains in synch with zero data loss in the event of a failure at the source site

<u>Explanation:</u>

Synchronous replication, information is replicated to a subsequent remote place at the identical period as fresh information is implying generated or renewed in the original datacenter.  Actually, both master and target roots endure effectively synchronized, which is vital for triumphant crash restoration.

In the circumstances of synchronous replication, this indicates that the write is deemed ended barely when both local and isolated warehouses approve its fulfillment. Therefore, nullity data failure is assured, but the overall execution is regulated down.

5 0
3 years ago
To remove an embedded chart, you should _____ it and press the DELETE key. (Points : 2) move drag hide click
Readme [11.4K]
I think the answer would be "click" 
3 0
3 years ago
Fill in the blank with the correct response.<br> A _<br> is an unknown network.
alexgriva [62]

Answer:

ip address

Explanation:

please mark brainliest

7 0
3 years ago
What are the two features of EDIAC ?​
Sergio [31]

Answer:

By the numbers: “The ENIAC contained 17,468 vacuum tubes, along with 70,000 resistors, 10,000 capacitors, 1,500 relays, 6,000 manual switches and 5 million soldered joints. It covered 1,800 square feet (167 square meters) of floor space, weighed 30 tons, consumed 160 kilowatts of electrical power.” More info

3 0
3 years ago
Other questions:
  • Consider the following JavaScript program:
    8·1 answer
  • Alicia is a dietitian. She gives other people suggestions for nutrition. She wants to organize a large amount of data concerning
    8·2 answers
  • The most common size for a brochure is _____.
    9·1 answer
  • Briefly explain five measures you have undertaken to protect your confidential
    12·1 answer
  • You are in the middle of a big project at work. All of your work files are on a server at the office. You want to be able to acc
    6·1 answer
  • Ken is a mobile app developer. He is designing a mobile app that offers tips and guidance to people interested in learning jazz
    8·2 answers
  • Why do we need on output device?​
    11·2 answers
  • Assignment 2: room area <br>programming python in Project Stem​
    8·1 answer
  • 5) Match the following.
    12·1 answer
  • Computers were originally developed to accomplish various tasks in relative isolation, very different from the collaboration and
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!