Scrolling text with PIC16F688 on a 16x2 LCD
The simplest way to get a scrolling effect is to treat your input text as a circular buffer. Maintain a read pointer, which is incremented each time you render. To render, read a window of text extending from the read pointer.

If you want snake-like scrolling for your 16x2 display, extend the example below to feature either a 32 character window or two 16 character windows (The 16x2 display I have actually has several bytes of offscreen storage, meaning that a simple 32 byte window may not work for you).

#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

// Get text[offset] if text were an infinitely long repeating loop
char getLoopChar(const char *text, int offset)
{
    return text[offset % strlen(text)];
}

int main(int argc, char *argv[])
{
    const char *text = "This is a scrolling message...";
    int window_start = 0;

    while(1)
    {
        int i;
        for (i=0;i&lt;16;i++)  // loop over characters in the window
            putchar(getLoopChar(text, window_start+i));
        putchar('\n');
        window_start++;
    }

    return 0;
}