-pgmwin_Disasm( )
-{
- 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 ( pgmwin_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 ) );
-}
-
-
-/* Clear Breakpoint at Address from list */
-static void
-pgmwin_ClearBreakpoint( unsigned int Address )
-{
- int Index = 0;
-
- while( Index < NbBreakpoints && Breakpoints[ Index ] != Address ) {
- Index++;
- }
- if( Breakpoints[ Index ] != Address ) {
- return;
- }
- Breakpoints[ Index ] = Breakpoints[ NbBreakpoints - 1 ];
- NbBreakpoints--;
-}
-
-
-/* Set Breakpoint at Address from list. */
-static void
-pgmwin_SetBreakpoint( unsigned int Address )
-{
- if( pgmwin_IsBreakpoint( Address ) ) {
- return;
- }
- if( NbBreakpoints < MAXBP ) {
- Breakpoints[ NbBreakpoints++ ] = Address;
- }
-}
-
-/* Toggle the breakpoint at Address. */
-static void
-pgmwin_ToggleBreakpoint( unsigned int Address )
-{
- if( pgmwin_IsBreakpoint( Address ) ) {
- pgmwin_ClearBreakpoint( Address );
- }
- else {
- pgmwin_SetBreakpoint( Address );
- }
-}
-
-
-#ifdef dsfdsfs
-/* Show Breakpoints list. */
-static void
-pgmwin_ShowBreakpoints( )
-{
- int Index;
-
- for ( Index = 0; Index < NbBreakpoints ; Index++ ) {
- printf( "Breakpoint at Address = %.4X\n", Breakpoints[ Index ] );
- }
-}
-#endif
-
-
-/* Is the a breakpoint at Address. */
-int
-pgmwin_IsBreakpoint( unsigned int Address )