This was my first attempt at a Tube transfer, and some things here are definitely wrong. One is that I used the Cassette Filing System reason code, which probably doesn't matter but a different one should be used.
Second is that the data fetching loop must not be contaminated with any other activity, so printing the data bytes received on the screen is the wrong thing to do. Finally, there are specified timings to be observed during the transfers which I didn't incorporate here.