This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Immediate--Register Register--Register Memory--Register Immediate--Memory Register--Memory The movb instruction is similar, except that it moves just a single byte. When one of the operands is a register, it must be one of the eight single-byte register elements illustrated in Figure 3.2. Similarly, the movw instruction moves two bytes. When one of its operands is a register, it must be one of the eight two-byte register elements shown in Figure 3.2. Both the movsbl and the movzbl instruction serve to copy a byte and to set the remaining bits in the destination. The movsbl instruction takes a single-byte source operand, performs a sign extension to 32 bits (i.e., it sets the high-order 24 bits to the most signiﬁcant bit of the source byte), and copies this to a double-word destination. Similarly, the movzbl instruction takes a single-byte source operand, expands it to 32 bits by adding 24 leading zeros, and copies this to a double-word destination.
Aside: Comparing byte movement instructions. Observe that the three byte movement instructions movb, movsbl, and movzbl differ...
View Full Document
- Spring '10
- The American