Sorting algorithms/Cocktail sort: Difference between revisions
→{{header|360 Assembly}}: a correction
m (added a related task.) |
PatGarrett (talk | contribs) (→{{header|360 Assembly}}: a correction) |
||
Line 46:
L R2,N n
BCTR R2,0 n-1
DO UNTIL=(CLI,STABLE,EQ,X'01') repeat
MVI STABLE,X'01' stable=true
Line 61:
ST R5,0(R2) a(i)=r5
ST R4,0(R3) a(i+1)=r4
LA RI,1(RI) i=i+1
ENDDO , end do
Line 76:
ST R5,0(R2) a(i)=r5
ST R4,0(R3) a(i+1)=r4
BCTR RI,0 i=i-1
ENDDO , end do
|