TORONTO -- The Toronto stock market was essentially flat to close the week while major U.S. indexes were with mixed, with the Nasdaq lower amid disappointing earnings from several big tech companies.

At mid-afternoon, the S&P/TSX composite index was up 12.01 points at 13,893.21 after having slipped 30 points the previous session.

Meanwhile, the Canadian dollar rose 0.30 of a U.S. cent to 78.87 cents US as oil prices rebounded from Thursday's retreat and figures from Statistics Canada showed that core inflation -- which excludes volatile items such as food and gasoline -- rose to 2.1 per cent last month.

In commodities, the June contract for benchmark crude rose 57 cents to US$$43.75 a barrel, while May natural gas shot up seven cents to US$2.14 per mmBtu. The energy sector was the second best performer on the TSX. Elsewhere in commodities, May copper added two cents to US$2.27 a pound, while June gold bullion shed $19.80 to US$1,230.50 a troy ounce.

Disappointing earnings from Microsoft, Google parent Alphabet and other big companies weighed on U.S. indexes, especially on the tech-heavy Nasdaq composite which retreated 43.53 points or 0.9 per cent to 4,902.36.

Meanwhile, the Dow Jones industrial average added 22.97 points to 18,005.49 and the broader S&P 500 eased back 0.24 of a point to 2,091.24.

Tom Siomades, head of Hartford Funds Investment Consulting Group, noted that absent major economic data, investors have been riding the ups and downs of earnings this week, although market swings haven't been as volatile as earlier in the year.

"These mixed earnings that we've been getting ... these mini rallies and mini sell-offs ... are part of it," Siomades, told The Associated Press.

Microsoft (Nasdaq:MSFT) was among the biggest decliners, falling 3.91 or 7.1 per cent to US$51.87, while Alphabet (Nasdaq:Googl) fell $45 or 5.77 per cent to US$735.

Meanwhile, coffee chain Starbucks (Nasdaq:SBUX) fell $3.52 or 5.8 per cent to US$57.12 after reporting disappointing sales growth for the first three months of the year.

On the plus side, Norfolk Southern (NYSE:NSC), until recently a takeover target of Canadian Pacific Railway (TSX:CP), jumped $8.15 or 9.86 per cent to $90.78 after the railway reported slashing costs in its latest quarter.

In European trading, Germany's DAX was down 0.6 per cent, while France's CAC 40 was off 0.29 per cent and Britain's FTSE 100 fell 1.11 per cent.

In Asia, Tokyo's Nikkei 225 rose 1.2 per cent, Hong Kong's Hang Seng index fell 0.72 per cent and Seoul's Kospi slid 0.3 per cent. China's main Shanghai composite added 0.22 per cent.