Historical Computing And The Busch 2090 – Simulating A Newer CPU Architecture On An Old Processor

20130902_175609-smIt took a while to get hold of one but I finally managed to get a 1980’s Busch 2090 microcomputer I mused about in this and other previous blog posts. What I could only read about in the manual before I could now finally try out myself on this 30 year old machine and true to the saying that when you read something you remember it but when you do something yourself you will understand, I found out quite a number of things I missed when only reading about it. So here’s the tale of working and programming a 30 year old machine that was there to teach kids and adults about how computers work rather than how to work with computers:

The 2090 is programmed on a hexadecimal keyboard (see figure on the left) in a slightly abstracted pseudo machine code. It makes a number of things easier such as querying the keyboard or to display something on the six digit 7-segment display but otherwise it looks like machine code. After doing some more research into the TMS 4 bit processor used in the 2090, I found out that it is a direct descendant of the first Texas instruments microprocessor with a few more input/output lines, RAM and ROM added. Otherwise the processor works as its predecessor, the TMS 1000 from 1972. In other words when the 2090 appeared in 1981 the processor architecture was rather dated already and much more sophisticated processors such as the Intel 8080, the Zilog Z80, the Motorola 6800 and the MOS 6502 were available. While microcomputer learning kits appearing on the market a year or two later used these or other 8 bit processors, Busch decided to use an old 4 bit architecture. I can only speculate why but pricing was perhaps the deciding factor.

Tms1000-architectureSome research on the net revealed some more material about the CPU and other chips used. The manuals of the TMS 1000 architecture that also includes later versions such as the 1400 and 1600 can be found here and here. These documents are quite fascinating from a number of perspectives as they go into details on the architecture and the instruction set and also give an interesting impression of how what we call ’embedded computing systems’ today were programmed in the 1970s. Simulators were used to test the program which were then included in a RAM on the CPU chip as part of the production. No way to change it later on so it better had to be perfect during the production run.

What surprised me most when studying the hardware architecture and instruction set is that it is very different from the pseudo machine code presented to the user. My impression is that the pseudo machine code was very much inspired by newer processor architectures with a lot of registers and a combined instruction and data RAM residing in a separate chip. The TMS 1600, however, has nothing of the sort. Instructions and data are separate in the chip, all ‘real’ machine code instructions are in a ROM that is accessed via an instruction bus that is separate from the bus over which the built-in memory is accessed.

While the pseudo machine code uses 16 registers, the processor itself only has an accumulator register. The 16 registers are simulated by using the 64 x 4 bit RAM of the TMS 1600, which, on the real machine, is accessed as RAM over an address bus and not as registers. In addition, the processor chip as no external bus to connect to external memory. There are input and output lines but their primary purpose is not to act as a bus system. The 2090 however uses an external 1 kbyte RAM that is accessed via those input output lines. In effect, the small operating system simulates an external bus to that memory chip in which the pseudo machine code the user typed in resides. Very impressive!

There are a number of support chips on the board used for purposes such as multiplexing different hardware units such as the keyboard, the display, LEDs, input connectors and the memory on the input/output lines. As the input/output lines are separate on the chip and do not work like a bi-directional bus, one of the support chips offers tri-state capability for some hardware so it can be removed from the bus.

The TMS 1600 also has no stack as we know it today. Instead it has 3 subroutine return registers so up to three subroutines can called at any one time. This is already an improvement over the original TMS 1000 which only had one such register. Another interesting fact is that the TMS 1600 doesn’t have instructions for integer multiplication and division.

Apart from the accumulator register there are the x- and y-registers. These registers, however are used to address the data ram. A separate 6 bit program counter is used to address the ROM. While the pseudo machine code uses a zero flag and a carry flag, something that is part of all popular 8 bit microprocessor architectures even today, there are no such flags in the TMS 1600. Instead, there’s only a status register that acts as a carry and zero flag depending on the operation performed. Also, the processor doesn’t have the capability for indirect or indexed addressing.

Also quite surprising was that there are no binary logic instructions such as AND, OR, XOR etc. in the CPUs instruction. Therefore, these have to be simulated for the pseudo machine code which contains such commands, again resembling the instruction set of other ‘real’ CPUs at the time.

And another nifty detail are the two different kinds of output lines. There are 13 R-output lines that can be freely programmed and some of them are used in the 2090 e.g. for addressing the RAM chip (address bus) and some for writing 4 bit values to the RAM (data bus). In addition there are 8 O-outputs that can’t be freely programmed. Instead they are set via a 5 bit to 8 bit code converter and the conversion table was part of the custom CPU programming. From today’s perspective it’s incredible to see to what lengths they went to reduce the circuit logic complexity. So a 5 bit to 8 bit code converter, what could that be good for? One quite practical application is to illuminate the digits of a 7-segment display. As only one digit of the 6 digit display can be accessed at a time it’s likely that the 8 O-outputs are not only used for addressing the RAM but also to select one of the six numbers of the display.

Virtually traveling back in time and seeing a CPU like this in action rather than just reading about it is incredible. I now understand much better how the CPU architecture we still use today came to be and how limitations were lifted over time. An incredible journey that has led me to a number of other ideas and experiments as you shall read here soon.

Were There Computer Learning Kits for Teenagers In Your Country?

There's one thing I have been wondering about while enjoying my recent trips back in time to the 1980's and computer learning kits: Were there similar kits in other countries around the globe tailored for teaching teenagers how computers work (vs. how to work with computers)?

In German speaking countries there were three different kits (Philips 6400, Busch 2090 and the Kosmos CP1) sold mainly via toy stores (yes!). So I searched the net a bit in the languages I am able to understand if I could find similar kits having been sold in other countries but came up pretty much empty handed. Perhaps this is due to the way I searched and the keywords I used but it's difficult to believe this was only something that happened in a few German speaking countries in Europe.

As many of you must have also grown up in the 1980's perhaps you still remember something that could point me in the right direction. If so, please consider leaving a comment!

Learning How Computers Work – Comparing Approaches of the 1980s

In a previous post I've been musing about how in the 1980s, microcomputer learning kits appeared on the market to teach kids and adults how computers work. Note that this is different from learning how to work with computers or even how to program them in a higher level language as in both cases the inner workings of a computer is abstracted. As I'm fascinated by the approach I've also wondered in the post if such kits are still available today or if learning about how computers work has effectively moved on to only be a topic at university courses. Here's what I've found out so far:

Even after some more research I still came up empty handed and it seems such learning and tinkering kits have disappeared today. What I have found, however, is a number of 1980s microcomputer learning kits each with a slightly different approach to the topic. As I am not only interested in the historical perspective but also wonder how this approach could be revived with current hardware and perhaps some self-written software I had a closer look at the tutorials which can be found in PDF format on websites of vintage computing enthusiasts to see how the different kits went about teaching computing basics. Interestingly enough, the approaches are quite different:

The Busch 2090 4-bit Microcomputer Kit

Busch-img-2Released in 1981, the Busch 2090 is the oldest of the three microcomputer learning kits I could find. It's based on a 4-bit microcomputer. As the other two, the kit is part of a larger electronics experiment program so it works well together with other electronics kits of the company to expand experiments into the physical world by triggering outputs to LEDs and loudspeakers and receiving input from different kind of self assembled circuits. I've blogged about it in a previous post and you can find some more details see here. (Sorry for this and many other links in this post being in German but it seems these kits were mainly popular in the German speaking world. Google Translate is a helpful tool to translate the pages into your language on the fly.)

Busch-mascotPrograms are written in a 4-bit pseudo machine code. Each pseudo instruction is always 3 hexadecimal digits long and all operations are explained in the decimal, binary and hexadecimal system. While most pseudo instructions closely resemble actual machine instructions some also perform more complex tasks such as displaying the contents of the accumulator or other registers on the display or reading key input. What I liked best about the teaching approach of the tutorial is the jovial style and a mascot that demonstrates important principles in a funny and easy understandable way as shown in the first image on the left

Busch-programAnother great approach of the tutorial is that almost all program listings contain the memory address for each instruction, the instruction code, the mnemonic for it and a description for each operation as shown in the third image on the left. This makes understanding and memorizing the codes and mnemonics very easy.

I find that the writing style and level of detail makes this kit appealing for kids from 12 to 99. The descriptions of how a microprocessor works and how it communicates with memory and peripherals are very simple but still precise. The tutorial has around 80 pages, so it's not a daunting task to go through it even with the attention span of a 12 year old and I found it to be a perfect balance between beeing too simple and too complex for people that have never touched the subject before.

The Philips 6400 Microcomputer Master Lab

Philips-6400-2Two years later, in 1983, Philips released it's microcomputer learning kit, the Philips 6400 microcomputer masterlab. While the general approach is the same as in the Busch 2090 there are some significant differences in the practical implementation. Philips used an 8-bit processor for its kit and instead of pseudo machine code instructions, real machine code was used for user programs. I very much like this approach as this is as close to the bare metal as possible. It makes programming a bit more complicated but from the tutorial I take it that the kit was addressed at a somewhat older audience than the Busch computer, perhaps 16 years and up, so this is not much of an issue. Less humor and more facts I would say.

The level of detail is much deeper compared to the Busch kit. At 160 pages the tutorial is twice the size and technical descriptions go much further and deeper. There are good technical descriptions of how two numbers are added in the hexadecimal system, how this is done in the binary system and finally of how this is implemented in hardware with Boolean logic. How subtraction is done by adding the two's complement of a number to another is also introduced as well as multiplication and division operations. The kit also introduces the reader reader to function calls, the stack and stack pointer, discusses Boolean logic (AND, OR, NAND, NOR, XOR), bit masking, jump conditions and quite a number of other bare metal operations. For somebody in the final years of high school who has a knack for mathematics, this level of detail and complexity is probably just right.

Philips-programMy only gripe with the tutorial is that at the beginning program listings are not explained at all and the user has to type in numbers without really knowing what they do or what they stand for. This gets better as more details are introduced as shown in the image on the left but I still felt when reading the tutorial that the program listings should have contained more explanations on an instruction to instruction basis for an easier understanding.

The Kosmos CP1

Kosmos-cp1The tutorial I have of this kit is from 1983 so it also seems to have been brought to the market two years after the Busch 2090. Like the Busch computer, the Kosmos CP1 also seems to address a younger audience as the introduction to computing is quite on a high level of abstraction. Like the Busch approach, the kit uses pseudo-machine instructions, that are, however, much more abstracted than the Busch pseudo-instructions that stick much closer to real machine instructions.

Kosmos-programHaving gone through the other two tutorials before I focused on this one I have to admit that I found the pseudo-machine code of this approach a bit difficult to understand and I wonder why they ventured so far away from the bare metal instructions. Perhaps this was done to get around the hexadecimal system. Yes, there's not a single hex number throughout the whole tutorial, the computer is entirely programed with decimal numbers. Discovering the hexadecimal system later on must be somewhat of a culture shock. The image on the left shows how a program for the CP1 looks like. Each command is well described but the commands themselves are a bit too abstracted from the real world for my taste. The tutorial has 145 pages and is split into two parts. The first 60
pages are dedicated to introducing the commands and how a computer
works and the second part is dedicated to program examples that are
discussed in detail. Quite a number of the examples let the computer interact with the real world via electronic input and output circuits that can be plugged together on an extension board. While the other two kits include such extension boards, some resistors, transistors, LEDs, etc., I am not sure they were included in the CP1 kit or if was assumed that the reader has already bought other electronics experiment kits from Kosmos before.

What All Have in Common And Why Simplicity Trumps The Full Keyboard + Screen Approach

One thing all three kits have in common is a 7-segment display with six digits (Busch 2090 and Kosmos CP1) or eight digits (Philips 6400). As can be seen in the images the kits are completely operated and programed via numerical input pads and a number of special keys for operations such as performing a reset, for selecting and running a program, for entering programming mode, etc.). This might seem a bit archaic from today's point of view but since these kits are there to introduce the bare metal innards of computers I would still do it like that today. It might be too cumbersome to write long programs with only a numerical keypad to type in raw machine instruction codes but the point of these kits is to teach how a computer works on a low level. Therefore, interacting with it on this level is very appropriate and serves the 'bare metal' approach rather than being a restriction.

In addtion, all kits are very hardware centric so experiments are not limited to generating an output on a 7 segment display and receiving input from the numeric keypad. Instead, experiments can make use of digital input and output ports to which electronic circuits that are put together by the user on an extension board can either deliver input or receive an output to trigger lights or generate a sound.

My Preferences For A Modern Microcomputer Learning Kit

If I were to create such a kit again today for kids age 12 and up and also an adult audience, I think I would take an approach between the Busch 2090 and CP1 on the one hand and the Philips approach on the other. I like the simple and fun approach to the topic of the Busch 2090 tutorial but instead of using pseudo machine instructions I would make use of real machine instructions as is done by the Philips kit. That would mean to introduce function calls a bit earlier in the tutorial to do some more complicated things as showing register contents on the 7-segment display or receiving keyboard input but I think that is a compromise that would be worth it. One could even have two tutorials then, one for a younger and one for a somewhat more technically knowledgeable audience. Or one could create an easy to understand tutorial for both audiences and have a second one with more technical details that builds on the first one for those that have been hooked.

While I think that the audience for such kits was small back in the 1980's and might perhaps be even smaller today it would still be fun to work on this for pure self enjoyment and for giving something to those who'd like to find out how a computer really works. Too bad the day only has 24 hours…

Learning How Computers Work vs. How To Work With Computers

Nostalgia post – part 2. During the revival of my electronic kits use from my teenage years about which I blogged previously I stumbled over a 30 year old computer advertisement conveniently put on the back of one of the instruction manuals. No, we are not talking about computers as we know them today. No, this was an advertisement for a 4-bit (!) experimental computer, the Busch electronic 2090 microcomputer.

Based on a TMS-1600 processor and designed less than a decade after Intel produced their first microprocessor (the 4004) it would have been a dream for that 13 year old boy. Unbelievable nowadays when kids use "real" computers today before they even go to school. So that was my object of desire and today it feels like I would have willingly forgone 5 years of pocket money to get one. But I never got one, partly due to me not having the money to buy one myself and partly because I guess my parents had no idea why in the world they should spend money on this. Different times. Out of interest I did a bit of research of how much that Busch 2090 cost in the mid 1980's. I didn't find anything on the net at first but then I remembered that I have a few computer magazines from the 1980's in my cabinet that might contain an advertisement. And indeed I found an advertisement in the first C't magazine ever published in December 1983 from the manufacturer where the price was given as 299 DM (Deutsche Mark). With inflation and salary increases included I estimate that the price would be equivalent to what 300 Euros are worth in 2013. The magazine is available as a PDF from the publisher here. Have a look at page 26.

As can be seen in the only video on Youtube that shows the device, there's no keyboard as we know it, no screen, just a hex-input block and a 6 digit 7-segment display, 4k ROM and around half a kilobyte of RAM. Almost unfathomably little today. But it did one thing very well then and would still do it today: It shows how computers work (and not how to work with computers).

The manual that can be downloaded from the history section of the manufacturer's website teaches on only 80 pages the very basics of a computer. How does a microprocessor work, what is a bus, what's binary, what's the hexadecimal system and why it is needed, boolean logic, input and output, how does a microprocessor calculate, etc. etc. On 80 pages (including the code) and written in a way understandable for teenagers with no previous knowledge about the topic. Amazing!

Unfortunately these devices have become very rare. They were probably already rare 30 years ago as most kids probably experienced the same difficulties getting one as I did. So I keep my eyes open on eBay, perhaps I will get lucky one day. In the meantime I was wondering if there are equivalent learner kits today. Raspberry Pis are great for learning how to work WITH a computer, how to program it and to build many cool things. But it runs a full operating system, so everything is abstracted to such a level that it's difficult to use it for learning HOW a computer works. Arduino's might be better for the purpose perhaps but the way I understand the goal of that platform is that the software that comes with it again abstracts the underlying hardware to give people easy access to a device that can interact with the real world. That's great of course but again it doesn't teach people of how computers work.

When searching on my favourite web store portals I equally came up empty handed. Can it really be that today there are no computing kits for kids in their teens (or to grown ups that don't aspire to get a bachelor in computing but still want to know how a computer works) so they can learn how a CPU works and how it interacts with memory, input output devices and all the other magic!? It seems not but please prove me wrong, I'd really like to hear about it.

In the meantime I keep musing about whether perhaps an Arduino with an input/output shield, a hex keyboard and a 7-segment display combined with a software similar to what ran on the Busch 2090 could do the trick today. Open source for the enjoyment of parents and kids!?

Before My First Computer

Busch-blog-smThis blog post is a bit about nostalgia brought about by a current quality time project I am working on. If you were a teenager in the 1980s and read this blog then your experiences might have been similar 🙂

When I was in my teenage years in the mid 1980's, home electronics projects and home computers were the hype of the day for kids fascinated by blinking lights and the mysterious powers of electricity. I must have been one of them because I didn't give up talking about the subject with my parents until they finally gave in and gave me an electronics experiment kit and later on a computer. So before that legendary first C64 that finally arrived one day, I got and bought with hard earned money a number of electronic kits, that culminated in the extension pack you see on the left, the Busch electronics experiment extension kit 2061.

Still available today (in a slightly different color) they were a real enabler for me. Long before I had physics classes in high school, these kits told me about the basics such as voltage, current, resistors, transistors, capacitors, coils, flip flops, timer circuits, radios, integrated circuits, boolean logic, etc. etc. Sure, I heard about some of these things again in high school eventually, but it is the time I spent experimenting with these kits and what I learned then that I still remember vividly.

And now almost 30 years later I still profit from it. Even up to the point that I have put the kits into good use again to prototype a circuit I want to build for use with a Raspbery Pi and a PiFace extension board for some real world interaction. This is kind of electronics 2.0 for me, as this time, it's no longer "only" something on a board that interacts with the real world but extends its reach via the Raspberry Pi over Wi-Fi and into the Internet. Electronics, computers and the net combined. I wouldn't have dreamed of that 30 years ago and I still fascinates me today.

How times have changed. Back then it took hard persuasion or saving money for a long time before I got the first kit and then to buy further extension packs. Today, the world has changed, things have become cheaper and more accessible and if I have an idea that requires additional hardware it can be organized almost overnight via the Internet or going to a local electronics store. Also, money for new stuff is not an issue anymore, which helps tremendously as well.

Are you feeling a bit nostalgic or inspired now and think about getting those experiment kits out of storage again?