8086 Addressing Modes
8086 Addressing Modes
Basic of 8086
Op-code D W
Op-code field indicates the operation to be carried out
• This format is only 1 byte long and may have implicit data or
register operands.
• Otherwise all the 8 bit form an op-code and the operand are
implied.
Register to register
Op-Code W
2nd Byte
1 1 REG R/M
Register to/memory with no displacement
0 0 No displacement
6 bit 1 bit
Op-Code W
2nd Byte
6 bit 2 bit
Op-Code W
2nd Byte
2 bit 3 bit 3 bit
MOD REG R/M
4th Byte
3rd Byte
8 bit
8 bit
8 bit
OPCODE
2nd Byte
1 bit 1 bit 3 bit 3 bit
1 1 REG R/M
4th Byte
3rd Byte
8 bit
8 bit
• Brach instructions
• Loop instructions
• String instructions
Data transfer/copy instructions
• Syntax: LAHF
• Operation: AHlower byte of flag register
• This instruction loads the AH register with the lower byte of
the flag register.
• This instruction may be used to observe the status of all the
condition flags
• The lower byte of 8086 flag register is same as the flag byte of
the 8085
SAHF-store AH register to lower byte of
flag register
• Syntax: SAHF
• Operation:
lower byte of flag registerAH
- This instruction copies the contents of AH register to the
lower byte of 8086 flag register
- This instruction set or reset the condition code flag in a
lower byte of the flag register depending upon bit
position in AH
- If a bit in AH is 1 the flag corrpossponding to bit
position is set else reset
PUSHF