Microprocessor - 8085 Logical Instructions



The following table shows the list of Logical instructions with their meanings.

Opcode Operand Meaning Explanation
CMP

R

M

Compare the register or memory with the accumulator The contents of the operand (register or memory) are M compared with the contents of the accumulator.
CPI 8-bit data Compare immediate with the accumulator The second byte data is compared with the contents of the accumulator.
ANA

R

M

Logical AND register or memory with the accumulator The contents of the accumulator are logically AND with M the contents of the register or memory, and the result is placed in the accumulator.
ANI 8-bit data Logical AND immediate with the accumulator The contents of the accumulator are logically AND with the 8-bit data and the result is placed in the accumulator.
XRA

R

M

Exclusive OR register or memory with the accumulator The contents of the accumulator are Exclusive OR with M the contents of the register or memory, and the result is placed in the accumulator.
XRI 8-bit data Exclusive OR immediate with the accumulator The contents of the accumulator are Exclusive OR with the 8-bit data and the result is placed in the accumulator.
ORA

R

M

Logical OR register or memory with the accumulator The contents of the accumulator are logically OR with M the contents of the register or memory, and result is placed in the accumulator.
ORI 8-bit data Logical OR immediate with the accumulator The contents of the accumulator are logically OR with the 8-bit data and the result is placed in the accumulator.
RLC None Rotate the accumulator left Each binary bit of the accumulator is rotated left by one position. Bit D7 is placed in the position of D0 as well as in the Carry flag. CY is modified according to bit D7.
RRC None Rotate the accumulator right Each binary bit of the accumulator is rotated right by one position. Bit D0 is placed in the position of D7 as well as in the Carry flag. CY is modified according to bit D0.
RAL None Rotate the accumulator left through carry Each binary bit of the accumulator is rotated left by one position through the Carry flag. Bit D7 is placed in the Carry flag, and the Carry flag is placed in the least significant position D0. CY is modified according to bit D7.
RAR None Rotate the accumulator right through carry Each binary bit of the accumulator is rotated right by one position through the Carry flag. Bit D0 is placed in the Carry flag, and the Carry flag is placed in the most significant position D7. CY is modified according to bit D0.
CMA None Complement accumulator The contents of the accumulator are complemented. No flags are affected.
CMC None Complement carry The Carry flag is complemented. No other flags are affected.
STC None Set Carry Set Carry
microprocessor_8085_instruction_sets.htm
Advertisements