English
Language : 

L9805E Datasheet, PDF (112/127 Pages) STMicroelectronics – Super smart power motor driver with 8-Bit MCU, RAM, EEPROM, ADC, WDG, Timers, PWM and H-bridge driver
Instruction Set
The relative addressing mode consists of two sub-modes:
Relative (direct):
The offset is following the opcode.
Relative (indirect):
The offset is defined in memory, which address follows the opcode.
L9805E
6.2
Instruction groups
The ST7 family devices use an Instruction Set consisting of 63 instructions. The instructions
may be subdivided into 13 main groups as illustrated in the following table:
Load and Transfer
LD
CLR
Stack operation
PUSH POP RSP
Increment/Decrement
INC DEC
Compare and Tests
CP TNZ BCP
Logical operations
AND OR XOR CPL NEG
Bit Operation
BSET BRES
Conditional Bit Test and Branch BTJT BTJF
Arithmetic operations
ADC ADD SUB SBC MUL
Shift and Rotates
SLL SRL SRA RLC RRC SWAP SLA
Unconditional Jump or Call
JRA JRT JRF JP CALL CALLR NOP RET
Conditional Branch
JRxx
Interruption management
TRAP WFI HALT IRET
Code Condition Flag modification SIM RIM SCF RCF
Using a pre-byte
The instructions are described with one to four opcodes.
In order to extend the number of available opcodes for an 8-bit CPU (256 opcodes), three
different probate pockets are defined. These prebytes modify the meaning of the instruction
they precede.
The whole instruction becomes:
PC-2 End of previous instruction
PC-1 Prebyte
PC opcode
PC+1 Additional word (0 to 2) according to the number of bytes required to compute the
effective address
These prebytes enable instruction in Y as well as indirect addressing modes to be
implemented. They precede the opcode of the instruction in X or the instruction using direct
addressing mode. The prebytes are:
112/127