1 /*****************************************************************************/
5 /* Object file writing routines for the ca65 macroassembler */
9 /* (C) 1998-2003 Ullrich von Bassewitz */
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 /*****************************************************************************/
47 /*****************************************************************************/
49 /*****************************************************************************/
54 /* Open the object file for writing, write a dummy header */
57 /* Write an update header and close the object file. */
59 unsigned long ObjGetFilePos (void);
60 /* Get the current file position */
62 void ObjSetFilePos (unsigned long Pos);
63 /* Set the file position */
65 void ObjWrite8 (unsigned V);
66 /* Write an 8 bit value to the file */
68 void ObjWrite16 (unsigned V);
69 /* Write a 16 bit value to the file */
71 void ObjWrite24 (unsigned long V);
72 /* Write a 24 bit value to the file */
74 void ObjWrite32 (unsigned long V);
75 /* Write a 32 bit value to the file */
77 void ObjWriteVar (unsigned long V);
78 /* Write a variable sized value to the file in special encoding */
80 void ObjWriteStr (const char* S);
81 /* Write a string to the object file */
83 void ObjWriteBuf (const StrBuf* S);
84 /* Write a string to the object file */
86 void ObjWriteData (const void* Data, unsigned Size);
87 /* Write literal data to the file */
89 void ObjWritePos (const FilePos* Pos);
90 /* Write a file position to the object file */
92 void ObjStartOptions (void);
93 /* Mark the start of the option section */
95 void ObjEndOptions (void);
96 /* Mark the end of the option section */
98 void ObjStartFiles (void);
99 /* Mark the start of the files section */
101 void ObjEndFiles (void);
102 /* Mark the end of the files section */
104 void ObjStartSegments (void);
105 /* Mark the start of the segment section */
107 void ObjEndSegments (void);
108 /* Mark the end of the segment section */
110 void ObjStartImports (void);
111 /* Mark the start of the import section */
113 void ObjEndImports (void);
114 /* Mark the end of the import section */
116 void ObjStartExports (void);
117 /* Mark the start of the export section */
119 void ObjEndExports (void);
120 /* Mark the end of the export section */
122 void ObjStartDbgSyms (void);
123 /* Mark the start of the debug symbol section */
125 void ObjEndDbgSyms (void);
126 /* Mark the end of the debug symbol section */
128 void ObjStartLineInfos (void);
129 /* Mark the start of the line info section */
131 void ObjEndLineInfos (void);
132 /* Mark the end of the line info section */
134 void ObjStartStrPool (void);
135 /* Mark the start of the string pool section */
137 void ObjEndStrPool (void);
138 /* Mark the end of the string pool section */
140 void ObjStartAssertions (void);
141 /* Mark the start of the assertion table */
143 void ObjEndAssertions (void);
144 /* Mark the end of the assertion table */
146 void ObjStartScopes (void);
147 /* Mark the start of the scope table */
149 void ObjEndScopes (void);
150 /* Mark the end of the scope table */
154 /* End of objfile.h */