;;CHECK RESULT IN DS:0000
;;LAB 8
DATA SEGMENT
DATA1 DB 08H,03H,06H,01H,09H,10H,7H,4H,00H,02H,5H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV CX,10
UP:
LEA SI,DATA1
MOV BX,CX
UP2:
MOV AL,[SI]
MOV DL,[SI+1]
CMP AL,DL
JB SKIP
MOV [SI],DL
MOV [SI+1],AL
SKIP:
INC SI
DEC BX
JNZ UP2
DEC CX
JNZ UP
INT 3H
CODE ENDS
END START
END
Comments
Post a Comment