The following code is trying to invoke function4.  The code…

The following code is trying to invoke function4.  The code builds and runs but has a logic flaw.  Please select the reason why the code is flawed. program sample4;#include( “stdlib.hhf” );static iDataValue1 : int32 := 0;procedure function4( n : int32; x : int32 ); @nodisplay; @noframe;static returnAddress : dword;begin function4;  EntrySequence: pop( returnAddress ); pop( x ); pop( n ); push( returnAddress ); jmp ExitSequence; ExitSequence: ret( );end function4;begin sample4; stdout.put( “Gimme a value: ” ); stdin.get( iDataValue1 ); push( iDataValue1 ); call function4; EndProgram: stdout.put( “Done! ” );end sample4;

The following code is trying to invoke the FPU to calculate…

The following code is trying to invoke the FPU to calculate the square root of (x*y + y squared).  The code has a problem.  Please select the problem with the code. program FPUFlaw4;#include( “stdlib.hhf” );static   x : int32;   y : int32;   answer : real32;begin FPUFlaw4;  stdout.put( “Gimme x: ” );  stdin.get( x );  stdout.put( “Gimme y: ” );  stdin.get( y ); finit();  fld( x );           fld( y );          fmul();  fld( y );        fld( y );           fmul();            fadd();          fsqrt();                fstp( answer );          stdout.put( answer );end FPUFlaw4;

The following code is trying to invoke function1.  The code…

The following code is trying to invoke function1.  The code has a problem.  Please select the problem with the code. program sample1;#include( “stdlib.hhf” );static iDataValue1 : int32 := 0;procedure function1( n : int32; x : int32 ); @nodisplay; @noframe;static returnAddress : dword;begin function1;  EntrySequence: pop( returnAddress ); pop( n ); pop( x ); push( returnAddress ); jmp ExitSequence; ExitSequence: ret( );end function1;begin sample1; stdout.put( “Gimme n: ” ); stdin.get( iDataValue1 ); push( iDataValue1 ); stdout.put( “Gimme x: ” ); stdin.get( iDataValue1 ); push( iDataValue1 ); call function1; EndProgram: stdout.put( “Done! ” );end sample1;

The following code is trying to invoke function2.  The code…

The following code is trying to invoke function2.  The code does not build or run.  Please select the reason why the code does not build. program sample2;#include( “stdlib.hhf” );static iDataValue1 : int32 := 0;procedure function2( n : int32 ); @nodisplay; @noframe;static returnAddress : dword;begin function2;  EntrySequence: pop( returnAddress ); pop( n ); push( returnAddress ); jmp ExitSequence; ExitSequence: jmp EndProgram; ret();end function2;begin sample2; stdout.put( “Gimme a value: ” ); stdin.get( iDataValue1 ); push( iDataValue1 ); call function2; EndProgram: stdout.put( “Done! ” );end sample2;

The following code is trying to invoke the FPU to calculate…

The following code is trying to invoke the FPU to calculate the square root of (x*y + y squared).  The code has a problem.  Please select the problem with the code. program FPUFlaw1;#include( “stdlib.hhf” );static   x : real32;   y : real32;   answer : real32;begin FPUFlaw1;  stdout.put( “Gimme x: ” );  stdin.get( x );  stdout.put( “Gimme y: ” );  stdin.get( y ); mov( x, EAX ); finit(); fld( EAX ); mov( y, EAX );         fld( EAX );         fmul();  fld( y );        fld( y );           fmul();            fadd();          fsqrt();                fstp( answer );          stdout.put( answer );end FPUFlaw1;