Sorting algorithms/Cycle sort: Difference between revisions
Content added Content deleted
PatGarrett (talk | contribs) (→{{header|360 Assembly}}: Section added) |
PatGarrett (talk | contribs) m (→{{header|360 Assembly}}: Superfluous blanks suppressed) |
||
Line 20: | Line 20: | ||
{{trans|NetRexx}} |
{{trans|NetRexx}} |
||
The program uses ASM structured macros and two ASSIST macros to keep the code as short as possible. |
The program uses ASM structured macros and two ASSIST macros to keep the code as short as possible. |
||
<lang 360asm> |
<lang 360asm>* Cycle sort 26/06/2016 |
||
* Cycle sort 26/06/2016 |
|||
CYCLESRT CSECT |
CYCLESRT CSECT |
||
USING CYCLESRT,R13 base register |
USING CYCLESRT,R13 base register |
||
Line 131: | Line 130: | ||
RT EQU 9 temp |
RT EQU 9 temp |
||
RM EQU 10 item |
RM EQU 10 item |
||
END CYCLESRT |
END CYCLESRT</lang> |
||
</lang> |
|||
{{out}} |
{{out}} |
||
<pre> |
<pre> |
||
-31 0 1 2 2 4 45 58 65 69 74 82 82 83 88 89 99 104 112 782 |
-31 0 1 2 2 4 45 58 65 69 74 82 82 83 88 89 99 104 112 782 |
||
</pre> |
</pre> |
||
=={{header|C}}== |
=={{header|C}}== |