4.8.6 Obtaining the Size of a Specific Section

The .sizeof.(section_name) operator can be used to obtain the size of a specific section after the link process has occurred. For example, to find the final size of the .data section, use:

mov #.sizeof.(.data), w0
Note: When the .sizeof.(section_name) operator is used on a section in program memory, the size returned is the size in PC units. The DSC device PC increments by 2 for each instruction word.