Implement instructions 0x03C-0x053, add flag constants and fix execute dispatch
This commit is contained in:
@@ -95,8 +95,12 @@ namespace spider {
|
||||
_addrm++;
|
||||
}
|
||||
|
||||
/**
|
||||
instrMap[] is the correct 512-entry dispatch
|
||||
table that maps operation codes to instruction methods.
|
||||
*/
|
||||
void CPU::execute() {
|
||||
(this->*(CPU::addrModes[_opcode]))();
|
||||
(this->*(CPU::instrMap[_opcode]))();
|
||||
}
|
||||
|
||||
// Addressing Modes //
|
||||
|
||||
@@ -15,6 +15,14 @@ namespace spider {
|
||||
static constexpr const u64 FLAG_INTERRUPT_REQUEST = 0b0000000000000000000000000000000000000000000000000000000000000100;
|
||||
static constexpr const u64 FLAG_EXCEPTION = 0b0000000000000000000000000000000000000000000000000000000000001000;
|
||||
static constexpr const u64 FLAG_MEMORY_MODE = 0b0000000000000000000000000000000000000000000000000000000000110000;
|
||||
static constexpr const u64 FLAG_EXT_INT_DISABLE = 0b0000000000000000000000000000000000000000000000000000000010000000; // bit 7
|
||||
static constexpr const u64 FLAG_EQUAL = 0b0000000000000000000000000000000000000000000000000000010000000000; // bit 10
|
||||
static constexpr const u64 FLAG_EPSILON_ENABLE = 0b0000000000000000000000000000000000000000000000000001000000000000; // bit 12
|
||||
static constexpr const u64 FLAG_HOTSWAP_SIGNAL = 0b0000000000000000000000000000000000000000000000010000000000000000; // bit 16
|
||||
static constexpr const u64 FLAG_USER_A = 0b0000000000000000000000000000000000000000000100000000000000000000; // bit 20
|
||||
static constexpr const u64 FLAG_USER_B = 0b0000000000000000000000000000000000000000001000000000000000000000; // bit 21
|
||||
static constexpr const u64 FLAG_USER_C = 0b0000000000000000000000000000000000000000010000000000000000000000; // bit 22
|
||||
static constexpr const u64 FLAG_USER_D = 0b0000000000000000000000000000000000000000100000000000000000000000; // bit 23
|
||||
|
||||
public: // Map of addressing modes & Instructions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user