Hold address sizes in an unsigned char
git-svn-id: svn://svn.cc65.org/cc65/trunk@2680 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -102,7 +102,7 @@ Segment* ActiveSeg = &CodeSeg;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static Segment* NewSegment (const char* Name, unsigned AddrSize)
|
static Segment* NewSegment (const char* Name, unsigned char AddrSize)
|
||||||
/* Create a new segment, insert it into the global list and return it */
|
/* Create a new segment, insert it into the global list and return it */
|
||||||
{
|
{
|
||||||
Segment* S;
|
Segment* S;
|
||||||
@@ -261,7 +261,7 @@ void SegAlign (unsigned Power, int Val)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned GetSegAddrSize (unsigned SegNum)
|
unsigned char GetSegAddrSize (unsigned SegNum)
|
||||||
/* Return the address size of the segment with the given number */
|
/* Return the address size of the segment with the given number */
|
||||||
{
|
{
|
||||||
/* Search for the segment */
|
/* Search for the segment */
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ INLINE unsigned GetCurrentSegNum (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_INLINE)
|
#if defined(HAVE_INLINE)
|
||||||
INLINE unsigned GetCurrentSegAddrSize (void)
|
INLINE unsigned char GetCurrentSegAddrSize (void)
|
||||||
/* Get the address size of the current segment */
|
/* Get the address size of the current segment */
|
||||||
{
|
{
|
||||||
return ActiveSeg->Def->AddrSize;
|
return ActiveSeg->Def->AddrSize;
|
||||||
@@ -131,7 +131,7 @@ void SegAlign (unsigned Power, int Val);
|
|||||||
* given value.
|
* given value.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned GetSegAddrSize (unsigned SegNum);
|
unsigned char GetSegAddrSize (unsigned SegNum);
|
||||||
/* Return the address size of the segment with the given number */
|
/* Return the address size of the segment with the given number */
|
||||||
|
|
||||||
unsigned long GetPC (void);
|
unsigned long GetPC (void);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
SegDef* NewSegDef (const char* Name, unsigned AddrSize)
|
SegDef* NewSegDef (const char* Name, unsigned char AddrSize)
|
||||||
/* Create a new segment definition and return it */
|
/* Create a new segment definition and return it */
|
||||||
{
|
{
|
||||||
/* Allocate memory */
|
/* Allocate memory */
|
||||||
@@ -78,3 +78,4 @@ SegDef* DupSegDef (const SegDef* Def)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,8 @@
|
|||||||
/* Segment definition */
|
/* Segment definition */
|
||||||
typedef struct SegDef SegDef;
|
typedef struct SegDef SegDef;
|
||||||
struct SegDef {
|
struct SegDef {
|
||||||
char* Name; /* Segment name */
|
char* Name; /* Segment name */
|
||||||
unsigned AddrSize; /* Default address size */
|
unsigned char AddrSize; /* Default address size */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Initializer for static SegDefs */
|
/* Initializer for static SegDefs */
|
||||||
@@ -67,7 +67,7 @@ struct SegDef {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
SegDef* NewSegDef (const char* Name, unsigned AddrSize);
|
SegDef* NewSegDef (const char* Name, unsigned char AddrSize);
|
||||||
/* Create a new segment definition and return it */
|
/* Create a new segment definition and return it */
|
||||||
|
|
||||||
void FreeSegDef (SegDef* D);
|
void FreeSegDef (SegDef* D);
|
||||||
|
|||||||
Reference in New Issue
Block a user