Download USER`S MANUAL

Transcript
S3C72K8/P72K8
SAM48 INSTRUCTION SET
BOR — Bit Logical OR
BOR
C,src.b
Operation:
Operand
Bytes
Cycles
2
2
C,memb.@L
2
2
C,@H+DA.b
2
2
C,mema.b
Description:
Operation Summary
Logical-OR carry with specified memory bit
The specified bit of the source is logically ORed with the carry flag bit value. The value of the source
is unaffected.
Operand
Binary Code
Operation Notation
*
1
1
1
1
0
1
1
0
C ← C OR mema.b
C,memb.@L
1
1
1
1
0
1
1
0
C ← C OR [memb.7-2 + L.3-2].
[L.1-0]
0
1
0
0
a5
a4
a3
a2
1
1
1
1
0
1
1
0
0
0
b1
b0
a3
a2
a1
a0
C,mema.b
C,@H+DA.b
Second Byte
* mema.b
Examples:
1.
Bit Addresses
1
0
b1
b0
a3
a2
a1
a0
FB0H-FBFH
1
1
b1
b0
a3
a2
a1
a0
FF0H-FFFH
The carry flag is logically ORed with the P1.0 value:
RCF
BOR
2.
C ← C OR [H + DA.3-0].b
C,P1.0
; C ← "0"
; If P1.0 = "1", then C ← "1"; if P1.0 = "0", then C ← "0"
The P1 address is FF1H and register L contains the value 1H (0001B). The address (memb.7-2)
is 111100B and (L.3-2) = 00B. The resulting address is 11110000B or FF0H, specifying P0. The
bit value for the BOR instruction, (L.1-0) is 01B which specifies bit 1. Therefore, P1.@L = P0.1:
LD
BOR
L,#1H
C,P1.@L
; P1.@L is specified as P0.1; C OR P0.1
5-35