Code:
; PROGRAM TO TRANSFER BLOCK WITHOUT USING STRING INSTRUCTION
.MODEL SMALL
.STACK 100H
.DATA
B1 DW 2110H , 3112H , 4113H , 5114H , 6115H
B2 DW 5 DUP(0) ;EMPTY ARRAY
.CODE
MOV AX , @DATA ; INITIALIZING DATA SEGMENT
MOV DS , AX
MOV CX , 5 ; INITALIZING LOOP COUNTER
MOV SI , OFFSET B1
MOV DI , OFFSET B2
UP:
MOV AX , [SI] ; COPYING B1 TO B2
MOV [DI] , AX
ADD SI , 2 ; INCREMENTING THE INDEX
ADD DI , 2
LOOP UP ; DECREMENT CX IF == 0 THEN EXIT
MOV AH , 4CH ; SERVICE ROUTINE FOR EXIT
INT 21H
END
; PROGRAM TO TRANSFER BLOCK WITHOUT USING STRING INSTRUCTION
.MODEL SMALL
.STACK 100H
.DATA
B1 DW 2110H , 3112H , 4113H , 5114H , 6115H
B2 DW 5 DUP(0) ;EMPTY ARRAY
.CODE
MOV AX , @DATA ; INITIALIZING DATA SEGMENT
MOV DS , AX
MOV CX , 5 ; INITALIZING LOOP COUNTER
MOV SI , OFFSET B1
MOV DI , OFFSET B2
UP:
MOV AX , [SI] ; COPYING B1 TO B2
MOV [DI] , AX
ADD SI , 2 ; INCREMENTING THE INDEX
ADD DI , 2
LOOP UP ; DECREMENT CX IF == 0 THEN EXIT
MOV AH , 4CH ; SERVICE ROUTINE FOR EXIT
INT 21H
END