Samsung KS57C2308 Manual page 117

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
BXOR
— Bit Exclusive OR
BXOR
C,src.b
Operation:
Operand
C,mema.b
C,memb.@L
C,@H+DA.b
Description:
The specified bit of the source is logically XORed with the carry bit value. The resultant bit is
written to the carry flag. The source value is unaffected.
Operand
C,mema.b
C,memb.@L
C,@H+DA.b
*
mema.b
Examples:
1. The carry flag is logically XORed with the P1.0 value:
RCF
BXOR C,P1.0
2. The P1 address is FF1H and register L contains the value 9H (1001B). The address (memb.7–
2) is 111100B and (L.3–2) = 10B. The resulting address is 11110010B or FF2H, specifying P2.
The bit value for the BXOR instruction, (L.1–0) is 01B which specifies bit 1. Therefore, P1.@L
= P2.1:
LD
BXOR C,P1.@L
Operation Summary
Exclusive-OR carry with memory bit
Binary Code
*
1
1
1
1
1
1
0
1
0
1
1
1
0
0
b1
b0
Second Byte
1
0
b1
b0
1
1
b1
b0
L,#9H
1
0
1
1
1
1
0
1
1
1
0
a5
a4
a3
a2
1
0
1
1
1
a3
a2
a1
a0
a3
a2
a1
a0 FB0H–FBFH
a3
a2
a1
a0 FF0H–FFFH
; C
"0"
; If P1.0 = "1", then C
; P1.@L is specified as P2.1; C XOR P2.1
SAM47 INSTRUCTION SET
Bytes
2
2
2
Operation Notation
C
C XOR mema.b
C
C XOR [memb.7–2 + L.3-2].
[L.1–0]
C
C XOR [H + DA.3–0].b
Bit Addresses
"1"; if P1.0 = "0", then C
Cycles
2
2
2
"0"
5-43

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents