1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-12-13 01:29:57 +00:00
rk65c02/src/emulation.awk
Radosław Kujawa e763ca0d3a Avoid getting instruction definition again when emulating.
While here try to make program counter incrementation more universal
and flexible.
2017-01-22 11:07:19 +01:00

22 lines
332 B
Awk

BEGIN {
FS=","
print "#ifndef _EMULATION_H_"
print "#define _EMULATION_H_"
print "#include \"rk65c02.h\""
print "#include \"instruction.h\""
}
/^OP_/{
if ($5 != "NULL") {
emuls[$5] = $5
}
}
END {
for (i in emuls)
printf "void %s(rk65c02emu_t *, void *id, instruction_t *);\n",i
print "#endif /* _EMULATION_H_ */"
}