Direct Addressing; Immediate Addressing; Indirect Addressing - Intel 8XC196NT User Manual

Table of Contents

Advertisement

Temporary Register
AX
BX
CX
DX
EX
3.2.1

Direct Addressing

Direct addressing directly accesses a location in the 256-byte lower register file, without involv-
ing the memory controller. Windowing allows you to remap other sections of memory into the
lower register file for direct access (see Chapter 4, "Memory Partitions," for details). You specify
the registers as operands within the instruction. The register addresses must conform to the align-
ment rules for the operand type. Depending on the instruction, up to three registers can take part
in a calculation. The following instructions use direct addressing:
ADD
AX,BX,CX
ADDB AL,BL,CL
MUL
AX,BX
INCB CL
3.2.2

Immediate Addressing

Immediate addressing mode accepts one immediate value as an operand in the instruction. You
specify an immediate value by preceding it with a number symbol (#). An instruction can contain
only one immediate value; the remaining operands must be direct references. The following in-
structions use immediate addressing:
ADD
AX,#340
PUSH #1234H
DIVB AX,#10
3.2.3

Indirect Addressing

The indirect addressing mode accesses an operand by obtaining its address from a WORD regis-
ter in the lower register file. You specify the register containing the indirect address by enclosing
it in square brackets ([ ]). The indirect address can refer to any location within the address space,
including the register file. The register that contains the indirect address must be word-aligned,
and the indirect address must conform to the rules for the operand type. An instruction can contain
only one indirect reference; any remaining operands must be direct references. The following in-
structions use indirect addressing:
Table 3-3. Definition of Temporary Registers
word-aligned 16-bit register; AH is the high byte of AX and AL is the low byte
word-aligned 16-bit register; BH is the high byte of BX and BL is the low byte
word-aligned 16-bit register; CH is the high byte of CX and CL is the low byte
word-aligned 16-bit register; DH is the high byte of DX and DL is the low byte
double-word-aligned 24-bit register
; AX ← BX + CX
; AL ← BL + CL
; AX ← AX × BX
; CL ← CL + 1
; AX ← AX + 340
; SP ← SP - 2
; MEM_WORD(SP) ← 1234H
; AL ← AX/10
; AH ← AX MOD 10
PROGRAMMING CONSIDERATIONS
Description
3-7

Advertisement

Table of Contents
loading

Table of Contents