Whiteboardiac is a silly little emulator for a very simple computer. It has 100 decibytes of memory, where a decibyte is a decimal byte, two decimal digits from 0 to 99. It also has 100 lines of program memory, each one from one to three decibytes. Its output is a single seven-segment LCD display, and it has no input, though you can edit the memory.
You write programs in machine code. For example:
37
62 5
0
… is a program to display the number “9” on the LCD. Opcode 37 is “switch on all segments”. Opcode 62 is “switch off segment X”, where X is the number following on the line. Opcode 0 is “stop”. The above was the first program I wrote with my son, the Boy Wonder, who is nine.
Here’s a longer example, which the Boy and I wrote during his second lesson. It creates a cycling display of LCD segments, reading its input from memory:
I’ve written the emulator in Delphi. It’s rather primitive. The current opcodes are as follows:
[table id=1 /]