展开全部
data segment
num1 db ?
num2 db ?
out01 db 'please input num1 and num2:','$'
out02 db 'output num by chengxu:','$'
data ends
code segment
assume ds:data,cs:code
start: mov ax,data
mov ds,ax
lea dx,out01 ;显示please input num1 and mum2:','$'
mov ah,09h
int 21h
mov ah,01h
int 21h
mov num1,al ;输入第一个数
mov ah,01h
int 21h
mov num2,al ;输入第二个数
cmp num1,num2
ja jump00;比较两个数字的大小
jmp jump01 ;如果相等则转到jump01处
lea dx,out02
mov ah,09h
int 21h
jump00:
mov ah,02h
mov dl,num1
int 21h
jmp jend
jump01:
mov ah,02h
mov dl,num1
int 21h
jmp jend
jend:
mov ax,4c00h
int 21h
code ends
end start
num1 db ?
num2 db ?
out01 db 'please input num1 and num2:','$'
out02 db 'output num by chengxu:','$'
data ends
code segment
assume ds:data,cs:code
start: mov ax,data
mov ds,ax
lea dx,out01 ;显示please input num1 and mum2:','$'
mov ah,09h
int 21h
mov ah,01h
int 21h
mov num1,al ;输入第一个数
mov ah,01h
int 21h
mov num2,al ;输入第二个数
cmp num1,num2
ja jump00;比较两个数字的大小
jmp jump01 ;如果相等则转到jump01处
lea dx,out02
mov ah,09h
int 21h
jump00:
mov ah,02h
mov dl,num1
int 21h
jmp jend
jump01:
mov ah,02h
mov dl,num1
int 21h
jmp jend
jend:
mov ax,4c00h
int 21h
code ends
end start
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询