DW : Define Word:-
The DW directive serves the same purposes as the DB directive, but now it makes the assembler which reserves thenumber ofmemory words (16-bit) instead of bytes. Some instance aregiven to explain this directive.
Example :
WORDS DW 1234H, 4567H, 78ABH, 045CH,
This makes the assembler reserve 4 words in memory (8 bytes), and by initializing the words with the specified values in the given statements. At the time of initialisation, the lower bytes are stored at the lower memory addresses, whereas the upper bytes are stored at the higher addresses. Another option of the DW directive can be explained with the DUP operator.
WDATA DW 5 DUP (6666H)
This statement reserves five words, for example10-bytes of memory for a word label WDATA and initialises all the word locations having 6666H.