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
The production team for a fictional drama is shooting a key scene. One of the actors leaves out part of his scripted dialogue th
denis-greek [22]

Answer:

at last sentence was . The editor's work .

8 0
3 years ago
Read 2 more answers
Anchor hyperlink to position the cursor to the section called sisters? i need a code pls
enot [183]

use an anchor tag(<a>This is an anchor tag</a>) and use the href attribute and set it's destination to the section element who's id or class is "sisters".



Example:

<a href="#Sisters">Click Here!</a>

then you can add this somewhere on the document.

<section id="Sisters">Hello World!</section>

7 0
3 years ago
What is profession explain with example​
WARRIOR [948]

Answer:   a profession is a job, or what you do for a living

example : a teacher is an example of proffesion

4 0
3 years ago
Read 2 more answers
Load the we8there data set from the textir package. List the first 5 restaurants’ ratings from we8thereRatings. Based on we8ther
Readme [11.4K]

Answer:

> we8thereRatings[1:5,]

  Food Service Value Atmosphere Overall

1     5       5     5          5       5

2     5       5     5          5       5

5     5       5     4          4       5

11    5       5     5          5       5

12    5       5     5          4       5

3 0
3 years ago
A PC is not able to connect to a wired network. Pinging the loopback address is successful, but the gateway cannot be reached. O
tangare [24]
Usually that means a physical connection - so either a loose or faulty ethernet cord.
5 0
2 years ago
Other questions:
  • What can you do with someone's ip address?
    9·1 answer
  • Which biometric technique is considered nearly infallible from a scientific point of view and is increasingly preferred by crimi
    8·1 answer
  • Which statement best describes the Tell Me feature in PowerPoint 2016?
    8·1 answer
  • Write a Python3 program to check if 3 user entered points on the coordinate plane creates a triangle or not. Your program needs
    12·1 answer
  • Select the three careers in the creative side of digital media.
    11·1 answer
  • Inserting and deleting text is a basic editing task in word processing.<br><br> True or false
    6·2 answers
  • Can someone please help me answer the extension activity and the exit ticket. I’ll award you. Thanks❤️.
    12·1 answer
  • What is a good range for CPU usage to be considered running well?
    15·1 answer
  • Does anyone know how to permanently delete photos on a dell computer? For my cousin.
    12·1 answer
  • you have been tasked with configuring a digital information station in the office's lobby. guests will be able to use the statio
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!