SlideShare a Scribd company logo
1 of 15
COMPUTER
ORGANISATION
• TOPIC:DATA TRANSFER
INSTRUCTIONS
• Group:- G2 BATCH:-B3
• MADE BY:15CP032-SIDDHAPURA ROMIL
15CP018-AHALPARA KEVAL
15CP033-KAVAIYA HIREN
1
8085 Microprocessor
2
• The microprocessor is a
programmable integrated
device that has computing and
decision making capability
similar to that CPU of a
computer.
• It is a multi-purpose,clock-
driven, register-based
electronic device.
LET’S BEGIN WITH MAIN DATA
TRANSFER INSTRUCTIONS
• One of the primarily functions of microprocessor is
copying data from source register to destination register.
• This copying function is labeled as data transfer
instructions.
• In fact, contents of the source are not transferred but are
copied into destination without modyfying the content of
source.
• The previous contents of destination are replaced by the
contents by the contents of the source.
• Several instruction are used to copy data which are
listed below:-
3
LIST OF DATA TRANSFER
INSTRUCTION
• MOV Rd,Rs:- Copies data from source register Rs to
destination register Rd.
• MVI R,8-bit:- Loads the 8-bit of the second byte into
the register specified.
• OUT 8-bit port address:- Sends the contents of the
accumulator (A) to the output port specified
in the second byte.
• IN 8-bit port address:-Accepts the data from the input
port specified in second byte ,and loads
into the accumulator.
4
“LHLD” INSTRUCTION
• LHLD stands for Load H and L Registers Direct .
• This instruction copies the contents of the memory
location pointed by the 16-bit address in register L and
copies the contents of the next memory location in
register H. The contents of source memory locations are
not altered.
• Flags:- The execution of LHLD instruction can not affect
the flags.
• Example:- Assume memory allocation 1050H contains
30H and 1051H contains 32H.This instruction transfer
memory contents to register pair HL.
5
• For above example Instruction :- LHLD 1050H
Hex code :- 2A 50 10
• Memory contents before instruction:-
• Registers contents after instruction:-
6
1050 30
1051 32
H 32
L 30
7
LHLD timing diagram
• In 1st Machine cycles, the 8085 microprocessor places
the address of memory loaction on the address bus and
fetches the opcode of LHLD instruction.
• The second machine cycle is read. In this machine cycle
processor places the address of next incremented
memory location and gets the low-order byte.
• The third machine cycle is also read. This machine cycle
also perform the same as second machine cycle and
gets the high-order byte instead of low-order byte.
• In the fourth machine cycle, contents of the memory
location pointed out by 16-bit address copies into
register L.
• In the fifth machine cycle, contents of the next memory
location copies into register H.
8
Number of bytes used in instruction:- 3
bytes
Total no. of machine cycles:- 5(F,R,R,R,R)
Total no. of clock cycles:-16
Addressing modes:-Register direct
9
“SHLD” INSTRUCTION
• SHLD stands for store H and L Registers Direct.
• The contents of register L are stored in the memory
location specified by the 16- bit address in the operand,
and the contents of H registers are stored in the next
memory location by incrementing the operand.
• Remember, the contents of the HL pair register are not
altered.
• This is also a 3-byte instruction. The second byte
specifies the low-order address and the third byte
specifies the high-order address.
10
• Flags:- No flags are affected.
• Example:-Assume the H and L registers contain 01H and
FFH, respectively at memory location 1050H and 1051H.
• Instruction:- SHLD 1050H Hex code:- 22 50 10
• Register contents before instruction:-
• Register and memory contents before instruction:-
11
H 01
L FF
1050 FF
1051 01
H 01
L FF
12
SHLD timing diagram
• In SHLD instruction, first 3 cycle is same as in described
in LHLD instruction.
• In SHLD instruction, 4th and 5th cycle will be write cycle.
• So, in 4th cycle, contents of the register L are stored in
the memory pointed by the address in operand, and
during 5th machine cycle,contents of the register H are
stored in next memory location.
13
Number of bytes used in instruction:- 3
bytes
Total no. of machine cycles:- 5
(F,R,R,W,W)
Total no. of clock cycles:-16
Addressing modes:-Register direct
14
15

More Related Content

What's hot

8086 pin details
8086 pin details8086 pin details
8086 pin detailsAJAL A J
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorMOHIT AGARWAL
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 MicroprocessorNahian Ahmed
 
Digital Clock Using Logic Gates
Digital Clock Using Logic GatesDigital Clock Using Logic Gates
Digital Clock Using Logic GatesJalpaMaheshwari1
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacingdeval patel
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051hello_priti
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085yedles
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorVikas Gupta
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessorhepzijustin
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesSrikrishna Thota
 
8086 modes
8086 modes8086 modes
8086 modesPDFSHARE
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1techbed
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 

What's hot (20)

8086 pin details
8086 pin details8086 pin details
8086 pin details
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Digital Clock Using Logic Gates
Digital Clock Using Logic GatesDigital Clock Using Logic Gates
Digital Clock Using Logic Gates
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
8051 block diagram
8051 block diagram8051 block diagram
8051 block diagram
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
 
Stack in 8085 microprocessor
Stack in 8085 microprocessorStack in 8085 microprocessor
Stack in 8085 microprocessor
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
8086 modes
8086 modes8086 modes
8086 modes
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 

Similar to SHLD and LHLD instruction

Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture IIDr.YNM
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085Sumit Swain
 
Chapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional InstructionsChapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional Instructionscmkandemir
 
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptxlec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptxMadavanR1
 
3-addressingmodes-181203034235.pptx
3-addressingmodes-181203034235.pptx3-addressingmodes-181203034235.pptx
3-addressingmodes-181203034235.pptxMdAsaduzzaman257266
 
8085-instruction.ppt
8085-instruction.ppt8085-instruction.ppt
8085-instruction.pptSudeshnaDey22
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptxMemonaMemon1
 
Basic computer organization and design
Basic computer organization and designBasic computer organization and design
Basic computer organization and designmahesh kumar prajapat
 
Machine cycles
Machine cyclesMachine cycles
Machine cyclesWafaAbied
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).pptKanikaJindal9
 
Assembly Language Paper.docx
Assembly Language Paper.docxAssembly Language Paper.docx
Assembly Language Paper.docxwrite22
 
Advanced Embedded Automatic Car Parking System
	Advanced Embedded Automatic Car Parking System	Advanced Embedded Automatic Car Parking System
Advanced Embedded Automatic Car Parking Systemtheijes
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecturedeval patel
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085ShivamSood22
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollerchirag patil
 

Similar to SHLD and LHLD instruction (20)

Microprocessor architecture II
Microprocessor architecture   IIMicroprocessor architecture   II
Microprocessor architecture II
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
EC203DSD - Module 5 - 3.ppt
EC203DSD - Module 5 - 3.pptEC203DSD - Module 5 - 3.ppt
EC203DSD - Module 5 - 3.ppt
 
Chapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional InstructionsChapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional Instructions
 
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptxlec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
 
3-addressingmodes-181203034235.pptx
3-addressingmodes-181203034235.pptx3-addressingmodes-181203034235.pptx
3-addressingmodes-181203034235.pptx
 
8085-instruction.ppt
8085-instruction.ppt8085-instruction.ppt
8085-instruction.ppt
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptx
 
Basic computer organization and design
Basic computer organization and designBasic computer organization and design
Basic computer organization and design
 
Machine cycles
Machine cyclesMachine cycles
Machine cycles
 
8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt8085_Microprocessor(simar).ppt
8085_Microprocessor(simar).ppt
 
Unit iii
Unit iiiUnit iii
Unit iii
 
Assembly Language Paper.docx
Assembly Language Paper.docxAssembly Language Paper.docx
Assembly Language Paper.docx
 
Advanced Embedded Automatic Car Parking System
	Advanced Embedded Automatic Car Parking System	Advanced Embedded Automatic Car Parking System
Advanced Embedded Automatic Car Parking System
 
Lec04
Lec04Lec04
Lec04
 
Lec04
Lec04Lec04
Lec04
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecture
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 

Recently uploaded

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 

Recently uploaded (20)

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 

SHLD and LHLD instruction

  • 1. COMPUTER ORGANISATION • TOPIC:DATA TRANSFER INSTRUCTIONS • Group:- G2 BATCH:-B3 • MADE BY:15CP032-SIDDHAPURA ROMIL 15CP018-AHALPARA KEVAL 15CP033-KAVAIYA HIREN 1
  • 2. 8085 Microprocessor 2 • The microprocessor is a programmable integrated device that has computing and decision making capability similar to that CPU of a computer. • It is a multi-purpose,clock- driven, register-based electronic device.
  • 3. LET’S BEGIN WITH MAIN DATA TRANSFER INSTRUCTIONS • One of the primarily functions of microprocessor is copying data from source register to destination register. • This copying function is labeled as data transfer instructions. • In fact, contents of the source are not transferred but are copied into destination without modyfying the content of source. • The previous contents of destination are replaced by the contents by the contents of the source. • Several instruction are used to copy data which are listed below:- 3
  • 4. LIST OF DATA TRANSFER INSTRUCTION • MOV Rd,Rs:- Copies data from source register Rs to destination register Rd. • MVI R,8-bit:- Loads the 8-bit of the second byte into the register specified. • OUT 8-bit port address:- Sends the contents of the accumulator (A) to the output port specified in the second byte. • IN 8-bit port address:-Accepts the data from the input port specified in second byte ,and loads into the accumulator. 4
  • 5. “LHLD” INSTRUCTION • LHLD stands for Load H and L Registers Direct . • This instruction copies the contents of the memory location pointed by the 16-bit address in register L and copies the contents of the next memory location in register H. The contents of source memory locations are not altered. • Flags:- The execution of LHLD instruction can not affect the flags. • Example:- Assume memory allocation 1050H contains 30H and 1051H contains 32H.This instruction transfer memory contents to register pair HL. 5
  • 6. • For above example Instruction :- LHLD 1050H Hex code :- 2A 50 10 • Memory contents before instruction:- • Registers contents after instruction:- 6 1050 30 1051 32 H 32 L 30
  • 8. • In 1st Machine cycles, the 8085 microprocessor places the address of memory loaction on the address bus and fetches the opcode of LHLD instruction. • The second machine cycle is read. In this machine cycle processor places the address of next incremented memory location and gets the low-order byte. • The third machine cycle is also read. This machine cycle also perform the same as second machine cycle and gets the high-order byte instead of low-order byte. • In the fourth machine cycle, contents of the memory location pointed out by 16-bit address copies into register L. • In the fifth machine cycle, contents of the next memory location copies into register H. 8
  • 9. Number of bytes used in instruction:- 3 bytes Total no. of machine cycles:- 5(F,R,R,R,R) Total no. of clock cycles:-16 Addressing modes:-Register direct 9
  • 10. “SHLD” INSTRUCTION • SHLD stands for store H and L Registers Direct. • The contents of register L are stored in the memory location specified by the 16- bit address in the operand, and the contents of H registers are stored in the next memory location by incrementing the operand. • Remember, the contents of the HL pair register are not altered. • This is also a 3-byte instruction. The second byte specifies the low-order address and the third byte specifies the high-order address. 10
  • 11. • Flags:- No flags are affected. • Example:-Assume the H and L registers contain 01H and FFH, respectively at memory location 1050H and 1051H. • Instruction:- SHLD 1050H Hex code:- 22 50 10 • Register contents before instruction:- • Register and memory contents before instruction:- 11 H 01 L FF 1050 FF 1051 01 H 01 L FF
  • 13. • In SHLD instruction, first 3 cycle is same as in described in LHLD instruction. • In SHLD instruction, 4th and 5th cycle will be write cycle. • So, in 4th cycle, contents of the register L are stored in the memory pointed by the address in operand, and during 5th machine cycle,contents of the register H are stored in next memory location. 13
  • 14. Number of bytes used in instruction:- 3 bytes Total no. of machine cycles:- 5 (F,R,R,W,W) Total no. of clock cycles:-16 Addressing modes:-Register direct 14
  • 15. 15