home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / dsp / dspgroup / m56000_2.arc / SINE.ASM < prev    next >
Encoding:
Assembly Source File  |  1987-09-09  |  1.4 KB  |  54 lines

  1.  
  2. From princeton!ut-sally!oakhill!charlie Tue Jun 16 11:30:47 1987
  3. Received: from ut-sally.UUCP by seismo.CSS.GOV (5.54/1.14) with UUCP 
  4.     id AA27183; Tue, 16 Jun 87 05:07:09 EDT
  5. Posted-Date: Mon, 15 Jun 87 21:47:16 cdt
  6. Received: by sally.utexas.edu (5.54/5.51)
  7.     id AA22801; Tue, 16 Jun 87 03:49:47 CDT
  8. Received: by oakhill.uucp (4.12/SMI-3.2)
  9.     id AA13523; Mon, 15 Jun 87 21:47:16 cdt
  10. Date: Mon, 15 Jun 87 21:47:16 cdt
  11. From: princeton!ut-sally!oakhill!charlie (Charlie Thompson)
  12. Message-Id: <8706160247.AA13523@oakhill.uucp>
  13. To: princeton!idacrd!mac
  14. Subject: 56000 Code
  15. Status: R
  16.  
  17. Hi Bob,
  18.  
  19. Here is a cute little sinewave generation routine that doesn't usee
  20. any sine tables.  It can be written on the tms32010 etc since it
  21. is very easy to understand.  Try it on your simulator after assembling
  22. it. Good luck and happy DSP'ing.
  23.  
  24. Charlie
  25.  
  26. ---------------------cut here--------------------------------------
  27.  ; Sine wave generation using two integrators
  28.  ; instead of sine look-up
  29.  ; By Charlie Thompson 6-13-87
  30.  ; Inital values in a,b will determine amplitude
  31.  ; X0 controls frequency of oscillation
  32.       
  33.         org     p:$40
  34.         move #>$010000,x0 ;frequency in X0
  35.  
  36.  
  37.  
  38.  
  39. ;actual generation loop
  40.  
  41. loop        mac     x0,y0,a
  42.         move     a,y0
  43.         mac    -x0,y0,b
  44.         move     b,y0
  45.  
  46. ; ouput to D/A... mapped at y:$A000
  47.  
  48.         move b,y:$a000
  49.         jmp     loop
  50.  
  51.  
  52. -------------------------end of sineosc.asm--------------------------
  53.  
  54. idavax>