annotate nasmbuild/nasm-2.13rc9/asm/listing.h @ 10557:23e8673c32c3

<moonythedwarf> ` cd nasmbuild/nasm-2.13rc9; ./configure > confoutput
author HackBot
date Thu, 30 Mar 2017 21:05:13 +0000
parents 587a0a262d22
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10554
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
1 /* ----------------------------------------------------------------------- *
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
2 *
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
3 * Copyright 1996-2016 The NASM Authors - All Rights Reserved
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
4 * See the file AUTHORS included with the NASM distribution for
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
5 * the specific copyright holders.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
6 *
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
7 * Redistribution and use in source and binary forms, with or without
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
8 * modification, are permitted provided that the following
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
9 * conditions are met:
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
10 *
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
11 * * Redistributions of source code must retain the above copyright
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
12 * notice, this list of conditions and the following disclaimer.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
13 * * Redistributions in binary form must reproduce the above
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
14 * copyright notice, this list of conditions and the following
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
15 * disclaimer in the documentation and/or other materials provided
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
16 * with the distribution.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
17 *
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
19 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
31 *
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
32 * ----------------------------------------------------------------------- */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
33
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
34 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
35 * listing.h header file for listing.c
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
36 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
37
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
38 #ifndef NASM_LISTING_H
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
39 #define NASM_LISTING_H
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
40
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
41 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
42 * List-file generators should look like this:
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
43 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
44 struct lfmt {
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
45 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
46 * Called to initialize the listing file generator. Before this
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
47 * is called, the other routines will silently do nothing when
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
48 * called. The `char *' parameter is the file name to write the
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
49 * listing to.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
50 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
51 void (*init)(const char *fname);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
52
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
53 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
54 * Called to clear stuff up and close the listing file.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
55 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
56 void (*cleanup)(void);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
57
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
58 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
59 * Called to output binary data. Parameters are: the offset;
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
60 * the data; the data type. Data types are similar to the
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
61 * output-format interface, only OUT_ADDRESS will _always_ be
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
62 * displayed as if it's relocatable, so ensure that any non-
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
63 * relocatable address has been converted to OUT_RAWDATA by
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
64 * then.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
65 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
66 void (*output)(const struct out_data *data);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
67
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
68 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
69 * Called to send a text line to the listing generator. The
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
70 * `int' parameter is LIST_READ or LIST_MACRO depending on
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
71 * whether the line came directly from an input file or is the
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
72 * result of a multi-line macro expansion.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
73 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
74 void (*line)(int type, char *line);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
75
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
76 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
77 * Called to change one of the various levelled mechanisms in
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
78 * the listing generator. LIST_INCLUDE and LIST_MACRO can be
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
79 * used to increase the nesting level of include files and
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
80 * macro expansions; LIST_TIMES and LIST_INCBIN switch on the
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
81 * two binary-output-suppression mechanisms for large-scale
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
82 * pseudo-instructions.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
83 *
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
84 * LIST_MACRO_NOLIST is synonymous with LIST_MACRO except that
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
85 * it indicates the beginning of the expansion of a `nolist'
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
86 * macro, so anything under that level won't be expanded unless
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
87 * it includes another file.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
88 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
89 void (*uplevel)(int type);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
90
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
91 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
92 * Reverse the effects of uplevel.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
93 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
94 void (*downlevel)(int type);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
95
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
96 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
97 * Called on a warning or error, with the error message.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
98 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
99 void (*error)(int severity, const char *pfx, const char *msg);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
100
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
101 /*
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
102 * Update the current offset. Used to give the listing generator
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
103 * an offset to work with when doing things like
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
104 * uplevel(LIST_TIMES) or uplevel(LIST_INCBIN); see
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
105 * list_set_offset();
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
106 */
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
107 void (*set_offset)(uint64_t offset);
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
108 };
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
109
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
110 extern const struct lfmt *lfmt;
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
111 extern bool user_nolist;
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
112
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
113 #endif