home *** CD-ROM | disk | FTP | other *** search
- ; Output a calibration tone using table lookup and interpolation.
- ;
- ; written by Quinn Jensen (jensenq@npd.novell.com)
- ; ref: _Digital Sine-Wave Synthesis Using the DSP56001_,
- ; Motorola app note APR1/D rev 1
- ;
-
- include 'tdsg.basic.a56'
-
- ;***************************************************************
- ;
- ; sample rate computations
- ;
- ;***************************************************************
-
- dot
- org x:$20
-
- include 'caltone.inc'
-
- dphase dc dphase_h
- org y:$20
- dc dphase_l
- org x:$21
- phase dc 0
- sinetab equ $100
-
- org p:dot
- ;
- ; non-interrupt code
- ;
-
- hf_init
- ori #4,omr
- rts
-
- eff1_on
- eff1_off
- eff2_on
- eff2_off
- eff3_on
- eff3_off
- eff4_on
- eff4_off
- rts
-
- ;
- ; fs = 32.552083 kHz
- ;
-
- hf_comp
- jsr <saveregs
-
- #if 0
- move x:<in_l,a
- move a,x:<out_l
- move x:<in_r,a
- move a,x:<out_r
- #endif
-
- move l:<phase,a
- move l:<dphase,y
- move y0,b
- lsr b
- move b1,x1 ;x1 = frac
- add y,a
- move #>$0000FF,y1
- and y1,a
- move a,l:<phase
- move a1,n0
- move #sinetab,r0
- movec #$FF,m0
- nop
-
- move y:(r0+n0),y0
- move y0,a
- #if 0
- macr -x1,y0,a
- move (r0)+
- move y:(r0+n0),y0
- macr y0,x1,a
- #endif
-
- move a,y0
- move #ampl,y1
- mpyr y0,y1,a
-
- move a,x:<out_l
- move a,x:<out_r
-
- bypass
- jsr <restregs
- rts
-
- end
-