| |||
| Home > Writing ARM and Thumb Assembly Language > Describing data structures with MAP and FIELD directives > Finding the end of the allocated data | |||
You can use the FIELD directive with an operand
of 0 to label a location within a structure.
The location is labeled, but the location counter is not incremented.
The size of the data structure defined in Example 2.19 depends on the
values of MaxStrLen and ArrayLen.
If these values are too large, the structure overruns the end of available
memory.
Example 2.19 uses:
an EQU directive
to define the end of available memory
a FIELD directive with an operand of 0 to
label the end of the data structure.
An ASSERT directive
checks that the end of the data structure does not overrun the available
memory.