public static void StepBreakPoint( MainForm mainform )
        {
            WriteBack( );
            MemoryVisit( );
            Execute( );
            Decode( );
            Fetch( );
            Bubble( );

            Debug.WriteLine( " In stepBreakPoint breakpoints: " );
            foreach ( var breakaddr in Breakpoints )
            {
                Debug.WriteLine( breakaddr + " " );
            }
            Debug.WriteLine( f_pc );
            Debug.WriteLine( "" );
            if ( Breakpoints.Contains( f_pc ) )
            {
                //mainform.timer2.Stop( );
                mainform.timer2.Enabled = false;
                mainform.ButtonDisplaySwitch( );

                MessageBox.Show( @"Breakpoint." );
                return;
            }

            UpdateRegisters( );
            Cycle++;

            mainform.ProcessDisplay( );
            mainform.MemoryDisplay( );

            FileHandler.WrtiePipeInfo( Cycle );

            if ( w_stat == Stats.SAOK && W_icode == Instrs.IHALT )
            {
                //mainform.timer2.Stop( );
                mainform.timer2.Enabled = false;
                mainform.ButtonDisplaySwitch( );

                StopRunning( );

                MessageBox.Show( @"Done. Pipeling info saved as out.txt." );
            }
            else if ( W_code == "address error" )
            {
                //mainform.timer2.Stop( );
                mainform.timer2.Enabled = false;
                mainform.ButtonDisplaySwitch( );
                StopRunning( );

                MessageBox.Show( @"Address error. Pipeling info saved as out.txt." );
            }
        }
        public static void Step( MainForm mainform )
        {
            Step( );

            mainform.ProcessDisplay( );
            mainform.MemoryDisplay( );

            if ( w_stat == Stats.SAOK && W_icode == Instrs.IHALT )
            {
                //mainform.timer1.Stop( );
                mainform.timer1.Enabled = false;
                mainform.ButtonDisplaySwitch( );

                StopRunning( );

                MessageBox.Show( @"Done. Pipeling info saved as out.txt." );
            }
            else if ( W_code == "address error" )
            {
                //mainform.timer1.Stop( );
                mainform.timer1.Enabled = false;
                mainform.ButtonDisplaySwitch( );
                StopRunning( );

                MessageBox.Show( @"Address error. Pipeling info saved as out.txt." );
            }
        }