mirror of
https://github.com/rkujawa/rk65c02.git
synced 2025-08-09 10:25:11 +00:00
Add awk script to automatically generate emulation.h from CSV.
This commit is contained in:
19
src/emulation.awk
Normal file
19
src/emulation.awk
Normal 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_ */"
|
||||
}
|
||||
|
Reference in New Issue
Block a user