ASSUME CS:CODE, DS:DATA
org 100h
DATA SEGMENT
	LIST DB 1H,5H,3H
	COUNT EQU 03H 
	MAX DB 01H DUP(?)
DATA ENDS
CODE SEGMENT
	START:
		MOV AX,DATA
		MOV DS,AX
		MOV SI,OFFSET LIST
		MOV CL, COUNT 
		MOV AL, [SI] 
	AGAIN:
		CMP AL,[SI+1]
		JNL NEXT
		MOV AL,[SI+1]
	NEXT:
		INC SI
		DEC CL
		CMP CL,0H
		JG AGAIN
		mov bl,al
		MOV AH, 4CH 
		mov al,0H
		INT 21H 
	CODE ENDS
END START
