In an excerpt from his autobiography published in Vanity Fair today, Microsoft co-founder Paul Allen lashes out at his friend Bill Gates, describing how the mercurial billionaire took credit for Allen's work and diminished Allen's presumed role in the early successes of the software giant. The book, called Idea Man: A Memoir by the Co-founder of Microsoft, will be published April 17.

"You could tell three things about Bill Gates pretty quickly," Allen explains, discussing the early days. "He was really smart. He was really competitive; he wanted to show you how smart he was. And he was really, really persistent."

Together, Gates and Allen jumpstarted the then-nascent PC industry, creating a version of BASIC that ran on the MITS Altair, one of the first personal computers, "stripped down but robust for its size." Gates described it to Allen as "the best piece of work" they ever did together, and their collaboration was born, turning in time into Microsoft. "Bill and I had grown into crack programmers," he writes. "And we were just getting started."

More controversial, Allen describes some well-known events in new ways, and includes some clear criticisms of Gates. He claims that many of Microsoft's best early ideas were his, not Gates' as many have come to understand. And he complains repeatedly of not receiving enough credit for this early work and for Microsoft's initial successes.

Allen also says he ultimately left Microsoft because he couldn't take Gates' behavior any longer. He says that Gates was scheming at the time to dilute Allen's equity in the company during Allen's first bout with Hodgkin's disease. Gates—and current CEO Steve Ballmer, who was also in on this plan—later apologized to Allen and backed off. "It was mercenary opportunism, plain and simple," Allen writes.

But years later, he agreed to Gates' proposed 64-36 split in shares of the company. Gates had originally demanded a 60 percent share when the two started their partnership.

"In that moment, something died for me," Allen explains. "I'd thought that our partnership was based on fairness, but now I saw that Bill's self-interest overrode all other considerations. My partner was out to grab as much of the pie as possible and hold on to it, and that was something I could not accept."

Gates, of course, remembers things differently, and he's issued a public statement addressing Allen's coming book. "While my recollection of many of these events may differ from Paul's, I value his friendship and the important contributions he made to the world of technology and at Microsoft," he wrote.