Logical Group:

These instructions perform various logical operations with the contents of the accumulator.

AND, OR Exclusive-OR

Any 8-bit number, or the contents of a register, or of a memory location can be logically ANDed, Ored, or Exclusive-ORed with the contents of the accumulator. The results are stored in the accumulator.

This group performs logical (Boolean) operations on data in registers and memory and on condition flags.

The logical AND, OR, and Exclusive OR instructions enable you to set specific bits in the accumulator ON or OFF.


ANA           Logical AND with Accumulator

ANI           Logical AND with Accumulator Using Immediate Data

ORA           Logical OR with Accumulator

OR            Logical OR with Accumulator Using Immediate Data

XRA           Exclusive Logical OR with Accumulator

XRI           Exclusive OR Using Immediate Data

Rotate

Each bit in the accumulator can be shifted either left or right to the next position.

The rotate instructions shift the contents of the accumulator one bit position to the left or right:

RLC           Rotate Accumulator Left

RRC           Rotate Accumulator Right

RAL           Rotate Left Through Carry

RAR           Rotate Right Through Carry

Compare

Any 8-bit number, or the contents of a register, or a memory location can be compared for equality, greater than, or less than, with the contents of the accumulator.

The Compare instructions compare the content of an 8-bit value with the contents of the accumulator;


CMP           Compare

CPI           Compare Using Immediate Data

Complement

The contents of the accumulator can be complemented. All 0s are replaced by 1s and all 1s are replaced by 0s.

Complement and carry flag instructions:

CMA           Complement Accumulator

CMC           Complement Carry Flag

STC           Set Carry Flag


User Comments

No Posts found !

Login to Post a Comment.