mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-04 01:57:54 +00:00
35 lines
573 B
C++
35 lines
573 B
C++
|
//
|
||
|
// Decoder.hpp
|
||
|
// Clock Signal
|
||
|
//
|
||
|
// Created by Thomas Harte on 1/15/21.
|
||
|
// Copyright © 2021 Thomas Harte. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#ifndef InstructionSets_M50740_Decoder_hpp
|
||
|
#define InstructionSets_M50740_Decoder_hpp
|
||
|
|
||
|
#include "Instruction.hpp"
|
||
|
|
||
|
#include <utility>
|
||
|
|
||
|
namespace InstructionSet {
|
||
|
namespace M50740 {
|
||
|
|
||
|
class Decoder {
|
||
|
public:
|
||
|
std::pair<int, Instruction> decode(const uint8_t *source, size_t length);
|
||
|
|
||
|
private:
|
||
|
enum class Phase {
|
||
|
Instruction,
|
||
|
AwaitingOperand
|
||
|
};
|
||
|
int operand_size_;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif /* InstructionSets_M50740_Decoder_hpp */
|