Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
110 mikeljo 1
   1               		.file	"base64.c"
2
   2               		.arch atmega32
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	base64_decode
12
  20               	base64_decode:
13
  21               	.LFB5:
14
  22               	.LM1:
15
  23               	/* prologue: frame size=0 */
16
  24               	/* prologue end (size=0) */
17
  25 0000 A82F      		mov r26,r24
18
  26               	.LM2:
19
  27 0002 62E0      		ldi r22,lo8(2)
20
  28               	.LM3:
21
  29 0004 70E0      		ldi r23,lo8(0)
22
  30               	.L7:
23
  31               	.LM4:
24
  32 0006 6A17      		cp r22,r26
25
  33 0008 B0F5      		brsh .L6
26
  34               	.LM5:
27
  35 000a E62F      		mov r30,r22
28
  36 000c FF27      		clr r31
29
  37 000e E050      		subi r30,lo8(-(r_buffer))
30
  38 0010 F040      		sbci r31,hi8(-(r_buffer))
31
  39 0012 8081      		ld r24,Z
32
  40 0014 8D53      		subi r24,lo8(-(-61))
33
  41               	.LM6:
34
  42 0016 3181      		ldd r19,Z+1
35
  43 0018 3D53      		subi r19,lo8(-(-61))
36
  44               	.LM7:
37
  45 001a 5281      		ldd r21,Z+2
38
  46 001c 5D53      		subi r21,lo8(-(-61))
39
  47               	.LM8:
40
  48 001e 4381      		ldd r20,Z+3
41
  49 0020 4D53      		subi r20,lo8(-(-61))
42
  50               	.LM9:
43
  51 0022 6C5F      		subi r22,lo8(-(4))
44
  52               	.LM10:
45
  53 0024 E72F      		mov r30,r23
46
  54 0026 FF27      		clr r31
47
  55 0028 E050      		subi r30,lo8(-(p_buffer))
48
  56 002a F040      		sbci r31,hi8(-(p_buffer))
49
  57 002c 9927      		clr r25
50
  58 002e 880F      		lsl r24
51
  59 0030 991F      		rol r25
52
  60 0032 880F      		lsl r24
53
  61 0034 991F      		rol r25
54
  62 0036 232F      		mov r18,r19
55
  63 0038 2295      		swap r18
56
  64 003a 2F70      		andi r18,0x0f
57
  65 003c 282B      		or r18,r24
58
  66 003e 2083      		st Z,r18
59
  67               	.LM11:
60
  68 0040 832F      		mov r24,r19
61
  69 0042 9927      		clr r25
62
  70 0044 8F70      		andi r24,lo8(15)
63
  71 0046 9070      		andi r25,hi8(15)
64
  72 0048 34E0      		ldi r19,4
65
  73 004a 880F      	1:	lsl r24
66
  74 004c 991F      		rol r25
67
  75 004e 3A95      		dec r19
68
  76 0050 E1F7      		brne 1b
69
  77 0052 252F      		mov r18,r21
70
  78 0054 2695      		lsr r18
71
  79 0056 2695      		lsr r18
72
  80 0058 282B      		or r18,r24
73
  81 005a 2183      		std Z+1,r18
74
  82               	.LM12:
75
  83 005c 852F      		mov r24,r21
76
  84 005e 9927      		clr r25
77
  85 0060 8370      		andi r24,lo8(3)
78
  86 0062 9070      		andi r25,hi8(3)
79
  87 0064 26E0      		ldi r18,6
80
  88 0066 880F      	1:	lsl r24
81
  89 0068 991F      		rol r25
82
  90 006a 2A95      		dec r18
83
  91 006c E1F7      		brne 1b
84
  92 006e 482B      		or r20,r24
85
  93 0070 4283      		std Z+2,r20
86
  94               	.LM13:
87
  95 0072 7D5F      		subi r23,lo8(-(3))
88
  96 0074 C8CF      		rjmp .L7
89
  97               	.L6:
90
  98               	.LM14:
91
  99 0076 872F      		mov r24,r23
92
 100 0078 9927      		clr r25
93
 101               	/* epilogue: frame size=0 */
94
 102 007a 0895      		ret
95
 103               	/* epilogue end (size=1) */
96
 104               	/* function base64_decode size 62 (61) */
97
 105               	.LFE5:
98
 107               	.global	get_message
99
 109               	get_message:
100
 110               	.LFB4:
101
 111               	.LM15:
102
 112               	/* prologue: frame size=0 */
103
 113 007c CF93      		push r28
104
 114               	/* prologue end (size=1) */
105
 115               	.LM16:
106
 116 007e 84E1      		ldi r24,lo8(20)
107
 117 0080 8093 0000 		sts timer,r24
108
 118               	.L9:
109
 119               	.LM17:
110
 120 0084 0E94 0000 		call RS232_get
111
 121 0088 8332      		cpi r24,lo8(35)
112
 122 008a 21F0      		breq .L10
113
 123 008c 8091 0000 		lds r24,timer
114
 124 0090 8823      		tst r24
115
 125 0092 C1F7      		brne .L9
116
 126               	.L10:
117
 127               	.LM18:
118
 128 0094 8091 0000 		lds r24,timer
119
 129 0098 8823      		tst r24
120
 130 009a 99F0      		breq .L12
121
 131               	.LM19:
122
 132 009c C0E0      		ldi r28,lo8(0)
123
 133               	.L13:
124
 134               	.LM20:
125
 135 009e 0E94 0000 		call RS232_get
126
 136               	.LM21:
127
 137 00a2 EC2F      		mov r30,r28
128
 138 00a4 FF27      		clr r31
129
 139 00a6 E050      		subi r30,lo8(-(r_buffer))
130
 140 00a8 F040      		sbci r31,hi8(-(r_buffer))
131
 141 00aa 8083      		st Z,r24
132
 142 00ac CF5F      		subi r28,lo8(-(1))
133
 143               	.LM22:
134
 144 00ae C7FD      		sbrc r28,7
135
 145               	.LM23:
136
 146 00b0 CFE7      		ldi r28,lo8(127)
137
 147               	.L15:
138
 148               	.LM24:
139
 149 00b2 8D30      		cpi r24,lo8(13)
140
 150 00b4 A1F7      		brne .L13
141
 151               	.LM25:
142
 152 00b6 8C2F      		mov r24,r28
143
 153 00b8 0E94 0000 		call base64_decode
144
 154               	.LM26:
145
 155 00bc 80E0      		ldi r24,lo8(0)
146
 156 00be 90E0      		ldi r25,hi8(0)
147
 157 00c0 02C0      		rjmp .L8
148
 158               	.L12:
149
 159               	.LM27:
150
 160 00c2 81E0      		ldi r24,lo8(1)
151
 161 00c4 90E0      		ldi r25,hi8(1)
152
 162               	.L8:
153
 163               	/* epilogue: frame size=0 */
154
 164 00c6 CF91      		pop r28
155
 165 00c8 0895      		ret
156
 166               	/* epilogue end (size=2) */
157
 167               	/* function get_message size 40 (37) */
158
 168               	.LFE4:
159
 170               	.global	base64_send
160
 172               	base64_send:
161
 173               	.LFB6:
162
 174               	.LM28:
163
 175               	/* prologue: frame size=0 */
164
 176 00ca FF92      		push r15
165
 177 00cc 0F93      		push r16
166
 178 00ce 1F93      		push r17
167
 179 00d0 CF93      		push r28
168
 180               	/* prologue end (size=4) */
169
 181 00d2 A82F      		mov r26,r24
170
 182               	.LM29:
171
 183 00d4 8091 0000 		lds r24,p_buffer
172
 184 00d8 8093 0000 		sts r_buffer,r24
173
 185               	.LM30:
174
 186 00dc 8091 0000 		lds r24,p_buffer+1
175
 187 00e0 8093 0000 		sts r_buffer+1,r24
176
 188               	.LM31:
177
 189 00e4 8091 0000 		lds r24,p_buffer+2
178
 190 00e8 8093 0000 		sts r_buffer+2,r24
179
 191               	.LM32:
180
 192 00ec 43E0      		ldi r20,lo8(3)
181
 193 00ee F42E      		mov r15,r20
182
 194               	.LM33:
183
 195 00f0 7F2D      		mov r23,r15
184
 196               	.LM34:
185
 197 00f2 FA16      		cp r15,r26
186
 198 00f4 E0F5      		brsh .L31
187
 199               	.L21:
188
 200               	.LM35:
189
 201 00f6 E72F      		mov r30,r23
190
 202 00f8 FF27      		clr r31
191
 203 00fa E050      		subi r30,lo8(-(p_buffer))
192
 204 00fc F040      		sbci r31,hi8(-(p_buffer))
193
 205 00fe 9081      		ld r25,Z
194
 206               	.LM36:
195
 207 0100 2181      		ldd r18,Z+1
196
 208               	.LM37:
197
 209 0102 6281      		ldd r22,Z+2
198
 210               	.LM38:
199
 211 0104 7D5F      		subi r23,lo8(-(3))
200
 212               	.LM39:
201
 213 0106 EF2D      		mov r30,r15
202
 214 0108 FF27      		clr r31
203
 215 010a E050      		subi r30,lo8(-(r_buffer))
204
 216 010c F040      		sbci r31,hi8(-(r_buffer))
205
 217 010e 892F      		mov r24,r25
206
 218 0110 8695      		lsr r24
207
 219 0112 8695      		lsr r24
208
 220 0114 835C      		subi r24,lo8(-(61))
209
 221 0116 8083      		st Z,r24
210
 222               	.LM40:
211
 223 0118 892F      		mov r24,r25
212
 224 011a 9927      		clr r25
213
 225 011c 8370      		andi r24,lo8(3)
214
 226 011e 9070      		andi r25,hi8(3)
215
 227 0120 34E0      		ldi r19,4
216
 228 0122 880F      	1:	lsl r24
217
 229 0124 991F      		rol r25
218
 230 0126 3A95      		dec r19
219
 231 0128 E1F7      		brne 1b
220
 232 012a 422F      		mov r20,r18
221
 233 012c 5527      		clr r21
222
 234 012e 9A01      		movw r18,r20
223
 235 0130 94E0      		ldi r25,4
224
 236 0132 3695      	1:	lsr r19
225
 237 0134 2795      		ror r18
226
 238 0136 9A95      		dec r25
227
 239 0138 E1F7      		brne 1b
228
 240 013a 822B      		or r24,r18
229
 241 013c 835C      		subi r24,lo8(-(61))
230
 242 013e 8183      		std Z+1,r24
231
 243               	.LM41:
232
 244 0140 4F70      		andi r20,lo8(15)
233
 245 0142 5070      		andi r21,hi8(15)
234
 246 0144 440F      		lsl r20
235
 247 0146 551F      		rol r21
236
 248 0148 440F      		lsl r20
237
 249 014a 551F      		rol r21
238
 250 014c 862F      		mov r24,r22
239
 251 014e 9927      		clr r25
240
 252 0150 16E0      		ldi r17,6
241
 253 0152 9695      	1:	lsr r25
242
 254 0154 8795      		ror r24
243
 255 0156 1A95      		dec r17
244
 256 0158 E1F7      		brne 1b
245
 257 015a 842B      		or r24,r20
246
 258 015c 835C      		subi r24,lo8(-(61))
247
 259 015e 8283      		std Z+2,r24
248
 260               	.LM42:
249
 261 0160 6F73      		andi r22,lo8(63)
250
 262 0162 635C      		subi r22,lo8(-(61))
251
 263 0164 6383      		std Z+3,r22
252
 264               	.LM43:
253
 265 0166 84E0      		ldi r24,lo8(4)
254
 266 0168 F80E      		add r15,r24
255
 267 016a 7A17      		cp r23,r26
256
 268 016c 20F2      		brlo .L21
257
 269               	.L31:
258
 270               	.LM44:
259
 271 016e 20E0      		ldi r18,lo8(0)
260
 272 0170 30E0      		ldi r19,hi8(0)
261
 273               	.LM45:
262
 274 0172 C0E0      		ldi r28,lo8(0)
263
 275 0174 CF15      		cp r28,r15
264
 276 0176 40F4      		brsh .L33
265
 277 0178 E0E0      		ldi r30,lo8(r_buffer)
266
 278 017a F0E0      		ldi r31,hi8(r_buffer)
267
 279               	.L25:
268
 280               	.LM46:
269
 281 017c 8191      		ld r24,Z+
270
 282 017e 280F      		add r18,r24
271
 283 0180 311D      		adc r19,__zero_reg__
272
 284               	.LM47:
273
 285 0182 CF5F      		subi r28,lo8(-(1))
274
 286 0184 CF15      		cp r28,r15
275
 287 0186 D0F3      		brlo .L25
276
 288               	.L33:
277
 289               	.LM48:
278
 290 0188 3F70      		andi r19,hi8(4095)
279
 291               	.LM49:
280
 292 018a EF2D      		mov r30,r15
281
 293 018c FF27      		clr r31
282
 294 018e E050      		subi r30,lo8(-(r_buffer))
283
 295 0190 F040      		sbci r31,hi8(-(r_buffer))
284
 296 0192 C901      		movw r24,r18
285
 297 0194 C6E0      		ldi r28,6
286
 298 0196 9695      	1:	lsr r25
287
 299 0198 8795      		ror r24
288
 300 019a CA95      		dec r28
289
 301 019c E1F7      		brne 1b
290
 302 019e 835C      		subi r24,lo8(-(61))
291
 303 01a0 8083      		st Z,r24
292
 304               	.LM50:
293
 305 01a2 2F73      		andi r18,lo8(63)
294
 306 01a4 3070      		andi r19,hi8(63)
295
 307 01a6 822F      		mov r24,r18
296
 308 01a8 835C      		subi r24,lo8(-(61))
297
 309 01aa 8183      		std Z+1,r24
298
 310               	.LM51:
299
 311 01ac 8DE0      		ldi r24,lo8(13)
300
 312 01ae 8283      		std Z+2,r24
301
 313               	.LM52:
302
 314 01b0 1382      		std Z+3,__zero_reg__
303
 315               	.LM53:
304
 316 01b2 83E0      		ldi r24,lo8(3)
305
 317 01b4 F80E      		add r15,r24
306
 318               	.LM54:
307
 319 01b6 C381      		ldd r28,Z+3
308
 320 01b8 CF15      		cp r28,r15
309
 321 01ba 50F4      		brsh .L35
310
 322 01bc 00E0      		ldi r16,lo8(r_buffer)
311
 323 01be 10E0      		ldi r17,hi8(r_buffer)
312
 324               	.L29:
313
 325               	.LM55:
314
 326 01c0 F801      		movw r30,r16
315
 327 01c2 8191      		ld r24,Z+
316
 328 01c4 8F01      		movw r16,r30
317
 329 01c6 0E94 0000 		call RS232_send
318
 330               	.LM56:
319
 331 01ca CF5F      		subi r28,lo8(-(1))
320
 332 01cc CF15      		cp r28,r15
321
 333 01ce C0F3      		brlo .L29
322
 334               	.L35:
323
 335               	/* epilogue: frame size=0 */
324
 336 01d0 CF91      		pop r28
325
 337 01d2 1F91      		pop r17
326
 338 01d4 0F91      		pop r16
327
 339 01d6 FF90      		pop r15
328
 340 01d8 0895      		ret
329
 341               	/* epilogue end (size=5) */
330
 342               	/* function base64_send size 137 (128) */
331
 343               	.LFE6:
332
 345               		.comm r_buffer,128,1
333
 346               		.comm p_buffer,128,1
334
 347               		.comm display_buffer,1024,1
335
 348               		.comm display_buffer_pointer,2,1
336
 349               		.comm display_buffer_counter,1,1
337
 350               		.comm display_page_counter,1,1
338
 351               		.comm display_mode,1,1
339
 352               	.Letext0:
340
DEFINED SYMBOLS
341
                            *ABS*:00000000 base64.c
342
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:3      *ABS*:0000003f __SREG__
343
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:4      *ABS*:0000003e __SP_H__
344
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:5      *ABS*:0000003d __SP_L__
345
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:6      *ABS*:00000000 __tmp_reg__
346
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:7      *ABS*:00000001 __zero_reg__
347
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:20     .text:00000000 base64_decode
348
                            *COM*:00000080 r_buffer
349
                            *COM*:00000080 p_buffer
350
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:109    .text:0000007c get_message
351
C:\DOKUME~1\thomas\LOKALE~1\Temp/ccmIaaaa.s:172    .text:000000ca base64_send
352
                            *COM*:00000400 display_buffer
353
                            *COM*:00000002 display_buffer_pointer
354
                            *COM*:00000001 display_buffer_counter
355
                            *COM*:00000001 display_page_counter
356
                            *COM*:00000001 display_mode
357
 
358
UNDEFINED SYMBOLS
359
__do_copy_data
360
__do_clear_bss
361
timer
362
RS232_get
363
RS232_send