#include <asm_parser.h>
Public Member Functions | |
std::vector< uint8_t > | Parse (const std::string &instruction) |
std::vector< std::string > | Tokenize (const std::string &instruction) |
Private Member Functions | |
void | AppendOperandBytes (std::vector< uint8_t > &bytes, const std::string &operand, const AddressingMode &addressing_mode) |
AddressingMode | DetermineMode (const std::vector< std::string > &tokens) |
bool | TryParseByte (const std::string &str, uint8_t &value) |
bool | TryParseHex (const std::string &str, uint32_t &value) |
void | CreateInternalOpcodeMap () |
Private Attributes | |
std::unordered_map< MnemonicMode, uint8_t, MnemonicModeHash > | mnemonic_to_opcode_ |
Definition at line 68 of file asm_parser.h.
|
inline |
Definition at line 70 of file asm_parser.h.
References AppendOperandBytes(), CreateInternalOpcodeMap(), DetermineMode(), mnemonic_to_opcode_, and Tokenize().
Referenced by yaze::test::emu::TEST_F().
|
inline |
Definition at line 139 of file asm_parser.h.
Referenced by Parse(), yaze::test::emu::TEST_F(), and yaze::test::emu::TEST_F().
|
inlineprivate |
Definition at line 154 of file asm_parser.h.
References yaze::app::emu::kAbsolute, yaze::app::emu::kAbsoluteLong, yaze::app::emu::kImmediate, and yaze::app::emu::kImplied.
Referenced by Parse().
|
inlineprivate |
Definition at line 187 of file asm_parser.h.
References yaze::app::emu::kAbsolute, yaze::app::emu::kAbsoluteLong, yaze::app::emu::kImmediate, and yaze::app::emu::kImplied.
Referenced by Parse().
|
inlineprivate |
Definition at line 200 of file asm_parser.h.
|
inlineprivate |
Definition at line 209 of file asm_parser.h.
|
inlineprivate |
Definition at line 218 of file asm_parser.h.
References yaze::app::emu::kAbsolute, yaze::app::emu::kAbsoluteIndexedX, yaze::app::emu::kAbsoluteIndexedY, yaze::app::emu::kAbsoluteIndirect, yaze::app::emu::kAccumulator, yaze::app::emu::kDirectPage, yaze::app::emu::kDirectPageIndexedX, yaze::app::emu::kDirectPageIndexedY, yaze::app::emu::kDirectPageIndirect, yaze::app::emu::kDirectPageIndirectIndexedY, yaze::app::emu::kImmediate, yaze::app::emu::kImplied, yaze::app::emu::kProgramCounterRelative, yaze::app::emu::kProgramCounterRelativeLong, yaze::app::emu::kStackRelative, yaze::app::emu::kStackRelativeIndirectIndexedY, and mnemonic_to_opcode_.
Referenced by Parse().
|
private |
Definition at line 443 of file asm_parser.h.
Referenced by CreateInternalOpcodeMap(), and Parse().