1 /*****************************************************************************/
5 /* Object file writing routines for the ca65 macroassembler */
9 /* (C) 1998 Ullrich von Bassewitz */
11 /* D-70597 Stuttgart */
12 /* EMail: uz@musoftware.de */
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 /*****************************************************************************/
41 #include "../common/filepos.h"
45 /*****************************************************************************/
47 /*****************************************************************************/
52 /* Open the object file for writing, write a dummy header */
55 /* Write an update header and close the object file. */
57 void ObjWrite8 (unsigned V);
58 /* Write an 8 bit value to the file */
60 void ObjWrite16 (unsigned V);
61 /* Write a 16 bit value to the file */
63 void ObjWrite24 (unsigned long V);
64 /* Write a 24 bit value to the file */
66 void ObjWrite32 (unsigned long V);
67 /* Write a 32 bit value to the file */
69 void ObjWriteStr (const char* S);
70 /* Write a string to the object file */
72 void ObjWriteData (const void* Data, unsigned Size);
73 /* Write literal data to the file */
75 void ObjWritePos (const FilePos* Pos);
76 /* Write a file position to the object file */
78 void ObjStartOptions (void);
79 /* Mark the start of the option section */
81 void ObjEndOptions (void);
82 /* Mark the end of the option section */
84 void ObjStartFiles (void);
85 /* Mark the start of the files section */
87 void ObjEndFiles (void);
88 /* Mark the end of the files section */
90 void ObjStartSegments (void);
91 /* Mark the start of the segment section */
93 void ObjEndSegments (void);
94 /* Mark the end of the segment section */
96 void ObjStartImports (void);
97 /* Mark the start of the import section */
99 void ObjEndImports (void);
100 /* Mark the end of the import section */
102 void ObjStartExports (void);
103 /* Mark the start of the export section */
105 void ObjEndExports (void);
106 /* Mark the end of the export section */
108 void ObjStartDbgSyms (void);
109 /* Mark the start of the debug symbol section */
111 void ObjEndDbgSyms (void);
112 /* Mark the end of the debug symbol section */
116 /* End of objfile.h */