8051 Instruction Set Manual

ORL

The ORL instruction performs a bitwise logical OR operation on the specified operands, the result of which is stored in the destination operand.

Note

When this instruction is used to modify an output port, the value used as the port data will be read from the output data latch, not the input pins of the port.

See Also: ANL, XRL

ORL A, #immediate
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
01000100immediate
Operation
ORL
A = A OR immediate
Example
ORL A, #01h
ORL A, @Ri
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
0100011i
Operation
ORL
A = A OR (Ri)
Example
ORL A, @R0
ORL A, direct
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
01000101direct
Operation
ORL
A = A OR (direct)
Example
ORL A, P0
ORL A, Rn
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
01001nnn
Operation
ORL
A = A OR Rn
Example
ORL A, R5
ORL C, /bit
CACF0RS1RS0OV P
Bytes2
Cycles2
Encoding
10100000bit
Operation
ORL
C = C OR NOT (bit)
Example
ORL C, /22h
ORL C, bit
CACF0RS1RS0OV P
Bytes2
Cycles2
Encoding
01110010bit
Operation
ORL
C = C OR (bit)
Example
ORL C, 22h
ORL direct, #immediate
CACF0RS1RS0OV P
Bytes3
Cycles2
Encoding
01000011directimmediate
Operation
ORL
(direct) = (direct) OR immediate
Example
ORL P0, #01h
ORL direct, A
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
01000010direct
Operation
ORL
(direct) = (direct) OR A
Example
ORL P0, A