mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-14 03:37:04 +00:00
Fills in the first quarter of the opcode map.
This commit is contained in:
parent
d82187bee2
commit
e0d90f69ec
@ -24,6 +24,7 @@ std::pair<int, InstructionSet::M50740::Instruction> Decoder::decode(const uint8_
|
||||
return std::make_pair(1, Instruction());
|
||||
|
||||
#define Map(opcode, operation, addressing_mode) case opcode: instr_ = Instruction(Operation::operation, AddressingMode::addressing_mode); break
|
||||
/* 0x00 – 0x0f */
|
||||
Map(0x00, BRK, Implied); Map(0x01, ORA, XIndirect);
|
||||
Map(0x02, JSR, ZeroPageIndirect); Map(0x03, BBS, Bit0AccumulatorRelative);
|
||||
|
||||
@ -36,6 +37,45 @@ std::pair<int, InstructionSet::M50740::Instruction> Decoder::decode(const uint8_
|
||||
Map(0x0d, ORA, Absolute);
|
||||
Map(0x0e, ASL, Absolute); Map(0x0f, SEB, Bit0ZeroPage);
|
||||
|
||||
/* 0x10 – 0x1f */
|
||||
Map(0x10, BPL, Relative); Map(0x11, ORA, IndirectY);
|
||||
Map(0x12, CLT, Implied); Map(0x13, BBC, Bit0AccumulatorRelative);
|
||||
|
||||
Map(0x15, ORA, ZeroPageX);
|
||||
Map(0x16, ASL, ZeroPageX); Map(0x17, BBC, Bit0ZeroPageRelative);
|
||||
|
||||
Map(0x18, CLC, Implied); Map(0x19, ORA, AbsoluteY);
|
||||
Map(0x1a, DEC, Accumulator); Map(0x1b, CLB, Bit0Accumulator);
|
||||
|
||||
Map(0x1d, ORA, AbsoluteX);
|
||||
Map(0x1e, ASL, AbsoluteX); Map(0x1f, CLB, Bit0ZeroPage);
|
||||
|
||||
/* 0x20 – 0x2f */
|
||||
Map(0x20, JSR, Absolute); Map(0x21, AND, XIndirect);
|
||||
Map(0x22, JSR, SpecialPage); Map(0x23, BBS, Bit1AccumulatorRelative);
|
||||
|
||||
Map(0x24, BIT, ZeroPage); Map(0x25, AND, ZeroPage);
|
||||
Map(0x26, ROL, ZeroPage); Map(0x27, BBS, Bit1ZeroPageRelative);
|
||||
|
||||
Map(0x28, PLP, Implied); Map(0x29, AND, Immediate);
|
||||
Map(0x2a, ROL, Accumulator); Map(0x2b, SEB, Bit1Accumulator);
|
||||
|
||||
Map(0x2c, BIT, Absolute); Map(0x2d, AND, Absolute);
|
||||
Map(0x2e, ROL, Absolute); Map(0x2f, SEB, Bit1ZeroPage);
|
||||
|
||||
/* 0x30 – 0x3f */
|
||||
Map(0x30, BMI, Relative); Map(0x31, AND, IndirectY);
|
||||
Map(0x32, SET, Implied); Map(0x33, BBC, Bit1AccumulatorRelative);
|
||||
|
||||
Map(0x35, AND, ZeroPageX);
|
||||
Map(0x36, ROL, ZeroPageX); Map(0x37, BBC, Bit1ZeroPageRelative);
|
||||
|
||||
Map(0x38, SEC, Implied); Map(0x39, AND, AbsoluteY);
|
||||
Map(0x3a, INC, Accumulator); Map(0x3b, CLB, Bit1Accumulator);
|
||||
|
||||
Map(0x3c, LDM, ImmediateZeroPage); Map(0x3d, AND, AbsoluteX);
|
||||
Map(0x3e, ROL, AbsoluteX); Map(0x3f, CLB, Bit1ZeroPage);
|
||||
|
||||
#undef Map
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user