Inc Increment - Samsung S3C84I8 User Manual

Table of Contents

Advertisement

INSTRUCTION SET
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 R0
INC 00H
INC @R0
In the first example, if the destination working register R0 contains the value 1BH, the statement
"INC R0" leaves the value 1CH in that same register.
The second example shows the effect an INC instruction has on the register at the location 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 the register 1BH from 0FH to 10H.
6-44
opc
dst
→ R0 = 1CH
→ Register 00H = 0DH
→ R0 = 1BH, register 01H = 10H
Bytes
Cycles
1
4
r = 0 to F
2
4
4
S3C84I8/F84I8/C84I9/F84I9
Opcode
Addr Mode
(Hex)
dst
rE
r
20
R
21
IR

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3c84i9S3f84i8S3f84i9

Table of Contents