6-25
INSTRUCTION SET SUMMARY
6.3.2.1.TYPE CONVERSION INSTRUCTIONS
The type conversion instructions convert bytes into words, words into doublewords, and double-
words into quadwords. These instructions are especially useful for converting integers to larger
integer formats, because they perform sign extension (refer to Figure 6-5).
Two kinds of type conversion instructions are provided: simple conversion and move and
convert.
6.3.2.2.SIMPLE CONVERSION
The CBW (convert byte to word), CWDE (convert word to doubleword extended), CWD
(convert word to doubleword), and CDQ (convert doubleword to quadword) instructions
perform sign extension to double the size of the source operand.
Figure 6-4. Operation of the POPA Instruction
Figure 6-5. Sign Extension
Stack
After Popping Registers
Growth
ESP
n - 4
n - 8
n
Stack
Before Popping Registers
ESP
EAX
EDI
EBX
EBP
ECX
EDX
Ignored
ESI
n - 36
n - 20
n - 28
n - 12
n - 16
n - 24
n - 32
0
31
0
31
31
After Sign
15
0
S
NNNNNNNNNN
NNNNN
S
S
S
S
S
S
S
S
S
S
S
SS
S
S
S
Extension
Before Sign
15
0
S
NNNNNNNNNN
NNNNN
Extension