SlideShare a Scribd company logo
1 of 41
Download to read offline
Instruction Sets and Programming of 8085
Dr. Nilesh Bhaskarrao Bahadure
https://www.sites.google.com/site/nileshbbahadure/home
July 26, 2021
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 1 / 41
Overview
1 Addressing Modes
Addressing Modes
2 Instruction Format
Instruction Format
Opcode Format
3 Instruction Sets
Data Transfer Instruction
Summary of Data Transfer Group
Arithmetic Group
Summary of Arithmetic Group
Logical Group
Summary of Logical Group
Branching Group
Summary of Branching Group
Miscellaneous or Machine Control Group
Summary of Machine Control Group
4 Thank You
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 2 / 41
Addressing Modes
1 Immediate addressing mode
2 Register addressing mode
3 Direct addressing mode
4 Register indirect addressing mode
5 Implicit or inherent addressing mode
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 3 / 41
Instruction Format
An instruction is a command to the microprocessor to perform a given
task on a specified data. Each instruction has two parts: one task to be
performed, called the operation code (opcode), and the second is the data to
be operated on, called the operand. The operand (or data) can be specified
in various ways. It may include 8-bit (or 16-bit) data, an internal register,
a memory location, or 8-bit (or 16-bit) address. In some instructions, the
operand is implicit
1 One-word or 1-byte instructions
2 Two-word or 2-byte instructions
3 Three-word or 3-byte instructions
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 4 / 41
Opcode Format
Register address
B 000
C 001
D 010
E 011
H 100
L 101
M 110
A 111
Table : Register and their address
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 5 / 41
Opcode Format...
Register Pair Address
BC 00
DE 01
HL 10
SP or AF 11
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 6 / 41
Opcode Format...
Instruction Opcode Format
MOV Rd, Rs 0 1 D D D S S S
MVI Rd, DATA 0 0 D D D 1 1 0
LXI Rp, 16 - BIT DATA 0 0 D D 0 0 0 1
ADD R 1 0 0 0 0 S S S
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 7 / 41
Instructions of 8085
1 Data Transfer Group
2 Arithmetic Group
3 Logical Group
4 Branching Group
5 Machine Control or Miscellaneous Group
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 8 / 41
Data Transfer Group
1. MOV Rd, Rs
Copy data from source register to destination register
2. MOV Rd, M
Copy the contents of memory location to the destination register.
3. MOV M, Rs
Copy the contents of source register to the memory location
4. MVI Rd, DATA
Move immediate 8 - bit data to the destination register
5. MVI M, DATA
Copy immediate data to the memory location
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 9 / 41
Data Transfer Group...
6. LXI Rp, 16 - BIT DATA
The instruction loads 16-bit data in the register pair designated in the
operand.
7. LDA 16 - BIT ADDRESS
Copy 8 - bit data from the memory location to the accumulator
8. STA 16 - BIT ADDRESS
Store accumulator to the memory location
9. LDAX Rp
Load accumulator indirect
10. STAX Rp
Store accumulator to the indirect memory location
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 10 / 41
Data Transfer Group...
11. LHLD 16 - BIT ADDRESS
Load HL register direct
12. SHLD 16 - BIT ADDRESS
Store H and L register direct
13. IN 8-BIT PORT ADDRESS
Input data to the accumulator from 8 - bit port address
14. OUT 8 - BIT PORT ADDRESS
Output data from accumulator the output port
15. PUSH Rp
Push registers pair onto the stack
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 11 / 41
Data Transfer Group...
16. POP Rp
Pop off stack to register pair
17. SPHL
Load stack pointer register with HL register
18. XCHG
Exchange HL with DE registers pair
19. XTHL
Exchange H and L with top of the stack
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 12 / 41
Summary of Data Transfer Group
Sr. No. Instruction No. of Bytes No. of Cycles
01 MOV Rd, Rs 01 01
02 MVI Rd, DATA 02 02
03 MOV Rd, M 01 02
04 MOV M, Rs 01 02
05 MVI M, 8 -BIT DATA 02 03
06 LXI Rp, 16 - BIT DATA 03 03
07 LDA 16 - BIT ADDRESS 03 04
08 STA 16 - BIT ADDRESS 03 04
09 LDAX Rp 01 03
10 STAX Rp 01 03
Table : Summary of Data Transfer Group
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 13 / 41
Summary of Data Transfer Group...
Sr. No. Instruction No. of Bytes No. of Cycles
11 LHLD 16 - BIT ADDRESS 03 05
12 SHLD 16 - BIT ADDRESS 03 05
13 PUSH Rp 01 03
14 POP Rp 01 03
15 XCHG 01 01
16 IN 8 - BIT PORT ADDRESS 02 03
17 OUT 8 - BIT PART ADDRESS 02 03
18 SPHL 01 01
19 XTHL 01 05
Table : Summary of Data Transfer Group
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 14 / 41
Arithmetic Group
1. ADD R
Add register to accumulator
2. ADD M
Add memory contents to accumulator
3. ADI 8- BIT DATA
Add immediate data to accumulator
4. ADC R
Add register to accumulator with carry
5. ADC M
Add contents of memory to accumulator with carry
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 15 / 41
Arithmetic Group
6. ACI 8 - BIT DATA
Add immediate data to accumulator with carry
7. DAA
Decimal adjust accumulator
8. SUB R
Subtract register from accumulator
9. SUB M
Subtracts contents of memory from accumulator
10. SUI 8 - BIT DATA
Subtract immediate data from accumulator
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 16 / 41
Arithmetic Group
11. SBB R
Subtract source and borrow from accumulator
12. SBB M
Subtract contents of memory location and borrow from accumulator
13. SBI 8 - BIT DATA
Subtract 8 - bit immediate data with borrow from accumulator
14. DAD Rp
Add 16 - data from HL register pair with the specified register pair
15. INR R
Increment register by one
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 17 / 41
Arithmetic Group
16. INR M
The contents of the designated memory are incremented by 1 and the
result is stored in the same place. If the operand is a memory location, its
location is specified by the contents of the HL registers.
17. INX Rp
Increments register pair by one
18. DCR R
Decrement register by one
19. DCR M
Decrement contents of memory by one
20. DCX Rp
Decrement specified register pair by one
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 18 / 41
Arithmetic Group
Sr. No. Instruction No. of Bytes No. of Cycles
01 ADD R 01 01
02 ADD M 01 02
03 ADI 8 - BIT DATA 02 02
04 ADC R 01 01
05 ADC M 01 02
06 ACI 8 - BIT DATA 02 02
07 DAA 01 01
08 SUB R 01 01
09 SUB M 01 02
10 SUI 8 - BIT DATA 02 02
Table : Summary of Arithmetic Group
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 19 / 41
Arithmetic Group
Sr. No. Instruction No. of Bytes No. of Cycles
11 SBB R 01 01
12 SBB M 01 02
13 SBI 8 - BIT DATA 02 02
14 DAD Rp 01 03
15 INR R 01 01
16 INR M 01 03
17 INX Rp 01 01
18 DCR R 01 01
19 DCR M 01 03
20 DCX Rp 01 01
Table : Summary of Arithmetic Group
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 20 / 41
Logical Group
1. ANA R
Logical AND contents of register with accumulator
2. ANA M
Logical ANDing of contents of memory with accumulator
3. ANI 8 - BIT DATA
Logical ANDing 8 - bit immediate data with accumulator
4. ORA R
Logical ORing contents of register with accumulator
5. ORA M
Logical ORing the contents of memory with accumulator
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 21 / 41
Logical Group...
6. ORI 8 - BIT DATA
Logical ORing 8 - bit immediate data with accumulator
7. XRA R
Exclusive ORed register with accumulator
8. XRA M
Exclusive ORed contents of memory with accumulator
9. XRI 8 - BIT DATA
Logical Exclusive ORing immediate data with accumulator
10. CMP R
Compare register with accumulator
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 22 / 41
Logical Group
11. CMP M
Compare contents of memory with accumulator
12. CPI 8 - BIT DATA
Compare 8 - bit immediate data with accumulator
13. RLC
Rotate accumulator left
14. RAL
Rotate accumulator left through carry
15. RRC
Rotate accumulator right
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 23 / 41
Logical Group
16. RAR
Rotate accumulator right through carry
17. CMA
Complement accumulator
18. CMC
Complements carry flag
19. STC
Set carry flag.
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 24 / 41
Logical Group
Sr. No. Instruction No. of Bytes No. of Cycles
01 ANA R 01 01
02 ANA M 01 02
03 ANI 8 - BIT DATA 02 02
04 ORA R 01 01
05 ORA M 01 02
06 ORI 8 - BIT DATA 02 02
07 XRA R 01 01
08 XRA M 01 01
09 XRI 8 - BIT DATA 01 02
10 CMP R 02 02
Table : Summary of Logical Group
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 25 / 41
Logical Group
Sr. No. Instruction No. of Bytes No. of Cycles
11 CMP M 01 01
12 CPI 8 - BIT DATA 03 02
13 RLC 02 02
14 RAL 01 03
15 RRC 01 01
16 RAR 01 03
17 CMA 01 01
18 CMC 01 01
19 STC 01 03
Table : Summary of Logical Group
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 26 / 41
Branching Group
1. JMP 16 - bit address
Unconditional Jump
The program sequence is transferred to the memory location specified by
the 16-bit address given in the operand.
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 27 / 41
Branching Group
2. JCONDITION 16 bit address
Conditional Jump
The program sequence is transferred to the memory location specified by
the 16-bit address given in the operand based on the specified flag as
described below.
(a) If the given condition in the instruction is satisfied then new number
i.e. 16 bit address given along with the instruction is transferred to
the program counter so microprocessor will jump to the location
whose address given along with the instruction.
(b) If the given condition in the instruction is not satisfied then new
number i.e. 16 bit address given along with the instruction is not
transferred to the program counter instead program counter is
incremented by three (three byte instruction) so the next instruction
is executed in the sequence.
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 28 / 41
Branching Group...
Instruction Description Flag status
JC 16 - BIT ADDR Jump on carry CY = 1
JNC 16 - BIT ADDR Jump on no carry CY = 0
JZ 16 - BIT ADDR Jump on zero ZF = 1
JNZ 16 - BIT ADDR Jump on no zero ZF = 0
JPE 16 - BIT ADDR Jump on parity even PF = 1
JPO 16 - BIT ADDR Jump on parity odd PF = 0
JP 16 - BIT ADDR Jump on positive SF = 0
JM 16 - BIT ADDR Jump on minus SF = 1
Table : Conditional Jump Instruction
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 29 / 41
Branching Group...
3. CALL 16 - BIT ADDR
Unconditional Call to the subprogram
4. CCONDITION 16 - BIT ADDR
Conditional Call to the subprogram
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 30 / 41
Branching Group...
Instruction Description Flag status
CC 16 - BIT ADDR Call on carry CY =1
CNC 16 - BIT ADDR call on no carry CY = 0
CZ 16 - BIT ADDR Call on zero ZF = 1
CNZ 16 - BIT ADDR Call on no zero ZF = 0
CPE 16 - BIT ADDR Call on parity even PF = 1
CPO 16 - BIT ADDR Call on parity odd PF = 0
CP 16 - BIT ADDR Call on positive SF = 0
CM 16 - BIT ADDR Call on minus SF = 1
Table : Conditional Call Instruction
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 31 / 41
Branching Group...
5. RET
Return from subprogram / subroutine unconditionally
6. RCONDITION
Return from subprogram / subroutine conditionally
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 32 / 41
Branching Group...
Instruction Description Flag status
RC Return on carry CY = 1
RNC Return on no carry CY = 0
RZ Return on zero ZF = 1
RNZ Return on no zero ZF = 0
RPE Return on parity even PF = 1
RPO Return on parity odd PF = 0
RP Return on positive SF = 0
RM Return on minus SF = 1
Table : Conditional Return Instruction
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 33 / 41
Branching Group...
7. PCHL
Load program counter (PC) with HL contents
8. RSTn (n = 0 to 7)
Restart The RST instruction is equivalent to a 1-byte call instruction to
one of eight memory locations depending upon the number. The
instructions are generally used in conjunction with interrupts and inserted
using external hardware. However these can be used as software
instructions in a program to transfer program execution to one of the eight
locations. The addresses are:
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 34 / 41
Branching Group...
Instruction Restart Address
RST 0 0000H
RST 1 0008H
RST 2 0010H
RST 3 0018H
RST 4 0020H
RST 5 0028H
RST 6 0030H
RST 7 0038H
Table : Conditional Return Instruction
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 35 / 41
Branching Group
Sr. No. Instruction No. of Bytes No. of Cycles
01 JMP 16 - BIT ADDRESS 03 03
02 JCONDITION 16- BIT ADDRESS 03 03 / 02
03 CALL 16 - BIT ADDRESS 03 05
04 CCONDITION 16 - BIT ADDRESS 03 05 / 02
05 RET 01 03
06 RCONDITION 01 03 / 01
07 PCHL 01 01
08 RSTn 01 03
Table : Summary of Branching Group
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 36 / 41
Machine Control Group
1. NOP
No operation
2. HLT
Halt and enter wait state
3. DI
Disable interrupts
4. EI
Enable interrupts
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 37 / 41
Machine Control Group...
5. SIM
Set interrupt mask
D7 D6 D5 D4 D3 D2 D1 D0
SOD SDE X R7.5 MSE M7.5 M6.5 M5.5
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 38 / 41
Machine Control Group...
5. RIM
Read interrupt mask
D7 D6 D5 D4 D3 D2 D1 D0
SID I7 I6 I5 IE M7.5 M6.5 M5.5
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 39 / 41
Machine Control Group
Sr. No. Instruction No. of Bytes No. of Cycles
01 NOP 01 01
02 HLT 01 01
03 DI 01 01
04 EI 01 01
05 SIM 01 01
06 RIM 01 01
Table : Summary of Machine Control Group
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 40 / 41
Thank you
Please send your feedback at nbahadure@gmail.com
For more details and updates kindly visit
https://sites.google.com/site/nileshbbahadure/home
Main Slide
Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 41 / 41

More Related Content

What's hot

Solution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidiSolution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidi
Muhammad Abdullah
ย 

What's hot (7)

Implementation and Comparison of Efficient 16-Bit SQRT CSLA Using Parity Pres...
Implementation and Comparison of Efficient 16-Bit SQRT CSLA Using Parity Pres...Implementation and Comparison of Efficient 16-Bit SQRT CSLA Using Parity Pres...
Implementation and Comparison of Efficient 16-Bit SQRT CSLA Using Parity Pres...
ย 
Introduction to 8085 & it's description(includes basic lab experiments)
Introduction to 8085 & it's description(includes basic lab experiments)Introduction to 8085 & it's description(includes basic lab experiments)
Introduction to 8085 & it's description(includes basic lab experiments)
ย 
Solution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidiSolution manual 8051 microcontroller by mazidi
Solution manual 8051 microcontroller by mazidi
ย 
IRJET- Performance Estimation of FIR Filter using Null Convention Logic
IRJET-  	  Performance Estimation of FIR Filter using Null Convention LogicIRJET-  	  Performance Estimation of FIR Filter using Null Convention Logic
IRJET- Performance Estimation of FIR Filter using Null Convention Logic
ย 
FPGA Implementation of FIR Filter using Various Algorithms: A Retrospective
FPGA Implementation of FIR Filter using Various Algorithms: A RetrospectiveFPGA Implementation of FIR Filter using Various Algorithms: A Retrospective
FPGA Implementation of FIR Filter using Various Algorithms: A Retrospective
ย 
FPGA Implementation of Mixed Radix CORDIC FFT
FPGA Implementation of Mixed Radix CORDIC FFTFPGA Implementation of Mixed Radix CORDIC FFT
FPGA Implementation of Mixed Radix CORDIC FFT
ย 
Implementation and Design of AES S-Box on FPGA
Implementation and Design of AES S-Box on FPGAImplementation and Design of AES S-Box on FPGA
Implementation and Design of AES S-Box on FPGA
ย 

Similar to Instruction sets of microprocessor 8085

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
aviban
ย 
Basic programming of 8085
Basic programming of 8085 Basic programming of 8085
Basic programming of 8085
vijaydeepakg
ย 
Microprocessor lab
Microprocessor labMicroprocessor lab
Microprocessor lab
D V YA Shrestha
ย 
8085-instruction-set.ppt
8085-instruction-set.ppt8085-instruction-set.ppt
8085-instruction-set.ppt
babu kannan
ย 

Similar to Instruction sets of microprocessor 8085 (20)

Timing diagram of microprocessor 8085
Timing diagram of microprocessor 8085Timing diagram of microprocessor 8085
Timing diagram of microprocessor 8085
ย 
system software.ppt
system software.pptsystem software.ppt
system software.ppt
ย 
Peripherals of Microprocessor 8085
Peripherals of Microprocessor 8085Peripherals of Microprocessor 8085
Peripherals of Microprocessor 8085
ย 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programming
ย 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
ย 
8085 alp programs
8085 alp programs8085 alp programs
8085 alp programs
ย 
Computer Architecture - Data Path & Pipeline Hazards
Computer Architecture - Data Path & Pipeline HazardsComputer Architecture - Data Path & Pipeline Hazards
Computer Architecture - Data Path & Pipeline Hazards
ย 
Basic programming of 8085
Basic programming of 8085 Basic programming of 8085
Basic programming of 8085
ย 
Mechatronics Manual.docx
Mechatronics   Manual.docxMechatronics   Manual.docx
Mechatronics Manual.docx
ย 
Microcontroller 8051 basics (part I)
Microcontroller 8051 basics (part I)Microcontroller 8051 basics (part I)
Microcontroller 8051 basics (part I)
ย 
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
Design and simulation of a non pipelined multi cycle 16 bit risc educational ...
ย 
Ei502 microprocessors & micrtocontrollers part 2(instructionset)
Ei502 microprocessors & micrtocontrollers part 2(instructionset)Ei502 microprocessors & micrtocontrollers part 2(instructionset)
Ei502 microprocessors & micrtocontrollers part 2(instructionset)
ย 
4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx4. Instruction Set Of MP 8085.pptx
4. Instruction Set Of MP 8085.pptx
ย 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processor
ย 
Mpi lab manual eee
Mpi lab manual eeeMpi lab manual eee
Mpi lab manual eee
ย 
Microprocessor lab
Microprocessor labMicroprocessor lab
Microprocessor lab
ย 
microprocessor_labbmet.pdf
microprocessor_labbmet.pdfmicroprocessor_labbmet.pdf
microprocessor_labbmet.pdf
ย 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marks
ย 
Microprocessor square wave
Microprocessor square waveMicroprocessor square wave
Microprocessor square wave
ย 
8085-instruction-set.ppt
8085-instruction-set.ppt8085-instruction-set.ppt
8085-instruction-set.ppt
ย 

More from Nilesh Bhaskarrao Bahadure

More from Nilesh Bhaskarrao Bahadure (20)

Biomedical Signal Origin and Dynamics
Biomedical Signal Origin and DynamicsBiomedical Signal Origin and Dynamics
Biomedical Signal Origin and Dynamics
ย 
Introduction to Medical Image Processing
Introduction to Medical Image ProcessingIntroduction to Medical Image Processing
Introduction to Medical Image Processing
ย 
Timers and counters of microcontroller 8051
Timers and counters of microcontroller 8051Timers and counters of microcontroller 8051
Timers and counters of microcontroller 8051
ย 
Serial communication of microcontroller 8051
Serial communication of microcontroller 8051Serial communication of microcontroller 8051
Serial communication of microcontroller 8051
ย 
Microprocessor 8085 Basics
Microprocessor 8085 BasicsMicroprocessor 8085 Basics
Microprocessor 8085 Basics
ย 
Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085
ย 
Memory interfacing of microcontroller 8051
Memory interfacing of microcontroller 8051Memory interfacing of microcontroller 8051
Memory interfacing of microcontroller 8051
ย 
Interrupts of microprocessor 8085
Interrupts of microprocessor 8085Interrupts of microprocessor 8085
Interrupts of microprocessor 8085
ย 
Embedded Systems
Embedded Systems Embedded Systems
Embedded Systems
ย 
Basic Electronics Semiconductor Diodes
Basic Electronics Semiconductor DiodesBasic Electronics Semiconductor Diodes
Basic Electronics Semiconductor Diodes
ย 
Basic Electronics Electrical Transducers
Basic Electronics Electrical TransducersBasic Electronics Electrical Transducers
Basic Electronics Electrical Transducers
ย 
Basic Electronics BJT
Basic Electronics BJTBasic Electronics BJT
Basic Electronics BJT
ย 
Question Bank Programmable Logic Controller
Question Bank Programmable Logic ControllerQuestion Bank Programmable Logic Controller
Question Bank Programmable Logic Controller
ย 
Question Bank Microprocessor 8085
Question Bank Microprocessor 8085Question Bank Microprocessor 8085
Question Bank Microprocessor 8085
ย 
Question Bank linear integrated circuits and applications
Question Bank linear integrated circuits and applicationsQuestion Bank linear integrated circuits and applications
Question Bank linear integrated circuits and applications
ย 
Question Bank Digital Signal Processing
Question Bank Digital Signal ProcessingQuestion Bank Digital Signal Processing
Question Bank Digital Signal Processing
ย 
Question Bank Basic Electronics
Question Bank Basic ElectronicsQuestion Bank Basic Electronics
Question Bank Basic Electronics
ย 
Ece vision 2025
Ece vision 2025Ece vision 2025
Ece vision 2025
ย 
Control system digital control
Control system digital controlControl system digital control
Control system digital control
ย 
Objective Questions Digital Electronics
Objective Questions Digital ElectronicsObjective Questions Digital Electronics
Objective Questions Digital Electronics
ย 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
ย 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
SUHANI PANDEY
ย 
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
ย 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
KreezheaRecto
ย 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
ย 

Recently uploaded (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
ย 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
ย 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
ย 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ย 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
ย 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
ย 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
ย 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
ย 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
ย 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
ย 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
ย 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
ย 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
ย 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
ย 
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Ramesh Nagar Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
ย 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
ย 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
ย 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
ย 

Instruction sets of microprocessor 8085

  • 1. Instruction Sets and Programming of 8085 Dr. Nilesh Bhaskarrao Bahadure https://www.sites.google.com/site/nileshbbahadure/home July 26, 2021 Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 1 / 41
  • 2. Overview 1 Addressing Modes Addressing Modes 2 Instruction Format Instruction Format Opcode Format 3 Instruction Sets Data Transfer Instruction Summary of Data Transfer Group Arithmetic Group Summary of Arithmetic Group Logical Group Summary of Logical Group Branching Group Summary of Branching Group Miscellaneous or Machine Control Group Summary of Machine Control Group 4 Thank You Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 2 / 41
  • 3. Addressing Modes 1 Immediate addressing mode 2 Register addressing mode 3 Direct addressing mode 4 Register indirect addressing mode 5 Implicit or inherent addressing mode Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 3 / 41
  • 4. Instruction Format An instruction is a command to the microprocessor to perform a given task on a specified data. Each instruction has two parts: one task to be performed, called the operation code (opcode), and the second is the data to be operated on, called the operand. The operand (or data) can be specified in various ways. It may include 8-bit (or 16-bit) data, an internal register, a memory location, or 8-bit (or 16-bit) address. In some instructions, the operand is implicit 1 One-word or 1-byte instructions 2 Two-word or 2-byte instructions 3 Three-word or 3-byte instructions Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 4 / 41
  • 5. Opcode Format Register address B 000 C 001 D 010 E 011 H 100 L 101 M 110 A 111 Table : Register and their address Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 5 / 41
  • 6. Opcode Format... Register Pair Address BC 00 DE 01 HL 10 SP or AF 11 Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 6 / 41
  • 7. Opcode Format... Instruction Opcode Format MOV Rd, Rs 0 1 D D D S S S MVI Rd, DATA 0 0 D D D 1 1 0 LXI Rp, 16 - BIT DATA 0 0 D D 0 0 0 1 ADD R 1 0 0 0 0 S S S Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 7 / 41
  • 8. Instructions of 8085 1 Data Transfer Group 2 Arithmetic Group 3 Logical Group 4 Branching Group 5 Machine Control or Miscellaneous Group Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 8 / 41
  • 9. Data Transfer Group 1. MOV Rd, Rs Copy data from source register to destination register 2. MOV Rd, M Copy the contents of memory location to the destination register. 3. MOV M, Rs Copy the contents of source register to the memory location 4. MVI Rd, DATA Move immediate 8 - bit data to the destination register 5. MVI M, DATA Copy immediate data to the memory location Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 9 / 41
  • 10. Data Transfer Group... 6. LXI Rp, 16 - BIT DATA The instruction loads 16-bit data in the register pair designated in the operand. 7. LDA 16 - BIT ADDRESS Copy 8 - bit data from the memory location to the accumulator 8. STA 16 - BIT ADDRESS Store accumulator to the memory location 9. LDAX Rp Load accumulator indirect 10. STAX Rp Store accumulator to the indirect memory location Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 10 / 41
  • 11. Data Transfer Group... 11. LHLD 16 - BIT ADDRESS Load HL register direct 12. SHLD 16 - BIT ADDRESS Store H and L register direct 13. IN 8-BIT PORT ADDRESS Input data to the accumulator from 8 - bit port address 14. OUT 8 - BIT PORT ADDRESS Output data from accumulator the output port 15. PUSH Rp Push registers pair onto the stack Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 11 / 41
  • 12. Data Transfer Group... 16. POP Rp Pop off stack to register pair 17. SPHL Load stack pointer register with HL register 18. XCHG Exchange HL with DE registers pair 19. XTHL Exchange H and L with top of the stack Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 12 / 41
  • 13. Summary of Data Transfer Group Sr. No. Instruction No. of Bytes No. of Cycles 01 MOV Rd, Rs 01 01 02 MVI Rd, DATA 02 02 03 MOV Rd, M 01 02 04 MOV M, Rs 01 02 05 MVI M, 8 -BIT DATA 02 03 06 LXI Rp, 16 - BIT DATA 03 03 07 LDA 16 - BIT ADDRESS 03 04 08 STA 16 - BIT ADDRESS 03 04 09 LDAX Rp 01 03 10 STAX Rp 01 03 Table : Summary of Data Transfer Group Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 13 / 41
  • 14. Summary of Data Transfer Group... Sr. No. Instruction No. of Bytes No. of Cycles 11 LHLD 16 - BIT ADDRESS 03 05 12 SHLD 16 - BIT ADDRESS 03 05 13 PUSH Rp 01 03 14 POP Rp 01 03 15 XCHG 01 01 16 IN 8 - BIT PORT ADDRESS 02 03 17 OUT 8 - BIT PART ADDRESS 02 03 18 SPHL 01 01 19 XTHL 01 05 Table : Summary of Data Transfer Group Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 14 / 41
  • 15. Arithmetic Group 1. ADD R Add register to accumulator 2. ADD M Add memory contents to accumulator 3. ADI 8- BIT DATA Add immediate data to accumulator 4. ADC R Add register to accumulator with carry 5. ADC M Add contents of memory to accumulator with carry Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 15 / 41
  • 16. Arithmetic Group 6. ACI 8 - BIT DATA Add immediate data to accumulator with carry 7. DAA Decimal adjust accumulator 8. SUB R Subtract register from accumulator 9. SUB M Subtracts contents of memory from accumulator 10. SUI 8 - BIT DATA Subtract immediate data from accumulator Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 16 / 41
  • 17. Arithmetic Group 11. SBB R Subtract source and borrow from accumulator 12. SBB M Subtract contents of memory location and borrow from accumulator 13. SBI 8 - BIT DATA Subtract 8 - bit immediate data with borrow from accumulator 14. DAD Rp Add 16 - data from HL register pair with the specified register pair 15. INR R Increment register by one Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 17 / 41
  • 18. Arithmetic Group 16. INR M The contents of the designated memory are incremented by 1 and the result is stored in the same place. If the operand is a memory location, its location is specified by the contents of the HL registers. 17. INX Rp Increments register pair by one 18. DCR R Decrement register by one 19. DCR M Decrement contents of memory by one 20. DCX Rp Decrement specified register pair by one Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 18 / 41
  • 19. Arithmetic Group Sr. No. Instruction No. of Bytes No. of Cycles 01 ADD R 01 01 02 ADD M 01 02 03 ADI 8 - BIT DATA 02 02 04 ADC R 01 01 05 ADC M 01 02 06 ACI 8 - BIT DATA 02 02 07 DAA 01 01 08 SUB R 01 01 09 SUB M 01 02 10 SUI 8 - BIT DATA 02 02 Table : Summary of Arithmetic Group Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 19 / 41
  • 20. Arithmetic Group Sr. No. Instruction No. of Bytes No. of Cycles 11 SBB R 01 01 12 SBB M 01 02 13 SBI 8 - BIT DATA 02 02 14 DAD Rp 01 03 15 INR R 01 01 16 INR M 01 03 17 INX Rp 01 01 18 DCR R 01 01 19 DCR M 01 03 20 DCX Rp 01 01 Table : Summary of Arithmetic Group Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 20 / 41
  • 21. Logical Group 1. ANA R Logical AND contents of register with accumulator 2. ANA M Logical ANDing of contents of memory with accumulator 3. ANI 8 - BIT DATA Logical ANDing 8 - bit immediate data with accumulator 4. ORA R Logical ORing contents of register with accumulator 5. ORA M Logical ORing the contents of memory with accumulator Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 21 / 41
  • 22. Logical Group... 6. ORI 8 - BIT DATA Logical ORing 8 - bit immediate data with accumulator 7. XRA R Exclusive ORed register with accumulator 8. XRA M Exclusive ORed contents of memory with accumulator 9. XRI 8 - BIT DATA Logical Exclusive ORing immediate data with accumulator 10. CMP R Compare register with accumulator Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 22 / 41
  • 23. Logical Group 11. CMP M Compare contents of memory with accumulator 12. CPI 8 - BIT DATA Compare 8 - bit immediate data with accumulator 13. RLC Rotate accumulator left 14. RAL Rotate accumulator left through carry 15. RRC Rotate accumulator right Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 23 / 41
  • 24. Logical Group 16. RAR Rotate accumulator right through carry 17. CMA Complement accumulator 18. CMC Complements carry flag 19. STC Set carry flag. Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 24 / 41
  • 25. Logical Group Sr. No. Instruction No. of Bytes No. of Cycles 01 ANA R 01 01 02 ANA M 01 02 03 ANI 8 - BIT DATA 02 02 04 ORA R 01 01 05 ORA M 01 02 06 ORI 8 - BIT DATA 02 02 07 XRA R 01 01 08 XRA M 01 01 09 XRI 8 - BIT DATA 01 02 10 CMP R 02 02 Table : Summary of Logical Group Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 25 / 41
  • 26. Logical Group Sr. No. Instruction No. of Bytes No. of Cycles 11 CMP M 01 01 12 CPI 8 - BIT DATA 03 02 13 RLC 02 02 14 RAL 01 03 15 RRC 01 01 16 RAR 01 03 17 CMA 01 01 18 CMC 01 01 19 STC 01 03 Table : Summary of Logical Group Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 26 / 41
  • 27. Branching Group 1. JMP 16 - bit address Unconditional Jump The program sequence is transferred to the memory location specified by the 16-bit address given in the operand. Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 27 / 41
  • 28. Branching Group 2. JCONDITION 16 bit address Conditional Jump The program sequence is transferred to the memory location specified by the 16-bit address given in the operand based on the specified flag as described below. (a) If the given condition in the instruction is satisfied then new number i.e. 16 bit address given along with the instruction is transferred to the program counter so microprocessor will jump to the location whose address given along with the instruction. (b) If the given condition in the instruction is not satisfied then new number i.e. 16 bit address given along with the instruction is not transferred to the program counter instead program counter is incremented by three (three byte instruction) so the next instruction is executed in the sequence. Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 28 / 41
  • 29. Branching Group... Instruction Description Flag status JC 16 - BIT ADDR Jump on carry CY = 1 JNC 16 - BIT ADDR Jump on no carry CY = 0 JZ 16 - BIT ADDR Jump on zero ZF = 1 JNZ 16 - BIT ADDR Jump on no zero ZF = 0 JPE 16 - BIT ADDR Jump on parity even PF = 1 JPO 16 - BIT ADDR Jump on parity odd PF = 0 JP 16 - BIT ADDR Jump on positive SF = 0 JM 16 - BIT ADDR Jump on minus SF = 1 Table : Conditional Jump Instruction Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 29 / 41
  • 30. Branching Group... 3. CALL 16 - BIT ADDR Unconditional Call to the subprogram 4. CCONDITION 16 - BIT ADDR Conditional Call to the subprogram Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 30 / 41
  • 31. Branching Group... Instruction Description Flag status CC 16 - BIT ADDR Call on carry CY =1 CNC 16 - BIT ADDR call on no carry CY = 0 CZ 16 - BIT ADDR Call on zero ZF = 1 CNZ 16 - BIT ADDR Call on no zero ZF = 0 CPE 16 - BIT ADDR Call on parity even PF = 1 CPO 16 - BIT ADDR Call on parity odd PF = 0 CP 16 - BIT ADDR Call on positive SF = 0 CM 16 - BIT ADDR Call on minus SF = 1 Table : Conditional Call Instruction Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 31 / 41
  • 32. Branching Group... 5. RET Return from subprogram / subroutine unconditionally 6. RCONDITION Return from subprogram / subroutine conditionally Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 32 / 41
  • 33. Branching Group... Instruction Description Flag status RC Return on carry CY = 1 RNC Return on no carry CY = 0 RZ Return on zero ZF = 1 RNZ Return on no zero ZF = 0 RPE Return on parity even PF = 1 RPO Return on parity odd PF = 0 RP Return on positive SF = 0 RM Return on minus SF = 1 Table : Conditional Return Instruction Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 33 / 41
  • 34. Branching Group... 7. PCHL Load program counter (PC) with HL contents 8. RSTn (n = 0 to 7) Restart The RST instruction is equivalent to a 1-byte call instruction to one of eight memory locations depending upon the number. The instructions are generally used in conjunction with interrupts and inserted using external hardware. However these can be used as software instructions in a program to transfer program execution to one of the eight locations. The addresses are: Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 34 / 41
  • 35. Branching Group... Instruction Restart Address RST 0 0000H RST 1 0008H RST 2 0010H RST 3 0018H RST 4 0020H RST 5 0028H RST 6 0030H RST 7 0038H Table : Conditional Return Instruction Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 35 / 41
  • 36. Branching Group Sr. No. Instruction No. of Bytes No. of Cycles 01 JMP 16 - BIT ADDRESS 03 03 02 JCONDITION 16- BIT ADDRESS 03 03 / 02 03 CALL 16 - BIT ADDRESS 03 05 04 CCONDITION 16 - BIT ADDRESS 03 05 / 02 05 RET 01 03 06 RCONDITION 01 03 / 01 07 PCHL 01 01 08 RSTn 01 03 Table : Summary of Branching Group Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 36 / 41
  • 37. Machine Control Group 1. NOP No operation 2. HLT Halt and enter wait state 3. DI Disable interrupts 4. EI Enable interrupts Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 37 / 41
  • 38. Machine Control Group... 5. SIM Set interrupt mask D7 D6 D5 D4 D3 D2 D1 D0 SOD SDE X R7.5 MSE M7.5 M6.5 M5.5 Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 38 / 41
  • 39. Machine Control Group... 5. RIM Read interrupt mask D7 D6 D5 D4 D3 D2 D1 D0 SID I7 I6 I5 IE M7.5 M6.5 M5.5 Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 39 / 41
  • 40. Machine Control Group Sr. No. Instruction No. of Bytes No. of Cycles 01 NOP 01 01 02 HLT 01 01 03 DI 01 01 04 EI 01 01 05 SIM 01 01 06 RIM 01 01 Table : Summary of Machine Control Group Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 40 / 41
  • 41. Thank you Please send your feedback at nbahadure@gmail.com For more details and updates kindly visit https://sites.google.com/site/nileshbbahadure/home Main Slide Dr. Nilesh Bhaskarrao Bahadure () Unit - II (Part - I) July 26, 2021 41 / 41