Code:
; PROGRAM TO TRANSFER BLOCK USING STRING INSTRUCTION
.MODEL SMALL
.STACK 100H
.DATA
ARR1 DW 1111H , 2222H , 3333H , 4444H , 5555H
ARR2 DW 5 DUP(?)
.CODE
MOV AX , @DATA ;INITIALING DATA SEGEMENT
MOV DS , AX
MOV ES , AX ; INITIALING EXTRA SEGMENT
MOV CX , 5 ; INITIALING LOOP COUNTER
LEA SI , ARR1 ; LOADING EFFECTIVE ADDRESS
LEA DI , ARR2
UP:
MOVSW ; TRANSFER WORD FROM SOURCE TO DESTINATION
LOOP UP
MOV AH , 4CH ; EXIT
INT 21H
END
; PROGRAM TO TRANSFER BLOCK USING STRING INSTRUCTION
.MODEL SMALL
.STACK 100H
.DATA
ARR1 DW 1111H , 2222H , 3333H , 4444H , 5555H
ARR2 DW 5 DUP(?)
.CODE
MOV AX , @DATA ;INITIALING DATA SEGEMENT
MOV DS , AX
MOV ES , AX ; INITIALING EXTRA SEGMENT
MOV CX , 5 ; INITIALING LOOP COUNTER
LEA SI , ARR1 ; LOADING EFFECTIVE ADDRESS
LEA DI , ARR2
UP:
MOVSW ; TRANSFER WORD FROM SOURCE TO DESTINATION
LOOP UP
MOV AH , 4CH ; EXIT
INT 21H
END