Useless instructions: Difference between revisions

Content added Content deleted
No edit summary
m (→‎{{header|Z80 Assembly}}: code brackets crossed a line boundary and I didn't like the way it looked.)
Line 26: Line 26:


=={{header|Z80 Assembly}}==
=={{header|Z80 Assembly}}==
<code>xor a</code> is shorter than <code>ld a,0</code>. The latter doesn't clear the zero or carry flags, which is often useful. But if the flags aren't needed for an upcoming branch, call, or return, <code>xor a</code> is better.
<code>xor a</code> is shorter than <code>ld a,0</code>. The latter doesn't clear the zero or carry flags, which is often useful. But if the flags aren't needed for an upcoming branch, call, or return, it's preferred to use <code>xor a</code>