Com Complement - Samsung S3C84I8 User Manual

Table of Contents

Advertisement

S3C84I8/F84I8/C84I9/F84I9
COM
— Complement
dst
COM
dst ← NOT dst
Operation:
The contents of the destination location are complemented (one's complement). All "1s" are
changed to "0s", and vice-versa.
C: Unaffected.
Flags:
Z: Set if the result is "0"; cleared otherwise.
S: Set if the result bit 7 is set; cleared otherwise.
V: Always reset to "0".
D: Unaffected.
H: Unaffected.
Format:
opc
Given: R1 = 07H and register 07H = 0F1H:
Examples:
COM
COM
In the first example, the destination working register R1 contains the value 07H (00000111B). The
statement "COM R1" complements all the bits in R1: all logic ones are changed to logic zeros,
and logic zeros to logic ones, leaving the value 0F8H (11111000B).
In the second example, Indirect Register (IR) addressing mode is used to complement the value
of the destination register 07H (11110001B), leaving the new value 0EH (00001110B).
dst
R1
@R1
Bytes
Cycles
2
R1 = 0F8H
R1 = 07H, register 07H = 0EH
INSTRUCTION SET
Opcode
Addr Mode
(Hex)
4
60
4
61
dst
R
IR
6-29

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3c84i9S3f84i8S3f84i9

Table of Contents