a) What does the following code do: a>b, a-b or a <-b? asm volatile( X "Idi %B0, 0 \n\t" //set the high byte of the result, always 0 "cp %A2%A1 \n\t" //compare the low byte of b against a "cpc %B2%BI \n\t" //compare the high bytes with the carry "brge then%\n\t" "Idi %A0, 0 \n\t" //pass back true "rimp over%\n\t" //jump over the then "then%: Idi %A0,1 \n\t" //pass back false "over%: Idi %B0, 0 \n\t" "d" (result) //output list : "d" (a), "d" (b) //input list //clobber list b) Complete the code to do ab, but you must use brne branch command! asm volatile( "Idi %B0, 0 \n\t" //set the high byte of the result, always 0 "cp %A2%A1 \n\t" //compare the low byte of b against a "cpc %B2,%B1 \n\t" //compare the high bytes with the carry "brne : "d" (result) //output list : "d" (a), "d" (b) //input list //clobber list
a) What does the following code do: a>b, a-b or a <-b? asm volatile( X "Idi %B0, 0 \n\t" //set the high byte of the result, always 0 "cp %A2%A1 \n\t" //compare the low byte of b against a "cpc %B2%BI \n\t" //compare the high bytes with the carry "brge then%\n\t" "Idi %A0, 0 \n\t" //pass back true "rimp over%\n\t" //jump over the then "then%: Idi %A0,1 \n\t" //pass back false "over%: Idi %B0, 0 \n\t" "d" (result) //output list : "d" (a), "d" (b) //input list //clobber list b) Complete the code to do ab, but you must use brne branch command! asm volatile( "Idi %B0, 0 \n\t" //set the high byte of the result, always 0 "cp %A2%A1 \n\t" //compare the low byte of b against a "cpc %B2,%B1 \n\t" //compare the high bytes with the carry "brne : "d" (result) //output list : "d" (a), "d" (b) //input list //clobber list
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section2.5: Variables And Declaration Statements
Problem 11E
Related questions
Question
I need help with parts a and b please
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
Unlock instant AI solutions
Tap the button
to generate a solution
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
A+ Guide to Hardware (Standalone Book) (MindTap C…
Computer Science
ISBN:
9781305266452
Author:
Jean Andrews
Publisher:
Cengage Learning