Create and test a program with the following characteristics: A. Has a .data section that contains the following signed…

Create and test a program with the following characteristics: A. Has a .data section that contains the following signed…

Question:

 

Transcribed Image Text:

Create and test a program with the following characteristics: A. Has a .data section that contains the following signed data values: An array of four 8-bit numbers called Ary8, initialized to the values (OxCC, 12, -3, 0xB). An array of four 32-bit numbers called Ary32, initialized to the values (10, -5, 0xFFFFFFF4, 0x77777777} Space allocated for two additional arrays of four 32-bit numbers, called Diff and Sum; these should be initialized to all Os. B. Uses indexing to perform the operation Diff[x] = Ary8[x] – Ary32[x] for all four array values. That is to say, the program should read in the first value of Ary8 and first value of Ary32, perform subtraction, and store the result in the first 32 bit word of Diff. Then it should calculate this for the second value, then the third, then the fourth. Do not use “loops” – we will do that in the next exercise. C. Uses a different form of indexing (multiple are available) to perform: 0 Sum[x] =Ary8[x] + Ary32[x] for the four values in order. D. (Optional) Reset the program, use GDB commands to change the array values, rerun the program, and verify the results.

Expert Answer:

Answer rating: 100% (QA)

Python Code include int main Data section unsigned char Ary8 4 0xCC 12 3 0xB int Ary32 4 10 5 0xFFFF
View the full answer