I need two very basic, simple programs for my homework. These are exercises from Kip Irvine's book Assembly Language for x86 Processors.
1: Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers. Write a test program that calls your GCD procedure five times, using the following pairs of integers (5,20) (24,18) (11,7) (432,226) (26,13). After each procedure call, display the GCD.
2: Create an array of randomly ordered integers. Using the Swap procedure below as a tool, write a loop that exchanges each consecutive pair of integers in the array.
Swap PROC USES eax esi edi,
mov esi, pValX
mov edi, pValY
mov eax, [esi]
xchg eax, [edi]
mov [esi], eax
I don't know why it didn't take, but because these are simple programs the budget is $15 each program. Not in the $250 range. Sorry.