in~.
MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTION SET
ORL <dest-btie> <src-byte>
Funotion:
Example:
ORL &Rn
Bytes:
Cycles:
Encoding:
Operstion:
Logicsl-ORfor byte variables
ORL performsthe bitwiselogical-ORoperationbetweenthe indicatedvariables,storing the
results in the destinationbyte.No flagsare affected.
The twooperandsallowsixaddressingmodecombinations.Whenthe destinationis the Accu-
mulator, the sourcecan useregister, direct, register-indirect,or immediateaddressing;when
the destinationis a directaddreas,the sourcecan be the Accumulatoror immediatedata.
Note.-When this instructionis used to modifyan output port, the valueusedas the original
port dats will be resd fromthe output data latch, not the input pins.
If the AccumulatorholdsOC3H(I1OOOO1IB)and ROholds 55H (O1O1O1O1B)then the in-
struction,
ORL A,RO
will leavethe Accumulatorholdingthe valueOD7H(110101llB).
When the destinationis a directlyaddreasedbyte,the instructioncan set combinationsofbits
in any RAM location or hardware register.The pattern of bits to be set is determinedby a
maskbyte,whichmaybeeithera constantdata valuein the instructionor a variablecomputed
in the Aecunndatorat rim-time.The instruction,
ORL P1,#OOllOOIOB
willset bits 5,4, and 1ofoutput Port 1.
1
1
0100
lrrr
ORL
(A) +- (A) V K)
2-61