Monday, Apr. 16, 1984

Forty Days and Forty Nights

By Phillip Elmer-Dewitt

When Michael Wise sits down at a keyboard, he never knows when he will get up. The plump, bearded computer programmer often works twelve, 24, even 36 hours without a break, filling a green screen at the San Rafael, Calif., offices of Broderbund Software with words and numbers that only he and his computer completely understand. Since December, Wise has written 40,000 lines of instructions for a video game he calls Captain Goodnight, after the old Captain Midnight radio series. By the time the program is ready for release this summer, it will have grown to 50,000 lines and swallowed up some 900 hours of programming time, or nearly 40 days and 40 nights.

The lines of code Wise types into his Apple He may look like a meaningless string of letters and numbers, but they are the crucial link between computers and the people who use them. At the heart of every machine are thousands of on-off switches. Wise's 64K Apple has 524,288. Software tells the switches when to turn on and off, and those switches control the machine.

Wise's first task in writing his program was to create the objects displayed on the screen. These are actually just patterns of colored dots, with each dot controlled by an individual on-off switch. Wise sketched the images on an electronic drawing

tablet that translated his lines into patterns of ones and zeros, where one represents a dot of color and zero a blank space. The image of Captain Goodnight's airplane is stored in the computer as a list of 798 zeros and ones that look like this: 11111100 00000001 10000000.. .

After the objects were drawn, Wise began creating a series of small, self-contained miniprograms called subroutines. One subroutine, for example, moves the captain's jet. Another controls the enemy planes. A third fires a missile. In all, the finished program will have 400 different subroutines. Wise writes it one subroutine at a time, making sure that each new one works before continuing. A typical section of coding reads:

EMIS-HIT? LDA JETY SBC EMISY CMP #10 BGE EMISEXIT

PLAYR-HIT? LDA #01

STA JETCOND

Those commands tell the computer to determine the jet's altitude (JETY) and subtract the altitude of the enemy missile (EMISY). If the result is ten or more, the two objects have missed each other. If it is less than ten, the program puts a one in a special switch called JETCOND that sends the jet into a flaming crash.

As the pieces of the program fall together, their interrelationship becomes maddeningly complex. Even one letter misplaced in 10,000 lines of code is enough to throw the whole program out of kilter. At one stage in the game's development, the computer had the captain walking in mid-air because one subroutine was inadvertently modifying another subroutine's instructions. "I almost went blind trying to find that bug," Wise recalls.

Wise has been dabbling in software since the age of 14, when he learned FORTRAN on an IBM at Stewart Junior High School in Tacoma, Wash. He dissected nearly every radio and television set in the house and then skipped college to take a series of odd jobs on the periphery of the computer world. He repaired video-arcade games, Xerox machines and personal computers, and at one time ran the ComputerLand store in Renton, Wash. In 1979, convinced that there were fortunes to be made, he bought an Apple II Plus and began churning out video games, working as a building manager by day and programming at night.

Wise still does his best work at night. Every evening after dinner he picks up where he left off at work. "My wife is a computer widow," he confesses. During the past month, he has been working until dawn with increasing regularity. "When I'm done, we're taking a vacation," says the 29-year-old programmer. "I'm almost getting too old for this." --By Philip Elmer-DeWrtt