- int i;
- GtkStyle *style;
- GdkFont *fixedfont;
- fixedfont = gdk_font_load( "-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1" );
-
- pgmclist = gtk_clist_new( 1 );
- gtk_clist_set_selection_mode( GTK_CLIST( pgmclist ), GTK_SELECTION_SINGLE );
- gtk_widget_set_usize( GTK_WIDGET( pgmclist ), PGM_WIN_WIDTH, PGM_WIN_HEIGHT );
- gtk_clist_set_column_justification( GTK_CLIST( pgmclist ), 0, GTK_JUSTIFY_LEFT );
- gtk_clist_set_column_width( GTK_CLIST( pgmclist ), 0, PGM_WIN_WIDTH-10 );
-
- style = gtk_widget_get_style( GTK_WIDGET( pgmclist ) );
-
-#ifdef USE_GTK2
- gtk_style_set_font( style, fixedfont );
-#else
- style->font = fixedfont;
-#endif
-
- gtk_widget_set_style( GTK_WIDGET( pgmclist ), style );
-
- char *pgmdummy[] = { 0 };
- for ( i = 0; i < 24; i++ ) gtk_clist_append( GTK_CLIST( pgmclist ), pgmdummy );
-
- gtk_container_add( GTK_CONTAINER( parentwin ), pgmclist );
-
- gtk_widget_show( pgmclist );
-
- NbBreakpoints = 0;
-
- /*
- PgmWinPtrs[ PgmWinNumber ] = this;
- PgmWinNumbers[ PgmWinNumber ] = PgmWinNumber;
- gtk_signal_connect( GTK_OBJECT( pgmclist ), "button-press-event", GTK_SIGNAL_FUNC( PgmWinButtonPress ), &PgmWinNumbers[ PgmWinNumber++ ] );
- */
-
+ char TextTmp[255];
+ int row;
+ int InstSize;
+ unsigned int Address;
+
+ Address = cpu8051.pc;
+
+ gtk_clist_freeze(GTK_CLIST(pgmclist));
+ for (row = 0; row < 24; row++) {
+ InstSize = cpu8051_Disasm(Address, TextTmp);
+ if (IsBreakpoint(Address))
+ TextTmp[0] = '*';
+ gtk_clist_set_text(GTK_CLIST(pgmclist), row, 0, TextTmp);
+ DisasmAddresses[row] = Address;
+ Address += InstSize;
+ }
+ gtk_clist_select_row(GTK_CLIST(pgmclist), 0, 0);
+ gtk_clist_thaw(GTK_CLIST(pgmclist));