Sensex rose by 977 points