mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-22 09:30:32 +00:00
6502, Disassembly: Some dump methods can be static
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
9524cf4c6b
commit
1bf2a9bdfb
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user