Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1564 LPDunwell 1
   1               		.file	"jennic.c"
2
   2               	__SREG__ = 0x3f
3
   3               	__SP_H__ = 0x3e
4
   4               	__SP_L__ = 0x3d
5
   5               	__CCP__  = 0x34
6
   6               	__tmp_reg__ = 0
7
   7               	__zero_reg__ = 1
8
   8               		.text
9
   9               	.global	jen_new_signal
10
  11               	jen_new_signal:
11
  12 0000 1F93      		push r17
12
  13 0002 CF93      		push r28
13
  14 0004 DF93      		push r29
14
  15               	/* prologue: function */
15
  16               	/* frame size = 0 */
16
  17 0006 182F      		mov r17,r24
17
  18 0008 1F5F      		subi r17,lo8(-(1))
18
  19 000a CB01      		movw r24,r22
19
  20 000c 8353      		subi r24,lo8(-(-11059))
20
  21 000e 9B42      		sbci r25,hi8(-(-11059))
21
  22 0010 68E1      		ldi r22,lo8(24)
22
  23 0012 70E0      		ldi r23,hi8(24)
23
  24 0014 0E94 0000 		call __divmodhi4
24
  25 0018 AB01      		movw r20,r22
25
  26 001a C12F      		mov r28,r17
26
  27 001c D0E0      		ldi r29,lo8(0)
27
  28 001e CC0F      		lsl r28
28
  29 0020 DD1F      		rol r29
29
  30 0022 FE01      		movw r30,r28
30
  31 0024 E050      		subi r30,lo8(-(PPM_in))
31
  32 0026 F040      		sbci r31,hi8(-(PPM_in))
32
  33 0028 8081      		ld r24,Z
33
  34 002a 9181      		ldd r25,Z+1
34
  35 002c 9C01      		movw r18,r24
35
  36 002e 220F      		lsl r18
36
  37 0030 331F      		rol r19
37
  38 0032 280F      		add r18,r24
38
  39 0034 391F      		adc r19,r25
39
  40 0036 240F      		add r18,r20
40
  41 0038 351F      		adc r19,r21
41
  42 003a 37FD      		sbrc r19,7
42
  43 003c 00C0      		rjmp .L10
43
  44               	.L2:
44
  45 003e 3595      		asr r19
45
  46 0040 2795      		ror r18
46
  47 0042 3595      		asr r19
47
  48 0044 2795      		ror r18
48
  49 0046 CA01      		movw r24,r20
49
  50 0048 0196      		adiw r24,1
50
  51 004a 8217      		cp r24,r18
51
  52 004c 9307      		cpc r25,r19
52
  53 004e 04F4      		brge .L3
53
  54 0050 2150      		subi r18,lo8(-(-1))
54
  55 0052 3040      		sbci r19,hi8(-(-1))
55
  56               	.L4:
56
  57 0054 8091 0000 		lds r24,RC_Quality
57
  58 0058 883C      		cpi r24,lo8(-56)
58
  59 005a 01F0      		breq .L11
59
  60               	.L5:
60
  61 005c FE01      		movw r30,r28
61
  62 005e E050      		subi r30,lo8(-(PPM_diff))
62
  63 0060 F040      		sbci r31,hi8(-(PPM_diff))
63
  64 0062 1182      		std Z+1,__zero_reg__
64
  65 0064 1082      		st Z,__zero_reg__
65
  66               	.L6:
66
  67 0066 FE01      		movw r30,r28
67
  68 0068 E050      		subi r30,lo8(-(PPM_in))
68
  69 006a F040      		sbci r31,hi8(-(PPM_in))
69
  70 006c 3183      		std Z+1,r19
70
  71 006e 2083      		st Z,r18
71
  72 0070 1530      		cpi r17,lo8(5)
72
  73 0072 00F4      		brsh .L8
73
  74 0074 8081      		ld r24,Z
74
  75 0076 9181      		ldd r25,Z+1
75
  76 0078 C050      		subi r28,lo8(-(DebugOut))
76
  77 007a D040      		sbci r29,hi8(-(DebugOut))
77
  78 007c 9BA7      		std Y+43,r25
78
  79 007e 8AA7      		std Y+42,r24
79
  80 0080 1430      		cpi r17,lo8(4)
80
  81 0082 01F4      		brne .L8
81
  82 0084 1092 0000 		sts NewPpmData,__zero_reg__
82
  83               	.L8:
83
  84               	/* epilogue start */
84
  85 0088 DF91      		pop r29
85
  86 008a CF91      		pop r28
86
  87 008c 1F91      		pop r17
87
  88 008e 0895      		ret
88
  89               	.L3:
89
  90 0090 4150      		subi r20,lo8(-(-1))
90
  91 0092 5040      		sbci r21,hi8(-(-1))
91
  92 0094 2417      		cp r18,r20
92
  93 0096 3507      		cpc r19,r21
93
  94 0098 04F4      		brge .L4
94
  95 009a 2F5F      		subi r18,lo8(-(1))
95
  96 009c 3F4F      		sbci r19,hi8(-(1))
96
  97 009e 8091 0000 		lds r24,RC_Quality
97
  98 00a2 883C      		cpi r24,lo8(-56)
98
  99 00a4 01F4      		brne .L5
99
 100               	.L11:
100
 101 00a6 FE01      		movw r30,r28
101
 102 00a8 E050      		subi r30,lo8(-(PPM_in))
102
 103 00aa F040      		sbci r31,hi8(-(PPM_in))
103
 104 00ac 8081      		ld r24,Z
104
 105 00ae 9181      		ldd r25,Z+1
105
 106 00b0 A901      		movw r20,r18
106
 107 00b2 481B      		sub r20,r24
107
 108 00b4 590B      		sbc r21,r25
108
 109 00b6 CA01      		movw r24,r20
109
 110 00b8 63E0      		ldi r22,lo8(3)
110
 111 00ba 70E0      		ldi r23,hi8(3)
111
 112 00bc 0E94 0000 		call __divmodhi4
112
 113 00c0 CB01      		movw r24,r22
113
 114 00c2 880F      		lsl r24
114
 115 00c4 991F      		rol r25
115
 116 00c6 860F      		add r24,r22
116
 117 00c8 971F      		adc r25,r23
117
 118 00ca FE01      		movw r30,r28
118
 119 00cc E050      		subi r30,lo8(-(PPM_diff))
119
 120 00ce F040      		sbci r31,hi8(-(PPM_diff))
120
 121 00d0 9183      		std Z+1,r25
121
 122 00d2 8083      		st Z,r24
122
 123 00d4 00C0      		rjmp .L6
123
 124               	.L10:
124
 125 00d6 2D5F      		subi r18,lo8(-(3))
125
 126 00d8 3F4F      		sbci r19,hi8(-(3))
126
 127 00da 00C0      		rjmp .L2
127
 129               	.global	jen_decode_packet
128
 131               	jen_decode_packet:
129
 132 00dc 1F93      		push r17
130
 133               	/* prologue: function */
131
 134               	/* frame size = 0 */
132
 135 00de 9091 0000 		lds r25,PacketBuffer
133
 136 00e2 9093 0000 		sts jen_status,r25
134
 137 00e6 2091 0000 		lds r18,PacketBuffer+1
135
 138 00ea 822F      		mov r24,r18
136
 139 00ec 807F      		andi r24,lo8(-16)
137
 140 00ee 01F4      		brne .L17
138
 141 00f0 9923      		tst r25
139
 142 00f2 01F4      		brne .L14
140
 143 00f4 88EC      		ldi r24,lo8(-56)
141
 144 00f6 8093 0000 		sts RC_Quality,r24
142
 145 00fa 122F      		mov r17,r18
143
 146 00fc 1F70      		andi r17,lo8(15)
144
 147 00fe 1A30      		cpi r17,lo8(10)
145
 148 0100 00F0      		brlo .L19
146
 149               	.L17:
147
 150               	/* epilogue start */
148
 151 0102 1F91      		pop r17
149
 152 0104 0895      		ret
150
 153               	.L14:
151
 154 0106 1092 0000 		sts RC_Quality,__zero_reg__
152
 155 010a 80E0      		ldi r24,lo8(0)
153
 156 010c 90E0      		ldi r25,hi8(0)
154
 157               	.L16:
155
 158 010e FC01      		movw r30,r24
156
 159 0110 EE0F      		lsl r30
157
 160 0112 FF1F      		rol r31
158
 161 0114 DF01      		movw r26,r30
159
 162 0116 A050      		subi r26,lo8(-(PPM_diff))
160
 163 0118 B040      		sbci r27,hi8(-(PPM_diff))
161
 164 011a 1196      		adiw r26,1
162
 165 011c 1C92      		st X,__zero_reg__
163
 166 011e 1E92      		st -X,__zero_reg__
164
 167 0120 E050      		subi r30,lo8(-(PPM_in))
165
 168 0122 F040      		sbci r31,hi8(-(PPM_in))
166
 169 0124 1182      		std Z+1,__zero_reg__
167
 170 0126 1082      		st Z,__zero_reg__
168
 171 0128 0196      		adiw r24,1
169
 172 012a 8530      		cpi r24,5
170
 173 012c 9105      		cpc r25,__zero_reg__
171
 174 012e 01F4      		brne .L16
172
 175 0130 122F      		mov r17,r18
173
 176 0132 1F70      		andi r17,lo8(15)
174
 177 0134 1A30      		cpi r17,lo8(10)
175
 178 0136 00F4      		brsh .L17
176
 179               	.L19:
177
 180 0138 8091 0000 		lds r24,PacketBuffer+2
178
 181 013c 8093 0000 		sts ChannelPair+1,r24
179
 182 0140 8091 0000 		lds r24,PacketBuffer+3
180
 183 0144 8093 0000 		sts ChannelPair,r24
181
 184 0148 8091 0000 		lds r24,PacketBuffer+4
182
 185 014c 8093 0000 		sts ChannelPair+3,r24
183
 186 0150 8091 0000 		lds r24,PacketBuffer+5
184
 187 0154 8093 0000 		sts ChannelPair+2,r24
185
 188 0158 6091 0000 		lds r22,ChannelPair
186
 189 015c 7091 0000 		lds r23,(ChannelPair)+1
187
 190 0160 812F      		mov r24,r17
188
 191 0162 0E94 0000 		call jen_new_signal
189
 192 0166 6091 0000 		lds r22,ChannelPair+2
190
 193 016a 7091 0000 		lds r23,(ChannelPair+2)+1
191
 194 016e 812F      		mov r24,r17
192
 195 0170 8F5F      		subi r24,lo8(-(1))
193
 196 0172 0E94 0000 		call jen_new_signal
194
 197 0176 1F91      		pop r17
195
 198 0178 0895      		ret
196
 200               	.global	jen_parser
197
 202               	jen_parser:
198
 203 017a 1F93      		push r17
199
 204               	/* prologue: function */
200
 205               	/* frame size = 0 */
201
 206 017c 182F      		mov r17,r24
202
 207 017e 8F3F      		cpi r24,lo8(-1)
203
 208 0180 01F0      		breq .L28
204
 209               	.L21:
205
 210 0182 8091 0000 		lds r24,cnt.1392
206
 211 0186 8630      		cpi r24,lo8(6)
207
 212 0188 00F0      		brlo .L23
208
 213 018a 8091 0000 		lds r24,crc.1391
209
 214 018e 8095      		com r24
210
 215 0190 8093 0000 		sts crc.1391,r24
211
 216 0194 8F3F      		cpi r24,lo8(-1)
212
 217 0196 01F0      		breq .L29
213
 218               	.L24:
214
 219 0198 1817      		cp r17,r24
215
 220 019a 01F0      		breq .L30
216
 221               	.L25:
217
 222 019c 1092 0000 		sts cnt.1392,__zero_reg__
218
 223 01a0 1092 0000 		sts crc.1391,__zero_reg__
219
 224 01a4 00C0      		rjmp .L26
220
 225               	.L23:
221
 226 01a6 E82F      		mov r30,r24
222
 227 01a8 F0E0      		ldi r31,lo8(0)
223
 228 01aa E050      		subi r30,lo8(-(PacketBuffer))
224
 229 01ac F040      		sbci r31,hi8(-(PacketBuffer))
225
 230 01ae 1083      		st Z,r17
226
 231 01b0 8F5F      		subi r24,lo8(-(1))
227
 232 01b2 8093 0000 		sts cnt.1392,r24
228
 233 01b6 8091 0000 		lds r24,crc.1391
229
 234 01ba 810F      		add r24,r17
230
 235 01bc 8093 0000 		sts crc.1391,r24
231
 236               	.L26:
232
 237 01c0 1093 0000 		sts last_c.1390,r17
233
 238               	.L27:
234
 239               	/* epilogue start */
235
 240 01c4 1F91      		pop r17
236
 241 01c6 0895      		ret
237
 242               	.L28:
238
 243 01c8 8091 0000 		lds r24,last_c.1390
239
 244 01cc 8F3F      		cpi r24,lo8(-1)
240
 245 01ce 01F4      		brne .L21
241
 246 01d0 1092 0000 		sts cnt.1392,__zero_reg__
242
 247 01d4 1092 0000 		sts crc.1391,__zero_reg__
243
 248 01d8 00C0      		rjmp .L27
244
 249               	.L29:
245
 250 01da 8EEF      		ldi r24,lo8(-2)
246
 251 01dc 8093 0000 		sts crc.1391,r24
247
 252 01e0 00C0      		rjmp .L24
248
 253               	.L30:
249
 254 01e2 0E94 0000 		call jen_decode_packet
250
 255 01e6 00C0      		rjmp .L25
251
 257               	.global	jen_status
252
 258               	.global	jen_status
253
 259               		.section .bss
254
 262               	jen_status:
255
 263 0000 00        		.skip 1,0
256
 264               		.lcomm cnt.1392,1
257
 265               		.lcomm crc.1391,1
258
 266               		.lcomm last_c.1390,1
259
 267               		.comm PacketBuffer,9,1
260
 268               		.comm ChannelPair,4,1
261
 269               	.global __do_clear_bss
262
DEFINED SYMBOLS
263
                            *ABS*:00000000 jennic.c
264
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:2      *ABS*:0000003f __SREG__
265
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:3      *ABS*:0000003e __SP_H__
266
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:4      *ABS*:0000003d __SP_L__
267
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:5      *ABS*:00000034 __CCP__
268
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:6      *ABS*:00000000 __tmp_reg__
269
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:7      *ABS*:00000001 __zero_reg__
270
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:11     .text:00000000 jen_new_signal
271
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:131    .text:000000dc jen_decode_packet
272
                            *COM*:00000009 PacketBuffer
273
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:262    .bss:00000000 jen_status
274
                            *COM*:00000004 ChannelPair
275
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:202    .text:0000017a jen_parser
276
                             .bss:00000001 cnt.1392
277
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:264    .bss:00000002 crc.1391
278
C:\DOKUME~1\LUKEPA~1\LOKALE~1\Temp/ccxkbGnW.s:265    .bss:00000003 last_c.1390
279
 
280
UNDEFINED SYMBOLS
281
__divmodhi4
282
PPM_in
283
RC_Quality
284
PPM_diff
285
DebugOut
286
NewPpmData
287
__do_clear_bss