7. Add the missing lines of assembly code to make the assembly code implement the c-code that is commented out. int attribute ((noinline)) takeThree (int a, int b, int c) ( int result; //result = a + b + c; asm volatile ( "mov 8A0, 8A1 \n\t "mov 8B0, 8B1 \n\t "add 8A0, 8A2 \n\t "adc 8B0, 8B2 \n\t //move low byte of a to //add the low bytes //add the high bytes //move low byte of a to low byte of result low byte of result ); : "d" (result) //output list : "d" (a), "d" (b), "d (c) //input list //clobber list return result;
7. Add the missing lines of assembly code to make the assembly code implement the c-code that is commented out. int attribute ((noinline)) takeThree (int a, int b, int c) ( int result; //result = a + b + c; asm volatile ( "mov 8A0, 8A1 \n\t "mov 8B0, 8B1 \n\t "add 8A0, 8A2 \n\t "adc 8B0, 8B2 \n\t //move low byte of a to //add the low bytes //add the high bytes //move low byte of a to low byte of result low byte of result ); : "d" (result) //output list : "d" (a), "d" (b), "d (c) //input list //clobber list return result;
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 19SA
Related questions
Question
I need help with this please
![7. Add the missing lines of assembly code to make the assembly code implement the c-code that is commented
out.
int attribute ((noinline)) takeThree (int a, int b, int c) (
int result;
//result = a + b + c;
asm volatile (
"mov 8A0, 8A1 \n\t
"mov 8B0, 8B1 \n\t
"add 8A0, 8A2 \n\t
"adc 8B0, 8B2 \n\t
//move low byte of a to
//add the low bytes
//add the high bytes
//move low byte of a to low byte of result
low byte of result
);
: "d" (result) //output list
: "d" (a), "d" (b), "d (c) //input list
//clobber list
return result;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fac1296a0-0c46-498f-a533-74982583253b%2F4110f7be-9247-4e52-bbf9-54cdad6e16b5%2F4c4grfs_processed.png&w=3840&q=75)
Transcribed Image Text:7. Add the missing lines of assembly code to make the assembly code implement the c-code that is commented
out.
int attribute ((noinline)) takeThree (int a, int b, int c) (
int result;
//result = a + b + c;
asm volatile (
"mov 8A0, 8A1 \n\t
"mov 8B0, 8B1 \n\t
"add 8A0, 8A2 \n\t
"adc 8B0, 8B2 \n\t
//move low byte of a to
//add the low bytes
//add the high bytes
//move low byte of a to low byte of result
low byte of result
);
: "d" (result) //output list
: "d" (a), "d" (b), "d (c) //input list
//clobber list
return result;
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Systems Architecture](https://www.bartleby.com/isbn_cover_images/9781305080195/9781305080195_smallCoverImage.gif)
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning