Hat tip to L. Curtis Boyle for pointing this one out to me. Published in The World of ’68 Micros back in 1995 was an article by John “SockMaster’ Kowalski demonstrating how to do smooth horizontal scrolling on the CoCo 3 in the 320×200 16-color graphics mode.
In BASIC.
With no assembly.
You can find this demo in Volume 2, Number 5 in an article called “The Seven-line demo: an amazing achievement with DECB!” I must have been fully into OS-9 by this point since this article does not seem familiar to me. I was not really keeping up with any BASIC stuff by that point, having moved to OS-9 assembly and C programming.

Here is that program as I typed it in and adjusted some spacing, with a few comments added by me. The only crucial part is line 70 which must have 11 colons and five spaces after that POKE Q,G line.
0 'The World of '68 Micros
1 'Volume 2, Issue 5
2 REM ** 2WAYSCRL.BAS
4 REM **bySockMaster
10 POKE 65497,0:HSCREEN 2:FOR G=0 TO 15:READ A:PALETTE G,A:NEXT
20 DATA 0,19,22,50,54,52,38,37,44,45,41,13,11,25,27,26
30 FOR G=0 TO 319 STEP .5:HSET(G,RND(191),RND(15)):NEXT
40 C=1:S=40:FOR G=15 TO 1 STEP-1:HCOLOR G
50 HCIRCLE(310-G*5,48),S:HPAINT(310-G*5,48):S=S-2.6:HLINE(RND(110)+210,RND(80)+104)-(RND(110)+210,RND(80)+104),PSET,BF:NEXT
60 Q=65439:W=0:E=127
65 '11 COLONS, 5 SPACES
70 FOR G=0 TO 127:PALETTE W,W:POKE Q,G::::::::::: POKE Q,E-G:NEXT:GOTO 70
I am unsure if the other spaces in line 70 are critical. The original listing looked like it had a lot of spaces between keywords and such, but that should not matter. LINE 70, being a loop, would be made a bit slower with extra spaces. Here is how it was presented in the magazine:
Here is what it does when ran in the XRoar emulator:
Spiffy!
Now I am off to read the full article to better understand how this works.

That’s a rather clever scheme using the horizontal scroll register (FF9F) but NOT using the “HVEN” flag to set 256 byte rows.
Incidentally, the PALETTE command in the loop is there to synchronize with the VSYNC. PALETTE does a “SYNC” instruction before setting the palette register.