0% found this document useful (0 votes)
16 views134 pages

Instruction

Microprocessor instructions explanation in simple way with simple example that helps you in understanding concept

Uploaded by

tejasshakya568
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)
16 views134 pages

Instruction

Microprocessor instructions explanation in simple way with simple example that helps you in understanding concept

Uploaded by

tejasshakya568
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
You are on page 1/ 134

Microprocessors & Microcontrollers

8085: Instructions

Department of Electronics and Communication Engineering


INSTRUCTION SET OF 8085 MICROPROCESSOR
balti(m)d
INSTRUCTION SET OF 8085 MICROPROCESSOR
INSTRUCTION SET OF 8085 MICROPROCESSOR

INSTRUCTION SET OF 8085


MICROPROCESSOR
8085 Instruction Set 46
8085 Instruction Set 47
Data Transfer Instructions

8085 Instruction Set 48


8085 Instruction Set 49
50
8085 Instruction Set
8085 Instruction Set 51
8085 Instruction Set 52
8085 Instruction Set 53
8085 Instruction Set 54
8085 Instruction Set 55
8085 Instruction Set 56
8085 Instruction Set 57
8085 Instruction Set 58
8085 Instruction Set 59
8085 Instruction Set 60
8085 Instruction Set 61
8085 Instruction Set 62
8085 Instruction Set 63
8085 Instruction Set 64
8085 Instruction Set 65
8085 Instruction Set 66
8085 Instruction Set 67
8085 Instruction Set 68
8085 Instruction Set 69
8085 Instruction Set 70
8085 Instruction Set 71
8085 Instruction Set 72
8085 Instruction Set 73
8085 Instruction Set 74
8085 Instruction Set 75
8085 Instruction Set 76
8085 Instruction Set 77
8085 Instruction Set 78
8085 Instruction Set 79
8085 Instruction Set 80
8085 Instruction Set 81
8085 Instruction Set 82
8085 Instruction Set 83
8085 Instruction Set 84
8085 Instruction Set 85
8085 Instruction Set 86
8085 Instruction Set 87
8085 Instruction Set 88
• PSW (Program Status word)
• - Flag unaffected
• * affected
• 0 reset
• 1 set
• S Sign (Bit 7)
• Z Zero (Bit 6)
• AC Auxiliary Carry (Bit 4)
• P Parity (Bit 2)
• CY Carry (Bit 0)

8085 Instruction Set 89


8085 Instruction Set 90
8085 Instruction Set 91
8085 Instruction Set 92
8085 Instruction Set 93
8085 Instruction Set 94
8085 Instruction Set 95
8085 Instruction Set 96
8085 Instruction Set 97
8085 Instruction Set 98
8085 Instruction Set 99
8085 Instruction Set 100
8085 Instruction Set 101
8085 Instruction Set 102
8085 Instruction Set 103
8085 Instruction Set 104
8085 Instruction Set 105
8085 Instruction Set 106
8085 Instruction Set 107
„ circular Left shift

8085 Instruction Set 108


8085 Instruction Set 109
„ circular right shift

8085 Instruction Set 110


„ circular right shift

8085 Instruction Set 111


8085 Instruction Set 112
8085 Instruction Set 113
8085 Instruction Set 114
8085 Instruction Set 115
8085 Instruction Set 116
8085 Instruction Set 117
8085 Instruction Set 118
8085 Instruction Set 119
8085 Instruction Set 120
8085 Instruction Set 121
8085 Instruction Set 122
8085 Instruction Set 123
8085 Instruction Set 124
8085 Instruction Set 125
8085 Instruction Set 126
8085 Instruction Set 127
8085 Instruction Set 128
8085 Instruction Set 129
8085 Instruction Set 130
8085 Instruction Set 131
Summary
8085 Instruction Set 132
Summary – Data transfer
• MOV Move
• MVI Move Immediate
• LDA Load Accumulator Directly from Memory
• STA Store Accumulator Directly in Memory
• LHLD Load H & L Registers Directly from Memory
• SHLD Store H & L Registers Directly in Memory

8085 Instruction Set 133


Summary Data transfer
• An 'X' in the name of a data transfer instruction implies that it deals
with a register pair (16-bits);

• LXI Load Register Pair with Immediate data


• LDAX Load Accumulator from Address in Register Pair
• STAX Store Accumulator in Address in Register Pair
• XCHG Exchange H & L with D & E
• XTHL Exchange Top of Stack with H & L

8085 Instruction Set 134


Summary - Arithmetic Group
• Add, Subtract, Increment / Decrement data in registers or memory.

• ADD Add to Accumulator


• ADI Add Immediate Data to Accumulator
• ADC Add to Accumulator Using Carry Flag
• ACI Add Immediate data to Accumulator Using Carry
• SUB Subtract from Accumulator
• SUI Subtract Immediate Data from Accumulator
• SBB Subtract from Accumulator Using Borrow (Carry) Flag
• SBI Subtract Immediate from Accumulator
Using Borrow (Carry) Flag
• INR Increment Specified Byte by One
• DCR Decrement Specified Byte by One
• INX Increment Register Pair by One
• DCX Decrement Register Pair by One
• DAD Double Register Add; Add Content of Register Pair to H & L
Register Pair

8085 Instruction Set 135


Summary Logical Group
• This group performs logical (Boolean) operations on data in
registers and memory and on condition Ʋags.
• These instructions enable you to set speciƱc 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
8085 Instruction Set 136
• The Compare instructions compare the content of an 8-bit value with the contents of the accumulator;

• CMP Compare
• CPI Compare Using Immediate Data

• 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

• Complement and carry flag instructions:

• CMA Complement Accumulator


• CMC Complement Carry Flag
• STC Set Carry Flag

8085 Instruction Set 137


Summary - Branch Group
• Unconditional branching
• JMP Jump
• CALL Call
• RET Return
• Conditions
• NZ Not Zero (Z = 0)
• Z Zero (Z = 1)
• NC No Carry (C = 0)
• C Carry (C = 1)
• PO Parity Odd (P = 0)
• PE Parity Even (P = 1)
• P Plus (S = 0)
• M Minus (S = 1)
• Conditional branching

8085 Instruction Set 138


Summary - Stack
• PUSH Push Two bytes of Data onto the Stack
• POP Pop Two Bytes of Data off the Stack
• XTHL Exchange Top of Stack with H & L
• SPHL Move content of H & L to Stack Pointer

8085 Instruction Set 139


I/0 instructions
• IN Initiate Input Operation
• OUT Initiate Output Operation

8085 Instruction Set 140


Summary -Machine Control instructions

• EI Enable Interrupt System


• DI Disable Interrupt System
• HLT Halt
• NOP No Operation

8085 Instruction Set 141


INSTRUCTION FORMAT FOR ALP

8085 Instruction Set 142


INSTRUCTION FORMAT
Contd…

• I
Contd…

• Intel
Contd…

• S
Contd…

• I
PROGRAM

• Intel 8086 microprocessor


PROGRAM
OPCODE OF THE 8085 INSTRUCTION SET
OPCODE OF THE 8085 INSTRUCTION SET
OPCODE OF THE 8085 INSTRUCTION SET
OPCODE OF THE 8085 INSTRUCTION SET
Contd… MCQ
Contd… MCQ
Contd… MCQ
Contd… MCQ
Contd… SHORT ANSWER TYPE QUESTION ON MICROPROCESSORS
Contd… REVIEW QUESTION ON MICROPROCESSORS
Contd… REVIEW QUESTION ON MICROPROCESSORS
ADDRESSING MODE OF 8085 MICROPROCESSOR
Immediate Addressing Mode
• In this mode, the operand
p is speciƱed within
the instruction itself.

MVI A, 05 H Move 05 H in accumulator.


• MVI is the operation.
• 05 H is the immediate data (source).
• A is the destination.
Register Addressing Mode
• In this mode, the operand is in general
purpose register.

MOV A, B Move the contents of register B to A.

• MOV is the operation.


• B is the source of data.
• A is the destination.
Direct Addressing Mode
• In this mode, the address of the operand is
given in the instruction itself.
itself

LDA 2500 H Load the contents of memory


location 2500 H in accumulator.
• LDA is the operation.
• 2500 H is the address of source.
• Accumulator is the destination.
Register Indirect Addressing Mode

• In this mode, the address of operand is


specified by a register pair.

MOV A, M Move data from memory location


specified by H-L pair to accumulator.
• MOV is the operation.
• M is the memory location specified by H-L
register pair.
• A is the destination.
Implicit Addressing Mode
y If address of source of data as well as
address of destination of result is Ʊxed, then
there is no need to give any operand along
with the instruction.

CMA Complement accumulator.

y CMA is the operation.


y A is the source.
y A is the destination.
Program the given problem in assembly language and make a flow chart for the same.
Flow Chart with Programming
Flow Chart with Programming

You might also like