Instruction Format in 8086
Microprocessor
Unlocking the Core of Assembly
Language Programming
Introduction
• • The 8086 Microprocessor is widely
utilized in programming and
embedded systems.
• • To code efficiently, it’s essential to
understand instruction formats—how
they are structured and executed.
Basic Structure of an
Instruction Format
• • Opcode: Specifies the operation to be
performed.
• • Operands: Define the data to be
operated on.
• These fields determine how the CPU
interprets instructions.
Types of 8086 Instruction
Formats
• 1. One-byte Instruction
• 2. Register-to-Register
• 3. Register-to/from Memory without
Displacement
• 4. Register-to/from Memory with Displacement
• 5. Immediate Operand to Register
• 6. Immediate Operand to Memory with
Example: One-byte
Instruction
• • CLC: Clear Carry Flag
• • This instruction is compact, requiring
only one byte of space.
• • Efficiency: Ideal for small operations.
• Example Code:
• CLC ; Clears the carry flag.
Example: Register-to-Register
Format
• • Example: MOV CL, AL
• • Size: 2 bytes
• • Explanation: Moves the value from
register AL to register CL.
• Example Code:
• MOV CL, AL ; Move the value from AL
to CL register.
Example: Register-to/from
Memory with Displacement
• • Example: MOV AX, [BX+4]
• • Displacement: Specifies an offset for
memory addressing.
• • Usage: Vital for complex memory
operations.
• Example Code:
• MOV AX, [BX+4] ; Move the value from
memory at address [BX + 4] to AX.
Immediate Operand to
Register
• • Example: MOV AX, 1234H
• • Immediate Data: The instruction
directly includes the data value.
• • Practical Use: Useful for initializing
registers with fixed values.
• Example Code:
• MOV AX, 1234H ; Load the immediate
value 1234H into register AX.
Immediate Operand to
Memory with Displacement
• • Instruction includes immediate data
and references memory with an offset
(displacement).
• • Example: MOV [BX+4], 1234H
• ; Moves the immediate value 1234H
to the memory location computed by
BX + 4.
• Example Code:
Summary of Addressing
Modes
• • Immediate Addressing: Data is part
of the instruction.
• • Register Addressing: Operates
directly on registers.
• • Direct Addressing: Refers to a
memory location directly.
• • Register Indirect Addressing: Uses
Conclusion
• • Instruction formats in the 8086
microprocessor help define how
operations and operands are encoded.
• • Understanding these formats is
critical for writing efficient assembly
language code.

Instruction format of 8086 microprocessor

  • 1.
    Instruction Format in8086 Microprocessor Unlocking the Core of Assembly Language Programming
  • 2.
    Introduction • • The8086 Microprocessor is widely utilized in programming and embedded systems. • • To code efficiently, it’s essential to understand instruction formats—how they are structured and executed.
  • 3.
    Basic Structure ofan Instruction Format • • Opcode: Specifies the operation to be performed. • • Operands: Define the data to be operated on. • These fields determine how the CPU interprets instructions.
  • 4.
    Types of 8086Instruction Formats • 1. One-byte Instruction • 2. Register-to-Register • 3. Register-to/from Memory without Displacement • 4. Register-to/from Memory with Displacement • 5. Immediate Operand to Register • 6. Immediate Operand to Memory with
  • 5.
    Example: One-byte Instruction • •CLC: Clear Carry Flag • • This instruction is compact, requiring only one byte of space. • • Efficiency: Ideal for small operations. • Example Code: • CLC ; Clears the carry flag.
  • 6.
    Example: Register-to-Register Format • •Example: MOV CL, AL • • Size: 2 bytes • • Explanation: Moves the value from register AL to register CL. • Example Code: • MOV CL, AL ; Move the value from AL to CL register.
  • 8.
    Example: Register-to/from Memory withDisplacement • • Example: MOV AX, [BX+4] • • Displacement: Specifies an offset for memory addressing. • • Usage: Vital for complex memory operations. • Example Code: • MOV AX, [BX+4] ; Move the value from memory at address [BX + 4] to AX.
  • 9.
    Immediate Operand to Register •• Example: MOV AX, 1234H • • Immediate Data: The instruction directly includes the data value. • • Practical Use: Useful for initializing registers with fixed values. • Example Code: • MOV AX, 1234H ; Load the immediate value 1234H into register AX.
  • 10.
    Immediate Operand to Memorywith Displacement • • Instruction includes immediate data and references memory with an offset (displacement). • • Example: MOV [BX+4], 1234H • ; Moves the immediate value 1234H to the memory location computed by BX + 4. • Example Code:
  • 11.
    Summary of Addressing Modes •• Immediate Addressing: Data is part of the instruction. • • Register Addressing: Operates directly on registers. • • Direct Addressing: Refers to a memory location directly. • • Register Indirect Addressing: Uses
  • 12.
    Conclusion • • Instructionformats in the 8086 microprocessor help define how operations and operands are encoded. • • Understanding these formats is critical for writing efficient assembly language code.