Samsung SAM88RCRI S3C9442 Manual page 101

Table of Contents

Advertisement

SAM88RCRI INSTRUCTION SET
XOR
— Logical Exclusive OR
XOR
dst,src
dst ← dst XOR src
Operation:
The source operand is logically exclusive-ORed with the destination operand and the result is
stored in the destination. The exclusive-OR operation results in a "1" bit being stored whenever
the corresponding bits in the operands are different; otherwise, a "0" bit is stored.
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".
Format:
opc
opc
opc
Examples:
Given: R0 = 0C7H, R1 = 02H, R2 = 18H, register 00H = 2BH, register 01H = 02H, and
register 02H = 23H:
XOR
XOR
XOR
XOR
XOR
In the first example, if working register R0 contains the value 0C7H and if register R1 contains the
value 02H, the statement "XOR R0,R1" logically exclusive-ORs the R1 value with the R0 value
and stores the result (0C5H) in the destination register R0.
6-50
dst | src
src
dst
dst
src
R0,R1
R0 = 0C5H, R1 = 02H
R0,@R1
R0 = 0E4H, R1 = 02H, register 02H = 23H
00H,01H
Register 00H = 29H, register 01H = 02H
00H,@01H →
Register 00H = 08H, register 01H = 02H, register 02H = 23H
00H,#54H
Register 00H = 7FH
S3C9442/C9444/F9444/C9452/C9454/F9454
Bytes
Cycles
Opcode
2
4
6
3
6
6
3
6
Addr Mode
(Hex)
dst
src
B2
r
r
B3
r
lr
B4
R
R
B5
R
IR
B6
R
IM

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sam88rcri s3c9444Sam88rcri s3c9452Sam88rcri s3c9454

Table of Contents