#include <mima.h>
Public Member Functions | |
| Cli (Mima *mima) | |
| const char * | execute (char *cmd_str) |
| Interpret and execute a command string. | |
| ~Cli () | |
Protected Member Functions | |
| std::string | dump_memory (Command cmd) |
| Dump memory contents. | |
| std::string | dump_state (Command cmd) |
| Dump basic internal information. | |
| std::string | print_help () |
| Return list of valid commands. | |
| std::string | reset (bool full=false) |
| Reset Mima. | |
| std::string | run (Command cmd) |
| Start running. | |
| std::string | set_acc (Command cmd) |
| Set accumulator value. | |
| std::string | set_iar (Command cmd) |
| Set instruction address register value. | |
| std::string | set_memory (Command cmd) |
| Set memory value at given address. | |
| std::string | step (Command cmd) |
| Execute n steps. | |
| std::string | toggle_breakpoint (Command cmd) |
| Toggle breakpoint at given address. | |
Classes | |
| class | Command |
The command line allows the user to pass instructions directly to the simulator.
For the simulator the following commands are valid:
| syntax | description |
|---|---|
| s [n] | Execute n steps (default n=1) |
| m [addr] [n] | Display n memory values starting at addr (default addr=IAR, n=16) |
| M addr value | Set memory at address addr to value |
| a value | Set accumulator to value |
| i value | Set instrichtion address register (IAR) to value |
| d | Display current status |
| x | Run mima |
| X | Stop running |
| r | Reset ACC, IAR and instruction counter |
| R | Full reset (as reset, but also clear memory) |
| b [addr] | (Un)set breakpoint at addr or show all breakpoints if addr is omitted |
| q | Quit |
| ; comment | Comment (ignored) |
| MimaSim::Cli::Cli | ( | Mima * | mima | ) | [inline] |
| MimaSim::Cli::~Cli | ( | ) | [inline] |
| std::string Cli::dump_memory | ( | Command | cmd | ) | [protected] |
Dump memory contents.
| std::string Cli::dump_state | ( | Command | cmd | ) | [protected] |
Dump basic internal information.
| const char * Cli::execute | ( | char * | cmd_str | ) |
Interpret and execute a command string.
| cmd_str | contains a Mima command in the form 'command [arg1] [arg2]' |
| std::string Cli::print_help | ( | ) | [protected] |
Return list of valid commands.
| std::string Cli::reset | ( | bool | full = false |
) | [protected] |
Reset Mima.
| std::string Cli::run | ( | Command | cmd | ) | [protected] |
Start running.
| std::string Cli::set_acc | ( | Command | cmd | ) | [protected] |
Set accumulator value.
| std::string Cli::set_iar | ( | Command | cmd | ) | [protected] |
Set instruction address register value.
| std::string Cli::set_memory | ( | Command | cmd | ) | [protected] |
Set memory value at given address.
| std::string Cli::step | ( | Command | cmd | ) | [protected] |
Execute n steps.
| std::string Cli::toggle_breakpoint | ( | Command | cmd | ) | [protected] |
Toggle breakpoint at given address.
1.4.7