| 9120e874 Andy McCall | 1 | # ******************************************************************************************* |
| 2 | # ******************************************************************************************* |
|
| 3 | # |
|
| 4 | # File: extract.py |
|
| 5 | # Date: 3rd September 2019 |
|
| 6 | # Purpose: Extract opcode descriptions from tables.h.org |
|
| 7 | # Author: Paul Robson ([email protected]) |
|
| 8 | # |
|
| 9 | # ******************************************************************************************* |
|
| 10 | # ******************************************************************************************* |
|
| 11 | |
|
| 12 | |
|
| 13 | # |
|
| 14 | # Get one element from one table. |
|
| 15 | # |
|
| 16 | |
|
| 17 | = |
|
| 18 | = |
|
| 19 | assert is not None, |
|
| 20 | return |
|
| 21 | ||
| 22 | # |
|
| 23 | # Convert a tables.h type file to a list of opcodes |
|
| 24 | # |
|
| 25 | |
|
| 26 | = |
|
| 27 | # |
|
| 28 | # Pull out data. |
|
| 29 | # |
|
| 30 | = |
|
| 31 | = |
|
| 32 | = |
|
| 33 | = |
|
| 34 | |
|
| 35 | = |
|
| 36 | |
|
| 37 | = |
|
| 38 | = |
|
| 39 | |
|
| 40 | |
|
| 41 | # |
|
| 42 | # Stop it being overwritten accidentally. Should be no reason to regenerate 6502.opcodes |
|
| 43 | # The pair is so you can compare the two sets of opcodes. (dis-include the 65c02.opcodes |
|
| 44 | # extensions first.) |
|
| 45 | # |
|
| 46 | #convert("tables.h.org","6502.opcodes") |
|
| 47 | #convert("tables.h","/tmp/6502.opcodes") |