多个数比较大小
data segment
buffer db 2,8,9,5,4,0
data ends
code segment
assume cs:code,ds:data
main:
mov ax,data
mov ds,ax
mov si, offset buffer
mov al,[si]
again: or al,al
jz ok
mov bl,[si]
or bl,bl
jz ok
inc si
cmp al, bl
jnc next
xchg al,bl
next: jmp again
ok: add al,30h
mov dl, al;显示
mov ah, 2
int 21h
mov ah,4Ch;终止当前程序并返回调用程序
int 21h
code ends
end main