Categories
Blog posts in English

Welcome to Elbug!

The year is 1982, I’m 13½ years old, and I had more or less completed the move from plain Lego bricks to Lego Tecnic. I’m also becoming increasingly interested in electronics, and while reading electronics books and magazines, and constructing my own circuits, Radio Luxemburg is playing on my AM radio. Reception is only possible after sunset and – depending on weather – even then is often quite poor, but the music and DJ’s are great, and I love it!
And this was when my computer career started: One of my father’s colleagues had built himself a simple computer based on the National Semiconductor SC/MP microprocessor. Based on a 1977 design by the Dutch/English Elektor magazine, he had chosen to skip their original printed circuit boards and instead build a compatible machine on wire wrap Eurocards. For some reason, he decided to give the machine to me 🙂
The machine was programmable in a tiny BASIC dialect called NIBL-E – and in machine code. Programs were recorded on cassette tape and loaded using a HEX I/O board with 16 hex number keys and 8 function keys for input, and 8 7-segment LED displays for output. A monitor program called Elbug residing in the lower 1.5 kb took care of hex i/o, cassette tape interface, and even had simple debugging tools. Starting the NIBL interpreter was easy though: You just had to RUN the program at address hex 1000, which was where the two 2 kb e-proms containing the full NIBL interpreter started.
The SC/MP had a very pretty instruction set architecture (almost RISC like), but was dreadfully inefficient and the BASIC programs executed very slowly. I therefore quite quickly moved on to learn the machine code language, writing programs on notepaper, converting the instructions to hex code by hand, and entering them on the hex-keyboard.
At some point, however, my father and I sat down and designed a simple assembler: Initially written in BASIC, over the following year or so, I wrote several machine code routines for it to speed up the assemblyprocess.
I remember carrying my open frame computer with several pc boards and 9 kb RAM and external terminal to a computer party. My friends found my computer odd, but cool. I programmed mine while they played games on their ZX Spectrums, ZX81s, andCommodore VIC-20s.
I explored and programmed the SC/MP computer for two or three years until I moved to a CP/M based personal computer, but that’s another story!
All this happened 30 years ago, and in the true spirit of retro computing, a few months ago, I started implementing an emulator in Java. Why? Well, I needed to get myself acquainted with a new Java IDE (IntelliJ), and my Java experience was getting pretty rusty… so why not do a hobby project which I could relate to? I still remember the hex codes of many SC/MP instructions – I think the memory of the computer is more or less hard-wired into my brain!
And here it is: My SC/MP emulator running the Elbug monitor:

My SC/MP emulator running the Elbug monitor

The processor emulator itself is about 600 lines of Java code, and there are some 500 additional lines of Java implementing a memory handling, a Swing based emulation of the HEX I/O board (including a 7 segment display widget), and a main program.
I feel I need to do some code clean up before I release it, but it’s my intention to put everything into a SourceForge project. Although I don’t know anyone apart from myself with a SC/MP computer, there are a few web pages around about this simple processor and the Elektor design, so it might be of interest to others.
I still have a few things to work out: The serial I/O on the SC/MP was implemented in software, so to run the original NIBL interpreter, I’ll have to do some cleaver de-serialization and serialization in Java as well as a simple terminal emulator. But I’ve got the software design pretty much worked out in my head, so I’m pretty sure I’ll make that work too.
I even have a plan to decode my old cassette tapes: A WAV file recording and some cleaver FFT analysis should be able to do the job of decoding the 600 baud FSK coding, I think.
By the way: The emulator is bug free! “That can’t be true!”, I hear you shout? Maybe not to you, but the thing is that none of the problems it has “bug me”: It’s all about entertainment! 😀

Categories
Blog posts in English

It's fortune Friday

It’s fortune(6) Friday… what my server said when I logged in on the console today:

Welcome to NetBSD!
WARNING!!!
This machine is subject to breakdowns during periods of critical need.
A special circuit in the machine called “critical detector” senses the operator’s emotional state in terms of how desperate he/she is to use the machine.  The “critical detector” then creates a malfunction proportional to the desperation of the operator.  Threatening the machine with violence only aggravates the situation.  Likewise, attempts to use another machine may cause it to malfunction.  They belong to the same union.  Keep cool and say nice things to the machine.  Nothing else seems to work.
See also: flog(1), tm(1)

Thanks for warning me!

Categories
Blog posts in English

Teaching Testing to Teenagers

I had the opportunity of being teacher for my son Frederik’s 7th grade class today at Kvikmarken. The school had decided to send the ”real” teachers on a workshop together, so the job of teaching the children was left to volounteering parents. I’m enthusiastic about learning, so felt obliged to volunteer.
I gave them a crash course in software testing.

Software on punched paper tape from the mid 1960's

These boys and girls are really smart. They quickly grasped an understanding of what software testing is about: Exploring and learning. Remember, they are brought up with laptops, mobile phones, and the internet, so they’ve learned to cope with all the shortcomings and bugs that come with today’s technology. I could have expected them to be blind of bugs. But no, they do see them – and they are splendid explorers and learners.
I started my lesson with a flash back 40-50 years ago when computers were as big as a classroom and software was written on note paper and stored on punched tape. I compared this with today’s state of the art commodity computer: An iPad, smaller than a school book – and a lot more powerful than computers then.
Complexity has increased by a factor of at least one million – and it shows! (Though I should add that the evolution of software development tools and methods has also improved a good deal.)
They now know what a bug is, why there are bugs in software, what testing is about and how testing is a learning and discovery process. They also have an idea of why we’re testing – they particularly liked this one: We test because it feels good to break stuff!
Finally, the had a chance to prove their collective exploration abilities in a testing exercise. They did splendidly!
The last slide of my presentation contained a quote from James Bach on Twitter yesterday, words of a true tester on bug hunt using his senses:

Say “it looks bad” and I hear you.
Say “it smells bad” and I taste BLOOD.

I’m happy that Frederik’s classmatetes liked my lesson: ”Great presentation, thanks!”, ”Wow, testing is fun!”, ”You’ve got a really cool job!”
I think there’s good reason to expect software engineering to improve a lot when these boys and girls get to be responsible for software engineering!