yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::emu::AsmParser Class Reference

#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, MnemonicModeHashmnemonic_to_opcode_
 

Detailed Description

Definition at line 68 of file asm_parser.h.

Member Function Documentation

◆ Parse()

std::vector< uint8_t > yaze::app::emu::AsmParser::Parse ( const std::string & instruction)
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().

Here is the call graph for this function:

◆ Tokenize()

std::vector< std::string > yaze::app::emu::AsmParser::Tokenize ( const std::string & instruction)
inline

Definition at line 139 of file asm_parser.h.

Referenced by Parse(), yaze::test::emu::TEST_F(), and yaze::test::emu::TEST_F().

◆ AppendOperandBytes()

void yaze::app::emu::AsmParser::AppendOperandBytes ( std::vector< uint8_t > & bytes,
const std::string & operand,
const AddressingMode & addressing_mode )
inlineprivate

◆ DetermineMode()

AddressingMode yaze::app::emu::AsmParser::DetermineMode ( const std::vector< std::string > & tokens)
inlineprivate

◆ TryParseByte()

bool yaze::app::emu::AsmParser::TryParseByte ( const std::string & str,
uint8_t & value )
inlineprivate

Definition at line 200 of file asm_parser.h.

◆ TryParseHex()

bool yaze::app::emu::AsmParser::TryParseHex ( const std::string & str,
uint32_t & value )
inlineprivate

Definition at line 209 of file asm_parser.h.

◆ CreateInternalOpcodeMap()

Member Data Documentation

◆ mnemonic_to_opcode_

std::unordered_map<MnemonicMode, uint8_t, MnemonicModeHash> yaze::app::emu::AsmParser::mnemonic_to_opcode_
private

Definition at line 443 of file asm_parser.h.

Referenced by CreateInternalOpcodeMap(), and Parse().


The documentation for this class was generated from the following file: