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" ?

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
Get step-by-step solutions from verified subject matter experts
