KSE end up on earnings hopes; rupee firms vs dollar