Professional Documents
Culture Documents
page 1
Upon execution:
page 2
Upon execution:
Upon execution:
page 3
MOV [DI], BX {moves the 16-bit contents of register BX to two
memory locations in the data segment memory location indexed by
DI.}
Given:
Upon execution:
page 4
Upon execution:
Upon execution:
page 5
Given:
Upon execution:
page 6
Upon execution:
page 7
Upon execution:
Upon execution:
page 8
1.10 Port addressing
- For reading and writing data to/from the I/O devices, this addressing
mode is used. Under this addressing mode, the I/O port address of an
I/O device is part of the instruction.
e.g.
IN AL, 3FH {the input device having port address of 3FH will move
data to register AL}
page 9
Example:
Identify the addressing modes used by the following instructions:
INSTRUCTION ADDRESSING MODE
DESTINATION SOURCE
MOV WORDPTR [DI], 1234H Register Indirect Immediate
addressing addressing
XOR BX, AX Register addressing Register addressing
ADD [SI + 02H], DX Register Relative Register addressing
addressing
XCHG [BX+DI], CX Base + Index Register addressing
addressing
CALL NEAR[SI] Intrasegment Indirect addressing
JGE F3H Intrasegment Direct addressing
IN AL, 40H Register addressing Port addressing
STD Implied addressing
LODSW String addressing
SUB AX, [BX+DI+02H] Register addressing Base-Relative plus
Index addressing
POP DX Register addressing Stack Memory
addressing
OUT 40H, AL Port addressing Register addressing
JMP 5000:1234 Intersegment Direct addressing
SHL AX, CL Register addressing Register addressing
CMC Implied addressing
LEA CX, [1002H] Register addressing Direct addressing
PUSH WORD PTR[BX+1111H] Stack Memory Register Relative
addressing addressing
page 10
page 11