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
Every windows service has the 3 start types what are those service types?
spayn [35]

Answer:

You can stop, pause, start, delay start, or resume each service as appropriate. You can also modify the start mechanism (Manual or Automatic) or specify an account. Windows Services broadly fall into three categories depending on the actions and applications they control: Local Services, Network Services and System.

5 0
2 years ago
How should you dress for a phone interview
artcher [175]
If you're doing an interview via phone I wouldn't suppose you would need to get dressed into anything specific. If it's going to be a video call, then you should at least wear something presentable  that the camera will see (that means you don't have to wear pants). 
Sorry, if you're looking for some specific answer then I can't help you. This question just kinda throws common sense out there and it's just your job to use it. 
5 0
3 years ago
Read 2 more answers
Which tool allows multiple users to dynamically update a document at the same time? Question 3 options: Google Docs OneDrive Exc
GenaCL600 [577]

Answer:

Excel

Explanation:

7 0
2 years ago
Which of the following is a list of input devices?
charle [14.2K]
The Correct answer would be C. <span>microphone,mouse,scanner

microphone you talk into to give info (data)

a mouse you use to click on objects  to give input 

a scanner you input a paper/object 

hope this helps!! :)


</span>
7 0
3 years ago
The waterfall model and spiral model are variations of SDLC. Do some research to find out what they are and explain how these mo
Radda [10]

Waterfall model and spiral model are used in software development life cycle or SDLC. Any software development process follows one of these models depending on the type of software and the requirements of the customer.

Waterfall model

This model is called as sequential model since it works in stages. The output of first stage becomes the input of the second stage.

The errors of the first stage can be rectified only when it is completed. This is time consuming and makes the process lengthy. Stage 1 is completed before stage 2 begins.

The six stages involved in waterfall model are Requirement Gathering and analysis, System Design, Implementation, Integration and Testing, Deployment of system, and Maintenance.

Spiral model

This model is implemented in iterations. It is also called evolutionary model.  

Initially a prototype of the system is prepared. Then, it is followed by development of small parts of the system.

These smaller parts are then assembled to produce the final system.

The four stages which form the spiral model are Identification, Design, Development and Evaluation and Risk Analysis.

The differences between the two models are summarized below.

1. Waterfall model works in linear method. Spiral model follows evolutionary method.

2. Errors and risks are discovered/ rectified after the stage is over. Errors and risks are discovered/ rectified earlier.

3. Waterfall model is suitable for small projects. Spiral model is suitable for large projects.

4. Requirements identification and planning is the initial stage in the waterfall model. Requirements identification and planning is done when needed, in the spiral model.

5. Waterfall model allows little to no flexibility in the system. Spiral model allows flexibility in the system.

6. Low flexibility makes the waterfall model more risky. High flexibility makes the spiral model less risky.

7. Waterfall model, overall, takes less time since requirements are clear. Spiral model is implemented when the requirements of the system are not clear and become clear through prototypes.

8 0
3 years ago
Other questions:
  • Can you help me correct a sentence?
    13·1 answer
  • The set of folders and subfolders that MATLAB searches through to locate a command or M-file is called the ___________.(fill in
    9·1 answer
  • In what year was google launched on the web?
    14·1 answer
  • Define a function below called average_strings. The function takes one argument: a list of strings. Complete the function so tha
    11·1 answer
  • apple and adobe are in disagreement about the use of __________ to create apps for the iphone and ipad?
    10·1 answer
  • Encapsulation is the process of “packaging” information prior to transmitting it from one location to another. true or false
    14·1 answer
  • After modifying the font of the Subheading1 style, you notice that the font of Subheading2 has also changed. What is the most li
    12·2 answers
  • you have a small network in your business with just a few network devices connected along with 22 linux computers and you want t
    7·1 answer
  • Write a method so that the main() code below can be replaced by simpler code that calls method calcMilesTraveled(). Original mai
    11·1 answer
  • 2. What is the name for an action performed by the VR Robot?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!