A $6 billion accounting charge related to Microsoft Inc.’s ill-fated acquisition of an online advertising business led to a second-quarter loss for the Seattle software giant, its first in more than two decades as a public company. The New York Times reports that results also were affected by a 13 percent drop in revenue at the company’s flagship Windows operating system business.