UTZ,

Before sharing the document here, I have shared in on FB in https://www.facebook.com/groups/z80asm/, where I got suggestions to actually contact you via this forum.

In the meantime, I have received following feedback, that might be interesting for you:

* Chris Walsh
Hiya, just looking at the very first routine, and something isn't right about the A ("state") register and the OUT commands. For example, you're setting A to 0 (XOR A) on the first line before the channel 1 loop but then setting it to 10h after the look and just after the OUT. The same issue occurs in the channel 2 routine. Are you missing two more OUTs after setting the A register? Thanks for the docs BTW.

* from Simon N Goodwin:
Thanks for sharing.
In the context of the Spectrum (the focus of this group) it would be wise to remind readers that RAM as well as I/O is contended so loops like this should be in ROM (the only option for a 16K Spectrum) or the top 32K of 48K Spectrum RAM, or the right 64K half (which varies by model) of RAM on a Spectrum 128. If you haven’t altered the default paging, RAM addresses from 32768 to 49151 are always uncontended.
As regards source readability, the comments need rewrapping - they run off the edge of the PDF pages.

Here you are! I have attached .tgz file with all .tex sources - for building I'm using pdflatex command from TeX Live system (executed twice to build ToC etc.). The file main.tex includes structure.tex and tutorial.tex (that is actually exported from Emacs .org file).

I have also included the .org file that I have originally used to copy paste from the forum and then used Emacs export to LaTeX functionality (only body export using following mouthful chord:  C c C e C b l l). I think at this point you can update only .tex files, and discard tutoria.org file.

Hi, I have converted this fantastic tutorial by UTZ to PDF format. Have fun!