0
8.4kviews
Write program to find out largest number in an array.

Mumbai University > Electronics and Telecommunication > Sem 4 > Microprocessor and peripherals

Marks: 10M

Year: Dec 2014

1 Answer
0
1.1kviews
DATA SEGMENT
ARR DB 1, 4, 2, 3, 9, 8, 6, 7, 5, 10
LEN DW $-ARR
LARGE DB? 
DATA ENDS
CODE SEGMENT 
ASSUME DS: DATA CS: CODE
START:
    MOV AX, DATA
    MOV DS, AX
    LEA SI, ARR
    MOV AL, ARR [SI]
    MOV LARGE, AL
    MOV CX, LEN
REPEAT: 
    MOV AL, ARR [SI]
    CMP LARGE, AL
    JG NOCHANGE
    MOV LARGE, AL
NOCHANGE:
    INC SI
    LOOP REPEAT
    MOV AH, 4CH
    INT 21H     
CODE ENDS
END START
Please log in to add an answer.