3 ms·
No one I knew could program. Very few people I knew even knew what a computer was. When I was 16, based on things I'd read, I designed a circuit to play tic-t
by ColinWright 13y ago
No one I knew could program. Very few people I knew even knew what a computer was. When I was 16, based on things I'd read, I designed a circuit to play tic-tac-toe, and later I designed a circuit to add numbers. I never got round to adding a clock and designing a real processor, because at about that time I came across the TRS-80. So I bought one and taught myself to program from the (actually rather good) manual.
I taught myself Z80 code from a book (someone Rodney, or something), then wrote a compiler from a limited subset of BASIC to Z80 machine code. No assembler, no linker, no loader, just a straight conversion from BASIC source to Z80 machine code residing in memory.
Added in edit: Radnay Zaks, "Programming the Z80", first published 1979.
The subset of BASIC was enough to actually write the compiler, and I remember adding the DATA and READ statements to the compiler, then using them, and the net result was smaller. The DATA and READ statements allowed data-driven techniques, so code generation became simpler. It was an interesting insight - a more powerful program was sometimes actually smaller, implemented in less code.
And all this was mentor-less, as I knew no one who could program. It was 1979, and I was 17 (although I turned 18 a few months later).