25-ARM 7 Assembly Programming-22-03-2024
25-ARM 7 Assembly Programming-22-03-2024
MODULE 7
AREA
▪The AREA directive tells the assembler to define a new section of
memory.
▪The memory can be code (instruction) or data and can have attributes such
as ReadOnly,
▪ReadWrite, and so on.
▪This is widely used to define one or more blocks of indivisible memory
for code or data to be used by the linker.
▪Every Assembly language program has at least one AREA.
▪The following is the format:
▪AREA sectionname, attribute, attribute, …
▪ALIGN is another attribute given to an area of memory to indicate how memory should be allocated according to
the addresses. When the ALIGN is used for CODE and READONLY it aligned in 4-bytes address boundary by
default since the ARM instructions are all 32-bit (4-bytes) word. The ALIGN attribute of AREA has a number after
like ALIGN=3 which indicates the information should be placed in memory with addresses of23, that is 0x50000,
0x50008, 0x50010, 0x50020, and so on.
▪Examples: