On the 80x86 CPU, pоinter vаriаbles аre 64-bit values.
Hоw mаny bits оf stаck memоry аre used when passing an int16 variable by-reference to a function?
Creаte аn HLA functiоn thаt fоrces a value intо a passed parameters under certain circumstances. The parameters are being passed by-reference and are intended to change the value of caller’s variables. This function should have the following signature:procedure makeOddByAddingOne( var i : int16 );@nodisplay; @noframe;After calling this function, the value of the driver’s variables should be set to an odd value equal to one more that it started with if it was originally an even value. Your function should replicate the following C code: void makeOddByAddingOne( int * i ){ int value = *i; // after enough subtractions, value will be either 2 or 1 while (value > 2) { value = value - 2; } // now value is either 2 or 1 // was i originally even?? if so, then add one if (value == 2) { value = *i; value = value + 1; *i = value; }} IN ORDER TO RECEIVE FULL CREDIT, YOU MUST USE THE TEMPLATE SOLUTION SUPPLIED BELOW> Of course, you will need to add code to the function to implement the desired algorithm explained above. In addition, you will need to prepare and push the parameters to the function.// Reference Parameter Template Solution For CS 17 Final// CS 17 Students must use this template as the basis for their solution. // I hope it will help simplify your development task.// Please look at the two TODO: notes belowprogram ReferenceProgram ;#include( "stdlib.hhf" );staticiValue1 : int16 := 0; // TODO: CS 17 Students add code below to implement this function// Several hints are suppliedprocedure makeOddByAddingOne( var i : int16 );@nodisplay; @noframe;staticdReturnAddress : dword;begin makeOddByAddingOne; // entry sequence// preserve registers usedpop( dReturnAddress ); // this is the return address // process the passed reference parameters // push back the return addresspush( dReturnAddress ); // preserve registers // begin sub-task // restore the registers used ret(); end makeOddByAddingOne; begin ReferenceProgram ; stdout.put( "gimme a value: " );stdin.get( iValue1 );// TODO: push parameters to the function.// Please remember that these parameters must be passed by-reference.call makeOddByAddingOne; stdout.put( "after makeOddByAddingOne!" );stdout.newln();stdout.put( "iValue1 = " );stdout.put( iValue1 );stdout.newln(); end ReferenceProgram ;