Subversion Repositories FlightCtrl

Rev

Rev 2301 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2286 - 1
   1               		.file	"Spektrum.c"
2
   2               		.arch atmega1284p
3
   3               	__SREG__ = 0x3f
4
   4               	__SP_H__ = 0x3e
5
   5               	__SP_L__ = 0x3d
6
   6               	__tmp_reg__ = 0
7
   7               	__zero_reg__ = 1
8
   8               		.global __do_copy_data
9
   9               		.global __do_clear_bss
10
  10               	.global	s_exparity
11
  11               	.global	s_exparity
12
  12               		.section .bss
13
  15               	s_exparity:
14
  16 0000 00        		.skip 1,0
15
  17               	.global	s_excnt
16
  18               	.global	s_excnt
17
  21               	s_excnt:
18
  22 0001 00        		.skip 1,0
19
  23               	.global	SpektrumTimer
20
  24               	.global	SpektrumTimer
21
  27               	SpektrumTimer:
22
  28 0002 00        		.skip 1,0
23
  29               		.text
24
  30               	.global	s_update
25
  32               	s_update:
26
  33               	/* prologue: frame size=0 */
27
  34 0000 0F93      		push r16
28
  35 0002 1F93      		push r17
29
  36 0004 CF93      		push r28
30
  37 0006 DF93      		push r29
31
  38               	/* prologue end (size=4) */
32
  39 0008 482F      		mov r20,r24
33
  40 000a EB01      		movw r28,r22
34
  41 000c 8091 0000 		lds r24,SenderOkay
35
  42 0010 E42F      		mov r30,r20
36
  43 0012 FF27      		clr r31
37
  44 0014 843B      		cpi r24,lo8(-76)
38
  45 0016 00F0      		brlo .L2
39
  46 0018 8F01      		movw r16,r30
40
  47 001a 0E0F      		add r16,r30
41
  48 001c 1F1F      		adc r17,r31
42
  49 001e F801      		movw r30,r16
43
  50 0020 E050      		subi r30,lo8(-(PPM_in))
44
  51 0022 F040      		sbci r31,hi8(-(PPM_in))
45
  52 0024 8081      		ld r24,Z
46
  53 0026 9181      		ldd r25,Z+1
47
  54 0028 9B01      		movw r18,r22
48
  55 002a 281B      		sub r18,r24
49
  56 002c 390B      		sbc r19,r25
50
  57 002e C901      		movw r24,r18
51
  58 0030 63E0      		ldi r22,lo8(3)
52
  59 0032 70E0      		ldi r23,hi8(3)
53
  60 0034 0E94 0000 		call __divmodhi4
54
  61 0038 CB01      		movw r24,r22
55
  62 003a 880F      		lsl r24
56
  63 003c 991F      		rol r25
57
  64 003e 860F      		add r24,r22
58
  65 0040 971F      		adc r25,r23
59
  66 0042 0050      		subi r16,lo8(-(PPM_diff))
60
  67 0044 1040      		sbci r17,hi8(-(PPM_diff))
61
  68 0046 F801      		movw r30,r16
62
  69 0048 9183      		std Z+1,r25
63
  70 004a 8083      		st Z,r24
64
  71 004c 00C0      		rjmp .L3
65
  72               	.L2:
66
  73 004e EE0F      		add r30,r30
67
  74 0050 FF1F      		adc r31,r31
68
  75 0052 E050      		subi r30,lo8(-(PPM_diff))
69
  76 0054 F040      		sbci r31,hi8(-(PPM_diff))
70
  77 0056 1182      		std Z+1,__zero_reg__
71
  78 0058 1082      		st Z,__zero_reg__
72
  79               	.L3:
73
  80 005a E42F      		mov r30,r20
74
  81 005c FF27      		clr r31
75
  82 005e EE0F      		add r30,r30
76
  83 0060 FF1F      		adc r31,r31
77
  84 0062 E050      		subi r30,lo8(-(PPM_in))
78
  85 0064 F040      		sbci r31,hi8(-(PPM_in))
79
  86 0066 D183      		std Z+1,r29
80
  87 0068 C083      		st Z,r28
81
  88               	/* epilogue: frame size=0 */
82
  89 006a DF91      		pop r29
83
  90 006c CF91      		pop r28
84
  91 006e 1F91      		pop r17
85
  92 0070 0F91      		pop r16
86
  93 0072 0895      		ret
87
  94               	/* epilogue end (size=5) */
88
  95               	/* function s_update size 58 (49) */
89
  97               	.global	SpektrumUartInit
90
  99               	SpektrumUartInit:
91
 100               	/* prologue: frame size=0 */
92
 101               	/* prologue end (size=0) */
93
 102 0074 4FB7      		in r20,95-0x20
94
 103 0076 24E1      		ldi r18,lo8(20)
95
 104 0078 30E0      		ldi r19,hi8(20)
96
 105               	/* #APP */
97
 106 007a F894      		cli
98
 107               	/* #NOAPP */
99
 108 007c 8091 C900 		lds r24,201
100
 109 0080 8F77      		andi r24,lo8(127)
101
 110 0082 8093 C900 		sts 201,r24
102
 111 0086 8091 C900 		lds r24,201
103
 112 008a 8F7B      		andi r24,lo8(-65)
104
 113 008c 8093 C900 		sts 201,r24
105
 114 0090 8091 C900 		lds r24,201
106
 115 0094 8F7D      		andi r24,lo8(-33)
107
 116 0096 8093 C900 		sts 201,r24
108
 117 009a 5A9A      		sbi 43-0x20,2
109
 118 009c 5298      		cbi 42-0x20,2
110
 119 009e 5B9A      		sbi 43-0x20,3
111
 120 00a0 539A      		sbi 42-0x20,3
112
 121 00a2 832F      		mov r24,r19
113
 122 00a4 9927      		clr r25
114
 123 00a6 8093 CD00 		sts 205,r24
115
 124 00aa 2093 CC00 		sts 204,r18
116
 125 00ae 8091 C800 		lds r24,200
117
 126 00b2 8260      		ori r24,lo8(2)
118
 127 00b4 8093 C800 		sts 200,r24
119
 128 00b8 80E1      		ldi r24,lo8(16)
120
 129 00ba 8093 C900 		sts 201,r24
121
 130 00be 8091 CA00 		lds r24,202
122
 131 00c2 8F77      		andi r24,lo8(127)
123
 132 00c4 8093 CA00 		sts 202,r24
124
 133 00c8 8091 CA00 		lds r24,202
125
 134 00cc 8F7B      		andi r24,lo8(-65)
126
 135 00ce 8093 CA00 		sts 202,r24
127
 136 00d2 8091 CA00 		lds r24,202
128
 137 00d6 8F7D      		andi r24,lo8(-33)
129
 138 00d8 8093 CA00 		sts 202,r24
130
 139 00dc 8091 CA00 		lds r24,202
131
 140 00e0 8F7E      		andi r24,lo8(-17)
132
 141 00e2 8093 CA00 		sts 202,r24
133
 142 00e6 8091 CA00 		lds r24,202
134
 143 00ea 877F      		andi r24,lo8(-9)
135
 144 00ec 8093 CA00 		sts 202,r24
136
 145 00f0 8091 C900 		lds r24,201
137
 146 00f4 8B7F      		andi r24,lo8(-5)
138
 147 00f6 8093 C900 		sts 201,r24
139
 148 00fa 8091 CA00 		lds r24,202
140
 149 00fe 8460      		ori r24,lo8(4)
141
 150 0100 8093 CA00 		sts 202,r24
142
 151 0104 8091 CA00 		lds r24,202
143
 152 0108 8260      		ori r24,lo8(2)
144
 153 010a 8093 CA00 		sts 202,r24
145
 154               	.L10:
146
 155 010e 8091 C800 		lds r24,200
147
 156 0112 87FF      		sbrs r24,7
148
 157 0114 00C0      		rjmp .L9
149
 158 0116 8091 CE00 		lds r24,206
150
 159 011a 00C0      		rjmp .L10
151
 160               	.L9:
152
 161 011c 8091 C900 		lds r24,201
153
 162 0120 8068      		ori r24,lo8(-128)
154
 163 0122 8093 C900 		sts 201,r24
155
 164 0126 4FBF      		out 95-0x20,r20
156
 165               	/* epilogue: frame size=0 */
157
 166 0128 0895      		ret
158
 167               	/* epilogue end (size=1) */
159
 168               	/* function SpektrumUartInit size 92 (91) */
160
 170               		.lcomm Sync.0,1
161
 171               		.lcomm FrameCnt.1,1
162
 172               		.lcomm ByteHigh.2,1
163
 173               		.data
164
 176               	ReSync.3:
165
 177 0000 01        		.byte	1
166
 178               		.lcomm Frame2.4,1
167
 179               		.text
168
 180               	.global	SpektrumParser
169
 182               	SpektrumParser:
170
 183               	/* prologue: frame size=0 */
171
 184 012a EF92      		push r14
172
 185 012c FF92      		push r15
173
 186 012e 0F93      		push r16
174
 187 0130 1F93      		push r17
175
 188 0132 CF93      		push r28
176
 189 0134 DF93      		push r29
177
 190               	/* prologue end (size=6) */
178
 191 0136 482F      		mov r20,r24
179
 192 0138 00E0      		ldi r16,lo8(0)
180
 193 013a 10E0      		ldi r17,hi8(0)
181
 194 013c 8091 0000 		lds r24,ReSync.3
182
 195 0140 8130      		cpi r24,lo8(1)
183
 196 0142 01F4      		brne .L12
184
 197 0144 1092 0000 		sts ReSync.3,__zero_reg__
185
 198 0148 84E4      		ldi r24,lo8(68)
186
 199 014a 8093 0000 		sts SpektrumTimer,r24
187
 200 014e 1092 0000 		sts FrameCnt.1,__zero_reg__
188
 201 0152 1092 0000 		sts Sync.0,__zero_reg__
189
 202 0156 1092 0000 		sts ByteHigh.2,__zero_reg__
190
 203 015a 00C0      		rjmp .L11
191
 204               	.L12:
192
 205 015c 8091 0000 		lds r24,SpektrumTimer
193
 206 0160 8823      		tst r24
194
 207 0162 01F4      		brne .L14
195
 208 0164 21E0      		ldi r18,lo8(1)
196
 209 0166 30E0      		ldi r19,hi8(1)
197
 210 0168 00C0      		rjmp .L15
198
 211               	.L14:
199
 212 016a 9801      		movw r18,r16
200
 213               	.L15:
201
 214 016c 9091 0000 		lds r25,Sync.0
202
 215 0170 9923      		tst r25
203
 216 0172 01F4      		brne .L16
204
 217 0174 232B      		or r18,r19
205
 218 0176 01F0      		breq .L17
206
 219 0178 81E0      		ldi r24,lo8(1)
207
 220 017a 00C0      		rjmp .L87
208
 221               	.L17:
209
 222 017c 84E4      		ldi r24,lo8(68)
210
 223 017e 8093 0000 		sts SpektrumTimer,r24
211
 224 0182 9093 0000 		sts FrameCnt.1,r25
212
 225 0186 9093 0000 		sts Sync.0,r25
213
 226 018a 9093 0000 		sts ByteHigh.2,r25
214
 227 018e 00C0      		rjmp .L19
215
 228               	.L16:
216
 229 0190 9130      		cpi r25,lo8(1)
217
 230 0192 01F4      		brne .L20
218
 231 0194 232B      		or r18,r19
219
 232 0196 01F0      		breq .+2
220
 233 0198 00C0      		rjmp .L26
221
 234 019a 82E0      		ldi r24,lo8(2)
222
 235               	.L87:
223
 236 019c 8093 0000 		sts Sync.0,r24
224
 237 01a0 8091 0000 		lds r24,FrameCnt.1
225
 238 01a4 8F5F      		subi r24,lo8(-(1))
226
 239 01a6 8093 0000 		sts FrameCnt.1,r24
227
 240 01aa 83E0      		ldi r24,lo8(3)
228
 241 01ac 00C0      		rjmp .L85
229
 242               	.L20:
230
 243 01ae 9230      		cpi r25,lo8(2)
231
 244 01b0 01F4      		brne .L22
232
 245 01b2 232B      		or r18,r19
233
 246 01b4 01F0      		breq .+2
234
 247 01b6 00C0      		rjmp .L26
235
 248 01b8 83E0      		ldi r24,lo8(3)
236
 249 01ba 8093 0000 		sts SpektrumTimer,r24
237
 250 01be 4093 0000 		sts ByteHigh.2,r20
238
 251 01c2 9091 0000 		lds r25,FrameCnt.1
239
 252 01c6 9230      		cpi r25,lo8(2)
240
 253 01c8 01F4      		brne .L23
241
 254 01ca 1092 0000 		sts Frame2.4,__zero_reg__
242
 255 01ce 47FF      		sbrs r20,7
243
 256 01d0 00C0      		rjmp .L23
244
 257 01d2 81E0      		ldi r24,lo8(1)
245
 258 01d4 8093 0000 		sts Frame2.4,r24
246
 259               	.L23:
247
 260 01d8 83E0      		ldi r24,lo8(3)
248
 261 01da 8093 0000 		sts Sync.0,r24
249
 262 01de 9F5F      		subi r25,lo8(-(1))
250
 263 01e0 9093 0000 		sts FrameCnt.1,r25
251
 264 01e4 00C0      		rjmp .L19
252
 265               	.L22:
253
 266 01e6 9330      		cpi r25,lo8(3)
254
 267 01e8 01F0      		breq .+2
255
 268 01ea 00C0      		rjmp .L26
256
 269 01ec 232B      		or r18,r19
257
 270 01ee 01F0      		breq .+2
258
 271 01f0 00C0      		rjmp .L26
259
 272 01f2 9093 0000 		sts SpektrumTimer,r25
260
 273 01f6 82E0      		ldi r24,lo8(2)
261
 274 01f8 8093 0000 		sts Sync.0,r24
262
 275 01fc 8091 0000 		lds r24,FrameCnt.1
263
 276 0200 8F5F      		subi r24,lo8(-(1))
264
 277 0202 8093 0000 		sts FrameCnt.1,r24
265
 278 0206 2091 0000 		lds r18,ByteHigh.2
266
 279 020a 822F      		mov r24,r18
267
 280 020c 9927      		clr r25
268
 281 020e 782F      		mov r23,r24
269
 282 0210 6627      		clr r22
270
 283 0212 842F      		mov r24,r20
271
 284 0214 9927      		clr r25
272
 285 0216 682B      		or r22,r24
273
 286 0218 792B      		or r23,r25
274
 287 021a 8091 0000 		lds r24,EE_Parameter+39
275
 288 021e 8130      		cpi r24,lo8(1)
276
 289 0220 01F4      		brne .L27
277
 290 0222 7370      		andi r23,hi8(1023)
278
 291 0224 CB01      		movw r24,r22
279
 292 0226 8050      		subi r24,lo8(-(-512))
280
 293 0228 9240      		sbci r25,hi8(-(-512))
281
 294 022a 63E0      		ldi r22,lo8(3)
282
 295 022c 70E0      		ldi r23,hi8(3)
283
 296 022e 0E94 0000 		call __divmodhi4
284
 297 0232 EB01      		movw r28,r22
285
 298 0234 00C0      		rjmp .L86
286
 299               	.L27:
287
 300 0236 8230      		cpi r24,lo8(2)
288
 301 0238 01F4      		brne .L29
289
 302 023a 7770      		andi r23,hi8(2047)
290
 303 023c CB01      		movw r24,r22
291
 304 023e 8050      		subi r24,lo8(-(-1024))
292
 305 0240 9440      		sbci r25,hi8(-(-1024))
293
 306 0242 66E0      		ldi r22,lo8(6)
294
 307 0244 70E0      		ldi r23,hi8(6)
295
 308 0246 0E94 0000 		call __divmodhi4
296
 309 024a EB01      		movw r28,r22
297
 310 024c 2695      		lsr r18
298
 311 024e 2695      		lsr r18
299
 312 0250 2695      		lsr r18
300
 313 0252 00C0      		rjmp .L81
301
 314               	.L29:
302
 315 0254 EB01      		movw r28,r22
303
 316 0256 D370      		andi r29,hi8(1023)
304
 317 0258 C856      		subi r28,lo8(-(-360))
305
 318 025a D140      		sbci r29,hi8(-(-360))
306
 319 025c CE01      		movw r24,r28
307
 320 025e D7FD      		sbrc r29,7
308
 321 0260 0196      		adiw r24,1
309
 322               	.L31:
310
 323 0262 EC01      		movw r28,r24
311
 324 0264 D595      		asr r29
312
 325 0266 C795      		ror r28
313
 326               	.L86:
314
 327 0268 2695      		lsr r18
315
 328 026a 2695      		lsr r18
316
 329               	.L81:
317
 330 026c 022F      		mov r16,r18
318
 331 026e 1127      		clr r17
319
 332 0270 0F70      		andi r16,lo8(15)
320
 333 0272 1070      		andi r17,hi8(15)
321
 334 0274 0F5F      		subi r16,lo8(-(1))
322
 335 0276 1F4F      		sbci r17,hi8(-(1))
323
 336 0278 0D30      		cpi r16,13
324
 337 027a 1105      		cpc r17,__zero_reg__
325
 338 027c 00F0      		brlo .+2
326
 339 027e 00C0      		rjmp .L32
327
 340 0280 0230      		cpi r16,2
328
 341 0282 1105      		cpc r17,__zero_reg__
329
 342 0284 01F4      		brne .L33
330
 343 0286 04E0      		ldi r16,lo8(4)
331
 344 0288 10E0      		ldi r17,hi8(4)
332
 345 028a 00C0      		rjmp .L34
333
 346               	.L33:
334
 347 028c 0430      		cpi r16,4
335
 348 028e 1105      		cpc r17,__zero_reg__
336
 349 0290 01F4      		brne .L34
337
 350 0292 02E0      		ldi r16,lo8(2)
338
 351 0294 10E0      		ldi r17,hi8(2)
339
 352               	.L34:
340
 353 0296 D801      		movw r26,r16
341
 354 0298 A00F      		add r26,r16
342
 355 029a B11F      		adc r27,r17
343
 356 029c FD01      		movw r30,r26
344
 357 029e E050      		subi r30,lo8(-(PPM_in))
345
 358 02a0 F040      		sbci r31,hi8(-(PPM_in))
346
 359 02a2 8081      		ld r24,Z
347
 360 02a4 9181      		ldd r25,Z+1
348
 361 02a6 9E01      		movw r18,r28
349
 362 02a8 281B      		sub r18,r24
350
 363 02aa 390B      		sbc r19,r25
351
 364 02ac C901      		movw r24,r18
352
 365 02ae 37FF      		sbrs r19,7
353
 366 02b0 00C0      		rjmp .L37
354
 367 02b2 9095      		com r25
355
 368 02b4 8195      		neg r24
356
 369 02b6 9F4F      		sbci r25,lo8(-1)
357
 370               	.L37:
358
 371 02b8 0697      		sbiw r24,6
359
 372 02ba 04F4      		brge .L36
360
 373 02bc E091 0000 		lds r30,EE_Parameter+105
361
 374 02c0 EE23      		tst r30
362
 375 02c2 01F0      		breq .L39
363
 376 02c4 FF27      		clr r31
364
 377 02c6 EE0F      		add r30,r30
365
 378 02c8 FF1F      		adc r31,r31
366
 379 02ca E050      		subi r30,lo8(-(PPM_in))
367
 380 02cc F040      		sbci r31,hi8(-(PPM_in))
368
 381 02ce 8081      		ld r24,Z
369
 382 02d0 9181      		ldd r25,Z+1
370
 383 02d2 8436      		cpi r24,100
371
 384 02d4 9105      		cpc r25,__zero_reg__
372
 385 02d6 04F4      		brge .L36
373
 386               	.L39:
374
 387 02d8 8091 0000 		lds r24,SenderOkay
375
 388 02dc 883C      		cpi r24,lo8(-56)
376
 389 02de 00F4      		brsh .L40
377
 390 02e0 8091 0000 		lds r24,SenderOkay
378
 391 02e4 865F      		subi r24,lo8(-(10))
379
 392 02e6 8093 0000 		sts SenderOkay,r24
380
 393 02ea 00C0      		rjmp .L36
381
 394               	.L40:
382
 395 02ec 88EC      		ldi r24,lo8(-56)
383
 396 02ee 8093 0000 		sts SenderOkay,r24
384
 397 02f2 8091 6F00 		lds r24,111
385
 398 02f6 8F7D      		andi r24,lo8(-33)
386
 399 02f8 8093 6F00 		sts 111,r24
387
 400               	.L36:
388
 401 02fc A050      		subi r26,lo8(-(PPM_in))
389
 402 02fe B040      		sbci r27,hi8(-(PPM_in))
390
 403 0300 8D91      		ld r24,X+
391
 404 0302 9C91      		ld r25,X
392
 405 0304 BC01      		movw r22,r24
393
 406 0306 660F      		lsl r22
394
 407 0308 771F      		rol r23
395
 408 030a 680F      		add r22,r24
396
 409 030c 791F      		adc r23,r25
397
 410 030e 6C0F      		add r22,r28
398
 411 0310 7D1F      		adc r23,r29
399
 412 0312 77FF      		sbrs r23,7
400
 413 0314 00C0      		rjmp .L42
401
 414 0316 6D5F      		subi r22,lo8(-(3))
402
 415 0318 7F4F      		sbci r23,hi8(-(3))
403
 416               	.L42:
404
 417 031a 7B01      		movw r14,r22
405
 418 031c F594      		asr r15
406
 419 031e E794      		ror r14
407
 420 0320 F594      		asr r15
408
 421 0322 E794      		ror r14
409
 422 0324 CE01      		movw r24,r28
410
 423 0326 0196      		adiw r24,1
411
 424 0328 8E15      		cp r24,r14
412
 425 032a 9F05      		cpc r25,r15
413
 426 032c 04F4      		brge .L43
414
 427 032e 0894      		sec
415
 428 0330 E108      		sbc r14,__zero_reg__
416
 429 0332 F108      		sbc r15,__zero_reg__
417
 430 0334 00C0      		rjmp .L44
418
 431               	.L43:
419
 432 0336 CE01      		movw r24,r28
420
 433 0338 0197      		sbiw r24,1
421
 434 033a E816      		cp r14,r24
422
 435 033c F906      		cpc r15,r25
423
 436 033e 04F4      		brge .L44
424
 437 0340 0894      		sec
425
 438 0342 E11C      		adc r14,__zero_reg__
426
 439 0344 F11C      		adc r15,__zero_reg__
427
 440               	.L44:
428
 441 0346 0630      		cpi r16,6
429
 442 0348 1105      		cpc r17,__zero_reg__
430
 443 034a 01F0      		breq .+2
431
 444 034c 00C0      		rjmp .L46
432
 445 034e C536      		cpi r28,101
433
 446 0350 D105      		cpc r29,__zero_reg__
434
 447 0352 04F4      		brge .+2
435
 448 0354 00C0      		rjmp .L47
436
 449 0356 9091 0000 		lds r25,s_excnt
437
 450 035a E92F      		mov r30,r25
438
 451 035c FF27      		clr r31
439
 452 035e E050      		subi r30,lo8(-(s_exdata))
440
 453 0360 F040      		sbci r31,hi8(-(s_exdata))
441
 454 0362 E081      		ld r30,Z
442
 455 0364 ED37      		cpi r30,lo8(125)
443
 456 0366 01F4      		brne .L48
444
 457 0368 8091 0000 		lds r24,s_exparity
445
 458 036c 8095      		com r24
446
 459 036e 8093 0000 		sts s_exparity,r24
447
 460               	.L48:
448
 461 0372 9630      		cpi r25,lo8(6)
449
 462 0374 01F4      		brne .L51
450
 463 0376 8091 0000 		lds r24,s_exparity
451
 464 037a 8823      		tst r24
452
 465 037c 01F0      		breq .L52
453
 466 037e E338      		cpi r30,lo8(-125)
454
 467 0380 01F0      		breq .L50
455
 468               	.L52:
456
 469 0382 8823      		tst r24
457
 470 0384 01F0      		breq .+2
458
 471 0386 00C0      		rjmp .L49
459
 472 0388 ED37      		cpi r30,lo8(125)
460
 473 038a 01F0      		breq .L50
461
 474 038c 00C0      		rjmp .L49
462
 475               	.L51:
463
 476 038e 9930      		cpi r25,lo8(9)
464
 477 0390 01F0      		breq .+2
465
 478 0392 00C0      		rjmp .L49
466
 479 0394 8091 0000 		lds r24,s_exparity
467
 480 0398 8823      		tst r24
468
 481 039a 01F4      		brne .L80
469
 482 039c 8091 0000 		lds r24,s_exdata+9
470
 483 03a0 8338      		cpi r24,lo8(-125)
471
 484 03a2 01F0      		breq .L50
472
 485 03a4 00C0      		rjmp .L49
473
 486               	.L80:
474
 487 03a6 8091 0000 		lds r24,s_exdata+9
475
 488 03aa 8D37      		cpi r24,lo8(125)
476
 489 03ac 01F0      		breq .+2
477
 490 03ae 00C0      		rjmp .L49
478
 491               	.L50:
479
 492 03b0 8091 0000 		lds r24,s_exdata+1
480
 493 03b4 8D37      		cpi r24,lo8(125)
481
 494 03b6 01F4      		brne .L54
482
 495 03b8 8091 0000 		lds r24,s_exdata+2
483
 496 03bc 8338      		cpi r24,lo8(-125)
484
 497 03be 01F4      		brne .L55
485
 498 03c0 63E8      		ldi r22,lo8(-125)
486
 499 03c2 7FEF      		ldi r23,hi8(-125)
487
 500 03c4 00C0      		rjmp .L82
488
 501               	.L54:
489
 502 03c6 8338      		cpi r24,lo8(-125)
490
 503 03c8 01F4      		brne .L55
491
 504 03ca 8091 0000 		lds r24,s_exdata+2
492
 505 03ce 8338      		cpi r24,lo8(-125)
493
 506 03d0 01F4      		brne .L79
494
 507 03d2 60E0      		ldi r22,lo8(0)
495
 508 03d4 70E0      		ldi r23,hi8(0)
496
 509 03d6 00C0      		rjmp .L82
497
 510               	.L79:
498
 511 03d8 8D37      		cpi r24,lo8(125)
499
 512 03da 01F4      		brne .L55
500
 513 03dc 6DE7      		ldi r22,lo8(125)
501
 514 03de 70E0      		ldi r23,hi8(125)
502
 515               	.L82:
503
 516 03e0 85E0      		ldi r24,lo8(5)
504
 517 03e2 0E94 0000 		call s_update
505
 518               	.L55:
506
 519 03e6 8091 0000 		lds r24,s_exdata+3
507
 520 03ea 9927      		clr r25
508
 521 03ec 87FD      		sbrc r24,7
509
 522 03ee 9095      		com r25
510
 523 03f0 BC01      		movw r22,r24
511
 524 03f2 86E0      		ldi r24,lo8(6)
512
 525 03f4 0E94 0000 		call s_update
513
 526 03f8 8091 0000 		lds r24,s_exdata+4
514
 527 03fc 9927      		clr r25
515
 528 03fe 87FD      		sbrc r24,7
516
 529 0400 9095      		com r25
517
 530 0402 BC01      		movw r22,r24
518
 531 0404 8BE0      		ldi r24,lo8(11)
519
 532 0406 0E94 0000 		call s_update
520
 533 040a 8091 0000 		lds r24,s_exdata+5
521
 534 040e 9927      		clr r25
522
 535 0410 87FD      		sbrc r24,7
523
 536 0412 9095      		com r25
524
 537 0414 BC01      		movw r22,r24
525
 538 0416 8CE0      		ldi r24,lo8(12)
526
 539 0418 0E94 0000 		call s_update
527
 540 041c 8091 0000 		lds r24,s_excnt
528
 541 0420 8930      		cpi r24,lo8(9)
529
 542 0422 01F4      		brne .L49
530
 543 0424 8091 0000 		lds r24,s_exdata+7
531
 544 0428 8D37      		cpi r24,lo8(125)
532
 545 042a 01F4      		brne .L60
533
 546 042c 8091 0000 		lds r24,PPM_in+16
534
 547 0430 9091 0000 		lds r25,(PPM_in+16)+1
535
 548 0434 0596      		adiw r24,5
536
 549 0436 BC01      		movw r22,r24
537
 550 0438 88E0      		ldi r24,lo8(8)
538
 551 043a 0E94 0000 		call s_update
539
 552               	.L60:
540
 553 043e 8091 0000 		lds r24,s_exdata+8
541
 554 0442 8D37      		cpi r24,lo8(125)
542
 555 0444 01F4      		brne .L61
543
 556 0446 8091 0000 		lds r24,PPM_in+16
544
 557 044a 9091 0000 		lds r25,(PPM_in+16)+1
545
 558 044e 0597      		sbiw r24,5
546
 559 0450 BC01      		movw r22,r24
547
 560 0452 88E0      		ldi r24,lo8(8)
548
 561 0454 0E94 0000 		call s_update
549
 562               	.L61:
550
 563 0458 8091 0000 		lds r24,PPM_in+16
551
 564 045c 9091 0000 		lds r25,(PPM_in+16)+1
552
 565 0460 8358      		subi r24,lo8(-125)
553
 566 0462 9F4F      		sbci r25,hi8(-125)
554
 567 0464 04F4      		brge .L62
555
 568 0466 83E8      		ldi r24,lo8(-125)
556
 569 0468 9FEF      		ldi r25,hi8(-125)
557
 570 046a 00C0      		rjmp .L83
558
 571               	.L62:
559
 572 046c 8091 0000 		lds r24,PPM_in+16
560
 573 0470 9091 0000 		lds r25,(PPM_in+16)+1
561
 574 0474 8E37      		cpi r24,126
562
 575 0476 9105      		cpc r25,__zero_reg__
563
 576 0478 04F0      		brlt .L63
564
 577 047a 8DE7      		ldi r24,lo8(125)
565
 578 047c 90E0      		ldi r25,hi8(125)
566
 579               	.L83:
567
 580 047e 9093 0000 		sts (PPM_in+16)+1,r25
568
 581 0482 8093 0000 		sts PPM_in+16,r24
569
 582               	.L63:
570
 583 0486 8091 0000 		lds r24,s_exdata+6
571
 584 048a 9927      		clr r25
572
 585 048c 87FD      		sbrc r24,7
573
 586 048e 9095      		com r25
574
 587 0490 BC01      		movw r22,r24
575
 588 0492 8AE0      		ldi r24,lo8(10)
576
 589 0494 0E94 0000 		call s_update
577
 590               	.L49:
578
 591 0498 1092 0000 		sts s_excnt,__zero_reg__
579
 592 049c 1092 0000 		sts s_exparity,__zero_reg__
580
 593               	.L47:
581
 594 04a0 CA30      		cpi r28,10
582
 595 04a2 D105      		cpc r29,__zero_reg__
583
 596 04a4 04F4      		brge .L65
584
 597 04a6 8091 0000 		lds r24,s_excnt
585
 598 04aa 8F5F      		subi r24,lo8(-(1))
586
 599 04ac 8093 0000 		sts s_excnt,r24
587
 600 04b0 E82F      		mov r30,r24
588
 601 04b2 FF27      		clr r31
589
 602 04b4 E050      		subi r30,lo8(-(s_exdata))
590
 603 04b6 F040      		sbci r31,hi8(-(s_exdata))
591
 604 04b8 83E8      		ldi r24,lo8(-125)
592
 605 04ba 8083      		st Z,r24
593
 606               	.L65:
594
 607 04bc 8091 0000 		lds r24,s_excnt
595
 608 04c0 8A30      		cpi r24,lo8(10)
596
 609 04c2 01F4      		brne .L66
597
 610 04c4 1092 0000 		sts s_excnt,__zero_reg__
598
 611               	.L66:
599
 612 04c8 8FEF      		ldi r24,hi8(-100)
600
 613 04ca CC39      		cpi r28,lo8(-100)
601
 614 04cc D807      		cpc r29,r24
602
 615 04ce 04F4      		brge .L46
603
 616 04d0 8091 0000 		lds r24,s_excnt
604
 617 04d4 E82F      		mov r30,r24
605
 618 04d6 FF27      		clr r31
606
 619 04d8 E050      		subi r30,lo8(-(s_exdata))
607
 620 04da F040      		sbci r31,hi8(-(s_exdata))
608
 621 04dc 8DE7      		ldi r24,lo8(125)
609
 622 04de 8083      		st Z,r24
610
 623 04e0 8091 0000 		lds r24,s_exparity
611
 624 04e4 8095      		com r24
612
 625 04e6 8093 0000 		sts s_exparity,r24
613
 626               	.L46:
614
 627 04ea 0530      		cpi r16,5
615
 628 04ec 1105      		cpc r17,__zero_reg__
616
 629 04ee 00F4      		brsh .L68
617
 630 04f0 B701      		movw r22,r14
618
 631 04f2 802F      		mov r24,r16
619
 632 04f4 00C0      		rjmp .L84
620
 633               	.L68:
621
 634 04f6 0530      		cpi r16,5
622
 635 04f8 1105      		cpc r17,__zero_reg__
623
 636 04fa 01F4      		brne .L70
624
 637 04fc BE01      		movw r22,r28
625
 638 04fe 87E0      		ldi r24,lo8(7)
626
 639 0500 00C0      		rjmp .L84
627
 640               	.L70:
628
 641 0502 0730      		cpi r16,7
629
 642 0504 1105      		cpc r17,__zero_reg__
630
 643 0506 01F4      		brne .L19
631
 644 0508 BE01      		movw r22,r28
632
 645 050a 89E0      		ldi r24,lo8(9)
633
 646               	.L84:
634
 647 050c 0E94 0000 		call s_update
635
 648 0510 00C0      		rjmp .L19
636
 649               	.L32:
637
 650 0512 0231      		cpi r16,18
638
 651 0514 1105      		cpc r17,__zero_reg__
639
 652 0516 00F0      		brlo .L19
640
 653 0518 81E0      		ldi r24,lo8(1)
641
 654 051a 8093 0000 		sts ReSync.3,r24
642
 655 051e 00C0      		rjmp .L19
643
 656               	.L26:
644
 657 0520 81E0      		ldi r24,lo8(1)
645
 658 0522 8093 0000 		sts ReSync.3,r24
646
 659 0526 1092 0000 		sts FrameCnt.1,__zero_reg__
647
 660 052a 1092 0000 		sts Frame2.4,__zero_reg__
648
 661 052e 84E4      		ldi r24,lo8(68)
649
 662               	.L85:
650
 663 0530 8093 0000 		sts SpektrumTimer,r24
651
 664               	.L19:
652
 665 0534 8091 0000 		lds r24,FrameCnt.1
653
 666 0538 8031      		cpi r24,lo8(16)
654
 667 053a 00F0      		brlo .L11
655
 668 053c 8091 0000 		lds r24,Frame2.4
656
 669 0540 8823      		tst r24
657
 670 0542 01F4      		brne .L77
658
 671 0544 8091 0000 		lds r24,ReSync.3
659
 672 0548 8823      		tst r24
660
 673 054a 01F4      		brne .L77
661
 674 054c 8093 0000 		sts NewPpmData,r24
662
 675               	.L77:
663
 676 0550 1092 0000 		sts FrameCnt.1,__zero_reg__
664
 677 0554 1092 0000 		sts Frame2.4,__zero_reg__
665
 678 0558 1092 0000 		sts Sync.0,__zero_reg__
666
 679 055c 84E4      		ldi r24,lo8(68)
667
 680 055e 8093 0000 		sts SpektrumTimer,r24
668
 681               	.L11:
669
 682               	/* epilogue: frame size=0 */
670
 683 0562 E6E0      		ldi r30,6
671
 684 0564 CDB7      		in r28,__SP_L__
672
 685 0566 DEB7      		in r29,__SP_H__
673
 686 0568 0C94 0000 		jmp __epilogue_restores__+24
674
 687               	/* epilogue end (size=5) */
675
 688               	/* function SpektrumParser size 551 (540) */
676
 690               		.comm s_exdata,11,1
677
 691               	/* File "Spektrum.c": code  701 = 0x02bd ( 680), prologues  10, epilogues  11 */
678
DEFINED SYMBOLS
679
                            *ABS*:00000000 Spektrum.c
680
  C:\Temp/cca9yYHJ.s:3      *ABS*:0000003f __SREG__
681
  C:\Temp/cca9yYHJ.s:4      *ABS*:0000003e __SP_H__
682
  C:\Temp/cca9yYHJ.s:5      *ABS*:0000003d __SP_L__
683
  C:\Temp/cca9yYHJ.s:6      *ABS*:00000000 __tmp_reg__
684
  C:\Temp/cca9yYHJ.s:7      *ABS*:00000001 __zero_reg__
685
  C:\Temp/cca9yYHJ.s:15     .bss:00000000 s_exparity
686
  C:\Temp/cca9yYHJ.s:21     .bss:00000001 s_excnt
687
  C:\Temp/cca9yYHJ.s:27     .bss:00000002 SpektrumTimer
688
  C:\Temp/cca9yYHJ.s:32     .text:00000000 s_update
689
  C:\Temp/cca9yYHJ.s:99     .text:00000074 SpektrumUartInit
690
                             .bss:00000003 Sync.0
691
  C:\Temp/cca9yYHJ.s:170    .bss:00000004 FrameCnt.1
692
  C:\Temp/cca9yYHJ.s:171    .bss:00000005 ByteHigh.2
693
  C:\Temp/cca9yYHJ.s:176    .data:00000000 ReSync.3
694
  C:\Temp/cca9yYHJ.s:172    .bss:00000006 Frame2.4
695
  C:\Temp/cca9yYHJ.s:182    .text:0000012a SpektrumParser
696
                            *COM*:0000000b s_exdata
697
 
698
UNDEFINED SYMBOLS
699
__do_copy_data
700
__do_clear_bss
701
SenderOkay
702
PPM_in
703
__divmodhi4
704
PPM_diff
705
EE_Parameter
706
NewPpmData
707
__epilogue_restores__