.DL     Data Long words

Syntax:

        .DL  [# | / | = | \] expression [,[# | / | = | \] expression [,...]]

See also:

.AS   .AT   .AZ   .DA   .DB   .DR   .DW   .HS   .RF   .TS  

Function:

The .DL directive is used to enter words and long words of data in the target code. The data is entered as one or more expressions, separated by commas.

Boundary Sync:

In Version 3 of the SB-Assembler this directive will not perform a boundary sync.

Explanation:

Every expression following the .DL directive will be evaluated and a 16 bit word or the entire 32 bit long word is stored in the target file. The order in which the bytes are stored depends on the loaded Cross Overlay. Some processors prefer to have the lowest byte stored first, others want the highest byte stored first. So please refer to the description of the particular Cross Overlay to see in what order the bytes are stored.
The default order, when no Cross Overlay is loaded, is lowest byte first. This is also known as little endian model.

The .DL directive is usually used to store long words of data, containing 4 bytes each. It can also be used to store words containing 2 bytes each. To store words the expression must be preceded by one of the symbols:

# stores the lowest word of the 32 bit result (b0..b15)
/ stores the middle 2 bytes (b8..b23)
= stores the highest word (b16..b31)
\ stores the highest byte (b24..b31), the upper 8 bits of the word remain 0

The long word of 4 bytes is stored if none of these prefixes is used.

Long words and words can be mixed together in the same .DL directive. Multiple expressions should be separated by commas.

Important

Be sure to load the appropriate Cross Overlay before using the .DL directive! Otherwise the first data words may be saved in the wrong order (wrong endian model).

Unlike the .DA directive the .DL directive has no reverse endian model equivalent. If you want to store long words in the reverse order you'll have to save the bytes or words separately by using the .DA or .DR directives.

Examples:

0000-78 56 34 12        .DL    $12345678
0004-78 56              .DL    #$12345678
0006-56 34              .DL    /$12345678
0008-34 12              .DL    =$12345678
000A-12 00              .DL    \$12345678
000C-78 56 34 12
0010-78 56              .DL    $12345678,#$12345678