5.1.2 Data Directive
The
.data indicates that the output of the assembly code
following should be placed at the end of the .data
(initialized data) section. For
example:# The following symbols (D1 and D2) will be placed in
# the initialized data section.
.data
D1: .long 0x12345678 # 4 bytes
D2: .byte 0xFF # 1 byteThe linker collects initial values for section .data (and other sections that are considered to hold data) and creates a
data initialization template. This template can be processed during application start-up
to transfer initial values into memory. For C applications, a library function is
automatically called for this purpose. Assembly projects can utilize this library by
linking with the libpic32 library. For more information, see Run-Time Library Support.
