home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / assembler / thesource / volume1 / source / scrollers / timesrc.lha / sine.bas (.txt) < prev    next >
Encoding:
AmigaBASIC Source Code  |  1992-12-24  |  283 b   |  13 lines

  1. ' This generates the sine wave table for
  2. ' my scroller.
  3. OPEN "ram:sine1" FOR OUTPUT AS #9
  4. FOR x = (2*5.30795e-315) TO 0 STEP -0.025
  5.   s = INT(-30*(SIN(x)+COS(2*x)))+50
  6.   s = s * 40    ' width of bitplane
  7.   PRINT #9," dc.w ";s
  8. NEXT x
  9. CLOSE #9
  10. BEEP
  11. END
  12.   
  13.