Addressing Modes (8086) PDF

Summary

This document explains the different addressing modes used in 8086 microprocessors, including register, immediate, direct, register indirect, based, indexed, based-indexed, I/O port, relative, and implied addressing modes. It also describes the functions of general-purpose registers like AX, BX, CX, and DX, as well as 16-bit and 8-bit operand registers.

Full Transcript

# Addressing Modes The image describes the Addressing Modes used in 8086 microprocessors. The addressing modes are categorized into 5 groups, each with specific characteristics: ## Addressing Modes for Register and Immediate Data 1. **Register Addressing:** The instruction will specify the name...

# Addressing Modes The image describes the Addressing Modes used in 8086 microprocessors. The addressing modes are categorized into 5 groups, each with specific characteristics: ## Addressing Modes for Register and Immediate Data 1. **Register Addressing:** The instruction will specify the name of the register holding the data to be operated on. Example: `MOV CL, DH` moves the content of the 8-bit register `DH` to the 8-bit register `CL`. 2. **Immediate Addressing:** An 8-bit or 16-bit data is specified as part of the instruction. Example: `MOV DL, 08H` moves the 8-bit data `08H` to `DL`. `MOV AX, 0A9FH` moves the 16-bit data `0A9FH` to `AX`. ## Addressing Modes for Memory Data 3. **Direct Addressing:** The effective address of the memory location storing the operand is directly specified in the instruction. It's a 16-bit number referred to as the effective address. Example: `MOV BX, [1354H]` copies the contents of the memory location `1354H` to `BX`. 4. **Register Indirect Addressing:** The name of the register holding the effective address is provided in the instruction. The registers used for holding the effective addresses are `BX`, `BP`, `DI`, and `SI`. The content of the `DS` register is used for calculating the base address. Example: `MOV CX, [BX]` This copies the data at the address specified in the `BX` register to `CX`. 5. **Based Addressing:** `BX` or `BP` is used to hold the base value. A signed 8-bit or unsigned 16-bit displacement is also specified in the instruction. If 8-bit displacement is used, it's sign-extended to 16-bit before adding to the base value. Example: `MOV AX, [BX + 08H]` 6. **Indexed Addressing:** `SI` or `DI` is used to hold an index for memory data. A signed 8-bit or unsigned 16-bit displacement is also specified in the instruction. Example: `MOV CX, [SI + 0A2H]` 7. **Based Indexed Addressing:** The effective address is calculated by summing a base register (`BX` or `BP`), an index register (`SI` or `DI`), and a displacement. Example: `MOV DX, [BX + SI + OAH]` ## Addressing Modes for I/O Ports 8. **Direct I/O port Addressing:** An 8-bit port address is directly specified in the instruction. Example: `IN AL, [09H]` ## Relative Addressing Mode 9. **Relative Addressing:** The effective address is specified relative to the Instruction Pointer (`IP`) by an 8-bit signed displacement. Example: `JZ OAH` ## Implied Addressing Mode 10. **Implied Addressing:** Instructions using this mode have no operands. The instruction itself specifies the data to be operated on. Example: `CLC`. ## Further Information - **Three Levels of Programming:** *Machine Language* (binary form), *Assembly Language* (using mnemonics), and *High-Level Language* (using English-like statements). - **Assembler:** Converts assembly language code to machine code. - **General Instruction Format:** Each instruction consists of an **Opcode**, followed by one or more **Operands**. The document then has figures and detailed explanations for each of the addressing modes, along with examples. It concludes by discussing: - **Registers:** `AX` (Accumulator Register), `BX` (Base Register), `CX` (Counter Register), `DX` (Data Register) and their functionalities. - **Operand Registers:** 16-bit registers are `AX`, `BX`, `CX`, `DX`, `SI`, `DI`, `SP`, `BP`. 8-bit registers are `AL`, `AH`, `BL`, `BH`, `CL`, `CH`, `DL`, `DH`. - **Addressing Mode:** Methods used to access instruction operands. The document lists three basic modes: *Immediate*, *Register*, and *Memory*. - **Implicit Addressing:** The data value or address is associated with the instruction. Examples include `AAA`, `AAS`, `AAM`, `AAD`, `DAA`, `DAS`, and `XLAT`. - **Immediate Addressing:** The data or operand is part of the instruction. Example: `MOV AX, 25BF` - **Direct Addressing:** Data is pointed by a 16-bit offset value specified in the instruction. Example: `MOV AX, [5000H]`. - **Register Addressing:** The data is in the register specified in the instruction. Example: `MOV BX, AX`. - **Register Indirect Addressing:** The data is pointed to by the offset value in the register, specified in the instruction. Example: `MOV AX, [BX]`. - **Indexed Addressing:** The data is pointed to by the offset in the index register specified in the instruction. Example: `MOV AX, [SI]`. - **Register Relative Addressing:** The data is pointer to by the sum of 8-bit or 16-bit displacement specified in the instruction plus an offset in the base/index register. Example: `MOV AX, 50H [BX]`. - **Based Indexed Addressing:** Data is pointed to by content of base and index register specified in the instruction. Example: `MOV AX, [BX][SI]` Remember, this response provides a structured summary of the attached image. It doesn't contain the image itself.

Use Quizgecko on...
Browser
Browser