100 int firstAddress = -1;
101 int lastAddress = -1;
103 const int programLastAddress =
106 if (arguments.size() > 1) {
109 arguments[1].stringValue());
111 if (arguments.size() == 3) {
113 arguments[2].stringValue());
120 if (firstAddress > programLastAddress) {
121 firstAddress = programLastAddress;
125 for (
auto addr : { firstAddress, lastAddress }) {
131 + std::to_string(addr) +
".");
136 if (firstAddress == -1 && lastAddress == -1) {
140 }
else if (firstAddress != -1 && lastAddress == -1) {
149 if (lastAddress < 0) {
153 if (lastAddress > programLastAddress) {
154 lastAddress = programLastAddress;
157 if (lastAddress < firstAddress) {
158 lastAddress = firstAddress;
162 for (; firstAddress <= lastAddress; firstAddress +=
169 + std::to_string(firstAddress) +
".");
#define assert(condition)
bool checkArgumentCount(int argumentCount, int minimum, int maximum)
ScriptInterpreter * interpreter() const
virtual std::string helpText() const
virtual bool execute(const std::vector< DataObject > &arguments)
virtual ~DisassembleCommand()
virtual InterpreterContext & context() const =0
virtual void setError(bool state)
bool checkProgramLoaded()
InstructionAddress parseInstructionAddressExpression(const std::string &expression)
virtual std::ostream & outputStream()
const TTAProgram::Procedure & currentProcedure() const
std::string disassembleInstruction(UIntWord instructionAddress) const
const TTAProgram::Program & program() const
SimulatorFrontend & simulatorFrontend()
InstructionAddress location() const
virtual Address endAddress() const
virtual Address startAddress() const
virtual Instruction & lastInstruction() const
CodeSnippet & parent() const
Instruction & instructionAt(InstructionAddress address) const
Procedure & lastProcedure() const
virtual boost::format text(int textId)
@ TXT_INTERP_HELP_DISASSEMBLE
Help text for command "disassemble" of the CLI.