assume ds:data,cs:code
start: push ds
mov ax,0
push ax
mov ax,data
mov ds,ax
mov si,0
mov al,data1[si]
inc si
cmp al,data1[si]
JL next2
next1: inc si
cmp al,data1[si]
JL next3
jmp over
next2: mov al,data1[si]
jmp next1
next3: mov al,data1[si]
over: mov max,al
ret
main endp
code ends
end start 再转化为目标文件,通过连接程序使其成为可执行文件,最后调试结果如下图sy-2
五、实验结果