Professional Documents
Culture Documents
Micro Project
Micro Project
Micro Project
DATA SEGMENT
ARR DB 15,12,18,13,19,16,14,20,11,17
LEN DW $-ARR
DATA ENDS
CODE SEGMENT
START:
MOV AX,DATA
MOV DS,AX
MOV CX,LEN-1
OUTER:
LEA SI,ARR
MOV BX,0
INNER:
INC BX
MOV AL,ARR[SI]
INC SI
CMP ARR[SI],AL
JB SKIP
XCHG AL,ARR[SI]
MOV ARR[SI-1],AL
SKIP:
CMP BX,CX
JL INNER
LOOP OUTER
MOV AH,4CH
INT 21H
CODE ENDS
END START
First Line – DATA SEGMENT
ARR DB 15,12,18,13,19,16,14,20,11,17
LEN DW $-ARR
DATA ENDS
In the Program, We are entering the values for the variables and
Do arithmetical Operations like Addition, Subtraction,
Multiplication and Division So the Computer should understand
which kind of Number is entered. Hence there is a different
letters for different Number Systems. O or o stands for Octal,
H or h stands for Hexadecimal, B or b stands
for Binary, D or d stands for Decimal. By default type of
numbering system is Decimal. If you do not specify any letter
then the number is understood to be Decimal (By default).
Explanation :