What we didn't get much of insight into is how it works. There are far too many jumps and branches and bitwise operations for me to follow it. I did try, by writing out the progress of the code on paper, and what I thought the A, X and Y registers were holding at each step, but it didn't really help me. I had to try something else.