First page Back Continue Last page Overview Graphics
Assembler Directives: dc.w
dc.w reserves memory space for (16-bit) word constants and specifies their initial values.
- Mixa: dc.w $2000
- Mixb: dc.w $23
- Mixc: dc.w $45, 90, $3000
- ldd Mixb
- How many bytes of memory are reserved? ____
- Assuming Mixa is located at $800, what is the value of Mixb in the instruction above? _______
- What value is loaded into D in the above instruction?
The dc.w directive reserves one word (two bytes, i.e.16 bits) of memory for each (comma-separated) expression specified. The maximum value that can be stored in a word 65535. In the above code, six bytes are reserved starting at the location assigned (by the assembler and linker) to the Mixc label.