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
Your worksheet has the value 27 in cell B3. What value is<br>returned by the function =MOD(B3,6)?​
Digiron [165]

Answer:

3

Explanation:

MOD means the remainder after a division calculation.

\frac{27}{6}= 4r3

The remainder is 3

5 0
3 years ago
Bestie give me some r username ideas​
Anna71 [15]

Answer:

magic school bus dropout

5 0
3 years ago
Read 2 more answers
Question 1 Excel is a tool used to A create a spreadsheet B design a brochure C make a presentation D write a letter
aev [14]

Q1- it is A: Create a spreadsheet


8 0
3 years ago
Edhesive 4.3 code practice question 2
Arturiano [62]
Sos shacahacwhaveusbsusvs js

8 0
2 years ago
You want to upgrade a server by installing an external SCSI tape drive. The system currently has a SCSI card and an internal SCS
jeka94

Answer:

You should disable termination on the Small Computer System Interface (SCSI) controller card.

Explanation:

SCSI is an acronym for Small Computer System Interface, which is also generally referred to as host bus adapter (HBA). The SCSI is typically a chip that controls the communication between the operating system (OS), storage devices such as hard disk drives and the host computer system. Also, it helps with the interpretation of the electrical signals between the Small Computer System Interface (SCSI) bus and the input-output bus for storage devices.

In this scenario, you want to upgrade a server by installing an external SCSI tape drive. The system currently has a Small Computer System Interface (SCSI) card and an internal SCSI hard drive. At bootup, the system fails to recognize the new tape drive. To solve this problem, you should disable termination on the SCSI controller card so that only the external SCSI tape drive will be active and the SCSI won't be detected.

6 0
2 years ago
Other questions:
  • Write a for loop to verify that your function is correctly returning the expected output for the radius values between 0 and 11.
    14·1 answer
  • Interpretations of the AICPA Code of Professional Conduct are dominated by the concept of: Question 4 options: 1) independence.
    5·1 answer
  • Without a well-designed, accurate database, executives, managers, and others do not have access to the ____________________ they
    15·1 answer
  • If given the chance to own manage a business,what will be the name of the business?
    11·2 answers
  • When you're working with a word processing document and you press the del key, what happens?
    6·2 answers
  • How are programs and algorithms related? A program is a part of an algorithm. They are not connected at all. An algorithm is a p
    12·1 answer
  • which program monitors the computer by looking for known trouble makers as well as suspicious behavior​
    11·1 answer
  • Write a function called no_you_pick. no_you_pick should have two parameters. The first parameter is a dictionary where the keys
    5·1 answer
  • How bridges are built over water
    14·1 answer
  • Advantages of using Unicode to represent data
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!