void printint(int x); void* localtest(int n); void* halloc(int n); int main() { void * temp; cout << "Printing 42 to the next line:\n"; printint(42); cout << "\nCalling localtest(2), result should be \n"; // MIPS code inserted into stackframe-testdriver.s to calculate // local variable address based on current $sp temp = localtest(2); cout << "Result is "; cout << temp; cout << "\n"; cout << "\nCalling localtest(1), result should be \n"; // MIPS code inserted into stackframe-testdriver.s to calculate // local variable address based on current $sp temp = localtest(1); cout << "Result is "; cout << temp; cout << "\n"; cout << "\nCalling localtest(3), result should be \n"; // MIPS code inserted into stackframe-testdriver.s to calculate // local variable address based on current $sp temp = localtest(3); cout << "Result is "; cout << temp; cout << "\n"; cout << "\nCalling localtest(4), result should be \n"; // MIPS code inserted into stackframe-testdriver.s to calculate // local variable address based on current $sp temp = localtest(4); cout << "Result is "; cout << temp; cout << "\n"; cout << "\nUsing halloc to allocate space\n"; temp = halloc(324); cout << "Address to allocated memory is "; cout << temp; cout << "\n"; cout << "\nNext allocation should be at "; cout << temp + 81; cout << "\nIt is at "; temp = halloc(4); cout << temp; cout << "\n"; }