6502, Disassembly: Some dump methods can be static

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-01-27 10:13:17 +00:00
parent 9524cf4c6b
commit 1bf2a9bdfb
2 changed files with 7 additions and 7 deletions

View File

@ -11,12 +11,12 @@ namespace EightBit {
public:
Disassembly(MOS6502& processor, const Symbols& symbols);
std::string dump_Flags(uint8_t value) const;
std::string dump_ByteValue(uint8_t value) const;
std::string dump_WordValue(uint16_t value) const;
std::string disassemble(uint16_t current) const;
static std::string dump_Flags(uint8_t value);
static std::string dump_ByteValue(uint8_t value);
static std::string dump_WordValue(uint16_t value);
private:
MOS6502& processor;
const Symbols& symbols;

View File

@ -12,7 +12,7 @@ EightBit::Disassembly::Disassembly(MOS6502& targetProcessor, const Symbols& targ
symbols(targetSymbols) {
}
std::string EightBit::Disassembly::dump_Flags(uint8_t value) const {
std::string EightBit::Disassembly::dump_Flags(uint8_t value) {
std::string returned;
returned += (value & MOS6502::NF) ? "N" : "-";
returned += (value & MOS6502::VF) ? "O" : "-";
@ -29,13 +29,13 @@ void EightBit::Disassembly::dump(std::ostream& out, int value, int width) {
out << std::hex << std::uppercase << std::setw(width) << std::setfill('0') << value;
}
std::string EightBit::Disassembly::dump_ByteValue(uint8_t value) const {
std::string EightBit::Disassembly::dump_ByteValue(uint8_t value) {
std::ostringstream output;
dump(output, value, 2);
return output.str();
}
std::string EightBit::Disassembly::dump_WordValue(uint16_t value) const {
std::string EightBit::Disassembly::dump_WordValue(uint16_t value) {
std::ostringstream output;
dump(output, value, 4);
return output.str();