Question: Assembly language with c/c++ please !! Please create int array with 5 elements. Each element is a random number between 10 and 50. These numbers
Please create int array with 5 elements. Each element is a random number between 10 and 50. These numbers shall be generated by a function rand(). (10 points) 1. Display the value of each element in the int array in the formats of a. b. c. Decimal (5 points) Hexadecimal (5 points) Binary (5 points) Ctt 2. Address Find the address of element 0 in the array. (5 points) Display this address in hexadecimal format (5 points) a. b. 3. Addressing mode Display the array address in the hexadecimal format (5 points) Find the content at the address of (2+ the array address) by indirect addressing mode. (5 points) Display the content value at the address of (2+ the array address) in decimal format. (5 points) a. b. c. 4. Perform ADD operation a. b. Find the sum of element 0 and element 1 of the array by the instruction ADD. (5 points) Display the value of element 0, element 1, and the sum of element 0 and element 1 in the decimal format. (5 points) 5. Perform OR operation: a. b. c. The operant 1 can be the element 2 of the array (5 points) The operant 2 can be the element 3 of the array (5 points) Display the operands and the result in the binary format (5 points) 6. STACK data structure Store last element of the array into the top of the stack data structure by the instruction of PUSH. (5 points) Display the element value in the decimal format (5 points) Display the value of the register ESP before and after execution of PUSH instruction in the hexadecimal format (5 points) a. b. c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
