C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
Bartleby Related Questions Icon

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;
expand button
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
Check Mark
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning