KS57C2308/P2308/C2316/P2316
SAM47 INSTRUCTION SET
5-29
BAND
— Bit Logical And
BAND
C,src.b
Operation:
Operand
Operation Summary
Bytes
Cycles
C,mema.b
Logical-AND carry flag with memory bit
2
2
C,memb.@L
2
2
C,@H+DA.b
2
2
Description:
The specified bit of the source is logically ANDed with the carry flag bit value. If the Boolean
value of the source bit is a logic zero, the carry flag is cleared to "0"; otherwise, the current carry
flag setting is left unaltered. The bit value of the source operand is not affected.
Operand
Binary Code
Operation Notation
C,mema.b
*
1
1
1
1
0
1
0
1
C
←
C AND mema.b
C,memb.@L
1
1
1
1
0
1
0
1
C
←
C AND [memb.7–2 + L.3–2].
[L.1–0]
0
1
0
0
a5
a4
a3
a2
C,@H+DA.b
1
1
1
1
0
1
0
1
C
←
C AND [H + DA.3–0].b
0
0
b1
b0
a3
a2
a1
a0
Second Byte
Bit Addresses
*
mema.b
1
0
b1
b0
a3
a2
a1
a0
FB0H–FBFH
1
1
b1
b0
a3
a2
a1
a0
FF0H–FFFH
Examples:
1. The following instructions set the carry flag if P1.0 (port 1.0) is equal to "1" (and assuming the
carry flag is already set to "1"):
SMB
15
; C
←
"1"
BAND C,P1.0
; If P1.0 = "1", C
←
"1"
; If P1.0 = "0", C
←
"0"
2. Assume the P1 address is FF1H and the value for register L is 9H (1001B). The address
(memb.7–2) is 111100B; (L.3–2) is 10B. The resulting address is 11110010B or FF2H,
specifying P2. The bit value for the BAND instruction, (L.1–0) is 01B which specifies bit 1.
Therefore, P1.@L = P2.1:
LD
L,#9H
BAND C,P1.@L
; P1.@L is specified as P2.1
; C AND P2.1
Summary of Contents for KS57C2308
Page 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Page 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Page 170: ......
Page 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Page 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Page 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Page 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Page 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Page 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Page 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Page 318: ......
Page 320: ......
Page 322: ......
Page 325: ......
Page 327: ......