
<
2
.75
7UGT U/CPWCN
=L/2*
#FFTGUU5RCEG
7/<:
OR
Logical OR
Example: Working register
R1
contains
34H
(
00111000B
). Working register
R14
contains
4DH
(
10001101
). The following statement leaves the value
BDH
(
10111101B
) in working register
R1
. The
S
flag is set to 1, and the
Z
and
V
flags are set to 0.
OR R1, R14
Op Code: 42 1E
Example: Working register
R4
contains
F9H
(
11111001B
). Working register
R13
contains
7BH
. Register
7B
contains
6AH
(
01101010B
). The following statement leaves the value
FBH
(
11111011B
) in working
register
R4
. The
S
flag is set to 1, and the
Z
and
V
flags are set to 0.
OR R4, @R13
Op Code: 43 4D
Example: Register
3AH
contains the value
F5H
(
11110101B
. Register
42H
contains the value
0AH
(
00001010B
). The following statement leaves the value
FFH
(
11111111B
) in register
3AH
. The
S
flag is
setto 1, and the
Z
and
V
flags are set to 0.
OR 3AH, 42H
Op Code: 44 42 3A
Example: Working register
R5
contains
70H
(
01110000B
). Register
45H
contains
3AH
. Register
3AH
contains
7FH
(
01111111B
). The following statement leaves the value
7FH
(
01111111B
) in working
register
R5
. The
Z
,
V
, and
S
flags are set to 0.
OR R5, @45H
Op Code: 45 45 E5
Example: Register
7AH
contains the value
F3H
(
11110111B
). The following statement leaves the value
F3H
(
11110111B
) in register
7AH
. The
S
flag is set to 1, and the
Z
and
V
flags are set to 0.
OR 7AH, #F0H
Op Code: 46 7A F0
Example: Working register
R3
contains the value
3EH
. Register
3EH
contains the value
0CH
(
00001100B
). The following statement leaves the value
0DH
(
00001101B
) in register
3EH
. The
Z
,
V
, and
S
flags are set to 0.
OR @R3, #05H
Op Code: 57 E3 05