home *** CD-ROM | disk | FTP | other *** search
- ///////////////////////////////////////////////////////////////////////////////
- // $Id: Interface.hxx,v 1.1 1994/08/03 22:54:26 bmott Exp $
- ///////////////////////////////////////////////////////////////////////////////
- // Interface.hxx
- //
- // This is the user interface command class. It handles all of the
- // command's issue by the user interface.
- //
- //
- // BSVC "A Microprocessor Simulation Framework"
- // Copyright (c) 1993
- // By: Bradford W. Mott
- // October 21,1993
- //
- ///////////////////////////////////////////////////////////////////////////////
- // $Log: Interface.hxx,v $
- // Revision 1.1 1994/08/03 22:54:26 bmott
- // Initial revision
- //
- //
- ///////////////////////////////////////////////////////////////////////////////
-
- #ifndef INTERFACE_HXX
- #define INTERFACE_HXX
-
- #include "BasicCPU.hxx"
- #include "BasicDeviceRegistry.hxx"
- #include "BasicLoader.hxx"
- #include "BreakpointList.hxx"
-
- class Interface;
-
- typedef struct {
- const char *name;
- void (Interface::*mfp)(char*);
- } UICommandTable;
-
- class Interface {
- private:
- const int number_of_commands; // Number of commands in command table
- static int interrupt_signal_flag;
- static void InterruptSignalHandler(int);
-
- BasicCPU* const cpu;
- BasicDeviceRegistry* const device_registry;
- BasicLoader* const loader;
- BreakpointList breakpoint_list;
-
- char *Get(); // Get a string from the UI
- void Put(const char *); // Send a string to the UI
- int ExecuteCommand(const char*); // Execute the command
-
-
- static UICommandTable command_table[];
-
- void AddBreakpoint(char *);
- void AttachDevice(char *);
- void ClearStatistics(char *);
- void DeleteBreakpoint(char *);
- void DetachDevice(char *);
- void ListAttachedDevices(char *);
- void ListBreakpoints(char *);
- void ListDevices(char *);
- void ListDeviceScript(char *);
- void ListExecutionTraceRecord(char *);
- void ListDefaultExecutionTraceEntries(char *);
- void ListGranularity(char *);
- void ListMemory(char *);
- void ListMaximumAddress(char *);
- void ListNumberOfAddressSpaces(char *);
- void ListPCRegisterName(char *);
- void ListRegisters(char *);
- void ListRegisterValue(char *);
- void ListRegisterDescription(char *);
- void ListStatistics(char *);
- void LoadProgram(char *);
- void Reset(char *);
- void Run(char *);
- void SetRegister(char *);
- void SetMemory(char *);
- void Step(char *);
-
- public:
- Interface(BasicCPU*, BasicDeviceRegistry*, BasicLoader*);
-
- void CommandLoop();
- };
-
- #endif
-