Skip to content

Instantly share code, notes, and snippets.

@Dan-Q
Last active October 15, 2025 09:12
Show Gist options
  • Select an option

  • Save Dan-Q/a934d42a4866c62648e740592b2819ea to your computer and use it in GitHub Desktop.

Select an option

Save Dan-Q/a934d42a4866c62648e740592b2819ea to your computer and use it in GitHub Desktop.
QBasic program demonstrating a scroll effect in a loop. Details/explanation: πŸ”— https://danq.me/2025/10/15/the-scroll-art-museum/
CLS
I% = 0 ' Screen position
J% = 1 ' Direction of flow ( -1 <= => +1 )
Action:
FOR A% = 0 TO I%
PRINT " "; ' Print lots of spaces to position
NEXT A%
I% = I% + J%
IF I% = 70 OR I% = 0 THEN
J% = J% * -1 ' Switch direction if necessary
END IF
COL% = I% MOD 7 ' Pick a color
COLOR COL% + 1
PRINT "DANQ.ME" ' Print the message
SLEEP 1
GOTO Action ' Loop back around
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment