Wednesday, December 29, 2010
A Brief History - 2 - The Phantom Myth
PART 2: Silicon Wars: The Phantom Myth
Computer code is a series of numbers, or instructions, stored in a computer memory. These numbers are stored in a binary format. The binary instructions are known as opcodes, which are frequently followed in memory by an operand. An operand is data for the opcode instruction to act upon. Not all opcodes require an operand, but most of them do.
Reading and writing binary coded operands can be a tedious, time consuming process. These instructions were entered into computer-processing unit’s memory one memory address at a time. This process required that the software engineer consult a manual for each opcode if he did not have all of them memorized. This was known as “1st Order” programming. Entering programs into memory initially involved manipulating banks of switches on the front of the CPU, and watching the pretty flashing lights. Mind boggling, to say the least. I guess that is why the poor souls were called software engineers, and not developers.
To reduce the time it took to write binary programs, human friendly versions of the opcodes were created. No longer did engineers have to remember that “3C” meant, “load the following operand into CPU register A”. The engineer could use a mnemonic code for load register A instruction, such as “LDA”. A mnemonic code such as “LDB” could mean “load the following operand into CPU register B”. “ADD” could mean add the values in the registers “A” and “B”.
Eventually, computer software was written so that engineers could write out assembly language into a text file. This software was known as a Text Editor. Most all versions of Microsoft Windows come with a Text Editor known as Notepad. Additional software was written to read the text files one line at a time, and generate the binary program for the software engineers.
This software was known as a Compiler. The text files were nicknamed source files, and the generated output files were called binary assemblies. Each line of source code pretty much corresponded to one opcode/operand pair. This was known as “2nd Order” programming.
Writing complete programs was long and time consuming. Each mnemonic code performed just a small, simple task. Complex tasks required extensive amounts of code. For example, engineers found themselves having to copy a significant length source code just to print a single character somewhere. This problem was further aggravated by the fact that, for copyright reasons, each manufacturer’s CPU had its’ own set of opcodes and operands. This also meant that each CPU had its’ own unique set of mnemonic codes. Another could not use a binary assembly written for one CPU. To make matters worse, not every manufacturer was successful. If one went out of business, then your entire software base could be rendered worthless.
These and other issues gave rise to “3rd Order” programming. New languages were created that could compile to a specific assembly language used by a given CPU. Since turn around on the writing, compiling, and loading a binary assembly for testing was time consuming. Software known as Interpreters were written for some languages that could read these higher-level languages, generate some machine instructions, and immediately execute them. These new languages bore names like Fortran, C, and BASIC.
As more and more manufacturers tried to jump onto the bandwagon, a wider variety of CPU designs were created. Some of the newer designs exhibited unique features that the newer languages did not use. Manufacturers began to build complete computers around the newer CPUs. This phenomenon eventually gave rise to the personal computer and explosion of the high level computer language known as BASIC, Beginner’s All-Purpose Symbolic Instruction Code.
Each personal computer had its’ own bells and whistles to make it more attractive to buyers. Unfortunately, this also meant that each personal computer ran a slightly different version of the now standard BASIC language. While each computer could run a common core set of keywords in the BASIC language, most created their own unique keyword to show off unique features of the particular personal computer.
Making matters worse, was the fact that sometimes manufacturers would create the same keyword, but implement them in different ways. Suddenly computer technology was taking a major step backward. The high level languages were supposed to make it easy to write software on one platform and run it on another.
The truth is that the high level languages were actually making it hard to write BASIC software that could execute without modifications across platforms. For other languages the problem wore a different face, but the same lack of cross platform transportability existed.
Fortunately, a shake down of all of the various manufacturers began. Newcomers to the computer manufacturing could see the handwriting on the wall. So instead of introducing new designs, they began making clones and work-alikes of popular designs. Lawsuits resulted. But, one manufacturer had a deeper vision, decided to let it go, and released an “open architecture” specification on how their machine worked. While this did not reveal all of the internal secrets, enough was released into the public domain so that hardware and software developers alike could design products to unleash all of the available potential.
This personal computer was the IBM PC, and it resulted in explosion of companies making external hardware and commercial software that was compatible with it. This trend gave the PC longevity, and caused consumers to purchase more of them. Once again, this also gave rise to vendors selling newer computer languages to run the now established PC. It also gave rise to vendors selling Operating Systems to run on the PC, and of course each OS might come with its own versions of established high-level languages.
The same problem had raised its’ ugly head, but with a different body. Instead of different versions of high-level languages running on different hardware, you had different versions of high-level languages running on different operating systems. It was a brand new day, with the same old song. Reusable code was a myth.