[Coco] 6809 Opcode informations...
jens
CoCoList at jensdiemer.de
Sat Oct 19 08:12:14 EDT 2013
I need more detailed information about 6809 opcodes for DragonPy emulator.
They are many different informations sprayed around the internet. But my
question is if someone has structured data, which can be easily used in python.
Currently i have some stuff collected here:
https://github.com/jedie/DragonPy/tree/master/MC6809data
From this i have generate the content of this:
<https://docs.google.com/spreadsheet/ccc?key=0Alhtym6D6yKjdFBtNmF0UVR5OW05S3psaURnUTNtSFE>
the destination is to have this information about the opcodes:
* Does the opcode needs the memory content (byte/word) or just a ea?
* does the opcode writes the result back into memory (byte/word)
something like this:
...
'ADD': {'ADDA': {'desc': 'A = A+M',
'operand': 'A',
'ops': {0x8b: 'IMMEDIATE',
0x9b: 'DIRECT',
0xab: 'INDEXED',
0xbb: 'EXTENDED'},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ADDB': {'desc': 'B = B+M',
'operand': 'B',
'ops': {0xcb: 'IMMEDIATE',
0xdb: 'DIRECT',
0xeb: 'INDEXED',
0xfb: 'EXTENDED'},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ADDD': {'desc': 'D = D+M:M+1',
'operand': 'D',
'ops': {0xc3: 'IMMEDIATE_WORD',
0xd3: 'DIRECT',
0xe3: 'INDEXED',
0xf3: 'EXTENDED'},
'read_from_memory': 'WORD',
'write_to_memory': '-'}},
...
My currently full list is here: https://gist.github.com/jedie/7054130
My current solution is simple: I look into the description of opcodes here:
<https://github.com/jedie/DragonPy/blob/d0196f9843eac889456c2cee5a2f13047293200b/MC6809data/MC6809_data2.py#L385-L490>
And the code for this:
read_from_memory = "-"
if "=" in desc:
right = desc.split("=")[1]
if "M:M" in right:
read_from_memory = "WORD"
elif "M" in right:
read_from_memory = "BYTE"
write_to_memory = "-"
if desc.startswith("M:M"):
write_to_memory = "WORD"
elif desc.startswith("M ="):
write_to_memory = "BYTE"
Has someone a complete information?
Mfg.
Jens Diemer
More information about the Coco
mailing list