Question: Given the following array declaration, program and debug the code to access the array. Note the data type is dw for each element in the

Given the following array declaration, program and debug the code to access the array. Note the data type is dw for each element in the array.

List dw 100, 102, 104, 106

A. Programming (providing source code and screenshots):

1. Move the list (starting) address to a register, rbx

2. Initialize register rsi to 0

3. Combine rbx and rsi to access each element of the array and move each one to a register

B. Debugging (providing commands and screenshots)

1. Show the compiling command to compile your program.

2. Show the commands to set break points and run the program.

3. Whats the starting address of the array? Show the DDD command.

4. What is the (starting) address of last element? Show the DDD command.

5. Show the command to print the value of the first element from register (unsigned decimal format)

6. Show the command to print the value of the first element from memory (hex format)

7. Show the command to print the value of the last element from memory (unsigned format)

8. Show the command to print the first 3 bytes of the array from memory (hex format)

9. Show the command to print the first double word of the array from memory (unsigned decimal format)

10. Show the command to print the first 3 words of the array from memory (signed decimal format)

11. Show the command to print rbx value (hex format) 12. Show the command to print rsi value at the end of the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!