Sensex Ends Flat At 77,540.83, Nifty Gains Marginally As Crude Oil And US-Iran Tensions Weigh