Addition to my article "The effect of the OUTD command on the carry flag"
ZXNet echo conference «code.zx»
From Ivan Roshin → To All 20 April 2003
Hello, All!
═══════════════════ add.t
Addition to my article "The effect of the OUTD command on the carry flag"
──────────────────────────────── ────────────────────────────────
Unfortunately, the installation algorithm outlined in this article
The transfer flag turned out to be not entirely accurate. I found out about this
having read [1] - the most complete, in my opinion, review
undocumented features of the Z80. It says that the flag
transfer when executing a command, OUTD is formed based on the result
adding the number issued to the port and the value of the L register (after
decrease HL). Those. if the result of addition is greater
255, the carry flag is set, otherwise it is reset.
Having checked this information on a real Z80, I was convinced of its
correctness.
Sources
─────────
1.Sean Young. "The Undocumented Z80 Documented".
This document is available at www.z80.info (full address
document - http://www.z80.info/zip/z80-documented.pdf), and
also on its author's website - www.msxnet.org (in the "MSX" section
Technical" contains pdf and LATEX versions of the document).
════════════════════════ ════════════════════════
Best regards, Ivan Roshchin.