7.3.3. FIELD

The FIELD directive describes space within a storage map that has been defined using the MAP directive. # is a synonym for FIELD.


{label} FIELD expr



is an optional label. If specified, label is assigned the value of the storage location counter, {VAR}. The storage location counter is then incremented by the value of expr.


is an expression that evaluates to the number of bytes to increment the storage counter.


If a storage map is set by a MAP directive that specifies a base-register, the base register is implicit in all labels defined by following FIELD directives, until the next MAP directive. These register-relative labels can be quoted in load and store instructions (see MAP).


You must be careful when using MAP, FIELD, and register-relative labels. See Describing data structures with MAP and FIELD directives for more information.


The following example shows how register-relative labels are defined using the MAP and FIELD directives.

    MAP     0,r9        ; set {VAR} to the address stored in r9
    FIELD   4           ; increment {VAR} by 4 bytes
Lab FIELD   4           ; set Lab to the address [r9 + 4] 
                        ; and then increment {VAR} by 4 bytes
    LDR     r0,Lab      ; equivalent to LDR r0,[r9,#4]
Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DUI 0068B