Loop structures: Difference between revisions
Content added Content deleted
(Loop Structures in FeeBASIC) |
No edit summary |
||
Line 27:
The below code snippet represents a loop that continues until a value greater than 3500 is read. However, it will also end after the 2000th iteration automatically, regardless of whether the condition is ever met.
<syntaxhighlight lang="68000devpac">
LOOP:
MOVE.W (A0)+,D0
CMP.W #3501,D0 ;COMPARE TO #3501
DBCC D1,LOOP ;DECREMENT, BRANCH UNTIL CARRY CLEAR OR D1 = #$FFFF
</syntaxhighlight>
=={{header|AmbientTalk}}==
|