2. INTRODUCTION
It is a binary pattern designed inside a
microprocessor to perform a specific
function.
The entire group of instruction
microprocessor supports is called
instruction set.
8085 has 246 instructions.
3. Logical instructions…
Logical operations are performed on
data stored registers , memory and
status flags.
The operations are:
•AND
•OR
•COMPARE
•XOR
•COMPLEMENT
•ROTATE
4. Any 8-bit data, or contents of registers or
contents of memory location can logically
have
AND
example : ANA B (B is register)
ANA M (M is memory location
pointed by HL pair)
ANI 8 bit data
OR
example :ORA B
ORA M
ORA 8 bit data
5. XOR
example :XRA B
XRA M
XRI 8-bit data
With the contents of accumulator
• The results are stored in accumulator.
6. • ROTATE
Each bit in the accumulator can be
shifted left or right to next position.
Example: RLC
• COMPLEMENT
The contents of accumulator can be
complemented .Each 0 is replaced by 1
and each 1 by 0.
Example : CMA
7. COMPARE
Any 8-bit data or the contents of register
or contents of memory location can be
compared for
Equality
Greater than
less than
With the contents of accumulator . The
results are reflected in status flags.
Example: CMP B
CMP M
CPI 8-bit data
8.
9. EXAMPLE:
A MEMORY LOCATION 2202H CONTAINS
80H DATA .WRITE AN ALP TO CONVERT
THIS DATA TO 08H .STORE MODIFIED
RESULT INTO MEMORY LOCATION 2203H
12. These operations are used to control the
flow of program execution.
o CALL AND RETURN
Conditional call and conditional return
Unconditional call and unconditional
return
These instructions change the sequence
of the program either by calling a
subroutine or returning from a
subroutine.
Example: 1)unconditional call and return
CALL 2000H // call a subroutine
13. 2)Conditional call and conditional return
CNC 2050H // call a
subroutine with its 16 bit address if
carry flag is set.
RZ // return if zero flag is
set.
14. o JUMPS
Conditional jumps
Unconditional jumps
These test for certain conditions(zeros
or carry flag ) and alter the program
sequence when condition is met.
Example :JC 2080H // jump to 16 bit
address when carry flag is set
JMP 2050H // unconditional jump