Featured Posts

Instructions format of 8086 microprocessor in detail.In 8086 all instruction will not be of same size. The instruction vary from 1 to 6 bytes in length. The length of instruction bytes is dependent upon addressing mode used by programmer i.e. immediate, register relative, based indexed, relative based indexed and so on.

Basically instruction bytes will contain information of :

OPCODE

Addressing mode designations :

2 byte Effective Address.

1 or 2 byte displacement.

1 or 2 byte immediate operand.

As shown in figure normally first byte is OPCODE byte, second byte normally specifies addressing mode. Sometime it may also contain OPCODE part. After OPCODE and addressing mode bytes, we have following different cases :

If a displacement or immediate operand is 2 bytes long, the low order byte always appears first, this is Intel standard.

Instruction format of 8086 microprocessor

As shown in this figure the first six bits of multi byte instruction generally contains an opcode that identifies the basic instruction type i.e. ADD, XOR etc. The following bit, called the D field, generally specifies the direction of the operation.

V = 0 shift/rotate count is one = 1 shift/rotate count is specified in CL register. Z bit : This bit is used as compare bit with zero flag in conditional repeat(REP) and loop instructions. Z = 0 Repeat/loop while zero flag is clear = 1 Repeat/loop while zero flag is set.MOD : The mode (MOD) field indicates whether one of the operands is in memory or whether both operands are register.REG : The register field identifies a register that is one of the instruction operands REG field depends upon W bit.R/M (Register or Momery) : This field is of 3 bits. The meaning of R/M bits changes depending upon mode (MOD) field.