Question: You must do this assignment using one of the Linux machines (hen01 hen04.cs.utsarr.net) in our lab to make sure that using th everyone is using

 You must do this assignment using one of the Linux machines

(hen01 hen04.cs.utsarr.net) in our lab to make sure that using th everyone

is using the same version of the compiler. In this assignment you

You must do this assignment using one of the Linux machines (hen01 hen04.cs.utsarr.net) in our lab to make sure that using th everyone is using the same version of the compiler. In this assignment you are asked to annotate assembly language code to illustrate that you understand it. Look at the examples in the lecture notes for section 3.4, especially Example 3, and all of Examples 4, 5, and 6 Your comments should indicate what the purpose of the code is in the context of the problem being solved, not just what an individual assembly language instruction does. As an example, in Example 6 from the notes, the line: should not be annotated as: mov! 12 (%ebp), %edx // move i into tedx mov! 12 (tebp), %edx // move 4 bytes from memory address %(ebp+12) into %edx Part 1: Create a file called calc.c that contains the following: int calc(int x, int y, int z) return 3*x 2 y 15*2: Compile the program to produce assembly code. Use: cc -01-S calc.c to produce calc.s Copy calc.s into calc.s.txt and annotate calc.s.txt with comments to illustrate that you understand how the calculation is implemented. Make sure you identify each parameter. Print out the annotated code and turin Part 2: Write a main program, testcalc.c, that will test calc.c. You must do this assignment using one of the Linux machines (hen01 hen04.cs.utsarr.net) in our lab to make sure that using th everyone is using the same version of the compiler. In this assignment you are asked to annotate assembly language code to illustrate that you understand it. Look at the examples in the lecture notes for section 3.4, especially Example 3, and all of Examples 4, 5, and 6 Your comments should indicate what the purpose of the code is in the context of the problem being solved, not just what an individual assembly language instruction does. As an example, in Example 6 from the notes, the line: should not be annotated as: mov! 12 (%ebp), %edx // move i into tedx mov! 12 (tebp), %edx // move 4 bytes from memory address %(ebp+12) into %edx Part 1: Create a file called calc.c that contains the following: int calc(int x, int y, int z) return 3*x 2 y 15*2: Compile the program to produce assembly code. Use: cc -01-S calc.c to produce calc.s Copy calc.s into calc.s.txt and annotate calc.s.txt with comments to illustrate that you understand how the calculation is implemented. Make sure you identify each parameter. Print out the annotated code and turin Part 2: Write a main program, testcalc.c, that will test calc.c

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!