Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 3 of 4 - Assume that A, B, C, D, and Z are 32-bit values in memory. You can initialize them by using a

image text in transcribed

Part 3 of 4 - Assume that A, B, C, D, and Z are 32-bit values in memory. You can initialize them by using a DCD directive. Remember, you can use a label to define the first location of a memory block. Note that you can put multiple values after the directive DCD or DCB, but you need to separate the values with commas. However, since each data item requires its own name, you have to use one directive per element; e.g., DCD value A B DCD value DCD value D DCD value DCD value Modify your program in part 2 to load (LDR) the values of r1 to r4 using these A, B, C, and D values, respectively. You also need to store (STR) the result in location Z. Z Use the Keil simulator to write, assemble, and run the above program. To see the content of a memory segment, you need to open a memory window. To do this, while you are in the debugging mode, click on View, then select Memory Window and then Memory 1. Enter the starting address in the Address box in the memory window (which is 0) and hit return. In the memory window, we can see both the code and data. Note that you may need to resize the memory window, by dragging the edge of the memory window to display as many or as few bytes per line as you want. In Keil simulator, memory locations are read-only, by default. To change some of these locations to read-write, we have to perform an additional step. Click the Debug and then the Memory Map tabs. Enter a memory map range in the Map Range box and check the box Read, and Write, as needed, and finally click on the Map Range button. The format of the range is defined as 0x000, 0x200, for example. This range is from memory location Ox000 to memory location Ox200. This step must be performed each time you enter the debugging mode. Without this step, you will NOT be able to successful store data in memory. What is the value of Z (in 4 bytes) after running the program? Write each byte value in hexadecimal in a box, i.e., do not write more than two hexadecimal digits in each box. You have to fill ALL boxes, even if its value is zero. Question 3 of 4 6.0 Points When the values of A, B, C, and D are 9, 9, 7, and 5, respectively, the value of Z in 4 bytes will be Ox Ox Ox Part 3 of 4 - Assume that A, B, C, D, and Z are 32-bit values in memory. You can initialize them by using a DCD directive. Remember, you can use a label to define the first location of a memory block. Note that you can put multiple values after the directive DCD or DCB, but you need to separate the values with commas. However, since each data item requires its own name, you have to use one directive per element; e.g., DCD value A B DCD value DCD value D DCD value DCD value Modify your program in part 2 to load (LDR) the values of r1 to r4 using these A, B, C, and D values, respectively. You also need to store (STR) the result in location Z. Z Use the Keil simulator to write, assemble, and run the above program. To see the content of a memory segment, you need to open a memory window. To do this, while you are in the debugging mode, click on View, then select Memory Window and then Memory 1. Enter the starting address in the Address box in the memory window (which is 0) and hit return. In the memory window, we can see both the code and data. Note that you may need to resize the memory window, by dragging the edge of the memory window to display as many or as few bytes per line as you want. In Keil simulator, memory locations are read-only, by default. To change some of these locations to read-write, we have to perform an additional step. Click the Debug and then the Memory Map tabs. Enter a memory map range in the Map Range box and check the box Read, and Write, as needed, and finally click on the Map Range button. The format of the range is defined as 0x000, 0x200, for example. This range is from memory location Ox000 to memory location Ox200. This step must be performed each time you enter the debugging mode. Without this step, you will NOT be able to successful store data in memory. What is the value of Z (in 4 bytes) after running the program? Write each byte value in hexadecimal in a box, i.e., do not write more than two hexadecimal digits in each box. You have to fill ALL boxes, even if its value is zero. Question 3 of 4 6.0 Points When the values of A, B, C, and D are 9, 9, 7, and 5, respectively, the value of Z in 4 bytes will be Ox Ox Ox

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

Students also viewed these Databases questions