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