4 ms·
I had a lot of the Usborne books. I knew of the existence of the machine code one from the backs of the ones I had, but no bookshop ever had a copy. I finally b
by parenthesis 5y ago
I had a lot of the Usborne books. I knew of the existence of the machine code one from the backs of the ones I had, but no bookshop ever had a copy. I finally bought a copy in a second hand shop a few years ago (I haven't actually read it though!)
I had a Spectrum in the late 80s. I learned the basics of Z80 programming from An Introduction to Z80 Machine Code by R.A. and J.W. Penfold - published by Bernard Babani, well known for their electronics books. A family friend (more into electronics than programming) who had given me the Spectrum, also gave me some Babani BASIC books. I guess that's how I knew about the existence of the Z80 book, and got a copy of that.
I wrote a simple text editor for the Spectrum in BASIC, but all the checks as to whether you had pressed a key (combination) with a special meaning (arrow keys etc.) meant that it couldn't keep up with even fairly slow typing. (The code in question was a big sequence of lines of the form IF <this key was pressed> THEN <GOTO or GOSUB (can't remember which) to somewhere>. I'm wondering now whether you could make a faster dispatch mechanism in Spectrum BASIC instead of this naive solution.)
So I wrote an assembly routine just to deal with this bit. I didn't have an assembler. But, the wonderful Spectrum manual contained this table:
https://worldofspectrum.org/ZXBasicManual/zxmanappa.html https://worldofspectrum.org/ZXBasicManual/zxmanappa.html
which I used to hand assemble my program. (I don't think I'll ever forget that ret is 201). When I gave away all my Spectrum stuff a few years ago, I kept the manuals.
- mellavora 5y agoOh, man! I remember sitting by the fireplace one evening, as giant picture-perfect snowflakes floated down outside. My wife was sitting in an armchair nursing our newborn child, and I was hand-transcribing assembler into hexcode for one of my class assignments, using a printed lookup table. By candlelight. It felt like a scene out of some retro-future sci-fi movie.
- Donckele 5y agoThat vision brings a smile.
- musicale 5y agoThis is a nice chart (though arranged for disassembly/decoding rather than assembly) and shows how accessible 8-bit architectures really are. You could probably memorize the opcodes and program directly in machine code! It's also interesting how the core (presumably 8080) instructions are one byte.