Friday, June 19, 2020

8086 Assembly Language Program for Block transfer Simple program


The transfer of block of data from source to memory location to destination memory location. we require 2 counters i.e., one counter for decremeting (source to destination) and other for incrementing other counter after transfer of the data. make sure that the counter is equal to data block length. 
We use MOV/MOVS/MOVSB/MOVSW instruction for block transfer.

data segment
blk1 bd 10 dup (?)
blk2 db 10 dup(?)
data ends
code segment
start : assume  cs :code,  ds :data
mov ax , data
mov ds ,ax
lea si ,blk1
lea di , blk2
mov cl , 0ah
up: mov al ,[si]
mov [di] ,al
inc di
inc si
dec cl
jnz up
mov ah ,4ch
int 21h
code ends
end start



Programs:-


For many other Assembly Language  Programs related to microprocessor 8086 visit our  BLOG 

There are programs of largest ,smallest ,division ,multiplication,odd/even,block operation ,string operations,BCD ,etc


No comments:

Post a Comment