Move the segment handling stuff from objcode to a separate module
git-svn-id: svn://svn.cc65.org/cc65/trunk@2555 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2001 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* (C) 1998-2003 Ullrich von Bassewitz */
|
||||
/* R<EFBFBD>merstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
@@ -38,80 +38,11 @@
|
||||
|
||||
|
||||
|
||||
/* common */
|
||||
#include "segdefs.h"
|
||||
|
||||
/* ca65 */
|
||||
#include "expr.h"
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Are we in absolute mode or in relocatable mode? */
|
||||
extern int RelocMode;
|
||||
|
||||
/* Definitions for predefined segments */
|
||||
extern SegDef NullSegDef;
|
||||
extern SegDef ZeropageSegDef;
|
||||
extern SegDef DataSegDef;
|
||||
extern SegDef BssSegDef;
|
||||
extern SegDef RODataSegDef;
|
||||
extern SegDef CodeSegDef;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Segment management */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
void UseSeg (const SegDef* D);
|
||||
/* Use the given segment */
|
||||
|
||||
const SegDef* GetCurrentSeg (void);
|
||||
/* Get a pointer to the segment defininition of the current segment */
|
||||
|
||||
unsigned GetSegNum (void);
|
||||
/* Get the number of the current segment */
|
||||
|
||||
void SegAlign (unsigned Power, int Val);
|
||||
/* Align the PC segment to 2^Power. If Val is -1, emit fill fragments (the
|
||||
* actual fill value will be determined by the linker), otherwise use the
|
||||
* given value.
|
||||
*/
|
||||
|
||||
int IsZPSeg (void);
|
||||
/* Return true if the current segment is a zeropage segment */
|
||||
|
||||
int IsFarSeg (void);
|
||||
/* Return true if the current segment is a far segment */
|
||||
|
||||
unsigned GetSegType (unsigned SegNum);
|
||||
/* Return the type of the segment with the given number */
|
||||
|
||||
unsigned long GetPC (void);
|
||||
/* Get the program counter of the current segment */
|
||||
|
||||
void SetAbsPC (unsigned long AbsPC);
|
||||
/* Set the program counter in absolute mode */
|
||||
|
||||
void SegCheck (void);
|
||||
/* Check the segments for range and other errors */
|
||||
|
||||
void SegDump (void);
|
||||
/* Dump the contents of all segments */
|
||||
|
||||
void WriteSegments (void);
|
||||
/* Write the segment data to the object file */
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user