1 |
179 |
jshamlet |
@c Copyright 2010, 2011 Free Software Foundation, Inc.
|
2 |
|
|
@c This is part of the GAS manual.
|
3 |
|
|
@c For copying conditions, see the file as.texinfo.
|
4 |
|
|
|
5 |
|
|
@node XSTORMY16-Dependent
|
6 |
|
|
@chapter XStormy16 Dependent Features
|
7 |
|
|
|
8 |
|
|
@cindex XStormy16 support
|
9 |
|
|
@menu
|
10 |
|
|
* XStormy16 Syntax:: Syntax
|
11 |
|
|
* XStormy16 Directives:: Machine Directives
|
12 |
|
|
* XStormy16 Opcodes:: Pseudo-Opcodes
|
13 |
|
|
@end menu
|
14 |
|
|
|
15 |
|
|
@node XStormy16 Syntax
|
16 |
|
|
@section Syntax
|
17 |
|
|
@menu
|
18 |
|
|
* XStormy16-Chars:: Special Characters
|
19 |
|
|
@end menu
|
20 |
|
|
|
21 |
|
|
@node XStormy16-Chars
|
22 |
|
|
@subsection Special Characters
|
23 |
|
|
|
24 |
|
|
@cindex line comment character, XStormy16
|
25 |
|
|
@cindex XStormy16 line comment character
|
26 |
|
|
@samp{#} is the line comment character. If a @samp{#} appears as the
|
27 |
|
|
first character of a line, the whole line is treated as a comment, but
|
28 |
|
|
in this case the line can also be a logical line number directive
|
29 |
|
|
(@pxref{Comments}) or a preprocessor control command
|
30 |
|
|
(@pxref{Preprocessing}).
|
31 |
|
|
|
32 |
|
|
@cindex comment character, XStormy16
|
33 |
|
|
@cindex XStormy16 comment character
|
34 |
|
|
A semicolon (@samp{;}) can be used to start a comment that extends
|
35 |
|
|
from wherever the character appears on the line up to the end of the
|
36 |
|
|
line.
|
37 |
|
|
|
38 |
|
|
@cindex line separator, XStormy16
|
39 |
|
|
@cindex statement separator, XStormy16
|
40 |
|
|
@cindex XStormy16 line separator
|
41 |
|
|
|
42 |
|
|
The @samp{|} character can be used to separate statements on the same
|
43 |
|
|
line.
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
@node XStormy16 Directives
|
47 |
|
|
@section XStormy16 Machine Directives
|
48 |
|
|
|
49 |
|
|
@cindex machine directives, XStormy16
|
50 |
|
|
@cindex XStormy16 machine directives
|
51 |
|
|
@table @code
|
52 |
|
|
|
53 |
|
|
@cindex @code{16bit_pointers} directive, XStormy16
|
54 |
|
|
@item .16bit_pointers
|
55 |
|
|
Like the @option{--16bit-pointers} command line option this directive
|
56 |
|
|
indicates that the assembly code makes use of 16-bit pointers.
|
57 |
|
|
|
58 |
|
|
@cindex @code{32bit_pointers} directive, XStormy16
|
59 |
|
|
@item .32bit_pointers
|
60 |
|
|
Like the @option{--32bit-pointers} command line option this directive
|
61 |
|
|
indicates that the assembly code makes use of 32-bit pointers.
|
62 |
|
|
|
63 |
|
|
@cindex @code{.no_pointers} directive, XStormy16
|
64 |
|
|
@item .no_pointers
|
65 |
|
|
Like the @option{--no-pointers} command line option this directive
|
66 |
|
|
indicates that the assembly code does not makes use pointers.
|
67 |
|
|
|
68 |
|
|
@end table
|
69 |
|
|
|
70 |
|
|
@node XStormy16 Opcodes
|
71 |
|
|
@section XStormy16 Pseudo-Opcodes
|
72 |
|
|
|
73 |
|
|
@cindex XStormy16 pseudo-opcodes
|
74 |
|
|
@cindex pseudo-opcodes for XStormy16
|
75 |
|
|
@code{@value{AS}} implements all the standard XStormy16 opcodes.
|
76 |
|
|
|
77 |
|
|
@code{@value{AS}} also implements the following pseudo ops:
|
78 |
|
|
|
79 |
|
|
@table @code
|
80 |
|
|
|
81 |
|
|
@cindex @code{@@lo} pseudo-op, XStormy16
|
82 |
|
|
@item @@lo()
|
83 |
|
|
Computes the lower 16 bits of the given expression and stores it into
|
84 |
|
|
the immediate operand field of the given instruction. For example:
|
85 |
|
|
|
86 |
|
|
@samp{add r6, @@lo(here - there)}
|
87 |
|
|
|
88 |
|
|
computes the difference between the address of labels 'here' and
|
89 |
|
|
'there', takes the lower 16 bits of this difference and adds it to
|
90 |
|
|
register 6.
|
91 |
|
|
|
92 |
|
|
@cindex @code{@@hi} pseudo-op, XStormy16
|
93 |
|
|
@item @@hi()
|
94 |
|
|
Computes the higher 16 bits of the given expression and stores it into
|
95 |
|
|
the immediate operand field of the given instruction. For example:
|
96 |
|
|
|
97 |
|
|
@samp{addc r7, @@hi(here - there)}
|
98 |
|
|
|
99 |
|
|
computes the difference between the address of labels 'here' and
|
100 |
|
|
'there', takes the upper 16 bits of this difference, shifts it down 16
|
101 |
|
|
bits and then adds it, along with the carry bit, to the value in
|
102 |
|
|
register 7.
|
103 |
|
|
|
104 |
|
|
@end table
|