#include "config.h"
#include <gtk/gtk.h>
-#include "emugtk.h"
-#include "reset.xpm"
-#include "run.xpm"
-#include "stop.xpm"
-#include "step.xpm"
#include "common.h"
#include "cpu8051.h"
#include "options.h"
#include "hexfile.h"
+
+#include "emugtk.h"
+#include "reset.xpm"
+#include "run.xpm"
+#include "stop.xpm"
+#include "step.xpm"
#include "filemenu.h"
#include "viewmenu.h"
#include "helpmenu.h"
#include "pgmwin.h"
#include "memwin.h"
-
static int RunningState;
static int RunFuncTag;
-
-
static GtkWidget *mainwin;
-
-/* In options.c */
-extern char *hex_file;
-
-
/* Signal DestroyEvent */
static void
WindowDestroyEvent( GtkWidget *widget, gpointer data )
int
main( int argc, char **argv )
{
+ char *hex_file;
+
ParseCommandLineOptions( argc, argv );
cpu8051_init();
emugtk_window_init();
+ hex_file = get_hex_filename();
+
if( hex_file != NULL ) {
emugtk_new_file( hex_file );
}
regwin_Show();
pgmwin_Disasm();
- memwin_DumpD( 0 );
+ memwin_DumpD("0x00");
}
cpu8051_Reset( );
regwin_Show();
pgmwin_Disasm();
- memwin_DumpD( 0 );
+ memwin_DumpD("0x00");
}
cpu8051_Exec();
regwin_Show();
pgmwin_Disasm();
- memwin_DumpD( 0 );
+ memwin_DumpD("0x00");
}
#ifdef EMU8051_DEBUG
printf( "emugtk_StartRunning( )\n" );
#endif
- /*RunFuncTag = gtk_idle_add( GtkFunction( RunningFunction ), 0 );*/
RunFuncTag = gtk_idle_add( RunningFunction, 0 );
RunningState = 1;
-
- // gtk_widget_hide( GTK_WIDGET( ButtonRun ) );
- // gtk_widget_show_now( GTK_WIDGET( ButtonStop ) );
- // gtk_table_attach_defaults( GTK_TABLE( ButtonTable ), ButtonStop, 3, 4, 0, 1);
}
}
#endif
gtk_idle_remove( RunFuncTag );
RunningState = 0;
- //gtk_widget_hide( GTK_WIDGET( ButtonStop ) );
- //gtk_widget_show( GTK_WIDGET( ButtonRun ) );
- // gtk_table_attach_defaults( GTK_TABLE( ButtonTable ), ButtonRun, 3, 4, 0, 1);
regwin_Show();
pgmwin_Disasm();
- memwin_DumpD( 0 );
+ memwin_DumpD("0x00");
}
}