Skip to content

Instantly share code, notes, and snippets.

@jgrahamc
Created June 19, 2017 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgrahamc/c996de594b4faad8d0321c56ef674004 to your computer and use it in GitHub Desktop.
Save jgrahamc/c996de594b4faad8d0321c56ef674004 to your computer and use it in GitHub Desktop.
Snippet of code from the 1980 film "The Return"
10 DIM P(10): T$="TTT": I$="I": SC=0:SP$=" "
20 P(0)=10:P(1)=150:P(2)=100:P(3)=200:P(4)=50:P(5)=180:P(6)=120:P(7)=220:P(8)=60:P(9)=90
30 HGR2
40 FOR Y = 0 TO 9: GOSUB 900: NEXT: END
900 GOSUB 920 : FOR X = 140 TO P(Y) STEP 6 * SGN(P(Y)-140): HCOLOR = 0: HPLOT X1, 170 TO X1, 155: HCOLOR = 7: HPLOT X, 170 TO X, 155: HPLOT 140, 170 TO 140, 155: HPLOT 140, 163 TO X, 163: X1 = X: NEXT : GOSUB 920
910 FOR X = P(Y) TO 140 STEP 6 * SGN(140-P(Y)): HCOLOR = 0: HPLOT X1, 170 TO X1, 155: HPLOT X, 163 TO X1, 163: HCOLOR = 7 : HPLOT X, 170 TO X, 155 : X1 = X: NEXT: GOSUB 920: RETURN
920 SC = SC + 1: IF SC > 4 THEN SC = 0
930 PRINT T$; SC; I$; : PRINT LEFT$(SP$, RND(1) * 10 + 1);: PRINT I$;: RETURN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment