devices working

This commit is contained in:
2026-07-16 14:05:01 +10:00
parent 42fab467f1
commit fb3efc77c3
7 changed files with 123 additions and 25 deletions

View File

@@ -9,10 +9,17 @@ int main() {
return 1;
}
RomFile* romFile = readProgramFromFile("../test.bin");
memoryLoadProgram(emu->mem, romFile->instructions, romFile->header.numInstructions);
Instruction program[] = {
{INST_MVI, {REG_A}, 0, true},
{INST_MVI, {REG_B}, 123, true},
{INST_PORT, {REG_A, REG_B, 0}, 0, false},
{INST_PORT, {REG_A, REG_B, 1}, 0, false},
{INST_HLT, {}, 0, false}
};
//startEmulator(emu);
memoryLoadProgram(emu->mem, program, sizeof(program)/sizeof(program[0]));
startEmulator(emu);
freeEmulator(emu);
return 0;