Page 1 of 2
To discover what the BIOS is all about we have to go back, back into the dark days when computers were big and real programmers dreamed in octal.
Imagine you have built yourself an early computer – now how are you going to program it?
When you switch it on its memory contains so many random zeros and ones.
If you press the “Run” button – yes once there really was a “Run” button – the behavior of the machine would be unpredictable, to say the least.
One solution to the “getting started” problem was to attack the machine with a soldering iron and really give it a good programming.
By changing the way the machine was connected up, different programs could be run but it could hardly be called a conveniently “programmable” machine. Eniac, one of the first digital computers, was used in this way and it is one of the reasons why it is sometimes disputed as the “first programmable digital computer”.
After a while it became clear that there had to be a way of loading the computer’s memory with the bit patterns that represented the program and the data it needed before pressing the “Run” button.
Flashing lights and switches
Now you know the reason for all the switches and the flashing lights on the front of most early computers.
One bank of switches was used to specify a memory address, in binary of course, and another was used to specify the data that was to be stored there. Another button, usually marked “Store”, was used to actually perform the transfer from the switches to the memory.
For example, suppose you wanted to store the zero in memory location zero. You would first set all of the address switches to zero then you would set all of the data switches to zero and press the “Store” button. The same procedure would be used to store any data into any address.
The only real difficulty is working out what the binary equivalent of any particular number is and setting the switches.
For example, say you want to store 100 in memory location 2340 (both in decimal). With the help of a “programmer’s” calculator it isn’t difficult to discover that 100 is 1100100 and 2340 is 100100100100 but back in those days there weren’t any programmer’s calculators and the job had to be done in your head.
This is the reason intermediate number bases such as octal and hexadecimal became popular. A number given in octal or hex was relatively easy to convert to binary because it could be done a digit at a time.
For example, 23 in octal can be converted to binary simply by knowing that 2 is 010 and 3 is 011 giving 010011 for the full answer.
Many programmers of the time quickly developed the ability to read octal or hex and set the machines switches to the binary equivalent very quickly. It also explains why the switches on these early machines are grouped into sets of three or four – three for an octal digit and four for a hex digit.
A typical front panel of lights and switches - an IBM 360
This only leaves the question of what the lights were for?
Easy – you needed someway of checking what you had entered into a memory location. The data stored in a memory location was shown as a binary number and the current address was displayed on a separate row of lights.
You might think that the address lights were unnecessary, so proving that the flashing lights were there just to keep the techies happy! Not so because it didn’t take long to realise that most programmers wanted to look at consecutive memory locations and to save them having to key in 1,2,3, and so on as addresses a “Next” button was added to step the address on by one. So the address display quickly became out of sync with the switches and they were necessary and not just stylish accessories!
The reason why there were more lights than just one row for the address and one for the data was that a set of lights was generally provided for each “register” the machine’s processor had.
If you recall from an earlier look into Babbage’s bag, a register is a special type of memory location inside the processor which can be used to manipulate rather than just store the data.
So now you have it - all the flashing lights and switches were used to get the machine started and to verify what it was doing.
We now come to the question of what was typed in using these key switches.
In the early days it really was the program that you wanted to run. You really did have to sit and key in every single byte of your program no matter how long it was!
However, very quickly machines acquired input devices such as paper tape readers onto which programs could be punched. Now at this point you might very well imagine that this was the end of the switches and lights, but no. Initially the computer had no idea what a paper tape reader was and if you switched it all on and started running the contents of its memory it would still run random nonsense.
The time-saving idea that we needed was the “bootstrap”.
A bootstrap is a small program (given you have to key it in as small a program as possible) that reads data from the paper tape punch and stores it in sequential memory locations.
In other words, a bootstrap is a program loader and once you have it in the machines memory you don’t have to key anything in using those switches ever again. In most cases the first small program was used to load a bigger program that acted as an even better loader.
The early programmers thought of the first loader as starting the machine by “picking it up by its own bootstraps”, an image that presumably had more street cred in its day.
So the small initial program became known as a “bootstrap loader”, then just a “bootstrap” and today we still refer to starting a machine as “booting”, the area of the disk that holds the loader is called the “boot block”, the startup phase is knowing as “bootup” and so on.