XStormy16 Dependent Features
****************************

Syntax
======

Special Characters
------------------

# is the line comment character.  If a # appears as the first character of a line, the whole line is treated as a comment, but in this case the line can also be a logical line number directive (see Comments) or a preprocessor control command (see Preprocessing).

A semicolon (;) can be used to start a comment that extends from wherever the character appears on the line up to the end of the line.

The | character can be used to separate statements on the same line.

XStormy16 Machine Directives
============================

.16bit_pointers
     Like the --16bit-pointers command-line option this directive indicates that the assembly code makes use of 16-bit pointers.

.32bit_pointers
     Like the --32bit-pointers command-line option this directive indicates that the assembly code makes use of 32-bit pointers.

.no_pointers
     Like the --no-pointers command-line option this directive indicates that the assembly code does not makes use pointers.

XStormy16 Pseudo-Opcodes
========================

AS implements all the standard XStormy16 opcodes.

AS also implements the following pseudo ops:

@lo()
     Computes the lower 16 bits of the given expression and stores it into the immediate operand field of the given instruction.  For example:

     add r6, @lo(here - there)

     computes the difference between the address of labels 'here' and 'there', takes the lower 16 bits of this difference and adds it to register 6.

@hi()
     Computes the higher 16 bits of the given expression and stores it into the immediate operand field of the given instruction.  For example:

     addc r7, @hi(here - there)

     computes the difference between the address of labels 'here' and 'there', takes the upper 16 bits of this difference, shifts it down 16 bits and then adds it, along with the carry bit, to the value in register 7.