| 1 | // |
| 2 | // ACME - a crossassembler for producing 6502/65c02/65816 code. |
| 3 | // Copyright (C) 1998-2006 Marco Baye |
| 4 | // Have a look at "acme.c" for further info |
| 5 | // |
| 6 | // Section stuff |
| 7 | #ifndef section_H |
| 8 | #define section_H |
| 9 | |
| 10 | #include "config.h" |
| 11 | |
| 12 | |
| 13 | // "section" structure type definition |
| 14 | typedef struct { |
| 15 | zone_t zone; // current zone value |
| 16 | const char* type; // "Zone", "Subzone" or "Macro" |
| 17 | char* title; // zone title, subzone title or macro title |
| 18 | int allocated; // whether title was malloc()'d |
| 19 | } section_t; |
| 20 | |
| 21 | |
| 22 | // Constants |
| 23 | #define ZONE_GLOBAL 0 // Number of "global zone" |
| 24 | |
| 25 | |
| 26 | // Variables |
| 27 | |
| 28 | // current section structure |
| 29 | extern section_t *Section_now; |
| 30 | |
| 31 | |
| 32 | // Prototypes |
| 33 | |
| 34 | // Write given info into given zone structure and activate it |
| 35 | extern void Section_new_zone(section_t*, const char* type, char* title, bool allocated); |
| 36 | // register pseudo opcodes |
| 37 | extern void Section_init(void); |
| 38 | // Setup outermost section |
| 39 | extern void Section_passinit(void); |
| 40 | // Tidy up: If necessary, release section title. |
| 41 | extern void Section_finalize(section_t* section); |
| 42 | |
| 43 | |
| 44 | #endif |