My first Z80 assembly language program
nanochess.org
nanochess.org
ld a,2a # Load ASCII '*' in to acc
ld hl,d80 # Set HL to point to video-mapped RAM
ld (hl),a # Put character on screen.
Some years later I wrote one of the first multi-user games, picked up by British Telecom to run on their Prestel/Micronet network. By that time I've graduated to 4MHz Z80s, with home-made 2MB RAM disks and 256Kb of main RAM accessed with a crude TTL MMU; we got up to 64 users per Z80, albeit accessing the system via 1200/75 baud modems.[0] It graced the cover of Issue #1 of Personal Computer World; I still have a copy.
My teen years were in the 80s and I was mad about the Z80 in my cheap Laser 200 but was too isolated to have access to much information and equipment.
Yet, I reversed engineered the schematic of my little, made my own memory expansion (I couldn't afford the official one) out of stacked SRAM chips, mapped the ROM, build my own crude tools to see what was going on in the hardware, coded assembler by hand and poked the memory to store the programs, one byte at a time...
It taught me about electronics, fundamentals of gate logic and how microprocessors worked, programming (and no I wasn't ruined by BASIC), and those constant discoveries drove me to want to know more.
It was such a formative and fun experience for a curious teen to explore something in depth -with no help other than a few magazine and books- and uncovering the layers of what made a computer tick, however minimal that computer was.
Wasn't sure I was reading this correctly, so I navigated to the About Me page:
> Born in 1978, I started programming at age 5 in BASIC, learnt assembly language by age 9
Unfortunately I didn't have the guidance and direction Oscar Toledo G. had—my father did what he could, but he's just not an educator, and he's also not the same level of wizard as his father Oscar Toledo E.—so I didn't learn assembly until I was about 13, and then I learned from a book. (Also, I suspect Oscar Toledo G. has more innate aptitude than I do, but I think that in this case my lack of practice and feedback is what was holding me back.) I didn't write my first playable game until I was 29, which was http://canonical.org/~kragen/sw/inexorable-misc/tetris. (I wrote some games earlier, but they were just unplayably bad.)
They designed their own hardware, operating systems and utilities back in the 70s, and they seem to really like optimizing software so they must run quite fast.
But they say they have been "silenced" by big corporations, and that the mexican government doesn't like them and that's why they haven't been able to sell their computers.
I wish that they would release most of their hardware/software with a free license. I imagine their stuff can be used for educational purposes.
https://webmsx.org/ is an online MSX emulator. Just click the "load files" link and give it the ROM file. Space bar and arrow keys for controls.
Edit: wow, see this comment of elvis70
> The author has made his book freely available : http://www.z80.info/zaks.html
I never really did any Z80 coding on the ZX81 itself, but that section of the manual came in really useful when I got an Amstrad CPC, which is what I learned Z80 on. To that I added The Ins & Outs of the Amstrad (https://cpcrulez.fr/book_english-the_ins_and_outs_of_the_ams...), which documented the firmware and other CPC-specific stuff.
I did the same thing as the author, wrote BASIC until I needed a faster inner loop (doing some simulation like cellwar or something) and picked up asm to make it (just the inner loop) faster.
After that I purchased a copy of Programming the 6502 by Rodnay Zaks. Books took 3 months to arrive if they were a special order like that, sometimes longer. To this day it's still one of my favourite books.
There were also books. One of my favourites was an annotated disassembly of the CPC's two major ROMs. 16KB basic operating system, and 16KB BASIC interpreter.
Libraries and book stores had a few books, especially if you lived in a university area.
Data sheets for the processor and co-processors and digital logic components were usually available in electronic stores (they also had some books).
But it's hard to imagine this world now that we have the Internet. I miss the focus needed to hunt down information and understand how thing worked. A lot of it was trial and error, trying to validate your understanding with experimentation.
I understood assembly basics, but didn't do much productive with it. I could move some boxes around the screen via keys, and I did do a bit with the '80 col' monochrome mode trying to do some custom sprite stuff (learned a lot about XOR) - but that's about as far as I got by my mid teens.
Reading stories like the OP make me feel inadequate...
"Z80 Assembly Language Subroutines"