In accordance with Federal Requirements, 2 absences will result in a withdrawal from the course.
Blog
PKU screening is important because early detection allows fo…
PKU screening is important because early detection allows for:
For LINE # 1, what part of the program is responsible for pu…
For LINE # 1, what part of the program is responsible for pushing the data onto the stack that this line pops?
Line 2 originally says: jmp endLoop; // Line 2 For the purp…
Line 2 originally says: jmp endLoop; // Line 2 For the purposes of this question only, suppose I decide to rewrite that statement as: jmp bodyLoop; // Revised Line 2 With this change in place, for the input: happy holiday what will be the value printed by the second call to puts?
Which CLIA-waived test is commonly used to detect pregnancy?
Which CLIA-waived test is commonly used to detect pregnancy?
What is the primary purpose of the PKU (phenylketonuria) tes…
What is the primary purpose of the PKU (phenylketonuria) test?
Line 3 originally says: push( CX ); // Line 3 For the purpo…
Line 3 originally says: push( CX ); // Line 3 For the purposes of this question only, suppose I decide to rewrite that instruction as: push( 80 ); // Revised Line 3 With this change in place, what will happen?
Your team’s meetings feel unproductive. Which change most di…
Your team’s meetings feel unproductive. Which change most directly addresses this?
The next few questions deal with the following program and i…
The next few questions deal with the following program and its implementation. Some of the code is identified with line numbers that will be referenced in later questions. program StringProgram;#include( “stdlib.hhf” );#include( “cs17string.hla” ); static stringData : dword;procedure xOut( stringData : dword; searchFor : byte ); @nodisplay; @noframe;static dReturnAddress : dword; dCXRegister : word; dEBXRegister : word; data : byte := ‘x’; // line 1begin xOut;// the next two statements are section 2 mov( CX, dCXRegister ); mov( EBX, dEBXRegister ); pop( dReturnAddress ); pop( CX ); mov( CL, searchFor ); pop( stringData ); push( dReturnAddress ); push( dEBXRegister ); push( dCXRegister ); mov( stringData, EBX ); mov( data, CL );bodyLoop: mov( [ EBX ], CH ); cmp( CH, 0 ); // line 4 je endLoop; cmp( CH, searchFor ); je foundIt; jmp incEBX;foundIt: mov( CL, [ EBX ] ); jmp endLoop; // line 2incEBX: inc( EBX ); jmp bodyLoop;endLoop: pop( CX ); pop( EBX );ret();end xOut;begin StringProgram; stdout.put( “Please enter a string to process”, nl );// the next six instructions are section 1mov( @size( byte ), AL );mov( 80, BL );inc( BL );mul( BL );mov( 0, EBX );mov( AX, BX );malloc( EBX );push( stringData );mov( 80, CX ); push( CX ); // line 3call gets;// print the stringstdout.put( “—-> here is the string you entered: ” );push( stringData );call puts;stdout.newln();push( stringData );mov( 0, CX );mov( ‘h’, CL );push( CX );call xOut;stdout.put( “—-> here is the string after calling xOut: ” );mov( stringData, EAX );push( EAX );call puts;stdout.newln();// return what the malloc’ed memoryfree( stringData );end StringProgram;
The next few questions deal with the following procedure and…
The next few questions deal with the following procedure and its implementation. Some of the code is identified with line numbers that will be referenced in later questions. procedure incrementArray( baseArrayAddress: dword; arraySize : int8 ); @nodisplay; @noframe;staticdReturnAddress : dword;iTemporary : int8;dDXRegister : word := 0; // preserve DLdEBXRegister : dword := 0; // preserve EBXdECXRegister : dword := 0; // preserve ECXbegin incrementArray;// entry sequence// preserve registersmov( EBX, dEBXRegister );mov( ECX, dECXRegister );mov( DX, dDXRegister );// process the run-time stackpop( dReturnAddress ); // LINE 1pop( DX ); // LINE 2pop( DX ); mov( DL, arraySize );pop( EBX ); // push back the return address and registerspush( dReturnAddress );push( dDXRegister );push( dECXRegister );push( dEBXRegister );// do work…ArrayLoop:ArrayLoopInit: mov( 0, DL ); mov( 0, ECX );ArrayLoopTest: cmp( DL, arraySize ); jge ArrayLoopEnd; // LINE 3ArrayLoopBody: mov( [ EBX + ECX ], iTemporary ); // LINE 4 inc( iTemporary ); mov( iTemporary, [ EBX + ECX ] );ArrayLoopIncrement: inc( DL ); inc( ECX ); // LINE 5 jmp ArrayLoopTest;ArrayLoopEnd:// exit sequence// restore registerspop( EBX );pop( ECX );pop( DX );// transfer controlret( );end incrementArray;