home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-2.iso / Developer / hardware / dsp / drbub / sinewaves / sine_int.asm
Encoding:
Assembly Source File  |  1991-09-07  |  424 b   |  24 lines

  1.  ; Sine wave generation using two integrators
  2.  ; instead of sine look-up
  3.  ; By Charlie Thompson 6-13-87
  4.  ; Inital values in a,b will determine amplitude
  5.  ; X0 controls frequency of oscillation
  6.       
  7.         org     p:$40
  8.         move #>$010000,x0 ;frequency in X0
  9.  
  10.  
  11.  
  12.  
  13. ;actual generation loop
  14.  
  15. loop        mac     x0,y0,a
  16.         move     a,y0
  17.         mac    -x0,y0,b
  18.         move     b,y0
  19.  
  20. ; ouput to D/A... mapped at y:$A000
  21.  
  22.         move b,y:$a000
  23.         jmp     loop
  24.