Not sure why you made main
a PROC
. There's also a possibility that, due to how you've ordered your code, it will proceed with executing gcd
again after reaching the end of main
(I don't have MASM handy on this machine to verify this).
I'd structure the program like this:
INCLUDE Irvine32.inc
.data
.code
gcd PROC
; gcd implementation omitted for brevity..
ret
gcd ENDP
main:
mov eax, 75
mov ebx, 18
call gcd
END main