8086 Microprocessor Summary Notes

8086 Microprocessor Overview

  • 16-bit microprocessor architecture with a 20-bit address bus.

  • Supports a memory space of 1 MB1\,MB.

  • Implements pipelining through a 6-byte instruction queue.

System Architecture

  • BIU (Bus Interface Unit): Fetches instructions, generates 20-bit physical addresses, and maintains the 6-byte queue. It contains registers: CSCS, DSDS, SSSS, ESES, and IPIP.

  • EU (Execution Unit): Decodes and executes instructions using the ALU, control logic, and flags. It contains general-purpose registers: AXAX, BXBX, CXCX, and DXDX.

Memory Segmentation and Physical Addressing

  • Memory is organized into segments: Code Segment (CSCS), Data Segment (DSDS), Stack Segment (SSSS), and Extra Segment (ESES).

  • The Physical Address is calculated using the formula: Physical Address=Segment×10H+Offset\text{Physical Address} = \text{Segment} \times 10H + \text{Offset}.

  • Example: 2000H:1234H=2000H×10H+1234H=21234H2000H : 1234H = 2000H \times 10H + 1234H = 21234H.

Registers and Flags

  • Flag Register: Includes CFCF, PFPF, AFAF, ZFZF, SFSF, TFTF, IFIF, DFDF, and OFOF.

  • Notable Flags: Carry Flag (CFCF), Zero Flag (ZFZF), Sign Flag (SFSF), and Overflow Flag (OFOF).

Stack and Interrupts

  • Stack Behavior: The stack grows downward toward lower memory addresses. A PUSHPUSH operation results in SP=SP−2SP = SP - 2.

  • Function Calls: CALLCALL pushes the return address onto the stack, while RETRET pops the return address.

  • Interrupt Types:

    • NMI: Non-maskable interrupt.

    • INTR: Maskable interrupt.

Addressing Modes

  • Immediate addressing

  • Register addressing

  • Direct addressing

  • Indirect addressing

  • Based addressing

  • Indexed addressing