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
maxonik [38]
3 years ago
13

Translate the following C program into an assembly program. The C program finds the minimal value of three signed integers. Assu

me a, b, and c is stored in register r0, r1, and r3, respectively. The result min is saved in register r4.
If (a< b && a min =a;
} else if (b min=b;
} else {
Min=c:
}
Computers and Technology
1 answer:
Gnoma [55]3 years ago
7 0

Answer:

  GLOBAL minRoutine

  AREA MYCODE, CODE, READONLY

  ENTRY

minRoutine

  MOV r0, #0xA  

  MOV r1, #0x3  

  MOV r3, #0x8  

  CMP r0,r1      

  BLT less1Routine      

  CMP r1,r0    

  BLT less2Routine      

  MOV r4,r3      

less1Routine              

CMP r0,r3      

  BLT cond1

less2Routine              

  CMP r1,r3    

  BLT cond2

 

cond1              

  MOV r4,r0      

cond2            

  MOV r4,r1      

  END

Explanation:

  • Inside the minRoutine, move the essential values to the r0, r1 and r3 registers.
  • Check if a is greater than b by comparing value in r0 with r1.
  • Jump to less1Routine, if value of r0 is less than value of r1. Otherwise go to next instruction .
  • Check if b is greater than a by comparing value in r1 with r0.
  • Jump to less2Routine, if value of r1 is less than value of r0. Otherwise go to next instruction .
  • Finally move result of r1 into r4 register.
You might be interested in
Select the function of keypunches that were used as one of the earliest input devices. A. It was used to control the cursor on t
natali 33 [55]

Answer:

Select the function of keypunches that were used as one of the earliest input devices.(1 point) -It was used for punching holes in the paper at relevant ...

Explanation:

3 0
2 years ago
Write a method void Print(int LastNumber, int numbersPerLine) that receives two integers
marysya [2.9K]

Answer:

Code is in the attached screenshot.

Explanation:

Assumed it was written in Java based on your other question asked.

7 0
3 years ago
This method is employed in order to rapidly change the locations of the website in order to ensure that no one site us used long
tester [92]

Answer:

Fast-flux

Explanation:

The techniques that is used to shift the network without shutdown of website.

4 0
3 years ago
Which of the following is a variable expense for many adults?
IRINA_888 [86]
<span>C. Their monthly rent payment.</span>
7 0
3 years ago
Read 2 more answers
Which type of cluster does NOT belong? a. Density-based b. Shared-Property c. Prototype-based d. Hierarchical-based
loris [4]

Answer:

b. Prototype-based

Explanation:

In clustering, certain methods are used to identify groups. This identifies groups of similar objects in a multivariate sets of data which is collected from different fields.

Shared-property clusters shares some property.

Hierarchical cluster builds a hierarchy.

Density-based identifies clusters in a data. While the prototype based sents observation to nearest prototype.

4 0
3 years ago
Other questions:
  • Bit rate is a measure of how many bits of data are transmitted per second. Compared to videos with a higher bit rate, the same v
    13·1 answer
  • Throwing an improperly drained oil filter into the trash dumpster is a violation that can carry heavy penalties. A) true b) fals
    7·1 answer
  • Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than
    7·1 answer
  • A customer comes into a computer parts and service store. The customer is looking for a device to help a person with accessibili
    5·1 answer
  • Raid level 6 is basically the same as RAID level 5, but it adds a second set of parity bits for added fault tolerance and allows
    7·1 answer
  • Probability can be used to determine the likelihood of specific __________
    6·2 answers
  • It’s been six months since the disk crash at CSM Tech Publishing, and the owner is breathing a little easier because you install
    7·1 answer
  • Why is it important to put the most specific case first? What types of errors does it help avoid?
    11·1 answer
  • Denise found a volume of documents in the trash bin that contained individuals, names, social security numbers and years of birt
    14·1 answer
  • In a computer-controlled greenhouse, a temperature sensor and a window motor are connected to the computer.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!