Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using assembly language and c++ Please create int array with 5 elements. Each element is a random number between 10 and S numbers shall be

Using assembly language and c++ image text in transcribed
Please create int array with 5 elements. Each element is a random number between 10 and S 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: 0. These Decimal (5 points) b. a. Hexadecimal (5 points) Binary (5 points) c. 2. Address a. Find the address of element 0 in the array. (5 points) b. Display this address in hexadecimal format (5 points) 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 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) a. b. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions