Subversion Repositories FlightCtrl

Rev

Rev 2302 | Blame | Compare with Previous | Last modification | View Log | RSS feed

   1                            .file   "sbus.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 NewSBusData
  11                    .global NewSBusData
  12                            .section .bss
  15                    NewSBusData:
  16 0000 00                    .skip 1,0
  17                            .text
  18                    .global SbusUartInit
  20                    SbusUartInit:
  21                    /* prologue: frame size=0 */
  22                    /* prologue end (size=0) */
  23 0000 4FB7                  in r20,95-0x20
  24 0002 28E1                  ldi r18,lo8(24)
  25 0004 30E0                  ldi r19,hi8(24)
  26                    /* #APP */
  27 0006 F894                  cli
  28                    /* #NOAPP */
  29 0008 8091 C900             lds r24,201
  30 000c 8F77                  andi r24,lo8(127)
  31 000e 8093 C900             sts 201,r24
  32 0012 8091 C900             lds r24,201
  33 0016 8F7B                  andi r24,lo8(-65)
  34 0018 8093 C900             sts 201,r24
  35 001c 8091 C900             lds r24,201
  36 0020 8F7D                  andi r24,lo8(-33)
  37 0022 8093 C900             sts 201,r24
  38 0026 5A9A                  sbi 43-0x20,2
  39 0028 5298                  cbi 42-0x20,2
  40 002a 5B9A                  sbi 43-0x20,3
  41 002c 539A                  sbi 42-0x20,3
  42 002e 832F                  mov r24,r19
  43 0030 9927                  clr r25
  44 0032 8093 CD00             sts 205,r24
  45 0036 2093 CC00             sts 204,r18
  46 003a 8091 C800             lds r24,200
  47 003e 8260                  ori r24,lo8(2)
  48 0040 8093 C800             sts 200,r24
  49 0044 80E1                  ldi r24,lo8(16)
  50 0046 8093 C900             sts 201,r24
  51 004a 8091 CA00             lds r24,202
  52 004e 8F77                  andi r24,lo8(127)
  53 0050 8093 CA00             sts 202,r24
  54 0054 8091 CA00             lds r24,202
  55 0058 8F7B                  andi r24,lo8(-65)
  56 005a 8093 CA00             sts 202,r24
  57 005e 8091 CA00             lds r24,202
  58 0062 8091 CA00             lds r24,202
  59 0066 8F7E                  andi r24,lo8(-17)
  60 0068 8093 CA00             sts 202,r24
  61 006c 8091 CA00             lds r24,202
  62 0070 8860                  ori r24,lo8(8)
  63 0072 8093 CA00             sts 202,r24
  64 0076 8091 C900             lds r24,201
  65 007a 8B7F                  andi r24,lo8(-5)
  66 007c 8093 C900             sts 201,r24
  67 0080 8091 CA00             lds r24,202
  68 0084 8460                  ori r24,lo8(4)
  69 0086 8093 CA00             sts 202,r24
  70 008a 8091 CA00             lds r24,202
  71 008e 8260                  ori r24,lo8(2)
  72 0090 8093 CA00             sts 202,r24
  73                    .L7:
  74 0094 8091 C800             lds r24,200
  75 0098 87FF                  sbrs r24,7
  76 009a 00C0                  rjmp .L6
  77 009c 8091 CE00             lds r24,206
  78 00a0 00C0                  rjmp .L7
  79                    .L6:
  80 00a2 8091 C900             lds r24,201
  81 00a6 8068                  ori r24,lo8(-128)
  82 00a8 8093 C900             sts 201,r24
  83 00ac 8091 0000             lds r24,sBusBuffer+23
  84 00b0 8460                  ori r24,lo8(4)
  85 00b2 8093 0000             sts sBusBuffer+23,r24
  86 00b6 4FBF                  out 95-0x20,r20
  87                    /* epilogue: frame size=0 */
  88 00b8 0895                  ret
  89                    /* epilogue end (size=1) */
  90                    /* function SbusUartInit size 94 (93) */
  92                            .lcomm ptr.1,1
  93                    .global SbusParser
  95                    SbusParser:
  96                    /* prologue: frame size=0 */
  97                    /* prologue end (size=0) */
  98 00ba 9091 0000             lds r25,SpektrumTimer
  99 00be 9923                  tst r25
 100 00c0 01F4                  brne .L9
 101 00c2 8F30                  cpi r24,lo8(15)
 102 00c4 01F4                  brne .L9
 103 00c6 9093 0000             sts ptr.1,r25
 104 00ca 80E5                  ldi r24,lo8(80)
 105 00cc 8093 0000             sts SpektrumTimer,r24
 106 00d0 0895                  ret
 107                    .L9:
 108 00d2 E091 0000             lds r30,ptr.1
 109 00d6 EF5F                  subi r30,lo8(-(1))
 110 00d8 E093 0000             sts ptr.1,r30
 111 00dc E831                  cpi r30,lo8(24)
 112 00de 01F4                  brne .L11
 113 00e0 81E0                  ldi r24,lo8(1)
 114 00e2 8093 0000             sts NewSBusData,r24
 115 00e6 0895                  ret
 116                    .L11:
 117 00e8 E931                  cpi r30,lo8(25)
 118 00ea 00F0                  brlo .L13
 119 00ec 89E1                  ldi r24,lo8(25)
 120 00ee 8093 0000             sts ptr.1,r24
 121 00f2 0895                  ret
 122                    .L13:
 123 00f4 FF27                  clr r31
 124 00f6 E050                  subi r30,lo8(-(sBusBuffer))
 125 00f8 F040                  sbci r31,hi8(-(sBusBuffer))
 126 00fa 8083                  st Z,r24
 127 00fc 0895                  ret
 128                    /* epilogue: frame size=0 */
 129                    /* epilogue: noreturn */
 130                    /* epilogue end (size=0) */
 131                    /* function SbusParser size 34 (34) */
 133                            .lcomm load.0,1
 134                    .global ProcessSBus
 136                    ProcessSBus:
 137                    /* prologue: frame size=0 */
 138 00fe A0E0                  ldi r26,lo8(0)
 139 0100 B0E0                  ldi r27,hi8(0)
 140 0102 E0E0                  ldi r30,pm_lo8(1f)
 141 0104 F0E0                  ldi r31,pm_hi8(1f)
 142 0106 0C94 0000             jmp __prologue_saves__+16
 143                    1:
 144                    /* prologue end (size=6) */
 145 010a 91E0                  ldi r25,lo8(1)
 146 010c D92E                  mov r13,r25
 147 010e 82E0                  ldi r24,lo8(2)
 148 0110 A82E                  mov r10,r24
 149 0112 BD2C                  mov r11,r13
 150 0114 E12C                  mov r14,__zero_reg__
 151 0116 01E0                  ldi r16,hi8(256)
 152 0118 F02E                  mov r15,r16
 153 011a 8091 0000             lds r24,sBusBuffer+23
 154 011e 82FD                  sbrc r24,2
 155 0120 00C0                  rjmp .L16
 156 0122 8091 6F00             lds r24,111
 157 0126 8F7D                  andi r24,lo8(-33)
 158 0128 8093 6F00             sts 111,r24
 159 012c E091 0000             lds r30,EE_Parameter+105
 160 0130 EE23                  tst r30
 161 0132 01F0                  breq .L18
 162 0134 FF27                  clr r31
 163 0136 EE0F                  add r30,r30
 164 0138 FF1F                  adc r31,r31
 165 013a E050                  subi r30,lo8(-(PPM_in))
 166 013c F040                  sbci r31,hi8(-(PPM_in))
 167 013e 8081                  ld r24,Z
 168 0140 9181                  ldd r25,Z+1
 169 0142 8436                  cpi r24,100
 170 0144 9105                  cpc r25,__zero_reg__
 171 0146 04F4                  brge .L17
 172                    .L18:
 173 0148 8091 0000             lds r24,SenderOkay
 174 014c 883C                  cpi r24,lo8(-56)
 175 014e 00F4                  brsh .L19
 176 0150 8091 0000             lds r24,SenderOkay
 177 0154 8C5E                  subi r24,lo8(-(20))
 178 0156 00C0                  rjmp .L38
 179                    .L19:
 180 0158 88EC                  ldi r24,lo8(-56)
 181                    .L38:
 182 015a 8093 0000             sts SenderOkay,r24
 183                    .L17:
 184 015e 8091 0000             lds r24,sBusBuffer+1
 185 0162 682F                  mov r22,r24
 186 0164 7727                  clr r23
 187 0166 8091 0000             lds r24,load.0
 188 016a 8150                  subi r24,lo8(-(-1))
 189 016c 8093 0000             sts load.0,r24
 190 0170 8F3F                  cpi r24,lo8(-1)
 191 0172 01F4                  brne .L21
 192 0174 1CE7                  ldi r17,lo8(124)
 193 0176 C12E                  mov r12,r17
 194 0178 82E0                  ldi r24,lo8(2)
 195 017a 8093 0000             sts load.0,r24
 196 017e 00C0                  rjmp .L22
 197                    .L21:
 198 0180 C4E2                  ldi r28,lo8(36)
 199 0182 CC2E                  mov r12,r28
 200                    .L22:
 201 0184 40E0                  ldi r20,lo8(0)
 202                    .L39:
 203 0186 4C15                  cp r20,r12
 204 0188 00F0                  brlo .+2
 205 018a 00C0                  rjmp .L37
 206 018c EA2D                  mov r30,r10
 207 018e FF27                  clr r31
 208 0190 E050                  subi r30,lo8(-(sBusBuffer))
 209 0192 F040                  sbci r31,hi8(-(sBusBuffer))
 210 0194 8081                  ld r24,Z
 211 0196 8D21                  and r24,r13
 212 0198 01F0                  breq .L26
 213 019a 6E29                  or r22,r14
 214 019c 7F29                  or r23,r15
 215                    .L26:
 216 019e 8D2D                  mov r24,r13
 217 01a0 9927                  clr r25
 218 01a2 880F                  add r24,r24
 219 01a4 991F                  adc r25,r25
 220 01a6 D82E                  mov r13,r24
 221 01a8 8823                  tst r24
 222 01aa 01F4                  brne .L27
 223 01ac B1E0                  ldi r27,lo8(1)
 224 01ae DB2E                  mov r13,r27
 225 01b0 AD0C                  add r10,r13
 226                    .L27:
 227 01b2 EE0C                  add r14,r14
 228 01b4 FF1C                  adc r15,r15
 229 01b6 20E0                  ldi r18,lo8(2048)
 230 01b8 E216                  cp r14,r18
 231 01ba 28E0                  ldi r18,hi8(2048)
 232 01bc F206                  cpc r15,r18
 233 01be 01F0                  breq .+2
 234 01c0 00C0                  rjmp .L25
 235 01c2 A1E0                  ldi r26,lo8(1)
 236 01c4 EA2E                  mov r14,r26
 237 01c6 F12C                  mov r15,__zero_reg__
 238 01c8 CB01                  movw r24,r22
 239 01ca 8050                  subi r24,lo8(-(-1024))
 240 01cc 9440                  sbci r25,hi8(-(-1024))
 241 01ce 65E0                  ldi r22,lo8(5)
 242 01d0 70E0                  ldi r23,hi8(5)
 243 01d2 0E94 0000             call __divmodhi4
 244 01d6 AB2D                  mov r26,r11
 245 01d8 BB27                  clr r27
 246 01da FD01                  movw r30,r26
 247 01dc EA0F                  add r30,r26
 248 01de FB1F                  adc r31,r27
 249 01e0 E050                  subi r30,lo8(-(PPM_in))
 250 01e2 F040                  sbci r31,hi8(-(PPM_in))
 251 01e4 8081                  ld r24,Z
 252 01e6 9181                  ldd r25,Z+1
 253 01e8 9C01                  movw r18,r24
 254 01ea 220F                  lsl r18
 255 01ec 331F                  rol r19
 256 01ee 280F                  add r18,r24
 257 01f0 391F                  adc r19,r25
 258 01f2 260F                  add r18,r22
 259 01f4 371F                  adc r19,r23
 260 01f6 37FF                  sbrs r19,7
 261 01f8 00C0                  rjmp .L29
 262 01fa 2D5F                  subi r18,lo8(-(3))
 263 01fc 3F4F                  sbci r19,hi8(-(3))
 264                    .L29:
 265 01fe E901                  movw r28,r18
 266 0200 D595                  asr r29
 267 0202 C795                  ror r28
 268 0204 D595                  asr r29
 269 0206 C795                  ror r28
 270 0208 CB01                  movw r24,r22
 271 020a 0196                  adiw r24,1
 272 020c 8C17                  cp r24,r28
 273 020e 9D07                  cpc r25,r29
 274 0210 04F4                  brge .L30
 275 0212 2197                  sbiw r28,1
 276 0214 00C0                  rjmp .L31
 277                    .L30:
 278 0216 6150                  subi r22,lo8(-(-1))
 279 0218 7040                  sbci r23,hi8(-(-1))
 280 021a C617                  cp r28,r22
 281 021c D707                  cpc r29,r23
 282 021e 04F4                  brge .L31
 283 0220 2196                  adiw r28,1
 284                    .L31:
 285 0222 8091 0000             lds r24,SenderOkay
 286 0226 833C                  cpi r24,lo8(-61)
 287 0228 00F0                  brlo .L33
 288 022a 8D01                  movw r16,r26
 289 022c 0A0F                  add r16,r26
 290 022e 1B1F                  adc r17,r27
 291 0230 F801                  movw r30,r16
 292 0232 E050                  subi r30,lo8(-(PPM_in))
 293 0234 F040                  sbci r31,hi8(-(PPM_in))
 294 0236 8081                  ld r24,Z
 295 0238 9181                  ldd r25,Z+1
 296 023a FE01                  movw r30,r28
 297 023c E81B                  sub r30,r24
 298 023e F90B                  sbc r31,r25
 299 0240 CF01                  movw r24,r30
 300 0242 63E0                  ldi r22,lo8(3)
 301 0244 70E0                  ldi r23,hi8(3)
 302 0246 0E94 0000             call __divmodhi4
 303 024a CB01                  movw r24,r22
 304 024c 880F                  lsl r24
 305 024e 991F                  rol r25
 306 0250 860F                  add r24,r22
 307 0252 971F                  adc r25,r23
 308 0254 0050                  subi r16,lo8(-(PPM_diff))
 309 0256 1040                  sbci r17,hi8(-(PPM_diff))
 310 0258 F801                  movw r30,r16
 311 025a 9183                  std Z+1,r25
 312 025c 8083                  st Z,r24
 313 025e 00C0                  rjmp .L34
 314                    .L33:
 315 0260 AA0F                  add r26,r26
 316 0262 BB1F                  adc r27,r27
 317 0264 A050                  subi r26,lo8(-(PPM_diff))
 318 0266 B040                  sbci r27,hi8(-(PPM_diff))
 319 0268 1196                  adiw r26,1
 320 026a 1C92                  st X,__zero_reg__
 321 026c 1E92                  st -X,__zero_reg__
 322                    .L34:
 323 026e EB2D                  mov r30,r11
 324 0270 FF27                  clr r31
 325 0272 EE0F                  add r30,r30
 326 0274 FF1F                  adc r31,r31
 327 0276 E050                  subi r30,lo8(-(PPM_in))
 328 0278 F040                  sbci r31,hi8(-(PPM_in))
 329 027a D183                  std Z+1,r29
 330 027c C083                  st Z,r28
 331 027e 60E0                  ldi r22,lo8(0)
 332 0280 70E0                  ldi r23,hi8(0)
 333 0282 B394                  inc r11
 334                    .L25:
 335 0284 4F5F                  subi r20,lo8(-(1))
 336 0286 00C0                  rjmp .L39
 337                    .L37:
 338 0288 1092 0000             sts NewPpmData,__zero_reg__
 339                    .L16:
 340 028c 1092 0000             sts NewSBusData,__zero_reg__
 341                    /* epilogue: frame size=0 */
 342 0290 EAE0                  ldi r30,10
 343 0292 CDB7                  in r28,__SP_L__
 344 0294 DEB7                  in r29,__SP_H__
 345 0296 0C94 0000             jmp __epilogue_restores__+16
 346                    /* epilogue end (size=5) */
 347                    /* function ProcessSBus size 207 (196) */
 349                            .comm sBusBuffer,25,1
 350                    /* File "sbus.c": code  335 = 0x014f ( 323), prologues   6, epilogues   6 */
DEFINED SYMBOLS
                            *ABS*:00000000 sbus.c
  C:\Temp/cc09pIFE.s:3      *ABS*:0000003f __SREG__
  C:\Temp/cc09pIFE.s:4      *ABS*:0000003e __SP_H__
  C:\Temp/cc09pIFE.s:5      *ABS*:0000003d __SP_L__
  C:\Temp/cc09pIFE.s:6      *ABS*:00000000 __tmp_reg__
  C:\Temp/cc09pIFE.s:7      *ABS*:00000001 __zero_reg__
  C:\Temp/cc09pIFE.s:15     .bss:00000000 NewSBusData
  C:\Temp/cc09pIFE.s:20     .text:00000000 SbusUartInit
                            *COM*:00000019 sBusBuffer
                             .bss:00000001 ptr.1
  C:\Temp/cc09pIFE.s:95     .text:000000ba SbusParser
  C:\Temp/cc09pIFE.s:92     .bss:00000002 load.0
  C:\Temp/cc09pIFE.s:136    .text:000000fe ProcessSBus

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
SpektrumTimer
__prologue_saves__
EE_Parameter
PPM_in
SenderOkay
__divmodhi4
PPM_diff
NewPpmData
__epilogue_restores__