Question
The main routine should: accept, from the user, two positive integers, call the gcd subroutine, and display the results.
The gcd subroutine should: recursively find the greatest common divisor of the two integers using the Euclidean Algorithm.
Note: There are ways to find the greatest common divisor of two numbers iteratively, but that is not the point of this assignment. Your program should use a recursive subroutine.
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
num1 DWORD ? ;This is the number one.num2 DWORD ? ;This is number two
string BYTE 40 DUP (?) ;This is to hold the number by the user.
.CODE ; Begin code segment
_main PROC ; Beginning of code
input PROMPT1, string, 40 ;gets the string
atod string ;This is converting the string to an integer
mov num1,eax ; move value to memory...