BASIC at 50: Bad Trip or Bad Rap?

Is it true that a person reared on BASIC, lingua franca of the eight-bit computer world, is forever damned by the experience? Jack Ganssle,the embedded systems guru, shares his experience with BASIC on its 50th anniversary.

Everyone was doing it
Everyone knew BASIC, so in 1983, I wrote a BASIC compiler (not interpreter) targeted at embedded applications. It was interactive and felt exactly like an interpreter; one entered code with line numbers. "RUN" compiled and started executing the code in less than a second. The compiler generated very tight code and even had built-in multitasking support. It ran under CP/M on 8080 and Z80 systems and comprised about 30,000 lines of assembly language. Multitasking meant all generated code and libraries had to be reentrant, so I hired a college kid to write a reentrant and position-independent floating point package -- quite an accomplishment, given the 8080's architecture.

Surprisingly, it took off. Orders showed up and then steamrolled in. It was startling to find checks from people I didn't know in the daily mail. I was working out of a bedroom in the house, but I couldn't handle the order fulfillment, so my wife quit her job to help. Eventually, we moved into the basement, because the upper two floors were filled with manuals, boxes, floppy disks, and (eventually) employees. Later we rented space in an R&D park and set up more professional offices.

IBM stunned the market when it introduced its PC. I bought one outfitted with everything -- two floppy disks, 128 KB of RAM, etc. -- which cost $7,000. Customers were asking for a PC version of the compiler, so I purchased a Z80 to 8088 assembly translator, which created awful, nasty code because the instruction sets were so dissimilar, and, of course, all the code generation was incompatible. In a hectic couple of months, I recoded it in 8088 assembly. If you had anything for a PC then, it sold, and our BASIC profited from that frenzy. It didn't hurt that Jerry Pournelle was an early advocate who featured it in Byte Magazine.

Code generated by the compiler eventually was used at both poles for research instruments, aboard the space shuttle, and even in the nuclear submarine fleet. But embedded C started to gain adherents, and BASIC's demise was evident. The last updates were in 1988, but to this day I still get requests for new versions.

I read an awful lot of code our customers wrote in BASIC. Some was pretty terrible, but a lot was as carefully crafted as anything written in C today, within the constraints of the language, giving lie to the belief that BASIC makes for crummy developers. I'll bet a lot of readers got their start in computers with BASIC but today build world-class code.

What was your experience with BASIC? Do you feel it poisoned your abilities?

— Jack G. Ganssle is a lecturer and consultant on embedded development issues. He conducts seminars on embedded systems and helps companies with their embedded challenges, and works as an expert witness on embedded issues. Contact him at jack@ganssle.com. His website is
www.ganssle.com.

Now this brings back a memory of a story about a colleague who needed to design RF bandpass filters, but all he knew was Basic (self-taught). The corporate computer was a PDP-something used mainly by the software coders.

This guy started runing RF filter design equations in Basic, and brought that PDP-? system to its knees with all the number crunching. The software folks were upset, whenever he ran his programs their response times went sky-high.

What did not help (or what DID help from his viewpoint) was he had discovered that a simple PRINT statement to output a single character in the middle of his routine would cause the time-sharing machine to devote much more time to his program than usual, at the expense of the software coders.

I'm and RF Guy but still I started with Fortran then dabbled in some C++ in college.

I guess since RF was easy for me with none of that black magic that other non RF people talk about, I was still so bored with the old analog control/interfaces on my Rf projects that I went for some real abuse and started to do some micro programming in the late 1990's to make my RF projects more modern.

I migrated to Microchip PICs in the late 1990s and started using a compiler called PICBasic Pro simply because it was cheap and it is an excellent basic language compiler with numerous resources available.

I have built everything with PICs from full blown RF transceivers with all of the fancy LCD displays to a PWM controlled AM transceiver with PWM bias control on the RF stages then when this wasn't enough I added a PIC controlled VSWR/ protection circuit.

Next was a full blown ham radio repeater controller that sets the frequency and even does antenna rotation control via DTMF tones all in Pic BasicPro.

For me not being a dedicated programmer I didn't have to stay with C and I found that the version of basic that I'm using is incredibly and extemely functionable.

I coded some of my projects in C, just to be fresh on my old programming, but still for my projects I always found myself going back to the PICBasic Pro compiler simply because it is reliable and easy to use with more than enough built in libraries for all of my RF needs.

I too learned BASIC on a Sinclair -- yes it was the Timex Sinclair in the U.S. -- and later used on the original IBM PC. I agree that BASIC made it easy to learn bad habits, but it also enabled many of us to get into programming without the agony of late nights typing out punch cards at the campus computing center. BASIC served it's purpose way back when.

I'd thought that he'd written the Applesoft floating-point BASIC, too, but that actually came from Microsoft. The Wikipedia page says that Microsoft licensed it for 7 years for $21000. I would feel sorry for them missing out on all that big Apple money in the 80s, but things turned out all right for Microsoft.

BASIC was great for its time - a simple language that could get you going on many different systems. The old Apple ][ had a BASIC intrepreter - and a Pascal language card that languished on many machines it was installed in.

I used to compare BASIC and Pascal as 'do it your way' and 'do it my way' languages. I always chose the 'do it your way' - and still try to do that, even in C++ - but that's another story.

My favorite BASIC statement was actually 'COMEFROM.' Unfortunately this was not implementen in most dialects of BASIC. It would have been a much richer language if it had been.

I wrote a lot of code in BASIC, using Microsoft's semi-compiled QuickBASIC in the last few years I uaed the language. But that was after I was able to build my own machine and wasn't tied to the ball-and-chain of punch cards and job submittal statements surrounding the 'real' code.

like many posters in this forum my first language was FORTRAN, learned on a UNIVAC 1108 in the basement of the University of Wisconsin Computer Sciences Building - MACC as it was called then. We used Hollerith cards and I got pretty good at distinguishing an 'O' from a '0' - much better than the FORTRAN compiler we were using at the time, in fact.

The MACC basement was a large open area with two alcoves - one housed the punch card machines where you entered your world-beating (or at lease course-passing) FORTRAN code on Hollerith cards; the other alcove came to house a collection of DEC-Writers that allowed you to initiate interactive sessions with the UNIVAC - and spend a lot of real money fiddling around.

The really serious area of the basement was the table(s) reserved for people doing graduate work in CS. You could tell them by their long, scraggly beards, huge collections of card decks in boxes and the overflowing ashtrays. Each time I went down there I swear those guys (there were no women graduate students that I recall - perhaps I was blinded by the clouds of smoke) hadn't moved since the last time I was down there.

I wonder if they were still there when they remodeled the CS building some years back? Maybe they are inside the glass house, perserved like Chairman Mao or (formerly) Lenin?

I have been a fan of BASIC since I learned about computers way back in 1976

In the interpretive format it is so compact that in the later part of my career, I used that in our smart TV product ( developed in 1990) as a simple embedded computer for children .It was fun working with BASIC then.

Actually, Microsoft's QuickBasic 4.5 and 7.1 were both also compiled. But they won't run on anything past WinXP except with a DOS VM, which slows them down.

But never fear, there are enough Basic fans that have kept the language alive. My favorite today is QB64, which is a compiled version of QuickBasic, fast, and runs just fine on Win7 and Win8, not to mention Linux and Apple OS, thank you very much. And QB64 runs just about any MS QuickBasic code with no changes, not even changes to the graphics, although it adds a host of new features.

It's easy to write proper code with these updated versions, just as it is in VB. And the nice thing is, most programmers, no matter what their preferred language, can read Basic code. Not all that different from Pascal, in this regard, only Basic still soldiers on, and Pascal?

David Ashton might be pleased to know that QB64 is hatched down under.