aboutsummaryrefslogtreecommitdiff
path: root/gas/doc/c-xc16x.texi
blob: b3aad8ae2959c9496638b7fe607b1d763b5a86df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@c Copyright (C) 2006-2020 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.

@page
@node xc16x-Dependent
@chapter Infineon xc16x Dependent Features

@cindex xc16x support
@menu
* xc16x Directives::     xc16x Machine Directives
* xc16x Syntax::         xc16x Syntax
@end menu

@node xc16x Directives
@section xc16x Machine Directives

The xc16x version of the assembler supports the following machine
directives:

@table @code
@cindex @code{align} directive, xc16x
@item .align
This directive aligns the section program counter on the next 2-byte
boundary.


@cindex @code{byte} directive, xc16x
@item .byte @var{expr}
This directive assembles a half-word (8-bit) constant.

@cindex @code{word} directive, xc16x
@item .word @var{expr}
This assembles a word (16-bit) constant.

@cindex @code{ascii} directive, xc16x
@item .ascii "@var{ascii}"
This directive used for copying @var{str} into the object file.
The string is terminated with a null byte.

@cindex @code{set} directive, xc16x
@item .set @var{symbol}, @var{value}
This directive creates a symbol named @var{symbol} which is an alias for
another symbol (possibly not yet defined).  This should not be confused
with the mnemonic @code{set}, which is a legitimate xc16x instruction.



@cindex @code{bss} directive, xc16x
@item .bss @var{symbol}, @var{length}
Reserve @var{length} bytes in the bss section for a local @var{symbol},
aligned to the power of two specified by @var{align}.  @var{length} and
@var{align} must be positive absolute expressions.  This directive
differs from @samp{.lcomm} only in that it permits you to specify
an alignment.
@end table

@node xc16x Syntax
@section xc16x Syntax
@menu
* xc16x-Chars::                Special Characters
@end menu

@node xc16x-Chars
@subsection Special Characters

@cindex line comment character, xc16x
@cindex xc16c line comment character
The presence of a @samp{;} appearing anywhere on a line indicates the
start of a comment that extends to the end of that line.

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

@cindex line separator, xc16x
@cindex statement separator, xc16x
@cindex xc16x line separator
The XC16X assembler does not support a line separator character.