Question

Given the following C variable and its assembly storage: Variable Location i %rax Select the line...

Given the following C variable and its assembly storage:

Variable   Location
   i         %rax

Select the line of C code that translates to the following set of assembly instructions:

   test %rax,%rax
   jle 4008b9

Question options:

if ( i >= 0 )
if ( i < 0 )
if ( i < 1 )
 
0 0
Add a comment Improve this question Transcribed image text
Answer #1
Given code:
test %rax,%rax
jle 4008b9

first instruction compares rax with itself means check if variable i is equal to 0 or less than 0 or grater than 0

second instruction jumps to given address if i is less than or equal to 0

jle meas Jump Less than or Equal

Answer:

if(i<1)

Add a comment
Know the answer?
Add Answer to:
Given the following C variable and its assembly storage: Variable Location i %rax Select the line...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT