mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-11 18:49:16 +00:00
Adjust C header generation to take CSV header into account.
This commit is contained in:
parent
d2dc51cbd3
commit
1820418c62
@ -7,14 +7,16 @@ BEGIN {
|
||||
print "#include \"emulation.h\""
|
||||
|
||||
print "const struct instrdef instrs[] = {"
|
||||
opcode = 0
|
||||
}
|
||||
|
||||
{
|
||||
printf "#define %s 0x%X\n", $1, NR-1
|
||||
if (NR < 256)
|
||||
/^OP_/{
|
||||
printf "#define %s 0x%X\n", $1, opcode
|
||||
if (opcode < 0xFF)
|
||||
printf "\t{ %s, %s, %s, %d, %s },\n", $1, $2, $3, $4, $5
|
||||
else
|
||||
printf "\t{ %s, %s, %s, %d, %s }\n", $1, $2, $3, $4, $5
|
||||
opcode++
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user