Question: Assmebly coding. 4.9 shows what the assmebly code needs to perform. The c driver is also attached. The assembly stub is also attached and has




4.9 Assignment This is the specification of what the assembly functions need to perform. Do not copy or type this code. Use it as a reference when writing the assembly. Please refer to the Appendix for a reference on ASCII code. /* begin assignment specification / AtoI) { sign - 1; /* initialize sign to positive / /* skip over leading spaces and tabs */ while (*ascii = ' || *ascii == '\t') ascii++; /* check for a plus or minus sign */ if (*ascii == "+") ascii++; /* found a plus sign / else if (*ascii == ;-) { sign - -1; /* found a minus sign / ascii++; } *intptr = 0; /* stores the value calculated below */ / + skip to the ones place of the digit / for (i = 0; ascii[i] >='0' & ascii[i] = '0' && ascii[i] =0; i--) { *intptr += multiplier * (ascii[i] - 'O'); multiplier *= 10; /* inc multiplier by factor of 10 */ } /* multiply in the sign */ *intptr *intptr * sign; } /* end assignment specification */ /* begin C driver */ #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
