prepare for built-in assembler

This commit is contained in:
tildearrow 2023-11-05 19:31:39 -05:00
parent eedf6659bd
commit 01f731ef65

30
src/divasm/divasm.h Normal file
View file

@ -0,0 +1,30 @@
struct DivASMResult {
int line, err;
DivASMResult():
line(-1),
err(0) {}
};
struct DivASMFile {
String name;
SafeReader* data;
};
enum DivASMTarget {
DIV_ASM_TARGET_DUMMY=0,
DIV_ASM_TARGET_6502,
DIV_ASM_TARGET_SPC700
};
class DivASM {
std::vector<DivASMFile> files;
SafeWriter* result;
public:
DivASMResult getError();
SafeWriter* assemble(String name);
void addFile(String name, SafeReader* data);
DivASM(DivASMTarget target);
~DivASM();
};