Introduction and Background
In 1975 a friend bought one of the original Altair 8800
kits that appeared in that January's Popular Electronics Magazine.
It was one of the first do it yourself microcomputer projects using
the relatively new Intel 8080 microprocessor.
There was no keyboard or screen; no way to externally store and
retrieve programs; and, for that matter, no programs.
What you received was a front panel with LEDs and switches along with a
whopping 256 bytes of memory.
Not megabytes or kilobytes, but bytes!
When I first encountered the Altair in 1975, I had no choice but to learn to program in Intel 8080 machine code. This meant literally forming instructions in bits and bytes then loading them in memory using the Altair's front panel switches. It was almost a year later that I acquired an Intel 8080 assembler and was able to program in assembly language with English like mnemonics. As for getting my hands on a high level language, I eventually had to write my own version of Tiny BASIC ("dr. dobb's journal of Tiny BASIC Calisthenics & Orthodontia"; Volume 1 Number 1; January 1976); Page 15), which you'll get to play with using the emulator! For a look at some of my hand coded work on Tiny BASIC, click here.
While the path I took was not the most desirable one, clearly there was educational value. It taught me how microprocessors work from the inside out! Later, when high level languages become available, I had a much better understanding of whys and wherefores of coding, both in terms of efficiency (speed) and language constructs. Some languages, like C++, permitted assembly languages routines to be embedded within native code. Doing so not only provided a speed boost in certain special situations, but also allowed me to gain access to certain microprocessor capabilities not available in the high level language. Perhaps the greatest positive for me was it paved the way for me to do hardware and software design for embedded controllers where resources were not as plentiful as with PCs. In the end, I never regretted for a moment starting my microprocessor journey with machine language, graduating to assembly language, and finally programming in a high level language.
Should you wish to explore microprocessors from the inside out, it would be unreasonable to expect you to struggle for two or three of years as I did. Fortunately, you don't have to. What it often took me weeks to untangle and figure out on my own, I can help you through in a matter of hours. The first seven experiments presented here explore a very basic microprocessor starting with machine coding then move to assembler coding, all based on the Intel 8080's simple and straightforward instruction set. At each stage, you'll be able to try out the code using the Intel 8080 emulator. The basic principles covered in these experiments, while based on the Intel 8080, carry over very nicely to any number of modern microprocessors. With very little effort you will be able to move on to additional experiments using the Atmel ATmega328.
Importantly, you don't have to be a computer science major to make your way through these experiments. A little knowledge of binary arithmetic will come in handy, so I've included a binary primer that should suffice. Equipped with the right amount of curiosity and interest, you will do just fine.
Lastly, if you decide to devote your time and effort to doing these experiments, do it for the educational value. Don't think it will lead to abandoning high level languages in favor of assembly. At most, you may want to tinker with some simple microcomputer embedded applications using assembly code. Ultimately, the greatest value will be a better understanding of what's going on inside the microprocessor when high level language statements are executed and using this knowledge to write better programs.
To start with the binary arithmetic primer, click here. Or go straight to the first Intel 8080 experiment by clicking here.