Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Examine the function below and answer the following questions. int global = 25; // declared outside function int func( int x, char *Y, BYTE
1. Examine the function below and answer the following questions. int global = 25; // declared outside function int func( int x, char *Y, BYTE Z ) int a; char b[] = "The lazy dog ate the red fox before jumping over it." char *c; c = (char *) malloc (512K); a = b[0]; return a; a. What is the classification of memory in which the following are stored. (Program, Stack, or Heap) i. x ii. Y iii. a iv. c V. The elements in the variable 'c'. vi. global vii. The array variable 'b'. viii. The elements in the variable 'b'. ix. The text string for 'b'. b. How many bytes used on the stack for 'Z' . c. How many 4K pages of physical memory are needed for the above malloc? d. How many bytes are used on the stack for the local variables in this function? 2. Determine the highest power of 2 alignment for the following numbers. a. Ox52 b. OxF1C c. 0x2A2700 d. Ox3E600 e. Ox772100000 3. What are the values of the following registers given the instructions below. Show in hexadecimal and all leading zeros if applicable. a. mov eax, 25 eax = b. mov ebx, OxAF1283 ebx = - c. Given ebx above, mov bx, 0x5A ebx d. Given the ebx from ".", mov bl,0x5A ebx = e. esp - 0x128F0, push Ox 348A esp = f. esp = 0x128EC, pop eax esp g. Given 'e.' and 'f.', eax? eax = 4. Show the following little endian number in big endian format. OD FO AD OB 1. Examine the function below and answer the following questions. int global = 25; // declared outside function int func( int x, char *Y, BYTE Z ) int a; char b[] = "The lazy dog ate the red fox before jumping over it." char *c; c = (char *) malloc (512K); a = b[0]; return a; a. What is the classification of memory in which the following are stored. (Program, Stack, or Heap) i. x ii. Y iii. a iv. c V. The elements in the variable 'c'. vi. global vii. The array variable 'b'. viii. The elements in the variable 'b'. ix. The text string for 'b'. b. How many bytes used on the stack for 'Z' . c. How many 4K pages of physical memory are needed for the above malloc? d. How many bytes are used on the stack for the local variables in this function? 2. Determine the highest power of 2 alignment for the following numbers. a. Ox52 b. OxF1C c. 0x2A2700 d. Ox3E600 e. Ox772100000 3. What are the values of the following registers given the instructions below. Show in hexadecimal and all leading zeros if applicable. a. mov eax, 25 eax = b. mov ebx, OxAF1283 ebx = - c. Given ebx above, mov bx, 0x5A ebx d. Given the ebx from ".", mov bl,0x5A ebx = e. esp - 0x128F0, push Ox 348A esp = f. esp = 0x128EC, pop eax esp g. Given 'e.' and 'f.', eax? eax = 4. Show the following little endian number in big endian format. OD FO AD OB
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started