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
List the different generation of computers with its main component​
Dennis_Churaev [7]

Answer:

1940 – 1956:  First Generation

1956 – 1963: Second Generation

1964 – 1971: Third Generation

1972 – 2010: Fourth Generation

2010-  : (Present )Fifth Generation

Explanation:

  1. First Generation Computers (1940-1956):In this Generation the main component of computers were Vacuum Tubes.
  2. Second Generation Computers (1956-1963):In this generation the main component of computers were Transistors.
  3. Third Generation Computers (1964-1971):In this generation the main component of computers were Integrated Circuits.
  4. Fourth Generation Computers (1972-2010):In this generation the main component of computers were Microprocessor
  5. Fifth Generation (2010-Present):In this generation the main component of computers is Artificial Intelligence
4 0
3 years ago
How Mobile App work? Explain​
Marat540 [252]

Explanation:

Mobile Applications are moving away from the embedded software systems normally found on PCs.Instead,each application provides limited and isolated functions,such as a game,a calculator or mobile web browing.

8 0
3 years ago
The decision in an if statement is referred to as a
damaskus [11]
A selection because when you decide something you select
5 0
2 years ago
Read 2 more answers
After calling the customer service line of Delta airlines, Francis received an email asking her to fill out customer satisfactio
Irina-Kira [14]

Answer:

Surveys

Explanation:

Quantitative research methods seek to generate useful data to properly analyze the behaviors, opinions, and attitudes of some selected individuals. The collection method of quantitative methods includes all forms of surveys (paper, online, mobile, etc.).

The customer satisfaction questions are a form of surveys because they seek to discover her perception, attitude, and behavior towards their company.

3 0
4 years ago
What are the steps of active listening?
SashulF [63]
1 prepare mentally
2 pay attention
3 allow the speaker to talk without interruption until he is done
4 provide feedback
5 repeat the feedback until you and the communicator are satisfied that the message was conveyed well
7 0
3 years ago
Other questions:
  • You are working at establishing a computer network and communications support for incident personnel. where are you working?
    12·1 answer
  • Chris needs to modify the default bullets that are used in a nonnumbered list in word. Which method should he use?
    9·2 answers
  • Answer all of the questions correctly and you will be amazing. Fill in Blanks
    8·1 answer
  • The ability to keep web page visitors at your site is called _______.
    11·1 answer
  • Which of the following statements is not true? Group of answer choices
    9·1 answer
  • Your friend Rebecca called because she is working on a budget and needs help with the AutoSum feature. She thinks AutoSum will b
    8·1 answer
  • Halcyon, an e-publisher, has recently decided to use an information system that administers the way its customers access its onl
    12·1 answer
  • He flow of electric charges through a material describes an electric _______.
    10·1 answer
  • Language is Python
    15·1 answer
  • __________ translates analog voice signals into digital data and uses the Internet to transport the data.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!