2026-07-16 12:42:27 +10:00
|
|
|
#pragma once
|
|
|
|
|
|
2026-07-16 13:29:53 +10:00
|
|
|
#include "../instruction.h"
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
Instruction* at;
|
|
|
|
|
size_t len;
|
|
|
|
|
size_t capacity;
|
|
|
|
|
} Program;
|
|
|
|
|
|
|
|
|
|
Program newProgram(void);
|
|
|
|
|
void addInstructionToProgram(Program* program, Instruction inst);
|
|
|
|
|
void freeProgram(Program* program);
|
|
|
|
|
|
|
|
|
|
Program createProgramFromText(const char* input);
|
|
|
|
|
|
2026-07-16 12:42:27 +10:00
|
|
|
void assemble(const char* input, const char* outputFileName);
|