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
9. Changing from a bystander to an advocate requires
Rina8888 [55]
9
The answer is bravery
6 0
2 years ago
A ____ is text and graphics that print at the bottom of every page.
oksano4ka [1.4K]
Foot note, or footer.
6 0
4 years ago
4. The programmer who focuses on implementing the game mechanics, rules, and other elements essential for gameplay is the
Snezhnost [94]
The answer would be gameplay programmer, as they are responsible for the implementation of gameplay  mechanics.
7 0
3 years ago
A 3-Tier computing environment is constructed of ....... servers ?
Inessa [10]

Answer:

B. Tow

Explanation:

Application server and database server

6 0
3 years ago
What is a protocol and what are the types of protocol​
wlad13 [49]
A protocol is a set of rules that governs the communications between computers on a network.

1. HTTP or HTTPs. This stands for Hypertext Transfer Protocol or Hypertext Transfer Protocol (secure).

2. FTP (File Transfer Protocol)

3. Email Protocols (POP3, IMAP, SMTP)

4. TCP(Transmission Control Protocol) and UDP(User Datagram Protocol)

Hoped that helped
3 0
4 years ago
Read 2 more answers
Other questions:
  • 1. You want to schedule a weekly analysis for the Windows servers in your data center. The command should run as a scheduled job
    15·1 answer
  • Keion works as a freelancer creating websites and designing logos for clients. He recently had a hard drive failure and lost wor
    10·1 answer
  • Fill in the function shopSmart(orders,shops) in shopSmart.py, which takes an orderList (like the kind passed in to FruitShop.get
    6·1 answer
  • For Official Use Only (FOUO) and Controlled Unclassified Information (CUI) may include all of the following except: (circle one)
    13·1 answer
  • Please label the parts its urgent Best answer receives a brainliest and 20 points please i need it :) :) ​
    5·2 answers
  • What is an example of hardware
    13·2 answers
  • 4. You are planning to buy a new couch for your family room. Before you leave for the furniture store, you measure the available
    11·1 answer
  • Help pleaseeeeeeeeeeeeeeeeee
    7·1 answer
  • Reflection image and design
    12·1 answer
  • What effect have computers had on your life?​​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!