mirror of
https://github.com/cc65/cc65.git
synced 2024-09-29 02:55:20 +00:00
120 lines
4.3 KiB
C
120 lines
4.3 KiB
C
|
/*****************************************************************************/
|
||
|
/* */
|
||
|
/* o65.h */
|
||
|
/* */
|
||
|
/* Module to handle the o65 binary format */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* (C) 1999 Ullrich von Bassewitz */
|
||
|
/* Wacholderweg 14 */
|
||
|
/* D-70597 Stuttgart */
|
||
|
/* EMail: uz@musoftware.de */
|
||
|
/* */
|
||
|
/* */
|
||
|
/* This software is provided 'as-is', without any expressed or implied */
|
||
|
/* warranty. In no event will the authors be held liable for any damages */
|
||
|
/* arising from the use of this software. */
|
||
|
/* */
|
||
|
/* Permission is granted to anyone to use this software for any purpose, */
|
||
|
/* including commercial applications, and to alter it and redistribute it */
|
||
|
/* freely, subject to the following restrictions: */
|
||
|
/* */
|
||
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
||
|
/* claim that you wrote the original software. If you use this software */
|
||
|
/* in a product, an acknowledgment in the product documentation would be */
|
||
|
/* appreciated but is not required. */
|
||
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||
|
/* be misrepresented as being the original software. */
|
||
|
/* 3. This notice may not be removed or altered from any source */
|
||
|
/* distribution. */
|
||
|
/* */
|
||
|
/*****************************************************************************/
|
||
|
|
||
|
|
||
|
|
||
|
#ifndef O65_H
|
||
|
#define O65_H
|
||
|
|
||
|
|
||
|
|
||
|
#include <stdio.h>
|
||
|
|
||
|
#include "extsyms.h"
|
||
|
#include "config.h"
|
||
|
|
||
|
|
||
|
|
||
|
/*****************************************************************************/
|
||
|
/* Data */
|
||
|
/*****************************************************************************/
|
||
|
|
||
|
|
||
|
|
||
|
/* Structure describing the format */
|
||
|
typedef struct O65Desc_ O65Desc;
|
||
|
|
||
|
/* Option tags */
|
||
|
#define O65OPT_FILENAME 0
|
||
|
#define O65OPT_OS 1
|
||
|
#define O65OPT_ASM 2
|
||
|
#define O65OPT_AUTHOR 3
|
||
|
#define O65OPT_TIMESTAMP 4
|
||
|
|
||
|
/* Operating system codes for O65OPT_OS */
|
||
|
#define O65OS_OSA65 1
|
||
|
#define O65OS_LUNIX 2
|
||
|
|
||
|
|
||
|
|
||
|
/*****************************************************************************/
|
||
|
/* Code */
|
||
|
/*****************************************************************************/
|
||
|
|
||
|
|
||
|
|
||
|
O65Desc* NewO65Desc (void);
|
||
|
/* Create, initialize and return a new O65 descriptor struct */
|
||
|
|
||
|
void FreeO65Desc (O65Desc* D);
|
||
|
/* Delete the descriptor struct with cleanup */
|
||
|
|
||
|
void O65Set816 (O65Desc* D);
|
||
|
/* Enable 816 mode */
|
||
|
|
||
|
void O65SetLargeModel (O65Desc* D);
|
||
|
/* Enable a large memory model executable */
|
||
|
|
||
|
void O65SetAlignment (O65Desc* D, unsigned Align);
|
||
|
/* Set the executable alignment */
|
||
|
|
||
|
void O65SetOption (O65Desc* D, unsigned Type, const void* Data, unsigned DataLen);
|
||
|
/* Set an o65 header option */
|
||
|
|
||
|
void O65SetOS (O65Desc* D, unsigned OS);
|
||
|
/* Set an option describing the target operating system */
|
||
|
|
||
|
ExtSym* O65GetImport (O65Desc* D, const char* Ident);
|
||
|
/* Return the imported symbol or NULL if not found */
|
||
|
|
||
|
void O65SetImport (O65Desc* D, const char* Ident);
|
||
|
/* Set an imported identifier */
|
||
|
|
||
|
ExtSym* O65GetExport (O65Desc* D, const char* Ident);
|
||
|
/* Return the exported symbol or NULL if not found */
|
||
|
|
||
|
void O65SetExport (O65Desc* D, const char* Ident);
|
||
|
/* Set an exported identifier */
|
||
|
|
||
|
void O65WriteTarget (O65Desc* D, File* F);
|
||
|
/* Write an o65 output file */
|
||
|
|
||
|
|
||
|
|
||
|
/* End of o65.h */
|
||
|
|
||
|
#endif
|
||
|
|
||
|
|
||
|
|