Bill Gates is a ruthless schemer who demeaned his employees and conspired to rip off his business partner, according to a memoir written by the co-founder of Microsoft, Paul Allen.

Mr Allen's forthcoming book reveals a deep-seated bitterness at the heart of the famous relationship that created the most successful software company the world has ever seen. In Idea Man: A Memoir, Allen also claims that Gates never gave him enough credit for his contribution to Microsoft's earliest development, nor a big enough share of the company. In effect, Mr Allen is accusing his friend of bullying him out of shares that would have been worth billions of dollars.

Mr Gates and Mr Allen first became friends in 1968 over their Seattle high school Teletype machine, on which they wrote their first software together. Mr Allen moved to Boston and Gates dropped out of Harvard University in 1975 so they could work on what would eventually become Microsoft. The company created what was to become the ubiquitous operating software of the personal computer, and grew into a business that's now worth $220bn (£137bn).

Download the new Independent Premium app Sharing the full story, not just the headlines

In excerpts published in Vanity Fair yesterday, three weeks before of the publication of Idea Man, Mr Allen says he was "taken aback" when Mr Gates suggested Microsoft should split 64 per cent in his favour, rather than 50-50. Gates won, and it's clear the wounds are still raw.

"I tried to put myself in his shoes and reconstruct his thinking, and I concluded that it was just this simple: 'What's the most I can get?'," says Allen. "He might have argued that the numbers reflected our contributions, but they also exposed the differences between the son of a librarian and the son of a lawyer. I'd been taught that a deal was a deal and your word was your bond. Bill was more flexible."

The memoir also includes the explosive revelation that Mr Gates conspired with Microsoft's first chief executive, Steve Ballmer, to reduce his co-founder's stake even further. Mr Allen recalls overhearing a conversation between Gates and Ballmer in 1982, as he was recovering from treatment for lymphoma, when they discussed the possibility of issuing themselves new share options that would reduce Mr Allen's stake in the company.

"I helped start the company and was still an active member of management, though limited by my illness, and now my partner and my colleague were scheming to rip me off. It was mercenary opportunism, plain and simple." Mr Gates soon apologised for even discussing the idea.

The bitter tone of the book has soured relations between two men who have remained cordial and in contact ever since Mr Allen finally resigned from Microsoft in 1983, a decision he now says was driven by exhaustion at the constant fighting and disillusionment by his co-founder's tendency to demean his programmers using sarcasm.

Mr Gates strove to rise above the accusations yesterday. "While my recollection of many of these events may differ from Paul's," he said, "I value his friendship and the important contributions he made to the world of technology and at Microsoft."

Nonetheless, Mr Allen's book looks set to open up the question of how much credit each of the two schoolfriends should get for Microsoft's early success, and on this, Idea Man makes a determined case to future historians that Mr Gates's credit should be reduced.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

"Some said Bill's management style was a key ingredient in Microsoft's early success," Mr Allen says in one tart passage, "but that made no sense to me. Why wouldn't it be more effective to have civil and rational discourse? Why did we need knock-down, drag-out fights?"

After Microsoft: The computer geniuses who parted ways

Although their paths diverged when Paul Allen left the company in 1983, Microsoft's billionaire founders have continued to rub shoulders in the worlds of technology and philanthropy.

But while Bill Gates went on to build a monopoly in software for the personal computer, and expand into gaming and internet services, Mr Allen's ventures in software and cable television were not always so successful.

Last year, his firm sued many of Silicon Valley's most famous firms, saying it has a patent on basic technology for internet search and touchscreens.

In philanthropy, the Bill and Melinda Gates Foundation, where Mr Gates now works day-to-day, immediately became one of the largest foundations in the world. Idea Man is Mr Allen's attempt also to put a spotlight on his philanthropic work, which includes funding for research into the workings of the brain. Mr Allen also owns sports teams and has funded prototypes for new types of spacecraft.