Oracle 12c: SQL
Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
Bartleby Related Questions Icon

Related questions

Question

I need help with parts a and b please

a) What does the following code do: a>b, a<b, a=b, al-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
expand button
Transcribed Image Text:a) What does the following code do: a>b, a<b, a=b, al-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
SAVE
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
bartleby
Unlock instant AI solutions
Tap the button
to generate a solution
Click the button to generate
a solution
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
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
A+ Guide to Hardware (Standalone Book) (MindTap C...
Computer Science
ISBN:9781305266452
Author:Jean Andrews
Publisher:Cengage Learning