Skip to content

Instantly share code, notes, and snippets.

@jedie
Last active December 25, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedie/7054130 to your computer and use it in GitHub Desktop.
Save jedie/7054130 to your computer and use it in GitHub Desktop.
{'ABX': {'ABX': {'desc': 'X = B+X (Unsigned)',
'operand': '',
'ops': {0x3a: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'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)',
'operation': "IX' = IX + ACCB",
'source form': 'ABX'},
'ADC': {'ADCA': {'desc': 'A = A+M+C',
'operand': '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': '-'},
'ADCB': {'desc': 'B = B+M+C',
'operand': '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': '-'},
'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',
'operation': "R' = R + M + C",
'source form': 'ADCA P; ADCB P'},
'ADD': {'ADDA': {'desc': 'A = A+M',
'operand': 'A',
'ops': {0x8b: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x9b: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xab: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xbb: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ADDB': {'desc': 'B = B+M',
'operand': 'B',
'ops': {0xcb: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xdb: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xeb: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xfb: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ADDD': {'desc': 'D = D+M:M+1',
'operand': 'D',
'ops': {0xc3: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 3,
'cycles': 4},
0xd3: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0xe3: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0xf3: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'WORD',
'write_to_memory': '-'},
'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 memory byte into an 8-bit accumulator.',
'instr_desc': 'Add memory to accumulator',
'operation': "R' = R + M",
'source form': 'ADDA P; ADDB P'},
'AND': {'ANDA': {'desc': 'A = A && M',
'operand': 'A',
'ops': {0x84: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x94: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa4: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb4: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ANDB': {'desc': 'B = B && M',
'operand': 'B',
'ops': {0xc4: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xd4: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe4: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf4: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ANDCC': {'desc': 'C = CC && IMM',
'operand': 'CC',
'ops': {0x1c: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'HNZVC': '-aa0-',
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Always cleared.\nC - Not affected.',
'description': 'Performs the logical AND operation between the contents of an accumulator and the contents of memory location M and the result is stored in the accumulator.',
'instr_desc': 'AND memory with accumulator',
'operation': "R' = R AND M",
'source form': 'ANDA P; ANDB P'},
'ASR': {'ASR': {'desc': 'M = Arithmetic shift M right',
'operand': '',
'ops': {0x7: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x67: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x77: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'ASRA': {'desc': 'A = Arithmetic shift A right',
'operand': 'A',
'ops': {0x47: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'ASRB': {'desc': 'B = Arithmetic shift B right',
'operand': 'B',
'ops': {0x57: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': 'uaa-s',
'condition code': 'H - Undefined.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Not affected.\nC - Loaded with bit zero of the original operand.',
'description': 'Shifts all bits of the operand one place to the right. Bit seven is held constant. Bit zero is shifted into the C (carry) bit.',
'instr_desc': 'Arithmetic shift of accumulator or memory right',
'operation': 'b7 -> -> C\nb7 -> b0',
'source form': 'ASR Q; ASRA; ASRB'},
'BEQ': {'BEQ': {'desc': '-',
'operand': '',
'ops': {0x27: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBEQ': {'desc': '-',
'operand': '-',
'ops': {0x1027: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Tests the state of the Z (zero) bit and causes a branch if it is set.\nWhen used after a subtract or compare operation, this instruction will branch if the compared values, signed or unsigned, were exactly the same.',
'instr_desc': 'Branch if equal',
'operation': "TEMP = MI IFF Z = 1 then PC' = PC + TEMP",
'source form': 'BEQ dd; LBEQ DDDD'},
'BGE': {'BGE': {'desc': '-',
'operand': '',
'ops': {0x2c: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBGE': {'desc': '-',
'operand': '-',
'ops': {0x102c: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Causes a branch if the N (negative) bit and the V (overflow) bit are either both set or both clear.\nThat is, branch if the sign of a valid twos complement result is, or would be, positive.\nWhen used after a subtract or compare operation on twos complement values, this instruction will branch if the register was greater than or equal to the memory operand.',
'instr_desc': 'Branch if greater than or equal (signed)',
'operation': "TEMP = MI IFF [N XOR V] = 0 then PC' = PC + TEMP",
'source form': 'BGE dd; LBGE DDDD'},
'BGT': {'BGT': {'desc': '-',
'operand': '',
'ops': {0x2e: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBGT': {'desc': '-',
'operand': '-',
'ops': {0x102e: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Causes a branch if the N (negative) bit and V (overflow) bit are either both set or both clear and the Z (zero) bit is clear.\nIn other words, branch if the sign of a valid twos complement result is, or would be, positive and not zero.\nWhen used after a subtract or compare operation on twos complement values, this instruction will branch if the register was greater than the memory operand.',
'instr_desc': 'Branch if greater (signed)',
'operation': "TEMP = MI IFF Z AND [N XOR V] = 0 then PC' = PC + TEMP",
'source form': 'BGT dd; LBGT DDDD'},
'BHI': {'BHI': {'desc': '-',
'operand': '',
'ops': {0x22: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBHI': {'desc': '-',
'operand': '-',
'ops': {0x1022: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'Generally not useful after INC/DEC, LD/TST, and TST/CLR/COM instructions.',
'condition code': 'Not affected.',
'description': 'Causes a branch if the previous operation caused neither a carry nor a zero result.\nWhen used after a subtract or compare operation on unsigned binary values, this instruction will branch if the register was higher than the memory operand.',
'instr_desc': 'Branch if higher (unsigned)',
'operation': "TEMP = MI IFF [ C OR Z ] = 0 then PC' = PC + TEMP",
'source form': 'BHI dd; LBHI DDDD'},
'BHS': {'BCC': {'desc': '-',
'operand': '-',
'ops': {0x24: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBCC': {'desc': '-',
'operand': '-',
'ops': {0x1024: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'This is a duplicate assembly-language mnemonic for the single machine instruction BCC.\nGenerally not useful after INC/DEC, LD/ST, and TST/CLR/COM instructions.',
'condition code': 'Not affected.',
'description': 'Tests the state of the C (carry) bit and causes a branch if it is clear.\nWhen used after a subtract or compare on unsigned binary values, this instruction will branch if the register was higher than or the same as the memory operand.',
'instr_desc': 'Branch if higher or same (unsigned)',
'operation': "TEMP = MI IFF C = 0 then PC' = PC + MI",
'source form': 'BHS dd; LBHS DDDD'},
'BIT': {'BITA': {'desc': 'Bit Test A (M&&A)',
'operand': 'A',
'ops': {0x85: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x95: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa5: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb5: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'BITB': {'desc': 'Bit Test B (M&&B)',
'operand': 'B',
'ops': {0xc5: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xd5: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe5: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf5: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-aa0-',
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Always cleared.\nC - Not affected.',
'description': 'Performs the logical AND of the contents of accumulator A or B and the contents of memory location M and modifies the condition codes accordingly.\nThe contents of accumulator A or B and memory location M are not affected.',
'instr_desc': 'Bit test memory with accumulator',
'operation': 'TEMP = R AND M',
'source form': 'Bit P'},
'BLE': {'BLE': {'desc': '-',
'operand': '',
'ops': {0x2f: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBLE': {'desc': '-',
'operand': '-',
'ops': {0x102f: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Causes a branch if the exclusive OR of the N (negative) and V (overflow) bits is 1 or if the Z (zero) bit is set.\nThat is, branch if the sign of a valid twos complement result is, or would be, negative.\nWhen used after a subtract or compare operation on twos complement values, this instruction will branch if the register was less than or equal to the memory operand.',
'instr_desc': 'Branch if less than or equal (signed)',
'operation': "TEMP = MI IFF Z OR [ N XOR V ] = 1 then PC' = PC + TEMP",
'source form': 'BLE dd; LBLE DDDD'},
'BLO': {'BLO': {'desc': '-',
'operand': '',
'ops': {0x25: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBCS': {'desc': '-',
'operand': '-',
'ops': {0x1025: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'This is a duplicate assembly-language mnemonic for the single machine instruction BCS.\nGenerally not useful after INC/DEC, LD/ST, and TST/CLR/COM instructions.',
'condition code': 'Not affected.',
'description': 'Tests the state of the C (carry) bit and causes a branch if it is set.\nWhen used after a subtract or compare on unsigned binary values, this instruction will branch if the register was lower than the memory operand.',
'instr_desc': 'Branch if lower (unsigned)',
'operation': "TEMP = MI IFF C = 1 then PC' = PC + TEMP",
'source form': 'BLO dd; LBLO DDDD'},
'BLS': {'BLS': {'desc': '-',
'operand': '',
'ops': {0x23: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBLS': {'desc': '-',
'operand': '-',
'ops': {0x1023: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'Generally not useful after INC/DEC, LD/ST, and TST/CLR/COM instructions.',
'condition code': 'Not affected.',
'description': 'Causes a branch if the previous operation caused either a carry or a zero result.\nWhen used after a subtract or compare operation on unsigned binary values, this instruction will branch if the register was lower than or the same as the memory operand.',
'instr_desc': 'Branch if lower or same (unsigned)',
'operation': "TEMP = MI IFF (C OR Z) = 1 then PC' = PC + TEMP",
'source form': 'BLS dd; LBLS DDDD'},
'BLT': {'BLT': {'desc': '-',
'operand': '',
'ops': {0x2d: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBLT': {'desc': '-',
'operand': '-',
'ops': {0x102d: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Causes a branch if either, but not both, of the N (negative) or V (overflow) bits is set.\nThat is, branch if the sign of a valid twos complement result is, or would be, negative.\nWhen used after a subtract or compare operation on twos complement binary values, this instruction will branch if the register was less than the memory operand.',
'instr_desc': 'Branch if less than (signed)',
'operation': "TEMP = MI IFF [ N XOR V ] = 1 then PC' = PC + TEMP",
'source form': 'BLT dd; LBLT DDDD'},
'BMI': {'BMI': {'desc': '-',
'operand': '',
'ops': {0x2b: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBMI': {'desc': '-',
'operand': '-',
'ops': {0x102b: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'When used after an operation on signed binary values, this instruction will branch if the result is minus.\nIt is generally preferred to use the LBLT instruction after signed operations.',
'condition code': 'Not affected.',
'description': 'Tests the state of the N (negative) bit and causes a branch if set.\nThat is, branch if the sign of the twos complement result is negative.',
'instr_desc': 'Branch if minus',
'operation': "TEMP = MI IFF N = 1 then PC' = PC + TEMP",
'source form': 'BMI dd; LBMI DDDD'},
'BNE': {'BNE': {'desc': '-',
'operand': '',
'ops': {0x26: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBNE': {'desc': '-',
'operand': '-',
'ops': {0x1026: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Tests the state of the Z (zero) bit and causes a branch if it is clear.\nWhen used after a subtract or compare operation on any binary values, this instruction will branch if the register is, or would be, not equal to the memory operand.',
'instr_desc': 'Branch if not equal',
'operation': "TEMP = MI IFF Z = 0 then PC' = PC + TEMP",
'source form': 'BNE dd; LBNE DDDD'},
'BPL': {'BPL': {'desc': '-',
'operand': '',
'ops': {0x2a: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBPL': {'desc': '-',
'operand': '-',
'ops': {0x102a: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'When used after an operation on signed binary values, this instruction will branch if the result (possibly invalid) is positive.\nIt is generally preferred to use the BGE instruction after signed operations.',
'condition code': 'Not affected.',
'description': 'Tests the state of the N (negative) bit and causes a branch if it is clear.\nThat is, branch if the sign of the twos complement result is positive.',
'instr_desc': 'Branch if plus',
'operation': "TEMP = MI IFF N = 0 then PC' = PC + TEMP",
'source form': 'BPL dd; LBPL DDDD'},
'BRA': {'BRA': {'desc': '-',
'operand': '',
'ops': {0x20: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBRA': {'desc': '-',
'operand': '-',
'ops': {0x16: {'addr_mode': 'RELATIVE_WORD',
'bytes': 3,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Causes an unconditional branch.',
'instr_desc': 'Branch always',
'operation': "TEMP = MI PC' = PC + TEMP",
'source form': 'BRA dd; LBRA DDDD'},
'BRN': {'BRN': {'desc': '-',
'operand': '',
'ops': {0x21: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBRN': {'desc': '-',
'operand': '-',
'ops': {0x1021: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Does not cause a branch.\nThis instruction is essentially a no operation, but has a bit pattern logically related to branch always.',
'instr_desc': 'Branch never',
'operation': 'TEMP = MI',
'source form': 'BRN dd; LBRN DDDD'},
'BSR': {'BSR': {'desc': '-',
'operand': '',
'ops': {0x8d: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 7}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBSR': {'desc': '-',
'operand': '-',
'ops': {0x17: {'addr_mode': 'RELATIVE_WORD',
'bytes': 3,
'cycles': 9}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'A return from subroutine (RTS) instruction is used to reverse this process and must be the last instruction executed in a subroutine.',
'condition code': 'Not affected.',
'description': 'The program counter is pushed onto the stack.\nThe program counter is then loaded with the sum of the program counter and the offset.',
'instr_desc': 'Branch to subroutine',
'operation': "TEMP = MI SP' = SP-1, (SP) = PCL SP' = SP-1, (SP) = PCH PC' = PC + TEMP",
'source form': 'BSR dd; LBSR DDDD'},
'BVC': {'BVC': {'desc': '-',
'operand': '',
'ops': {0x28: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBVC': {'desc': '-',
'operand': '-',
'ops': {0x1028: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Tests the state of the V (overflow) bit and causes a branch if it is clear.\nThat is, branch if the twos complement result was valid.\nWhen used after an operation on twos complement binary values, this instruction will branch if there was no overflow.',
'instr_desc': 'Branch if valid twos complement result',
'operation': "TEMP = MI IFF V = 0 then PC' = PC + TEMP",
'source form': 'BVC dd; LBVC DDDD'},
'BVS': {'BVS': {'desc': '-',
'operand': '',
'ops': {0x29: {'addr_mode': 'RELATIVE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-----',
'LBVS': {'desc': '-',
'operand': '-',
'ops': {0x1029: {'addr_mode': 'RELATIVE_WORD',
'bytes': 4,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Tests the state of the V (overflow) bit and causes a branch if it is set.\nThat is, branch if the twos complement result was invalid.\nWhen used after an operation on twos complement binary values, this instruction will branch if there was an overflow.',
'instr_desc': 'Branch if invalid twos complement result',
'operation': "TEMP' = MI IFF V = 1 then PC' = PC + TEMP",
'source form': 'BVS dd; LBVS DDDD'},
'CLR': {'CLR': {'desc': 'M = 0',
'operand': '',
'ops': {0xf: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x6f: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x7f: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': '-',
'write_to_memory': 'BYTE'},
'CLRA': {'desc': 'A = 0',
'operand': 'A',
'ops': {0x4f: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'CLRB': {'desc': 'B = 0',
'operand': 'B',
'ops': {0x5f: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-0100',
'condition code': 'H - Not affected.\nN - Always cleared.\nZ - Always set.\nV - Always cleared.\nC - Always cleared.',
'description': 'Accumulator A or B or memory location M is loaded with 00000000 2 .\nNote that the EA is read during this operation.',
'instr_desc': 'Clear accumulator or memory location',
'operation': 'TEMP = M M = 00 16',
'source form': 'CLR Q'},
'CMP': {'CMPA': {'desc': 'Compare M from A',
'operand': 'A',
'ops': {0x81: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x91: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa1: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb1: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'CMPB': {'desc': 'Compare M from B',
'operand': 'B',
'ops': {0xc1: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xd1: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe1: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf1: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'CMPD': {'desc': 'Compare M:M+1 from D',
'operand': 'D',
'ops': {0x1083: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 4,
'cycles': 5},
0x1093: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 7},
0x10a3: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 7},
0x10b3: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 8}},
'read_from_memory': '-',
'write_to_memory': '-'},
'CMPS': {'desc': 'Compare M:M+1 from S',
'operand': 'S',
'ops': {0x118c: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 4,
'cycles': 5},
0x119c: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 7},
0x11ac: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 7},
0x11bc: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 8}},
'read_from_memory': '-',
'write_to_memory': '-'},
'CMPU': {'desc': 'Compare M:M+1 from U',
'operand': 'U',
'ops': {0x1183: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 4,
'cycles': 5},
0x1193: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 7},
0x11a3: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 7},
0x11b3: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 8}},
'read_from_memory': '-',
'write_to_memory': '-'},
'CMPX': {'desc': 'Compare M:M+1 from X',
'operand': 'X',
'ops': {0x8c: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 3,
'cycles': 4},
0x9c: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0xac: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0xbc: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': '-',
'write_to_memory': '-'},
'CMPY': {'desc': 'Compare M:M+1 from Y',
'operand': 'Y',
'ops': {0x108c: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 4,
'cycles': 5},
0x109c: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 7},
0x10ac: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 7},
0x10bc: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 8}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': 'uaaaa',
'condition code': 'H - Undefined.\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 borrow is generated; cleared otherwise.',
'description': 'Compares the contents of memory location to the contents of the specified register and sets the appropriate condition codes.\nNeither memory location M nor the specified register is modified.\nThe carry flag represents a borrow and is set to the inverse of the resulting binary carry.',
'instr_desc': 'Compare memory from accumulator',
'operation': 'TEMP = R - M',
'source form': 'CMPA P; CMPB P'},
'COM': {'COM': {'desc': 'M = complement(M)',
'operand': '',
'ops': {0x3: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x63: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x73: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'COMA': {'desc': 'A = complement(A)',
'operand': 'A',
'ops': {0x43: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'COMB': {'desc': 'B = complement(B)',
'operand': 'B',
'ops': {0x53: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-aa01',
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Always cleared.\nC - Always set.',
'description': 'Replaces the contents of memory location M or accumulator A or B with its logical complement.\nWhen operating on unsigned values, only BEQ and BNE branches can be expected to behave properly following a COM instruction.\nWhen operating on twos complement values, all signed branches are available.',
'instr_desc': 'Complement accumulator or memory location',
'operation': "M' = 0 + M",
'source form': 'COM Q; COMA; COMB'},
'CWAI': {'CWAI': {'desc': 'CC = CC ^ IMM; (Wait for Interrupt)',
'operand': '',
'ops': {0x3c: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 21}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'HNZVC': 'ddddd',
'comment': 'The following immediate values will have the following results: FF = enable neither EF = enable IRQ BF = enable FIRQ AF = enable both',
'condition code': 'Affected according to the operation.',
'description': 'This instruction ANDs an immediate byte with the condition code register which may clear the interrupt mask bits I and F, stacks the entire machine state on the hardware stack and then looks for an interrupt.\nWhen a non-masked interrupt occurs, no further machine state information need be saved before vectoring to the interrupt handling routine.\nThis instruction replaced the MC6800 CLI WAI sequence, but does not place the buses in a high-impedance state.\nA FIRQ (fast interrupt request) may enter its interrupt handler with its entire machine state saved.\nThe RTI (return from interrupt) instruction will automatically return the entire machine state after testing the E (entire) bit of the recovered condition code register.',
'instr_desc': 'AND condition code register, then wait for interrupt',
'operation': "CCR = CCR AND MI (Possibly clear masks) Set E (entire state saved) SP' = SP-1, (SP) = PCL SP' = SP-1, (SP) = PCH SP' = SP-1, (SP) = USL SP' = SP-1, (SP) = USH SP' = SP-1, (SP) = IYL SP' = SP-1, (SP) = IYH SP' = SP-1, (SP) = IXL SP' = SP-1, (SP) = IXH SP' = SP-1, (SP) = DPR SP' = SP-1, (SP) = ACCB SP' = SP-1, (SP) = ACCA SP' = SP-1, (SP) = CCR",
'source form': 'CWAI #$XX E F H I N Z V C'},
'DAA': {'DAA': {'desc': 'Decimal Adjust A',
'operand': '',
'ops': {0x19: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-aa0a',
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Undefined.\nC - Set if a carry is generated or if the carry bit was set before the operation; cleared otherwise.',
'description': 'The sequence of a single-byte add instruction on accumulator A (either ADDA or ADCA) and a following decimal addition adjust instruction results in a BCD addition with an appropriate carry bit.\nBoth values to be added must be in proper BCD form (each nibble such that: 0 <= nibble <= 9).\nMultiple-precision addition must add the carry generated by this decimal addition adjust into the next higher digit during the add operation (ADCA) immediately prior to the next decimal addition adjust.',
'instr_desc': 'Decimal adjust A accumulator',
'operation': 'Decimal Adjust A',
'source form': 'DAA'},
'DEC': {'DEC': {'desc': 'M = M 1',
'operand': '',
'ops': {0xa: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x6a: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x7a: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'DECA': {'desc': 'A = A 1',
'operand': 'A',
'ops': {0x4a: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'DECB': {'desc': 'B = B 1',
'operand': 'B',
'ops': {0x5a: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': '-aaa-',
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Set if the original operand was 10000000 2 ; cleared otherwise.\nC - Not affected.',
'description': 'Subtract one from the operand.\nThe carry bit is not affected, thus allowing this instruction to be used as a loop counter in multiple-precision computations.\nWhen operating on unsigned values, only BEQ and BNE branches can be expected to behave consistently.\nWhen operating on twos complement values, all signed branches are available.',
'instr_desc': 'Decrement accumulator or memory location',
'operation': "M' = M - 1",
'source form': 'DEC Q; DECA; DECB'},
'EOR': {'EORA': {'desc': 'A = A XOR M',
'operand': 'A',
'ops': {0x88: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x98: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa8: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb8: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'EORB': {'desc': 'B = M XOR B',
'operand': 'B',
'ops': {0xc8: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xd8: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe8: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf8: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'HNZVC': '-aa0-',
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Always cleared.\nC - Not affected.',
'description': 'The contents of memory location M is exclusive ORed into an 8-bit register.',
'instr_desc': 'Exclusive OR memory with accumulator',
'operation': "R' = R XOR M",
'source form': 'EORA P; EORB P'},
'EXG': {'EXG': {'desc': 'exchange R1,R2',
'operand': '',
'ops': {0x1e: {'addr_mode': 'REGISTER',
'bytes': 2,
'cycles': 8}},
'read_from_memory': '-',
'write_to_memory': '-'},
'HNZVC': 'ccccc',
'condition code': 'Not affected (unless one of the registers is the condition code\nregister).',
'description': '0000 = A:B 1000 = A\n0001 = X 1001 = B\n0010 = Y 1010 = CCR\n0011 = US 1011 = DPR\n0100 = SP 1100 = Undefined\n0101 = PC 1101 = Undefined\n0110 = Undefined 1110 = Undefined\n0111 = Undefined 1111 = Undefined',
'instr_desc': 'Exchange Rl with R2',
'operation': 'R1 <-> R2',
'source form': 'EXG R1,R2'},
'INC': {'HNZVC': '-aaa-',
'INC': {'desc': 'M = M + 1',
'operand': '',
'ops': {0xc: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x6c: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x7c: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'INCA': {'desc': 'A = A + 1',
'operand': 'A',
'ops': {0x4c: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'INCB': {'desc': 'B = B + 1',
'operand': 'B',
'ops': {0x5c: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Set if the original operand was 01111111 2 ; cleared otherwise.\nC - Not affected.',
'description': 'Adds to the operand.\nThe carry bit is not affected, thus allowing this instruction to be used as a loop counter in multiple-precision computations.\nWhen operating on unsigned values, only the BEQ and BNE branches can be expected to behave consistently.\nWhen operating on twos complement values, all signed branches are correctly available.',
'instr_desc': 'Increment accumulator or memory location',
'operation': "M' = M + 1",
'source form': 'INC Q; INCA; INCB'},
'JMP': {'HNZVC': '-----',
'JMP': {'desc': 'pc = EA',
'operand': '',
'ops': {0xe: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 3},
0x6e: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 3},
0x7e: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 3}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Program control is transferred to the effective address.',
'instr_desc': 'Jump',
'operation': "PC' = EA",
'source form': 'JMP EA'},
'JSR': {'HNZVC': '-----',
'JSR': {'desc': 'jump to subroutine',
'operand': '',
'ops': {0x9d: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 7},
0xad: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 7},
0xbd: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 8}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Program control is transferred to the effective address after storing the return address on the hardware stack.\nA RTS instruction should be the last executed instruction of the subroutine.',
'instr_desc': 'Jump to subroutine',
'operation': "SP' = SP-1, (SP) = PCL SP' = SP-1, (SP) = PCH PC' =EA",
'source form': 'JSR EA'},
'LD': {'HNZVC': '-aa0-',
'LDA': {'desc': 'A = M',
'operand': 'A',
'ops': {0x86: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x96: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa6: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb6: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'LDB': {'desc': 'B = M',
'operand': 'B',
'ops': {0xc6: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xd6: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe6: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf6: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'LDD': {'desc': 'D = M:M+1',
'operand': 'D',
'ops': {0xcc: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 3,
'cycles': 3},
0xdc: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 5},
0xec: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 5},
0xfc: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 6}},
'read_from_memory': 'WORD',
'write_to_memory': '-'},
'LDS': {'desc': 'S = M:M+1',
'operand': 'S',
'ops': {0x10ce: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 4,
'cycles': 4},
0x10de: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 6},
0x10ee: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 6},
0x10fe: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 7}},
'read_from_memory': 'WORD',
'write_to_memory': '-'},
'LDU': {'desc': 'U = M:M+1',
'operand': 'U',
'ops': {0xce: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 3,
'cycles': 3},
0xde: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 5},
0xee: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 5},
0xfe: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 6}},
'read_from_memory': 'WORD',
'write_to_memory': '-'},
'LDX': {'desc': 'X = M:M+1',
'operand': 'X',
'ops': {0x8e: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 3,
'cycles': 3},
0x9e: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 5},
0xae: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 5},
0xbe: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 6}},
'read_from_memory': 'WORD',
'write_to_memory': '-'},
'LDY': {'desc': 'Y = M:M+1',
'operand': 'Y',
'ops': {0x108e: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 4,
'cycles': 4},
0x109e: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 6},
0x10ae: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 6},
0x10be: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 7}},
'read_from_memory': 'WORD',
'write_to_memory': '-'},
'condition code': 'H - Not affected.\nN - Set if the loaded data is negative; cleared otherwise.\nZ - Set if the loaded data is zero; cleared otherwise.\nV - Always cleared.\nC - Not affected.',
'description': 'Loads the contents of memory location M into the designated register.',
'instr_desc': 'Load accumulator from memory',
'operation': "R' = M",
'source form': 'LDA P; LDB P'},
'LEA': {'HNZVC': '-----',
'LEAS': {'desc': 'S = EA',
'operand': 'S',
'ops': {0x32: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4}},
'read_from_memory': '-',
'write_to_memory': '-'},
'LEAU': {'desc': 'U = EA',
'operand': 'U',
'ops': {0x33: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4}},
'read_from_memory': '-',
'write_to_memory': '-'},
'LEAX': {'desc': 'X = EA',
'operand': 'X',
'ops': {0x30: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4}},
'read_from_memory': '-',
'write_to_memory': '-'},
'LEAY': {'desc': 'Y = EA',
'operand': 'Y',
'ops': {0x31: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': "Instruction Operation Comment\nInstruction\n\nOperation\n\nComment\nLEAX 10,X X+10 -> X Adds 5-bit constant 10 to X\nLEAX 500,X X+500 -> X Adds 16-bit constant 500 to X\nLEAY A,Y Y+A -> Y Adds 8-bit accumulator to Y\nLEAY D,Y Y+D -> Y Adds 16-bit D accumulator to Y\nLEAU -10,U U-10 -> U Subtracts 10 from U\nLEAS -10,S S-10 -> S Used to reserve area on stack\nLEAS 10,S S+10 -> S Used to 'clean up' stack\nLEAX 5,S S+5 -> X Transfers as well as adds",
'condition code': 'H - Not affected.\nN - Not affected.\nZ - LEAX, LEAY: Set if the result is zero; cleared otherwise. LEAS, LEAU: Not affected.\nV - Not affected.\nC - Not affected.',
'description': 'Calculates the effective address from the indexed addressing mode and places the address in an indexable register. LEAX and LEAY affect the Z (zero) bit to allow use of these registers as counters and for MC6800 INX/DEX compatibility. LEAU and LEAS do not affect the Z bit to allow cleaning up the stack while returning the Z bit as a parameter to a calling routine, and also for MC6800 INS/DES compatibility.',
'instr_desc': 'Load effective address into stack pointer',
'operation': "R' = EA",
'source form': 'LEAX, LEAY, LEAS, LEAU'},
'LSL': {'HNZVC': 'naaas',
'LSL': {'desc': 'M = Logical shift M left',
'operand': '',
'ops': {0x8: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x68: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x78: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'LSLA': {'desc': 'A = Logical shift A left',
'operand': 'A',
'ops': {0x48: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'LSLB': {'desc': 'B = Logical shift B left',
'operand': 'B',
'ops': {0x58: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'This is a duplicate assembly-language mnemonic for the single machine instruction ASL.',
'condition code': 'H - Undefined.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Loaded with the result of the exclusive OR of bits six and seven of the original operand.\nC - Loaded with bit seven of the original operand.',
'description': 'Shifts all bits of accumulator A or B or memory location M one place to the left.\nBit zero is loaded with a zero.\nBit seven of accumulator A or B or memory location M is shifted into the C (carry) bit.',
'instr_desc': 'Logical shift left accumulator or memory location',
'operation': 'C = = 0\nb7 = b0',
'source form': 'LSL Q; LSLA; LSLB'},
'LSR': {'HNZVC': '-0a-s',
'LSR': {'desc': 'M = Logical shift M right',
'operand': '',
'ops': {0x4: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x64: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x74: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'LSRA': {'desc': 'A = Logical shift A right',
'operand': 'A',
'ops': {0x44: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'LSRB': {'desc': 'B = Logical shift B right',
'operand': 'B',
'ops': {0x54: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'H - Not affected.\nN - Always cleared.\nZ - Set if the result is zero; cleared otherwise.\nV - Not affected.\nC - Loaded with bit zero of the original operand.',
'description': 'Performs a logical shift right on the operand.\nShifts a zero into bit seven and bit zero into the C (carry) bit.',
'instr_desc': 'Logical shift right accumulator or memory location',
'operation': '0 -> -> C\nb7 -> b0',
'source form': 'LSR Q; LSRA; LSRB'},
'MUL': {'HNZVC': '--a-a',
'MUL': {'desc': 'D = A*B (Unsigned)',
'operand': '',
'ops': {0x3d: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 11}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'The C (carry) bit allows rounding the most-significant byte through the sequence: MUL, ADCA #0.',
'condition code': 'H - Not affected.\nN - Not affected.\nZ - Set if the result is zero; cleared otherwise.\nV - Not affected.\nC - Set if ACCB bit 7 of result is set; cleared otherwise.',
'description': 'Multiply the unsigned binary numbers in the accumulators and place the result in both accumulators (ACCA contains the most-significant byte of the result).\nUnsigned multiply allows multiple-precision operations.',
'instr_desc': 'Unsigned multiply (A * B ? D)',
'operation': "ACCA':ACCB' = ACCA * ACCB",
'source form': 'MUL'},
'NEG': {'HNZVC': 'uaaaa',
'NEG': {'desc': 'M = !M + 1',
'operand': '',
'ops': {0x0: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x60: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x70: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'NEGA': {'desc': 'A = !A + 1',
'operand': 'A',
'ops': {0x40: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'NEGB': {'desc': 'B = !B + 1',
'operand': 'B',
'ops': {0x50: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'H - Undefined.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Set if the original operand was 10000000 2 .\nC - Set if a borrow is generated; cleared otherwise.',
'description': 'Replaces the operand with its twos complement.\nThe C (carry) bit represents a borrow and is set to the inverse of the resulting binary carry.\nNote that 80 16 is replaced by itself and only in this case is the V (overflow) bit set.\nThe value 00 16 is also replaced by itself, and only in this case is the C (carry) bit cleared.',
'instr_desc': 'Negate accumulator or memory',
'operation': "M' = 0 - M",
'source form': 'NEG Q; NEGA; NEG B'},
'NOP': {'HNZVC': '-----',
'NOP': {'desc': 'No Operation',
'operand': '',
'ops': {0x12: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'This instruction causes only the program counter to be incremented.\nNo other registers or memory locations are affected.',
'instr_desc': 'No operation',
'operation': 'Not affected.',
'source form': 'NOP'},
'OR': {'HNZVC': '-aa0-',
'ORA': {'desc': 'A = A || M',
'operand': 'A',
'ops': {0x8a: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x9a: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xaa: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xba: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ORB': {'desc': 'B = B || M',
'operand': 'B',
'ops': {0xca: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xda: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xea: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xfa: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'ORCC': {'desc': 'C = CC || IMM',
'operand': 'CC',
'ops': {0x1a: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 3}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Always cleared.\nC - Not affected.',
'description': 'Performs an inclusive OR operation between the contents of accumulator A or B and the contents of memory location M and the result is stored in accumulator A or B.',
'instr_desc': 'OR memory with accumulator',
'operation': "R' = R OR M",
'source form': 'ORA P; ORB P'},
'PAGE': {'HNZVC': '+++++',
'PAGE 1': {'desc': 'Page 1 Instructions prefix',
'operand': '-',
'ops': {0x10: {'addr_mode': None,
'bytes': 1,
'cycles': 1}},
'read_from_memory': '-',
'write_to_memory': '-'},
'PAGE 2': {'desc': 'Page 2 Instructions prefix',
'operand': '-',
'ops': {0x11: {'addr_mode': None,
'bytes': 1,
'cycles': 1}},
'read_from_memory': '-',
'write_to_memory': '-'},
'description': 'Page 1/2 instructions',
'instr_desc': 'Page 2 Instructions prefix'},
'PSH': {'HNZVC': '-----',
'PSHS': {'desc': 'S -= 1: MEM(S) = R; Push Register on S Stack',
'operand': 'S',
'ops': {0x34: {'addr_mode': 'STACK',
'bytes': 2,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'PSHU': {'desc': 'U -= 1: MEM(U) = R; Push Register on U Stack',
'operand': 'U',
'ops': {0x36: {'addr_mode': 'STACK',
'bytes': 2,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'comment': 'A single register may be placed on the stack with the condition codes set by doing an autodecrement store onto the stack (example: STX ,--S).',
'condition code': 'Not affected.',
'description': 'All, some, or none of the processor registers are pushed onto the hardware stack (with the exception of the hardware stack pointer itself).',
'instr_desc': 'Push A, B, CC, DP, D, X, Y, U, or PC onto hardware stack',
'operation': 'Push Registers on S Stack: S -= 1: MEM(S) = Reg.',
'source form': 'b7 b6 b5 b4 b3 b2 b1 b0\nPC U Y X DP B A CC\npush order ->'},
'PUL': {'HNZVC': 'ccccc',
'PULS': {'desc': 'R=MEM(S) : S += 1; Pull register from S Stack',
'operand': 'S',
'ops': {0x35: {'addr_mode': 'STACK',
'bytes': 2,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'PULU': {'desc': 'R=MEM(U) : U += 1; Pull register from U Stack',
'operand': 'U',
'ops': {0x37: {'addr_mode': 'STACK',
'bytes': 2,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'comment': 'A single register may be pulled from the stack with condition codes set by doing an autoincrement load from the stack (example: LDX ,S++).',
'condition code': 'May be pulled from stack; not affected otherwise.',
'description': 'All, some, or none of the processor registers are pulled from the hardware stack (with the exception of the hardware stack pointer itself).',
'instr_desc': 'Pull A, B, CC, DP, D, X, Y, U, or PC from hardware stack',
'operation': 'Pull Registers from S Stack: Reg. = MEM(S): S += 1',
'source form': 'b7 b6 b5 b4 b3 b2 b1 b0\nPC U Y X DP B A CC\n= pull order'},
'ROL': {'HNZVC': '-aaas',
'ROL': {'desc': 'M = Rotate M left thru carry',
'operand': '',
'ops': {0x9: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x69: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x79: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'ROLA': {'desc': 'A = Rotate A left thru carry',
'operand': 'A',
'ops': {0x49: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'ROLB': {'desc': 'B = Rotate B left thru carry',
'operand': 'B',
'ops': {0x59: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Loaded with the result of the exclusive OR of bits six and seven of the original operand.\nC - Loaded with bit seven of the original operand.',
'description': 'Rotates all bits of the operand one place left through the C (carry) bit.\nThis is a 9-bit rotation.',
'instr_desc': 'Rotate accumulator or memory left',
'operation': 'C = = C\nb7 = b0',
'source form': 'ROL Q; ROLA; ROLB'},
'ROR': {'HNZVC': '-aa-s',
'ROR': {'desc': 'M = Rotate M Right thru carry',
'operand': '',
'ops': {0x6: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x66: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x76: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'BYTE',
'write_to_memory': 'BYTE'},
'RORA': {'desc': 'A = Rotate A Right thru carry',
'operand': 'A',
'ops': {0x46: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'RORB': {'desc': 'B = Rotate B Right thru carry',
'operand': 'B',
'ops': {0x56: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Not affected.\nC - Loaded with bit zero of the previous operand.',
'description': 'Rotates all bits of the operand one place right through the C (carry) bit.\nThis is a 9-bit rotation.',
'instr_desc': 'Rotate accumulator or memory right',
'operation': 'C -> -> C\nb7 -> b0',
'source form': 'ROR Q; RORA; RORB'},
'RTI': {'HNZVC': '-----',
'RTI': {'desc': 'Return from Interrupt',
'operand': '',
'ops': {0x3b: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 6}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Recovered from the stack.',
'description': 'The saved machine state is recovered from the hardware stack and control is returned to the interrupted program.\nIf the recovered E (entire) bit is clear, it indicates that only a subset of the machine state was saved (return address and condition codes) and only that subset is recovered.',
'instr_desc': 'Return from interrupt',
'operation': "IFF CCR bit E is set, then: ACCA' ACCB' DPR' IXH' IXL' IYH' IYL' USH' USL' PCH' PCL' = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1 = (SP), SP' = SP+1\nIFF CCR bit E is clear, then: PCH' PCL' = (SP), SP' = SP+1 = (SP), SP' = SP+1",
'source form': 'RTI'},
'RTS': {'HNZVC': '-----',
'RTS': {'desc': 'Return from subroutine',
'operand': '',
'ops': {0x39: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'Program control is returned from the subroutine to the calling program.\nThe return address is pulled from the stack.',
'instr_desc': 'Return from subroutine',
'operation': "PCH' = (SP), SP' = SP+1 PCL' = (SP), SP' = SP+1",
'source form': 'RTS'},
'SBC': {'HNZVC': 'uaaaa',
'SBCA': {'desc': 'A = A - M - C',
'operand': 'A',
'ops': {0x82: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x92: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa2: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb2: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'SBCB': {'desc': 'B = B - M - C',
'operand': 'B',
'ops': {0xc2: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xd2: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe2: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf2: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'condition code': 'H - Undefined.\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 borrow is generated; cleared otherwise.',
'description': 'Subtracts the contents of memory location M and the borrow (in the C (carry) bit) from the contents of the designated 8-bit register, and places the result in that register.\nThe C bit represents a borrow and is set to the inverse of the resulting binary carry.',
'instr_desc': 'Subtract memory from accumulator with borrow',
'operation': "R' = R - M - C",
'source form': 'SBCA P; SBCB P'},
'SEX': {'HNZVC': '-aa0-',
'SEX': {'desc': 'Sign extend B into A',
'operand': '',
'ops': {0x1d: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Not affected.\nC - Not affected.',
'description': 'This instruction transforms a twos complement 8-bit value in accumulator B into a twos complement 16-bit value in the D accumulator.',
'instr_desc': 'Sign Extend B accumulator into A accumulator',
'operation': "If bit seven of ACCB is set then ACCA' = FF 16 else ACCA' = 00 16",
'source form': 'SEX'},
'ST': {'HNZVC': '-aa0-',
'STA': {'desc': 'M = A',
'operand': 'A',
'ops': {0x97: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa7: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb7: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': 'BYTE'},
'STB': {'desc': 'M = B',
'operand': 'B',
'ops': {0xd7: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe7: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf7: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': '-',
'write_to_memory': 'BYTE'},
'STD': {'desc': 'M:M+1 = D',
'operand': 'D',
'ops': {0xdd: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 5},
0xed: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 5},
0xfd: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 6}},
'read_from_memory': '-',
'write_to_memory': 'WORD'},
'STS': {'desc': 'M:M+1 = S',
'operand': 'S',
'ops': {0x10df: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 6},
0x10ef: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 6},
0x10ff: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 7}},
'read_from_memory': '-',
'write_to_memory': 'WORD'},
'STU': {'desc': 'M:M+1 = U',
'operand': 'U',
'ops': {0xdf: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 5},
0xef: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 5},
0xff: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 6}},
'read_from_memory': '-',
'write_to_memory': 'WORD'},
'STX': {'desc': 'M:M+1 = X',
'operand': 'X',
'ops': {0x9f: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 5},
0xaf: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 5},
0xbf: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 6}},
'read_from_memory': '-',
'write_to_memory': 'WORD'},
'STY': {'desc': 'M:M+1 = Y',
'operand': 'Y',
'ops': {0x109f: {'addr_mode': 'DIRECT',
'bytes': 3,
'cycles': 6},
0x10af: {'addr_mode': 'INDEXED',
'bytes': 3,
'cycles': 6},
0x10bf: {'addr_mode': 'EXTENDED',
'bytes': 4,
'cycles': 7}},
'read_from_memory': '-',
'write_to_memory': 'WORD'},
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Always cleared.\nC - Not affected.',
'description': 'Writes the contents of an 8-bit register into a memory location.',
'instr_desc': 'Store accumulator to memroy',
'operation': "M' = R",
'source form': 'STA P; STB P'},
'SUB': {'HNZVC': 'uaaaa',
'SUBA': {'desc': 'A = A - M',
'operand': 'A',
'ops': {0x80: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0x90: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xa0: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xb0: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'SUBB': {'desc': 'B = B - M',
'operand': 'B',
'ops': {0xc0: {'addr_mode': 'IMMEDIATE',
'bytes': 2,
'cycles': 2},
0xd0: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 4},
0xe0: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 4},
0xf0: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 5}},
'read_from_memory': 'BYTE',
'write_to_memory': '-'},
'SUBD': {'desc': 'D = D - M:M+1',
'operand': 'D',
'ops': {0x83: {'addr_mode': 'IMMEDIATE_WORD',
'bytes': 3,
'cycles': 4},
0x93: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0xa3: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0xb3: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': 'WORD',
'write_to_memory': '-'},
'condition code': 'H - Undefined.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Set if the overflow is generated; cleared otherwise.\nC - Set if a borrow is generated; cleared otherwise.',
'description': 'Subtracts the value in memory location M from the contents of a designated 8-bit register.\nThe C (carry) bit represents a borrow and is set to the inverse of the resulting binary carry.',
'instr_desc': 'Subtract memory from accumulator',
'operation': "R' = R - M",
'source form': 'SUBA P; SUBB P'},
'SWI': {'HNZVC': '-----',
'SWI': {'desc': 'Software interrupt 1',
'operand': '',
'ops': {0x3f: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 19}},
'read_from_memory': '-',
'write_to_memory': '-'},
'SWI2': {'desc': 'Software interrupt 2',
'operand': '-',
'ops': {0x103f: {'addr_mode': 'INHERENT',
'bytes': 2,
'cycles': 20}},
'read_from_memory': '-',
'write_to_memory': '-'},
'SWI3': {'desc': 'Software interrupt 3',
'operand': '-',
'ops': {0x113f: {'addr_mode': 'INHERENT',
'bytes': 2,
'cycles': 20}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'All of the processor registers are pushed onto the hardware stack (with the exception of the hardware stack pointer itself), and control is transferred through the software interrupt vector.\nBoth the normal and fast interrupts are masked (disabled).',
'instr_desc': 'Software interrupt (absolute indirect)',
'operation': "Set E (entire state will be saved) SP' = SP-1, (SP) = PCL SP' = SP-1, (SP) = PCH SP' = SP-1, (SP) = USL SP' = SP-1, (SP) = USH SP' = SP-1, (SP) = IYL SP' = SP-1, (SP) = IYH SP' = SP-1, (SP) = IXL SP' = SP-1, (SP) = IXH SP' = SP-1, (SP) = DPR SP' = SP-1, (SP) = ACCB SP' = SP-1, (SP) = ACCA SP' = SP-1, (SP) = CCR Set I, F (mask interrupts) PC' = (FFFA):(FFFB)",
'source form': 'SWI'},
'SYNC': {'HNZVC': '-----',
'SYNC': {'desc': 'Synchronize to Interrupt',
'operand': '',
'ops': {0x13: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected.',
'description': 'FAST SYNC WAIT FOR DATA\nInterrupt!\nLDA DISC DATA FROM DISC AND CLEAR INTERRUPT\nSTA ,X+ PUT IN BUFFER\nDECB COUNT IT, DONE?\nBNE FAST GO AGAIN IF NOT.',
'instr_desc': 'Synchronize with interrupt line',
'operation': 'Stop processing instructions',
'source form': 'SYNC'},
'TFR': {'HNZVC': 'ccccc',
'TFR': {'desc': '-',
'operand': '',
'ops': {0x1f: {'addr_mode': 'REGISTER',
'bytes': 2,
'cycles': 7}},
'read_from_memory': '-',
'write_to_memory': '-'},
'condition code': 'Not affected unless R2 is the condition code register.',
'description': '0000 = A:B 1000 = A\n0001 = X 1001 = B\n0010 = Y 1010 = CCR\n0011 = US 1011 = DPR\n0100 = SP 1100 = Undefined\n0101 = PC 1101 = Undefined\n0110 = Undefined 1110 = Undefined\n0111 = Undefined 1111 = Undefined',
'instr_desc': 'Transfer R1 to R2',
'operation': 'R1 -> R2',
'source form': 'TFR R1, R2'},
'TST': {'HNZVC': '-aa0-',
'TST': {'desc': 'Test M',
'operand': '',
'ops': {0xd: {'addr_mode': 'DIRECT',
'bytes': 2,
'cycles': 6},
0x6d: {'addr_mode': 'INDEXED',
'bytes': 2,
'cycles': 6},
0x7d: {'addr_mode': 'EXTENDED',
'bytes': 3,
'cycles': 7}},
'read_from_memory': '-',
'write_to_memory': '-'},
'TSTA': {'desc': 'Test A',
'operand': 'A',
'ops': {0x4d: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'TSTB': {'desc': 'Test B',
'operand': 'B',
'ops': {0x5d: {'addr_mode': 'INHERENT',
'bytes': 1,
'cycles': 2}},
'read_from_memory': '-',
'write_to_memory': '-'},
'comment': 'The MC6800 processor clears the C (carry) bit.',
'condition code': 'H - Not affected.\nN - Set if the result is negative; cleared otherwise.\nZ - Set if the result is zero; cleared otherwise.\nV - Always cleared.\nC - Not affected.',
'description': 'Set the N (negative) and Z (zero) bits according to the contents of memory location M, and clear the V (overflow) bit.\nThe TST instruction provides only minimum information when testing unsigned values; since no unsigned value is less than zero, BLO and BLS have no utility.\nWhile BHI could be used after TST, it provides exactly the same control as BNE, which is preferred.\nThe signed branches are available.',
'instr_desc': 'Test accumulator or memory location',
'operation': 'TEMP = M - 0',
'source form': 'TST Q; TSTA; TSTB'}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment