Inc Increment - Samsung S3C8275X User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

INSTRUCTION SET
INC
— Increment
INC
dst
dst ← dst + 1
Operation:
The contents of the destination operand are incremented by one.
Flags:
C: Unaffected.
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
Examples:
Given: R0 = 1BH, register 00H = 0CH, and register 1BH = 0FH:
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 that 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.
6-44
opc
dst
R0
R0 = 1CH
00H
Register 00H = 0DH
@R0
R0 = 1BH, register 01H = 10H
S3C8275X/F8275X/C8278X/F8278X/C8274X/F8274X
Bytes
Cycles
Opcode
1
4
r = 0 to F
2
4
4
Addr Mode
(Hex)
dst
rE
r
20
R
21
IR

Advertisement

Table of Contents
loading

This manual is also suitable for:

F8275xF8274xC8278xC8274xF8278x

Table of Contents