Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
101
Добавлен:
01.03.2016
Размер:
921.07 Кб
Скачать

STM8 addressing modes

PM0044

 

 

6.8Indirect Indexed (Short Pointer Long, Long Pointer Long, Long Pointer Extended) addressing mode

Table 31.

Overview of Indirect indexed instructions

 

 

 

Addressing mode

Syntax

EA formula

Ptr Adr

Ptr Size

Dest adr

 

 

 

 

 

 

 

 

 

Short Pointer

 

Indirect

Indexed

([shortptr.w],ndx)

((shortptr.w) + ndx)

00..FF

Word

000000.01FFFE

Long

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Long Pointer

 

Indirect

Indexed

([longptr.w],ndx)

([longptr.w] +ndx)

00..FFFF

Word

000000.01FFFE

Long

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Long Pointer

 

Indirect

Indexed

([longptr.e],ndx)

([longptr.e] +ndx)

00..FFFF

Extword

000000.FFFFFE

Extended

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is a combination of indirect and indexed addressing mode. The data byte required for the operation is found by its memory address, which is defined by the unsigned addition of an index register value (X or Y) with a pointer value located in memory. The pointer address follows the op-code.

The indirect indexed addressing mode is made of four sub-modes:

Table 32.

Available Long Pointer Long and Short Pointer Long Indirect

 

Indexed instructions

 

 

 

 

 

Instructions

Functions

 

 

 

 

LD, LDW

Load

 

 

 

 

CP

Compare

 

 

 

 

AND, OR, XOR

Logical Operations

 

 

 

 

ADC, ADD, SUB, SBC

Arithmetic Addition/Subtraction operations

 

 

 

 

BCP

Bit Compare

 

 

 

 

CALL, JP

Call or Jump subroutine

 

 

 

Table 33.

Available Long Pointer Long Indirect Indexed instructions

 

Instructions

Functions

 

 

 

 

CLR

Clear

 

 

 

 

TNZ

Test Negative or Zero

 

 

 

 

CPL, NEG

1’s or 2’s Complement

 

 

SLA,SLL, SRL, SRA, RLC, RRC

Shift and Rotate Operations

 

 

 

 

SWAP

Swap Nibbles

 

 

 

 

INC, DEC

Increment/Decrement

 

 

 

Table 34.

Long Pointer Extended Indirect Indexed instructions instruction

 

 

 

 

Instructions

Functions

 

 

 

 

LDF

Far load

 

 

 

48/162

Doc ID 13590 Rev 3

Соседние файлы в папке Минимум документации STM8