data segment
x db ?;?为随意值
y db ?;?为随意值
sum db 0
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov al,x
mov dl,y
cmp al,dl
jl samll
next:
sub al,dl
mov sum,al
mov ah,4ch
int 21h
samll:
xchg al,dl
jmp next
code ends
end start