;******************************************************************************
;* TMS320C6x ANSI C Codegen                                      Version 4.20 *
;* Date/Time created: Wed Feb 19 13:54:53 2003                                *
;******************************************************************************

;******************************************************************************
;* GLOBAL FILE PARAMETERS                                                     *
;*                                                                            *
;*   Architecture      : TMS320C620x                                          *
;*   Optimization      : Disabled                                             *
;*   Optimizing for    : Compile time, Ease of Development                    *
;*                       Based on options: no -o, no -ms                      *
;*   Endian            : Little                                               *
;*   Interrupt Thrshld : Disabled                                             *
;*   Memory Model      : Small                                                *
;*   Calls to RTS      : Near                                                 *
;*   Pipelining        : Disabled                                             *
;*   Memory Aliases    : Presume are aliases (pessimistic)                    *
;*   Debug Info        : Debug                                                *
;*                                                                            *
;******************************************************************************

	.asg	A15, FP
	.asg	B14, DP
	.asg	B15, SP
	.global	$bss

	.file	"sine8_intr.c"

	.sect	".cinit:c"
	.align	8
	.field  	(CIR - $) - 8, 32
	.field  	_loop+0,32
	.field  	0,16			; _loop @ 0
	.sect	".text"
	.global	_loop
_loop:	.usect	".bss:c",2,2
	.sym	_loop,_loop, 3, 2, 16

	.sect	".cinit"
	.align	8
	.field  	IR_1,32
	.field  	_sin_table+0,32
	.field  	0,16			; _sin_table[0] @ 0
	.field  	707,16			; _sin_table[1] @ 16
	.field  	1000,16			; _sin_table[2] @ 32
	.field  	707,16			; _sin_table[3] @ 48
	.field  	0,16			; _sin_table[4] @ 64
	.field  	64829,16			; _sin_table[5] @ 80
	.field  	64536,16			; _sin_table[6] @ 96
	.field  	64829,16			; _sin_table[7] @ 112
IR_1:	.set	16
	.sect	".text"
	.global	_sin_table
	.bss	_sin_table,16,4
	.sym	_sin_table,_sin_table, 51, 2, 128,, 8

	.sect	".cinit:c"
	.align	2
	.field  	10,16			; _amplitude @ 0
	.sect	".text"
	.global	_amplitude
_amplitude:	.usect	".bss:c",2,2
	.sym	_amplitude,_amplitude, 3, 2, 16
;	c:\ti\c6000\cgtools\bin\acp6x.exe -D_DEBUG -Ic:/ti/c6000/bios/include -Ic:/ti/c6000/rtdx/include -Ic:/ti/c6000/cgtools/include --keep_unneeded_types -m --i_output_file C:\DOCUME~1\yoder\LOCALS~1\Temp\TI3020_2 --template_info_file C:\DOCUME~1\yoder\LOCALS~1\Temp\TI3020_3 --object_file C:/ti/myprojects/sine8_intr/Debug/sine8_intr.obj --opt_shell 9 sine8_intr.c -g -k -s -frC:/ti/myprojects/sine8_intr/Debug -d_DEBUG -ic:/ti/c6000/bios/include -ic:/ti/c6000/rtdx/include -ic:/ti/c6000/cgtools/include 
	.sect	".text"
	.global	_c_int11
	.sym	_c_int11,_c_int11, 32, 2, 0
	.func	8
;----------------------------------------------------------------------
;   8 | interrupt void c_int11()  //interrupt service routine                  
;----------------------------------------------------------------------

;******************************************************************************
;* FUNCTION NAME: _c_int11                                                    *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,  *
;*                           B7,B8,B9,SP                                      *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,  *
;*                           B7,B8,B9,DP,SP                                   *
;*   Local Frame Size  : 0 Args + 0 Auto + 84 Save = 84 byte                  *
;******************************************************************************
_c_int11:
;** --------------------------------------------------------------------------*
	.line	2
           STW     .D2T2   B9,*SP--(88)      ; |9| 
           STW     .D2T1   A0,*+SP(12)       ; |9| 
           STW     .D2T1   A1,*+SP(16)       ; |9| 
           STW     .D2T1   A2,*+SP(20)       ; |9| 
           STW     .D2T1   A3,*+SP(24)       ; |9| 
           STW     .D2T1   A4,*+SP(28)       ; |9| 
           STW     .D2T1   A5,*+SP(32)       ; |9| 
           STW     .D2T1   A6,*+SP(36)       ; |9| 
           STW     .D2T1   A7,*+SP(40)       ; |9| 
           STW     .D2T1   A8,*+SP(44)       ; |9| 
           STW     .D2T1   A9,*+SP(48)       ; |9| 
           STW     .D2T2   B0,*+SP(52)       ; |9| 
           STW     .D2T2   B1,*+SP(56)       ; |9| 
           STW     .D2T2   B2,*+SP(60)       ; |9| 
           STW     .D2T2   B3,*+SP(64)       ; |9| 
           STW     .D2T2   B4,*+SP(68)       ; |9| 
           STW     .D2T2   B5,*+SP(72)       ; |9| 
           STW     .D2T2   B6,*+SP(76)       ; |9| 
           STW     .D2T2   B7,*+SP(80)       ; |9| 
           STW     .D2T2   B8,*+SP(84)       ; |9| 
           NOP             2
	.line	3
;----------------------------------------------------------------------
;  10 | output_sample(sin_table[loop]*amplitude); //output each sine value     
;----------------------------------------------------------------------
           LDH     .D2T2   *+DP(_loop),B5    ; |10| 
           MVK     .S2     (_sin_table-$bss),B4 ; |10| 
           LDH     .D2T1   *+DP(_amplitude),A0 ; |10| 
           ADD     .S2     DP,B4,B4          ; |10| 
           MVKL    .S2     RL0,B3            ; |10| 
           LDH     .D2T2   *+B4[B5],B4       ; |10| 
           B       .S1     _output_sample    ; |10| 
           NOP             3
           MPY     .M1X    A0,B4,A4          ; |10| 
           MVKH    .S2     RL0,B3            ; |10| 
RL0:       ; CALL OCCURS                     ; |10| 
	.line	4
;----------------------------------------------------------------------
;  11 | if (loop < 7) ++loop;    //increment index loop                        
;----------------------------------------------------------------------
           LDH     .D2T2   *+DP(_loop),B4    ; |11| 
           LDH     .D2T2   *+DP(_loop),B5    ; |11| 
           NOP             3
           CMPLT   .L2     B4,7,B0           ; |11| 
   [!B0]   B       .S1     L1                ; |11| 
           ADD     .D2     1,B5,B4           ; |11| 
           NOP             4
           ; BRANCH OCCURS                   ; |11| 
;** --------------------------------------------------------------------------*
           B       .S1     L2                ; |11| 
           STH     .D2T2   B4,*+DP(_loop)    ; |11| 
           NOP             4
           ; BRANCH OCCURS                   ; |11| 
;** --------------------------------------------------------------------------*
L1:    
	.line	5
;----------------------------------------------------------------------
;  12 | else loop = 0;           //reinit index @ end of buffer                
;----------------------------------------------------------------------
           ZERO    .D2     B4                ; |12| 
           STH     .D2T2   B4,*+DP(_loop)    ; |12| 
           NOP             2
	.line	6
;----------------------------------------------------------------------
;  13 | return;                  //return from interrupt                       
;----------------------------------------------------------------------
;** --------------------------------------------------------------------------*
L2:    
	.line	7
           LDW     .D2T2   *+SP(80),B7       ; |14| 
           LDW     .D2T2   *+SP(76),B6       ; |14| 
           LDW     .D2T2   *+SP(72),B5       ; |14| 
           LDW     .D2T2   *+SP(68),B4       ; |14| 
           LDW     .D2T2   *+SP(64),B3       ; |14| 
           LDW     .D2T2   *+SP(60),B2       ; |14| 
           LDW     .D2T2   *+SP(56),B1       ; |14| 
           LDW     .D2T2   *+SP(52),B0       ; |14| 
           LDW     .D2T1   *+SP(48),A9       ; |14| 
           LDW     .D2T1   *+SP(44),A8       ; |14| 
           LDW     .D2T1   *+SP(40),A7       ; |14| 
           LDW     .D2T1   *+SP(36),A6       ; |14| 
           LDW     .D2T1   *+SP(32),A5       ; |14| 
           LDW     .D2T1   *+SP(28),A4       ; |14| 
           LDW     .D2T1   *+SP(24),A3       ; |14| 
           LDW     .D2T1   *+SP(20),A2       ; |14| 
           LDW     .D2T1   *+SP(16),A1       ; |14| 
           LDW     .D2T1   *+SP(12),A0       ; |14| 

           B       .S2     IRP               ; |14| 
||         LDW     .D2T2   *+SP(84),B8       ; |14| 

           LDW     .D2T2   *++SP(88),B9      ; |14| 
           NOP             4
           ; BRANCH OCCURS                   ; |14| 
	.endfunc	14,003ff03ffh,88


	.sect	".text"
	.global	_main
	.sym	_main,_main, 32, 2, 0
	.func	16
;----------------------------------------------------------------------
;  16 | void main()                                                            
;----------------------------------------------------------------------

;******************************************************************************
;* FUNCTION NAME: _main                                                       *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,  *
;*                           B7,B8,B9,SP                                      *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,  *
;*                           B7,B8,B9,SP                                      *
;*   Local Frame Size  : 0 Args + 0 Auto + 4 Save = 4 byte                    *
;******************************************************************************
_main:
;** --------------------------------------------------------------------------*
	.line	2
           STW     .D2T2   B3,*SP--(8)       ; |17| 
           NOP             2
	.line	3
;----------------------------------------------------------------------
;  18 | comm_intr();            //init DSK, codec, McBSP                       
;----------------------------------------------------------------------
           B       .S1     _comm_intr        ; |18| 
           MVKL    .S2     RL2,B3            ; |18| 
           MVKH    .S2     RL2,B3            ; |18| 
           NOP             3
RL2:       ; CALL OCCURS                     ; |18| 
	.line	4
;----------------------------------------------------------------------
;  19 | while(1);               //infinite loop                                
;----------------------------------------------------------------------
;*----------------------------------------------------------------------------*
;*   SOFTWARE PIPELINE INFORMATION
;*      Disqualified loop: software pipelining disabled
;*----------------------------------------------------------------------------*
L3:    
           B       .S1     L3                ; |19| 
           NOP             5
           ; BRANCH OCCURS                   ; |19| 
;** --------------------------------------------------------------------------*
	.endfunc	20,000080000h,8


;******************************************************************************
;* MARK THE END OF THE SCALAR INIT RECORD IN CINIT:C                          *
;******************************************************************************
CIR:	.sect	".cinit:c"
;******************************************************************************
;* UNDEFINED EXTERNAL REFERENCES                                              *
;******************************************************************************
	.global	_output_sample
	.global	_comm_intr

;******************************************************************************
;* TYPE INFORMATION                                                           *
;******************************************************************************