Question: All programs must assemble and run without error 1 . ( 1 0 marks ) Convert the following pseudo - code to assembly. For local

All programs must assemble and run without error
1.(10 marks) Convert the following pseudo-code to assembly. For local variables, either use the stack or registers. Use the stdcall convention for stack cleanup. Do NOT use memory variables, except for the strings.
function gcd(unsigned int a, unsigned int b)
if b =0
return a
else
return gcd(b, a mod b)
function main()
println( "Enter a number: ");
unsigned int x = getDecimal();
println( "Enter a number: ");
unsigned int y = getDecimal();
unsigned int result = gcd( x, y );
Display( "The GCD of "+ x +" and "+ y +" is "+ result );

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!