English
Language : 

SAB80515 Datasheet, PDF (155/270 Pages) Siemens Semiconductor Group – 8-Bit Single-Chip Microcontroller Family
Instruction Set
DEC
byte
Function:
Decrement
Description:
The variable indicated is decremented by 1. An original value of 00H will underflow
to 0FFH. No flags are affected. Four operand addressing modes are allowed:
accumulator, register, direct, or register-indirect.
Example:
Note:
When this instruction is used to modify an output port, the value used as the original
port data will be read from the output data latch, not the input pins.
Register 0 contains 7FH (01111111B). Internal RAM locations 7EH and 7FH
contain 00H and 40H, respectively. The instruction sequence
DEC @R0
DEC R0
DEC @R0
will leave register 0 set to 7EH and internal RAM locations 7EH and 7FH set to
0FFH and 3FH.
DEC
A
Operation:
DEC
(A) ← (A) – 1
Encoding:
Bytes:
Cycles:
0001 0100
1
1
DEC
Rn
Operation:
DEC
(Rn) ← (Rn) – 1
Encoding:
Bytes:
Cycles:
0001 1rrr
1
1
Semiconductor Group
155