Monday, 17 June 2013

50. BLOCK INTERCHANGE IN 8086


DATA SEGMENT
X DB 01H,02H,03H,04H,05H
Y DB 11H,12H,13H,14H,15H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:MOV AX,DATA
MOV DS,AX
MOV CX,05H
LEA SI,X
LEA DI,Y
UP: MOV BL,[SI]
MOV AL,[DI]
MOV [SI],AL
MOV [DI],BL
INC SI
INC DI
DEC CX
JNZ UP
MOV AH,4CH
INT 21H
CODE ENDS
END START


Need the code??

No comments:

Post a Comment