把一个100D个字的DATA区里的最小偶数找出来,区里的数是我编程序时自己设好的,大家可以改一下啊! data_seg segment DATA dw 99,100,98 dup(7) TEMP dw 100(?)data_seg endscode_seg segment assume cs:code_seg,ds:data_segstart: mov ax,data_seg mov ds,ax mov cx,100 mov bx,0 mov ax,0 mov si,axagain: mov dx,DATA[si] and dx,1h jnz continue mov TEMP[si],dxcontinue: inc bx add si,2 loop again mov cx,bx mov ax,0 mov si,ax mov dx,TEMP[si]cycle: cmp dx,TEMP[si+1] jae next mov dx,TEMP[si+1]next: add si,2 loop next mov ,ah,2 int 21hcode_seg endsend start

评论