
4-4
Assembler
An optional fill value can also be given. If no fill value is given, the space will be filled
with zeroes.
.wspace 7, 0xd800! Create 7 words of 0xd800
4.1.2.3 .word
The
.word
directive allows a user to specify zero or more comma
separated values to be assembled into memory.
4.1.2.4 .global
The
.global
directive is used to declare a global symbol. If this directive
is not used, a symbol defined in a partial program is visible only within
its scope. The
.global
directive makes the symbol visible to the linker.
4.1.2.5 .section
The .section directive assembles the code following it into the section
name specified.
Example: .section, “.text”, “ax”
This defines a section named “.text” - the characters following it tell the
assembler that the code following the directive is allocatable and is a part
of the instruction memory. Please refer to the GNU assembler manual for
more information.
Although GNU assembler documentation says unnamed sections go to
the default .text section, it is necessary to specify sections explicitly for
the ZSP SDK tools.
4.1.3 Assembler Special Cases
For all instructions that require a register pair, the even register must be
specified as the operand. For the ZSP400 assembler only, If an odd
register is specified, the even register of the register pair is used as the
actual operand in the instruction, and the assembler displays a warning
message. With the ZSPG2 assembler,
zdas
, an odd register will not be
converted to an even register and an error will be message will be
shown.