Exp 2 - MC
Exp 2 - MC
2
WRITE AND EXECUTE AN ASSEMBLY LANGUAGE PROGRAM TO
PERFORM LOGICAL OPERATIONS ON TWO 8 BIT NUMBERS
USING 8051
OBJECTIVE:
· Students will be able to write program for performing logical operations on
two 8 bit numbers using 8051 Microcontroller .
· Students will be able to verify the result of logical operations along with the
status of flag bits in the PSW register.
ALGORITHM:
1. Load the two 8-bit numbers in the memory/registers
2. Perform logical operations
3. Check the result
Theory :
1. The ANL instruction performs a bitwise logical AND operation
between the specified byte or bit operands and stores the result in the
destination operand.
2. The ORL instruction performs a bitwise logical OR operation on the
specified operands, the result of which is stored in the destination
operand.
PROGRAM :
1.For logical AND
`Address:OPCODE INSTRUCTIONS COMMENTS
2.For logical or
`Address:OPCODE INSTRUCTIONS COMMENTS
4. For complement
OUTPUT: