2016-12-28 20:32:00 +00:00
|
|
|
// ACME - a crossassembler for producing 6502/65c02/65816/65ce02 code.
|
2020-05-06 12:27:32 +00:00
|
|
|
// Copyright (C) 1998-2020 Marco Baye
|
2012-02-27 21:14:46 +00:00
|
|
|
// Have a look at "acme.c" for further info
|
|
|
|
//
|
2016-08-05 09:59:07 +00:00
|
|
|
// section stuff
|
2012-02-27 21:14:46 +00:00
|
|
|
#ifndef section_H
|
|
|
|
#define section_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
|
|
// "section" structure type definition
|
2014-03-11 12:07:11 +00:00
|
|
|
struct section {
|
2017-10-29 23:29:07 +00:00
|
|
|
scope_t local_scope; // section's scope for local symbols
|
|
|
|
scope_t cheap_scope; // section's scope for cheap locals
|
2012-02-27 21:14:46 +00:00
|
|
|
const char *type; // "Zone", "Subzone" or "Macro"
|
|
|
|
char *title; // zone title, subzone title or macro title
|
2020-05-06 12:27:32 +00:00
|
|
|
boolean allocated; // whether title was malloc()'d
|
2012-02-27 21:14:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// current section structure
|
2016-08-05 09:59:07 +00:00
|
|
|
extern struct section *section_now;
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
|
2016-08-05 09:59:07 +00:00
|
|
|
// write given info into given structure and activate it
|
2020-05-06 12:27:32 +00:00
|
|
|
extern void section_new(struct section *section, const char *type, char *title, boolean allocated);
|
2017-10-29 23:29:07 +00:00
|
|
|
// change scope of cheap locals in given section
|
|
|
|
extern void section_new_cheap_scope(struct section *section);
|
2016-08-05 09:59:07 +00:00
|
|
|
// setup outermost section
|
|
|
|
extern void section_passinit(void);
|
|
|
|
// tidy up: if necessary, release section title.
|
|
|
|
extern void section_finalize(struct section *section);
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|