5.9.5. Finding the end of the allocated data

You can use the # 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 5.19 depends on the values of MaxStrLen and ArrayLen. If these values are too large, the structure overruns the end of available memory.

Example 5.19 uses:

An ASSERT directive checks that the end of the data structure does not overrun the available memory.

Example 5.19. 

StartOfData				EQU		0x1000
EndOfData				EQU		0x2000
				MAP		StartOfData
Integer				#		4
Integer2				#		4
String				#		MaxStrLen
Array				#		ArrayLen*8
BitMask				#		4
EndOfUsedData				#		0
				ASSERT  		EndOfUsedData <= EndOfData
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential