Question: Explain in this case, why all set the low-order byte of register %eax to the second byte of %edx ? Aside Comparing byte movement instructions

Explain in this case, why "all set the low-order byte of register %eax to the second byte of %edx" ?

Explain in this case, why "all set the low-order byte of register

Aside Comparing byte movement instructions Observe that the three byte-movement instructions movb, movsbl, and movzbl differ from each other in subtle ways. Here is an example: Assume initially that %dh CD, %eax 98765432 movb %dh,%al movsbl %dh,%eax movzbl %dh,%eax %eax-987654CD %eax-FFFFFFCD In these examples, all set the low-order byte of register %eax to the second byte of %eax. The movb instruction does not change the other 3 bytes. The movsbl instruction sets the other 3 bytes to either all ones or all zeros, depending on the high-order bit of the source byte. The movzbl instruction sets the other 3 bytes to all zeros in any case

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!