Logical instructions in 8085 microprocessor
Logical instructions are the instructions that perform basic logical operations such as AND, OR, etc. In the 8085 microprocessor, the destination operand is always the accumulator. Here logical operation works on a bitwise level.
Following is the table showing the list of logical instructions:
OPCODE | OPERAND | DESTINATION | EXAMPLE |
---|---|---|---|
ANA | R | A = A AND R | ANA B |
ANA | M | A = A AND Mc | ANA 2050 |
ANI | 8-bit data | A = A AND 8-bit data | ANI 50 |
ORA | R | A = A OR R | ORA B |
ORA | M | A = A OR Mc | ORA 2050 |
ORI | 8-bit data | A = A OR 8-bit data | ORI 50 |
XRA | R | A = A XOR R | XRA B |
XRA | M | A = A XOR Mc | XRA 2050 |
XRI | 8-bit data | A = A XOR 8-bit data | XRI 50 |
CMA | none | A = 1’s complement of A | CMA |
CMP | R | Compares R with A and triggers the flag register | CMP B |
CMP | M | Compares Mc with A and triggers the flag register | CMP 2050 |
CPI | 8-bit data | Compares 8-bit data with A and triggers the flag register | CPI 50 |
RRC | none | Rotate accumulator right without carry | RRC |
RLC | none | Rotate accumulator left without carry | RLC |
RAR | none | Rotate accumulator right with carry | RAR |
RAL | none | Rotate accumulator left with carry | RAR |
CMC | none | Compliments the carry flag | CMC |
STC | none | Sets the carry flag | STC |
In the table,
R stands for register
M stands for memory
Mc stands for memory contents
Read related post: Arithmetic instructions in 8085 microprocessor
Please Login to comment...