Loops/While: Difference between revisions

Content added Content deleted
(→‎0815: Add implementation)
Line 1: Line 1:
{{task|Iteration}}Start an integer value at 1024. Loop while it is greater than 0. Print the value (with a newline) and divide it by two each time through the loop.
{{task|Iteration}}Start an integer value at 1024. Loop while it is greater than 0. Print the value (with a newline) and divide it by two each time through the loop.

=={{header|0815}}==
<lang 0815><:400:~}:_:%<:a:~$=<:2:=/^:_:</lang>


=={{header|6502 Assembly}}==
=={{header|6502 Assembly}}==
Line 20: Line 23:
EndLoop: PLA ;restore accumulator from stack
EndLoop: PLA ;restore accumulator from stack
RTS ;return from subroutine</lang>
RTS ;return from subroutine</lang>

=={{header|ActionScript}}==
=={{header|ActionScript}}==
<lang actionscript>var i:int = 1024;
<lang actionscript>var i:int = 1024;