Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
8XC196Kx,8XC196Jx,87C196CA microcontroller family user's manual.1995.pdf
Скачиваний:
68
Добавлен:
23.08.2013
Размер:
3.97 Mб
Скачать

PROGRAMMING CONSIDERATIONS

3.2ADDRESSING MODES

The instruction set uses four basic addressing modes:

direct

immediate

indirect (with or without autoincrement)

indexed (short-, long-, or zero-indexed)

The stack pointer can be used with indirect addressing to access the top of the stack, and it can also be used with short-indexed addressing to access data within the stack. The zero register can be used with long-indexed addressing to access any memory location.

An instruction can contain only one immediate, indirect, or indexed reference; any remaining operands must be direct references.

This section describes the addressing modes as they are handled by the hardware. An understanding of these details will help programmers to take full advantage of the architecture. The assembly language hides some of the details of how these addressing modes work. “Assembly Language Addressing Mode Selections” on page 3-9 describes how the assembly language handles direct and indexed addressing modes.

The examples in this section assume that temporary registers are defined as shown in this segment of assembly code and described in Table 3-3.

 

Oseg

at 1ch

AX

DSW

1

BX

DSW

1

CX

DSW

1

DX

DSW

1

3-5

Соседние файлы в предмете Электротехника