MimaSim::Cli Class Reference

Command line interpreter interface to Mima. More...

#include <mima.h>

List of all members.

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


Detailed Description

Command line interpreter interface to Mima.

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)

Todo:
localization of the used output strings


Constructor & Destructor Documentation

MimaSim::Cli::Cli ( Mima mima  )  [inline]

MimaSim::Cli::~Cli (  )  [inline]


Member Function Documentation

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.

Parameters:
cmd_str contains a Mima command in the form 'command [arg1] [arg2]'
Returns:
The response of the invoked command

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.


The documentation for this class was generated from the following files:
Generated on Sat Nov 4 19:40:59 2006 for mimasim by  doxygen 1.4.7