三个数比较大小
data segment
ad1 db 8h
ad2 db 4h
ad3 db 1h
data ends
code segment
assume cs:code,ds:data
main:
mov ax,data
mov ds,ax
mov al,ad1
mov bl,ad2
mov cl,ad3
cmp al,bl
jnc next1
xchg al,bl
next1: cmp al,cl
jnc next2
xchg al,cl
next2: cmp bl,cl
jnc next3
xchg bl,cl
next3:
add al,30h
add bl,30h
add cl,30h
mov dl, al
mov ah, 2
int 21h
mov dl, bl
mov ah, 2
int 21h
mov dl, cl
mov ah, 2
int 21h
mov ah,4Ch;终止当前程序并返回调用程序
int 21h
code ends
end main