8086 Assembly Language Addressing Modes

RaptOpArt avatar
RaptOpArt
·
·
Download

Start Quiz

Study Flashcards

8 Questions

What is the purpose of the Segment Registers in 8086 Assembly Language?

They store the starting address of each segment

What is the format used to represent memory addresses in 8086 Assembly Language?

Segment:Offset

Which addressing mode stores the address in a register or memory location?

Indirect Addressing

Which instruction loads the effective address of a memory location into a register?

LEA

What is the primary use of the Data Segment (DS) in 8086 Assembly Language?

Stores the program's data

How many bits are used to represent addresses in 8086 Assembly Language?

20-bit

What is the purpose of the LDS/LES instructions in 8086 Assembly Language?

Loads the DS/ES register with the segment address and the specified register with the offset address

Which memory model allows for multiple segments for code and data, with a maximum of 64KB each?

Large Memory Model

Study Notes

Memory Addressing in 8086 Assembly Language

Addressing Modes

  • Immediate Addressing: The address is specified directly in the instruction. Example: MOV AX, 100
  • Register Addressing: The address is stored in a register. Example: MOV AX, BX
  • Direct Addressing: The address is specified directly in the instruction. Example: MOV AX, [100]
  • Indirect Addressing: The address is stored in a register or memory location. Example: MOV AX, [BX]
  • Indexed Addressing: The address is calculated using a base register and an index register. Example: MOV AX, [BX+SI]

Memory Segments

  • Code Segment (CS): Stores the program's code
  • Data Segment (DS): Stores the program's data
  • Extra Segment (ES): Used for extra data
  • Stack Segment (SS): Used for the program's stack
  • Segment Registers: CS, DS, ES, and SS registers store the starting address of each segment

Memory Address Calculation

  • Segment:Offset format: Segment:Register or Segment:Immediate
  • Effective Address (EA): Calculated using the segment base address and the offset address
  • 20-Bit Addressing: 8086 uses 20-bit addresses, divided into 16-bit segment and 16-bit offset

Memory Access Instructions

  • MOV: Moves data between registers, memory, and immediates
  • LEA: Loads the effective address of a memory location into a register
  • LDS/LES: Loads the DS/ES register with the segment address and the specified register with the offset address

Memory Models

  • Small Memory Model: One segment for code and data (64KB)
  • Compact Memory Model: Multiple segments for code and data (up to 64KB each)
  • Large Memory Model: Separate segments for code and data (up to 64KB each)

Addressing Modes

  • Immediate Addressing uses the address specified directly in the instruction.
  • Register Addressing uses the address stored in a register.
  • Direct Addressing uses the address specified directly in the instruction.
  • Indirect Addressing uses the address stored in a register or memory location.
  • Indexed Addressing calculates the address using a base register and an index register.

Memory Segments

  • Code Segment (CS) stores the program's code.
  • Data Segment (DS) stores the program's data.
  • Extra Segment (ES) is used for extra data.
  • Stack Segment (SS) is used for the program's stack.
  • Segment Registers (CS, DS, ES, and SS) store the starting address of each segment.

Memory Address Calculation

  • Memory addresses are in Segment:Offset format.
  • The Effective Address (EA) is calculated using the segment base address and the offset address.
  • 8086 uses 20-bit addresses, divided into 16-bit segment and 16-bit offset.

Memory Access Instructions

  • MOV moves data between registers, memory, and immediates.
  • LEA loads the effective address of a memory location into a register.
  • LDS/LES loads the DS/ES register with the segment address and the specified register with the offset address.

Memory Models

  • Small Memory Model uses one segment for code and data (64KB).
  • Compact Memory Model uses multiple segments for code and data (up to 64KB each).
  • Large Memory Model uses separate segments for code and data (up to 64KB each).

Understand the different addressing modes in 8086 Assembly Language, including Immediate, Register, Direct, Indirect, and Indexed Addressing. Learn how to use each mode effectively.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser