Question: Questions are based on Chapter 8 and 10 1. 15 points] Why do you have to write Assembly functions inside a C program? [10 points]
Questions are based on Chapter 8 and 10 1. 15 points] Why do you have to write Assembly functions inside a C program? [10 points] How do you import assembly function in your C program? Provide an example. [10 points] How do import a C function in your assembly code. Provide an example a. b. C. 2. 120 points) What are static and volatile variables? When do you use static or volatile variable? 15 points] Write a simple if-then-else, for loop and while loop example in C code and write an equivalent assembly code. 120 points] What are the advantages of alignment in the memory? Why does it take more time to access misaligned memories? 4. 140 points] Write a C program with a subroutine that called MoviePassMember that checks if erson a member, then he/she must pay variable price based on age. Write another subroutine 5. the person is a member or not. If he/she is a member, the price is $4 for all ages. If the p called MoviePrice that calculates the movie ticket price based on the input argument called age. If the age is 12 or under, the price is $6. If the age is between 13 and 64, the price is $8. If the age is 65 or above price is $7. Implement MoviePassMember subroutine in Assembly MoviePrice subroutine in C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
