ORA R:
- This instruction logically OR the contents of the specified register with the contents of the accumulator.
- Register R can be any 8-bit general purpose register like A, B, C, D, E, H and L.
- The result is stored in the accumulator.
- S (Sign flag), Z (Zero flag), P (Parity flag) are modified.
- CY (Carry flag) and AC (Auxiliary Carry flag) are reset.
- It is a one byte instruction.
- Register addressing mode is used.
Example:
If A = 1010 1011 = ABH and L = 1000 0111 =87H
ORA L ; This instruction will logically OR the contents of A (ABH) with the contents of L (87H) and the result (AFH) is stored in A.
ORA M:
- This instruction logically OR the contents of the memory location pointed by HL register pair with the contents of the accumulator.
- The result is stored in the accumulator.
- S (Sign flag), Z (Zero flag), P (Parity flag) are modified.
- CY (Carry flag) and AC (Auxiliary Carry flag) are reset.
- It is a one byte instruction.
- Register indirect addressing mode is used.
Example:
If HL = 3000H, (3000H) = 0110 0101 = 65H and A = 0111 1000 = 78H
If HL = 3000H, (3000H) = 0110 0101 = 65H and A = 0111 1000 = 78H
ORA M ; This instruction will logically OR the contents of A (78H) with the contents of location 3000H i.e. 65H and the result (7DH) is stored in A.
ORI 8-bit data:
- This instruction logically OR the 8-bit data given in the instruction itself with the contents of the accumulator.
- The result is stored in the accumulator.
- S (Sign flag), Z (Zero flag), P (Parity flag) are modified.
- CY (Carry flag) and AC (Auxiliary Carry flag) are reset.
- It is a two byte instruction.
- Immediate addressing mode is used.
Example:
If A = 1101 0100 = D4H
If A = 1101 0100 = D4H
Comments
Post a Comment