

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
8086 program to transfer a block of 4 bytes by using string instructions
In this program we will see how to transfer a 4-byte block from one location to another location.
Problem Statement
Write 8086 Assembly language program to transfer a four-byte block from one memory section to another memory section. The numbers are stored at memory offset 500 – 503.
Discussion
Here we are initially setting up the source index register with the source of data blocks, then set the destination index register to store into another block. Then set the Data segment register and Extra Segment register to 0000H. By using MOVSB instruction, the entire block is transferred from one location to another. As the size is 4-byte, we have set the counter register (CX) as 04H. Until the CX register turns to 0, the data will be shifted.
Input
Address | Data |
---|---|
… | … |
500 | 1A |
501 | 2B |
502 | 3C |
503 | 4D |
… | … |
Flow Diagram
Program
Output
Address | Data |
---|---|
… | … |
600 | 1A |
601 | 2B |
602 | 3C |
603 | 4D |
… | … |
- Related Questions & Answers
- 8086 program to transfer a block of bytes by using string instruction
- Program execution transfer instructions in 8086 microprocessor
- Data transfer instructions in 8086 microprocessor
- String manipulation instructions in 8086 microprocessor
- 8085 program to exchange a block of bytes in memory
- 8085 program to transfer a block in reverse order
- Arithmetic instructions in 8086 microprocessor
- Logical instructions in 8086 microprocessor
- Process control instructions in 8086 microprocessor
- 8086 program to search a number in a string
- Create a block element with Bootstrap 4
- Bootstrap 4 .d-block class
- Convert bytes to a string in java
- Java Program to get the Characters in a String as an Array of Bytes
- d-*-block class in Bootstrap 4
Advertisements