The Innovators: How a Group of Inventors, Hackers, Geniuses, and Geeks Created the Digital Revolutio - Isaacson Walter. Страница 88

Gates’s haphazard life at Harvard was suddenly upended in December 1974, halfway through his sophomore year, when Allen arrived at his Currier House room with the new issue of Popular Electronics featuring the Altair on the cover. Allen’s rallying cry, “Hey, this thing is happening without us,” jolted Gates into action.

BASIC FOR THE ALTAIR

Gates and Allen set out to write software that would make it possible for hobbyists to create their own programs on the Altair. Specifically, they decided to write an interpreter for the programming language BASIC that would run on the Altair’s Intel 8080 microprocessor. It would become the first commercial native high-level programming language for a microprocessor. And it would launch the personal computer software industry.

Using some old stationery with the Traf-O-Data letterhead, they wrote a letter to MITS, the fledgling Albuquerque company that made the Altair, claiming that they had created a BASIC interpreter that could run on the 8080. “We are interested in selling copies of this software to hobbyists through you.”55 That wasn’t exactly true. They had not yet written any software. But they knew they could scramble into action if MITS expressed interest.

When they did not hear back, they decided to phone. Gates suggested that Allen place the call, because he was older. “No, you should do it; you’re better at this kind of thing,” Allen argued. They came up with a compromise: Gates would call, disguising his squeaky voice, but he would use the name Paul Allen, because they knew it would be Allen who would fly out to Albuquerque if they got lucky. “I had my beard going and at least looked like an adult, while Bill still could pass for a high school sophomore,” recalled Allen.56

When the gruff-sounding Ed Roberts answered the phone, Gates put on a deep voice and said, “This is Paul Allen in Boston. We’ve got a BASIC for the Altair that’s just about finished, and we’d like to come out and show it to you.” Roberts replied that he had gotten many such calls. The first person to walk through his door in Albuquerque with a working BASIC would get the contract. Gates turned to Allen and exulted, “God, we gotta get going on this!”

Because they did not have an Altair to work on, Allen had to emulate one on Harvard’s PDP-10, a reprise of the tactic he had used to build their Traf-O-Data machine. So they bought a manual for the 8080 microprocessor, and within weeks Allen had the emulator and other development tools ready.

Meanwhile Gates was furiously writing the BASIC interpreter code on yellow legal pads. By the time Allen had finished the emulator, Gates had outlined the structure and much of the code. “I can still see him alternately pacing and rocking for long periods before jotting on a yellow legal pad, his fingers stained from a rainbow of felt-tip pens,” Allen recalled. “Once my emulator was in place and he was able to use the PDP-10, Bill moved to a terminal and peered at his legal pad as he rocked. Then he’d type a flurry of code with those strange hand positions of his, and repeat. He could go like that for hours at a stretch.”57

One night they were having dinner at Currier House, Gates’s dorm, sitting at the table with the other math wonks, and they began complaining about facing the tedious task of writing floating-point math routines, which would give the program the ability to deal with both very small and very large numbers and decimal points in scientific notation.II A curly-haired kid from Milwaukee named Monte Davidoff piped up, “I’ve written those kinds of routines.”58 This was one of the benefits of being a geek at Harvard. Gates and Allen began peppering him with questions about his capacity to handle floating-point code. Satisfied that he knew what he was talking about, they brought him to Gates’s room and negotiated a fee of $400 for his work. He became the third member of the team, and would eventually earn a lot more.

Gates ignored the exam cramming he was supposed to be doing and even stopped playing poker. For eight weeks he and Allen and Davidoff holed up day and night at Harvard’s Aiken Lab making history on the PDP-10 that the Defense Department was funding. Occasionally they would break for dinner at Harvard House of Pizza or Aku Aku, an ersatz Polynesian restaurant. In the wee hours of the morning, Gates would sometimes fall asleep at the terminal. “He’d be in the middle of a line of code when he’d gradually tilt forward until his nose touched the keyboard,” Allen said. “After dozing an hour or two, he’d open his eyes, squint at the screen, blink twice, and resume precisely where he’d left off—a prodigious feat of concentration.”

They would scribble away at their notepads, competing at times to see who could execute a subroutine in the fewest lines. “I can do it in nine,” one would shout. Another would shoot back, “Well, I can do it in five!” Allen noted, “We knew that each byte saved would leave that much more room for users to add to their applications.” The goal was to get the program into less than the 4K of memory that an enhanced Altair would have, so there would still be room left for the consumer to use. (A 16GB smartphone has four million times that amount of memory.) At night they would fan out the printouts on the floor and search for ways to make it more elegant, compact, and efficient.59

By late February 1975, after eight weeks of intense coding, they got it down, brilliantly, into 3.2K. “It wasn’t a question of whether I could write the program, but rather a question of whether I could squeeze it into under 4k and make it super fast,” said Gates. “It was the coolest program I ever wrote.”60 Gates checked it for errors one last time, then commanded the Aiken Lab’s PDP-10 to spew out a punch tape of it so Allen could take it to Albuquerque.

On the flight down, Allen remembered he hadn’t written a loader, the sequence of commands that would instruct the Altair how to put the BASIC interpreter into its memory. As the plane was preparing to land, he grabbed a pad and wrote twenty-one lines in the machine language used by the Intel microprocessor, each line a three-digit number in base-8. He was sweating by the time he left the terminal, wearing a tan Ultrasuede polyester suit and looking for Ed Roberts. Eventually he spotted a jowly three-hundred-pound man in jeans and a string tie in a pickup truck. “I’d expected a high-powered executive from some cutting-edge entrepreneurial firm, like the ones clustered along Route 128, the high-tech beltway around Boston,” Allen recalled.

The MITS world headquarters was likewise not quite what Allen expected. It was in a low-rent strip mall, and the only Altair with enough memory to run BASIC was still being tested. So they put off until the next morning trying out the program and headed off “to a three-dollar buffet at a Mexican place called Pancho’s, where you got what you paid for,” Allen said. Roberts drove him to the local Sheraton, where the desk clerk told him that his room would be $50. That was $10 more than Allen had brought with him, so after an awkward stare Roberts had to pay for the room. “I guess I wasn’t what he’d been expecting, either,” said Allen.61

The next morning, Allen returned to MITS for the big test. It took almost ten minutes to load in the code for the BASIC interpreter that he and Gates had written. Roberts and his colleagues exchanged amused glances, already suspecting that the show would be a fiasco. But then the Teletype clacked to life. “MEMORY SIZE?” it asked. “Hey, it typed something!” shouted one of the MITS team. Allen was happily flabbergasted. He typed in the answer: 7168. The Altair responded: “OK.” Allen typed, “PRINT 2+2.” It was the simplest of all commands, but it would test not only Gates’s coding but also Davidoff’s floating-point math routines. The Altair responded: “4.”