diff --git a/src/common/segdefs.c b/src/common/segdefs.c index a2d3bb7db..cf289104f 100644 --- a/src/common/segdefs.c +++ b/src/common/segdefs.c @@ -80,3 +80,16 @@ SegDef* DupSegDef (const SegDef* Def) +const char* SetTypeToStr (unsigned char Type) +/* Map a segment type into a string */ +{ + switch (Type) { + case SEGTYPE_ABS: return "abs"; + case SEGTYPE_ZP: return "zp"; + case SEGTYPE_FAR: return "far"; + default: return "unknown"; + } +} + + + diff --git a/src/common/segdefs.h b/src/common/segdefs.h index c41edaff3..dd7dfbe7d 100644 --- a/src/common/segdefs.h +++ b/src/common/segdefs.h @@ -77,6 +77,9 @@ void FreeSegDef (SegDef* D); SegDef* DupSegDef (const SegDef* D); /* Duplicate a segment definition and return it */ +const char* SetTypeToStr (unsigned char Type); +/* Map a segment type into a string */ + /* End of segdefs.h */