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

STM8 addressing modes

PM0044

 

 

6.1Inherent addressing mode

All related instructions are 1 or 2 byte. The op-code fully specifies all required information for the CPU to process the operation.

Table 18.

Inherent addressing instructions

 

Instructions

Functions

 

 

 

 

 

 

 

NOP

 

No operation

 

 

 

 

 

 

 

TRAP

 

S/W Interrupt

 

 

 

 

 

 

WFI, WFE

Wait For Interrupt / Event (Low Power Mode)

 

 

 

 

 

 

 

HALT

 

Halt Oscillator (Lowest Power Mode)

 

 

 

 

 

 

 

RET

 

Sub-routine Return

 

 

 

 

 

 

 

RETF

 

Far Sub-routine Return

 

 

 

 

 

 

 

IRET

 

Interrupt Sub-routine Return

 

 

 

 

 

 

 

SIM

 

Set Interrupt Mask

 

 

 

 

 

 

 

RIM

 

Reset Interrupt Mask

 

 

 

 

 

 

 

SCF

 

Set Carry Flag

 

 

 

 

 

 

 

RCF

 

Reset Carry Flag

 

 

 

 

 

 

 

RVF

 

Reset Overflow Flag

 

 

 

 

 

 

 

CCF

 

Complement Carry Flag

 

 

 

 

 

 

 

LD, LDW

 

Load

 

 

 

 

CLR, CLRW

Clear

 

 

PUSH, POP, PUSHW, POPW

Push/Pop to/from the stack

 

 

INC, DEC, INCW, DECW

Increment/Decrement

 

 

 

 

TNZ, TNZW

Test Negative or Zero

 

 

CPL, NEG, CPLW, NEGW

1’s or 2’s Complement

 

 

 

 

 

 

 

MUL

 

Byte Multiplication

 

 

 

 

DIV, DIVW

Division

 

 

 

 

EXG, EXGW

Exchange

 

 

SLA, SLL, SRL, SRA, RLC,

 

RRC, SLAW, SLLW, SRLW,

Shift and Rotate Operations

SRAW, RLCW, RRCW

 

 

 

 

 

SWAP, SWAPW

Swap Nibbles/Bytes

 

 

 

 

Example:

 

 

 

1000

98

RCF

; Reset carry flag

1001

9D

NOP

; No operation

1002

9F

LD A,X; Transfer X register content into accumulator

1004

88

PUSH A; Push accumulator content onto the stack

32/162

Doc ID 13590 Rev 3

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