fix file loading
This commit is contained in:
@@ -17,7 +17,8 @@ int main() {
|
||||
{INST_HLT, {}, 0, false}
|
||||
};
|
||||
|
||||
memoryLoadProgram(emu->mem, program, sizeof(program)/sizeof(program[0]));
|
||||
RomFile* f = readProgramFromFile("../add.o");
|
||||
memcpy(emu->mem + MEM_PROGRAM_START, f->instructions, sizeof(SerializedInst) * f->header.numInstructions);
|
||||
|
||||
startEmulator(emu);
|
||||
freeEmulator(emu);
|
||||
|
||||
Reference in New Issue
Block a user