Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2248 - 1
   1               		.file	"timer0.c"
2
   2               		.arch atmega644
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	ServoRollValue
11
  11               	.global	ServoRollValue
12
  12               		.section .bss
13
  15               	ServoRollValue:
14
  16 0000 0000      		.skip 2,0
15
  17               	.global	ServoNickValue
16
  18               	.global	ServoNickValue
17
  21               	ServoNickValue:
18
  22 0002 0000      		.skip 2,0
19
  23               	.global	BeepMuster
20
  24               		.data
21
  27               	BeepMuster:
22
  28 0000 FFFF      		.word	-1
23
  29               	.global	ServoActive
24
  30               	.global	ServoActive
25
  31               		.section .bss
26
  34               	ServoActive:
27
  35 0004 00        		.skip 1,0
28
  36               	.global	SendSPI
29
  37               	.global	SendSPI
30
  40               	SendSPI:
31
  41 0005 00        		.skip 1,0
32
  42               	.global	beeptime
33
  43               	.global	beeptime
34
  46               	beeptime:
35
  47 0006 0000      		.skip 2,0
36
  48               	.global	cntKompass
37
  49               	.global	cntKompass
38
  52               	cntKompass:
39
  53 0008 0000      		.skip 2,0
40
  54               	.global	UpdateMotor
41
  55               	.global	UpdateMotor
42
  58               	UpdateMotor:
43
  59 000a 00        		.skip 1,0
44
  60               	.global	CountMilliseconds
45
  61               	.global	CountMilliseconds
46
  64               	CountMilliseconds:
47
  65 000b 0000      		.skip 2,0
48
  66               		.text
49
  67               	.global	SetDelay
50
  69               	SetDelay:
51
  70               	/* prologue: frame size=0 */
52
  71               	/* prologue end (size=0) */
53
  72 0000 2091 0000 		lds r18,CountMilliseconds
54
  73 0004 3091 0000 		lds r19,(CountMilliseconds)+1
55
  74 0008 280F      		add r18,r24
56
  75 000a 391F      		adc r19,r25
57
  76 000c C901      		movw r24,r18
58
  77 000e 0196      		adiw r24,1
59
  78               	/* epilogue: frame size=0 */
60
  79 0010 0895      		ret
61
  80               	/* epilogue end (size=1) */
62
  81               	/* function SetDelay size 9 (8) */
63
  83               	.global	Timer_Init
64
  85               	Timer_Init:
65
  86               	/* prologue: frame size=0 */
66
  87               	/* prologue end (size=0) */
67
  88 0012 8AE0      		ldi r24,lo8(10)
68
  89 0014 90E0      		ldi r25,hi8(10)
69
  90 0016 0E94 0000 		call SetDelay
70
  91 001a 9093 0000 		sts (tim_main)+1,r25
71
  92 001e 8093 0000 		sts tim_main,r24
72
  93 0022 82E0      		ldi r24,lo8(2)
73
  94 0024 85BD      		out 69-0x20,r24
74
  95 0026 83EA      		ldi r24,lo8(-93)
75
  96 0028 84BD      		out 68-0x20,r24
76
  97 002a 17BC      		out 71-0x20,__zero_reg__
77
  98 002c 88E7      		ldi r24,lo8(120)
78
  99 002e 88BD      		out 72-0x20,r24
79
 100 0030 86E0      		ldi r24,lo8(6)
80
 101 0032 86BD      		out 70-0x20,r24
81
 102 0034 8091 6E00 		lds r24,110
82
 103 0038 8160      		ori r24,lo8(1)
83
 104 003a 8093 6E00 		sts 110,r24
84
 105               	/* epilogue: frame size=0 */
85
 106 003e 0895      		ret
86
 107               	/* epilogue end (size=1) */
87
 108               	/* function Timer_Init size 23 (22) */
88
 110               	.global	CheckDelay
89
 112               	CheckDelay:
90
 113               	/* prologue: frame size=0 */
91
 114               	/* prologue end (size=0) */
92
 115 0040 2091 0000 		lds r18,CountMilliseconds
93
 116 0044 3091 0000 		lds r19,(CountMilliseconds)+1
94
 117 0048 821B      		sub r24,r18
95
 118 004a 930B      		sbc r25,r19
96
 119 004c 892F      		mov r24,r25
97
 120 004e 9927      		clr r25
98
 121 0050 8695      		lsr r24
99
 122 0052 8074      		andi r24,lo8(64)
100
 123 0054 9070      		andi r25,hi8(64)
101
 124               	/* epilogue: frame size=0 */
102
 125 0056 0895      		ret
103
 126               	/* epilogue end (size=1) */
104
 127               	/* function CheckDelay size 12 (11) */
105
 129               	.global	Delay_ms
106
 131               	Delay_ms:
107
 132               	/* prologue: frame size=0 */
108
 133 0058 CF93      		push r28
109
 134 005a DF93      		push r29
110
 135               	/* prologue end (size=2) */
111
 136 005c 0E94 0000 		call SetDelay
112
 137 0060 EC01      		movw r28,r24
113
 138               	.L5:
114
 139 0062 CE01      		movw r24,r28
115
 140 0064 0E94 0000 		call CheckDelay
116
 141 0068 8823      		tst r24
117
 142 006a 01F0      		breq .L5
118
 143               	/* epilogue: frame size=0 */
119
 144 006c DF91      		pop r29
120
 145 006e CF91      		pop r28
121
 146 0070 0895      		ret
122
 147               	/* epilogue end (size=3) */
123
 148               	/* function Delay_ms size 13 (8) */
124
 150               	.global	Delay_ms_Mess
125
 152               	Delay_ms_Mess:
126
 153               	/* prologue: frame size=0 */
127
 154 0072 1F93      		push r17
128
 155 0074 CF93      		push r28
129
 156 0076 DF93      		push r29
130
 157               	/* prologue end (size=3) */
131
 158 0078 0E94 0000 		call SetDelay
132
 159 007c EC01      		movw r28,r24
133
 160 007e 1FEC      		ldi r17,lo8(-49)
134
 161 0080 00C0      		rjmp .L17
135
 162               	.L13:
136
 163 0082 8091 0000 		lds r24,AdReady
137
 164 0086 8823      		tst r24
138
 165 0088 01F0      		breq .L17
139
 166 008a 9093 0000 		sts AdReady,r25
140
 167 008e 1093 7A00 		sts 122,r17
141
 168               	.L17:
142
 169 0092 CE01      		movw r24,r28
143
 170 0094 0E94 0000 		call CheckDelay
144
 171 0098 982F      		mov r25,r24
145
 172 009a 8823      		tst r24
146
 173 009c 01F0      		breq .L13
147
 174               	/* epilogue: frame size=0 */
148
 175 009e DF91      		pop r29
149
 176 00a0 CF91      		pop r28
150
 177 00a2 1F91      		pop r17
151
 178 00a4 0895      		ret
152
 179               	/* epilogue end (size=4) */
153
 180               	/* function Delay_ms_Mess size 26 (19) */
154
 182               		.data
155
 185               	cnt_1ms.4:
156
 186 0002 01        		.byte	1
157
 187               		.lcomm cnt.5,1
158
 188               		.text
159
 189               	.global	__vector_18
160
 191               	__vector_18:
161
 192               	/* prologue: frame size=0 */
162
 193 00a6 1F92      		push __zero_reg__
163
 194 00a8 0F92      		push __tmp_reg__
164
 195 00aa 0FB6      		in __tmp_reg__,__SREG__
165
 196 00ac 0F92      		push __tmp_reg__
166
 197 00ae 1124      		clr __zero_reg__
167
 198 00b0 2F93      		push r18
168
 199 00b2 3F93      		push r19
169
 200 00b4 5F93      		push r21
170
 201 00b6 6F93      		push r22
171
 202 00b8 7F93      		push r23
172
 203 00ba 8F93      		push r24
173
 204 00bc 9F93      		push r25
174
 205 00be AF93      		push r26
175
 206 00c0 BF93      		push r27
176
 207 00c2 EF93      		push r30
177
 208 00c4 FF93      		push r31
178
 209               	/* prologue end (size=16) */
179
 210 00c6 8091 0000 		lds r24,SendSPI
180
 211 00ca 8823      		tst r24
181
 212 00cc 01F0      		breq .L19
182
 213 00ce 8091 0000 		lds r24,SendSPI
183
 214 00d2 8150      		subi r24,lo8(-(-1))
184
 215 00d4 8093 0000 		sts SendSPI,r24
185
 216               	.L19:
186
 217 00d8 8091 0000 		lds r24,cnt.5
187
 218 00dc 8150      		subi r24,lo8(-(-1))
188
 219 00de 8F3F      		cpi r24,lo8(-1)
189
 220 00e0 01F0      		breq .L36
190
 221 00e2 8093 0000 		sts cnt.5,r24
191
 222               	.L20:
192
 223 00e6 8091 0000 		lds r24,beeptime
193
 224 00ea 9091 0000 		lds r25,(beeptime)+1
194
 225 00ee 892B      		or r24,r25
195
 226 00f0 01F0      		breq .L22
196
 227 00f2 8091 0000 		lds r24,beeptime
197
 228 00f6 9091 0000 		lds r25,(beeptime)+1
198
 229 00fa 0197      		sbiw r24,1
199
 230 00fc 9093 0000 		sts (beeptime)+1,r25
200
 231 0100 8093 0000 		sts beeptime,r24
201
 232 0104 8091 0000 		lds r24,beeptime
202
 233 0108 9091 0000 		lds r25,(beeptime)+1
203
 234 010c 2091 0000 		lds r18,BeepMuster
204
 235 0110 3091 0000 		lds r19,(BeepMuster)+1
205
 236 0114 8223      		and r24,r18
206
 237 0116 9323      		and r25,r19
207
 238 0118 892B      		or r24,r25
208
 239 011a 01F4      		brne .L37
209
 240               	.L26:
210
 241 011c 4798      		cbi 40-0x20,7
211
 242               	.L27:
212
 243 011e 8091 0000 		lds r24,EE_Parameter+8
213
 244 0122 83FF      		sbrs r24,3
214
 245 0124 00C0      		rjmp .L18
215
 246 0126 86B1      		in r24,38-0x20
216
 247 0128 9927      		clr r25
217
 248 012a FC01      		movw r30,r24
218
 249 012c E071      		andi r30,lo8(16)
219
 250 012e F070      		andi r31,hi8(16)
220
 251 0130 84FF      		sbrs r24,4
221
 252 0132 00C0      		rjmp .L29
222
 253 0134 8091 0000 		lds r24,cntKompass
223
 254 0138 9091 0000 		lds r25,(cntKompass)+1
224
 255 013c 0196      		adiw r24,1
225
 256 013e 9093 0000 		sts (cntKompass)+1,r25
226
 257 0142 8093 0000 		sts cntKompass,r24
227
 258 0146 00C0      		rjmp .L18
228
 259               	.L22:
229
 260 0148 8FEF      		ldi r24,lo8(-1)
230
 261 014a 9FEF      		ldi r25,hi8(-1)
231
 262 014c 9093 0000 		sts (BeepMuster)+1,r25
232
 263 0150 8093 0000 		sts BeepMuster,r24
233
 264 0154 00C0      		rjmp .L26
234
 265               	.L37:
235
 266 0156 479A      		sbi 40-0x20,7
236
 267 0158 00C0      		rjmp .L27
237
 268               	.L36:
238
 269 015a 89E0      		ldi r24,lo8(9)
239
 270 015c 8093 0000 		sts cnt.5,r24
240
 271 0160 8091 0000 		lds r24,cnt_1ms.4
241
 272 0164 8F5F      		subi r24,lo8(-(1))
242
 273 0166 8170      		andi r24,lo8(1)
243
 274 0168 8093 0000 		sts cnt_1ms.4,r24
244
 275 016c 8823      		tst r24
245
 276 016e 01F4      		brne .L21
246
 277 0170 81E0      		ldi r24,lo8(1)
247
 278 0172 8093 0000 		sts UpdateMotor,r24
248
 279               	.L21:
249
 280 0176 8091 0000 		lds r24,CountMilliseconds
250
 281 017a 9091 0000 		lds r25,(CountMilliseconds)+1
251
 282 017e 0196      		adiw r24,1
252
 283 0180 9093 0000 		sts (CountMilliseconds)+1,r25
253
 284 0184 8093 0000 		sts CountMilliseconds,r24
254
 285 0188 00C0      		rjmp .L20
255
 286               	.L29:
256
 287 018a 8091 0000 		lds r24,cntKompass
257
 288 018e 9091 0000 		lds r25,(cntKompass)+1
258
 289 0192 892B      		or r24,r25
259
 290 0194 01F0      		breq .L31
260
 291 0196 8091 0000 		lds r24,cntKompass
261
 292 019a 9091 0000 		lds r25,(cntKompass)+1
262
 293 019e 8A56      		subi r24,lo8(362)
263
 294 01a0 9140      		sbci r25,hi8(362)
264
 295 01a2 00F4      		brsh .L31
265
 296 01a4 8091 0000 		lds r24,cntKompass
266
 297 01a8 9091 0000 		lds r25,(cntKompass)+1
267
 298 01ac 69E2      		ldi r22,lo8(41)
268
 299 01ae 70E0      		ldi r23,hi8(41)
269
 300 01b0 0E94 0000 		call __udivmodhi4
270
 301 01b4 8091 0000 		lds r24,cntKompass
271
 302 01b8 9091 0000 		lds r25,(cntKompass)+1
272
 303 01bc 860F      		add r24,r22
273
 304 01be 971F      		adc r25,r23
274
 305 01c0 9093 0000 		sts (cntKompass)+1,r25
275
 306 01c4 8093 0000 		sts cntKompass,r24
276
 307 01c8 8091 0000 		lds r24,cntKompass
277
 308 01cc 9091 0000 		lds r25,(cntKompass)+1
278
 309 01d0 0B97      		sbiw r24,11
279
 310 01d2 00F0      		brlo .L32
280
 311 01d4 8091 0000 		lds r24,cntKompass
281
 312 01d8 9091 0000 		lds r25,(cntKompass)+1
282
 313 01dc 0A97      		sbiw r24,10
283
 314 01de 9093 0000 		sts (KompassValue)+1,r25
284
 315 01e2 8093 0000 		sts KompassValue,r24
285
 316               	.L31:
286
 317 01e6 8091 0000 		lds r24,KompassValue
287
 318 01ea 9091 0000 		lds r25,(KompassValue)+1
288
 319 01ee 2091 0000 		lds r18,KompassStartwert
289
 320 01f2 3091 0000 		lds r19,(KompassStartwert)+1
290
 321 01f6 821B      		sub r24,r18
291
 322 01f8 930B      		sbc r25,r19
292
 323 01fa 845E      		subi r24,lo8(-(540))
293
 324 01fc 9D4F      		sbci r25,hi8(-(540))
294
 325 01fe 68E6      		ldi r22,lo8(360)
295
 326 0200 71E0      		ldi r23,hi8(360)
296
 327 0202 0E94 0000 		call __divmodhi4
297
 328 0206 845B      		subi r24,lo8(-(-180))
298
 329 0208 9040      		sbci r25,hi8(-(-180))
299
 330 020a 9093 0000 		sts (KompassRichtung)+1,r25
300
 331 020e 8093 0000 		sts KompassRichtung,r24
301
 332 0212 1092 0000 		sts (cntKompass)+1,__zero_reg__
302
 333 0216 1092 0000 		sts cntKompass,__zero_reg__
303
 334 021a 00C0      		rjmp .L18
304
 335               	.L32:
305
 336 021c F093 0000 		sts (KompassValue)+1,r31
306
 337 0220 E093 0000 		sts KompassValue,r30
307
 338 0224 00C0      		rjmp .L31
308
 339               	.L18:
309
 340               	/* epilogue: frame size=0 */
310
 341 0226 FF91      		pop r31
311
 342 0228 EF91      		pop r30
312
 343 022a BF91      		pop r27
313
 344 022c AF91      		pop r26
314
 345 022e 9F91      		pop r25
315
 346 0230 8F91      		pop r24
316
 347 0232 7F91      		pop r23
317
 348 0234 6F91      		pop r22
318
 349 0236 5F91      		pop r21
319
 350 0238 3F91      		pop r19
320
 351 023a 2F91      		pop r18
321
 352 023c 0F90      		pop __tmp_reg__
322
 353 023e 0FBE      		out __SREG__,__tmp_reg__
323
 354 0240 0F90      		pop __tmp_reg__
324
 355 0242 1F90      		pop __zero_reg__
325
 356 0244 1895      		reti
326
 357               	/* epilogue end (size=16) */
327
 358               	/* function __vector_18 size 210 (178) */
328
 360               	.global	TIMER2_Init
329
 362               	TIMER2_Init:
330
 363               	/* prologue: frame size=0 */
331
 364               	/* prologue end (size=0) */
332
 365 0246 9FB7      		in r25,95-0x20
333
 366               	/* #APP */
334
 367 0248 F894      		cli
335
 368               	/* #NOAPP */
336
 369 024a 5F98      		cbi 43-0x20,7
337
 370 024c 3E9A      		sbi 39-0x20,6
338
 371 024e 469A      		sbi 40-0x20,6
339
 372 0250 8091 B000 		lds r24,176
340
 373 0254 8F70      		andi r24,lo8(15)
341
 374 0256 8093 B000 		sts 176,r24
342
 375 025a 8091 B000 		lds r24,176
343
 376 025e 8360      		ori r24,lo8(3)
344
 377 0260 8093 B000 		sts 176,r24
345
 378 0264 8091 B100 		lds r24,177
346
 379 0268 8B73      		andi r24,lo8(59)
347
 380 026a 8093 B100 		sts 177,r24
348
 381 026e 8091 B100 		lds r24,177
349
 382 0272 8B60      		ori r24,lo8(11)
350
 383 0274 8093 B100 		sts 177,r24
351
 384 0278 1092 B200 		sts 178,__zero_reg__
352
 385 027c 8FEF      		ldi r24,lo8(-1)
353
 386 027e 8093 B300 		sts 179,r24
354
 387 0282 8091 B000 		lds r24,176
355
 388 0286 8068      		ori r24,lo8(-128)
356
 389 0288 8093 B000 		sts 176,r24
357
 390 028c 8091 7000 		lds r24,112
358
 391 0290 8A7F      		andi r24,lo8(-6)
359
 392 0292 8093 7000 		sts 112,r24
360
 393 0296 8091 7000 		lds r24,112
361
 394 029a 8260      		ori r24,lo8(2)
362
 395 029c 8093 7000 		sts 112,r24
363
 396 02a0 9FBF      		out 95-0x20,r25
364
 397               	/* epilogue: frame size=0 */
365
 398 02a2 0895      		ret
366
 399               	/* epilogue end (size=1) */
367
 400               	/* function TIMER2_Init size 48 (47) */
368
 402               		.lcomm PulseOutput.0,1
369
 403               		.lcomm RemainingPulse.1,2
370
 404               		.lcomm ServoFrameTime.2,2
371
 405               		.data
372
 408               	ServoNickOffset.3:
373
 409 0003 FC01      		.word	508
374
 410               		.text
375
 411               	.global	__vector_9
376
 413               	__vector_9:
377
 414               	/* prologue: frame size=0 */
378
 415 02a4 1F92      		push __zero_reg__
379
 416 02a6 0F92      		push __tmp_reg__
380
 417 02a8 0FB6      		in __tmp_reg__,__SREG__
381
 418 02aa 0F92      		push __tmp_reg__
382
 419 02ac 1124      		clr __zero_reg__
383
 420 02ae 2F93      		push r18
384
 421 02b0 3F93      		push r19
385
 422 02b2 4F93      		push r20
386
 423 02b4 5F93      		push r21
387
 424 02b6 6F93      		push r22
388
 425 02b8 7F93      		push r23
389
 426 02ba 8F93      		push r24
390
 427 02bc 9F93      		push r25
391
 428 02be AF93      		push r26
392
 429 02c0 BF93      		push r27
393
 430 02c2 EF93      		push r30
394
 431 02c4 FF93      		push r31
395
 432               	/* prologue end (size=17) */
396
 433 02c6 8091 0000 		lds r24,PulseOutput.0
397
 434 02ca 8823      		tst r24
398
 435 02cc 01F4      		brne .L63
399
 436 02ce 8091 B000 		lds r24,176
400
 437 02d2 86FD      		sbrc r24,6
401
 438 02d4 00C0      		rjmp .L69
402
 439 02d6 8091 B000 		lds r24,176
403
 440 02da 8064      		ori r24,lo8(64)
404
 441 02dc 8093 B000 		sts 176,r24
405
 442 02e0 8091 0000 		lds r24,EE_Parameter+47
406
 443 02e4 282F      		mov r18,r24
407
 444 02e6 3327      		clr r19
408
 445 02e8 8DED      		ldi r24,lo8(1757)
409
 446 02ea 96E0      		ldi r25,hi8(1757)
410
 447 02ec 289F      		mul r18,r24
411
 448 02ee A001      		movw r20,r0
412
 449 02f0 299F      		mul r18,r25
413
 450 02f2 500D      		add r21,r0
414
 451 02f4 389F      		mul r19,r24
415
 452 02f6 500D      		add r21,r0
416
 453 02f8 1124      		clr r1
417
 454 02fa CA01      		movw r24,r20
418
 455 02fc 2091 0000 		lds r18,ServoFrameTime.2
419
 456 0300 3091 0000 		lds r19,(ServoFrameTime.2)+1
420
 457 0304 821B      		sub r24,r18
421
 458 0306 930B      		sbc r25,r19
422
 459 0308 9093 0000 		sts (RemainingPulse.1)+1,r25
423
 460 030c 8093 0000 		sts RemainingPulse.1,r24
424
 461 0310 9C01      		movw r18,r24
425
 462               	.L56:
426
 463 0312 81E0      		ldi r24,lo8(1)
427
 464 0314 8093 0000 		sts PulseOutput.0,r24
428
 465 0318 51E0      		ldi r21,hi8(383)
429
 466 031a 2F37      		cpi r18,lo8(383)
430
 467 031c 3507      		cpc r19,r21
431
 468 031e 00F4      		brsh .L70
432
 469               	.L57:
433
 470 0320 2F3F      		cpi r18,255
434
 471 0322 3105      		cpc r19,__zero_reg__
435
 472 0324 01F0      		breq .L59
436
 473 0326 00F0      		brlo .L59
437
 474 0328 A901      		movw r20,r18
438
 475 032a 4F5F      		subi r20,lo8(-(-255))
439
 476 032c 5040      		sbci r21,hi8(-(-255))
440
 477 032e 4F37      		cpi r20,127
441
 478 0330 5105      		cpc r21,__zero_reg__
442
 479 0332 00F0      		brlo .+2
443
 480 0334 00C0      		rjmp .L60
444
 481 0336 80E8      		ldi r24,lo8(-128)
445
 482 0338 8093 B300 		sts 179,r24
446
 483 033c 2058      		subi r18,lo8(-(-128))
447
 484 033e 3040      		sbci r19,hi8(-(-128))
448
 485 0340 00C0      		rjmp .L68
449
 486               	.L63:
450
 487 0342 2091 0000 		lds r18,RemainingPulse.1
451
 488 0346 3091 0000 		lds r19,(RemainingPulse.1)+1
452
 489 034a 51E0      		ldi r21,hi8(383)
453
 490 034c 2F37      		cpi r18,lo8(383)
454
 491 034e 3507      		cpc r19,r21
455
 492 0350 00F0      		brlo .L57
456
 493               	.L70:
457
 494 0352 8FEF      		ldi r24,lo8(-1)
458
 495 0354 8093 B300 		sts 179,r24
459
 496 0358 2F5F      		subi r18,lo8(-(-255))
460
 497 035a 3040      		sbci r19,hi8(-(-255))
461
 498               	.L68:
462
 499 035c 3093 0000 		sts (RemainingPulse.1)+1,r19
463
 500 0360 2093 0000 		sts RemainingPulse.1,r18
464
 501 0364 00C0      		rjmp .L39
465
 502               	.L59:
466
 503 0366 8091 0000 		lds r24,RemainingPulse.1
467
 504 036a 8093 B300 		sts 179,r24
468
 505 036e 1092 0000 		sts (RemainingPulse.1)+1,__zero_reg__
469
 506 0372 1092 0000 		sts RemainingPulse.1,__zero_reg__
470
 507 0376 1092 0000 		sts PulseOutput.0,__zero_reg__
471
 508 037a 00C0      		rjmp .L39
472
 509               	.L69:
473
 510 037c 8091 B000 		lds r24,176
474
 511 0380 8F7B      		andi r24,lo8(-65)
475
 512 0382 8093 B000 		sts 176,r24
476
 513 0386 89EA      		ldi r24,lo8(937)
477
 514 0388 93E0      		ldi r25,hi8(937)
478
 515 038a 9093 0000 		sts (RemainingPulse.1)+1,r25
479
 516 038e 8093 0000 		sts RemainingPulse.1,r24
480
 517 0392 8091 0000 		lds r24,ServoNickOffset.3
481
 518 0396 9091 0000 		lds r25,(ServoNickOffset.3)+1
482
 519 039a 9C01      		movw r18,r24
483
 520 039c 220F      		lsl r18
484
 521 039e 331F      		rol r19
485
 522 03a0 280F      		add r18,r24
486
 523 03a2 391F      		adc r19,r25
487
 524 03a4 8091 0000 		lds r24,Parameter_ServoNickControl
488
 525 03a8 9927      		clr r25
489
 526 03aa 880F      		lsl r24
490
 527 03ac 991F      		rol r25
491
 528 03ae 880F      		lsl r24
492
 529 03b0 991F      		rol r25
493
 530 03b2 280F      		add r18,r24
494
 531 03b4 391F      		adc r19,r25
495
 532 03b6 37FD      		sbrc r19,7
496
 533 03b8 00C0      		rjmp .L71
497
 534               	.L42:
498
 535 03ba C901      		movw r24,r18
499
 536 03bc 9595      		asr r25
500
 537 03be 8795      		ror r24
501
 538 03c0 9595      		asr r25
502
 539 03c2 8795      		ror r24
503
 540 03c4 9093 0000 		sts (ServoNickOffset.3)+1,r25
504
 541 03c8 8093 0000 		sts ServoNickOffset.3,r24
505
 542 03cc 9093 0000 		sts (ServoNickValue)+1,r25
506
 543 03d0 8093 0000 		sts ServoNickValue,r24
507
 544 03d4 8091 0000 		lds r24,EE_Parameter+87
508
 545 03d8 80FF      		sbrs r24,0
509
 546 03da 00C0      		rjmp .L43
510
 547 03dc 8091 0000 		lds r24,EE_Parameter+40
511
 548 03e0 682F      		mov r22,r24
512
 549 03e2 7727      		clr r23
513
 550 03e4 8827      		clr r24
514
 551 03e6 9927      		clr r25
515
 552 03e8 2091 0000 		lds r18,IntegralNick
516
 553 03ec 3091 0000 		lds r19,(IntegralNick)+1
517
 554 03f0 4091 0000 		lds r20,(IntegralNick)+2
518
 555 03f4 5091 0000 		lds r21,(IntegralNick)+3
519
 556 03f8 57FD      		sbrc r21,7
520
 557 03fa 00C0      		rjmp .L72
521
 558               	.L44:
522
 559 03fc A7E0      		ldi r26,7
523
 560 03fe 5595      	1:	asr r21
524
 561 0400 4795      		ror r20
525
 562 0402 3795      		ror r19
526
 563 0404 2795      		ror r18
527
 564 0406 AA95      		dec r26
528
 565 0408 01F4      		brne 1b
529
 566 040a 0E94 0000 		call __mulsi3
530
 567 040e 9B01      		movw r18,r22
531
 568 0410 AC01      		movw r20,r24
532
 569 0412 97FD      		sbrc r25,7
533
 570 0414 00C0      		rjmp .L73
534
 571               	.L45:
535
 572 0416 F6E0      		ldi r31,6
536
 573 0418 5595      	1:	asr r21
537
 574 041a 4795      		ror r20
538
 575 041c 3795      		ror r19
539
 576 041e 2795      		ror r18
540
 577 0420 FA95      		dec r31
541
 578 0422 01F4      		brne 1b
542
 579 0424 8091 0000 		lds r24,ServoNickValue
543
 580 0428 9091 0000 		lds r25,(ServoNickValue)+1
544
 581 042c 820F      		add r24,r18
545
 582 042e 931F      		adc r25,r19
546
 583               	.L65:
547
 584 0430 9093 0000 		sts (ServoNickValue)+1,r25
548
 585 0434 8093 0000 		sts ServoNickValue,r24
549
 586 0438 8091 0000 		lds r24,EE_Parameter+41
550
 587 043c 282F      		mov r18,r24
551
 588 043e 3327      		clr r19
552
 589 0440 220F      		lsl r18
553
 590 0442 331F      		rol r19
554
 591 0444 220F      		lsl r18
555
 592 0446 331F      		rol r19
556
 593 0448 8091 0000 		lds r24,ServoNickValue
557
 594 044c 9091 0000 		lds r25,(ServoNickValue)+1
558
 595 0450 8217      		cp r24,r18
559
 596 0452 9307      		cpc r25,r19
560
 597 0454 04F0      		brlt .L66
561
 598 0456 8091 0000 		lds r24,EE_Parameter+42
562
 599 045a 282F      		mov r18,r24
563
 600 045c 3327      		clr r19
564
 601 045e 220F      		lsl r18
565
 602 0460 331F      		rol r19
566
 603 0462 220F      		lsl r18
567
 604 0464 331F      		rol r19
568
 605 0466 8091 0000 		lds r24,ServoNickValue
569
 606 046a 9091 0000 		lds r25,(ServoNickValue)+1
570
 607 046e 2817      		cp r18,r24
571
 608 0470 3907      		cpc r19,r25
572
 609 0472 04F4      		brge .L50
573
 610               	.L66:
574
 611 0474 3093 0000 		sts (ServoNickValue)+1,r19
575
 612 0478 2093 0000 		sts ServoNickValue,r18
576
 613               	.L50:
577
 614 047c 2091 0000 		lds r18,ServoNickValue
578
 615 0480 3091 0000 		lds r19,(ServoNickValue)+1
579
 616 0484 8091 0000 		lds r24,RemainingPulse.1
580
 617 0488 9091 0000 		lds r25,(RemainingPulse.1)+1
581
 618 048c 280F      		add r18,r24
582
 619 048e 391F      		adc r19,r25
583
 620 0490 2050      		subi r18,lo8(-(-512))
584
 621 0492 3240      		sbci r19,hi8(-(-512))
585
 622 0494 8091 0000 		lds r24,ServoNickValue
586
 623 0498 9091 0000 		lds r25,(ServoNickValue)+1
587
 624 049c 97FD      		sbrc r25,7
588
 625 049e 00C0      		rjmp .L74
589
 626               	.L52:
590
 627 04a0 9595      		asr r25
591
 628 04a2 8795      		ror r24
592
 629 04a4 9595      		asr r25
593
 630 04a6 8795      		ror r24
594
 631 04a8 9093 0000 		sts (ServoNickValue)+1,r25
595
 632 04ac 8093 0000 		sts ServoNickValue,r24
596
 633 04b0 45E0      		ldi r20,hi8(1501)
597
 634 04b2 2D3D      		cpi r18,lo8(1501)
598
 635 04b4 3407      		cpc r19,r20
599
 636 04b6 00F4      		brsh .+2
600
 637 04b8 00C0      		rjmp .L53
601
 638 04ba 8CED      		ldi r24,lo8(1500)
602
 639 04bc 95E0      		ldi r25,hi8(1500)
603
 640               	.L67:
604
 641 04be 9093 0000 		sts (RemainingPulse.1)+1,r25
605
 642 04c2 8093 0000 		sts RemainingPulse.1,r24
606
 643               	.L54:
607
 644 04c6 2091 0000 		lds r18,RemainingPulse.1
608
 645 04ca 3091 0000 		lds r19,(RemainingPulse.1)+1
609
 646 04ce 3093 0000 		sts (ServoFrameTime.2)+1,r19
610
 647 04d2 2093 0000 		sts ServoFrameTime.2,r18
611
 648 04d6 00C0      		rjmp .L56
612
 649               	.L60:
613
 650 04d8 8FEF      		ldi r24,lo8(-1)
614
 651 04da 8093 B300 		sts 179,r24
615
 652 04de 5093 0000 		sts (RemainingPulse.1)+1,r21
616
 653 04e2 4093 0000 		sts RemainingPulse.1,r20
617
 654 04e6 00C0      		rjmp .L39
618
 655               	.L71:
619
 656 04e8 2D5F      		subi r18,lo8(-(3))
620
 657 04ea 3F4F      		sbci r19,hi8(-(3))
621
 658 04ec 00C0      		rjmp .L42
622
 659               	.L43:
623
 660 04ee 8091 0000 		lds r24,EE_Parameter+40
624
 661 04f2 682F      		mov r22,r24
625
 662 04f4 7727      		clr r23
626
 663 04f6 8827      		clr r24
627
 664 04f8 9927      		clr r25
628
 665 04fa 2091 0000 		lds r18,IntegralNick
629
 666 04fe 3091 0000 		lds r19,(IntegralNick)+1
630
 667 0502 4091 0000 		lds r20,(IntegralNick)+2
631
 668 0506 5091 0000 		lds r21,(IntegralNick)+3
632
 669 050a 57FD      		sbrc r21,7
633
 670 050c 00C0      		rjmp .L75
634
 671               	.L47:
635
 672 050e E7E0      		ldi r30,7
636
 673 0510 5595      	1:	asr r21
637
 674 0512 4795      		ror r20
638
 675 0514 3795      		ror r19
639
 676 0516 2795      		ror r18
640
 677 0518 EA95      		dec r30
641
 678 051a 01F4      		brne 1b
642
 679 051c 0E94 0000 		call __mulsi3
643
 680 0520 9B01      		movw r18,r22
644
 681 0522 AC01      		movw r20,r24
645
 682 0524 97FD      		sbrc r25,7
646
 683 0526 00C0      		rjmp .L76
647
 684               	.L48:
648
 685 0528 76E0      		ldi r23,6
649
 686 052a 5595      	1:	asr r21
650
 687 052c 4795      		ror r20
651
 688 052e 3795      		ror r19
652
 689 0530 2795      		ror r18
653
 690 0532 7A95      		dec r23
654
 691 0534 01F4      		brne 1b
655
 692 0536 8091 0000 		lds r24,ServoNickValue
656
 693 053a 9091 0000 		lds r25,(ServoNickValue)+1
657
 694 053e 821B      		sub r24,r18
658
 695 0540 930B      		sbc r25,r19
659
 696 0542 00C0      		rjmp .L65
660
 697               	.L53:
661
 698 0544 51E0      		ldi r21,hi8(375)
662
 699 0546 2737      		cpi r18,lo8(375)
663
 700 0548 3507      		cpc r19,r21
664
 701 054a 00F4      		brsh .L64
665
 702 054c 87E7      		ldi r24,lo8(375)
666
 703 054e 91E0      		ldi r25,hi8(375)
667
 704 0550 00C0      		rjmp .L67
668
 705               	.L64:
669
 706 0552 3093 0000 		sts (RemainingPulse.1)+1,r19
670
 707 0556 2093 0000 		sts RemainingPulse.1,r18
671
 708 055a 00C0      		rjmp .L54
672
 709               	.L74:
673
 710 055c 0396      		adiw r24,3
674
 711 055e 00C0      		rjmp .L52
675
 712               	.L72:
676
 713 0560 2158      		subi r18,lo8(-(127))
677
 714 0562 3F4F      		sbci r19,hi8(-(127))
678
 715 0564 4F4F      		sbci r20,hlo8(-(127))
679
 716 0566 5F4F      		sbci r21,hhi8(-(127))
680
 717 0568 00C0      		rjmp .L44
681
 718               	.L76:
682
 719 056a 215C      		subi r18,lo8(-(63))
683
 720 056c 3F4F      		sbci r19,hi8(-(63))
684
 721 056e 4F4F      		sbci r20,hlo8(-(63))
685
 722 0570 5F4F      		sbci r21,hhi8(-(63))
686
 723 0572 00C0      		rjmp .L48
687
 724               	.L75:
688
 725 0574 2158      		subi r18,lo8(-(127))
689
 726 0576 3F4F      		sbci r19,hi8(-(127))
690
 727 0578 4F4F      		sbci r20,hlo8(-(127))
691
 728 057a 5F4F      		sbci r21,hhi8(-(127))
692
 729 057c 00C0      		rjmp .L47
693
 730               	.L73:
694
 731 057e 215C      		subi r18,lo8(-(63))
695
 732 0580 3F4F      		sbci r19,hi8(-(63))
696
 733 0582 4F4F      		sbci r20,hlo8(-(63))
697
 734 0584 5F4F      		sbci r21,hhi8(-(63))
698
 735 0586 00C0      		rjmp .L45
699
 736               	.L39:
700
 737               	/* epilogue: frame size=0 */
701
 738 0588 FF91      		pop r31
702
 739 058a EF91      		pop r30
703
 740 058c BF91      		pop r27
704
 741 058e AF91      		pop r26
705
 742 0590 9F91      		pop r25
706
 743 0592 8F91      		pop r24
707
 744 0594 7F91      		pop r23
708
 745 0596 6F91      		pop r22
709
 746 0598 5F91      		pop r21
710
 747 059a 4F91      		pop r20
711
 748 059c 3F91      		pop r19
712
 749 059e 2F91      		pop r18
713
 750 05a0 0F90      		pop __tmp_reg__
714
 751 05a2 0FBE      		out __SREG__,__tmp_reg__
715
 752 05a4 0F90      		pop __tmp_reg__
716
 753 05a6 1F90      		pop __zero_reg__
717
 754 05a8 1895      		reti
718
 755               	/* epilogue end (size=17) */
719
 756               	/* function __vector_9 size 387 (353) */
720
 758               		.comm Mixer,77,1
721
 759               		.lcomm tim_main,2
722
 760               	/* File "timer0.c": code  728 = 0x02d8 ( 646), prologues  38, epilogues  44 */
723
DEFINED SYMBOLS
724
                            *ABS*:00000000 timer0.c
725
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:3      *ABS*:0000003f __SREG__
726
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:4      *ABS*:0000003e __SP_H__
727
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:5      *ABS*:0000003d __SP_L__
728
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:6      *ABS*:00000000 __tmp_reg__
729
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:7      *ABS*:00000001 __zero_reg__
730
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:15     .bss:00000000 ServoRollValue
731
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:21     .bss:00000002 ServoNickValue
732
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:27     .data:00000000 BeepMuster
733
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:34     .bss:00000004 ServoActive
734
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:40     .bss:00000005 SendSPI
735
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:46     .bss:00000006 beeptime
736
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:52     .bss:00000008 cntKompass
737
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:58     .bss:0000000a UpdateMotor
738
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:64     .bss:0000000b CountMilliseconds
739
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:69     .text:00000000 SetDelay
740
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:85     .text:00000012 Timer_Init
741
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:404    .bss:00000013 tim_main
742
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:112    .text:00000040 CheckDelay
743
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:131    .text:00000058 Delay_ms
744
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:152    .text:00000072 Delay_ms_Mess
745
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:185    .data:00000002 cnt_1ms.4
746
                             .bss:0000000d cnt.5
747
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:191    .text:000000a6 __vector_18
748
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:362    .text:00000246 TIMER2_Init
749
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:187    .bss:0000000e PulseOutput.0
750
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:402    .bss:0000000f RemainingPulse.1
751
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:403    .bss:00000011 ServoFrameTime.2
752
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:408    .data:00000003 ServoNickOffset.3
753
C:\Users\Bernd\AppData\Local\Temp/ccrsFYQE.s:413    .text:000002a4 __vector_9
754
                            *COM*:0000004d Mixer
755
 
756
UNDEFINED SYMBOLS
757
__do_copy_data
758
__do_clear_bss
759
AdReady
760
EE_Parameter
761
__udivmodhi4
762
KompassValue
763
KompassStartwert
764
__divmodhi4
765
KompassRichtung
766
Parameter_ServoNickControl
767
IntegralNick
768
__mulsi3