6.1.9.13 Dqw Directive

The DQW directive is used to initialize 64-bit words of program memory.

The directive takes a comma-separated list of arguments. Each argument can be a numeric value (e.g., 55), a character constant (e.g. 'T'), or a string (e.g. "level" or 'level'). Each argument or each character of a string argument is written as eight bytes into consecutive program memory locations within the current psect.

In the following code:
PSECT myWords,class=CODE,delta=2
alabel:
  DDW  'X',1,2,398,0x1238005FFFF
the DQW directive will initialize each word of program memory with the supplied value, specifically (in hexadecimal):
00000000 00000058 00000000 00000001 00000000 00000002 00000000 0000018E
00000123 8005FFFF
Strings consist of a sequence of characters enclosed within either single or double quotes. There is no termination character added by the assembler. If you need a nul-terminated string, then specify the termination character as a separate argument to the DQW directive, for example:
PSECT myConst,class=CODE,delta=1
words:
        DQW "a string",0
will define:
00000000 00000061 00000000 00000020 00000000 00000073 00000000 00000074
00000000 00000072 00000000 00000069 00000000 0000006E 00000000 00000067
00000000 00000000

The DQW directive cannot be used to created objects in data memory. For that, use the DS directive (see Ds Directive).