Loops/While: Difference between revisions

m
→‎{{header|360 Assembly}}: Superfluous blanks suppressed
m (→‎{{header|360 Assembly}}: Superfluous blanks suppressed)
Line 15:
;Basic
Using binary arithmetic. Convert results to EBCDIC printable output.
<lang 360asm>* While 27/06/2016
* While 27/06/2016
WHILELOO CSECT program's control section
USING WHILELOO,12 set base register
Line 34 ⟶ 33:
WTOLEN DC AL2(8),H'0' length of wto buffer (4+1)
WTOTXT DC CL4' ' wto text
END WHILELOO</lang>
</lang>
{{out}} (+ sign indicates "problem state" (non system key) issued WTO's
<pre style="height:8ex16ex">
+1024
+0512
Line 52 ⟶ 50:
;Structured Macros
Although specified at the beginning (DO UNTIL), the test is done at the end of the loop (ENDDO).
<lang 360asm>* While 27/06/2016
* While 27/06/2016
WHILELOO CSECT
USING WHILELOO,12 set base register
Line 70 ⟶ 67:
WTOLEN DC AL2(8),H'0' length of wto buffer (4+1)
WTOTXT DC CL4' ' wto text
END WHILELOO</lang>
</lang>
{{out}}
Same as above
1,392

edits