Subversion Repositories FlightCtrl

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2286 - 1
   1               		.file	"jeti_ex.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	JetiExData
11
  11               		.data
12
  14               	JetiExData:
13
  15 0000 2D3D 2E4D 		.string	"-=.M_K.=-"
14
  15      5F4B 2E3D
15
  15      2D00
16
  16 000a 2020 20   		.ascii	"   "
17
  17 000d 01        		.byte	1
18
  18 000e 0000 0000 		.long	0
19
  19 0012 00        		.byte	0
20
  20 0013 566F 6C74 		.ascii	"Voltage   "
21
  20      6167 6520
22
  20      2020
23
  21 001d 5620 20   		.ascii	"V  "
24
  22 0020 01        		.byte	1
25
  23 0021 0000 0000 		.long	0
26
  24 0025 01        		.byte	1
27
  25 0026 4375 7272 		.ascii	"Current   "
28
  25      656E 7420
29
  25      2020
30
  26 0030 4120 20   		.ascii	"A  "
31
  27 0033 01        		.byte	1
32
  28 0034 0000 0000 		.long	0
33
  29 0038 01        		.byte	1
34
  30 0039 4361 7061 		.ascii	"Capacity  "
35
  30      6369 7479
36
  30      2020
37
  31 0043 4168 20   		.ascii	"Ah "
38
  32 0046 01        		.byte	1
39
  33 0047 0000 0000 		.long	0
40
  34 004b 02        		.byte	2
41
  35 004c 416C 7469 		.ascii	"Altitude  "
42
  35      7475 6465
43
  35      2020
44
  36 0056 6D20 20   		.ascii	"m  "
45
  37 0059 01        		.byte	1
46
  38 005a 0000 0000 		.long	0
47
  39 005e 00        		.byte	0
48
  40 005f 436F 6D70 		.ascii	"Compass   "
49
  40      6173 7320
50
  40      2020
51
  41 0069 B020 20   		.ascii	"\260  "
52
  42 006c 01        		.byte	1
53
  43 006d 0000 0000 		.long	0
54
  44 0071 00        		.byte	0
55
  45 0072 5361 7473 		.ascii	"Sats      "
56
  45      2020 2020
57
  45      2020
58
  46 007c 2020 20   		.ascii	"   "
59
  47 007f 01        		.byte	1
60
  48 0080 0000 0000 		.long	0
61
  49 0084 00        		.byte	0
62
  50 0085 5370 6565 		.ascii	"Speed     "
63
  50      6420 2020
64
  50      2020
65
  51 008f 6D2F 73   		.ascii	"m/s"
66
  52 0092 01        		.byte	1
67
  53 0093 0000 0000 		.long	0
68
  54 0097 00        		.byte	0
69
  55 0098 4469 7374 		.ascii	"Distance  "
70
  55      616E 6365
71
  55      2020
72
  56 00a2 6D20 20   		.ascii	"m  "
73
  57 00a5 01        		.byte	1
74
  58 00a6 0000 0000 		.long	0
75
  59 00aa 00        		.byte	0
76
  60 00ab 486F 6D65 		.ascii	"Home-Dir  "
77
  60      2D44 6972
78
  60      2020
79
  61 00b5 B020 20   		.ascii	"\260  "
80
  62 00b8 01        		.byte	1
81
  63 00b9 0000 0000 		.long	0
82
  64 00bd 00        		.byte	0
83
  65 00be 6D61 782E 		.ascii	"max.Temp. "
84
  65      5465 6D70
85
  65      2E20
86
  66 00c8 B043 20   		.ascii	"\260C "
87
  67 00cb 01        		.byte	1
88
  68 00cc 0000 0000 		.long	0
89
  69 00d0 00        		.byte	0
90
  70 00d1 4D61 676E 		.ascii	"Magn.field"
91
  70      2E66 6965
92
  70      6C64
93
  71 00db 2520 20   		.ascii	"%  "
94
  72 00de 01        		.byte	1
95
  73 00df 0000 0000 		.long	0
96
  74 00e3 00        		.byte	0
97
  75 00e4 5661 7269 		.ascii	"Vario     "
98
  75      6F20 2020
99
  75      2020
100
  76 00ee 2020 20   		.ascii	"   "
101
  77 00f1 01        		.byte	1
102
  78 00f2 0000 0000 		.long	0
103
  79 00f6 00        		.byte	0
104
  80 00f7 4572 726F 		.ascii	"ErrorCode "
105
  80      7243 6F64
106
  80      6520
107
  81 0101 2020 20   		.ascii	"   "
108
  82 0104 01        		.byte	1
109
  83 0105 0000 0000 		.long	0
110
  84 0109 00        		.byte	0
111
  85 010a 6672 6569 		.ascii	"frei      "
112
  85      2020 2020
113
  85      2020
114
  86 0114 2020 20   		.ascii	"   "
115
  87 0117 01        		.byte	1
116
  88 0118 0000 0000 		.long	0
117
  89 011c 03        		.byte	3
118
  90 011d 6672 6569 		.ascii	"frei      "
119
  90      2020 2020
120
  90      2020
121
  91 0127 2020 20   		.ascii	"   "
122
  92 012a 01        		.byte	1
123
  93 012b 0000 0000 		.long	0
124
  94 012f 03        		.byte	3
125
  95               	.global	JETI_CODE
126
  96               		.section	.progmem.data,"a",@progbits
127
  99               	JETI_CODE:
128
 100 0000 00        		.byte	0
129
 101 0001 4F        		.byte	79
130
 102 0002 50        		.byte	80
131
 103 0003 51        		.byte	81
132
 104 0004 52        		.byte	82
133
 105 0005 53        		.byte	83
134
 106 0006 54        		.byte	84
135
 107 0007 53        		.byte	83
136
 108 0008 56        		.byte	86
137
 109 0009 57        		.byte	87
138
 110 000a 48        		.byte	72
139
 111 000b 00        		.byte	0
140
 112 000c 58        		.byte	88
141
 113 000d 59        		.byte	89
142
 114 000e 00        		.byte	0
143
 115 000f 5A        		.byte	90
144
 116 0010 55        		.byte	85
145
 117 0011 45        		.byte	69
146
 118 0012 46        		.byte	70
147
 119 0013 47        		.byte	71
148
 120 0014 48        		.byte	72
149
 121 0015 41        		.byte	65
150
 122 0016 00        		.byte	0
151
 123 0017 49        		.byte	73
152
 124 0018 42        		.byte	66
153
 125 0019 4A        		.byte	74
154
 126 001a 4A        		.byte	74
155
 127 001b 00        		.byte	0
156
 128 001c 00        		.byte	0
157
 129 001d 00        		.byte	0
158
 130 001e 00        		.byte	0
159
 131 001f 00        		.byte	0
160
 132 0020 00        		.byte	0
161
 133 0021 00        		.byte	0
162
 134 0022 00        		.byte	0
163
 135 0023 00        		.byte	0
164
 136 0024 00        		.byte	0
165
 137 0025 00        		.byte	0
166
 138 0026 44        		.byte	68
167
 139 0027 4C        		.byte	76
168
 140 0028 4D        		.byte	77
169
 141 0029 00        		.byte	0
170
 142 002a 00        		.byte	0
171
 143 002b 00        		.byte	0
172
 144 002c 00        		.byte	0
173
 145 002d 00        		.byte	0
174
 146 002e 4E        		.byte	78
175
 147 002f 00        		.byte	0
176
 148 0030 00        		.byte	0
177
 149 0031 00        		.byte	0
178
 150 0032 4B        		.byte	75
179
 151 0033 00        		.byte	0
180
 152 0034 43        		.byte	67
181
 153               		.lcomm JetiVarioMeter.0,2
182
 154               		.text
183
 155               	.global	BuildJeti_Vario
184
 157               	BuildJeti_Vario:
185
 158               	/* prologue: frame size=0 */
186
 159               	/* prologue end (size=0) */
187
 160 0000 40E0      		ldi r20,lo8(0)
188
 161 0002 50E0      		ldi r21,hi8(0)
189
 162 0004 8091 0000 		lds r24,JetiVarioMeter.0
190
 163 0008 9091 0000 		lds r25,(JetiVarioMeter.0)+1
191
 164 000c 9C01      		movw r18,r24
192
 165 000e 220F      		lsl r18
193
 166 0010 331F      		rol r19
194
 167 0012 280F      		add r18,r24
195
 168 0014 391F      		adc r19,r25
196
 169 0016 8091 0000 		lds r24,VarioMeter
197
 170 001a 9091 0000 		lds r25,(VarioMeter)+1
198
 171 001e 280F      		add r18,r24
199
 172 0020 391F      		adc r19,r25
200
 173 0022 37FF      		sbrs r19,7
201
 174 0024 00C0      		rjmp .L2
202
 175 0026 2D5F      		subi r18,lo8(-(3))
203
 176 0028 3F4F      		sbci r19,hi8(-(3))
204
 177               	.L2:
205
 178 002a 3595      		asr r19
206
 179 002c 2795      		ror r18
207
 180 002e 3595      		asr r19
208
 181 0030 2795      		ror r18
209
 182 0032 3093 0000 		sts (JetiVarioMeter.0)+1,r19
210
 183 0036 2093 0000 		sts JetiVarioMeter.0,r18
211
 184 003a 8091 0000 		lds r24,VarioCharacter
212
 185 003e 8B32      		cpi r24,lo8(43)
213
 186 0040 01F4      		brne .L3
214
 187 0042 8091 0000 		lds r24,EE_Parameter+18
215
 188 0046 282F      		mov r18,r24
216
 189 0048 3327      		clr r19
217
 190 004a 8091 0000 		lds r24,AltitudeSetpointTrimming
218
 191 004e 9091 0000 		lds r25,(AltitudeSetpointTrimming)+1
219
 192 0052 829F      		mul r24,r18
220
 193 0054 A001      		movw r20,r0
221
 194 0056 839F      		mul r24,r19
222
 195 0058 500D      		add r21,r0
223
 196 005a 929F      		mul r25,r18
224
 197 005c 500D      		add r21,r0
225
 198 005e 1124      		clr r1
226
 199 0060 CA01      		movw r24,r20
227
 200 0062 57FD      		sbrc r21,7
228
 201 0064 4F96      		adiw r24,31
229
 202               	.L4:
230
 203 0066 AC01      		movw r20,r24
231
 204 0068 25E0      		ldi r18,5
232
 205 006a 5595      	1:	asr r21
233
 206 006c 4795      		ror r20
234
 207 006e 2A95      		dec r18
235
 208 0070 01F4      		brne 1b
236
 209 0072 4B5F      		subi r20,lo8(-(5))
237
 210 0074 5F4F      		sbci r21,hi8(-(5))
238
 211 0076 00C0      		rjmp .L5
239
 212               	.L3:
240
 213 0078 8D32      		cpi r24,lo8(45)
241
 214 007a 01F4      		brne .L6
242
 215 007c 8091 0000 		lds r24,EE_Parameter+18
243
 216 0080 282F      		mov r18,r24
244
 217 0082 3327      		clr r19
245
 218 0084 8091 0000 		lds r24,AltitudeSetpointTrimming
246
 219 0088 9091 0000 		lds r25,(AltitudeSetpointTrimming)+1
247
 220 008c 829F      		mul r24,r18
248
 221 008e A001      		movw r20,r0
249
 222 0090 839F      		mul r24,r19
250
 223 0092 500D      		add r21,r0
251
 224 0094 929F      		mul r25,r18
252
 225 0096 500D      		add r21,r0
253
 226 0098 1124      		clr r1
254
 227 009a CA01      		movw r24,r20
255
 228 009c 57FD      		sbrc r21,7
256
 229 009e 4F96      		adiw r24,31
257
 230               	.L7:
258
 231 00a0 AC01      		movw r20,r24
259
 232 00a2 95E0      		ldi r25,5
260
 233 00a4 5595      	1:	asr r21
261
 234 00a6 4795      		ror r20
262
 235 00a8 9A95      		dec r25
263
 236 00aa 01F4      		brne 1b
264
 237 00ac 4550      		subi r20,lo8(-(-5))
265
 238 00ae 5040      		sbci r21,hi8(-(-5))
266
 239 00b0 00C0      		rjmp .L5
267
 240               	.L6:
268
 241 00b2 8032      		cpi r24,lo8(32)
269
 242 00b4 01F4      		brne .L9
270
 243 00b6 8091 0000 		lds r24,FC_StatusFlags
271
 244 00ba 81FF      		sbrs r24,1
272
 245 00bc 00C0      		rjmp .L5
273
 246 00be C901      		movw r24,r18
274
 247 00c0 37FD      		sbrc r19,7
275
 248 00c2 4F96      		adiw r24,31
276
 249               	.L10:
277
 250 00c4 AC01      		movw r20,r24
278
 251 00c6 85E0      		ldi r24,5
279
 252 00c8 5595      	1:	asr r21
280
 253 00ca 4795      		ror r20
281
 254 00cc 8A95      		dec r24
282
 255 00ce 01F4      		brne 1b
283
 256 00d0 00C0      		rjmp .L5
284
 257               	.L9:
285
 258 00d2 8E35      		cpi r24,lo8(94)
286
 259 00d4 01F4      		brne .L12
287
 260 00d6 8091 0000 		lds r24,FromNC_AltitudeSpeed
288
 261 00da 482F      		mov r20,r24
289
 262 00dc 5527      		clr r21
290
 263 00de 00C0      		rjmp .L5
291
 264               	.L12:
292
 265 00e0 8637      		cpi r24,lo8(118)
293
 266 00e2 01F4      		brne .L5
294
 267 00e4 8091 0000 		lds r24,FromNC_AltitudeSpeed
295
 268 00e8 9927      		clr r25
296
 269 00ea 4427      		clr r20
297
 270 00ec 5527      		clr r21
298
 271 00ee 481B      		sub r20,r24
299
 272 00f0 590B      		sbc r21,r25
300
 273               	.L5:
301
 274 00f2 CA01      		movw r24,r20
302
 275 00f4 AA27      		clr r26
303
 276 00f6 97FD      		sbrc r25,7
304
 277 00f8 A095      		com r26
305
 278 00fa BA2F      		mov r27,r26
306
 279 00fc 8093 0000 		sts JetiExData+242,r24
307
 280 0100 9093 0000 		sts (JetiExData+242)+1,r25
308
 281 0104 A093 0000 		sts (JetiExData+242)+2,r26
309
 282 0108 B093 0000 		sts (JetiExData+242)+3,r27
310
 283               	/* epilogue: frame size=0 */
311
 284 010c 0895      		ret
312
 285               	/* epilogue end (size=1) */
313
 286               	/* function BuildJeti_Vario size 138 (137) */
314
 288               	.global	JetiEX_Update
315
 290               	JetiEX_Update:
316
 291               	/* prologue: frame size=0 */
317
 292 010e 0F93      		push r16
318
 293 0110 1F93      		push r17
319
 294               	/* prologue end (size=2) */
320
 295 0112 0E94 0000 		call GetHottestBl
321
 296 0116 8091 0000 		lds r24,UBat
322
 297 011a 9091 0000 		lds r25,(UBat)+1
323
 298 011e AA27      		clr r26
324
 299 0120 97FD      		sbrc r25,7
325
 300 0122 A095      		com r26
326
 301 0124 BA2F      		mov r27,r26
327
 302 0126 8093 0000 		sts JetiExData+33,r24
328
 303 012a 9093 0000 		sts (JetiExData+33)+1,r25
329
 304 012e A093 0000 		sts (JetiExData+33)+2,r26
330
 305 0132 B093 0000 		sts (JetiExData+33)+3,r27
331
 306 0136 8091 0000 		lds r24,Capacity
332
 307 013a 9091 0000 		lds r25,(Capacity)+1
333
 308 013e AA27      		clr r26
334
 309 0140 BB27      		clr r27
335
 310 0142 8093 0000 		sts JetiExData+52,r24
336
 311 0146 9093 0000 		sts (JetiExData+52)+1,r25
337
 312 014a A093 0000 		sts (JetiExData+52)+2,r26
338
 313 014e B093 0000 		sts (JetiExData+52)+3,r27
339
 314 0152 0AE0      		ldi r16,lo8(10)
340
 315 0154 10E0      		ldi r17,hi8(10)
341
 316 0156 8091 0000 		lds r24,Capacity+4
342
 317 015a 9091 0000 		lds r25,(Capacity+4)+1
343
 318 015e B801      		movw r22,r16
344
 319 0160 0E94 0000 		call __udivmodhi4
345
 320 0164 CB01      		movw r24,r22
346
 321 0166 AA27      		clr r26
347
 322 0168 BB27      		clr r27
348
 323 016a 8093 0000 		sts JetiExData+71,r24
349
 324 016e 9093 0000 		sts (JetiExData+71)+1,r25
350
 325 0172 A093 0000 		sts (JetiExData+71)+2,r26
351
 326 0176 B093 0000 		sts (JetiExData+71)+3,r27
352
 327 017a 8091 0000 		lds r24,HoehenWert
353
 328 017e 9091 0000 		lds r25,(HoehenWert)+1
354
 329 0182 A091 0000 		lds r26,(HoehenWert)+2
355
 330 0186 B091 0000 		lds r27,(HoehenWert)+3
356
 331 018a BC01      		movw r22,r24
357
 332 018c CD01      		movw r24,r26
358
 333 018e 24E6      		ldi r18,lo8(100)
359
 334 0190 30E0      		ldi r19,hi8(100)
360
 335 0192 40E0      		ldi r20,hlo8(100)
361
 336 0194 50E0      		ldi r21,hhi8(100)
362
 337 0196 0E94 0000 		call __divmodsi4
363
 338 019a 2093 0000 		sts JetiExData+90,r18
364
 339 019e 3093 0000 		sts (JetiExData+90)+1,r19
365
 340 01a2 4093 0000 		sts (JetiExData+90)+2,r20
366
 341 01a6 5093 0000 		sts (JetiExData+90)+3,r21
367
 342 01aa 8091 0000 		lds r24,KompassValue
368
 343 01ae 9091 0000 		lds r25,(KompassValue)+1
369
 344 01b2 AA27      		clr r26
370
 345 01b4 97FD      		sbrc r25,7
371
 346 01b6 A095      		com r26
372
 347 01b8 BA2F      		mov r27,r26
373
 348 01ba 8093 0000 		sts JetiExData+109,r24
374
 349 01be 9093 0000 		sts (JetiExData+109)+1,r25
375
 350 01c2 A093 0000 		sts (JetiExData+109)+2,r26
376
 351 01c6 B093 0000 		sts (JetiExData+109)+3,r27
377
 352 01ca 8091 0000 		lds r24,GPSInfo+1
378
 353 01ce 9927      		clr r25
379
 354 01d0 AA27      		clr r26
380
 355 01d2 BB27      		clr r27
381
 356 01d4 8093 0000 		sts JetiExData+128,r24
382
 357 01d8 9093 0000 		sts (JetiExData+128)+1,r25
383
 358 01dc A093 0000 		sts (JetiExData+128)+2,r26
384
 359 01e0 B093 0000 		sts (JetiExData+128)+3,r27
385
 360 01e4 8091 0000 		lds r24,GPSInfo+3
386
 361 01e8 9927      		clr r25
387
 362 01ea AA27      		clr r26
388
 363 01ec BB27      		clr r27
389
 364 01ee 8093 0000 		sts JetiExData+147,r24
390
 365 01f2 9093 0000 		sts (JetiExData+147)+1,r25
391
 366 01f6 A093 0000 		sts (JetiExData+147)+2,r26
392
 367 01fa B093 0000 		sts (JetiExData+147)+3,r27
393
 368 01fe 8091 0000 		lds r24,GPSInfo+4
394
 369 0202 9091 0000 		lds r25,(GPSInfo+4)+1
395
 370 0206 B801      		movw r22,r16
396
 371 0208 0E94 0000 		call __udivmodhi4
397
 372 020c CB01      		movw r24,r22
398
 373 020e AA27      		clr r26
399
 374 0210 BB27      		clr r27
400
 375 0212 8093 0000 		sts JetiExData+166,r24
401
 376 0216 9093 0000 		sts (JetiExData+166)+1,r25
402
 377 021a A093 0000 		sts (JetiExData+166)+2,r26
403
 378 021e B093 0000 		sts (JetiExData+166)+3,r27
404
 379 0222 8091 0000 		lds r24,GPSInfo+6
405
 380 0226 9091 0000 		lds r25,(GPSInfo+6)+1
406
 381 022a AA27      		clr r26
407
 382 022c 97FD      		sbrc r25,7
408
 383 022e A095      		com r26
409
 384 0230 BA2F      		mov r27,r26
410
 385 0232 8093 0000 		sts JetiExData+185,r24
411
 386 0236 9093 0000 		sts (JetiExData+185)+1,r25
412
 387 023a A093 0000 		sts (JetiExData+185)+2,r26
413
 388 023e B093 0000 		sts (JetiExData+185)+3,r27
414
 389 0242 8091 0000 		lds r24,MaxBlTempertaure
415
 390 0246 9927      		clr r25
416
 391 0248 AA27      		clr r26
417
 392 024a BB27      		clr r27
418
 393 024c 8093 0000 		sts JetiExData+204,r24
419
 394 0250 9093 0000 		sts (JetiExData+204)+1,r25
420
 395 0254 A093 0000 		sts (JetiExData+204)+2,r26
421
 396 0258 B093 0000 		sts (JetiExData+204)+3,r27
422
 397 025c 8091 0000 		lds r24,EarthMagneticField
423
 398 0260 9927      		clr r25
424
 399 0262 AA27      		clr r26
425
 400 0264 BB27      		clr r27
426
 401 0266 8093 0000 		sts JetiExData+223,r24
427
 402 026a 9093 0000 		sts (JetiExData+223)+1,r25
428
 403 026e A093 0000 		sts (JetiExData+223)+2,r26
429
 404 0272 B093 0000 		sts (JetiExData+223)+3,r27
430
 405 0276 8091 0000 		lds r24,NC_ErrorCode
431
 406 027a 9927      		clr r25
432
 407 027c AA27      		clr r26
433
 408 027e BB27      		clr r27
434
 409 0280 8093 0000 		sts JetiExData+261,r24
435
 410 0284 9093 0000 		sts (JetiExData+261)+1,r25
436
 411 0288 A093 0000 		sts (JetiExData+261)+2,r26
437
 412 028c B093 0000 		sts (JetiExData+261)+3,r27
438
 413               	/* epilogue: frame size=0 */
439
 414 0290 1F91      		pop r17
440
 415 0292 0F91      		pop r16
441
 416 0294 0895      		ret
442
 417               	/* epilogue end (size=3) */
443
 418               	/* function JetiEX_Update size 196 (191) */
444
 420               	/* File "jeti_ex.c": code  334 = 0x014e ( 328), prologues   2, epilogues   4 */
445
DEFINED SYMBOLS
446
                            *ABS*:00000000 jeti_ex.c
447
  C:\Temp/ccZOnWbv.s:3      *ABS*:0000003f __SREG__
448
  C:\Temp/ccZOnWbv.s:4      *ABS*:0000003e __SP_H__
449
  C:\Temp/ccZOnWbv.s:5      *ABS*:0000003d __SP_L__
450
  C:\Temp/ccZOnWbv.s:6      *ABS*:00000000 __tmp_reg__
451
  C:\Temp/ccZOnWbv.s:7      *ABS*:00000001 __zero_reg__
452
  C:\Temp/ccZOnWbv.s:14     .data:00000000 JetiExData
453
  C:\Temp/ccZOnWbv.s:99     .progmem.data:00000000 JETI_CODE
454
                             .bss:00000000 JetiVarioMeter.0
455
  C:\Temp/ccZOnWbv.s:157    .text:00000000 BuildJeti_Vario
456
  C:\Temp/ccZOnWbv.s:290    .text:0000010e JetiEX_Update
457
 
458
UNDEFINED SYMBOLS
459
__do_copy_data
460
__do_clear_bss
461
VarioMeter
462
VarioCharacter
463
EE_Parameter
464
AltitudeSetpointTrimming
465
FC_StatusFlags
466
FromNC_AltitudeSpeed
467
GetHottestBl
468
UBat
469
Capacity
470
__udivmodhi4
471
HoehenWert
472
__divmodsi4
473
KompassValue
474
GPSInfo
475
MaxBlTempertaure
476
EarthMagneticField
477
NC_ErrorCode