Expose link def arrays to RGBASM

This commit is contained in:
ISSOtm
2020-02-03 14:58:25 +01:00
parent 09dff85d5b
commit 24f41ef897
6 changed files with 88 additions and 80 deletions

View File

@@ -53,29 +53,6 @@ struct Section {
struct Symbol const **symbols;
};
extern uint16_t startaddr[];
extern uint16_t maxsize[];
extern uint32_t bankranges[][2];
extern char const * const typeNames[SECTTYPE_INVALID];
/**
* Computes a memory region's end address (last byte), eg. 0x7FFF
* @return The address of the last byte in that memory region
*/
static inline uint16_t endaddr(enum SectionType type)
{
return startaddr[type] + maxsize[type] - 1;
}
/**
* Computes a memory region's number of banks
* @return The number of banks, 1 for regions without banking
*/
static inline uint32_t nbbanks(enum SectionType type)
{
return bankranges[type][1] - bankranges[type][0] + 1;
}
/*
* Execute a callback for each section currently registered.
* This is to avoid exposing the data structure in which sections are stored.