Chapter 3-1
Chapter 3-1
Chapter 3-1
EA 0200H + BX
1000H + SI
08H displacement
---------------
1208H
Now, DS + EA 30000H +
1208H
---------------
31208H
Relative Based Indexed Addressing
In this mode, the address of the operand is calculated as the sum
of base register, index register and 8 bit or 16 bit displacement.
The effective address is formed by adding an 8 or 16-bit
displacement with the sum of contents of any one of the base
registers (BX or BP) and any one of the index registers (SI or
DI).
e.g. 1. MOV AX, 50H[BX ][SI] (AX←[DS:BX+SI+50])
e.g2. MOV CL, [BX + DI + 20] (CL ← DS: [BX + DI + 20H])
This instruction moves a byte from the address pointed by BX +
DI + 20H in data segment to CL.
Physical address can be calculated as DS * 10H +BX + DI +
20H
Program-Memory Addressing Modes
This mode involves program memory addresses during various
operations.
Program memory-addressing modes, used with the JMP
instructions
Example: JMP AX,
In this instruction, the code execution control jumps to the
current code segment location addressed by the contents of AX
register.
Stack Addressing Modes
This mode involves stack registry operations.
It holds data temporarily and stores return addresses
for procedures.
The stack memory is a LIFO (last-in, first-out) memory,
which describes the way that data are stored and
removed from the stack.
Data are placed onto the stack with a PUSH instruction
and removed with a POP instruction.
Example: PUSH AX, this instruction copies the contents of AX
register to the stack.
CHAPTER THREE (Lecture Two)
11101001000000000101000