initial checkin of new hdw-linux development cvs repository
[hdw-linux/hdw-linux.git] / packages / hackbard / avra / avra_manpage
1 .TH avra 1 "18 September 2001" "Version 0.7"
2 .SH NAME
3 avra \- Atmel AVR assembler
4 .SH SYNOPSIS
5 .B avra
6 [\-\-define <symbol>[=<value>]] [\-\-listmac] [\-\-max_errors <number>] [--coff] [--devices] [\-\-version] [\-\-help] [-h]
7 .SH DESCRIPTION
8 .B avra
9 is an assembler for the Atmel AVR microcontroller series, and it is
10 almost compatible to Atmel's own assembler. This means it can handle the
11 same code that Atmels assembler can, but it has some extra features.
12 .PP
13 .IP "Better macro support"
14 More flexible with arguments. Calling of other macros in a macro is possible,
15 and even recursive macros. Global labels in macros are also possible.
16 .IP "Directives for conditional assembly"
17 Added directives: .define .undef .if .ifdef .ifndef .else .elif .endif
18 .PP
19 avra is currently supporting these systems:
20     Linux
21     AmigaOS
22     win32 (windows 95++ and NT)
23 .PP
24 And it should be possible to compile on anything that can eat ANSI-C.
25 .SH OPTIONS
26 .IP "\-\-define <synbol>[=<value>]"
27 Define a symbol. Can be set to a specific value, or 1 if no value is given.
28 .IP "\-\-listmac"
29 List macro expansion in the list file. Same function as the listmac directive.
30 .IP "\-\-max_errors <number>"
31 Specifies the maximm number of errors before exit. Default: 10
32 .IP \-\-version
33 Print out version information.
34 .IP "\-h \-\-help"
35 Print out a short help text.
36 .SH EXPRESSIONS
37 There is one extra function that avra supports in expressions, and that is the
38 function defined(<name>) which returns 1 if <name> is a defined symbol, and 0
39 otherwise.
40 .PP
41 You can force expressions to be calculated before they are parsed by enclosing
42 them inside {}-signs.
43 .SH DIRECTIVES
44 avra supports all directives supported by Atmel's AVRASM, but there are some extra
45 directives added to avra.
46 .IP ".define <name> [<expression>]"
47 Same as the .EQU directive, but uses no =-sign. If you don't specify a expression
48 it will be set to 1.
49 .IP ".undef <name>"
50 Not yet implemented.
51 .IP ".ifdef <name>"
52 Parse following lines if <name> is a defined symbol.
53 .IP ".ifndef <name>"
54 Negated version of .ifdef
55 .IP ".if <expression>"
56 Uses an expression to determine parsing of following lines.
57 .IP ".else"
58 Else.
59 .IP ".elif <expression>"
60 Combined else and if.
61 .IP ".endif"
62 Terminates conditional assembly.
63 .IP ".message <text>"
64 Print out a message text.
65 .IP ".warning <text>"
66 Print out a warning text.
67 .IP ".error <text>"
68 Print out a error text.
69 .SH MACROS
70 avra uses the same consept for arguments that Atmel's AVRASM uses,
71 but it will expand a macro as pure text, and this makes it more powerfull
72 than AVRASM. Using {}-signs around an expression to calculate the
73 expression is also very useful inside macros.
74 .PP
75 Macros can call macros, and also call itself (recursive).
76 .PP
77 Labels defined in a macro is local to that macro. Macros called
78 inside a macro will herritage the local labels of the parrent macro.
79 You can make a local label into a global one by adding the global
80 keyword before the label.
81 .SH COPYRIGHT
82 Copyright (C) 1998-2001 Jon Anders Haugum
83
84 This program is free software; you can redistribute it and/or modify
85 it under the terms of the GNU General Public License as published by
86 the Free Software Foundation; either version 2 of the License, or
87 (at your option) any later version.
88
89 This program is distributed in the hope that it will be useful,
90 but WITHOUT ANY WARRANTY; without even the implied warranty of
91 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
92 GNU General Public License for more details.
93
94 You should have received a copy of the GNU General Public License
95 along with this program; see the file COPYING.  If not, write to
96 the Free Software Foundation, Inc., 59 Temple Place \- Suite 330,
97 Boston, MA 02111-1307, USA.
98 .SH AUTHOR
99 Jon Anders Haugum <jonah@omegav.ntnu.no>