1 /*****************************************************************************/
5 /* Disassembler output routines */
9 /* (C) 2000-2007 Ullrich von Bassewitz */
10 /* Roemerstrasse 52 */
11 /* D-70794 Filderstadt */
12 /* EMail: uz@cc65.org */
15 /* This software is provided 'as-is', without any expressed or implied */
16 /* warranty. In no event will the authors be held liable for any damages */
17 /* arising from the use of this software. */
19 /* Permission is granted to anyone to use this software for any purpose, */
20 /* including commercial applications, and to alter it and redistribute it */
21 /* freely, subject to the following restrictions: */
23 /* 1. The origin of this software must not be misrepresented; you must not */
24 /* claim that you wrote the original software. If you use this software */
25 /* in a product, an acknowledgment in the product documentation would be */
26 /* appreciated but is not required. */
27 /* 2. Altered source versions must be plainly marked as such, and must not */
28 /* be misrepresented as being the original software. */
29 /* 3. This notice may not be removed or altered from any source */
32 /*****************************************************************************/
46 /*****************************************************************************/
48 /*****************************************************************************/
52 void OpenOutput (const char* Name);
53 /* Open the given file for output */
55 void CloseOutput (void);
56 /* Close the output file */
58 void Output (const char* Format, ...) attribute ((format(printf, 1, 2)));
59 /* Write to the output file */
61 void Indent (unsigned N);
62 /* Make sure the current line column is at position N (zero based) */
65 /* Add a linefeed to the output file */
67 void DefLabel (const char* Name);
68 /* Define a label with the given name */
70 void DefForward (const char* Name, const char* Comment, unsigned Offs);
71 /* Define a label as "* + x", where x is the offset relative to the
75 void DefConst (const char* Name, const char* Comment, unsigned Addr);
76 /* Define an address constant */
78 void StartSegment (const char* Name, unsigned AddrSize);
81 void EndSegment (void);
84 void OneDataByte (void);
85 /* Output a .byte line with the current code byte */
87 void DataByteLine (unsigned ByteCount);
88 /* Output a line with bytes */
90 void DataDByteLine (unsigned ByteCount);
91 /* Output a line with dbytes */
93 void DataWordLine (unsigned ByteCount);
94 /* Output a line with words */
96 void DataDWordLine (unsigned ByteCount);
97 /* Output a line with dwords */
99 void SeparatorLine (void);
100 /* Print a separator line */
102 void UserComment (const char* Comment);
103 /* Output a comment line */
105 void LineComment (unsigned PC, unsigned Count);
106 /* Add a line comment with the PC and data bytes */
108 void OutputSettings (void);
109 /* Output CPU and other settings */
113 /* End of output.h */