Statistics
| Revision:

root / demos / john / projects / libdragonfly / battery.lst @ 1693

History | View | Annotate | Download (7.44 KB)

1
   1               		.file	"battery.c"
2
   2               		.arch atmega128
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
  17               	.Ltext0:
11
  18               	.global	battery
12
  20               	battery:
13
  21               	.LFB3:
14
  22               	.LM1:
15
  23               	/* prologue: frame size=0 */
16
  24               	/* prologue end (size=0) */
17
  25               	.LM2:
18
  26 0000 8BE0      		ldi r24,lo8(11)
19
  27 0002 90E0      		ldi r25,hi8(11)
20
  28 0004 0E94 0000 		call analog8
21
  29 0008 24EF      		ldi r18,lo8(500)
22
  30 000a 31E0      		ldi r19,hi8(500)
23
  31 000c AC01      		movw r20,r24
24
  32 000e 429F      		mul r20,r18
25
  33 0010 C001      		movw r24,r0
26
  34 0012 439F      		mul r20,r19
27
  35 0014 900D      		add r25,r0
28
  36 0016 529F      		mul r21,r18
29
  37 0018 900D      		add r25,r0
30
  38 001a 1124      		clr r1
31
  39               	.LM3:
32
  40 001c 880F      		lsl r24
33
  41 001e 892F      		mov r24,r25
34
  42 0020 881F      		rol r24
35
  43 0022 990B      		sbc r25,r25
36
  44 0024 9195      		neg r25
37
  45               	/* epilogue: frame size=0 */
38
  46 0026 0895      		ret
39
  47               	/* epilogue end (size=1) */
40
  48               	/* function battery size 20 (19) */
41
  49               	.LFE3:
42
  51               	.global	battery8
43
  53               	battery8:
44
  54               	.LFB2:
45
  55               	.LM4:
46
  56               	/* prologue: frame size=0 */
47
  57               	/* prologue end (size=0) */
48
  58               	.LM5:
49
  59 0028 8BE0      		ldi r24,lo8(11)
50
  60 002a 90E0      		ldi r25,hi8(11)
51
  61 002c 0E94 0000 		call analog8
52
  62               	/* epilogue: frame size=0 */
53
  63 0030 0895      		ret
54
  64               	/* epilogue end (size=1) */
55
  65               	/* function battery8 size 5 (4) */
56
  66               	.LFE2:
57
  68               	.global	battery8_avg
58
  70               	battery8_avg:
59
  71               	.LFB5:
60
  72               	.LM6:
61
  73               	/* prologue: frame size=0 */
62
  74 0032 CF92      		push r12
63
  75 0034 DF92      		push r13
64
  76 0036 EF92      		push r14
65
  77 0038 FF92      		push r15
66
  78 003a 0F93      		push r16
67
  79 003c 1F93      		push r17
68
  80 003e CF93      		push r28
69
  81 0040 DF93      		push r29
70
  82               	/* prologue end (size=8) */
71
  83               	.LVL0:
72
  84 0042 6C01      		movw r12,r24
73
  85 0044 C0E0      		ldi r28,lo8(0)
74
  86 0046 D0E0      		ldi r29,hi8(0)
75
  87               	.LVL1:
76
  88 0048 EE24      		clr r14
77
  89 004a FF24      		clr r15
78
  90 004c 8701      		movw r16,r14
79
  91               	.LVL2:
80
  92 004e 00C0      		rjmp .L6
81
  93               	.LVL3:
82
  94               	.L7:
83
  95               	.LM7:
84
  96 0050 0E94 0000 		call battery8
85
  97 0054 AA27      		clr r26
86
  98 0056 97FD      		sbrc r25,7
87
  99 0058 A095      		com r26
88
 100 005a BA2F      		mov r27,r26
89
 101 005c E80E      		add r14,r24
90
 102 005e F91E      		adc r15,r25
91
 103 0060 0A1F      		adc r16,r26
92
 104 0062 1B1F      		adc r17,r27
93
 105               	.LM8:
94
 106 0064 2196      		adiw r28,1
95
 107               	.LVL4:
96
 108               	.L6:
97
 109 0066 CC15      		cp r28,r12
98
 110 0068 DD05      		cpc r29,r13
99
 111 006a 04F0      		brlt .L7
100
 112 006c 9601      		movw r18,r12
101
 113 006e 4427      		clr r20
102
 114 0070 37FD      		sbrc r19,7
103
 115 0072 4095      		com r20
104
 116 0074 542F      		mov r21,r20
105
 117 0076 C801      		movw r24,r16
106
 118 0078 B701      		movw r22,r14
107
 119 007a 0E94 0000 		call __divmodsi4
108
 120 007e DA01      		movw r26,r20
109
 121 0080 C901      		movw r24,r18
110
 122               	/* epilogue: frame size=0 */
111
 123 0082 DF91      		pop r29
112
 124 0084 CF91      		pop r28
113
 125 0086 1F91      		pop r17
114
 126 0088 0F91      		pop r16
115
 127 008a FF90      		pop r15
116
 128 008c EF90      		pop r14
117
 129 008e DF90      		pop r13
118
 130 0090 CF90      		pop r12
119
 131 0092 0895      		ret
120
 132               	/* epilogue end (size=9) */
121
 133               	/* function battery8_avg size 49 (32) */
122
 134               	.LFE5:
123
 136               	.global	battery_low
124
 138               	battery_low:
125
 139               	.LFB4:
126
 140               	.LM9:
127
 141               	/* prologue: frame size=0 */
128
 142               	/* prologue end (size=0) */
129
 143               	.LM10:
130
 144 0094 0E94 0000 		call battery8
131
 145               	.LM11:
132
 146 0098 2091 0000 		lds r18,next_read.1332
133
 147 009c 2223      		tst r18
134
 148 009e 01F4      		brne .L11
135
 149               	.LVL5:
136
 150               	.LM12:
137
 151 00a0 8939      		cpi r24,153
138
 152 00a2 9105      		cpc r25,__zero_reg__
139
 153 00a4 04F0      		brlt .L13
140
 154               	.LM13:
141
 155 00a6 1092 0000 		sts ret.1333,__zero_reg__
142
 156 00aa 00C0      		rjmp .L19
143
 157               	.L13:
144
 158               	.LM14:
145
 159 00ac 8091 0000 		lds r24,battery_low_count
146
 160 00b0 9091 0000 		lds r25,(battery_low_count)+1
147
 161               	.LVL6:
148
 162 00b4 0196      		adiw r24,1
149
 163 00b6 9093 0000 		sts (battery_low_count)+1,r25
150
 164 00ba 8093 0000 		sts battery_low_count,r24
151
 165               	.LM15:
152
 166 00be 0597      		sbiw r24,5
153
 167 00c0 04F0      		brlt .L15
154
 168               	.LM16:
155
 169 00c2 81E0      		ldi r24,lo8(1)
156
 170 00c4 8093 0000 		sts ret.1333,r24
157
 171               	.LVL7:
158
 172               	.L19:
159
 173               	.LM17:
160
 174 00c8 1092 0000 		sts (battery_low_count)+1,__zero_reg__
161
 175 00cc 1092 0000 		sts battery_low_count,__zero_reg__
162
 176               	.L15:
163
 177               	.LM18:
164
 178 00d0 85E0      		ldi r24,lo8(5)
165
 179               	.LVL8:
166
 180 00d2 8093 0000 		sts next_read.1332,r24
167
 181 00d6 00C0      		rjmp .L17
168
 182               	.L11:
169
 183               	.LM19:
170
 184 00d8 2150      		subi r18,lo8(-(-1))
171
 185 00da 2093 0000 		sts next_read.1332,r18
172
 186               	.L17:
173
 187 00de 8091 0000 		lds r24,ret.1333
174
 188               	.LM20:
175
 189 00e2 9927      		clr r25
176
 190               	/* epilogue: frame size=0 */
177
 191 00e4 0895      		ret
178
 192               	/* epilogue end (size=1) */
179
 193               	/* function battery_low size 42 (41) */
180
 194               	.LFE4:
181
 196               		.lcomm ret.1333,1
182
 197               		.lcomm next_read.1332,1
183
 198               		.comm battery_low_count,2,1
184
 247               	.Letext0:
185
DEFINED SYMBOLS
186
                            *ABS*:00000000 battery.c
187
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:3      *ABS*:0000003f __SREG__
188
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:4      *ABS*:0000003e __SP_H__
189
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:5      *ABS*:0000003d __SP_L__
190
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:6      *ABS*:00000000 __tmp_reg__
191
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:7      *ABS*:00000001 __zero_reg__
192
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:20     .text:00000000 battery
193
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:53     .text:00000028 battery8
194
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:70     .text:00000032 battery8_avg
195
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:138    .text:00000094 battery_low
196
F:\DOCUME~1\Evan\LOCALS~1\Temp/ccIpUUgL.s:196    .bss:00000001 next_read.1332
197
                             .bss:00000000 ret.1333
198
                            *COM*:00000002 battery_low_count
199

    
200
UNDEFINED SYMBOLS
201
__do_copy_data
202
__do_clear_bss
203
analog8
204
__divmodsi4