12.64 SPACE or FILL

The SPACE directive reserves a zeroed block of memory. The FILL directive reserves a block of memory to fill with a given value.


{label} SPACE expr
{label} FILL expr{,value{,valuesize}}
is an optional label.
evaluates to the number of bytes to fill or zero.
evaluates to the value to fill the reserved bytes with. value is optional and if omitted, it is 0. value must be 0 in a NOINIT area.
is the size, in bytes, of value. It can be any of 1, 2, or 4. valuesize is optional and if omitted, it is 1.


Use the ALIGN directive to align any code following a SPACE or FILL directive.
% is a synonym for SPACE.


        AREA    MyData, DATA, READWRITE
data1   SPACE   255       ; defines 255 bytes of zeroed store
data2   FILL    50,0xAB,1 ; defines 50 bytes containing 0xAB
Related concepts
7.14 Numeric expressions
Related reference
12.5 ALIGN
12.15 DCB
12.16 DCD and DCDU
12.21 DCQ and DCQU
12.22 DCW and DCWU
Non-ConfidentialPDF file icon PDF versionARM DUI0379G
Copyright © 2007, 2008, 2011, 2012, 2014, 2015 ARM. All rights reserved.