Ch-3-Addressing Modes
Ch-3-Addressing Modes
MODES
3.1 Data-Addressing Modes
3.1.1 Register Addressing
3.1.2 Immediate Addressing
3.1.3 Direct Data Addressing
3.1.4 Register Indirect Addressing
3.1.5 Base-Plus-Index Addressing
3.1.6 Register Relative Addressing
3.1.7 Base Relative-Plus-Index Addressing
3.1.8 Scaled-Index Addressing
3.1.9 RIP Relative Addressing
3.1.10 Data Structures
3.2 Program Memory-Addressing Modes
3.2.1 Direct Program Memory Addressing
3.2.2 Relative Program Memory Addressing
3.2.3 Indirect Program Memory Addressing
3.3 Stack Memory-Addressing Modes
1 Compiled By: Mr. Abdisa L. AUWC dept of CS
Addressing Modes
Accessing operands (data) in various ways.
The 8086 memory addressing modes provide flexible
access to memory, allowing you to easily access variables,
arrays, records, pointers, and other complex data types.
The different ways in which the location of an operand is
specified in an instruction is called as Addressing mode. These
generic addressing modes are:
Immediate mode Register mode
Absolute mode Indirect mode
Index mode Base with index
Base with index and offset Relative mode
Auto-increment mode Auto-decrement
2 modeCompiled By: Mr. Abdisa L. AUWC dept of CS
Register Mode:
The operand is the contents of the processor register.
The name (address) of the register is given in the instruction.
Like AX, BX,CX and DX register
Registers are used to hold the data.
Memory is not accessed
Source and destination registers must match in size
E.g MOV AX, BX will move the contents of register BX into
register AX.
MOV BX,DX
MOV ES,AX
ADD AL, BH
MOV CL, AX (Error)
3 Compiled By: Mr. Abdisa L. AUWC dept of CS
Immediate Addressing Mode:
This addressing mode means the number that we are
loading is part of the instruction itself, and is not found in
the data memory.
The Source operand is constant.
Can be used to load information to any registers.
Operands come immediately after the opcode.
e.g. MOV AX, 334 - will load the AX register with the
number 344.
• MOV AX, 2550H
• MOV CX, 625
• MOV BL, 40H