Skip to content

Commit

Permalink
prepare for built-in assembler
Browse files Browse the repository at this point in the history
  • Loading branch information
tildearrow committed Nov 6, 2023
1 parent eedf665 commit 01f731e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/divasm/divasm.h
Original file line number Diff line number Diff line change
@@ -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();
};

0 comments on commit 01f731e

Please sign in to comment.