Naredil opcode seznam in mapper, fetch in execute v machine ter exceptione

This commit is contained in:
Timon 2025-11-23 11:25:32 +01:00
parent 513cb421ec
commit 5dae60dcec
3 changed files with 140 additions and 0 deletions

View file

@ -1,3 +1,12 @@
#pragma once
#include <unordered_map>
#include <string>
struct InstructionInfo {
std::string mnemonic;
uint8_t format; // 1, 2, or 3
};
class Opcode {
public:
static const int ADD = 0x18;
@ -59,4 +68,6 @@ public:
static const int TIX = 0x2C;
static const int TIXR = 0xB8;
static const int WD = 0xDC;
static const std::unordered_map<int, InstructionInfo> OPCODES;
};