0% found this document useful (0 votes)
18 views3 pages

Instruction Set of 8085 Microprocessor Classifi

I need training practical

Uploaded by

dagaranil061
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)
18 views3 pages

Instruction Set of 8085 Microprocessor Classifi

I need training practical

Uploaded by

dagaranil061
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/ 3

Instruction Set of 8085

Microprocessor & Its


Classi7cation

The first commercially successful


microprocessor is the 8085 microprocessor by
Intel. This microprocessor was mainly
developed to eliminate the drawbacks of 8080
architecture. 8085 microprocessor is an 8-bit
microprocessor because at a time it works on
8-bits and the technology used to design this
processor is N-MOS technology. As compared
to other microprocessors, this microprocessor
is very popular because it has some unique
characteristics like it is an 8-bit device,
designed with a single NMOS IC including
6200 transistors. In this processor, a total of 80
instructions and246 operational codes are
present. It includes an internal CLK generator
and works on a CLK cycle including 50% duty
cycle. This article discusses an overview of the
instruction set of 8085 microprocessor,
types with examples.

What is Instruction Set in 8085


Microprocessor?
A binary command that is used to perform a
function in the microprocessor over provided
data is known as instruction. A set of
instructions is known as an instruction set that
decides the microprocessor function. Every
instruction includes two parts like Opcode &
the Operand where Opcode is used to specify
the function to be executed & operand gives
the data to be functioned on.

8085 Microprocessor

Classification of Instruction Set of


8085

The instruction set of 8085 microprocessor is


classified into five types which include the
following.

Classification of Instruction Set of 8085 Microprocessor

Data Transfer Instruction


Arithmetic Instruction
Logical Instruction
Branching Instruction
Control Instruction

Data Transfer Instruction

An instruction that is used to transfer the data


from one register to another is known as data
transfer instruction. So, the data transfer can be
done from source to destination without
changing the source contents. Data transfer
mainly occurs from one register to another
register, from memory location to register,
register to memory, and between an I/O device
& accumulator. Following are the list of Data
Transfer Instruction

Mov r, M

This data transfer instruction is used to transfer


data present within the memory (M) to the
register (r). But, the memory location address
must be there within the HL register.

Example: MOV r, 1020H

Mov M, Data

This type of instruction specifies the data


transfer immediately to a location of memory.
This memory location address can be specified
at the H-L registers.

Example: MOV M, 28H

MVI r, Data (Move Immediate)

In this type of instruction, the transmission of


data can be done immediately toward the
particular register.

Example: MVI r, 32H

Instruction Op- Opr BytesMachine- T- D


code cycles states
MVI MVI Reg., 2 2 7 M
Data 2 3 10 imm
Mem., 8
Data

LDA address (Load Accumulator)

LDA is a load accumulator instruction that is


mainly used for copying the data available in
the address of memory indicated as the
instruction’s operand to the accumulator.
Particularly, in this case, the available data in
the 16-bit address memory is transferred
toward the accumulator.

Example: LDA 500H

Instruction Op- Opr BytesMachine- Hex T


code cycles Code sta

LDA LDA 16-bit 3 4 3A 1


address

LDAX (LoaD Accumulator by eXtended


Register Pair)

It is a load accumulator from an address in the


register pair. In this type of data transfer
instruction, the register holds the address of the
data that needs to be loaded to the
accumulator.

Example: LDAX C/D

Instruction Op- OprBytesMachine- Hex T-


code cycles code states

LDAX LDAXB/D 1 2 1A 7
reg.
Pair

LHLD (Load H & L Registers Direct)

LHLD instruction is a direct load instruction,


where it loads the H-L register with the data
from the memory. In this type of instruction, the
data which is available in the address specified
is copied to the L register first and then the
available data within the next memory location
will be loaded in the H register.

Example: LHLD 2500H

Instruction Op- Opr BytesMachine- Hex


code cycles Codesta

LHLD LHLD16 bit 3 5 16


address
2A

STA Address (Store Accumulator Contents


in Memory)

STA stands for stored accumulator direct


instruction. Once this instruction is accepted,
then the available data within the accumulator
can be transferred to the address of memory
indicated within the operand.

Example: STA 2030H

Instruction Op- OprBytesMachine- Hex T-


code cycles Code states

STA STA 16 3 4 13
bit
32

In the above example data stored in the


accumulator will be stored to memory location
2030. LSB followed by MSB will be stored in the
memory location.

STAX Register (Store Accumulator by


Extended Register)

It is a stored accumulator indirect instruction. In


this instruction, the register is available as the
operand that holds a memory address. Thus,
the accumulator data can be copied to that
specific memory location.

Example: STAX D

Instruction Op- OprBytesMachine- Hes T-


code cycles Code states

STAX STAXB/D 1 2 7
reg.
pair 12

XCHG (Exchange)

This type of data transfer instruction can be


used to exchange the data available within two
registers.

Example: XCHG H-L & D-E. In this, the


contents of H & D and L & E are exchanged.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code stat

XCHG XCHGNone1 1 EB 4

SPHL (Stack Pointer HL Register)

In this data transfer instruction, the data of H


&L can be moved to the stack pointer.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

SPHL SPHLNone1 1 6 (in


8085
5(in
8080
F9

PCHL (Program Counter with HL Data)

Similar to SPHL instruction, this PCHL


instruction simply copies the H-L register’s data
into the SP by loading the high order bytes at H
& low order bytes at L.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

PCHL PCHLNone1 1 E9 6

PUSH

In this type of instruction, the stack can be


loaded with the available data within the
register provided in the operand. Initially, the
stack pointer gets decreased & high order
bytes are copied to the stack. Further stack
pointer gets decreased to load the low order
register bytes.

Example: PUSH D

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

PUSH PUSHReg. 1 3 D5 12
pair

POP

This instruction indicates the data transfer from


the top of the stack to the register provided as
the operand.

Example: POP C

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states

POP POP Reg. 1 3 10


pair
D1

OUT

In this type of data transfer instruction, the data


available at the accumulator can be copied
toward the I/O port. An 8-bit port address at the
operand is present.

Example: OUT 36 H

Instruction Op- Opr BytesMachine- Hex T


code cycles Code sta

OUT OUT 8-bit 2 3 10


port
address D3

IN

This type of instruction is used to load the data


available at the I/O port to the accumulator. The
operand simply holds the port address from
where the data can be copied.

Example: IN, 6B H

Instruction Op- Opr BytesMachine- Hex T


code cycles Code sta

IN IN 8-bit 2 3 10
port
address DB

Arithmetic Instruction of 8085

The arithmetic instructions perform different


operations like addition, subtraction, increment
& decrement on the data within memory &
register in the 8085 microprocessor.

ADD r

This arithmetic instruction adds the data which


is available in the register to the data available
within the accumulator & the final result will be
stored in the accumulator.

Example: ADD C

ADD M

This type of instruction is mainly used to add


the date in the memory address data denoted
at the operand to the data available at the
accumulator. So the addition result will be
stored within the accumulator.

Example: ADD 28H

ADI Data (Add Immediate)

In this instruction, the 8-bit data is specified as


an operand is added immediately to the data
available at the accumulator & the result is
stored at the accumulator.

Example: ADI 24 H

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states

ADI ADI 8- 2 2 7
bit,
data C6

ACI Data (Add with Carry Immediate)

This type of instruction simply adds the 8-bit


data available at the operand & carries the flag
by the data available at the accumulator. After
every addition, the flag reproduces the output
of the addition.

Example: ACI 35H

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states

ACI ACI 8 bit 2 2 7


Instruction data
CE

ADC r (Add with Carry)

In this type of instruction, the data present at


the register can be added to the data available
at the accumulator with the carry bit & output is
simply reflected at the accumulator.

Example: ADC D

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

ADC ADC Reg., 1,1 1,2 8A 4,7


Mem.

AMC M

This type of instruction is mainly used to add


the available data at the location of memory
whose address is denoted within the operand
specified & the carry bit with the data available
within the accumulator. So the output of
addition can be stored within the accumulator.

Example: AMC 25H

SUB r

This type of instruction is used to subtract the


available data at the register given at the
operand from the data present in the
accumulator. The final result will be stored at
the accumulator.

Example: SUB C

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

SUB SUB Reg. 1,1 1,2 4,7


,
Mem. 91
SUB M

This instruction is used to subtract the available


data at the location of memory whose address
is provided by the H-L register from the data
present at the accumulator.

Example: SUB 128H

SUI Data (Subtract Immediate from


Accumulator)

This type of instruction is mainly used to


instantly subtract the data available as operand
within the instruction from the available data at
the accumulator. After every subtraction, the
flag can be changed to show the result of
subtraction.

Example: SUI 35H

Instruction Op- OperandBytesMachine- Hex


code cycles Codest

SUI SUI 8 bit 2 2 7


data
D6

SBI Data (Subtract with Borrow Immediate


from Accumulator)

This type of instruction helps subtract the 8-bit


data provided as the operand & the borrow bit
from the available data at the accumulator, and
the result will be stored within the accumulator.

Example: SBI 24H

Instruction Op- OperandBytesMachine- Hex


code cycles Codest
SBI SBI 8 bit 2 2 7
data
DE

SBB r

This instruction is used to subtract the data


present at the register & the borrow bit from the
data present at the accumulator.

Example: SBB C

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

SBB SBB Reg., 1,1 1,2 4,7


Mem.

99

SBB M (Subtraction with Borrow)

This instruction is used to specify the


subtraction of data available at the memory
location, whose address is available at the H-L
register & the borrow bit from the data present
at the accumulator.

Example: SBB 1000H

INX r (Increment Extended Register)

This type of instruction is used to increase the


data by 1 which is available at the register
provided at the operand. The result will be
stored at the same register.

Example: INX C

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states
INX B INX Reg. 1 1 03 6
Pair

DCX r (Decrement Extended Register)

This type of instruction decreases the data


available at the register by 1 & the result will be
stored in the same register.

Example: DCX C

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states
DCX DCX Reg. 1 1 1B 6
Pair

DCR M (Decrement Register)

In an instruction, sometimes the operand holds


a location of memory. The memory location
address is available at the H-L pair. Thus the
data available at that specific location will be
decreased by 1.

Example: DCR 28H

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

DCR DCR Reg., 1,1 1,3 35 4,10


Mem.

DAA (Decimal Adjust Accumulator)

DAA is a decimal adjust accumulator, used to


break the binary number from 8-bit to two 4-bit
binary-coded decimal numbers.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

DAA DAA None1 1 4

27

Logical Instruction

Logical instructions are mainly used to perform


different operations like logical or Boolean over
the data available in either memory or register.
These instructions will modify the flag bits
based on the operation executed.

CMP R/M (Compare the Register/Memory


with the Accumulator)

This instruction is used to compare the data at


the accumulator with the data present at the
register or memory which is given as operand.
According to the result obtained by the
comparison, the flags are set. While the data
that is compared remains unchanged.

Example: CMP B

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

CMP CMP Reg., 1,1 1,2 4,7


Mem.
BE

CPI Data (Compare immediate through the


Accumulator)

This type of instruction compares the 8-bit data


provided as operand within the instruction by
the data available within the accumulator. This
result is shown through the flags.

Example: CPI 50

Instruction Op- OprBytesMachine- Hex T-


code cycles Code states

CPI CPI 8- 2 2 7
bit
FE

ANA R/M (Logical AND register or memory


with the accumulator)

This instruction executes the AND operation of


the data available within the accumulator to the
data available in the memory or register. After
the operation of AND, S, P, Z will be changed to
show the outcome of the comparison.

Example: ANA C

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

ANA ANA Reg., 1,1 1,2 4,7


mem.
A6

ANI data (And Immediate with Accumulator)

This instruction executes AND operation for the


immediate 8-bit data provided as operand by
the data available in the accumulator.

Example: ANI 35H

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states
ANI ANI 8- 2 2 7
bit,
data E6

ORA R/M (OR Accumulator Register or


Memory)

This instruction is used to perform OR


operation of the data available within the
accumulator by the data available in the
memory location or register.

Example: ORA C

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state
ORA ORA Reg., 1,1 1,2 B6 4,7
Mem.

ORI data (OR Immediate Data)

The 8-bit data provided as an operand is ORed


logically with the data within the accumulator.
So, the output of this instruction can be saved
within the accumulator.

Example: ORI 36H

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states

ORI ORI 8 bit 2 2 F6 7


data

XRA R/M (Exclusive OR Immediate with


Accumulator)

This instruction is used to execute XOR


operation through data available at the
accumulator & the data present at the memory
or register.

Example: XRA 2030

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state
XRA XRA Reg., 1,1 1,2 EE 4,7
Mem.

XRI data (Exclusive OR Accumulator)

This type of instruction is used to execute the


XOR operation of the 8-bit data specified as
operand & the data present at the accumulator.
The output will be stored at the accumulator.

Example: XRI 30

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code states
XRI XRI 8 bit 2 2 7
data
EE

RLC (Rotate Left Accumulator)

This instruction holds significance when there


exists a need to rotate the bits present in the
accumulator. Basically, for an 8-bit value, each
bit is rotated or shifted left by one position.
Also, the rotation of the last bit of the sequence
i.e., D7, sets the CY flag.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state
RLC RLC None1 1 07 4

RRC (Right Rotate Accumulator)

This instruction is used to rotate the bit toward


the right with one position. So, in this case, D0
sets the CY flag.

Example: RRC

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

RRC RRC None1 1 0F 4

RAL (Rotate Accumulator Left)

This type of instruction is used to rotate the bits


toward the left with one of the data available
within the accumulator through the carry flag.
Here, D7 can be shifted to hold the flag & the
bit within the carry flag can be shifted to D0.

Example: RAL

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

RAL RAL None1 1 4

17

RAR (Rotate Accumulator Right)

This type of instruction is mainly used to rotate


the data bits to the right which are available
within the accumulator by the carry flag. Here,
D0 can be shifted to hold the flag & the carry
bit can be moved to the D7 position.

Example: RAR

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

RAR RAR None1 1 1F 4

STC (Set the Carry Flag)

This type of instruction is used to set the carry


flag (CF) to 1 by not affecting any other flags.

Example: STC

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

STC STC None1 1 37 4

CMA (Complement the Accumulator)

This type of instruction generates the


complement of data at the accumulator. So, this
function does not change any of the flags.

Example: CMA

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

CMA CMA None1 1 2F 4

CMC (Complement the Carry Flag)

This type of instruction is used to complement


the data available at the carry flag (CF). So this
instruction does not affect any other flag.

Example: CMC

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state
CMC CMC None1 1 3F 4

Branching Instruction

These types of instructions are mainly used to


transfer or switch the microprocessor from one
location to another. So, it simply changes the
general sequential flow.

JMP address (Jump unconditionally)

This type of instruction is mainly used to


transfer the series of the current program to
that location of memory whose 16-bit address
can be simply specified within the operand of
the instruction.

Example: JMP 2014H

Instruction Op- OprBytesMachine- Hex T-


code cycles Code states

JMP JMP 16 3 3 10
bit
C3

Jx Address

This is a conditional branching type instruction,


where the series of current programs can be
transferred to that specific location whose
address can be provided at the operand.
However this transferring mainly depends on
the specified PSX flag.

Example: JZ 1200H

CALL address

This instruction shifts the control of a series of


current programs toward the memory address
available at the operand. However the PC gets
decreased before transferring,

Example: CALL 2400H

Instruction Op- Opr BytesMachine- Hex


code cycles Codesta

CALL CALL16-bit 3 5 18
address
CD

RET (Return from the Subroutine)

This type of instruction can cause the


unconditional return of the sub-routine to the
actual program.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

RET RET None1 3 10

C9

RST(Restart Instruction)

This type of instruction is mainly used to


transfer the series from the main program to the
interrupt service routine. Mostly, the transfer
can be performed above one of the 8-bits
which are indicated within the operand.

Control Instruction

These instructions are mainly used to control


the microprocessor operations. These
instructions are discussed below.

NOP (No operation)

NOP stands for no operation. Once the 8085


microprocessor gets this instruction, then it
does not perform any operation based on
execution.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

NOP NOP None1 1 00 4

DI (Disable Interrupts)
DI is the disabling of the interrupt that is
generated within the microprocessor. Interrupt
resetting will allow disabling all the interrupts
apart from TRAP.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state
DI DI None1 1 F3 4

EI (Enable Interrupts)

This type of instruction is mainly used to allow


the interrupt. Once the interrupt enable pin is
set then leads to enabling the interrupts within
the system.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

EI EI None1 1 FB 4

HLT (Halt & Enter Wait State)

Once the HLT interrupt is decoded through the


microprocessor, it stops the current operation
and waits for further instruction. To escape from
the halt condition either a reset or an interrupt is
necessary.

Instruction Op- Opr BytesMachine- Hex T-


code cycles Code state

HLT HLT None1 2 or more 76 5 or


more

SIM (Set Interrupt Mask)

SIM is the set interrupt mask, which is used to


execute the hardware interrupts programming
& serial output.

Instruction Op- Opr BytesMachine- Hex T-


code cycles code states
SIM SIM None1 1 30 4

RIM (Read Interrupt Mask)

RIM is the read interrupt mask that is used to


situate the preferred data at the accumulator
based on the serial input & interrupt.

Instruction Op- Opr BytesMachine- Hex T-


code cycles code states

RIM RIM None1 1 20 4

Thus, this is all about an overview of the


Instruction Set of the 8085 Microprocessor. The
main function of instruction in an 8085
microprocessor is, it is a binary command used
for executing an operation within the
microprocessor over provided data. So, a set of
instructions supported by the 8085
microprocessor is called an instruction set.
Here is a question for you, what are the
applications of the 8085 microprocessor?

SHARE THIS POST:

Facebook Twitter Google+

LinkedIn Pinterest

‹ PREVIOUS

What is Position Sensor : Working & Its


Applications

NEXT ›

Pneumatic System : Working & Its


Applications

RELATED CONTENT

Linear Encoder : Structure, IR Sensor Module Interfacing


Working, Types, Wiring & Its with Microcontroller –
Applications Arduino, PIC

Wireless Power Transfer with


MOSFET

Voltage Regulator with


MOSFET

RECENT POSTS

Linear Encoder : Structure, Working,


Types, Wiring & Its Applications

Microstrip Antenna : Construction,


Working, Types, Feeding Methods & Its
Applications

IR Sensor Module Interfacing with


Microcontroller – Arduino, PIC

Wireless Power Transfer with MOSFET

Light-Activated Switch with MOSFET

Voltage Regulator with MOSFET

Solar Tracker with MOSFET

PROJECTS

555 Timer Circuits (6)

8051 Projects (60+)

Arduino Projects (40+)

ARM Projects (100+)

Communication Projects (140+)

DTMF Projects (25+)

ECE Projects (400+)

EEE Projects (240+)

EIE Projects (100+)

Electrical Mini Projects (120+)

Electrical Project Ideas (300+)

Electronics Projects (160+)

Embedded Projects (200+)

GSM Projects (100+)

Home Automation Projects (100+)

IOT Projects (30)

LabView Projects (100+)

Matlab Projects (190+)

Microcontroller Mini Projects (80+)

Mini Project Circuits (20+)

Mini Project Ideas (45+)

PIC Projects (30+)

Power Electronics Projects (45+)

Raspberry Pi Projects (9)

RFID Projects (70+)

Robotics Projects (100+)

Sensor Projects (40+)

Solar Projects (150+)

VLSI Projects (180+)

Wireless Projects (100+)

Zigbee Projects (120+)

CATEGORIES

Communication

Electrical

Electronics

Project Ideas

Robotics

Technology

RECENT COMMENTS

K BALAJI on Simple Electronic Circuits for


Beginners

Anny Arbert on Gyroscope Sensor Working


and Its Applications

Abhuday dangi on What is a UJT


Relaxation Oscillator – Circuit Diagram and
Applications

Satyadeo Vyas on Construction and


Working of a 4 Point Starter

FOLLOW ON FACEBOOK

Image
Advertise Report Usage Privacy Contact
With Us DisclaimerViolation Policy Policy Us

Copyright 2013 - 2023 © Elprocus

You might also like