Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

   1                            .file   "altcon.c"
   2                    __SREG__ = 0x3f
   3                    __SP_H__ = 0x3e
   4                    __SP_L__ = 0x3d
   5                    __CCP__  = 0x34
   6                    __tmp_reg__ = 0
   7                    __zero_reg__ = 1
   8                            .global __do_copy_data
   9                            .global __do_clear_bss
  10                            .text
  11                    .global altcon_init
  13                    altcon_init:
  14                    /* prologue: function */
  15                    /* frame size = 0 */
  16 0000 1092 0000             sts enabled,__zero_reg__
  17 0004 84EF                  ldi r24,lo8(500)
  18 0006 91E0                  ldi r25,hi8(500)
  19 0008 9093 0000             sts (beeptime)+1,r25
  20 000c 8093 0000             sts beeptime,r24
  21                    /* epilogue start */
  22 0010 0895                  ret
  24                    .global altcon_lock
  26                    altcon_lock:
  27                    /* prologue: function */
  28                    /* frame size = 0 */
  29 0012 8091 0000             lds r24,airPressure
  30 0016 9091 0000             lds r25,(airPressure)+1
  31 001a 9093 0000             sts (pressureOffset)+1,r25
  32 001e 8093 0000             sts pressureOffset,r24
  33                    /* epilogue start */
  34 0022 0895                  ret
  36                    .global altcon_start
  38                    altcon_start:
  39                    /* prologue: function */
  40                    /* frame size = 0 */
  41 0024 6091 0000             lds r22,Mess_Integral_Hoch
  42 0028 7091 0000             lds r23,(Mess_Integral_Hoch)+1
  43 002c 8091 0000             lds r24,(Mess_Integral_Hoch)+2
  44 0030 9091 0000             lds r25,(Mess_Integral_Hoch)+3
  45 0034 20E8                  ldi r18,lo8(128)
  46 0036 30E0                  ldi r19,hi8(128)
  47 0038 40E0                  ldi r20,hlo8(128)
  48 003a 50E0                  ldi r21,hhi8(128)
  49 003c 0E94 0000             call __divmodsi4
  50 0040 3093 0000             sts (accZOffset)+1,r19
  51 0044 2093 0000             sts accZOffset,r18
  52 0048 1092 0000             sts (lastError)+1,__zero_reg__
  53 004c 1092 0000             sts lastError,__zero_reg__
  54 0050 1092 0000             sts (lastN)+1,__zero_reg__
  55 0054 1092 0000             sts lastN,__zero_reg__
  56 0058 1092 0000             sts (averageN)+1,__zero_reg__
  57 005c 1092 0000             sts averageN,__zero_reg__
  58 0060 1092 0000             sts altIntegral,__zero_reg__
  59 0064 1092 0000             sts (altIntegral)+1,__zero_reg__
  60 0068 1092 0000             sts (altIntegral)+2,__zero_reg__
  61 006c 1092 0000             sts (altIntegral)+3,__zero_reg__
  62 0070 84EF                  ldi r24,lo8(500)
  63 0072 91E0                  ldi r25,hi8(500)
  64 0074 9093 0000             sts (beeptime)+1,r25
  65 0078 8093 0000             sts beeptime,r24
  66                    /* epilogue start */
  67 007c 0895                  ret
  69                    .global altcon_stop
  71                    altcon_stop:
  72                    /* prologue: function */
  73                    /* frame size = 0 */
  74 007e 1092 0000             sts enabled,__zero_reg__
  75 0082 84EF                  ldi r24,lo8(500)
  76 0084 91E0                  ldi r25,hi8(500)
  77 0086 9093 0000             sts (beeptime)+1,r25
  78 008a 8093 0000             sts beeptime,r24
  79                    /* epilogue start */
  80 008e 0895                  ret
  82                    .global altcon_error
  84                    altcon_error:
  85 0090 9F92                  push r9
  86 0092 AF92                  push r10
  87 0094 BF92                  push r11
  88 0096 CF92                  push r12
  89 0098 DF92                  push r13
  90 009a EF92                  push r14
  91 009c FF92                  push r15
  92 009e 0F93                  push r16
  93 00a0 1F93                  push r17
  94 00a2 CF93                  push r28
  95 00a4 DF93                  push r29
  96                    /* prologue: function */
  97                    /* frame size = 0 */
  98 00a6 8091 0000             lds r24,enabled
  99 00aa 8823                  tst r24
 100 00ac 01F4                  brne .+2
 101 00ae 00C0                  rjmp .L10
 102 00b0 8091 0000             lds r24,Notlandung
 103 00b4 8823                  tst r24
 104 00b6 01F0                  breq .+2
 105 00b8 00C0                  rjmp .L10
 106 00ba E090 0000             lds r14,airPressure
 107 00be F090 0000             lds r15,(airPressure)+1
 108 00c2 8091 0000             lds r24,pressureOffset
 109 00c6 9091 0000             lds r25,(pressureOffset)+1
 110 00ca E81A                  sub r14,r24
 111 00cc F90A                  sbc r15,r25
 112 00ce 0091 0000             lds r16,Parameter_Hoehe_P
 113 00d2 8091 0000             lds r24,EE_Parameter+31
 114 00d6 90E0                  ldi r25,lo8(0)
 115 00d8 9C01                  movw r18,r24
 116 00da 2E9D                  mul r18,r14
 117 00dc C001                  movw r24,r0
 118 00de 2F9D                  mul r18,r15
 119 00e0 900D                  add r25,r0
 120 00e2 3E9D                  mul r19,r14
 121 00e4 900D                  add r25,r0
 122 00e6 1124                  clr r1
 123 00e8 64E0                  ldi r22,lo8(4)
 124 00ea 70E0                  ldi r23,hi8(4)
 125 00ec 0E94 0000             call __divmodhi4
 126 00f0 9B01                  movw r18,r22
 127 00f2 4427                  clr r20
 128 00f4 37FD                  sbrc r19,7
 129 00f6 4095                  com r20
 130 00f8 542F                  mov r21,r20
 131 00fa 8091 0000             lds r24,altIntegral
 132 00fe 9091 0000             lds r25,(altIntegral)+1
 133 0102 A091 0000             lds r26,(altIntegral)+2
 134 0106 B091 0000             lds r27,(altIntegral)+3
 135 010a 280F                  add r18,r24
 136 010c 391F                  adc r19,r25
 137 010e 4A1F                  adc r20,r26
 138 0110 5B1F                  adc r21,r27
 139 0112 2093 0000             sts altIntegral,r18
 140 0116 3093 0000             sts (altIntegral)+1,r19
 141 011a 4093 0000             sts (altIntegral)+2,r20
 142 011e 5093 0000             sts (altIntegral)+3,r21
 143 0122 2134                  cpi r18,lo8(1000001)
 144 0124 62E4                  ldi r22,hi8(1000001)
 145 0126 3607                  cpc r19,r22
 146 0128 6FE0                  ldi r22,hlo8(1000001)
 147 012a 4607                  cpc r20,r22
 148 012c 60E0                  ldi r22,hhi8(1000001)
 149 012e 5607                  cpc r21,r22
 150 0130 04F0                  brlt .L11
 151 0132 80E4                  ldi r24,lo8(1000000)
 152 0134 92E4                  ldi r25,hi8(1000000)
 153 0136 AFE0                  ldi r26,hlo8(1000000)
 154 0138 B0E0                  ldi r27,hhi8(1000000)
 155 013a 00C0                  rjmp .L20
 156                    .L11:
 157 013c 205C                  subi r18,lo8(-1000000)
 158 013e 3D4B                  sbci r19,hi8(-1000000)
 159 0140 404F                  sbci r20,hlo8(-1000000)
 160 0142 5F4F                  sbci r21,hhi8(-1000000)
 161 0144 04F4                  brge .L12
 162 0146 80EC                  ldi r24,lo8(-1000000)
 163 0148 9DEB                  ldi r25,hi8(-1000000)
 164 014a A0EF                  ldi r26,hlo8(-1000000)
 165 014c BFEF                  ldi r27,hhi8(-1000000)
 166                    .L20:
 167 014e 8093 0000             sts altIntegral,r24
 168 0152 9093 0000             sts (altIntegral)+1,r25
 169 0156 A093 0000             sts (altIntegral)+2,r26
 170 015a B093 0000             sts (altIntegral)+3,r27
 171                    .L12:
 172 015e A090 0000             lds r10,altIntegral
 173 0162 B090 0000             lds r11,(altIntegral)+1
 174 0166 C090 0000             lds r12,(altIntegral)+2
 175 016a D090 0000             lds r13,(altIntegral)+3
 176 016e 9090 0000             lds r9,Parameter_Luftdruck_D
 177 0172 C091 0000             lds r28,lastError
 178 0176 D091 0000             lds r29,(lastError)+1
 179 017a 6091 0000             lds r22,Mess_Integral_Hoch
 180 017e 7091 0000             lds r23,(Mess_Integral_Hoch)+1
 181 0182 8091 0000             lds r24,(Mess_Integral_Hoch)+2
 182 0186 9091 0000             lds r25,(Mess_Integral_Hoch)+3
 183 018a 20E8                  ldi r18,lo8(128)
 184 018c 30E0                  ldi r19,hi8(128)
 185 018e 40E0                  ldi r20,hlo8(128)
 186 0190 50E0                  ldi r21,hhi8(128)
 187 0192 0E94 0000             call __divmodsi4
 188 0196 CA01                  movw r24,r20
 189 0198 B901                  movw r22,r18
 190 019a 2091 0000             lds r18,accZOffset
 191 019e 3091 0000             lds r19,(accZOffset)+1
 192 01a2 4427                  clr r20
 193 01a4 37FD                  sbrc r19,7
 194 01a6 4095                  com r20
 195 01a8 542F                  mov r21,r20
 196 01aa 621B                  sub r22,r18
 197 01ac 730B                  sbc r23,r19
 198 01ae 840B                  sbc r24,r20
 199 01b0 950B                  sbc r25,r21
 200 01b2 2091 0000             lds r18,Parameter_Hoehe_ACC_Wirkung
 201 01b6 30E0                  ldi r19,lo8(0)
 202 01b8 40E0                  ldi r20,lo8(0)
 203 01ba 50E0                  ldi r21,hi8(0)
 204 01bc 0E94 0000             call __mulsi3
 205 01c0 20E2                  ldi r18,lo8(32)
 206 01c2 30E0                  ldi r19,hi8(32)
 207 01c4 40E0                  ldi r20,hlo8(32)
 208 01c6 50E0                  ldi r21,hhi8(32)
 209 01c8 0E94 0000             call __divmodsi4
 210 01cc C901                  movw r24,r18
 211 01ce 3093 0000             sts (temp)+1,r19
 212 01d2 2093 0000             sts temp,r18
 213 01d6 21E0                  ldi r18,hi8(281)
 214 01d8 8931                  cpi r24,lo8(281)
 215 01da 9207                  cpc r25,r18
 216 01dc 04F0                  brlt .L13
 217 01de 88E1                  ldi r24,lo8(280)
 218 01e0 91E0                  ldi r25,hi8(280)
 219 01e2 00C0                  rjmp .L21
 220                    .L13:
 221 01e4 885E                  subi r24,lo8(-280)
 222 01e6 9E4F                  sbci r25,hi8(-280)
 223 01e8 04F4                  brge .L14
 224 01ea 88EE                  ldi r24,lo8(-280)
 225 01ec 9EEF                  ldi r25,hi8(-280)
 226                    .L21:
 227 01ee 9093 0000             sts (temp)+1,r25
 228 01f2 8093 0000             sts temp,r24
 229                    .L14:
 230 01f6 802F                  mov r24,r16
 231 01f8 90E0                  ldi r25,lo8(0)
 232 01fa AC01                  movw r20,r24
 233 01fc 4E9D                  mul r20,r14
 234 01fe C001                  movw r24,r0
 235 0200 4F9D                  mul r20,r15
 236 0202 900D                  add r25,r0
 237 0204 5E9D                  mul r21,r14
 238 0206 900D                  add r25,r0
 239 0208 1124                  clr r1
 240 020a 64E0                  ldi r22,lo8(4)
 241 020c 70E0                  ldi r23,hi8(4)
 242 020e 0E94 0000             call __divmodhi4
 243 0212 8B01                  movw r16,r22
 244 0214 C601                  movw r24,r12
 245 0216 B501                  movw r22,r10
 246 0218 20EA                  ldi r18,lo8(4000)
 247 021a 3FE0                  ldi r19,hi8(4000)
 248 021c 40E0                  ldi r20,hlo8(4000)
 249 021e 50E0                  ldi r21,hhi8(4000)
 250 0220 0E94 0000             call __divmodsi4
 251 0224 020F                  add r16,r18
 252 0226 131F                  adc r17,r19
 253 0228 9701                  movw r18,r14
 254 022a 2C1B                  sub r18,r28
 255 022c 3D0B                  sbc r19,r29
 256 022e 892D                  mov r24,r9
 257 0230 90E0                  ldi r25,lo8(0)
 258 0232 BC01                  movw r22,r24
 259 0234 269F                  mul r18,r22
 260 0236 C001                  movw r24,r0
 261 0238 279F                  mul r18,r23
 262 023a 900D                  add r25,r0
 263 023c 369F                  mul r19,r22
 264 023e 900D                  add r25,r0
 265 0240 1124                  clr r1
 266 0242 62E0                  ldi r22,lo8(2)
 267 0244 70E0                  ldi r23,hi8(2)
 268 0246 0E94 0000             call __divmodhi4
 269 024a 8091 0000             lds r24,temp
 270 024e 9091 0000             lds r25,(temp)+1
 271 0252 680F                  add r22,r24
 272 0254 791F                  adc r23,r25
 273 0256 600F                  add r22,r16
 274 0258 711F                  adc r23,r17
 275 025a 8091 0000             lds r24,EE_Parameter+13
 276 025e 90E0                  ldi r25,lo8(0)
 277 0260 9C01                  movw r18,r24
 278 0262 629F                  mul r22,r18
 279 0264 C001                  movw r24,r0
 280 0266 639F                  mul r22,r19
 281 0268 900D                  add r25,r0
 282 026a 729F                  mul r23,r18
 283 026c 900D                  add r25,r0
 284 026e 1124                  clr r1
 285 0270 6AE0                  ldi r22,lo8(10)
 286 0272 70E0                  ldi r23,hi8(10)
 287 0274 0E94 0000             call __divmodhi4
 288 0278 8091 0000             lds r24,EE_Parameter+11
 289 027c 90E0                  ldi r25,lo8(0)
 290 027e 880F                  lsl r24
 291 0280 991F                  rol r25
 292 0282 880F                  lsl r24
 293 0284 991F                  rol r25
 294 0286 8617                  cp r24,r22
 295 0288 9707                  cpc r25,r23
 296 028a 04F4                  brge .L15
 297 028c EC01                  movw r28,r24
 298 028e 00C0                  rjmp .L16
 299                    .L15:
 300 0290 2227                  clr r18
 301 0292 3327                  clr r19
 302 0294 281B                  sub r18,r24
 303 0296 390B                  sbc r19,r25
 304 0298 EB01                  movw r28,r22
 305 029a 6217                  cp r22,r18
 306 029c 7307                  cpc r23,r19
 307 029e 04F4                  brge .L16
 308 02a0 E901                  movw r28,r18
 309                    .L16:
 310 02a2 D093 0000             sts (lastN)+1,r29
 311 02a6 C093 0000             sts lastN,r28
 312 02aa F092 0000             sts (lastError)+1,r15
 313 02ae E092 0000             sts lastError,r14
 314 02b2 2091 0000             lds r18,averageN
 315 02b6 3091 0000             lds r19,(averageN)+1
 316 02ba AE01                  movw r20,r28
 317 02bc 421B                  sub r20,r18
 318 02be 530B                  sbc r21,r19
 319 02c0 8091 0000             lds r24,EE_Parameter+32
 320 02c4 90E0                  ldi r25,lo8(0)
 321 02c6 BC01                  movw r22,r24
 322 02c8 469F                  mul r20,r22
 323 02ca C001                  movw r24,r0
 324 02cc 479F                  mul r20,r23
 325 02ce 900D                  add r25,r0
 326 02d0 569F                  mul r21,r22
 327 02d2 900D                  add r25,r0
 328 02d4 1124                  clr r1
 329 02d6 64E6                  ldi r22,lo8(100)
 330 02d8 70E0                  ldi r23,hi8(100)
 331 02da 0E94 0000             call __divmodhi4
 332 02de 260F                  add r18,r22
 333 02e0 371F                  adc r19,r23
 334 02e2 3093 0000             sts (averageN)+1,r19
 335 02e6 2093 0000             sts averageN,r18
 336 02ea 00C0                  rjmp .L18
 337                    .L10:
 338 02ec C0E0                  ldi r28,lo8(0)
 339 02ee D0E0                  ldi r29,hi8(0)
 340                    .L18:
 341 02f0 6091 0000             lds r22,altIntegral
 342 02f4 7091 0000             lds r23,(altIntegral)+1
 343 02f8 8091 0000             lds r24,(altIntegral)+2
 344 02fc 9091 0000             lds r25,(altIntegral)+3
 345 0300 20EA                  ldi r18,lo8(4000)
 346 0302 3FE0                  ldi r19,hi8(4000)
 347 0304 40E0                  ldi r20,hlo8(4000)
 348 0306 50E0                  ldi r21,hhi8(4000)
 349 0308 0E94 0000             call __divmodsi4
 350 030c 3093 0000             sts (DebugOut+62)+1,r19
 351 0310 2093 0000             sts DebugOut+62,r18
 352 0314 D093 0000             sts (DebugOut+56)+1,r29
 353 0318 C093 0000             sts DebugOut+56,r28
 354 031c CE01                  movw r24,r28
 355                    /* epilogue start */
 356 031e DF91                  pop r29
 357 0320 CF91                  pop r28
 358 0322 1F91                  pop r17
 359 0324 0F91                  pop r16
 360 0326 FF90                  pop r15
 361 0328 EF90                  pop r14
 362 032a DF90                  pop r13
 363 032c CF90                  pop r12
 364 032e BF90                  pop r11
 365 0330 AF90                  pop r10
 366 0332 9F90                  pop r9
 367 0334 0895                  ret
 369                    .global enabled
 370                    .global enabled
 371                            .section .bss
 374                    enabled:
 375 0000 00                    .skip 1,0
 376                    .global pressureOffset
 377                    .global pressureOffset
 380                    pressureOffset:
 381 0001 0000                  .skip 2,0
 382                    .global accZOffset
 383                    .global accZOffset
 386                    accZOffset:
 387 0003 0000                  .skip 2,0
 388                    .global lastError
 389                    .global lastError
 392                    lastError:
 393 0005 0000                  .skip 2,0
 394                    .global lastN
 395                    .global lastN
 398                    lastN:
 399 0007 0000                  .skip 2,0
 400                    .global averageN
 401                    .global averageN
 404                    averageN:
 405 0009 0000                  .skip 2,0
 406                    .global altIntegral
 407                    .global altIntegral
 410                    altIntegral:
 411 000b 0000 0000             .skip 4,0
 412                            .comm temp,2,1
DEFINED SYMBOLS
                            *ABS*:00000000 altcon.c
  c:\TEMP/cc6NfIds.s:2      *ABS*:0000003f __SREG__
  c:\TEMP/cc6NfIds.s:3      *ABS*:0000003e __SP_H__
  c:\TEMP/cc6NfIds.s:4      *ABS*:0000003d __SP_L__
  c:\TEMP/cc6NfIds.s:5      *ABS*:00000034 __CCP__
  c:\TEMP/cc6NfIds.s:6      *ABS*:00000000 __tmp_reg__
  c:\TEMP/cc6NfIds.s:7      *ABS*:00000001 __zero_reg__
  c:\TEMP/cc6NfIds.s:13     .text:00000000 altcon_init
  c:\TEMP/cc6NfIds.s:374    .bss:00000000 enabled
  c:\TEMP/cc6NfIds.s:26     .text:00000012 altcon_lock
  c:\TEMP/cc6NfIds.s:380    .bss:00000001 pressureOffset
  c:\TEMP/cc6NfIds.s:38     .text:00000024 altcon_start
  c:\TEMP/cc6NfIds.s:386    .bss:00000003 accZOffset
  c:\TEMP/cc6NfIds.s:392    .bss:00000005 lastError
  c:\TEMP/cc6NfIds.s:398    .bss:00000007 lastN
  c:\TEMP/cc6NfIds.s:404    .bss:00000009 averageN
  c:\TEMP/cc6NfIds.s:410    .bss:0000000b altIntegral
  c:\TEMP/cc6NfIds.s:71     .text:0000007e altcon_stop
  c:\TEMP/cc6NfIds.s:84     .text:00000090 altcon_error
                            *COM*:00000002 temp

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
beeptime
airPressure
Mess_Integral_Hoch
__divmodsi4
Notlandung
Parameter_Hoehe_P
EE_Parameter
__divmodhi4
Parameter_Luftdruck_D
Parameter_Hoehe_ACC_Wirkung
__mulsi3
DebugOut