Algorithm to rotate data

AWOL:
I'm still confused why one loop starts at one, and the other starts at zero.
Surely the first block of data starts at (0 + 0) , not (1 + 0) ?

In BASIC, the index of the first random record (i.e. byte) is 1, not 0. I know it looks strange, but that's how it works.

BTW, the BASIC I'm using is BAS 2.3 by Michael Haardt, compiled and running in 64 bit Linux. It's syntax identical to GWBASIC.

When I need to whip up a quick and dirty program, I usually use BASIC because it's interactive - I can write, run, debug, edit and re-run without doing the "editor / compiler / debugger / editor / complier ...." dance.