[求助] 求最小偶数?//
哪位高手帮忙改改以下的程序,本人将万分感谢!!!!!!!!!!!
急需正确的答案啊~~~~~~~~~~
data1 segment
data dw 12,8,85,78,56,128,37,32,545,238
data1 ends
code segment
assume ds:data1,cs:code
start:
mov ax,data1
mov ds,ax
mov cx,10
lea bx,data
lll:
mov ax,[bx]
shr ax,1
jc ll ;判断是否为偶数
mov ax,[bx]
mov [si],ax
add si, 2
ll:
add bx,2
loop lll
mov ax,[bx]
cmp ax,[bx+2]
jb lll
ja loop1
mov ah,ax
mov ah,02h
int 21h
loop1:
mov ax,[bx+2]
exit:
mov ah,4ch
int 21h
code ends
end start