Data inside code
Long time no post… oops… ho hum… I recently came across some old Z80 code (I have access to extremely little of any of my old Z80 code) and found this little trick… This is one way to annoy automatic disassemblers by the way… 00490…
Long time no post… oops… ho hum… I recently came across some old Z80 code (I have access to extremely little of any of my old Z80 code) and found this little trick… This is one way to annoy automatic disassemblers by the way… 00490…
So those pesky Intel chips put the least significant byte first, and your super efficient 680×0 code needs to translate? Easy! Rotate, swap, rotate. This takes advantage that the 680×0 32-bit registers can be operated on as if they are 16-bit, at least with certain…
Quick little thing related to the previous post. Unless otherwise disabled, the ZX Spectrum hardware issues an interrupt at the start of the processing of each TV frame (actually the “retrace” if I recall). This means to get “in sync” with the screen simply issue…
Z80 has a nice (for programmers) instruction to copy a block of memory (and similar types of operations), and it’s easy to remember how to use the magic that is LDIR, which stands for load, increment, repeat. Think of BC standing for byte count, DE…
The ZX Spectrum had a small speaker, but the only way to “drive” it was a single bit on one of the Z80 I/O ports. By sending zeroes and ones at an appropriate rate you could get a musical note. Pretty basic square wave stuff….
The Sinclair “ZX” family of machines used a Z80 processor. Technically speaking a Z80A which the Sinclair manuals liked saying “goes faster”. The Z80 is actually a rather powerful CPU by 8-bit standards, having six general purpose 8-bit registers (B, C, D, E, H and…
The first ever computer I owned was a Sinclair ZX81, and it was a present along with a 16K memory expansion unit, the computer by itself having only 1K of memory! The ROM of the ZX81 was only 8K in size, yet included a full…