File: c-xstormy16.texi

package info (click to toggle)
binutils 2.24.90.20141014-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 223,720 kB
  • sloc: ansic: 1,320,112; asm: 552,010; cpp: 110,351; exp: 58,197; makefile: 51,941; sh: 19,773; yacc: 14,696; lisp: 14,000; perl: 1,791; lex: 1,612; pascal: 307; sed: 195; python: 154; awk: 26
file content (104 lines) | stat: -rw-r--r-- 3,219 bytes parent folder | download | duplicates (5)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@c Copyright (C) 2010-2014 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.

@node XSTORMY16-Dependent
@chapter XStormy16 Dependent Features

@cindex XStormy16 support
@menu
* XStormy16 Syntax::               Syntax
* XStormy16 Directives::           Machine Directives
* XStormy16 Opcodes::              Pseudo-Opcodes
@end menu

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

@node XStormy16-Chars
@subsection Special Characters

@cindex line comment character, XStormy16
@cindex XStormy16 line comment character
@samp{#} is the line comment character.  If a @samp{#} 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
(@pxref{Comments}) or a preprocessor control command
(@pxref{Preprocessing}).

@cindex comment character, XStormy16
@cindex XStormy16 comment character
A semicolon (@samp{;}) can be used to start a comment that extends
from wherever the character appears on the line up to the end of the
line.

@cindex line separator, XStormy16
@cindex statement separator, XStormy16
@cindex XStormy16 line separator

The @samp{|} character can be used to separate statements on the same
line.


@node XStormy16 Directives
@section XStormy16 Machine Directives

@cindex machine directives, XStormy16
@cindex XStormy16 machine directives
@table @code

@cindex @code{16bit_pointers} directive, XStormy16
@item .16bit_pointers
Like the @option{--16bit-pointers} command line option this directive
indicates that the assembly code makes use of 16-bit pointers.

@cindex @code{32bit_pointers} directive, XStormy16
@item .32bit_pointers
Like the @option{--32bit-pointers} command line option this directive
indicates that the assembly code makes use of 32-bit pointers.

@cindex @code{.no_pointers} directive, XStormy16
@item .no_pointers
Like the @option{--no-pointers} command line option this directive
indicates that the assembly code does not makes use pointers.

@end table

@node XStormy16 Opcodes
@section XStormy16 Pseudo-Opcodes

@cindex XStormy16 pseudo-opcodes
@cindex pseudo-opcodes for XStormy16
@code{@value{AS}} implements all the standard XStormy16 opcodes.

@code{@value{AS}} also implements the following pseudo ops:

@table @code

@cindex @code{@@lo} pseudo-op, XStormy16
@item @@lo()
Computes the lower 16 bits of the given expression and stores it into
the immediate operand field of the given instruction.  For example:

    @samp{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.

@cindex @code{@@hi} pseudo-op, XStormy16
@item @@hi()
Computes the higher 16 bits of the given expression and stores it into
the immediate operand field of the given instruction.  For example:

    @samp{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.

@end table