# OR Instruction

The instruction OR performs the logical operation "OR", bit for bit. There are two ways to do this:
1. The source is an effective address, the destination is a data register.
2. The source is the data register and the destination is the effective address

ADDRESS METHODS: | 1) Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s), #x
2) (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l

DATA LENGTH: Byte, word, longword

FLAGS: | X - U
N - S
Z - S
C - 0
V - 0

SYNTAX: | OR <ea>,Dn
OR Dn,<ea>

EXAMPLE CODE:

OR #%00001111,D0 If D0 contained 11001100,after the or it would contain 11001111

Use OR to selectively set bits in the destination. Each bit in the source operand that is 1 will cause the corresponding bit in the destination to be set to 1. Each bit in the source that is 0 will leave the corresponding bit in the destination unchanged. For example:

SOURCE 1111 0101
DESTINATION 0011 0011
----------- ---- ----
RESULT 1111 0111