Dec — Decrement - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
6.3.22 DEC — DECREMENT
dst
DEC
dst  dst – 1
Operation:
The contents of the destination operand are decremented by one.
C: Unaffected.
Flags:
Z: Set if the result is "0"; cleared otherwise.
S: Set if the result is negative; cleared otherwise.
V: Set if arithmetic overflow occurred; cleared otherwise.
D: Unaffected.
H: Unaffected.
Format:
Opc
Given R1 = 03H and register 03H = 10H:
Examples:
DEC
DEC
In the first example, if working register R1 contains the value 03H, the statement "DEC R1"
decrements the hexadecimal value by one, leaving the value 02H. In the second example, the
statement "DEC @R1" decrements the value 10H contained in the destination register 03H by
one, leaving the value 0FH.
dst
R1
R1 = 02H
@R1
Register 03H = 0FH
Bytes
Cycles
2
6-34
6 INSTRUCTION SET
Opcode
Addr Mode
(Hex)
4
00
4
01
dst
R
IR

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents