Getting Down to BASIC

If anyone had run over Bill Gates, the microcomputer industry would have been set back a couple of years.

–Dick Heiser, early computer retailer

While it’s true that the microprocessors and the crude microcomputers built by hobbyists/entrepreneurs gave computing power to the people, it was the BASIC programming language that let them harness that power. Two professors at Dartmouth College, seeking a better way of introducing their students to computers, used their grant from the National Science Foundation to give birth to BASIC in 1964. The language John Kemeney and Thomas Kurtz created was an instant success. Compared with the slow, laborious, and complex process of programming in FORTRAN, the comparable computer language in common use at the time, BASIC was a winged delight.

During the following two years, the National Council of Teachers of Mathematics debated over whether to support FORTRAN or BASIC as the standard educational language. FORTRAN, widely used in scientific computing, was considered better for large computational tasks; however, BASIC was far easier to learn.

Think of the Children

Bob Albrecht was a prominent supporter of BASIC. As a pioneer of computer education for children, he had been frustrated with FORTRAN. The council’s ultimate selection of BASIC was a watershed. The personal computer and the BASIC language would be the two most important products in the effort to convince educators that computers could help students learn. Bob Albrecht wanted to create software for reasons other than personal ambition. Always interested in turning kids on to computers, when the Altair came out, Albrecht asked himself, “Wouldn’t it be nice to have something called Tiny BASIC that resided in 2K and was suitable for kids?” Such a program would fit within the Altair’s limited 4K memory and could be used immediately.

Albrecht pestered his friend, computer-science professor Dennis Allison, to develop Tiny BASIC. Reports of progress on the program appeared in the People’s Computer Company (PCC) newsletter and its offshoot, Dr. Dobb’s Journal. “The Tiny BASIC project at PCC represents our attempt to give the hobbyist a more human-oriented language or notation with which to encode his programs,” wrote Allison. In an early issue of PCC, Allison “& Others” (as the cryptic byline read) explained their goal:

Pretend you are seven years old and don’t care much about floating-point arithmetic (what’s that?), logarithms, sines, matrix inversion, nuclear-reactor calculations, and stuff like that. And your home computer is kind of small, not too much memory. Maybe it’s a Mark-8 or an Altair 8800 with less than 4K bytes and a TV Typewriter for input and output.

You would like to use it for homework, math recreations, and games like NUMBER, STARS, TRAP, HURKLE, SNARK, BAGELS. Consider, then, Tiny BASIC.

“It’s Going to Happen!”

Many of Dr. Dobb’s and PCC’s readers did more than consider Tiny BASIC. They took Allison’s program as a starting point and modified it, often creating a more capable language. Some of those early Tiny BASICs allowed large numbers of programmers to start using the microcomputers. Two of the most successful versions came from Tom Pittman and Li-Chen Wang. Pittman knew microprocessors as well as anyone, including the engineers at Intel, because he had written one of the first programs for the 4004. He and Wang were “successful” in terms of the stated goal for Tiny BASIC—to give users a simpler language. The Tiny BASIC authors were not trying to use it as a path to wealth. Another, more ambitious BASIC was also in the works. In the fall of 1974, Bill Gates had left Washington for Harvard University. Gates’s parents had always wanted him to go to law school, and now they felt finally he was on the right track.

images/images-by-chapter/chapter-5/Allen-Gates.jpg

Figure 39. Paul Allen and Bill Gates Allen (left) and Gates founded Microsoft. (Courtesy of Microsoft)

But as precocious as he may have been, Gates found himself rooming with a math student who was even sharper than he was, and Gates was shocked when his roommate told him he had no intention of majoring in math but planned to study law. Gates thought, “If this guy’s not going to major in math, I’m sure not.” Examining his options, he immersed himself in psychology courses, graduate courses in physics and math, and long, extracurricular nightly poker games.

Then came that fateful January 1975 issue of Popular Electronics that Paul Allen would spot in Harvard Square and wave in front of Gates’s face.

“Look, it’s going to happen!” Allen shouted. “I told you this was going to happen! And we’re going to miss it!” Gates had to admit that his friend was right; it sure looked as though the “something” they had been looking for had found them.

Gates phoned MITS immediately, claiming that he and his partner had a BASIC language usable on the Altair. When Ed Roberts, who had heard a lot of such promises, asked Gates when he could come to Albuquerque to demonstrate his BASIC, Gates looked at his childhood friend, took a deep breath, and said, “Oh, in two or three weeks.” Gates put down the phone, turned to Paul Allen, and said, “I guess we should go buy a manual.” They went straight to an electronics shop and purchased Adam Osborne’s manual on the 8080.

For the next few weeks, Gates and Allen worked day and night on the BASIC. As they wrote the program, they tried to determine the minimal features of an acceptable BASIC—the same challenge Albrecht and Allison faced except that Tiny BASIC was to be usable on a variety of machines. Gates and Allen didn’t have this restriction. They were free to make their BASIC whatever they wanted. No industry standard existed for BASIC or for any other software, mostly because there was no industry. By deciding themselves what the BASIC required, Gates and Allen set a pattern for future software development that lasted for about six years. Instead of researching the market, the programmers simply decided, at the outset, what features to put in their software.

Both men threw themselves completely into the project, staying up late every night doing programming. Gates even made the ultimate sacrifice and abandoned some of his nightly poker games. They sometimes worked half-asleep. Paul Allen once observed Gates nod off, head on the keys, wake up suddenly, glance at the screen, and immediately begin typing. Allen decided that his friend must have been programming in his sleep and just kept right on when he woke up.

The two slept at their terminals and talked BASIC between bites of food. One day while in the dining hall at Gates’s Harvard dorm, they were discussing some mathematics routines—subprograms to handle noninteger numbers that they felt their BASIC needed. These floating-point routines were not especially difficult to write, but they weren’t very interesting either. Gates said he didn’t want to write them; neither did Allen. From the other end of the table a voice called out hesitantly, “I’ve written some floating-point routines.” Both of their heads turned in the direction of the strange voice, and that was how Marty Davidoff joined their programming team over lunch in the college cafeteria.

At no time during the project did Gates, Allen, or Davidoff ever see an Altair computer. They wrote their BASIC on a large computer, testing it with a program Allen had written that made the large machine simulate the Altair. At one point when Gates phoned Ed Roberts to ask how the Altair processed characters typed on a keyboard, Roberts must have been surprised that they were actually pursuing the project. He turned the call over to his circuit-board specialist, Bill Yates, who told Gates that he was the first to ask this obviously essential question. “Maybe you guys really have something,” he told Gates.

After six weeks, Paul Allen booked a plane reservation to Albuquerque as he and Gates scrambled to finish up the BASIC. On the night before Allen was scheduled to catch a 6 A.M. flight for Albuquerque, they were still working. At about 1 A.M., Gates told his friend to get a few hours of sleep, and when he awoke, the paper tape with the BASIC would be ready. Allen took him up on the offer, and when he did wake up, Gates handed him the tape and said, “Who knows if it works? Good luck.” Allen crossed his fingers and left for the airport.

Delivering the Code

Allen was sure of his and Gates’s abilities, but as the plane approached Albuquerque he began wondering if they had forgotten something. Halfway into the landing he realized what it was: they had not written a loader program to read the BASIC off the paper tape. Without that program, Allen couldn’t get their BASIC into the Altair. It had never been a problem on their simulated Altair—the simulation had not been that exact. Allen searched for some scrap paper, and as the plane descended, began writing in 8080 machine language. By the time the plane touched down, he had managed to scribble down a loader program. Now when he wasn’t worrying about the BASIC, he could fret about this impromptu loader program.

Not that Allen had much of a chance to worry about anything. Roberts was right there at the appointed time to meet him. Allen was surprised at Ed Roberts’s informality and by the fact he drove a pickup truck. He had expected someone in a business suit driving a fancy car. Equally surprising to him was the dilapidated appearance of the MITS headquarters. Roberts ushered him into the building and said, “Here it is. Here’s the Altair.”

On a bench before them sat the microcomputer with the largest memory in the world. It had 7K of memory, on seven 1K boards, and it was running a program that tested memory by writing random information into the computer’s memory and reading it back. The memory needed testing, but this program was the only one they had. As it ran, all the Altair’s lights were blinking. They had just gotten it working with 7K that day.

Roberts suggested that they postpone testing the BASIC until the next day and took Allen to “the most expensive hotel in Albuquerque,” as Allen recalled. The next day, Roberts had to pay the bill because an embarrassed Paul Allen hadn’t brought along enough cash to cover it.

That morning Allen held his breath as the machine chugged away, loading the tape in about five minutes. He threw the switches on the Altair and entered the starting address that invoked the program. As he flipped the computer’s run switch he thought, “If we made any mistake anywhere, in the assembler or the interpreter, or if there was something we didn’t understand in the 8080, this thing won’t work.” And he waited.

“It printed ‘MEMORY SIZE?’” said Roberts. “What does that mean?”

To Allen, it meant that the program worked. In order to print this message, at least 75 percent of the code had to be accurate. He entered the memory size—7K—and typed “PRINT 2+2.” The machine printed “4.”

Roberts was convinced and told Allen about some additional features he thought a BASIC needed. A few weeks later, Roberts offered, and Allen accepted, the position of MITS software director.

Gates decided that Harvard was less interesting than Albuquerque and moved there to join his friend. Although never a full-time employee of MITS, Gates spent most of his time there after he and Allen were beginning to realize that a large market for software existed beyond Altair users. The two signed a royalty agreement with Ed Roberts for their BASIC and meanwhile began looking for other customers for their language. Gates and Allen began calling their enterprise Microsoft.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset