⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exp3.html

📁 (Ebook-Pdf) Dsp - Real Time Digital Signal Processing (Usando Tms320-55Xx). 有书
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p align=center style='margin-right:72.0pt;margin-left:72.0pt;text-align:center'>(a)Without saturation protection - overflow causes the data errors</p><p align=center style='margin-right:72.0pt;margin-left:72.0pt;text-align:center'><imgborder=0 width=533 height=444 id="_x0000_i1031" src="exp3/fe3-2b.jpg"></p><p align=center style='margin-right:72.0pt;margin-left:72.0pt;text-align:center'>(b)with saturation protection - the data saturated when overflow occurs</p><p align=center style='margin-right:72.0pt;margin-left:72.0pt;text-align:center'>FigureE3-2 Examples of overflow and saturation.</p><p align=center style='margin-right:72.0pt;margin-left:72.0pt;text-align:center'>&nbsp;</p><p><a href="#top"><span style='font-size:7.5pt'>Back to Top</span></a> <input type=button value="go back" onclick="history.go(-1)"></p><div class=MsoNormal align=center style='text-align:center'><hr size=3 width="100%" align=center></div><p align=center style='text-align:center'><strong><span style='font-size:13.5pt;color:blue'>Experiment 3D - Quantization of Coefficients</span></strong></p><p style='margin-right:72.0pt;margin-left:72.0pt'>Filters are widely used forDSP applications. Due to quantization, the filter in fixed-point representationwill no longer the same as the floating-point filter obtained from most filterdesign packages. In this experiment, we use assembly routine <ahref="exp3/exp3d_iir.asm"><span style='font-family:"Courier New"'>exp3d_iir.asm</span></a>to show the quantization effects to filter coefficients. More filter experimentswill be presented later in Chapter 5 and Chapter 6. The function <ahref="exp3/exp3d.c"><span style='font-family:"Courier New"'>exp3d.c</span></a>for this experiment and the assembly routine <a href="exp3/exp3d_iir.asm"><spanstyle='font-family:"Courier New"'>exp3d_iir.asm</span></a> are listed in TableE3-5 and Table E3-6, respectively.</p><p style='margin-right:72.0pt;margin-left:72.0pt'>&nbsp;</p><p align=center style='text-align:center'>Table E3-5 List of C function forExperiment 3D.</p><p align=center style='text-align:center'><TEXTAREA ROWS="7" COLS="70" NAME="exp3d.c">/* -------------------------------------------&#13;&#10;&#13;&#10;    exp3d.c&#13;&#10;&#9;&#13;&#10;    Quantization effect to an IIR filter&#13;&#10;&#13;&#10;---------------------------------------------- */&#13;&#10;&#13;&#10;#define FILELENGTH 27956 /* # of sample of input file timit1.asc */&#13;&#10;                              &#13;&#10;extern int iir4(int);&#13;&#10;extern void init_iir4(void);&#13;&#10;&#13;&#10;int indata,outdata;&#13;&#10;                              &#13;&#10;void main(void)&#13;&#10;{   &#13;&#10;    int i; &#13;&#10;&#9;             &#13;&#10;    init_iir4();&#13;&#10;    for (i = 0; i &lt; FILELENGTH; i++)&#13;&#10;        outdata = iir4(indata);&#13;&#10;}&#13;&#10;                                </TEXTAREA></p><p align=center style='text-align:center'>&nbsp;</p><p align=center style='text-align:center'>Table E3-6 List of the IIR filterroutine for Experiment 3D.</p><p align=center style='text-align:center'><TEXTAREA ROWS="7" COLS="70" NAME="exp3d_iir.asm">;----------------------------------------------&#13;&#10;;&#13;&#10;;   exp3d_IIR.asm&#13;&#10;;&#9;&#13;&#10;;   4th Order IIR filter&#13;&#10;;&#13;&#10;;---------------------------------------------- &#13;&#10;&#13;&#10;MASK .set 0xFFFF&#13;&#10;&#13;&#10;    .def  _iir4&#13;&#10;    .def  _init_iir4&#13;&#10;&#13;&#10;;&#13;&#10;;   Original coefficients 0-1800Hz 4th order IIR LPF&#13;&#10;;   with sampling frequency 8000Hz&#13;&#10;;&#13;&#10;;   int b[5]={0.0072, 0.00287, 0.0431, 0.0287, 0.0072};&#13;&#10;;   int a[5]={1.0000, -2.16860,2.0097,-0.8766, 0.1505};&#13;&#10;;                               &#13;&#10;   .data&#13;&#10;;   Q13 formatted coefficients &#13;&#10;;&#13;&#10;coeff ; b0, b1, b2, b3, b4&#13;&#10;      .word 0x003B&amp;MASK, 0x00EB&amp;MASK&#13;&#10;      .word 0x0161&amp;MASK, 0x00EB&amp;MASK, 0x003B&amp;MASK&#13;&#10;      ; -a1, -a2, -a3, -a4&#13;&#10;      .word 0x4564&amp;MASK, -0x404F&amp;MASK &#13;&#10;      .word 0x1C0D&amp;MASK, -0x04D1&amp;MASK&#13;&#10;&#13;&#10;    .bss  x,5          ; x delay line&#13;&#10;    .bss  y,4          ; y delay line&#13;&#10;&#13;&#10;&#13;&#10;    .text                              &#13;&#10;_init_iir4                 &#13;&#10;    pshboth XAR5&#13;&#10;    amov    #x,XAR5      &#13;&#10;    rpt     #4&#13;&#10;    mov     #0,*AR5+&#13;&#10;    amov    #y,XAR5  &#9;&#9;&#13;&#10;    rpt     #3&#13;&#10;    mov     #0,*AR5+&#13;&#10;    popboth XAR5&#9;&#13;&#10;    ret&#13;&#10;&#9;    &#13;&#10;;&#13;&#10;;   4th Order IIR filter&#13;&#10;;   Entry T0 = sample&#13;&#10;;   Exit T0 = filtered sample&#13;&#10;;&#13;&#10;&#13;&#10;_iir4           &#13;&#10;    pshboth XAR5&#9;&#13;&#10;    pshboth XAR6&#13;&#10;&#13;&#10;    bset    SATD     &#13;&#10;    bset    SXM  &#13;&#10;&#9;&#13;&#10;    amov    #x,XAR5   &#13;&#10;    amov    #y,XAR6    &#13;&#10;    amov    #coeff,XCDP&#13;&#10;&#9;&#13;&#10;    bset    FRCT &#13;&#10;||  mov     T0,*AR5         ; x[0] = indata&#13;&#10;      &#13;&#10;;&#13;&#10;;   perform IIR filter&#13;&#10;;&#13;&#10;    mpym    *AR5+,*CDP+,AC0 ; AC0=x[0]*bn[0]&#13;&#10;||  rpt&#9;    #3              ; i=1,2,3,4&#13;&#10;    macm    *AR5+,*CDP+,AC0 ; AC0+=x[i]*bn[i]&#13;&#10;&#13;&#10;    rpt     #3              ; i=0,1,2,3&#13;&#10;    macm    *AR6+,*CDP+,AC0 ; AC0+=y[i]*an[i]&#13;&#10;    amov    #y+2,XAR5&#13;&#10;    amov    #y+3,XAR6&#13;&#10;&#13;&#10;    sfts    AC0,#2         ; Scale to Q15 format&#13;&#10;||  rpt     #2&#13;&#10;    mov     *AR5-,*AR6-    ; Update y[]&#13;&#10;&#13;&#10;    mov     hi(AC0),*AR6 &#13;&#10;||  mov     hi(AC0),T0      ; return y[0] in T0&#13;&#10;&#13;&#10;    amov    #x+3,XAR5&#13;&#10;    amov    #x+4,XAR6&#13;&#10;&#13;&#10;    bclr    FRCT&#9;&#13;&#10;||  rpt     #3&#13;&#10;    mov     *AR5-,*AR6-    ; Update x[]&#13;&#10;&#9;&#13;&#10;    popboth XAR6 &#13;&#10;    popboth XAR5  &#13;&#10;&#13;&#10;    bclr    SXM&#13;&#10;    bclr    SATD&#13;&#10;||  ret&#13;&#10;&#9;&#13;&#10;    .end                </TEXTAREA></p><p style='margin-right:72.0pt;margin-left:72.0pt'>To conduct Experiment 3D,following these steps:</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><![if !supportLists]>1.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Createthe project, <span style='font-family:"Courier New"'>exp3d</span> and includethe linker command file <span style='font-family:"Courier New"'>exp3.cmd</span>,the function <span style='font-family:"Courier New"'>exp3d()</span>, andassembly routine <span style='font-family:"Courier New"'>exp3d_iir.asm</span>.</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><![if !supportLists]>2.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Use<span style='font-family:"Courier New"'>rts55.lib</span> for <spanstyle='font-family:"Courier New"'>main()</span> function initialization andbuild the project.</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><![if !supportLists]>3.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Buildthe project. Debug is needed.</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><![if !supportLists]>4.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Interfacethe project with a signal source, such as the speech file <spanstyle='font-family:"Courier New"'>timit1.asc</span>. Process the data and savethe filter output.</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l1 level1 lfo5;tab-stops:list 36.0pt'><![if !supportLists]>5.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Listenthe IIR filte output file generated with different coefficient wordlengths.</p><p align=center style='margin-right:72.0pt;margin-left:72.0pt;text-align:center'>&nbsp;</p><p><a href="#top"><span style='font-size:7.5pt'>Back to Top</span></a> <input type=button value="go back" onclick="history.go(-1)"></p><div class=MsoNormal align=center style='text-align:center'><hr size=3 width="100%" align=center></div><p align=center style='text-align:center'><strong><span style='font-size:13.5pt;color:blue'>Experiment 3E - Function Approximation in Fixed-point NumberRepresentation </span></strong></p><p style='margin-right:72.0pt;margin-left:72.0pt'>For DSP applications, weoften use Q-format to represent fractional numbers. We have introducedquantization and overflow protection in previous experiments. In thisexperiment, we will present another useful method - polynomial approximationwith sinusoid function example to further study and understand the fixed-pointarithmetic operation and overflow control. The function <a href="exp3/exp3e.c"><spanstyle='font-family:"Courier New"'>exp3e.c</span></a> for this experiment andthe assembly routine <a href="exp3/sine_cos.asm"><span style='font-family:"Courier New"'>sine_cos.asm</span></a>are listed in Table E3-7 and Table E3-8, respectively.</p><p style='margin-right:72.0pt;margin-left:72.0pt'>&nbsp;</p><p align=center style='text-align:center'>Table E3-7 List of C function forExperiment 3E.</p><p align=center style='text-align:center'><TEXTAREA ROWS="7" COLS="70" NAME="exp3e.c">/* ---------------------------------&#13;&#10;&#13;&#10;    exp3e.c&#13;&#10;&#9;&#13;&#10;    Fixed-point representaion&#13;&#10;&#13;&#10;------------------------------------ */       &#13;&#10;&#13;&#10;extern void sine_cos(int, int *); &#13;&#10;&#13;&#10;const int theta[16]={&#13;&#10;0x9556,0xa000,0xaaab,0xc000,  /* -150, -135, -120, -90 */&#13;&#10;0xd555,0xe000,0xeaab,0xffff,  /*  -60,  -45,  -30,  -0 */ &#13;&#10;0x1555,0x2000,0x2aaa,0x4000,  /*   30,   45,   60,  90 */            &#13;&#10;0x5555,0x6000,0x6aaa,0x7fff}; /*  120,  135,  150, 180 */&#13;&#10;&#13;&#10;int&#9;result_buf[32];       &#13;&#10;int Wn_buf[2];        &#13;&#10;&#13;&#10;void main()&#13;&#10;{    &#13;&#10;    int *result, *Wn; &#13;&#10;    int i;&#13;&#10;&#13;&#10;    for (i=0; i&lt;32; i++)&#13;&#10;        result_buf[i]=0;&#13;&#10;&#9;&#9;&#9;      &#13;&#10;    result = result_buf;&#13;&#10;    Wn = Wn_buf;&#13;&#10;&#9;                                    &#13;&#10;    /* 3rd quadrant angles */  &#13;&#10;    sine_cos(theta[0], Wn); /* -150 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--; &#13;&#10;    sine_cos(theta[1], Wn); /* -135 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#9;&#13;&#10;    sine_cos(theta[2], Wn); /* -120 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[3], Wn); /* -90  */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;&#9;&#9;&#13;&#10;    /* 4th quadrant angles */  &#13;&#10;    sine_cos(theta[4], Wn); /* -60 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[5], Wn); /* -45 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[6], Wn); /* -30 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[7], Wn); /* -0  */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;&#9;&#13;&#10;    /* 1st quadrant angles */&#13;&#10;    sine_cos(theta[8], Wn);   /* 30 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[9], Wn);&#9;  /* 45 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[10], Wn); /* 60 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[11], Wn); /* 90 */   &#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;&#9;&#9;&#13;&#10;    /* 2nd quadrant angles */&#13;&#10;    sine_cos(theta[12], Wn); /* 120 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[13], Wn); /* 135 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[14], Wn); /* 150 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;    sine_cos(theta[15], Wn); /* 180 */&#13;&#10;    *result++ = *Wn++;&#13;&#10;    *result++ = *Wn--;&#13;&#10;}&#13;&#10;             </TEXTAREA></p><p align=center style='text-align:center'>&nbsp;</p><p align=center style='text-align:center'>Table E3-8 List of the sine-cosine generatorfor Experiment 3E.</p><p align=center style='text-align:center'><TEXTAREA ROWS="7" COLS="70" NAME="sine_cos.asm">;&#13;&#10;;    sine_cos: 16-bit sine(x) and cos(x) approximation function&#13;&#10;;&#13;&#10;;    Entry:  T0 = x, in the range of [-pi=0x8000 pi=0x7fff] &#13;&#10;;&#9;&#9;&#9;AR0 -&gt; Pointer &#13;&#10;;    Return: None         &#13;&#10;;       Update:&#13;&#10;;       AR0-&gt;[0] = cos(x) = d0+d1*x+d2*x^2+d3*x^3+d4*x^4+d5*x^5&#13;&#10;;       AR0-&gt;[1] = sin(x) =    c1*x+c2*x^2+c3*x^3+c4*x^4+c5*x^5&#13;&#10;;&#13;&#10;;    36 cycles&#13;&#10;;&#13;&#10;    .def _sine_cos    &#13;&#10;&#9;&#9;&#13;&#10;;&#13;&#10;;   Approximation coefficients in Q12 (4096) format&#13;&#10;;&#13;&#10;    .data                      &#13;&#10;coeff ; Sine appoximation coefficients&#13;&#10;    .word 0x3240 ; c1 =  3.140625&#13;&#10;    .word 0x0053 ; c2 =  0.02026367&#13;&#10;    .word 0xaacc ; c3 = -5.325196&#13;&#10;    .word 0x08b7 ; c4 =  0.54467780&#13;&#10;    .word 0x1cce ; c5 =  1.80029300&#13;&#10;    ; Cosine appoximation coefficients&#13;&#10;    .word 0x1000 ; d0 =  1.0000&#13;&#10;    .word 0xfff8 ; d1 = -0.001922133&#13;&#10;    .word 0xb199 ; d2 = -4.90014738&#13;&#10;    .word 0xfbc3 ; d3 = -0.2648921&#13;&#10;    .word 0x50ba ; d4 =  5.0454103&#13;&#10;    .word 0xe332 ; d5 = -1.800293&#13;&#10;&#13;&#10;;&#13;&#10;;   Function starts&#13;&#10;;&#13;&#10;    .text&#13;&#10;_sine_cos&#13;&#10;    pshboth XAR5     &#9;&#9;; Save AR5              &#13;&#10;&#13;&#10;    amov    #14,AR5&#13;&#10;    btstp   AR5,T0         ; Test bit 15 and 14&#13;&#10;&#13;&#10;;&#13;&#10;;   Start cos(x)&#13;&#10;;&#9;&#13;&#10;    amov    #coeff+10,XAR5 ; Pointer to the end of coefficients&#13;&#10;&#13;&#10;    xcc     _neg_x,TC1&#13;&#10;    neg     T0             ; Negate if bit 14 is set&#13;&#10;_neg_x&#9;&#13;&#10;&#9;&#13;&#10;    and     #0x7fff,T0     ; Mask out sign bit&#13;&#10;&#13;&#10;    mov     *AR5-&lt;&lt;#16,AC0 ; AC0 = d5&#13;&#10;||  bset    SATD           ; Set Saturate bit&#13;&#10;&#9;&#13;&#10;    mov     *AR5-&lt;&lt;#16,AC1 ; AC1 = d4 &#13;&#10;||  bset    FRCT           ; Set up fractional bit&#9;&#13;&#10;&#13;&#10;    mac     AC0,T0,AC1     ; AC1 = (d5*x+c4)  &#13;&#10;||  mov     *AR5-&lt;&lt;#16,AC0 ; AC0 = d3&#9;         &#13;&#10;&#13;&#10;    mac     AC1,T0,AC0     ; AC0 = (d5*x^2+d4*x+d3)         &#13;&#10;||  mov     *AR5-&lt;&lt;#16,AC1 ; AC1 = d2&#9;&#13;&#10;&#13;&#10;    mac     AC0,T0,AC1     ; AC1 = (d5*x^3+d4*x^2+d3*x+d2)&#13;&#10;||  mov     *AR5-&lt;&lt;#16,AC0 ; AC0 = d1&#9;&#13;&#10;&#13;&#10;    mac     AC1,T0,AC0     ; AC0 = (d5*x^4+d4*x^3+d3*x^2+d2*x+d1)&#13;&#10;||  mov     *AR5-&lt;&lt;#16,AC1 ; AC1 = d0&#13;&#10;    &#13;&#10;    macr    AC0,T0,AC1&#9;   ; AC1 = (d5*x^4+d4*x^3+d3*x^2+d2*x+d1)*x+d0  &#13;&#10;||  xcc     _neg_result1,TC2&#13;&#10;    neg     AC1&#13;&#10;_neg_result1&#9;                  &#13;&#10;&#13;&#10;    mov     *AR5-&lt;&lt;#16,AC0 ; AC0 = c5&#13;&#10;||  xcc     _neg_result2,TC1&#13;&#10;    neg     AC1&#13;&#10;_neg_result2&#13;&#10;&#13;&#10;    mov     hi(saturate(AC1&lt;&lt;#3)),*AR0+  ; return cos(x) in Q15&#13;&#10;&#13;&#10;;&#13;&#10;;   Start sin(x) computation&#13;&#10;;&#13;&#10;&#13;&#10;    mov     *AR5-&lt;&lt;#16,AC1 ; AC1 = c4 &#13;&#10;&#13;&#10;    mac     AC0,T0,AC1     ; AC1 = (c5*x+c4)  &#13;&#10;||  mov     *AR5-&lt;&lt;#16,AC0 ; AC0 = c3&#9;         &#13;&#10;&#13;&#10;    mac     AC1,T0,AC0     ; AC0 = (c5*x^2+c4*x+c3)         &#13;&#10;||  mov     *AR5-&lt;&lt;#16,AC1 ; AC1 = c2&#9;&#13;&#10;&#13;&#10;    mac     AC0,T0,AC1     ; AC1 = (c5*x^3+c4*x^2+c3*x+c2)&#13;&#10;||  mov     *AR5-&lt;&lt;#16,AC0 ; AC0 = c1&#9;&#13;&#10;&#13;&#10;    mac     AC1,T0,AC0     ; AC0 = (c5*x^4+c4*x^3+c3*x^2+c2*x+c1)&#13;&#10;||  popboth XAR5           ; Restore AR5&#13;&#10;&#13;&#10;    mpyr    T0,AC0,AC1     ; AC1 = (c5*x^4+c4*x^3+c3*x^2+c2*x+c1)*x  &#13;&#10;||  xcc     _neg_result3,TC2&#13;&#10;    neg     AC1&#13;&#10;_neg_result3&#9;            &#13;&#10;&#13;&#10;    mov     hi(saturate(AC1&lt;&lt;#3)),*AR0-  ; return sin(x) in Q15&#9;&#9;&#13;&#10;||  bclr    FRCT           ; Reset fractional bit&#9;&#13;&#10;&#13;&#10;    bclr    SATD           ; Reset saturate bit&#13;&#10;    ret&#13;&#10;    &#13;&#10;    .end                                       &#13;&#10;</TEXTAREA></p><p style='margin-right:72.0pt;margin-left:72.0pt'>To conduct Experiment 3D,following these steps:</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><![if !supportLists]>1.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Createthe project, <span style='font-family:"Courier New"'>exp3e</span> and includethe linker command file <span style='font-family:"Courier New"'>exp3.cmd</span>,the function <span style='font-family:"Courier New"'>exp3e()</span>, andassembly routine <span style='font-family:"Courier New"'>sine_cos.asm</span>.</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><![if !supportLists]>2.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Use<span style='font-family:"Courier New"'>rts55.lib</span> for <spanstyle='font-family:"Courier New"'>main()</span> function initialization andbuild the project.</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><![if !supportLists]>3.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Buildthe project. Debug is needed.</p><p class=MsoNormal style='margin-right:72.0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:108.0pt;text-indent:-18.0pt;mso-list:l4 level1 lfo6;tab-stops:list 36.0pt'><![if !supportLists]>4.<spanstyle='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp; </span><![endif]>Calculatethe values of sin(<span style='font-family:Symbol'>q</span>) and cos(<spanstyle='font-family:Symbol'>q</span>) functions for 0&lt;<span style='font-family:Symbol'>q</span>&lt;2<span style='font-family:Symbol'>p</span>.</p><p align=center style='margin-right:72.0pt;margin-left:72.0pt;text-align:center'>&nbsp;</p><p><a href="#top"><span style='font-size:7.5pt'>Back to Top</span></a> <input type=button value="go back" onclick="history.go(-1)"></p></form><div class=MsoNormal align=center style='text-align:center'><hr size=3 width="100%" align=center></div><p><i><u><span style='font-size:7.5pt'>copyright 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -