This program plots a sinewave on the screen.
The code uses a loop to count 128 steps, and the SIN() function to return the Y value at each step.
10 A=0.1 20 CLS 30 FOR X=0 TO 127 40 Y=(SIN(A) * 20) + 20 50 A=A+0.1 60 DRAW X,INT(Y) 70 NEXT 80 REFRESH
Screenshot:-