- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
8085 program to move blocks of bits from source location to a destination location
Problem Statement − Move a block of 16 data stored from 8050H to 805FH to a target location from 8070F to 807FH.
|START:||LXI H, 8050H||10||Setup HL pair as a pointer for source memory.|
|LXI D, 8070H||10||Set up DE pair as a pointer for destination memory|
|MVI B, 10H||7||Set up B to count 16 bytes|
|8008||7E||LOOP:||MOV A, M||7||Get data byte from source.|
|8009||12||STAX D||7||Store data byte as destination|
|800A||23||INX H||6||Point HL to next source location|
|800B||13||INX D||6||Point DE to next destination|
|800C||05||DCR B||4||Decrement count|
|JNZ LOOP||10||If counter is not 0, go back to transfer next byte.|
|Total 17 Bytes||Total 69 T-States|
Total T-States = TOutside_loop + TInside_loop
TOutside_loop = (10+10+7+5) = 32
TInside_loop = ((7+7+6+6+4+10) * 16 - 3) = (40 * 16 - 3) = 637
so Total T-States = 32 + 637 = 669
The Main program is started from location 8000H – 8010H.
Source Data Block from 8050H – 805FH.
Destination block from 8070H – 807FH
- How to copy items from one location to another location using PowerShell?
- How OSPF routes the packets from source to destination?
- Program to find lexicographically smallest string to move from start to destination in Python
- Possible walks from a source to a destination with exactly k edges
- Print all paths from a given source to a destination in C++
- How to use Location API in Android to track your current location?
- How to use Push-Location and Pop-Location command in PowerShell?
- Concatenating n characters from source string to destination string in C
- Print all paths from a given source to a destination using BFS in C++
- Pull a list of Functional Location from SAP using BAPI
- How to use Location API in Android to track your current location using Kotlin?
- C++ program to find out the minimum amount of time needed to reach from source to destination station by train
- Python Pandas - How to select rows from a DataFrame by integer location
- Count all possible walks from a source to a destination with exactly k edges in C++
- 8085 Program to Add N numbers, of size 8 bits