3 ms·
I'm not convinced that 8-bit computers are the ideal starting point for education. My reasoning is that Dijkstra had a point when he wrote: "It is practically
by mrob 3y ago
I'm not convinced that 8-bit computers are the ideal starting point for education. My reasoning is that Dijkstra had a point when he wrote:
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
This is of course exaggeration, and many great programmers did in fact start with BASIC, but more importantly, Dijkstra wrote this in 1975, when BASIC really did have some glaring flaws. '10 PRINT "HELLO WORLD"\n 20 GOTO 10' has appealing immediacy, but it sets students down the path to spaghetti code. A modern structured BASIC, or perhaps MicroPython, is a much better starting point.
And that's problematic on an 8-bit machine. IMO, an educational computer should have a flat address space without paging. Paging isn't relevant to modern computers; it complicates things without teaching anything valuable. The natural address bus for an 8-bit machine is 16 bits wide, and that limits you to only 64KiB address space without paging. For simplicity, the frame buffer should live in this address space too, so you don't have much left for a modern programming language (ideally stored in ROM in the same address space), especially if you want things like user-friendly error reporting and built-in documentation, which you probably do (think of QBASIC).
Therefore, I think a 16-bit computer is better. I'd prefer something like a 16-bit version of Ben Eater's breadboard CPU[0], using SMD components on a PCB to allow for speeds fast enough for interactive graphics. All chips should also be available in DIP for easy breadboard experimentation too. It should support fully static operation, with a pause switch and a single-step clock button, indicator LEDs for all the registers, and test points everywhere you might want to inspect with an oscilloscope. It should have a simple GPU that just converts a 320x240 1-bit monochrome frame buffer to VGA, with memory access interleaved with the CPU. The CPU can poll for vblank. Support for PS/2 or similar serial keyboard input, with a FIFO buffer so you don't lose keystrokes. A very primitive distinction between user space and kernel space, where some RAM is read only unless the program counter is in ROM. Although I generally like the PEEK/POKE anywhere freedom of the old 8-bit machines, I want this feature so it can support a memory monitor and disassembler in ROM, which is jumped to by triggering the single non-maskable interrupt. The monitor can copy all the registers and framebuffer to the kernel RAM on entry and and restore them on exit, so it's always possible to inspect things or debug any problems you might run into and continue afterwards. Data storage could be via a simple audio interface, like the cassette tape data storage on old home microcomputers. Advances in both software and audio recording hardware should make this substantially faster and more reliable than it was back them.
This computer would have maximum observeability and ease of understanding, while still being advanced enough to be user friendly and interesting. It should even be powerful enough for games, which will provide some extra motivation.
[0] https://www.youtube.com/playlist?list=PLowKtXNTBypGqImE405J2565dvjafglHU https://www.youtube.com/playlist?list=PLowKtXNTBypGqImE405J2...
- crq-yml 3y agoYou might be interested in the Cerberus design: https://www.thebyteattic.com/p/cerberus-2100.html?m=1 https://www.thebyteattic.com/p/cerberus-2100.html?m=1 It doesn't match your concept precisely but it has concretely implemented a good combination of observability and capability - graphics, sound, keyboard support. The BASICs can be safely ignored in favor of Forth, which goes directly to the point of tangibly understanding the machine - Forth programs are already structured code, interactive, with extensible syntax, but they also let you crash the computer in moments with a bad memory write. The pedagogical value is immense within an 8-bit environment.