📄 最大公约数.asm
字号:
INCLUDE Irvine32.inc
.data
a byte "please input x:",0
b byte "please input y:",0
d byte "the gongyueshu is:",0
.code
main proc
mov edx,offset a
call writestring
call readint
mov ebx,eax
mov edx,offset b
call writestring
call readint
.if eax>ebx
cdq
div ebx
cmp edx,0
jne l1
mov edx,offset d
call writestring
mov eax,ebx
call writeint
.elseif eax<ebx
xchg eax,ebx
cdq
div ebx
cmp edx,0
jne l1
mov edx,offset d
call writestring
mov eax,ebx
call writeint
.elseif eax==ebx
mov edx,offset d
call writestring
call writeint
.endif
exit
l1:
mov eax,ebx
mov ebx,edx
cdq
div ebx
cmp edx,0
jne l1
mov edx,offset d
call writestring
mov eax,ebx
call writeint
exit
main endp
end main
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -