Inc — Increment - Samsung S3F84B8 User Manual

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

Advertisement

S3F84B8_UM_REV 1.00
6.3.30 INC — INCREMENT
dst
INC
dst  dst + 1
Operation:
The contents of the destination operand are incremented 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:
dst | opc
Given R0 = 1BH, register 00H = 0CH, and register 1BH = 0FH:
Examples:
INC
INC
INC
In the first example, if destination working register R0 contains the value 1BH, the statement "INC
R0" leaves the value 1CH in the same register.
The next example shows the effect an INC instruction has on register 00H, assuming that it
contains the value 0CH.
In the third example, INC is used in Indirect Register (IR) addressing mode to increment the value
of register 1BH from 0FH to 10H.
opc
dst
R0
R0 = 1CH
00H
Register 00H = 0DH
@R0
R0 = 1BH, register 01H = 10H
Bytes
Cycles
1
2
6-43
6 INSTRUCTION SET
Opcode
(Hex)
4
rE
r = 0 to F
4
20
4
21
Addr Mode
dst
r
R
IR

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents