MPS Lecture 7 - Data Movement Instructions
MPS Lecture 7 - Data Movement Instructions
Arbab Latif
Spring 2021
Resources:
The Intel Microprocessors: Architecture, Programming, and Interfacing, Eighth Edition Barry B. Brey
(Section 4.1)
REVIEW
Machine Language
• Native binary code microprocessor uses as its
instructions to control its operation.
– instructions vary in length from 1 to 13 bytes
• Over 100,000 variations of machine language
instructions.
– there is no complete list of these variations
• Some bits in a machine language instruction
are given; remaining bits are determined for
each variation of the instruction.
Figure 4–1 The formats of the 8086–Core2 instructions. (a) The
16-bit form and (b) the 32-bit form.
MOV AL,[DI]
D=1 data flow to the register REG field from the R/M
MOV field
AL,[DI+2]
D=0 data flow to the register R/M field from the REG
MOV field
AL,[DI+1000H]
W=1 data size Word/DW
W=0 data size Byte
• All 8-bit displacements are sign-extended into
16-bit displacements when the processor
executes the instruction.
– if the 8-bit displacement is 00H–7FH (positive),
it is sign-extended to 0000H–007FH before
adding to the offset address
– if the 8-bit displacement is 80H–FFH (negative),
it is sign-extended to FF80H–FFFFH
Register Assignments
• Suppose a 2-byte instruction, 8BECH,
appears in a machine language program.
– neither a 67H (operand address-size override
prefix) nor a 66H (register-size override prefix)
appears as the first byte, thus the first byte is the
opcode
• In 16-bit mode, this instruction is converted to
binary and placed in the instruction format of
bytes 1 and 2, as illustrated in Figure 4–4.
Figure 4–4 The 8BEC instruction placed into bytes 1 and 2 formats from Figures 4–2
and 4–3. This instruction is a MOV BP,SP.