Motorola DSP56000 Assembler  Version 3.1  102-12-07  22:59:50  gen_real.asm
  Page 1



1      
2         00FFFD         pctl      equ     $fffd
3         00FFFE         bcr       equ     $fffe                             ; B
CR Register
4         00FFFC         ogdbr     equ     $fffc                             ; O
nCE GDB Register
5         00FFEB         ecsr      equ     $ffeb                             ; E
MI Control/Status Register
6         00FFEA         edrr0     equ     $ffea                             ; E
MI Data Read Register
7         00FFE8         ebar0     equ     $ffe8                             ; E
MI Base Address Register 0
8         00FFE9         eor0      equ     $ffe9                             ; E
MI Offset Register
9         00000D         edrf      equ     13                                ; E
MI EDRR Full flag
10        000011         hrne      equ     17                                ; S
HI FIFO Not Empty flag
11        00FFF3         hrx       equ     $fff3                             ; S
HI HRX FIFO
12        00FFF1         hcsr      equ     $fff1                             ; S
HI Control/Status Register
13        000001         hi2c      equ     1                                 ; S
HI IIC Enable Control Bit
14        000000         ma        equ     0                                 ; O
MR Mode A
15        000001         mb        equ     1                                 ; O
MR Mode B
16        000004         mc        equ     4                                 ; O
MR Mode C
17        00FFF7         gpior     equ     $fff7                             ; G
PIO Control/Data Register
18        000009         gdd3      equ     9                                 ; d
irection bit for GPIO3
19        000001         gd3       equ     1                                 ; d
ata bit for GPIO3
20        00FFE1         rcs       equ     $ffe1                             ;SA
I receiver control / status register
21        00FFE4         tcs       equ     $ffe4                             ;SA
I transmitter conntrol /status register
22        00FFE0         brc       equ     $ffe0                             ;ba
ud rate control register
23        00FFE2         rx0       equ     $ffe2                             ;SA
I receive data register
24        00FFE3         rx1       equ     $ffe3                             ;SA
I receive data register
25        00FFE5         tx0       equ     $ffe5                             ;SA
I transmit data register
26        00FFE6         tx1       equ     $ffe6                             ;SA
I transmit data register
27        00FFE7         tx2       equ     $ffe7                             ;SA
I transmit data register
28        00FFFF         ipr       equ     $ffff                             ;in
terrupt priority register
29        00000E         rldf      equ     14
30        00000F         rrdf      equ     15
31     
32                       buf_delta_i
33        000050                   equ     $50
34                       buf_delta_f
35        000051                   equ     $51
Motorola DSP56000 Assembler  Version 3.1  102-12-07  22:59:50  gen_real.asm
  Page 2



36                       buf_sin_x_i
37        000052                   equ     $52
38                       buf_sin_x_f
39        000053                   equ     $53
40                       buf_cos_x_i
41        000054                   equ     $54
42                       buf_cos_x_f
43        000055                   equ     $55
44     
45     
46                       ;start equ $60                    ;program starting add
ress
47        000100         sinep     equ     $100                              ;si
ne table starting address
48        000139         cosinep   equ     $139
49        0000FF         mask      equ     $0ff                              ;ba
se address plus N minus one
50        1.050000E+000  delta     equ     1.05                              ;de
lta = 2.5
51     
52     
53     
54     
55        000008         N         equ     8
56     
57     
58        P:0000                   org     p:$0
59        P:0000 0AF080            jmp     start1
                 000002
60     
61     
62     
63     
64                       start1:
65     
66     
67        P:0002 08F4BD            movep             #$260023,x:pctl         ; u
aktywnij PLL i ustaw 50MHz
                 260023
68        P:0004 08F4A1            movep             #$000201,x:rcs          ;ua
ktywnij SAI
                 000201
69     
70        P:0006 08F4A4            movep             #$000203,x:tcs          ;ua
ktywnij SAI
                 000203
71     
72     
73     
74     
75        P:0008 51F400            move              #(delta-@cvi(delta)),b0 ;st
ore fraction part in b0
                 066666
76        P:000A 66F43A            asl     b         #sinep,r6               ;el
iminate sign bit, initialize r1
                 000100
77        P:000C 597000            move                          b0,y:buf_delta_
f ;unsigned fractional Delta in y0
                 000051
78     
79        P:000E 51F400            move              #>@cvi(delta),b0
Motorola DSP56000 Assembler  Version 3.1  102-12-07  22:59:50  gen_real.asm
  Page 3



                 000001
80        P:0010 597000            move                          b0,y:buf_delta_
i ;integer part of Delta in y0
                 000050
81     
82     
83        P:0012 3E0013            clr     a         #0,n6                   ;in
itialize a and n1
84        P:0013 05FFA7            move              #mask,m7
85        P:0014 0466A7            move              m7,m6                   ;se
t up mask value
86        P:0015 3F0000            move              #0,n7                   ;in
itialize n2
87        P:0016 67F400            move              #sinep+1,r7             ;in
itialize r2 with the value r1+ 1
                 000101
88     
89     
90        P:0018 3A0013            clr     a         #0,n2                   ;in
itialize a and n1
91        P:0019 05FFA3            move              #mask,m3
92        P:001A 0462A3            move              m3,m2                   ;se
t up mask value                                     petla:
93        P:001B 3B0000            move              #0,n3                   ;in
itialize n2                         nop
94        P:001C 63F400            move              #cosinep+1,r3           ;in
itialize r2 with the value r1+ 1     jset #rldf,x:rcs,odbierz_lewy
                 00013A
95        P:001E 62F400            move              #cosinep,r2
                 000139
96     
97        P:0020 5C7000            move                          a1,y:buf_sin_x_
i
                 000052
98        P:0022 587000            move                          a0,y:buf_sin_x_
f
                 000053
99        P:0024 5C7000            move                          a1,y:buf_cos_x_
i
                 000054
100       P:0026 587000            move                          a0,y:buf_cos_x_
f
                 000055
101    
102    
103    
104                      petla:
105    
106    
107    
108       P:0028 000000            nop
109       P:0029 0AA1AE            jset    #rldf,x:rcs,odbierz_lewy
                 000030
110    
111    
112       P:002B 000000            nop
113       P:002C 0AA1AF            jset    #rrdf,x:rcs,odbierz_prawy
                 00004F
114    
115       P:002E 000000            nop
116       P:002F 0C0028            jmp     petla
Motorola DSP56000 Assembler  Version 3.1  102-12-07  22:59:50  gen_real.asm
  Page 4



117    
118    
119    
120                      odbierz_lewy:
121    
122       P:0030 44F000            move              x:rx0,x0
                 00FFE2
123    
124    
125                                                                          ; c
lr a
126       P:0032 5CF000            move                          y:buf_sin_x_i,a
1
                 000052
127       P:0034 58F000            move                          y:buf_sin_x_f,a
0
                 000053
128       P:0036 20001B            clr     b
129       P:0037 210D00            move              a0,b1                   ;fr
action part of ptr in b1, b0= 0 (1)
130       P:0038 4CEE2B            lsr     b                     y:(r6+n6),x0 ;b
1= signed fr. Delta, x0= sine (2)
131       P:0039 557000            move              b1,x:tx1
                 00FFE6
132       P:003B 1FEF00            move              b,x1        y:(r7+n7),b ;si
gn. fract. in x1, sine in b1 (2)
133       P:003C 20004C            sub     x0,b                              ;su
btr sines to obtain slope (1)
134       P:003D 1BEE00            move              b,x0        y:(r6+n6),b ;sl
ope value to x0, sine in b1 (2)
135       P:003E 2000AB            macr    x0,x1,b                           ;sa
mple approximation = m* x+ b (1)
136       P:003F 4FF000            move                          y:buf_delta_i,y
1
                 000050
137       P:0041 4EF000            move                          y:buf_delta_f,y
0
                 000051
138       P:0043 200030            add     y,a                               ;
139       P:0044 577000            move              b,x:tx0                 ;up
date calculation, output sample (1)
                 00FFE5
140       P:0046 0445A7            move              m7,x1                   ;se
t up mask value in x1 (1)
141       P:0047 200066            and     x1,a                              ;ma
sk a1 = modulo arithmetic (1)
142    
143       P:0048 219E00            move              a1,n6                   ;up
date offset register n1 (1)
144       P:0049 219F00            move              a1,n7                   ;up
date offset register n2 (1)                                 ;return from the subr
outine (1)
145       P:004A 5C7000            move                          a1,y:buf_sin_x_
i
                 000052
146       P:004C 587000            move                          a0,y:buf_sin_x_
f
                 000053
147    
148    
149    
Motorola DSP56000 Assembler  Version 3.1  102-12-07  22:59:50  gen_real.asm
  Page 5



150    
151    
152    
153    
154    
155    
156       P:004E 0C0028            jmp     petla
157    
158    
159                      odbierz_prawy:
160    
161       P:004F 44F000            move              x:rx0,x0
                 00FFE2
162    
163       P:0051 200013            clr     a
164       P:0052 5CF000            move                          y:buf_cos_x_i,a
1
                 000054
165       P:0054 58F000            move                          y:buf_cos_x_f,a
0
                 000055
166       P:0056 20001B            clr     b
167       P:0057 210D00            move              a0,b1                   ;fr
action part of ptr in b1, b0= 0 (1)
168       P:0058 4CEA2B            lsr     b                     y:(r2+n2),x0 ;b
1= signed fr. Delta, x0= sine (2)
169       P:0059 557000            move              b1,x:tx1
                 00FFE6
170       P:005B 1FEB00            move              b,x1        y:(r3+n3),b ;si
gn. fract. in x1, sine in b1 (2)
171       P:005C 20004C            sub     x0,b                              ;su
btr sines to obtain slope (1)
172       P:005D 1BEA00            move              b,x0        y:(r2+n2),b ;sl
ope value to x0, sine in b1 (2)
173       P:005E 2000AB            macr    x0,x1,b                           ;sa
mple approximation = m* x+ b (1)
174       P:005F 4FF000            move                          y:buf_delta_i,y
1
                 000050
175       P:0061 4EF000            move                          y:buf_delta_f,y
0
                 000051
176       P:0063 200030            add     y,a                               ;
177       P:0064 577000            move              b,x:tx0                 ;up
date calculation, output sample (1)
                 00FFE5
178       P:0066 0445A3            move              m3,x1                   ;se
t up mask value in x1 (1)
179       P:0067 200066            and     x1,a                              ;ma
sk a1 = modulo arithmetic (1)
180    
181       P:0068 219A00            move              a1,n2                   ;up
date offset register n1 (1)
182       P:0069 219B00            move              a1,n3                   ;up
date offset register n2 (1)                                 ;return from the subr
outine (1)
183       P:006A 5C7000            move                          a1,y:buf_cos_x_
i
                 000054
184       P:006C 587000            move                          a0,y:buf_cos_x_
f
Motorola DSP56000 Assembler  Version 3.1  102-12-07  22:59:50  gen_real.asm
  Page 6



                 000055
185    
186    
187    
188    
189    
190    
191    
192    
193    
194    
195    
196       P:006E 0C0028            jmp     petla
197    
198    
199    

0    Errors
0    Warnings










































