OPEN "o",#1,"sine2.dat"
screen=XBIOS(3)
a$=""
count=200
a=0
b=0
x=160
y=0
WHILE a$=""
  PLOT x+160,y
  y=y+1
  IF y=200
    y=0
  ENDIF
  x=(SIN(a)*40)+(SIN(b)*60)/2
  POKE screen,x
  BPUT #1,screen,1
  a=a+0.05
  b=b+0.01
  a$=INKEY$
WEND
x=INT(x)
WHILE x<>0
  IF x<0
    x=x+1
  ENDIF
  IF x>0
    x=x-1
  ENDIF
  POKE screen,x
  PLOT x+160,y
  BPUT #1,screen,1
WEND
CLOSE #1
