I found this fascinating article that everyone should take a look at. It's about undocumented instructions, undocumented flags and has a very detailed explanation of the r register. http://stekt.oulu.fi/~jopi/cbm/z80_faq.html