mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-07 16:12:31 +00:00
prepare for built-in assembler
This commit is contained in:
parent
eedf6659bd
commit
01f731ef65
1 changed files with 30 additions and 0 deletions
30
src/divasm/divasm.h
Normal file
30
src/divasm/divasm.h
Normal 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();
|
||||
};
|
Loading…
Reference in a new issue