Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

   1                            .file   "capacity.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 update_timer
  11                    .global update_timer
  12                            .section .bss
  15                    update_timer:
  16 0000 0000                  .skip 2,0
  17                            .text
  18                    .global Capacity_Init
  20                    Capacity_Init:
  21                    /* prologue: frame size=0 */
  22                    /* prologue end (size=0) */
  23 0000 1092 0000             sts (Capacity)+1,__zero_reg__
  24 0004 1092 0000             sts Capacity,__zero_reg__
  25 0008 1092 0000             sts (Capacity+4)+1,__zero_reg__
  26 000c 1092 0000             sts Capacity+4,__zero_reg__
  27 0010 1092 0000             sts (Capacity+2)+1,__zero_reg__
  28 0014 1092 0000             sts Capacity+2,__zero_reg__
  29 0018 1092 0000             sts Capacity+6,__zero_reg__
  30 001c 8AE0                  ldi r24,lo8(10)
  31 001e 90E0                  ldi r25,hi8(10)
  32 0020 0E94 0000             call SetDelay
  33 0024 9093 0000             sts (update_timer)+1,r25
  34 0028 8093 0000             sts update_timer,r24
  35                    /* epilogue: frame size=0 */
  36 002c 0895                  ret
  37                    /* epilogue end (size=1) */
  38                    /* function Capacity_Init size 23 (22) */
  40                            .lcomm SubCounter.0,2
  41                            .lcomm CurrentOffset.1,2
  42                            .lcomm SumCurrentOffset.2,4
  43                    .global Capacity_Update
  45                    Capacity_Update:
  46                    /* prologue: frame size=0 */
  47 002e CF93                  push r28
  48 0030 DF93                  push r29
  49                    /* prologue end (size=2) */
  50 0032 8091 0000             lds r24,update_timer
  51 0036 9091 0000             lds r25,(update_timer)+1
  52 003a 0E94 0000             call CheckDelay
  53 003e 8823                  tst r24
  54 0040 01F4                  brne .+2
  55 0042 00C0                  rjmp .L2
  56 0044 8091 0000             lds r24,update_timer
  57 0048 9091 0000             lds r25,(update_timer)+1
  58 004c 0A96                  adiw r24,10
  59 004e 9093 0000             sts (update_timer)+1,r25
  60 0052 8093 0000             sts update_timer,r24
  61 0056 E0E0                  ldi r30,lo8(0)
  62 0058 F0E0                  ldi r31,hi8(0)
  63 005a 9F01                  movw r18,r30
  64 005c 90E0                  ldi r25,lo8(0)
  65 005e 5FEF                  ldi r21,lo8(-1)
  66 0060 A0E0                  ldi r26,lo8(Motor)
  67 0062 B0E0                  ldi r27,hi8(Motor)
  68 0064 4BE0                  ldi r20,lo8(11)
  69                    .L9:
  70 0066 ED01                  movw r28,r26
  71 0068 8B81                  ldd r24,Y+3
  72 006a 87FF                  sbrs r24,7
  73 006c 00C0                  rjmp .L6
  74 006e 9F5F                  subi r25,lo8(-(1))
  75 0070 8D81                  ldd r24,Y+5
  76 0072 E80F                  add r30,r24
  77 0074 F11D                  adc r31,__zero_reg__
  78 0076 8981                  ldd r24,Y+1
  79 0078 280F                  add r18,r24
  80 007a 311D                  adc r19,__zero_reg__
  81 007c 8E81                  ldd r24,Y+6
  82 007e 8517                  cp r24,r21
  83 0080 00F4                  brsh .L6
  84 0082 582F                  mov r21,r24
  85                    .L6:
  86 0084 4150                  subi r20,lo8(-(-1))
  87 0086 1896                  adiw r26,8
  88 0088 47FF                  sbrs r20,7
  89 008a 00C0                  rjmp .L9
  90 008c 5093 0000             sts Capacity+6,r21
  91 0090 232B                  or r18,r19
  92 0092 01F4                  brne .L10
  93 0094 2091 0000             lds r18,SumCurrentOffset.2
  94 0098 3091 0000             lds r19,(SumCurrentOffset.2)+1
  95 009c 4091 0000             lds r20,(SumCurrentOffset.2)+2
  96 00a0 5091 0000             lds r21,(SumCurrentOffset.2)+3
  97 00a4 BB27                  clr r27
  98 00a6 A52F                  mov r26,r21
  99 00a8 942F                  mov r25,r20
 100 00aa 832F                  mov r24,r19
 101 00ac 9093 0000             sts (CurrentOffset.1)+1,r25
 102 00b0 8093 0000             sts CurrentOffset.1,r24
 103 00b4 AA27                  clr r26
 104 00b6 BB27                  clr r27
 105 00b8 281B                  sub r18,r24
 106 00ba 390B                  sbc r19,r25
 107 00bc 4A0B                  sbc r20,r26
 108 00be 5B0B                  sbc r21,r27
 109 00c0 CF01                  movw r24,r30
 110 00c2 AA27                  clr r26
 111 00c4 BB27                  clr r27
 112 00c6 280F                  add r18,r24
 113 00c8 391F                  adc r19,r25
 114 00ca 4A1F                  adc r20,r26
 115 00cc 5B1F                  adc r21,r27
 116 00ce 2093 0000             sts SumCurrentOffset.2,r18
 117 00d2 3093 0000             sts (SumCurrentOffset.2)+1,r19
 118 00d6 4093 0000             sts (SumCurrentOffset.2)+2,r20
 119 00da 5093 0000             sts (SumCurrentOffset.2)+3,r21
 120 00de E5E0                  ldi r30,lo8(5)
 121 00e0 F0E0                  ldi r31,hi8(5)
 122 00e2 00C0                  rjmp .L11
 123                    .L10:
 124 00e4 2091 0000             lds r18,CurrentOffset.1
 125 00e8 3091 0000             lds r19,(CurrentOffset.1)+1
 126 00ec 2E17                  cp r18,r30
 127 00ee 3F07                  cpc r19,r31
 128 00f0 00F4                  brsh .L12
 129 00f2 E21B                  sub r30,r18
 130 00f4 F30B                  sbc r31,r19
 131 00f6 00C0                  rjmp .L13
 132                    .L12:
 133 00f8 E0E0                  ldi r30,lo8(0)
 134 00fa F0E0                  ldi r31,hi8(0)
 135                    .L13:
 136 00fc 892F                  mov r24,r25
 137 00fe 9927                  clr r25
 138 0100 880F                  add r24,r24
 139 0102 991F                  adc r25,r25
 140 0104 E80F                  add r30,r24
 141 0106 F91F                  adc r31,r25
 142 0108 3596                  adiw r30,5
 143                    .L11:
 144 010a F093 0000             sts (Capacity)+1,r31
 145 010e E093 0000             sts Capacity,r30
 146 0112 EF3F                  cpi r30,255
 147 0114 F105                  cpc r31,__zero_reg__
 148 0116 00F4                  brsh .L14
 149 0118 8091 0000             lds r24,UBat
 150 011c 9091 0000             lds r25,(UBat)+1
 151 0120 8E9F                  mul r24,r30
 152 0122 9001                  movw r18,r0
 153 0124 8F9F                  mul r24,r31
 154 0126 300D                  add r19,r0
 155 0128 9E9F                  mul r25,r30
 156 012a 300D                  add r19,r0
 157 012c 1124                  clr r1
 158 012e C901                  movw r24,r18
 159 0130 64E6                  ldi r22,lo8(100)
 160 0132 70E0                  ldi r23,hi8(100)
 161 0134 00C0                  rjmp .L19
 162                    .L14:
 163 0136 CF01                  movw r24,r30
 164 0138 9695                  lsr r25
 165 013a 8795                  ror r24
 166 013c 9695                  lsr r25
 167 013e 8795                  ror r24
 168 0140 2091 0000             lds r18,UBat
 169 0144 3091 0000             lds r19,(UBat)+1
 170 0148 289F                  mul r18,r24
 171 014a A001                  movw r20,r0
 172 014c 299F                  mul r18,r25
 173 014e 500D                  add r21,r0
 174 0150 389F                  mul r19,r24
 175 0152 500D                  add r21,r0
 176 0154 1124                  clr r1
 177 0156 CA01                  movw r24,r20
 178 0158 69E1                  ldi r22,lo8(25)
 179 015a 70E0                  ldi r23,hi8(25)
 180                    .L19:
 181 015c 0E94 0000             call __udivmodhi4
 182 0160 7093 0000             sts (Capacity+2)+1,r23
 183 0164 6093 0000             sts Capacity+2,r22
 184 0168 2091 0000             lds r18,SubCounter.0
 185 016c 3091 0000             lds r19,(SubCounter.0)+1
 186 0170 2E0F                  add r18,r30
 187 0172 3F1F                  adc r19,r31
 188 0174 3093 0000             sts (SubCounter.0)+1,r19
 189 0178 2093 0000             sts SubCounter.0,r18
 190 017c 5EE0                  ldi r21,hi8(3601)
 191 017e 2131                  cpi r18,lo8(3601)
 192 0180 3507                  cpc r19,r21
 193 0182 00F0                  brlo .L2
 194 0184 8091 0000             lds r24,Capacity+4
 195 0188 9091 0000             lds r25,(Capacity+4)+1
 196 018c 0196                  adiw r24,1
 197 018e 9093 0000             sts (Capacity+4)+1,r25
 198 0192 8093 0000             sts Capacity+4,r24
 199 0196 2051                  subi r18,lo8(-(-3600))
 200 0198 3E40                  sbci r19,hi8(-(-3600))
 201 019a 3093 0000             sts (SubCounter.0)+1,r19
 202 019e 2093 0000             sts SubCounter.0,r18
 203                    .L2:
 204                    /* epilogue: frame size=0 */
 205 01a2 DF91                  pop r29
 206 01a4 CF91                  pop r28
 207 01a6 0895                  ret
 208                    /* epilogue end (size=3) */
 209                    /* function Capacity_Update size 189 (184) */
 211                            .comm Capacity,7,1
 212                    /* File "capacity.c": code  212 = 0x00d4 ( 206), prologues   2, epilogues   4 */
DEFINED SYMBOLS
                            *ABS*:00000000 capacity.c
  C:\Temp/ccTVr0ER.s:3      *ABS*:0000003f __SREG__
  C:\Temp/ccTVr0ER.s:4      *ABS*:0000003e __SP_H__
  C:\Temp/ccTVr0ER.s:5      *ABS*:0000003d __SP_L__
  C:\Temp/ccTVr0ER.s:6      *ABS*:00000000 __tmp_reg__
  C:\Temp/ccTVr0ER.s:7      *ABS*:00000001 __zero_reg__
  C:\Temp/ccTVr0ER.s:15     .bss:00000000 update_timer
  C:\Temp/ccTVr0ER.s:20     .text:00000000 Capacity_Init
                            *COM*:00000007 Capacity
                             .bss:00000002 SubCounter.0
  C:\Temp/ccTVr0ER.s:40     .bss:00000004 CurrentOffset.1
  C:\Temp/ccTVr0ER.s:41     .bss:00000006 SumCurrentOffset.2
  C:\Temp/ccTVr0ER.s:45     .text:0000002e Capacity_Update

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
SetDelay
CheckDelay
Motor
UBat
__udivmodhi4