You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>eZ80</strong> <strong>CPU</strong><br />
User Manual<br />
94<br />
OTD2R<br />
Output and Decrement HL - Repeat<br />
Operation<br />
Description<br />
repeat:<br />
{ (BC) ← (HL)<br />
B ← B – 1<br />
C ← C – 1<br />
HL ← HL – 1<br />
} while B ≠ 0<br />
The contents of the memory location specified by the HL are loaded into the<br />
<strong>CPU</strong>. This byte is then output to the I/O address specified by the BC register.<br />
The B, C, and HL registers are decremented. The instruction repeats until the B<br />
register equals zero.<br />
ADL mode affects operations with the HL register. ADL mode may be<br />
overridden with the .S or .L suffix.<br />
Condition Bits Affected<br />
S<br />
Z<br />
H<br />
P/V<br />
N<br />
C<br />
Not affected.<br />
Set.<br />
Not affected.<br />
Not affected.<br />
Set.<br />
Not affected.<br />
Mnemonic Operands ADL Mode Cycles Op Codes<br />
OTD2R — X 5/3 ED, BC<br />
OTD2R.S — 1 6/3 52, ED, BC<br />
OTD2R.L — 0 6/3 49, ED, BC<br />
UM007701-1100