Conditional structures: Difference between revisions

m
→‎{{header|68000 Assembly}}: clarification and correction
m (→‎{{header|68000 Assembly}}: clarification and correction)
Line 228:
CMP.W #0,D0 ;doesn't equals zero, so zero flag is clear.</lang>
 
Other than its variable size parameter, <code>CMP</code> works justvery like it does insimilar [[6502 Assembly]]. It returns both a test for equality and ana unsignedsize comparison (i.e. which number is greater than the other.) This chart from [http://www.easy68k.com/paulrsm/doc/trick68k.htm 68000 Tricks and Traps] sums it up nicely. If you use <code>CMP D0,D1</code> at any data size, this is what you get:
<pre>
Relationship Signed Unsigned
1,489

edits