FIELD

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

Show/hideSyntax

{label} FIELD expr

where:

label

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.

expr

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

Show/hideUsage

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.

Show/hideExamples

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]

Show/hideSee also

Reference:
Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0489C
Non-ConfidentialID080411