Code: Select all
| 60 0096 | NEG | INDEXED | 6 | 2 | uaaaa |
But in http://www.maddes.net/m6809pm/appendix_a.htm#appA stands only Inherent, Extended, Direct
Maybe the error is in the origin Reference?
Code: Select all
| 60 0096 | NEG | INDEXED | 6 | 2 | uaaaa |
Thanks for the link. This PDF is new to me.Alastair wrote:If you don't have a copy of the "MC6809 Microprocessor Instruction Set Summary" card (where it's shown as "60 NEG INDEXED 6 2") you can download a copy from the forum.
is fromjedie wrote:But in http://www.maddes.net/m6809pm/appendix_a.htm#appA stands only Inherent, Extended, Direct
The origin PDF can be downloaded here: http://bitsavers.trailing-edge.com/pdf/motorola/MC6809-MC6809E 8-Bit Microprocessor Programming Manual [M6809PM/AD]
© Motorola Inc., 1981
Seems that i need more info from every op code:jedie wrote:Now i put the CSV data into a public spreadsheet: https://docs.google.com/spreadsheet/ccc ... sp=sharing
The last thing i added was the columns mem_access, mem_read, mem_write:
mem_access: byte/word
mem_read: Does the op need the memory content?
mem_write: Does the op write back data to memory?
Code: Select all
{'ABX': {'ABX': {'desc': 'X = B+X (Unsigned)',
'operand': '',
'ops': {0x3a: 'INHERENT'},
'read_from_memory': '-',
'write_to_memory': '-'}},
'ADC': {'ADCA': {'desc': 'A = A+M+C',
'operand': 'A',
'ops': {0x89: 'IMMEDIATE',
0x99: 'DIRECT',
0xa9: 'INDEXED',
0xb9: 'EXTENDED'},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ADCB': {'desc': 'B = B+M+C',
'operand': 'B',
'ops': {0xc9: 'IMMEDIATE',
0xd9: 'DIRECT',
0xe9: 'INDEXED',
0xf9: 'EXTENDED'},
'read_from_memory': 'BYTE',
'write_to_memory': '-'}},
'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': '-'}},
...
Code: Select all
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"
Code: Select all
OP_DATA = {ABX: {'HNZVC': '-----',
'condition code': 'Not affected.',
'description': 'Add the 8-bit unsigned value in accumulator B into index register X.',
'instr_desc': 'Add B accumulator to X (unsigned)',
'mnemonic': {ABX: {'desc': 'X = B+X (Unsigned)',
'operand': None,
'ops': {0x3a: {'addr_mode': INHERENT,
'bytes': 1,
'cycles': 3}},
'read_from_memory': None,
'write_to_memory': None}},
'operation': "IX' = IX + ACCB",
'source form': ABX},
ADC: {'HNZVC': 'aaaaa',
'condition code': 'H - Set if a half-carry is generated; cleared otherwise.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Set if an overflow is generated; cleared otherwise.\nC - Set if a carry is generated; cleared otherwise.',
'description': 'Adds the contents of the C (carry) bit and the memory byte into an 8-bit accumulator.',
'instr_desc': 'Add memory to accumulator with carry',
'mnemonic': {'ADCA': {'desc': 'A = A+M+C',
'operand': REG_A,
'ops': {0x89: {'addr_mode': IMMEDIATE,
'bytes': 2,
'cycles': 2},
0x99: {'addr_mode': DIRECT,
'bytes': 2,
'cycles': 4},
0xa9: {'addr_mode': INDEXED,
'bytes': 2,
'cycles': 4},
0xb9: {'addr_mode': EXTENDED,
'bytes': 3,
'cycles': 5}},
'read_from_memory': BYTE,
'write_to_memory': None},
'ADCB': {'desc': 'B = B+M+C',
'operand': REG_B,
'ops': {0xc9: {'addr_mode': IMMEDIATE,
'bytes': 2,
'cycles': 2},
0xd9: {'addr_mode': DIRECT,
'bytes': 2,
'cycles': 4},
0xe9: {'addr_mode': INDEXED,
'bytes': 2,
'cycles': 4},
0xf9: {'addr_mode': EXTENDED,
'bytes': 3,
'cycles': 5}},
'read_from_memory': BYTE,
'write_to_memory': None}},
'operation': "R' = R + M + C",
'source form': 'ADCA P; ADCB P'},
ADD: {'HNZVC': 'aaaaa',
...
As far as I understand LEA, if a memory access happen depends on the addressing mode.jedie wrote:I didn't found a better reference. So i merge the information i have, with this script: https://github.com/jedie/DragonPy/blob/ ... 9_data2.py
The result is this: https://github.com/jedie/DragonPy/blob/ ... ta_raw2.py
[..]
Code: Select all
LEA: {'HNZVC': '-----',
[..]
'instr_desc': 'Load effective address into stack pointer',
'mnemonic': {'LEAS': {'desc': 'S = EA',
'operand': REG_S,
'ops': {0x32: {'addr_mode': INDEXED,
'bytes': 2,
'cycles': 4}},
'read_from_memory': None,
'write_to_memory': None},
'LEAU': {'desc': 'U = EA',
'operand': REG_U,
'ops': {0x33: {'addr_mode': INDEXED,
'bytes': 2,
'cycles': 4}},
'read_from_memory': None,
'write_to_memory': None},
'LEAX': {'desc': 'X = EA',
'operand': REG_X,
'ops': {0x30: {'addr_mode': INDEXED,
'bytes': 2,
'cycles': 4}},
'read_from_memory': None,
'write_to_memory': None},
'LEAY': {'desc': 'Y = EA',
'operand': REG_Y,
'ops': {0x31: {'addr_mode': INDEXED,
'bytes': 2,
'cycles': 4}},
'read_from_memory': None,
'write_to_memory': None}},
'operation': "R' = EA",
'source form': 'LEAX, LEAY, LEAS, LEAU'},
...
Code: Select all
'read_from_memory': None,
'write_to_memory': None}},