5.1.2 .data

Assemble the following statements onto the end of the .data (initialized data) section.

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 byte

The linker collects initial values for section .data (and other sections defined with the data attribute) 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 called for this purpose automatically. Assembly projects can utilize this library by linking with the libpic30 library. For more information, see the discussion of Run-Time Library Support in Initialized Data.