1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-12-11 18:49:16 +00:00

Add awk script to automatically generate emulation.h from CSV.

This commit is contained in:
Radosław Kujawa 2017-01-21 14:52:38 +01:00
parent 0d5916eb7d
commit e3abea91ef

19
src/emulation.awk Normal file
View File

@ -0,0 +1,19 @@
BEGIN {
FS=","
print "#ifndef _EMULATION_H_"
print "#define _EMULATION_H_"
}
/^OP_/{
if ($5 != "NULL") {
emuls[$5] = $5
}
}
END {
for (i in emuls)
printf "void %s(rk65c02emu_t *, instruction_t *)\n",i
print "#endif /* _EMULATION_H_ */"
}