2026-07-15 15:02:54 +10:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include "emu.h"
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
Emulator* emu = initEmulator(0x00010FFF);
|
|
|
|
|
if (!emu) {
|
|
|
|
|
fprintf(stderr, "emu: error: failed to allocate memory for emulator\n");
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-15 15:54:51 +10:00
|
|
|
Instruction inst = decodeInstruction(emu->mem, &emu->pc);
|
|
|
|
|
printf("%s\n", instructionToCStr(inst));
|
|
|
|
|
|
|
|
|
|
freeEmulator(emu);
|
2026-07-15 15:02:54 +10:00
|
|
|
|
|
|
|
|
return 0;
|
2026-07-15 15:54:51 +10:00
|
|
|
}
|