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 email@example.com. His website is