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
Zarrin [17]
2 years ago
6

Write an assembly subroutine that check if a number is in the interval of [0, 10] and return 1 if the number is in this interval

and 0 otherwise. Call this subroutine to check if each integer in an array in the memory is in this interval and write the results of all numbers into another array in the memory
Computers and Technology
1 answer:
Setler79 [48]2 years ago
5 0

Answer:

.data

array: .word 1,3,5,7,9,11,13,15,17,19

result: .word 0,0,0,0,0,0,0,0,0,0

.text

  la $s0, array

  la $s1, result

  addi $t0, $zero, 0

  INTERVAL:  bge $t0, 10, END

     sll $t1, $t0, 2

     add $t2, $s0, $t1

     lw $t2, 0($t2)

     jal LIMIT

     IF:    bne $a0, 1, ELSE

        add $t3, $s1, $t1

        sw $t2, 0($t3)

     ELSE:

     addi $t0, $t0, 1

     j INTERVAL

  END:    

  addi $v0, $zero, 10

  syscall

  LIMIT:  

     addi $a0, $zero, 0

     START: bge $t2, 0, NEXT

        b ENDLIMIT

     NEXT:  ble $t2, 10, SET

        b ENDLIMIT  

     SET:   addi $a0, $zero, 1

     ENDLIMIT:

     jr $ra

Explanation:

The assembly source code is used to create a subroutine called "INTERVAL" that checks if a number from an array is in a range of 1 to 10. The program returns 1 if the condition is met but 0 if otherwise.

You might be interested in
Where can I learn how you hack?​
morpeh [17]

Answer:

www.udemy.com

5 0
2 years ago
Read 2 more answers
En la historia del Computador porque se caracteriza la primera generación? *
Nadusha1986 [10]

D. Por el uso de tubos de vacio.

8 0
3 years ago
Why is it useful for students to practice the MLA and APA citation methods?
notka56 [123]

Answer:

Citing or documenting the sources used in your research serves three purposes:

It gives proper credit to the authors of the words or ideas that you incorporated into your paper.

It allows those who are reading your work to locate your sources, in order to learn more about the ideas that you include in your paper.

5 0
2 years ago
Which of the following is NOT a common grammar adjustment which is identified by grammar-check software?
Sedbober [7]

Answer:

Shortened versions of phrases Ex:(l ol, s mh, i dk, ect.)

Explanation:

Hope that this helps, if you have any more question please feel free to contact me, hope you have an amazing rest of your day. ;D

7 0
2 years ago
Consider the following methods.public void modParams(int[] x, int[] y, String[] s){x[1] = 5;y = x;s[1] = new String("five");s =
skad [1K]
I am not too happy to be a good man in my world but he is made me very very much and he is made me very very much and he is very much very good to him very much and he is very much very good to you very good and very much to be able for my kids with a little more money will not go back and you can do the greatest if he can be very much and you have no problem and then we do all the way that we are not the right answer but you have a question to do and you don’t have the right right answer the answer right back and he will not be very good I am very good and he is very very bad
5 0
3 years ago
Other questions:
  • What is the typical relationship between time and interest rate?
    12·1 answer
  • Write a Python program that will take as input 5 integer values and will output the average of the odd values and the average of
    6·1 answer
  • Assume the following instruction mix for some program:______.
    8·1 answer
  • Need help please. this effect my technology
    15·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
  • Help me decide this hurry
    12·1 answer
  • Pls help I will mark you the brainliest
    9·2 answers
  • Sdq1fdszgdSHTGafeges'
    15·1 answer
  • Which of the following sentences from the section "The Limits To Free Enterprise With A Mixed Economy" BEST develops a central i
    10·1 answer
  • You are creating a query for a website. The query
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!