mirror of
https://github.com/rkujawa/rk65c02.git
synced 2025-01-10 18:29:53 +00:00
Generate instruction set from CSV file and awk script.
This commit is contained in:
parent
372dca2db8
commit
611f51201f
24
src/65c02isa.awk
Executable file
24
src/65c02isa.awk
Executable file
@ -0,0 +1,24 @@
|
||||
BEGIN {
|
||||
FS=","
|
||||
print "#ifndef _65C02ISA_H_"
|
||||
print "#define _65C02ISA_H_"
|
||||
print "#include <stdint.h>"
|
||||
print "#include \"instruction.h\""
|
||||
|
||||
print "const struct instrdef instrs[] = {"
|
||||
}
|
||||
|
||||
{
|
||||
printf "#define %s 0x%X\n", $1, NR-1
|
||||
if (NR < 256)
|
||||
printf "\t{ %s, %s, %s, %d },\n", $1, $2, $3, $4
|
||||
else
|
||||
printf "\t{ %s, %s, %s, %d }\n", $1, $2, $3, $4
|
||||
|
||||
}
|
||||
|
||||
END {
|
||||
print "};"
|
||||
print "#endif /* _65C02ISA_H_ */"
|
||||
}
|
||||
|
256
src/65c02isa.csv
Normal file
256
src/65c02isa.csv
Normal file
@ -0,0 +1,256 @@
|
||||
OP_BRK,"brk",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_NOPI,"nop",IMMEDIATE,2,
|
||||
OP_NOPI,"nop",IMPLIED,1,
|
||||
OP_TSB_ZP,"tsb",ZP,2,
|
||||
OP_ORA_ZP,"ora",ZP,2,
|
||||
OP_ASL_ZP,"asl",ZP,2,
|
||||
OP_RMB0_ZP,"rmb0",ZP,2,
|
||||
OP_PHP,"php",IMPLIED,1,
|
||||
OP_ORA_IMM,"ora",IMMEDIATE,2,
|
||||
OP_ASL_ACC,"asl",ACCUMULATOR,1,
|
||||
OP_NOPI,"nop",IMPLIED,1,
|
||||
OP_TSB_ABS,"tsb",ABSOLUTE,3,
|
||||
OP_ORA_ABS,"abs",ABSOLUTE,3,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_JSR,"jsr",ABSOLUTE,3,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_LDY_IMM,"ldy",IMMEDIATE,2,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_STP,"stp",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_INX,"inx",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_NOP,"nop",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
||||
OP_UNIMPL,"unimpl",IMPLIED,1,
|
|
Loading…
x
Reference in New Issue
Block a user