Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. For the following data allocation, show how the variables will be mapped in t

ID: 3755963 • Letter: 1

Question

1. For the following data allocation, show how the variables will be mapped in the memory. Assume that the starting address of DATA area is 0x20000000. All the values should be presented in Hexadecimal numbers. Directly fill the memory block below. If you can't understand how the memory block should be filled, refer to pages 3 to 6 of Lecture slide 5. AREA myData, DATA, READWRITE, ALIGN= 3 ALIGN 4 ALIGN 8, 4 Str DCB "Hello", 0 OxABCDEF, 1, 2 Dat DCB 0x55, 0x10 High Low Address 0x20000014 0x20000010 0x2000000C 0x20000008 0x20000004 0x20000000

Explanation / Answer

Base address :- 0x2000 0000

offset :-

0x00 = H

0x01 = e

0x02 = l

0x03 = l

0x04 = o

0x05 = 0

align 4

0x08 = 0xEF i.e Arr

0x07 = 0xCD

0x09 = 0xAB

0x0A = 0x00

0x0B = 0x01

0x0C = 0x00

0x0D = 0x00

0x0E = 0x00

0x0F = 0x5F

0x10 (0x2000 0000 + 0x10 = 0x2000 0010)= 0x00

0x11 = 0x00

0x12 = 0x00

ALIGN 8

0x18 = 0x04

0x19 = 0x00

0x1A = 0x00

0x1B = 0x00

0x1C = 0x55 i.e Dat

0x1D = 0x10