Com Complement - Samsung S3C8275X User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

S3C8275X/F8275X/C8278X/F8278X/C8274X/F8274X
COM
— Complement
COM
dst
dst ← NOT dst
Operation:
The contents of the destination location are complemented (one's complement); all "1s" are
changed to "0s", and vice-versa.
Flags:
C: Unaffected.
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
Examples:
Given: R1 = 07H and register 07H = 0F1H:
COM
COM
In the first example, 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 vice-versa, leaving the value 0F8H (11111000B).
In the second example, Indirect Register (IR) addressing mode is used to complement the value
of destination register 07H (11110001B), leaving the new value 0EH (00001110B).
dst
R1
R1 = 0F8H
@R1
R1 = 07H, register 07H = 0EH
Bytes
Cycles
Opcode
2
4
4
INSTRUCTION SET
Addr Mode
(Hex)
dst
60
R
61
IR
6-29

Advertisement

Table of Contents
loading

This manual is also suitable for:

F8275xF8274xC8278xC8274xF8278x

Table of Contents