loops - How do I program a greatest common divisor program is 80x86 assembly? -
I know that there are different ways to find two numbers GCD, but I want to know the best Ordinances have been ordered and how do I apply the method in this program? Even what I have so far: .586 .MODEL FLAT is included io.h; Header file for input / output. STACK 4096 .DATA number1 DWORD? Number 2 DWORD? Prompt1 byte "Enter an integer for x", 0 prompt2 byte "Enter an integer for Y", 0 string byte 40 DUP (?) ResultLbl byte is "the largest common denominator of x and y", 0 gcd byte 11 dup , 0 .CODE _MainProc PROC input prompt1, string, 40 atod string mov number 1, eax input prompt2, string, 40 atod string mov number 2, EDX mov eax, number 1 mov EDX, number 2 get_gcd (?): Xchg eax, EDX CMP eax, EDX JB Get_GCD sub eax, EDX test EDX, EDX JNZ Get_GCD retired dtoa gcd, EDX output resultLbl, gcd mov eax, 0 mov EDX, 0 retired _MainProc ENDP the ending; End of source code I run it and nothing happens. Remove the ANT after jnz Get_GCD and before dETO...