0% found this document useful (0 votes)
10 views2 pages

8085 Microprocessor Logical Instructions Guide

Logical operation in 8085 microprocessor

Uploaded by

vaidikakhre
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

8085 Microprocessor Logical Instructions Guide

Logical operation in 8085 microprocessor

Uploaded by

vaidikakhre
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Shri G. S.

Institute of Technology and Science, Indore (MP)


(Government Aided Autonomous Institute Established 1952)
Affiliated to Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal

Department of Electronics and Instrumentation Engineering

EI 37006- MICROPROCESSOR SYSTEMS

EXPERIMENT 4

OBJECTIVE: To learn the Logical instructions used in 8085 Microprocessor using simulator
GNUSim 8085.

INTRODUCTION: Instruction sets are the instruction codes to perform some task. The
instruction set of 8085 is classified into five categories.

1. Data Transfer Instructions


2. Arithmetic Instructions
3. Logical Instructions
4. Branching Instructions
5. Control Instructions
Microprocessor is programmable logic chip. It can perform all the logical functions through its
instruction set. The 8085 instruction set includes logical functions that are listed in below table. All
logical operations are performed in relation to the content of the accumulator.
The list of some Logical instructions used in 8085 are listed below.
Opcode Operand Meaning Explanation

Compare the register The contents of the operand (register or


R
CMP or memory with the memory) are M compared with the contents of
M
accumulator the accumulator.

Compare immediate The second byte data is compared with the


CPI 8-bit data
with the accumulator contents of the accumulator.

The contents of the accumulator are logically


Logical AND
R AND with M the contents of the register or
ANA register or memory
M memory, and the result is placed in the
with the accumulator
accumulator.

Logical AND The contents of the accumulator are logically


ANI 8-bit data immediate with the AND with the 8-bit data and the result is placed
accumulator in the accumulator.

The contents of the accumulator are Exclusive


Exclusive OR
R OR with M the contents of the register or
XRA register or memory
M memory, and the result is placed in the
with the accumulator
accumulator.

Exclusive OR The contents of the accumulator are Exclusive


XRI 8-bit data immediate with the OR with the 8-bit data and the result is placed
accumulator in the accumulator.

Logical OR register
R The contents of the accumulator are logically
ORA or memory with the
M OR with M the contents of the register or
accumulator
memory, and result is placed in the
accumulator.

Logical OR The contents of the accumulator are logically


ORI 8-bit data immediate with the OR with the 8-bit data and the result is placed
accumulator in the accumulator.

Each binary bit of the accumulator is rotated


Rotate the left by one position. Bit D7 is placed in the
RLC None
accumulator left position of D0 as well as in the Carry flag. CY
is modified according to bit D7.

Each binary bit of the accumulator is rotated


Rotate the right by one position. Bit D0 is placed in the
RRC None
accumulator right position of D7 as well as in the Carry flag. CY
is modified according to bit D0.

Each binary bit of the accumulator is rotated


Rotate the left by one position through the Carry flag. Bit
RAL None accumulator left D7 is placed in the Carry flag, and the Carry
through carry flag is placed in the least significant position
D0. CY is modified according to bit D7.

Each binary bit of the accumulator is rotated


Rotate the right by one position through the Carry flag. Bit
RAR None accumulator right D0 is placed in the Carry flag, and the Carry
through carry flag is placed in the most significant position
D7. CY is modified according to bit D0.

Complement The contents of the accumulator are


CMA None
accumulator complemented. No flags are affected.

The Carry flag is complemented. No other flags


CMC None Complement carry
are affected.

Flag register are modified after execution of logical operation. Flags reflects the status of register.

PROGRAM: Write assembly language program for the given problem statement: Assume
register B holds 15h. Illustrate the results of the instructions ORA B, XRA B and CMA.

You might also like