data segment
a dw 0307h,0802h,0605h,0909h,0506h,0103h,0401h,0808h,0702h,0105h
data ends
code segment
main proc far
assume cs:code,ds:data
start:
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
mov cx,10
dec cx
loop1: mov di,cx
mov bx,0
loop2: mov ax,a[bx]
cmp ax,a[bx+2]
jge continue
xchg ax,a[bx+2]
mov a[bx],ax
continue:add bx,2
loop loop2
mov cx,di
loop loop1
lea bx,a
mov cx,10
k: mov dl,[bx+1]
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载