Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | |
2 | main.elf: file format elf32-avr |
||
3 | |||
4 | Sections: |
||
5 | Idx Name Size VMA LMA File off Algn |
||
6 | |||
7 | CONTENTS, ALLOC, LOAD, READONLY, CODE |
||
8 | 1 .data 00000024 00800060 00001bec 00001c80 2**0 |
||
9 | CONTENTS, ALLOC, LOAD, DATA |
||
10 | 2 .bss 00000156 00800084 00800084 00001ca4 2**0 |
||
11 | ALLOC |
||
12 | 3 .noinit 00000000 008001da 008001da 00001ca4 2**0 |
||
13 | CONTENTS |
||
14 | 4 .eeprom 00000000 00810000 00810000 00001ca4 2**0 |
||
15 | CONTENTS |
||
16 | 5 .stab 0000036c 00000000 00000000 00001ca4 2**2 |
||
17 | CONTENTS, READONLY, DEBUGGING |
||
18 | 6 .stabstr 00000084 00000000 00000000 00002010 2**0 |
||
19 | CONTENTS, READONLY, DEBUGGING |
||
20 | 7 .debug_aranges 000000b4 00000000 00000000 00002094 2**0 |
||
21 | CONTENTS, READONLY, DEBUGGING |
||
22 | 8 .debug_pubnames 000006f5 00000000 00000000 00002148 2**0 |
||
23 | CONTENTS, READONLY, DEBUGGING |
||
24 | 9 .debug_info 00001a41 00000000 00000000 0000283d 2**0 |
||
25 | CONTENTS, READONLY, DEBUGGING |
||
26 | 10 .debug_abbrev 00000774 00000000 00000000 0000427e 2**0 |
||
27 | CONTENTS, READONLY, DEBUGGING |
||
28 | 11 .debug_line 0000169d 00000000 00000000 000049f2 2**0 |
||
29 | CONTENTS, READONLY, DEBUGGING |
||
30 | 12 .debug_str 00000874 00000000 00000000 0000608f 2**0 |
||
31 | CONTENTS, READONLY, DEBUGGING |
||
32 | Disassembly of section .text: |
||
33 | |||
34 | 00000000 <__vectors>: |
||
35 | 0: 0c 94 85 00 jmp 0x10a <__init> |
||
36 | 4: 0c 94 7e 0b jmp 0x16fc <__vector_1> |
||
37 | 8: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
38 | c: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
39 | 10: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
40 | 14: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
41 | 18: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
42 | 1c: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
43 | 20: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
44 | 24: 0c 94 67 09 jmp 0x12ce <__vector_9> |
||
45 | 28: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
46 | 2c: 0c 94 96 0b jmp 0x172c <__vector_11> |
||
47 | 30: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
48 | 34: 0c 94 18 02 jmp 0x430 <__vector_13> |
||
49 | 38: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
50 | 3c: 0c 94 e3 01 jmp 0x3c6 <__vector_15> |
||
51 | 40: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
52 | 44: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
53 | 48: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
54 | 4c: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
55 | 50: 0c 94 a0 00 jmp 0x140 <__bad_interrupt> |
||
56 | |||
57 | 00000054 <__ctors_end>: |
||
58 | 54: 20 2d mov r18, r0 |
||
59 | 56: 2d 20 and r2, r13 |
||
60 | 58: 52 65 ori r21, 0x52 ; 82 |
||
61 | 5a: 6d 6f ori r22, 0xFD ; 253 |
||
62 | 5c: 74 65 ori r23, 0x54 ; 84 |
||
63 | 5e: 20 20 and r2, r0 |
||
64 | 60: 2d 2d mov r18, r13 |
||
65 | 62: 20 20 and r2, r0 |
||
66 | 64: 20 20 and r2, r0 |
||
67 | 66: 20 20 and r2, r0 |
||
68 | ... |
||
69 | |||
70 | 00000069 <__c.1>: |
||
71 | 69: 20 2d 2d 20 44 69 73 70 6c 61 79 20 2d 2d 20 20 -- Display -- |
||
72 | 79: 20 20 20 20 00 . |
||
73 | |||
74 | 0000007e <__c.2>: |
||
75 | 7e: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |
||
76 | 8e: 20 20 20 20 00 . |
||
77 | |||
78 | 00000093 <__c.3>: |
||
79 | 93: 20 20 77 77 77 2e 4d 69 63 72 6f 53 50 53 2e 63 www.MicroSPS.c |
||
80 | a3: 6f 6d 20 20 00 om . |
||
81 | |||
82 | 000000a8 <__c.2>: |
||
83 | a8: 25 73 00 %s. |
||
84 | |||
85 | 000000ab <__c.3>: |
||
86 | ab: 25 73 00 %s. |
||
87 | |||
88 | 000000ae <__c.4>: |
||
89 | ae: 25 73 00 %s. |
||
90 | |||
91 | 000000b1 <__c.5>: |
||
92 | b1: 25 73 00 %s. |
||
93 | |||
94 | 000000b4 <__c.3>: |
||
95 | b4: 56 65 72 62 69 6e 64 65 6e 20 6d 69 74 00 Verbinden mit. |
||
96 | |||
97 | 000000c2 <__c.4>: |
||
98 | c2: 4d 69 63 72 6f 53 50 53 3a 25 32 69 20 00 MicroSPS:%2i . |
||
99 | |||
100 | 000000d0 <__c.5>: |
||
101 | d0: 4d 61 78 20 41 64 72 65 73 73 65 00 Max Adresse. |
||
102 | |||
103 | 000000dc <__c.6>: |
||
104 | dc: 25 32 69 20 00 %2i . |
||
105 | |||
106 | 000000e1 <__c.7>: |
||
107 | e1: 43 68 65 63 6b 73 75 6d 00 Checksum. |
||
108 | |||
109 | 000000ea <__c.8>: |
||
110 | ea: 45 72 72 6f 72 73 3a 25 35 69 20 00 Errors:%5i . |
||
111 | |||
112 | 000000f6 <__c.9>: |
||
113 | f6: 44 69 73 70 6c 61 79 00 Display. |
||
114 | |||
115 | 000000fe <__c.10>: |
||
116 | fe: 5a 65 69 6c 65 6e 3a 25 31 69 20 00 Zeilen:%1i . |
||
117 | |||
118 | 0000010a <__init>: |
||
119 | 10a: 11 24 eor r1, r1 |
||
120 | 10c: 1f be out 0x3f, r1 ; 63 |
||
121 | 10e: cf e5 ldi r28, 0x5F ; 95 |
||
122 | 110: d8 e0 ldi r29, 0x08 ; 8 |
||
123 | 112: de bf out 0x3e, r29 ; 62 |
||
124 | 114: cd bf out 0x3d, r28 ; 61 |
||
125 | |||
126 | 00000116 <__do_copy_data>: |
||
127 | 116: 10 e0 ldi r17, 0x00 ; 0 |
||
128 | 118: a0 e6 ldi r26, 0x60 ; 96 |
||
129 | 11a: b0 e0 ldi r27, 0x00 ; 0 |
||
130 | 11c: ec ee ldi r30, 0xEC ; 236 |
||
131 | 11e: fb e1 ldi r31, 0x1B ; 27 |
||
132 | 120: 02 c0 rjmp .+4 ; 0x126 <.do_copy_data_start> |
||
133 | |||
134 | 00000122 <.do_copy_data_loop>: |
||
135 | 122: 05 90 lpm r0, Z+ |
||
136 | 124: 0d 92 st X+, r0 |
||
137 | |||
138 | 00000126 <.do_copy_data_start>: |
||
139 | 126: a4 38 cpi r26, 0x84 ; 132 |
||
140 | 128: b1 07 cpc r27, r17 |
||
141 | 12a: d9 f7 brne .-10 ; 0x122 <.do_copy_data_loop> |
||
142 | |||
143 | 0000012c <__do_clear_bss>: |
||
144 | 12c: 11 e0 ldi r17, 0x01 ; 1 |
||
145 | 12e: a4 e8 ldi r26, 0x84 ; 132 |
||
146 | 130: b0 e0 ldi r27, 0x00 ; 0 |
||
147 | 132: 01 c0 rjmp .+2 ; 0x136 <.do_clear_bss_start> |
||
148 | |||
149 | 00000134 <.do_clear_bss_loop>: |
||
150 | 134: 1d 92 st X+, r1 |
||
151 | |||
152 | 00000136 <.do_clear_bss_start>: |
||
153 | 136: aa 3d cpi r26, 0xDA ; 218 |
||
154 | 138: b1 07 cpc r27, r17 |
||
155 | 13a: e1 f7 brne .-8 ; 0x134 <.do_clear_bss_loop> |
||
156 | 13c: 0c 94 e5 00 jmp 0x1ca <main> |
||
157 | |||
158 | 00000140 <__bad_interrupt>: |
||
159 | 140: 0c 94 00 00 jmp 0x0 <__vectors> |
||
160 | |||
161 | 00000144 <Sekundentakt_Init>: |
||
162 | unsigned int IntervallDebug = 250, IntervallDisplay = 120; |
||
163 | |||
164 | void Sekundentakt_Init(void) |
||
165 | { |
||
166 | _SekTimer = SetDelay(1000); |
||
167 | 144: 88 ee ldi r24, 0xE8 ; 232 |
||
168 | 146: 93 e0 ldi r25, 0x03 ; 3 |
||
169 | 148: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
170 | 14c: 90 93 91 00 sts 0x0091, r25 |
||
171 | 150: 80 93 90 00 sts 0x0090, r24 |
||
172 | 154: 08 95 ret |
||
173 | |||
174 | 00000156 <Sekundentakt>: |
||
175 | } |
||
176 | |||
177 | void Sekundentakt(void) |
||
178 | { |
||
179 | if(CheckDelay(_SekTimer)) |
||
180 | 156: 80 91 90 00 lds r24, 0x0090 |
||
181 | 15a: 90 91 91 00 lds r25, 0x0091 |
||
182 | 15e: 0e 94 b1 09 call 0x1362 <CheckDelay> |
||
183 | 162: 88 23 and r24, r24 |
||
184 | 164: 31 f1 breq .+76 ; 0x1b2 <Sekundentakt+0x5c> |
||
185 | { |
||
186 | GetKeyboard(); |
||
187 | 166: 0e 94 d2 09 call 0x13a4 <GetKeyboard> |
||
188 | _SekTimer += 1000; |
||
189 | 16a: 80 91 90 00 lds r24, 0x0090 |
||
190 | 16e: 90 91 91 00 lds r25, 0x0091 |
||
191 | 172: 88 51 subi r24, 0x18 ; 24 |
||
192 | 174: 9c 4f sbci r25, 0xFC ; 252 |
||
193 | 176: 90 93 91 00 sts 0x0091, r25 |
||
194 | 17a: 80 93 90 00 sts 0x0090, r24 |
||
195 | if(!CntDatensaetzeProSekunde) UebertragungUnterbrochen = 1; else UebertragungUnterbrochen = 0; |
||
196 | 17e: 80 91 66 00 lds r24, 0x0066 |
||
197 | 182: 88 23 and r24, r24 |
||
198 | 184: 21 f4 brne .+8 ; 0x18e <Sekundentakt+0x38> |
||
199 | 186: 81 e0 ldi r24, 0x01 ; 1 |
||
200 | 188: 80 93 84 00 sts 0x0084, r24 |
||
201 | 18c: 02 c0 rjmp .+4 ; 0x192 <Sekundentakt+0x3c> |
||
202 | 18e: 10 92 84 00 sts 0x0084, r1 |
||
203 | CntDatensaetzeProSekunde = 0; |
||
204 | 192: 10 92 66 00 sts 0x0066, r1 |
||
205 | if(++Sekunde == 60) |
||
206 | 196: 80 91 8d 00 lds r24, 0x008D |
||
207 | 19a: 8f 5f subi r24, 0xFF ; 255 |
||
208 | 19c: 80 93 8d 00 sts 0x008D, r24 |
||
209 | 1a0: 8c 33 cpi r24, 0x3C ; 60 |
||
210 | 1a2: 39 f4 brne .+14 ; 0x1b2 <Sekundentakt+0x5c> |
||
211 | { |
||
212 | Sekunde = 0; |
||
213 | 1a4: 10 92 8d 00 sts 0x008D, r1 |
||
214 | Minute++; |
||
215 | 1a8: 80 91 8c 00 lds r24, 0x008C |
||
216 | 1ac: 8f 5f subi r24, 0xFF ; 255 |
||
217 | 1ae: 80 93 8c 00 sts 0x008C, r24 |
||
218 | 1b2: 08 95 ret |
||
219 | |||
220 | 000001b4 <Init>: |
||
221 | } |
||
222 | } |
||
223 | } |
||
224 | |||
225 | void Init(void) |
||
226 | { |
||
227 | VersionInfo.Hauptversion = 0; |
||
228 | 1b4: 10 92 c9 00 sts 0x00C9, r1 |
||
229 | VersionInfo.Nebenversion = 99; |
||
230 | 1b8: 83 e6 ldi r24, 0x63 ; 99 |
||
231 | 1ba: 80 93 ca 00 sts 0x00CA, r24 |
||
232 | VersionInfo.PCKompatibel = 1; |
||
233 | 1be: 81 e0 ldi r24, 0x01 ; 1 |
||
234 | 1c0: 80 93 cb 00 sts 0x00CB, r24 |
||
235 | VersionInfo.Commercial = 0x00; |
||
236 | 1c4: 10 92 cc 00 sts 0x00CC, r1 |
||
237 | 1c8: 08 95 ret |
||
238 | |||
239 | 000001ca <main>: |
||
240 | } |
||
241 | |||
242 | #define MENU 0 |
||
243 | #define REMOTE 1 |
||
244 | |||
245 | //############################################################################ |
||
246 | //Hauptprogramm |
||
247 | void main (void) |
||
248 | //############################################################################ |
||
249 | { |
||
250 | 1ca: ca e5 ldi r28, 0x5A ; 90 |
||
251 | 1cc: d8 e0 ldi r29, 0x08 ; 8 |
||
252 | 1ce: de bf out 0x3e, r29 ; 62 |
||
253 | 1d0: cd bf out 0x3d, r28 ; 61 |
||
254 | char z,txt[]= {"Moin"},key,key_old = 255; |
||
255 | 1d2: de 01 movw r26, r28 |
||
256 | 1d4: 11 96 adiw r26, 0x01 ; 1 |
||
257 | 1d6: e7 e6 ldi r30, 0x67 ; 103 |
||
258 | 1d8: f0 e0 ldi r31, 0x00 ; 0 |
||
259 | 1da: 85 e0 ldi r24, 0x05 ; 5 |
||
260 | 1dc: 01 90 ld r0, Z+ |
||
261 | 1de: 0d 92 st X+, r0 |
||
262 | 1e0: 81 50 subi r24, 0x01 ; 1 |
||
263 | 1e2: e1 f7 brne .-8 ; 0x1dc <main+0x12> |
||
264 | int test = 0; |
||
265 | unsigned int DelayTast; |
||
266 | unsigned int DelayDaten,DelayDisplay; |
||
267 | |||
268 | |||
269 | unsigned char mode = REMOTE; |
||
270 | 1e4: 91 e0 ldi r25, 0x01 ; 1 |
||
271 | 1e6: b9 2e mov r11, r25 |
||
272 | unsigned char neueDatenuebertragung = 1; |
||
273 | |||
274 | UART_Init(); |
||
275 | 1e8: 0e 94 cc 04 call 0x998 <UART_Init> |
||
276 | LCD_Init(); |
||
277 | 1ec: 0e 94 1f 06 call 0xc3e <LCD_Init> |
||
278 | UART_Init(); |
||
279 | 1f0: 0e 94 cc 04 call 0x998 <UART_Init> |
||
280 | Timer1_Init(); |
||
281 | 1f4: 0e 94 9e 09 call 0x133c <Timer1_Init> |
||
282 | Keyboard_Init(); |
||
283 | 1f8: 0e 94 c9 09 call 0x1392 <Keyboard_Init> |
||
284 | Sekundentakt_Init(); |
||
285 | 1fc: 0e 94 a2 00 call 0x144 <Sekundentakt_Init> |
||
286 | InitIR(); |
||
287 | 200: 0e 94 67 0b call 0x16ce <InitIR> |
||
288 | ADC_Init(); |
||
289 | 204: 0e 94 42 0c call 0x1884 <ADC_Init> |
||
290 | Init(); |
||
291 | 208: 0e 94 da 00 call 0x1b4 <Init> |
||
292 | |||
293 | sei ();//Globale Interrupts Einschalten |
||
294 | 20c: 78 94 sei |
||
295 | DDRB = 0xff; |
||
296 | 20e: 8f ef ldi r24, 0xFF ; 255 |
||
297 | 210: 87 bb out 0x17, r24 ; 23 |
||
298 | PORTB = 0x00; |
||
299 | 212: 18 ba out 0x18, r1 ; 24 |
||
300 | LCD_Clear; |
||
301 | 214: 81 e0 ldi r24, 0x01 ; 1 |
||
302 | 216: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
303 | 21a: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
304 | |||
305 | /* while(1) |
||
306 | */ |
||
307 | |||
308 | DelayTast = SetDelay(80); |
||
309 | 21e: 80 e5 ldi r24, 0x50 ; 80 |
||
310 | 220: 90 e0 ldi r25, 0x00 ; 0 |
||
311 | 222: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
312 | 226: 7c 01 movw r14, r24 |
||
313 | DelayDaten = SetDelay(200); |
||
314 | 228: 88 ec ldi r24, 0xC8 ; 200 |
||
315 | 22a: 90 e0 ldi r25, 0x00 ; 0 |
||
316 | 22c: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
317 | 230: 8c 01 movw r16, r24 |
||
318 | DelayDisplay = SetDelay(300); |
||
319 | 232: 8c e2 ldi r24, 0x2C ; 44 |
||
320 | 234: 91 e0 ldi r25, 0x01 ; 1 |
||
321 | 236: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
322 | 23a: 6c 01 movw r12, r24 |
||
323 | ClearIntervalle(); |
||
324 | 23c: 0e 94 2e 05 call 0xa5c <ClearIntervalle> |
||
325 | while (1) |
||
326 | { |
||
327 | if(mode == MENU) |
||
328 | 240: bb 20 and r11, r11 |
||
329 | 242: 11 f5 brne .+68 ; 0x288 <main+0xbe> |
||
330 | { |
||
331 | Delay_ms(10); |
||
332 | 244: 8a e0 ldi r24, 0x0A ; 10 |
||
333 | 246: 90 e0 ldi r25, 0x00 ; 0 |
||
334 | 248: 0e 94 bc 09 call 0x1378 <Delay_ms> |
||
335 | key = GetKeyboard(); |
||
336 | 24c: 0e 94 d2 09 call 0x13a4 <GetKeyboard> |
||
337 | Menu(key); |
||
338 | 250: 99 27 eor r25, r25 |
||
339 | 252: 0e 94 64 0a call 0x14c8 <Menu> |
||
340 | if(_TASTE5) |
||
341 | 256: cb 9b sbis 0x19, 3 ; 25 |
||
342 | 258: f5 cf rjmp .-22 ; 0x244 <main+0x7a> |
||
343 | { |
||
344 | do { Delay_ms(10);} while(_TASTE5); |
||
345 | 25a: 8a e0 ldi r24, 0x0A ; 10 |
||
346 | 25c: 90 e0 ldi r25, 0x00 ; 0 |
||
347 | 25e: 0e 94 bc 09 call 0x1378 <Delay_ms> |
||
348 | 262: cb 99 sbic 0x19, 3 ; 25 |
||
349 | 264: fa cf rjmp .-12 ; 0x25a <main+0x90> |
||
350 | mode = REMOTE; |
||
351 | 266: 81 e0 ldi r24, 0x01 ; 1 |
||
352 | 268: b8 2e mov r11, r24 |
||
353 | DelayTast = SetDelay(100); |
||
354 | 26a: 84 e6 ldi r24, 0x64 ; 100 |
||
355 | 26c: 90 e0 ldi r25, 0x00 ; 0 |
||
356 | 26e: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
357 | 272: 7c 01 movw r14, r24 |
||
358 | DelayDaten = SetDelay(200); |
||
359 | 274: 88 ec ldi r24, 0xC8 ; 200 |
||
360 | 276: 90 e0 ldi r25, 0x00 ; 0 |
||
361 | 278: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
362 | 27c: 8c 01 movw r16, r24 |
||
363 | LCD_Clear; |
||
364 | 27e: 8b 2d mov r24, r11 |
||
365 | 280: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
366 | 284: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
367 | } |
||
368 | } |
||
369 | else |
||
370 | if(mode == REMOTE) |
||
371 | 288: 81 e0 ldi r24, 0x01 ; 1 |
||
372 | 28a: b8 16 cp r11, r24 |
||
373 | 28c: c9 f6 brne .-78 ; 0x240 <main+0x76> |
||
374 | { |
||
375 | BearbeiteRxDaten(); |
||
376 | 28e: 0e 94 fe 03 call 0x7fc <BearbeiteRxDaten> |
||
377 | |||
378 | if(CheckDelay(DelayDaten)) |
||
379 | 292: c8 01 movw r24, r16 |
||
380 | 294: 0e 94 b1 09 call 0x1362 <CheckDelay> |
||
381 | 298: 88 23 and r24, r24 |
||
382 | 29a: c9 f3 breq .-14 ; 0x28e <main+0xc4> |
||
383 | { |
||
384 | Sekundentakt(); |
||
385 | 29c: 0e 94 ab 00 call 0x156 <Sekundentakt> |
||
386 | DelayDaten = SetDelay(10); |
||
387 | 2a0: 8a e0 ldi r24, 0x0A ; 10 |
||
388 | 2a2: 90 e0 ldi r25, 0x00 ; 0 |
||
389 | 2a4: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
390 | 2a8: 8c 01 movw r16, r24 |
||
391 | |||
392 | if(CheckDelay(DelayDisplay)) |
||
393 | 2aa: c6 01 movw r24, r12 |
||
394 | 2ac: 0e 94 b1 09 call 0x1362 <CheckDelay> |
||
395 | 2b0: 88 23 and r24, r24 |
||
396 | 2b2: 39 f0 breq .+14 ; 0x2c2 <main+0xf8> |
||
397 | { |
||
398 | DelayDisplay = SetDelay(300); |
||
399 | 2b4: 8c e2 ldi r24, 0x2C ; 44 |
||
400 | 2b6: 91 e0 ldi r25, 0x01 ; 1 |
||
401 | 2b8: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
402 | 2bc: 6c 01 movw r12, r24 |
||
403 | PollDisplay = 1; |
||
404 | 2be: b0 92 ed 00 sts 0x00ED, r11 |
||
405 | } |
||
406 | key = GetKeyboard2(); |
||
407 | 2c2: 0e 94 57 0a call 0x14ae <GetKeyboard2> |
||
408 | DatenUebertragung(key); |
||
409 | 2c6: 99 27 eor r25, r25 |
||
410 | 2c8: 0e 94 51 05 call 0xaa2 <DatenUebertragung> |
||
411 | |||
412 | if(UebertragungUnterbrochen) |
||
413 | 2cc: 80 91 84 00 lds r24, 0x0084 |
||
414 | 2d0: 88 23 and r24, r24 |
||
415 | 2d2: 81 f1 breq .+96 ; 0x334 <main+0x16a> |
||
416 | { |
||
417 | //01234567890123456789 |
||
418 | LCD_printfxy(0,0," -- Remote -- "); |
||
419 | 2d4: 60 e0 ldi r22, 0x00 ; 0 |
||
420 | 2d6: 86 2f mov r24, r22 |
||
421 | 2d8: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
422 | 2dc: 84 e5 ldi r24, 0x54 ; 84 |
||
423 | 2de: 90 e0 ldi r25, 0x00 ; 0 |
||
424 | 2e0: 9f 93 push r25 |
||
425 | 2e2: 8f 93 push r24 |
||
426 | 2e4: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
427 | LCD_printfxy(0,1," -- Display -- "); |
||
428 | 2e8: 61 e0 ldi r22, 0x01 ; 1 |
||
429 | 2ea: 80 e0 ldi r24, 0x00 ; 0 |
||
430 | 2ec: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
431 | 2f0: 0f 90 pop r0 |
||
432 | 2f2: 0f 90 pop r0 |
||
433 | 2f4: 89 e6 ldi r24, 0x69 ; 105 |
||
434 | 2f6: 90 e0 ldi r25, 0x00 ; 0 |
||
435 | 2f8: 9f 93 push r25 |
||
436 | 2fa: 8f 93 push r24 |
||
437 | 2fc: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
438 | LCD_printfxy(0,2," "); |
||
439 | 300: 62 e0 ldi r22, 0x02 ; 2 |
||
440 | 302: 80 e0 ldi r24, 0x00 ; 0 |
||
441 | 304: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
442 | 308: 0f 90 pop r0 |
||
443 | 30a: 0f 90 pop r0 |
||
444 | 30c: 8e e7 ldi r24, 0x7E ; 126 |
||
445 | 30e: 90 e0 ldi r25, 0x00 ; 0 |
||
446 | 310: 9f 93 push r25 |
||
447 | 312: 8f 93 push r24 |
||
448 | 314: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
449 | LCD_printfxy(0,3," www.MicroSPS.com "); |
||
450 | 318: 63 e0 ldi r22, 0x03 ; 3 |
||
451 | 31a: 80 e0 ldi r24, 0x00 ; 0 |
||
452 | 31c: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
453 | 320: 0f 90 pop r0 |
||
454 | 322: 0f 90 pop r0 |
||
455 | 324: 83 e9 ldi r24, 0x93 ; 147 |
||
456 | 326: 90 e0 ldi r25, 0x00 ; 0 |
||
457 | 328: 9f 93 push r25 |
||
458 | 32a: 8f 93 push r24 |
||
459 | 32c: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
460 | 330: 0f 90 pop r0 |
||
461 | 332: 0f 90 pop r0 |
||
462 | } |
||
463 | |||
464 | if(CheckDelay(DelayTast)) |
||
465 | 334: c7 01 movw r24, r14 |
||
466 | 336: 0e 94 b1 09 call 0x1362 <CheckDelay> |
||
467 | 33a: 88 23 and r24, r24 |
||
468 | 33c: 09 f4 brne .+2 ; 0x340 <main+0x176> |
||
469 | 33e: a7 cf rjmp .-178 ; 0x28e <main+0xc4> |
||
470 | { |
||
471 | DelayTast = SetDelay(100); |
||
472 | 340: 84 e6 ldi r24, 0x64 ; 100 |
||
473 | 342: 90 e0 ldi r25, 0x00 ; 0 |
||
474 | 344: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
475 | 348: 7c 01 movw r14, r24 |
||
476 | |||
477 | if(_TASTE5) |
||
478 | 34a: cb 9b sbis 0x19, 3 ; 25 |
||
479 | 34c: 0c c0 rjmp .+24 ; 0x366 <main+0x19c> |
||
480 | { |
||
481 | do { Delay_ms(10);} while(_TASTE5); |
||
482 | 34e: 8a e0 ldi r24, 0x0A ; 10 |
||
483 | 350: 90 e0 ldi r25, 0x00 ; 0 |
||
484 | 352: 0e 94 bc 09 call 0x1378 <Delay_ms> |
||
485 | 356: cb 99 sbic 0x19, 3 ; 25 |
||
486 | 358: fa cf rjmp .-12 ; 0x34e <main+0x184> |
||
487 | mode = MENU; |
||
488 | 35a: bb 24 eor r11, r11 |
||
489 | LCD_Clear; |
||
490 | 35c: 81 e0 ldi r24, 0x01 ; 1 |
||
491 | 35e: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
492 | 362: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
493 | 366: 80 91 be 00 lds r24, 0x00BE |
||
494 | } |
||
495 | // if(key & 0x10) DebugIn.Digital[0] |= 0x01; else DebugIn.Digital[0] &= ~0x01; |
||
496 | if(PIND & 0x08) DebugIn.Digital[0] |= 0x02; else DebugIn.Digital[0] &= ~0x02; |
||
497 | 36a: 83 9b sbis 0x10, 3 ; 16 |
||
498 | 36c: 02 c0 rjmp .+4 ; 0x372 <main+0x1a8> |
||
499 | 36e: 82 60 ori r24, 0x02 ; 2 |
||
500 | 370: 01 c0 rjmp .+2 ; 0x374 <main+0x1aa> |
||
501 | 372: 8d 7f andi r24, 0xFD ; 253 |
||
502 | 374: 80 93 be 00 sts 0x00BE, r24 |
||
503 | 378: 80 91 be 00 lds r24, 0x00BE |
||
504 | if(PIND & 0x10) DebugIn.Digital[0] |= 0x04; else DebugIn.Digital[0] &= ~0x04; |
||
505 | 37c: 84 9b sbis 0x10, 4 ; 16 |
||
506 | 37e: 02 c0 rjmp .+4 ; 0x384 <main+0x1ba> |
||
507 | 380: 84 60 ori r24, 0x04 ; 4 |
||
508 | 382: 01 c0 rjmp .+2 ; 0x386 <main+0x1bc> |
||
509 | 384: 8b 7f andi r24, 0xFB ; 251 |
||
510 | 386: 80 93 be 00 sts 0x00BE, r24 |
||
511 | 38a: 80 91 be 00 lds r24, 0x00BE |
||
512 | if(PIND & 0x20) DebugIn.Digital[0] |= 0x08; else DebugIn.Digital[0] &= ~0x08; |
||
513 | 38e: 85 9b sbis 0x10, 5 ; 16 |
||
514 | 390: 02 c0 rjmp .+4 ; 0x396 <main+0x1cc> |
||
515 | 392: 88 60 ori r24, 0x08 ; 8 |
||
516 | 394: 01 c0 rjmp .+2 ; 0x398 <main+0x1ce> |
||
517 | 396: 87 7f andi r24, 0xF7 ; 247 |
||
518 | 398: 80 93 be 00 sts 0x00BE, r24 |
||
519 | 39c: 80 91 be 00 lds r24, 0x00BE |
||
520 | if(PIND & 0x40) DebugIn.Digital[0] |= 0x10; else DebugIn.Digital[0] &= ~0x10; |
||
521 | 3a0: 86 9b sbis 0x10, 6 ; 16 |
||
522 | 3a2: 02 c0 rjmp .+4 ; 0x3a8 <main+0x1de> |
||
523 | 3a4: 80 61 ori r24, 0x10 ; 16 |
||
524 | 3a6: 01 c0 rjmp .+2 ; 0x3aa <main+0x1e0> |
||
525 | 3a8: 8f 7e andi r24, 0xEF ; 239 |
||
526 | 3aa: 80 93 be 00 sts 0x00BE, r24 |
||
527 | 3ae: 80 91 be 00 lds r24, 0x00BE |
||
528 | if(PIND & 0x80) DebugIn.Digital[0] |= 0x20; else DebugIn.Digital[0] &= ~0x20; |
||
529 | 3b2: 87 9b sbis 0x10, 7 ; 16 |
||
530 | 3b4: 02 c0 rjmp .+4 ; 0x3ba <main+0x1f0> |
||
531 | 3b6: 80 62 ori r24, 0x20 ; 32 |
||
532 | 3b8: 01 c0 rjmp .+2 ; 0x3bc <main+0x1f2> |
||
533 | 3ba: 8f 7d andi r24, 0xDF ; 223 |
||
534 | 3bc: 80 93 be 00 sts 0x00BE, r24 |
||
535 | GetAnalogWerte(); |
||
536 | 3c0: 0e 94 4e 0c call 0x189c <GetAnalogWerte> |
||
537 | 3c4: 3d cf rjmp .-390 ; 0x240 <main+0x76> |
||
538 | |||
539 | 000003c6 <__vector_15>: |
||
540 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
541 | //++ Sende-Part der Datenübertragung |
||
542 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
543 | SIGNAL(INT_VEC_TX) |
||
544 | { |
||
545 | 3c6: 1f 92 push r1 |
||
546 | 3c8: 0f 92 push r0 |
||
547 | 3ca: 0f b6 in r0, 0x3f ; 63 |
||
548 | 3cc: 0f 92 push r0 |
||
549 | 3ce: 11 24 eor r1, r1 |
||
550 | 3d0: 8f 93 push r24 |
||
551 | 3d2: 9f 93 push r25 |
||
552 | 3d4: ef 93 push r30 |
||
553 | 3d6: ff 93 push r31 |
||
554 | static unsigned int ptr = 0; |
||
555 | unsigned char tmp_tx; |
||
556 | if(!UebertragungAbgeschlossen) |
||
557 | 3d8: 80 91 6e 00 lds r24, 0x006E |
||
558 | 3dc: 88 23 and r24, r24 |
||
559 | 3de: d9 f4 brne .+54 ; 0x416 <__vector_15+0x50> |
||
560 | { |
||
561 | ptr++; // die [0] wurde schon gesendet |
||
562 | 3e0: 80 91 9d 00 lds r24, 0x009D |
||
563 | 3e4: 90 91 9e 00 lds r25, 0x009E |
||
564 | 3e8: 01 96 adiw r24, 0x01 ; 1 |
||
565 | 3ea: 90 93 9e 00 sts 0x009E, r25 |
||
566 | 3ee: 80 93 9d 00 sts 0x009D, r24 |
||
567 | tmp_tx = SendeBuffer[ptr]; |
||
568 | 3f2: fc 01 movw r30, r24 |
||
569 | 3f4: e2 51 subi r30, 0x12 ; 18 |
||
570 | 3f6: ff 4f sbci r31, 0xFF ; 255 |
||
571 | 3f8: e0 81 ld r30, Z |
||
572 | if((tmp_tx == '\r') || (ptr == MAX_SENDE_BUFF)) |
||
573 | 3fa: ed 30 cpi r30, 0x0D ; 13 |
||
574 | 3fc: 19 f0 breq .+6 ; 0x404 <__vector_15+0x3e> |
||
575 | 3fe: 84 36 cpi r24, 0x64 ; 100 |
||
576 | 400: 91 05 cpc r25, r1 |
||
577 | 402: 39 f4 brne .+14 ; 0x412 <__vector_15+0x4c> |
||
578 | { |
||
579 | ptr = 0; |
||
580 | 404: 10 92 9e 00 sts 0x009E, r1 |
||
581 | 408: 10 92 9d 00 sts 0x009D, r1 |
||
582 | UebertragungAbgeschlossen = 1; |
||
583 | 40c: 81 e0 ldi r24, 0x01 ; 1 |
||
584 | 40e: 80 93 6e 00 sts 0x006E, r24 |
||
585 | } |
||
586 | UDR = tmp_tx; |
||
587 | 412: ec b9 out 0x0c, r30 ; 12 |
||
588 | 414: 04 c0 rjmp .+8 ; 0x41e <__vector_15+0x58> |
||
589 | } |
||
590 | else ptr = 0; |
||
591 | 416: 10 92 9e 00 sts 0x009E, r1 |
||
592 | 41a: 10 92 9d 00 sts 0x009D, r1 |
||
593 | 41e: ff 91 pop r31 |
||
594 | 420: ef 91 pop r30 |
||
595 | 422: 9f 91 pop r25 |
||
596 | 424: 8f 91 pop r24 |
||
597 | 426: 0f 90 pop r0 |
||
598 | 428: 0f be out 0x3f, r0 ; 63 |
||
599 | 42a: 0f 90 pop r0 |
||
600 | 42c: 1f 90 pop r1 |
||
601 | 42e: 18 95 reti |
||
602 | |||
603 | 00000430 <__vector_13>: |
||
604 | } |
||
605 | |||
606 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
607 | //++ Empfangs-Part der Datenübertragung, incl. CRC-Auswertung |
||
608 | //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
||
609 | SIGNAL(INT_VEC_RX) |
||
610 | { |
||
611 | 430: 1f 92 push r1 |
||
612 | 432: 0f 92 push r0 |
||
613 | 434: 0f b6 in r0, 0x3f ; 63 |
||
614 | 436: 0f 92 push r0 |
||
615 | 438: 11 24 eor r1, r1 |
||
616 | 43a: 2f 93 push r18 |
||
617 | 43c: 3f 93 push r19 |
||
618 | 43e: 4f 93 push r20 |
||
619 | 440: 5f 93 push r21 |
||
620 | 442: 8f 93 push r24 |
||
621 | 444: 9f 93 push r25 |
||
622 | 446: af 93 push r26 |
||
623 | 448: bf 93 push r27 |
||
624 | 44a: ef 93 push r30 |
||
625 | 44c: ff 93 push r31 |
||
626 | static unsigned int crc; |
||
627 | static unsigned char crc1,crc2,buf_ptr; |
||
628 | static unsigned char UartState = 0; |
||
629 | unsigned char CrcOkay = 0; |
||
630 | 44e: 20 e0 ldi r18, 0x00 ; 0 |
||
631 | |||
632 | SioTmp = UDR; |
||
633 | 450: 8c b1 in r24, 0x0c ; 12 |
||
634 | 452: 80 93 9c 00 sts 0x009C, r24 |
||
635 | if(buf_ptr >= MAX_EMPFANGS_BUFF) UartState = 0; |
||
636 | 456: 50 91 a3 00 lds r21, 0x00A3 |
||
637 | 45a: 54 36 cpi r21, 0x64 ; 100 |
||
638 | 45c: 10 f0 brcs .+4 ; 0x462 <__vector_13+0x32> |
||
639 | 45e: 20 93 a4 00 sts 0x00A4, r18 |
||
640 | if(SioTmp == '\r' && UartState == 2) |
||
641 | 462: 80 91 9c 00 lds r24, 0x009C |
||
642 | 466: 8d 30 cpi r24, 0x0D ; 13 |
||
643 | 468: 09 f0 breq .+2 ; 0x46c <__vector_13+0x3c> |
||
644 | 46a: 5b c0 rjmp .+182 ; 0x522 <__vector_13+0xf2> |
||
645 | 46c: 80 91 a4 00 lds r24, 0x00A4 |
||
646 | 470: 82 30 cpi r24, 0x02 ; 2 |
||
647 | 472: 09 f0 breq .+2 ; 0x476 <__vector_13+0x46> |
||
648 | 474: 56 c0 rjmp .+172 ; 0x522 <__vector_13+0xf2> |
||
649 | { |
||
650 | UartState = 0; |
||
651 | 476: 20 93 a4 00 sts 0x00A4, r18 |
||
652 | crc -= RxdBuffer[buf_ptr-2]; |
||
653 | 47a: 85 2f mov r24, r21 |
||
654 | 47c: 99 27 eor r25, r25 |
||
655 | 47e: 8e 5a subi r24, 0xAE ; 174 |
||
656 | 480: 9e 4f sbci r25, 0xFE ; 254 |
||
657 | 482: fc 01 movw r30, r24 |
||
658 | 484: 32 97 sbiw r30, 0x02 ; 2 |
||
659 | 486: 40 81 ld r20, Z |
||
660 | 488: 20 91 9f 00 lds r18, 0x009F |
||
661 | 48c: 30 91 a0 00 lds r19, 0x00A0 |
||
662 | 490: 24 1b sub r18, r20 |
||
663 | 492: 31 09 sbc r19, r1 |
||
664 | crc -= RxdBuffer[buf_ptr-1]; |
||
665 | 494: dc 01 movw r26, r24 |
||
666 | 496: 11 97 sbiw r26, 0x01 ; 1 |
||
667 | 498: 8c 91 ld r24, X |
||
668 | 49a: 28 1b sub r18, r24 |
||
669 | 49c: 31 09 sbc r19, r1 |
||
670 | crc %= 4096; |
||
671 | 49e: c9 01 movw r24, r18 |
||
672 | 4a0: 9f 70 andi r25, 0x0F ; 15 |
||
673 | 4a2: 90 93 a0 00 sts 0x00A0, r25 |
||
674 | 4a6: 80 93 9f 00 sts 0x009F, r24 |
||
675 | crc1 = '=' + crc / 64; |
||
676 | 4aa: 46 e0 ldi r20, 0x06 ; 6 |
||
677 | 4ac: 96 95 lsr r25 |
||
678 | 4ae: 87 95 ror r24 |
||
679 | 4b0: 4a 95 dec r20 |
||
680 | 4b2: e1 f7 brne .-8 ; 0x4ac <__vector_13+0x7c> |
||
681 | 4b4: 98 2f mov r25, r24 |
||
682 | 4b6: 93 5c subi r25, 0xC3 ; 195 |
||
683 | 4b8: 90 93 a1 00 sts 0x00A1, r25 |
||
684 | crc2 = '=' + crc % 64; |
||
685 | 4bc: 2f 73 andi r18, 0x3F ; 63 |
||
686 | 4be: 30 70 andi r19, 0x00 ; 0 |
||
687 | 4c0: 23 5c subi r18, 0xC3 ; 195 |
||
688 | 4c2: 20 93 a2 00 sts 0x00A2, r18 |
||
689 | CrcOkay = 0; |
||
690 | if((crc1 == RxdBuffer[buf_ptr-2]) && (crc2 == RxdBuffer[buf_ptr-1])) CrcOkay = 1; else { CrcOkay = 0; CntCrcError++;}; |
||
691 | 4c6: 80 81 ld r24, Z |
||
692 | 4c8: 98 17 cp r25, r24 |
||
693 | 4ca: 29 f4 brne .+10 ; 0x4d6 <__vector_13+0xa6> |
||
694 | 4cc: 8c 91 ld r24, X |
||
695 | 4ce: 28 17 cp r18, r24 |
||
696 | 4d0: 11 f4 brne .+4 ; 0x4d6 <__vector_13+0xa6> |
||
697 | 4d2: 21 e0 ldi r18, 0x01 ; 1 |
||
698 | 4d4: 0a c0 rjmp .+20 ; 0x4ea <__vector_13+0xba> |
||
699 | 4d6: 20 e0 ldi r18, 0x00 ; 0 |
||
700 | 4d8: 80 91 99 00 lds r24, 0x0099 |
||
701 | 4dc: 90 91 9a 00 lds r25, 0x009A |
||
702 | 4e0: 01 96 adiw r24, 0x01 ; 1 |
||
703 | 4e2: 90 93 9a 00 sts 0x009A, r25 |
||
704 | 4e6: 80 93 99 00 sts 0x0099, r24 |
||
705 | if(!NeuerDatensatzEmpfangen && CrcOkay) // Datensatz schon verarbeitet |
||
706 | 4ea: 80 91 9b 00 lds r24, 0x009B |
||
707 | 4ee: 88 23 and r24, r24 |
||
708 | 4f0: 09 f0 breq .+2 ; 0x4f4 <__vector_13+0xc4> |
||
709 | 4f2: 66 c0 rjmp .+204 ; 0x5c0 <__vector_13+0x190> |
||
710 | 4f4: 22 23 and r18, r18 |
||
711 | 4f6: 09 f4 brne .+2 ; 0x4fa <__vector_13+0xca> |
||
712 | 4f8: 63 c0 rjmp .+198 ; 0x5c0 <__vector_13+0x190> |
||
713 | { |
||
714 | CntDatensaetzeProSekunde++; |
||
715 | 4fa: 80 91 66 00 lds r24, 0x0066 |
||
716 | 4fe: 8f 5f subi r24, 0xFF ; 255 |
||
717 | 500: 80 93 66 00 sts 0x0066, r24 |
||
718 | PC_DebugTimeout = 10; |
||
719 | 504: 8a e0 ldi r24, 0x0A ; 10 |
||
720 | 506: 80 93 97 00 sts 0x0097, r24 |
||
721 | NeuerDatensatzEmpfangen = 1; |
||
722 | 50a: 81 e0 ldi r24, 0x01 ; 1 |
||
723 | 50c: 80 93 9b 00 sts 0x009B, r24 |
||
724 | AnzahlEmpfangsBytes = buf_ptr; |
||
725 | 510: 50 93 98 00 sts 0x0098, r21 |
||
726 | RxdBuffer[buf_ptr] = '\r'; |
||
727 | 514: e5 2f mov r30, r21 |
||
728 | 516: ff 27 eor r31, r31 |
||
729 | 518: ee 5a subi r30, 0xAE ; 174 |
||
730 | 51a: fe 4f sbci r31, 0xFE ; 254 |
||
731 | 51c: 8d e0 ldi r24, 0x0D ; 13 |
||
732 | 51e: 80 83 st Z, r24 |
||
733 | 520: 4f c0 rjmp .+158 ; 0x5c0 <__vector_13+0x190> |
||
734 | // if((RxdBuffer[1] == 's') && (RxdBuffer[2] == 'R')) wdt_enable(WDTO_250MS); // Reset-Commando |
||
735 | } |
||
736 | } |
||
737 | else |
||
738 | switch(UartState) |
||
739 | 522: 20 91 a4 00 lds r18, 0x00A4 |
||
740 | 526: 82 2f mov r24, r18 |
||
741 | 528: 99 27 eor r25, r25 |
||
742 | 52a: 81 30 cpi r24, 0x01 ; 1 |
||
743 | 52c: 91 05 cpc r25, r1 |
||
744 | 52e: f9 f0 breq .+62 ; 0x56e <__vector_13+0x13e> |
||
745 | 530: 82 30 cpi r24, 0x02 ; 2 |
||
746 | 532: 91 05 cpc r25, r1 |
||
747 | 534: 1c f4 brge .+6 ; 0x53c <__vector_13+0x10c> |
||
748 | 536: 89 2b or r24, r25 |
||
749 | 538: 21 f0 breq .+8 ; 0x542 <__vector_13+0x112> |
||
750 | 53a: 40 c0 rjmp .+128 ; 0x5bc <__vector_13+0x18c> |
||
751 | 53c: 02 97 sbiw r24, 0x02 ; 2 |
||
752 | 53e: 11 f1 breq .+68 ; 0x584 <__vector_13+0x154> |
||
753 | 540: 3d c0 rjmp .+122 ; 0x5bc <__vector_13+0x18c> |
||
754 | { |
||
755 | case 0: |
||
756 | if(SioTmp == '#' && !NeuerDatensatzEmpfangen) UartState = 1; // Startzeichen und Daten schon verarbeitet |
||
757 | 542: 80 91 9c 00 lds r24, 0x009C |
||
758 | 546: 83 32 cpi r24, 0x23 ; 35 |
||
759 | 548: 39 f4 brne .+14 ; 0x558 <__vector_13+0x128> |
||
760 | 54a: 80 91 9b 00 lds r24, 0x009B |
||
761 | 54e: 88 23 and r24, r24 |
||
762 | 550: 19 f4 brne .+6 ; 0x558 <__vector_13+0x128> |
||
763 | 552: 81 e0 ldi r24, 0x01 ; 1 |
||
764 | 554: 80 93 a4 00 sts 0x00A4, r24 |
||
765 | buf_ptr = 0; |
||
766 | RxdBuffer[buf_ptr++] = SioTmp; |
||
767 | 558: 80 91 9c 00 lds r24, 0x009C |
||
768 | 55c: 80 93 52 01 sts 0x0152, r24 |
||
769 | 560: 81 e0 ldi r24, 0x01 ; 1 |
||
770 | 562: 80 93 a3 00 sts 0x00A3, r24 |
||
771 | crc = SioTmp; |
||
772 | 566: 80 91 9c 00 lds r24, 0x009C |
||
773 | 56a: 99 27 eor r25, r25 |
||
774 | 56c: 22 c0 rjmp .+68 ; 0x5b2 <__vector_13+0x182> |
||
775 | break; |
||
776 | case 1: // Adresse auswerten |
||
777 | UartState++; |
||
778 | 56e: 2f 5f subi r18, 0xFF ; 255 |
||
779 | 570: 20 93 a4 00 sts 0x00A4, r18 |
||
780 | RxdBuffer[buf_ptr++] = SioTmp; |
||
781 | 574: e5 2f mov r30, r21 |
||
782 | 576: ff 27 eor r31, r31 |
||
783 | 578: ee 5a subi r30, 0xAE ; 174 |
||
784 | 57a: fe 4f sbci r31, 0xFE ; 254 |
||
785 | 57c: 80 91 9c 00 lds r24, 0x009C |
||
786 | 580: 80 83 st Z, r24 |
||
787 | 582: 09 c0 rjmp .+18 ; 0x596 <__vector_13+0x166> |
||
788 | crc += SioTmp; |
||
789 | break; |
||
790 | case 2: // Eingangsdaten sammeln |
||
791 | RxdBuffer[buf_ptr] = SioTmp; |
||
792 | 584: e5 2f mov r30, r21 |
||
793 | 586: ff 27 eor r31, r31 |
||
794 | 588: ee 5a subi r30, 0xAE ; 174 |
||
795 | 58a: fe 4f sbci r31, 0xFE ; 254 |
||
796 | 58c: 80 91 9c 00 lds r24, 0x009C |
||
797 | 590: 80 83 st Z, r24 |
||
798 | if(buf_ptr < MAX_EMPFANGS_BUFF) buf_ptr++; |
||
799 | 592: 54 36 cpi r21, 0x64 ; 100 |
||
800 | 594: 20 f4 brcc .+8 ; 0x59e <__vector_13+0x16e> |
||
801 | 596: 5f 5f subi r21, 0xFF ; 255 |
||
802 | 598: 50 93 a3 00 sts 0x00A3, r21 |
||
803 | 59c: 02 c0 rjmp .+4 ; 0x5a2 <__vector_13+0x172> |
||
804 | else UartState = 0; |
||
805 | 59e: 10 92 a4 00 sts 0x00A4, r1 |
||
806 | crc += SioTmp; |
||
807 | 5a2: 20 91 9c 00 lds r18, 0x009C |
||
808 | 5a6: 80 91 9f 00 lds r24, 0x009F |
||
809 | 5aa: 90 91 a0 00 lds r25, 0x00A0 |
||
810 | 5ae: 82 0f add r24, r18 |
||
811 | 5b0: 91 1d adc r25, r1 |
||
812 | 5b2: 90 93 a0 00 sts 0x00A0, r25 |
||
813 | 5b6: 80 93 9f 00 sts 0x009F, r24 |
||
814 | break; |
||
815 | 5ba: 02 c0 rjmp .+4 ; 0x5c0 <__vector_13+0x190> |
||
816 | default: |
||
817 | UartState = 0; |
||
818 | 5bc: 10 92 a4 00 sts 0x00A4, r1 |
||
819 | 5c0: ff 91 pop r31 |
||
820 | 5c2: ef 91 pop r30 |
||
821 | 5c4: bf 91 pop r27 |
||
822 | 5c6: af 91 pop r26 |
||
823 | 5c8: 9f 91 pop r25 |
||
824 | 5ca: 8f 91 pop r24 |
||
825 | 5cc: 5f 91 pop r21 |
||
826 | 5ce: 4f 91 pop r20 |
||
827 | 5d0: 3f 91 pop r19 |
||
828 | 5d2: 2f 91 pop r18 |
||
829 | 5d4: 0f 90 pop r0 |
||
830 | 5d6: 0f be out 0x3f, r0 ; 63 |
||
831 | 5d8: 0f 90 pop r0 |
||
832 | 5da: 1f 90 pop r1 |
||
833 | 5dc: 18 95 reti |
||
834 | |||
835 | 000005de <AddCRC>: |
||
836 | break; |
||
837 | } |
||
838 | }; |
||
839 | |||
840 | // -------------------------------------------------------------------------- |
||
841 | void AddCRC(unsigned int wieviele) |
||
842 | { |
||
843 | 5de: ac 01 movw r20, r24 |
||
844 | unsigned int tmpCRC = 0,i; |
||
845 | 5e0: a0 e0 ldi r26, 0x00 ; 0 |
||
846 | 5e2: b0 e0 ldi r27, 0x00 ; 0 |
||
847 | for(i = 0; i < wieviele;i++) |
||
848 | 5e4: 9d 01 movw r18, r26 |
||
849 | 5e6: a8 17 cp r26, r24 |
||
850 | 5e8: b9 07 cpc r27, r25 |
||
851 | 5ea: 48 f4 brcc .+18 ; 0x5fe <AddCRC+0x20> |
||
852 | 5ec: ee ee ldi r30, 0xEE ; 238 |
||
853 | 5ee: f0 e0 ldi r31, 0x00 ; 0 |
||
854 | { |
||
855 | tmpCRC += SendeBuffer[i]; |
||
856 | 5f0: 81 91 ld r24, Z+ |
||
857 | 5f2: 28 0f add r18, r24 |
||
858 | 5f4: 31 1d adc r19, r1 |
||
859 | 5f6: 11 96 adiw r26, 0x01 ; 1 |
||
860 | 5f8: a4 17 cp r26, r20 |
||
861 | 5fa: b5 07 cpc r27, r21 |
||
862 | 5fc: c8 f3 brcs .-14 ; 0x5f0 <AddCRC+0x12> |
||
863 | } |
||
864 | tmpCRC %= 4096; |
||
865 | 5fe: 3f 70 andi r19, 0x0F ; 15 |
||
866 | SendeBuffer[i++] = '=' + tmpCRC / 64; |
||
867 | 600: fd 01 movw r30, r26 |
||
868 | 602: e2 51 subi r30, 0x12 ; 18 |
||
869 | 604: ff 4f sbci r31, 0xFF ; 255 |
||
870 | 606: c9 01 movw r24, r18 |
||
871 | 608: 56 e0 ldi r21, 0x06 ; 6 |
||
872 | 60a: 96 95 lsr r25 |
||
873 | 60c: 87 95 ror r24 |
||
874 | 60e: 5a 95 dec r21 |
||
875 | 610: e1 f7 brne .-8 ; 0x60a <AddCRC+0x2c> |
||
876 | 612: 83 5c subi r24, 0xC3 ; 195 |
||
877 | 614: 80 83 st Z, r24 |
||
878 | 616: 11 96 adiw r26, 0x01 ; 1 |
||
879 | SendeBuffer[i++] = '=' + tmpCRC % 64; |
||
880 | 618: fd 01 movw r30, r26 |
||
881 | 61a: e2 51 subi r30, 0x12 ; 18 |
||
882 | 61c: ff 4f sbci r31, 0xFF ; 255 |
||
883 | 61e: 2f 73 andi r18, 0x3F ; 63 |
||
884 | 620: 30 70 andi r19, 0x00 ; 0 |
||
885 | 622: 82 2f mov r24, r18 |
||
886 | 624: 83 5c subi r24, 0xC3 ; 195 |
||
887 | 626: 80 83 st Z, r24 |
||
888 | SendeBuffer[i++] = '\r'; |
||
889 | 628: a1 51 subi r26, 0x11 ; 17 |
||
890 | 62a: bf 4f sbci r27, 0xFF ; 255 |
||
891 | 62c: 8d e0 ldi r24, 0x0D ; 13 |
||
892 | 62e: 8c 93 st X, r24 |
||
893 | UebertragungAbgeschlossen = 0; |
||
894 | 630: 10 92 6e 00 sts 0x006E, r1 |
||
895 | UDR = SendeBuffer[0]; |
||
896 | 634: 80 91 ee 00 lds r24, 0x00EE |
||
897 | 638: 8c b9 out 0x0c, r24 ; 12 |
||
898 | 63a: 08 95 ret |
||
899 | |||
900 | 0000063c <SendOutData>: |
||
901 | // PrintSendeBuffer(); |
||
902 | } |
||
903 | |||
904 | |||
905 | // -------------------------------------------------------------------------- |
||
906 | void SendOutData(unsigned char cmd,unsigned char modul, unsigned char *snd, unsigned char len) |
||
907 | { |
||
908 | 63c: 1f 93 push r17 |
||
909 | 63e: cf 93 push r28 |
||
910 | 640: df 93 push r29 |
||
911 | 642: 38 2f mov r19, r24 |
||
912 | 644: 96 2f mov r25, r22 |
||
913 | 646: ea 01 movw r28, r20 |
||
914 | 648: 72 2f mov r23, r18 |
||
915 | unsigned int pt = 0,i; |
||
916 | unsigned char a,b,c,d; |
||
917 | unsigned char ptr = 0; |
||
918 | 64a: 10 e0 ldi r17, 0x00 ; 0 |
||
919 | unsigned char x,y,z; |
||
920 | //while(!UebertragungAbgeschlossen); |
||
921 | SendeBuffer[pt++] = '#'; // Startzeichen |
||
922 | 64c: 83 e2 ldi r24, 0x23 ; 35 |
||
923 | 64e: 80 93 ee 00 sts 0x00EE, r24 |
||
924 | SendeBuffer[pt++] = modul+'a'; // Adresse (a=0; b=1,...) |
||
925 | 652: 9f 59 subi r25, 0x9F ; 159 |
||
926 | 654: 90 93 ef 00 sts 0x00EF, r25 |
||
927 | SendeBuffer[pt++] = cmd; // Commando |
||
928 | 658: 30 93 f0 00 sts 0x00F0, r19 |
||
929 | 65c: a3 e0 ldi r26, 0x03 ; 3 |
||
930 | 65e: b0 e0 ldi r27, 0x00 ; 0 |
||
931 | |||
932 | while(len) |
||
933 | { |
||
934 | if(len) { a = snd[ptr++]; len--;} else a = 0; |
||
935 | if(len) { b = snd[ptr++]; len--;} else b = 0; |
||
936 | if(len) { c = snd[ptr++]; len--;} else c = 0; |
||
937 | SendeBuffer[pt++] = '=' + (a >> 2); |
||
938 | SendeBuffer[pt++] = '=' + (((a & 0x03) << 4) | ((b & 0xf0) >> 4)); |
||
939 | SendeBuffer[pt++] = '=' + (((b & 0x0f) << 2) | ((c & 0xc0) >> 6)); |
||
940 | SendeBuffer[pt++] = '=' + ( c & 0x3f); |
||
941 | 660: 77 23 and r23, r23 |
||
942 | 662: 09 f4 brne .+2 ; 0x666 <SendOutData+0x2a> |
||
943 | 664: 58 c0 rjmp .+176 ; 0x716 <SendOutData+0xda> |
||
944 | 666: 77 23 and r23, r23 |
||
945 | 668: 11 f4 brne .+4 ; 0x66e <SendOutData+0x32> |
||
946 | 66a: 97 2f mov r25, r23 |
||
947 | 66c: 07 c0 rjmp .+14 ; 0x67c <SendOutData+0x40> |
||
948 | 66e: fe 01 movw r30, r28 |
||
949 | 670: e1 0f add r30, r17 |
||
950 | 672: f1 1d adc r31, r1 |
||
951 | 674: 1f 5f subi r17, 0xFF ; 255 |
||
952 | 676: 90 81 ld r25, Z |
||
953 | 678: 71 50 subi r23, 0x01 ; 1 |
||
954 | 67a: 11 f4 brne .+4 ; 0x680 <SendOutData+0x44> |
||
955 | 67c: 47 2f mov r20, r23 |
||
956 | 67e: 0e c0 rjmp .+28 ; 0x69c <SendOutData+0x60> |
||
957 | 680: fe 01 movw r30, r28 |
||
958 | 682: e1 0f add r30, r17 |
||
959 | 684: f1 1d adc r31, r1 |
||
960 | 686: 1f 5f subi r17, 0xFF ; 255 |
||
961 | 688: 40 81 ld r20, Z |
||
962 | 68a: 71 50 subi r23, 0x01 ; 1 |
||
963 | 68c: 39 f0 breq .+14 ; 0x69c <SendOutData+0x60> |
||
964 | 68e: fe 01 movw r30, r28 |
||
965 | 690: e1 0f add r30, r17 |
||
966 | 692: f1 1d adc r31, r1 |
||
967 | 694: 1f 5f subi r17, 0xFF ; 255 |
||
968 | 696: 60 81 ld r22, Z |
||
969 | 698: 71 50 subi r23, 0x01 ; 1 |
||
970 | 69a: 01 c0 rjmp .+2 ; 0x69e <SendOutData+0x62> |
||
971 | 69c: 67 2f mov r22, r23 |
||
972 | 69e: fd 01 movw r30, r26 |
||
973 | 6a0: e2 51 subi r30, 0x12 ; 18 |
||
974 | 6a2: ff 4f sbci r31, 0xFF ; 255 |
||
975 | 6a4: 89 2f mov r24, r25 |
||
976 | 6a6: 86 95 lsr r24 |
||
977 | 6a8: 86 95 lsr r24 |
||
978 | 6aa: 83 5c subi r24, 0xC3 ; 195 |
||
979 | 6ac: 80 83 st Z, r24 |
||
980 | 6ae: 11 96 adiw r26, 0x01 ; 1 |
||
981 | 6b0: fd 01 movw r30, r26 |
||
982 | 6b2: e2 51 subi r30, 0x12 ; 18 |
||
983 | 6b4: ff 4f sbci r31, 0xFF ; 255 |
||
984 | 6b6: 89 2f mov r24, r25 |
||
985 | 6b8: 99 27 eor r25, r25 |
||
986 | 6ba: 83 70 andi r24, 0x03 ; 3 |
||
987 | 6bc: 90 70 andi r25, 0x00 ; 0 |
||
988 | 6be: 24 e0 ldi r18, 0x04 ; 4 |
||
989 | 6c0: 88 0f add r24, r24 |
||
990 | 6c2: 99 1f adc r25, r25 |
||
991 | 6c4: 2a 95 dec r18 |
||
992 | 6c6: e1 f7 brne .-8 ; 0x6c0 <SendOutData+0x84> |
||
993 | 6c8: 55 27 eor r21, r21 |
||
994 | 6ca: 9a 01 movw r18, r20 |
||
995 | 6cc: 94 e0 ldi r25, 0x04 ; 4 |
||
996 | 6ce: 36 95 lsr r19 |
||
997 | 6d0: 27 95 ror r18 |
||
998 | 6d2: 9a 95 dec r25 |
||
999 | 6d4: e1 f7 brne .-8 ; 0x6ce <SendOutData+0x92> |
||
1000 | 6d6: 82 2b or r24, r18 |
||
1001 | 6d8: 83 5c subi r24, 0xC3 ; 195 |
||
1002 | 6da: 80 83 st Z, r24 |
||
1003 | 6dc: 11 96 adiw r26, 0x01 ; 1 |
||
1004 | 6de: fd 01 movw r30, r26 |
||
1005 | 6e0: e2 51 subi r30, 0x12 ; 18 |
||
1006 | 6e2: ff 4f sbci r31, 0xFF ; 255 |
||
1007 | 6e4: 4f 70 andi r20, 0x0F ; 15 |
||
1008 | 6e6: 50 70 andi r21, 0x00 ; 0 |
||
1009 | 6e8: 44 0f add r20, r20 |
||
1010 | 6ea: 55 1f adc r21, r21 |
||
1011 | 6ec: 44 0f add r20, r20 |
||
1012 | 6ee: 55 1f adc r21, r21 |
||
1013 | 6f0: 86 2f mov r24, r22 |
||
1014 | 6f2: 99 27 eor r25, r25 |
||
1015 | 6f4: 26 e0 ldi r18, 0x06 ; 6 |
||
1016 | 6f6: 96 95 lsr r25 |
||
1017 | 6f8: 87 95 ror r24 |
||
1018 | 6fa: 2a 95 dec r18 |
||
1019 | 6fc: e1 f7 brne .-8 ; 0x6f6 <SendOutData+0xba> |
||
1020 | 6fe: 84 2b or r24, r20 |
||
1021 | 700: 83 5c subi r24, 0xC3 ; 195 |
||
1022 | 702: 80 83 st Z, r24 |
||
1023 | 704: 11 96 adiw r26, 0x01 ; 1 |
||
1024 | 706: fd 01 movw r30, r26 |
||
1025 | 708: e2 51 subi r30, 0x12 ; 18 |
||
1026 | 70a: ff 4f sbci r31, 0xFF ; 255 |
||
1027 | 70c: 6f 73 andi r22, 0x3F ; 63 |
||
1028 | 70e: 63 5c subi r22, 0xC3 ; 195 |
||
1029 | 710: 60 83 st Z, r22 |
||
1030 | 712: 11 96 adiw r26, 0x01 ; 1 |
||
1031 | 714: a5 cf rjmp .-182 ; 0x660 <SendOutData+0x24> |
||
1032 | } |
||
1033 | AddCRC(pt); |
||
1034 | 716: cd 01 movw r24, r26 |
||
1035 | 718: 0e 94 ef 02 call 0x5de <AddCRC> |
||
1036 | 71c: df 91 pop r29 |
||
1037 | 71e: cf 91 pop r28 |
||
1038 | 720: 1f 91 pop r17 |
||
1039 | 722: 08 95 ret |
||
1040 | |||
1041 | 00000724 <Decode64>: |
||
1042 | } |
||
1043 | |||
1044 | // -------------------------------------------------------------------------- |
||
1045 | void Decode64(unsigned char *ptrOut, unsigned char len, unsigned char ptrIn,unsigned char max) // Wohin mit den Daten; Wie lang; Wo im RxdBuffer |
||
1046 | { |
||
1047 | 724: 1f 93 push r17 |
||
1048 | 726: cf 93 push r28 |
||
1049 | 728: df 93 push r29 |
||
1050 | 72a: ec 01 movw r28, r24 |
||
1051 | unsigned char a,b,c,d; |
||
1052 | unsigned char ptr = 0; |
||
1053 | 72c: 10 e0 ldi r17, 0x00 ; 0 |
||
1054 | unsigned char x,y,z; |
||
1055 | while(len) |
||
1056 | { |
||
1057 | a = RxdBuffer[ptrIn++] - '='; |
||
1058 | b = RxdBuffer[ptrIn++] - '='; |
||
1059 | c = RxdBuffer[ptrIn++] - '='; |
||
1060 | d = RxdBuffer[ptrIn++] - '='; |
||
1061 | if(ptrIn > max - 2) break; // nicht mehr Daten verarbeiten, als empfangen wurden |
||
1062 | |||
1063 | x = (a << 2) | (b >> 4); |
||
1064 | y = ((b & 0x0f) << 4) | (c >> 2); |
||
1065 | z = ((c & 0x03) << 6) | d; |
||
1066 | |||
1067 | if(len--) ptrOut[ptr++] = x; else break; |
||
1068 | if(len--) ptrOut[ptr++] = y; else break; |
||
1069 | if(len--) ptrOut[ptr++] = z; else break; |
||
1070 | 72e: 66 23 and r22, r22 |
||
1071 | 730: 09 f4 brne .+2 ; 0x734 <Decode64+0x10> |
||
1072 | 732: 60 c0 rjmp .+192 ; 0x7f4 <Decode64+0xd0> |
||
1073 | 734: a2 2f mov r26, r18 |
||
1074 | 736: bb 27 eor r27, r27 |
||
1075 | 738: 12 97 sbiw r26, 0x02 ; 2 |
||
1076 | 73a: e4 2f mov r30, r20 |
||
1077 | 73c: ff 27 eor r31, r31 |
||
1078 | 73e: ee 5a subi r30, 0xAE ; 174 |
||
1079 | 740: fe 4f sbci r31, 0xFE ; 254 |
||
1080 | 742: 30 81 ld r19, Z |
||
1081 | 744: 3d 53 subi r19, 0x3D ; 61 |
||
1082 | 746: 4f 5f subi r20, 0xFF ; 255 |
||
1083 | 748: e4 2f mov r30, r20 |
||
1084 | 74a: ff 27 eor r31, r31 |
||
1085 | 74c: ee 5a subi r30, 0xAE ; 174 |
||
1086 | 74e: fe 4f sbci r31, 0xFE ; 254 |
||
1087 | 750: 50 81 ld r21, Z |
||
1088 | 752: 5d 53 subi r21, 0x3D ; 61 |
||
1089 | 754: 4f 5f subi r20, 0xFF ; 255 |
||
1090 | 756: e4 2f mov r30, r20 |
||
1091 | 758: ff 27 eor r31, r31 |
||
1092 | 75a: ee 5a subi r30, 0xAE ; 174 |
||
1093 | 75c: fe 4f sbci r31, 0xFE ; 254 |
||
1094 | 75e: 70 81 ld r23, Z |
||
1095 | 760: 7d 53 subi r23, 0x3D ; 61 |
||
1096 | 762: 4f 5f subi r20, 0xFF ; 255 |
||
1097 | 764: e4 2f mov r30, r20 |
||
1098 | 766: ff 27 eor r31, r31 |
||
1099 | 768: ee 5a subi r30, 0xAE ; 174 |
||
1100 | 76a: fe 4f sbci r31, 0xFE ; 254 |
||
1101 | 76c: e0 81 ld r30, Z |
||
1102 | 76e: ed 53 subi r30, 0x3D ; 61 |
||
1103 | 770: 4f 5f subi r20, 0xFF ; 255 |
||
1104 | 772: 84 2f mov r24, r20 |
||
1105 | 774: 99 27 eor r25, r25 |
||
1106 | 776: a8 17 cp r26, r24 |
||
1107 | 778: b9 07 cpc r27, r25 |
||
1108 | 77a: e4 f1 brlt .+120 ; 0x7f4 <Decode64+0xd0> |
||
1109 | 77c: 83 2f mov r24, r19 |
||
1110 | 77e: 99 27 eor r25, r25 |
||
1111 | 780: 88 0f add r24, r24 |
||
1112 | 782: 99 1f adc r25, r25 |
||
1113 | 784: 88 0f add r24, r24 |
||
1114 | 786: 99 1f adc r25, r25 |
||
1115 | 788: 35 2f mov r19, r21 |
||
1116 | 78a: 32 95 swap r19 |
||
1117 | 78c: 3f 70 andi r19, 0x0F ; 15 |
||
1118 | 78e: 38 2b or r19, r24 |
||
1119 | 790: 85 2f mov r24, r21 |
||
1120 | 792: 99 27 eor r25, r25 |
||
1121 | 794: 8f 70 andi r24, 0x0F ; 15 |
||
1122 | 796: 90 70 andi r25, 0x00 ; 0 |
||
1123 | 798: f4 e0 ldi r31, 0x04 ; 4 |
||
1124 | 79a: 88 0f add r24, r24 |
||
1125 | 79c: 99 1f adc r25, r25 |
||
1126 | 79e: fa 95 dec r31 |
||
1127 | 7a0: e1 f7 brne .-8 ; 0x79a <Decode64+0x76> |
||
1128 | 7a2: 57 2f mov r21, r23 |
||
1129 | 7a4: 56 95 lsr r21 |
||
1130 | 7a6: 56 95 lsr r21 |
||
1131 | 7a8: 58 2b or r21, r24 |
||
1132 | 7aa: 87 2f mov r24, r23 |
||
1133 | 7ac: 99 27 eor r25, r25 |
||
1134 | 7ae: 83 70 andi r24, 0x03 ; 3 |
||
1135 | 7b0: 90 70 andi r25, 0x00 ; 0 |
||
1136 | 7b2: 76 e0 ldi r23, 0x06 ; 6 |
||
1137 | 7b4: 88 0f add r24, r24 |
||
1138 | 7b6: 99 1f adc r25, r25 |
||
1139 | 7b8: 7a 95 dec r23 |
||
1140 | 7ba: e1 f7 brne .-8 ; 0x7b4 <Decode64+0x90> |
||
1141 | 7bc: 8e 2b or r24, r30 |
||
1142 | 7be: 61 50 subi r22, 0x01 ; 1 |
||
1143 | 7c0: 6f 3f cpi r22, 0xFF ; 255 |
||
1144 | 7c2: c1 f0 breq .+48 ; 0x7f4 <Decode64+0xd0> |
||
1145 | 7c4: fe 01 movw r30, r28 |
||
1146 | 7c6: e1 0f add r30, r17 |
||
1147 | 7c8: f1 1d adc r31, r1 |
||
1148 | 7ca: 30 83 st Z, r19 |
||
1149 | 7cc: 1f 5f subi r17, 0xFF ; 255 |
||
1150 | 7ce: 61 50 subi r22, 0x01 ; 1 |
||
1151 | 7d0: 6f 3f cpi r22, 0xFF ; 255 |
||
1152 | 7d2: 81 f0 breq .+32 ; 0x7f4 <Decode64+0xd0> |
||
1153 | 7d4: fe 01 movw r30, r28 |
||
1154 | 7d6: e1 0f add r30, r17 |
||
1155 | 7d8: f1 1d adc r31, r1 |
||
1156 | 7da: 50 83 st Z, r21 |
||
1157 | 7dc: 1f 5f subi r17, 0xFF ; 255 |
||
1158 | 7de: 61 50 subi r22, 0x01 ; 1 |
||
1159 | 7e0: 6f 3f cpi r22, 0xFF ; 255 |
||
1160 | 7e2: 41 f0 breq .+16 ; 0x7f4 <Decode64+0xd0> |
||
1161 | 7e4: fe 01 movw r30, r28 |
||
1162 | 7e6: e1 0f add r30, r17 |
||
1163 | 7e8: f1 1d adc r31, r1 |
||
1164 | 7ea: 80 83 st Z, r24 |
||
1165 | 7ec: 1f 5f subi r17, 0xFF ; 255 |
||
1166 | 7ee: 66 23 and r22, r22 |
||
1167 | 7f0: 09 f0 breq .+2 ; 0x7f4 <Decode64+0xd0> |
||
1168 | 7f2: a3 cf rjmp .-186 ; 0x73a <Decode64+0x16> |
||
1169 | 7f4: df 91 pop r29 |
||
1170 | 7f6: cf 91 pop r28 |
||
1171 | 7f8: 1f 91 pop r17 |
||
1172 | 7fa: 08 95 ret |
||
1173 | |||
1174 | 000007fc <BearbeiteRxDaten>: |
||
1175 | } |
||
1176 | |||
1177 | } |
||
1178 | |||
1179 | // -------------------------------------------------------------------------- |
||
1180 | void BearbeiteRxDaten(void) |
||
1181 | { |
||
1182 | 7fc: cf 93 push r28 |
||
1183 | 7fe: df 93 push r29 |
||
1184 | 800: cd b7 in r28, 0x3d ; 61 |
||
1185 | 802: de b7 in r29, 0x3e ; 62 |
||
1186 | 804: ad 97 sbiw r28, 0x2d ; 45 |
||
1187 | 806: 0f b6 in r0, 0x3f ; 63 |
||
1188 | 808: f8 94 cli |
||
1189 | 80a: de bf out 0x3e, r29 ; 62 |
||
1190 | 80c: 0f be out 0x3f, r0 ; 63 |
||
1191 | 80e: cd bf out 0x3d, r28 ; 61 |
||
1192 | unsigned int tmp_int_arr1[1]; |
||
1193 | unsigned int tmp_int_arr2[2]; |
||
1194 | unsigned int tmp_int_arr20[21]; |
||
1195 | unsigned char tmp_char_arr3[3]; |
||
1196 | // unsigned int tmp_int_arr4[4]; |
||
1197 | |||
1198 | if(!NeuerDatensatzEmpfangen) return; |
||
1199 | 810: 80 91 9b 00 lds r24, 0x009B |
||
1200 | 814: 88 23 and r24, r24 |
||
1201 | 816: 09 f4 brne .+2 ; 0x81a <BearbeiteRxDaten+0x1e> |
||
1202 | 818: a7 c0 rjmp .+334 ; 0x968 <__stack+0x109> |
||
1203 | NeuerDatensatzEmpfangen = 0; |
||
1204 | 81a: 10 92 9b 00 sts 0x009B, r1 |
||
1205 | if(ErwarteAntwort == RxdBuffer[2]) AntwortEingetroffen = 1; |
||
1206 | 81e: 90 91 6d 00 lds r25, 0x006D |
||
1207 | 822: 80 91 54 01 lds r24, 0x0154 |
||
1208 | 826: 98 17 cp r25, r24 |
||
1209 | 828: 19 f4 brne .+6 ; 0x830 <BearbeiteRxDaten+0x34> |
||
1210 | 82a: 81 e0 ldi r24, 0x01 ; 1 |
||
1211 | 82c: 80 93 92 00 sts 0x0092, r24 |
||
1212 | switch(RxdBuffer[2]) |
||
1213 | 830: 80 91 54 01 lds r24, 0x0154 |
||
1214 | 834: 99 27 eor r25, r25 |
||
1215 | 836: 82 33 cpi r24, 0x32 ; 50 |
||
1216 | 838: 91 05 cpc r25, r1 |
||
1217 | 83a: 09 f4 brne .+2 ; 0x83e <BearbeiteRxDaten+0x42> |
||
1218 | 83c: 46 c0 rjmp .+140 ; 0x8ca <__stack+0x6b> |
||
1219 | 83e: 83 33 cpi r24, 0x33 ; 51 |
||
1220 | 840: 91 05 cpc r25, r1 |
||
1221 | 842: 34 f4 brge .+12 ; 0x850 <BearbeiteRxDaten+0x54> |
||
1222 | 844: 80 33 cpi r24, 0x30 ; 48 |
||
1223 | 846: 91 05 cpc r25, r1 |
||
1224 | 848: 99 f0 breq .+38 ; 0x870 <__stack+0x11> |
||
1225 | 84a: c1 97 sbiw r24, 0x31 ; 49 |
||
1226 | 84c: 49 f1 breq .+82 ; 0x8a0 <__stack+0x41> |
||
1227 | 84e: 8c c0 rjmp .+280 ; 0x968 <__stack+0x109> |
||
1228 | 850: 84 34 cpi r24, 0x44 ; 68 |
||
1229 | 852: 91 05 cpc r25, r1 |
||
1230 | 854: 09 f4 brne .+2 ; 0x858 <BearbeiteRxDaten+0x5c> |
||
1231 | 856: 6b c0 rjmp .+214 ; 0x92e <__stack+0xcf> |
||
1232 | 858: 85 34 cpi r24, 0x45 ; 69 |
||
1233 | 85a: 91 05 cpc r25, r1 |
||
1234 | 85c: 24 f4 brge .+8 ; 0x866 <__stack+0x7> |
||
1235 | 85e: c3 97 sbiw r24, 0x33 ; 51 |
||
1236 | 860: 09 f4 brne .+2 ; 0x864 <__stack+0x5> |
||
1237 | 862: 48 c0 rjmp .+144 ; 0x8f4 <__stack+0x95> |
||
1238 | 864: 81 c0 rjmp .+258 ; 0x968 <__stack+0x109> |
||
1239 | 866: 8b 34 cpi r24, 0x4B ; 75 |
||
1240 | 868: 91 05 cpc r25, r1 |
||
1241 | 86a: 09 f4 brne .+2 ; 0x86e <__stack+0xf> |
||
1242 | 86c: 6c c0 rjmp .+216 ; 0x946 <__stack+0xe7> |
||
1243 | 86e: 7c c0 rjmp .+248 ; 0x968 <__stack+0x109> |
||
1244 | { |
||
1245 | case '0':// LCD-Zeile0 |
||
1246 | Decode64((unsigned char *) &tmp_int_arr20,sizeof(tmp_int_arr20),3,AnzahlEmpfangsBytes); |
||
1247 | 870: 20 91 98 00 lds r18, 0x0098 |
||
1248 | 874: 43 e0 ldi r20, 0x03 ; 3 |
||
1249 | 876: 6a e2 ldi r22, 0x2A ; 42 |
||
1250 | 878: ce 01 movw r24, r28 |
||
1251 | 87a: 01 96 adiw r24, 0x01 ; 1 |
||
1252 | 87c: 0e 94 92 03 call 0x724 <Decode64> |
||
1253 | tmp_int_arr20[20] = 0; |
||
1254 | 880: 1a a6 std Y+42, r1 ; 0x2a |
||
1255 | 882: 19 a6 std Y+41, r1 ; 0x29 |
||
1256 | DisplayBusy = 1; |
||
1257 | 884: 81 e0 ldi r24, 0x01 ; 1 |
||
1258 | 886: 80 93 93 00 sts 0x0093, r24 |
||
1259 | LCD_printfxy(0,0,"%s",tmp_int_arr20); |
||
1260 | 88a: 60 e0 ldi r22, 0x00 ; 0 |
||
1261 | 88c: 86 2f mov r24, r22 |
||
1262 | 88e: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
1263 | 892: ce 01 movw r24, r28 |
||
1264 | 894: 01 96 adiw r24, 0x01 ; 1 |
||
1265 | 896: 9f 93 push r25 |
||
1266 | 898: 8f 93 push r24 |
||
1267 | 89a: 88 ea ldi r24, 0xA8 ; 168 |
||
1268 | 89c: 90 e0 ldi r25, 0x00 ; 0 |
||
1269 | 89e: 3e c0 rjmp .+124 ; 0x91c <__stack+0xbd> |
||
1270 | break; |
||
1271 | case '1':// LCD-Zeile1 |
||
1272 | Decode64((unsigned char *) &tmp_int_arr20,sizeof(tmp_int_arr20),3,AnzahlEmpfangsBytes); |
||
1273 | 8a0: 20 91 98 00 lds r18, 0x0098 |
||
1274 | 8a4: 43 e0 ldi r20, 0x03 ; 3 |
||
1275 | 8a6: 6a e2 ldi r22, 0x2A ; 42 |
||
1276 | 8a8: ce 01 movw r24, r28 |
||
1277 | 8aa: 01 96 adiw r24, 0x01 ; 1 |
||
1278 | 8ac: 0e 94 92 03 call 0x724 <Decode64> |
||
1279 | tmp_int_arr20[20] = 0; |
||
1280 | 8b0: 1a a6 std Y+42, r1 ; 0x2a |
||
1281 | 8b2: 19 a6 std Y+41, r1 ; 0x29 |
||
1282 | LCD_printfxy(0,1,"%s",tmp_int_arr20); |
||
1283 | 8b4: 61 e0 ldi r22, 0x01 ; 1 |
||
1284 | 8b6: 80 e0 ldi r24, 0x00 ; 0 |
||
1285 | 8b8: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
1286 | 8bc: ce 01 movw r24, r28 |
||
1287 | 8be: 01 96 adiw r24, 0x01 ; 1 |
||
1288 | 8c0: 9f 93 push r25 |
||
1289 | 8c2: 8f 93 push r24 |
||
1290 | 8c4: 8b ea ldi r24, 0xAB ; 171 |
||
1291 | 8c6: 90 e0 ldi r25, 0x00 ; 0 |
||
1292 | 8c8: 29 c0 rjmp .+82 ; 0x91c <__stack+0xbd> |
||
1293 | break; |
||
1294 | case '2':// LCD-Zeile2 |
||
1295 | Decode64((unsigned char *) &tmp_int_arr20,sizeof(tmp_int_arr20),3,AnzahlEmpfangsBytes); |
||
1296 | 8ca: 20 91 98 00 lds r18, 0x0098 |
||
1297 | 8ce: 43 e0 ldi r20, 0x03 ; 3 |
||
1298 | 8d0: 6a e2 ldi r22, 0x2A ; 42 |
||
1299 | 8d2: ce 01 movw r24, r28 |
||
1300 | 8d4: 01 96 adiw r24, 0x01 ; 1 |
||
1301 | 8d6: 0e 94 92 03 call 0x724 <Decode64> |
||
1302 | tmp_int_arr20[20] = 0; |
||
1303 | 8da: 1a a6 std Y+42, r1 ; 0x2a |
||
1304 | 8dc: 19 a6 std Y+41, r1 ; 0x29 |
||
1305 | LCD_printfxy(0,2,"%s",tmp_int_arr20); |
||
1306 | 8de: 62 e0 ldi r22, 0x02 ; 2 |
||
1307 | 8e0: 80 e0 ldi r24, 0x00 ; 0 |
||
1308 | 8e2: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
1309 | 8e6: ce 01 movw r24, r28 |
||
1310 | 8e8: 01 96 adiw r24, 0x01 ; 1 |
||
1311 | 8ea: 9f 93 push r25 |
||
1312 | 8ec: 8f 93 push r24 |
||
1313 | 8ee: 8e ea ldi r24, 0xAE ; 174 |
||
1314 | 8f0: 90 e0 ldi r25, 0x00 ; 0 |
||
1315 | 8f2: 14 c0 rjmp .+40 ; 0x91c <__stack+0xbd> |
||
1316 | break; |
||
1317 | case '3':// LCD-Zeile3 |
||
1318 | Decode64((unsigned char *) &tmp_int_arr20,sizeof(tmp_int_arr20),3,AnzahlEmpfangsBytes); |
||
1319 | 8f4: 20 91 98 00 lds r18, 0x0098 |
||
1320 | 8f8: 43 e0 ldi r20, 0x03 ; 3 |
||
1321 | 8fa: 6a e2 ldi r22, 0x2A ; 42 |
||
1322 | 8fc: ce 01 movw r24, r28 |
||
1323 | 8fe: 01 96 adiw r24, 0x01 ; 1 |
||
1324 | 900: 0e 94 92 03 call 0x724 <Decode64> |
||
1325 | tmp_int_arr20[20] = 0; |
||
1326 | 904: 1a a6 std Y+42, r1 ; 0x2a |
||
1327 | 906: 19 a6 std Y+41, r1 ; 0x29 |
||
1328 | LCD_printfxy(0,3,"%s",tmp_int_arr20); |
||
1329 | 908: 63 e0 ldi r22, 0x03 ; 3 |
||
1330 | 90a: 80 e0 ldi r24, 0x00 ; 0 |
||
1331 | 90c: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
1332 | 910: ce 01 movw r24, r28 |
||
1333 | 912: 01 96 adiw r24, 0x01 ; 1 |
||
1334 | 914: 9f 93 push r25 |
||
1335 | 916: 8f 93 push r24 |
||
1336 | 918: 81 eb ldi r24, 0xB1 ; 177 |
||
1337 | 91a: 90 e0 ldi r25, 0x00 ; 0 |
||
1338 | 91c: 9f 93 push r25 |
||
1339 | 91e: 8f 93 push r24 |
||
1340 | 920: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
1341 | break; |
||
1342 | 924: 0f 90 pop r0 |
||
1343 | 926: 0f 90 pop r0 |
||
1344 | 928: 0f 90 pop r0 |
||
1345 | 92a: 0f 90 pop r0 |
||
1346 | 92c: 1d c0 rjmp .+58 ; 0x968 <__stack+0x109> |
||
1347 | case 'D': // Debug Eingangsdaten |
||
1348 | Decode64((unsigned char *) &DebugOut,sizeof(DebugOut),3,AnzahlEmpfangsBytes); |
||
1349 | 92e: 20 91 98 00 lds r18, 0x0098 |
||
1350 | 932: 43 e0 ldi r20, 0x03 ; 3 |
||
1351 | 934: 6a e1 ldi r22, 0x1A ; 26 |
||
1352 | 936: 83 ed ldi r24, 0xD3 ; 211 |
||
1353 | 938: 90 e0 ldi r25, 0x00 ; 0 |
||
1354 | 93a: 0e 94 92 03 call 0x724 <Decode64> |
||
1355 | PORTB = DebugOut.Digital[1]; |
||
1356 | 93e: 80 91 d4 00 lds r24, 0x00D4 |
||
1357 | 942: 88 bb out 0x18, r24 ; 24 |
||
1358 | break; |
||
1359 | 944: 11 c0 rjmp .+34 ; 0x968 <__stack+0x109> |
||
1360 | case 'K': // Debug Eingangsdaten |
||
1361 | Decode64(tmp_char_arr3,sizeof(tmp_char_arr3),3,AnzahlEmpfangsBytes); |
||
1362 | 946: 20 91 98 00 lds r18, 0x0098 |
||
1363 | 94a: 43 e0 ldi r20, 0x03 ; 3 |
||
1364 | 94c: 64 2f mov r22, r20 |
||
1365 | 94e: ce 01 movw r24, r28 |
||
1366 | 950: 8b 96 adiw r24, 0x2b ; 43 |
||
1367 | 952: 0e 94 92 03 call 0x724 <Decode64> |
||
1368 | TX_DigTransferKanalL = tmp_char_arr3[0]; |
||
1369 | 956: 8b a5 ldd r24, Y+43 ; 0x2b |
||
1370 | 958: 80 93 96 00 sts 0x0096, r24 |
||
1371 | TX_DigTransferKanalH = tmp_char_arr3[1]; |
||
1372 | 95c: 8c a5 ldd r24, Y+44 ; 0x2c |
||
1373 | 95e: 80 93 95 00 sts 0x0095, r24 |
||
1374 | TX_DigTransferKanalDaten = tmp_char_arr3[2]; |
||
1375 | 962: 8d a5 ldd r24, Y+45 ; 0x2d |
||
1376 | 964: 80 93 94 00 sts 0x0094, r24 |
||
1377 | 968: ad 96 adiw r28, 0x2d ; 45 |
||
1378 | 96a: 0f b6 in r0, 0x3f ; 63 |
||
1379 | 96c: f8 94 cli |
||
1380 | 96e: de bf out 0x3e, r29 ; 62 |
||
1381 | 970: 0f be out 0x3f, r0 ; 63 |
||
1382 | 972: cd bf out 0x3d, r28 ; 61 |
||
1383 | 974: df 91 pop r29 |
||
1384 | 976: cf 91 pop r28 |
||
1385 | 978: 08 95 ret |
||
1386 | |||
1387 | 0000097a <uart_putchar>: |
||
1388 | //if(RxdBuffer[1] == 'b') LCD_printfxy(0,0,"b:%4d %2x",(int)TX_DigTransferKanalH * 256 + TX_DigTransferKanalL,TX_DigTransferKanalDaten); |
||
1389 | //if(RxdBuffer[1] == 'c') LCD_printfxy(0,1,"c:%4d %2x",(int)TX_DigTransferKanalH * 256 + TX_DigTransferKanalL,TX_DigTransferKanalDaten); |
||
1390 | break; |
||
1391 | /* |
||
1392 | unsigned char Digital[13]; // 0 = Taster, Hauptkarte |
||
1393 | // 1 + 2 = Debugkanäle |
||
1394 | // 3 = Digin, Hauptkarte |
||
1395 | // 4 = Relais, Hauptkarte |
||
1396 | // 5 + 6 = Extern IO1 (12Bit ein 4 Bit aus) |
||
1397 | // 7 + 8 = Extern IO2 (12Bit ein 4 Bit aus) |
||
1398 | // 9 + 10 = Extern IO3 (12Bit ein 4 Bit aus) |
||
1399 | // 11 + 12= Extern IO4 (12Bit ein 4 Bit aus) |
||
1400 | */ |
||
1401 | |||
1402 | /* case 'd': // Debug Eingangsdaten |
||
1403 | Decode64((unsigned char *) &DebugIn,sizeof(DebugIn),3,AnzahlEmpfangsBytes); |
||
1404 | for(unsigned char i=0; i<4;i++) |
||
1405 | { |
||
1406 | EE_CheckAndWrite(&EE_Buffer[EE_DEBUGWERTE + i*2], DebugIn.Analog[i]); |
||
1407 | EE_CheckAndWrite(&EE_Buffer[EE_DEBUGWERTE + i*2 + 1], DebugIn.Analog[i] >> 8); |
||
1408 | } |
||
1409 | break; |
||
1410 | case 'g': // "Get"-Anforderung für Debug-Daten // Bei Get werden die vom PC einstellbaren Werte vom PC zurückgelesen |
||
1411 | DebugGetAnforderung = 1; |
||
1412 | break; |
||
1413 | case 'v': // Version-Anforderung und Ausbaustufe |
||
1414 | GetVersionAnforderung = 1; |
||
1415 | break; |
||
1416 | case 'u': // Uhr stellen |
||
1417 | Decode64((unsigned char *) &tmp_int_arr2[0],sizeof(tmp_int_arr2),3,AnzahlEmpfangsBytes); |
||
1418 | ZEITWERT = tmp_int_arr2[0]; |
||
1419 | SEK = tmp_int_arr2[1]; |
||
1420 | make_time_variables(ZEITWERT); |
||
1421 | RTC_SetTime(STD, MIN, SEK); |
||
1422 | RTC_SetWDay(TAG); |
||
1423 | break; |
||
1424 | case 'i': // Intervalle für die Datenübertragung |
||
1425 | Decode64((unsigned char *) &tmp_int_arr2[0],sizeof(tmp_int_arr2),3,AnzahlEmpfangsBytes); |
||
1426 | Debug_Timer_Intervall = tmp_int_arr2[0]; |
||
1427 | Debug_Display_Intervall = tmp_int_arr2[1]; |
||
1428 | SendeDummyDaten = 1; |
||
1429 | break; |
||
1430 | case 's': // single Step 1 = Stop 2 = noch einen Zyklus 3 = noch 2 Zyklen |
||
1431 | Decode64((unsigned char *) &tmp_int_arr1[0],sizeof(tmp_int_arr2),3,AnzahlEmpfangsBytes); |
||
1432 | SingleStep = tmp_int_arr1[0]; |
||
1433 | break; |
||
1434 | */ |
||
1435 | } |
||
1436 | } |
||
1437 | |||
1438 | //############################################################################ |
||
1439 | //Routine für die Serielle Ausgabe |
||
1440 | int uart_putchar (char c) |
||
1441 | //############################################################################ |
||
1442 | { |
||
1443 | 97a: cf 93 push r28 |
||
1444 | 97c: c8 2f mov r28, r24 |
||
1445 | if (c == '\n') |
||
1446 | 97e: 8a 30 cpi r24, 0x0A ; 10 |
||
1447 | 980: 19 f4 brne .+6 ; 0x988 <uart_putchar+0xe> |
||
1448 | uart_putchar('\r'); |
||
1449 | 982: 8d e0 ldi r24, 0x0D ; 13 |
||
1450 | 984: 0e 94 bd 04 call 0x97a <uart_putchar> |
||
1451 | //Warten solange bis Zeichen gesendet wurde |
||
1452 | loop_until_bit_is_set(USR, UDRE); |
||
1453 | 988: 5d 9b sbis 0x0b, 5 ; 11 |
||
1454 | 98a: fe cf rjmp .-4 ; 0x988 <uart_putchar+0xe> |
||
1455 | //Ausgabe des Zeichens |
||
1456 | UDR = c; |
||
1457 | 98c: cc b9 out 0x0c, r28 ; 12 |
||
1458 | |||
1459 | return (0); |
||
1460 | } |
||
1461 | 98e: 80 e0 ldi r24, 0x00 ; 0 |
||
1462 | 990: 90 e0 ldi r25, 0x00 ; 0 |
||
1463 | 992: cf 91 pop r28 |
||
1464 | 994: 08 95 ret |
||
1465 | |||
1466 | 00000996 <WriteProgramData>: |
||
1467 | |||
1468 | // -------------------------------------------------------------------------- |
||
1469 | void WriteProgramData(unsigned int pos, unsigned char wert) |
||
1470 | { |
||
1471 | 996: 08 95 ret |
||
1472 | |||
1473 | 00000998 <UART_Init>: |
||
1474 | //if (ProgramLocation == IN_RAM) Buffer[pos] = wert; |
||
1475 | // else eeprom_write_byte(&EE_Buffer[pos], wert); |
||
1476 | // Buffer[pos] = wert; |
||
1477 | } |
||
1478 | |||
1479 | //############################################################################ |
||
1480 | //INstallation der Seriellen Schnittstelle |
||
1481 | void UART_Init (void) |
||
1482 | //############################################################################ |
||
1483 | { |
||
1484 | //Enable TXEN im Register UCR TX-Data Enable & RX Enable |
||
1485 | |||
1486 | UCR=(1 << TXEN) | (1 << RXEN); |
||
1487 | 998: 88 e1 ldi r24, 0x18 ; 24 |
||
1488 | 99a: 8a b9 out 0x0a, r24 ; 10 |
||
1489 | // UART Double Speed (U2X) |
||
1490 | USR |= (1<<U2X); |
||
1491 | 99c: 59 9a sbi 0x0b, 1 ; 11 |
||
1492 | // RX-Interrupt Freigabe |
||
1493 | UCSRB |= (1<<RXCIE); |
||
1494 | 99e: 57 9a sbi 0x0a, 7 ; 10 |
||
1495 | // TX-Interrupt Freigabe |
||
1496 | UCSRB |= (1<<TXCIE); |
||
1497 | 9a0: 56 9a sbi 0x0a, 6 ; 10 |
||
1498 | |||
1499 | //Teiler wird gesetzt |
||
1500 | UBRR=(SYSCLK / (BAUD_RATE * 8L) - 1); |
||
1501 | 9a2: 81 e2 ldi r24, 0x21 ; 33 |
||
1502 | 9a4: 89 b9 out 0x09, r24 ; 9 |
||
1503 | //UBRR = 33; |
||
1504 | //öffnet einen Kanal für printf (STDOUT) |
||
1505 | fdevopen (uart_putchar, NULL); |
||
1506 | 9a6: 60 e0 ldi r22, 0x00 ; 0 |
||
1507 | 9a8: 70 e0 ldi r23, 0x00 ; 0 |
||
1508 | 9aa: 8d eb ldi r24, 0xBD ; 189 |
||
1509 | 9ac: 94 e0 ldi r25, 0x04 ; 4 |
||
1510 | 9ae: 0e 94 71 0c call 0x18e2 <fdevopen> |
||
1511 | 9b2: 08 95 ret |
||
1512 | |||
1513 | 000009b4 <SendeRemoteTasten>: |
||
1514 | //sbi(PORTD,4); |
||
1515 | } |
||
1516 | |||
1517 | /* |
||
1518 | struct str_DebugIn |
||
1519 | { |
||
1520 | unsigned char Digital[2]; |
||
1521 | unsigned char RemoteTasten; |
||
1522 | unsigned int Analog[4]; |
||
1523 | }; |
||
1524 | */ |
||
1525 | void SendeRemoteTasten(unsigned char keys) |
||
1526 | { |
||
1527 | 9b4: 98 2f mov r25, r24 |
||
1528 | while(!UebertragungAbgeschlossen); // evtl warten |
||
1529 | 9b6: 80 91 6e 00 lds r24, 0x006E |
||
1530 | 9ba: 88 23 and r24, r24 |
||
1531 | 9bc: e1 f3 breq .-8 ; 0x9b6 <SendeRemoteTasten+0x2> |
||
1532 | DebugIn.RemoteTasten = keys; |
||
1533 | 9be: 90 93 c0 00 sts 0x00C0, r25 |
||
1534 | DebugIn.Analog[0] = AnalogWerte[0]; |
||
1535 | 9c2: 80 91 ca 01 lds r24, 0x01CA |
||
1536 | 9c6: 90 91 cb 01 lds r25, 0x01CB |
||
1537 | 9ca: 90 93 c2 00 sts 0x00C2, r25 |
||
1538 | 9ce: 80 93 c1 00 sts 0x00C1, r24 |
||
1539 | DebugIn.Analog[1] = AnalogWerte[1]; |
||
1540 | 9d2: 80 91 cc 01 lds r24, 0x01CC |
||
1541 | 9d6: 90 91 cd 01 lds r25, 0x01CD |
||
1542 | 9da: 90 93 c4 00 sts 0x00C4, r25 |
||
1543 | 9de: 80 93 c3 00 sts 0x00C3, r24 |
||
1544 | DebugIn.Analog[2] = AnalogWerte[2]; |
||
1545 | 9e2: 80 91 ce 01 lds r24, 0x01CE |
||
1546 | 9e6: 90 91 cf 01 lds r25, 0x01CF |
||
1547 | 9ea: 90 93 c6 00 sts 0x00C6, r25 |
||
1548 | 9ee: 80 93 c5 00 sts 0x00C5, r24 |
||
1549 | DebugIn.Analog[3] = IR_Code; |
||
1550 | 9f2: 80 91 c7 01 lds r24, 0x01C7 |
||
1551 | 9f6: 90 91 c8 01 lds r25, 0x01C8 |
||
1552 | 9fa: 90 93 c8 00 sts 0x00C8, r25 |
||
1553 | 9fe: 80 93 c7 00 sts 0x00C7, r24 |
||
1554 | SendOutData('d',SlaveAdresse,(unsigned char *) &DebugIn,sizeof(DebugIn)); |
||
1555 | a02: 2b e0 ldi r18, 0x0B ; 11 |
||
1556 | a04: 4e eb ldi r20, 0xBE ; 190 |
||
1557 | a06: 50 e0 ldi r21, 0x00 ; 0 |
||
1558 | a08: 60 91 64 00 lds r22, 0x0064 |
||
1559 | a0c: 84 e6 ldi r24, 0x64 ; 100 |
||
1560 | a0e: 0e 94 1e 03 call 0x63c <SendOutData> |
||
1561 | a12: 08 95 ret |
||
1562 | |||
1563 | 00000a14 <SendIntervalle>: |
||
1564 | } |
||
1565 | |||
1566 | void SendIntervalle(unsigned int debug, unsigned int disp) |
||
1567 | { |
||
1568 | a14: cf 93 push r28 |
||
1569 | a16: df 93 push r29 |
||
1570 | a18: cd b7 in r28, 0x3d ; 61 |
||
1571 | a1a: de b7 in r29, 0x3e ; 62 |
||
1572 | a1c: 24 97 sbiw r28, 0x04 ; 4 |
||
1573 | a1e: 0f b6 in r0, 0x3f ; 63 |
||
1574 | a20: f8 94 cli |
||
1575 | a22: de bf out 0x3e, r29 ; 62 |
||
1576 | a24: 0f be out 0x3f, r0 ; 63 |
||
1577 | a26: cd bf out 0x3d, r28 ; 61 |
||
1578 | unsigned int tmp_int_arr2[2]; |
||
1579 | tmp_int_arr2[0] = debug; |
||
1580 | a28: 9a 83 std Y+2, r25 ; 0x02 |
||
1581 | a2a: 89 83 std Y+1, r24 ; 0x01 |
||
1582 | tmp_int_arr2[1] = disp; |
||
1583 | a2c: 7c 83 std Y+4, r23 ; 0x04 |
||
1584 | a2e: 6b 83 std Y+3, r22 ; 0x03 |
||
1585 | while(!UebertragungAbgeschlossen); // evtl warten |
||
1586 | a30: 80 91 6e 00 lds r24, 0x006E |
||
1587 | a34: 88 23 and r24, r24 |
||
1588 | a36: e1 f3 breq .-8 ; 0xa30 <SendIntervalle+0x1c> |
||
1589 | SendOutData('i',SlaveAdresse,(unsigned char *) &tmp_int_arr2,sizeof(tmp_int_arr2)); |
||
1590 | a38: 24 e0 ldi r18, 0x04 ; 4 |
||
1591 | a3a: ae 01 movw r20, r28 |
||
1592 | a3c: 4f 5f subi r20, 0xFF ; 255 |
||
1593 | a3e: 5f 4f sbci r21, 0xFF ; 255 |
||
1594 | a40: 60 91 64 00 lds r22, 0x0064 |
||
1595 | a44: 89 e6 ldi r24, 0x69 ; 105 |
||
1596 | a46: 0e 94 1e 03 call 0x63c <SendOutData> |
||
1597 | a4a: 24 96 adiw r28, 0x04 ; 4 |
||
1598 | a4c: 0f b6 in r0, 0x3f ; 63 |
||
1599 | a4e: f8 94 cli |
||
1600 | a50: de bf out 0x3e, r29 ; 62 |
||
1601 | a52: 0f be out 0x3f, r0 ; 63 |
||
1602 | a54: cd bf out 0x3d, r28 ; 61 |
||
1603 | a56: df 91 pop r29 |
||
1604 | a58: cf 91 pop r28 |
||
1605 | a5a: 08 95 ret |
||
1606 | |||
1607 | 00000a5c <ClearIntervalle>: |
||
1608 | } |
||
1609 | |||
1610 | void ClearIntervalle(void) |
||
1611 | { |
||
1612 | a5c: cf 93 push r28 |
||
1613 | a5e: df 93 push r29 |
||
1614 | a60: cd b7 in r28, 0x3d ; 61 |
||
1615 | a62: de b7 in r29, 0x3e ; 62 |
||
1616 | a64: 24 97 sbiw r28, 0x04 ; 4 |
||
1617 | a66: 0f b6 in r0, 0x3f ; 63 |
||
1618 | a68: f8 94 cli |
||
1619 | a6a: de bf out 0x3e, r29 ; 62 |
||
1620 | a6c: 0f be out 0x3f, r0 ; 63 |
||
1621 | a6e: cd bf out 0x3d, r28 ; 61 |
||
1622 | unsigned int tmp_int_arr2[2]; |
||
1623 | tmp_int_arr2[0] = 0; |
||
1624 | a70: 1a 82 std Y+2, r1 ; 0x02 |
||
1625 | a72: 19 82 std Y+1, r1 ; 0x01 |
||
1626 | tmp_int_arr2[1] = 0; |
||
1627 | a74: 1c 82 std Y+4, r1 ; 0x04 |
||
1628 | a76: 1b 82 std Y+3, r1 ; 0x03 |
||
1629 | while(!UebertragungAbgeschlossen); // evtl warten |
||
1630 | a78: 80 91 6e 00 lds r24, 0x006E |
||
1631 | a7c: 88 23 and r24, r24 |
||
1632 | a7e: e1 f3 breq .-8 ; 0xa78 <ClearIntervalle+0x1c> |
||
1633 | SendOutData('i',0,(unsigned char *) &tmp_int_arr2,sizeof(tmp_int_arr2)); // 0= an alle |
||
1634 | a80: 24 e0 ldi r18, 0x04 ; 4 |
||
1635 | a82: ae 01 movw r20, r28 |
||
1636 | a84: 4f 5f subi r20, 0xFF ; 255 |
||
1637 | a86: 5f 4f sbci r21, 0xFF ; 255 |
||
1638 | a88: 60 e0 ldi r22, 0x00 ; 0 |
||
1639 | a8a: 89 e6 ldi r24, 0x69 ; 105 |
||
1640 | a8c: 0e 94 1e 03 call 0x63c <SendOutData> |
||
1641 | a90: 24 96 adiw r28, 0x04 ; 4 |
||
1642 | a92: 0f b6 in r0, 0x3f ; 63 |
||
1643 | a94: f8 94 cli |
||
1644 | a96: de bf out 0x3e, r29 ; 62 |
||
1645 | a98: 0f be out 0x3f, r0 ; 63 |
||
1646 | a9a: cd bf out 0x3d, r28 ; 61 |
||
1647 | a9c: df 91 pop r29 |
||
1648 | a9e: cf 91 pop r28 |
||
1649 | aa0: 08 95 ret |
||
1650 | |||
1651 | 00000aa2 <DatenUebertragung>: |
||
1652 | } |
||
1653 | |||
1654 | void DatenUebertragung(unsigned char key) |
||
1655 | { |
||
1656 | aa2: cf 93 push r28 |
||
1657 | aa4: df 93 push r29 |
||
1658 | aa6: cd b7 in r28, 0x3d ; 61 |
||
1659 | aa8: de b7 in r29, 0x3e ; 62 |
||
1660 | aaa: 25 97 sbiw r28, 0x05 ; 5 |
||
1661 | aac: 0f b6 in r0, 0x3f ; 63 |
||
1662 | aae: f8 94 cli |
||
1663 | ab0: de bf out 0x3e, r29 ; 62 |
||
1664 | ab2: 0f be out 0x3f, r0 ; 63 |
||
1665 | ab4: cd bf out 0x3d, r28 ; 61 |
||
1666 | ab6: 98 2f mov r25, r24 |
||
1667 | static unsigned char state = 1; |
||
1668 | unsigned char temp_1[1]; |
||
1669 | unsigned char temp_2[2]; |
||
1670 | unsigned char temp_3[3]; |
||
1671 | unsigned int tmp_int_arr2[2]; |
||
1672 | while(!UebertragungAbgeschlossen); // evtl warten |
||
1673 | ab8: 80 91 6e 00 lds r24, 0x006E |
||
1674 | abc: 88 23 and r24, r24 |
||
1675 | abe: e1 f3 breq .-8 ; 0xab8 <DatenUebertragung+0x16> |
||
1676 | static unsigned char KanalSlave = 1; |
||
1677 | |||
1678 | if(PollDisplay) |
||
1679 | ac0: 80 91 ed 00 lds r24, 0x00ED |
||
1680 | ac4: 88 23 and r24, r24 |
||
1681 | ac6: e1 f0 breq .+56 ; 0xb00 <DatenUebertragung+0x5e> |
||
1682 | { |
||
1683 | temp_2[0] = key; |
||
1684 | ac8: 9c 83 std Y+4, r25 ; 0x04 |
||
1685 | temp_2[1] = 6; |
||
1686 | aca: 86 e0 ldi r24, 0x06 ; 6 |
||
1687 | acc: 8d 83 std Y+5, r24 ; 0x05 |
||
1688 | if(DisplayZeilen == 4) temp_2[1] = 4 + 9; // anzahl Zeilen --> + 8 bedeutet: ersten Pollingzyklus freilassen |
||
1689 | ace: 80 91 65 00 lds r24, 0x0065 |
||
1690 | ad2: 84 30 cpi r24, 0x04 ; 4 |
||
1691 | ad4: 11 f4 brne .+4 ; 0xada <DatenUebertragung+0x38> |
||
1692 | ad6: 8d e0 ldi r24, 0x0D ; 13 |
||
1693 | ad8: 01 c0 rjmp .+2 ; 0xadc <DatenUebertragung+0x3a> |
||
1694 | else temp_2[1] = 2 + 9; |
||
1695 | ada: 8b e0 ldi r24, 0x0B ; 11 |
||
1696 | adc: 8d 83 std Y+5, r24 ; 0x05 |
||
1697 | SendOutData('h',SlaveAdresse,(unsigned char *) &temp_2,sizeof(temp_2)); |
||
1698 | ade: 22 e0 ldi r18, 0x02 ; 2 |
||
1699 | ae0: ae 01 movw r20, r28 |
||
1700 | ae2: 4c 5f subi r20, 0xFC ; 252 |
||
1701 | ae4: 5f 4f sbci r21, 0xFF ; 255 |
||
1702 | ae6: 60 91 64 00 lds r22, 0x0064 |
||
1703 | aea: 88 e6 ldi r24, 0x68 ; 104 |
||
1704 | aec: 0e 94 1e 03 call 0x63c <SendOutData> |
||
1705 | ErwarteAntwort = '0'; |
||
1706 | af0: 80 e3 ldi r24, 0x30 ; 48 |
||
1707 | af2: 80 93 6d 00 sts 0x006D, r24 |
||
1708 | DisplayBusy = 90; |
||
1709 | af6: 8a e5 ldi r24, 0x5A ; 90 |
||
1710 | af8: 80 93 93 00 sts 0x0093, r24 |
||
1711 | PollDisplay = 0; |
||
1712 | afc: 10 92 ed 00 sts 0x00ED, r1 |
||
1713 | } |
||
1714 | |||
1715 | if(!DisplayBusy) |
||
1716 | b00: 60 91 93 00 lds r22, 0x0093 |
||
1717 | b04: 66 23 and r22, r22 |
||
1718 | b06: e1 f5 brne .+120 ; 0xb80 <DatenUebertragung+0xde> |
||
1719 | switch(state) |
||
1720 | b08: 80 91 6f 00 lds r24, 0x006F |
||
1721 | b0c: 99 27 eor r25, r25 |
||
1722 | b0e: 81 30 cpi r24, 0x01 ; 1 |
||
1723 | b10: 91 05 cpc r25, r1 |
||
1724 | b12: 19 f0 breq .+6 ; 0xb1a <DatenUebertragung+0x78> |
||
1725 | b14: 02 97 sbiw r24, 0x02 ; 2 |
||
1726 | b16: e9 f0 breq .+58 ; 0xb52 <DatenUebertragung+0xb0> |
||
1727 | b18: 30 c0 rjmp .+96 ; 0xb7a <DatenUebertragung+0xd8> |
||
1728 | { |
||
1729 | case 1:// Display |
||
1730 | SendOutData('k',KanalSlave,(unsigned char *) &temp_3,sizeof(temp_3)); |
||
1731 | b1a: 23 e0 ldi r18, 0x03 ; 3 |
||
1732 | b1c: ae 01 movw r20, r28 |
||
1733 | b1e: 4f 5f subi r20, 0xFF ; 255 |
||
1734 | b20: 5f 4f sbci r21, 0xFF ; 255 |
||
1735 | b22: 60 91 70 00 lds r22, 0x0070 |
||
1736 | b26: 8b e6 ldi r24, 0x6B ; 107 |
||
1737 | b28: 0e 94 1e 03 call 0x63c <SendOutData> |
||
1738 | ErwarteAntwort = 'K'; |
||
1739 | b2c: 8b e4 ldi r24, 0x4B ; 75 |
||
1740 | b2e: 80 93 6d 00 sts 0x006D, r24 |
||
1741 | if(++KanalSlave > AnzahlTeilnehmer) KanalSlave = 1; |
||
1742 | b32: 80 91 70 00 lds r24, 0x0070 |
||
1743 | b36: 8f 5f subi r24, 0xFF ; 255 |
||
1744 | b38: 80 93 70 00 sts 0x0070, r24 |
||
1745 | b3c: 90 91 6c 00 lds r25, 0x006C |
||
1746 | b40: 98 17 cp r25, r24 |
||
1747 | b42: 18 f4 brcc .+6 ; 0xb4a <DatenUebertragung+0xa8> |
||
1748 | b44: 81 e0 ldi r24, 0x01 ; 1 |
||
1749 | b46: 80 93 70 00 sts 0x0070, r24 |
||
1750 | state++; |
||
1751 | b4a: 80 91 6f 00 lds r24, 0x006F |
||
1752 | b4e: 8f 5f subi r24, 0xFF ; 255 |
||
1753 | b50: 15 c0 rjmp .+42 ; 0xb7c <DatenUebertragung+0xda> |
||
1754 | break; |
||
1755 | case 2: |
||
1756 | temp_3[0] = TX_DigTransferKanalL; |
||
1757 | b52: 80 91 96 00 lds r24, 0x0096 |
||
1758 | b56: 89 83 std Y+1, r24 ; 0x01 |
||
1759 | temp_3[1] = TX_DigTransferKanalH; |
||
1760 | b58: 80 91 95 00 lds r24, 0x0095 |
||
1761 | b5c: 8a 83 std Y+2, r24 ; 0x02 |
||
1762 | temp_3[2] = TX_DigTransferKanalDaten; |
||
1763 | b5e: 80 91 94 00 lds r24, 0x0094 |
||
1764 | b62: 8b 83 std Y+3, r24 ; 0x03 |
||
1765 | SendOutData('l',0,(unsigned char *) &temp_3,sizeof(temp_3)); |
||
1766 | b64: 23 e0 ldi r18, 0x03 ; 3 |
||
1767 | b66: ae 01 movw r20, r28 |
||
1768 | b68: 4f 5f subi r20, 0xFF ; 255 |
||
1769 | b6a: 5f 4f sbci r21, 0xFF ; 255 |
||
1770 | b6c: 8c e6 ldi r24, 0x6C ; 108 |
||
1771 | b6e: 0e 94 1e 03 call 0x63c <SendOutData> |
||
1772 | AntwortEingetroffen = 1; // erwarte keine Antwort |
||
1773 | b72: 81 e0 ldi r24, 0x01 ; 1 |
||
1774 | b74: 80 93 92 00 sts 0x0092, r24 |
||
1775 | b78: 01 c0 rjmp .+2 ; 0xb7c <DatenUebertragung+0xda> |
||
1776 | state = 1; |
||
1777 | break; |
||
1778 | |||
1779 | default: state = 1; |
||
1780 | b7a: 81 e0 ldi r24, 0x01 ; 1 |
||
1781 | b7c: 80 93 6f 00 sts 0x006F, r24 |
||
1782 | b80: 25 96 adiw r28, 0x05 ; 5 |
||
1783 | b82: 0f b6 in r0, 0x3f ; 63 |
||
1784 | b84: f8 94 cli |
||
1785 | b86: de bf out 0x3e, r29 ; 62 |
||
1786 | b88: 0f be out 0x3f, r0 ; 63 |
||
1787 | b8a: cd bf out 0x3d, r28 ; 61 |
||
1788 | b8c: df 91 pop r29 |
||
1789 | b8e: cf 91 pop r28 |
||
1790 | b90: 08 95 ret |
||
1791 | |||
1792 | 00000b92 <_long_delay>: |
||
1793 | #include "main.h" |
||
1794 | |||
1795 | void _long_delay(void) |
||
1796 | { |
||
1797 | long t = 5000; |
||
1798 | b92: 88 e8 ldi r24, 0x88 ; 136 |
||
1799 | b94: 93 e1 ldi r25, 0x13 ; 19 |
||
1800 | b96: a0 e0 ldi r26, 0x00 ; 0 |
||
1801 | b98: b0 e0 ldi r27, 0x00 ; 0 |
||
1802 | while (t--); |
||
1803 | b9a: 03 97 sbiw r24, 0x03 ; 3 |
||
1804 | b9c: a1 09 sbc r26, r1 |
||
1805 | b9e: b1 09 sbc r27, r1 |
||
1806 | ba0: 8f 3f cpi r24, 0xFF ; 255 |
||
1807 | ba2: 2f ef ldi r18, 0xFF ; 255 |
||
1808 | ba4: 92 07 cpc r25, r18 |
||
1809 | ba6: 2f ef ldi r18, 0xFF ; 255 |
||
1810 | ba8: a2 07 cpc r26, r18 |
||
1811 | baa: 2f ef ldi r18, 0xFF ; 255 |
||
1812 | bac: b2 07 cpc r27, r18 |
||
1813 | bae: a9 f7 brne .-22 ; 0xb9a <_long_delay+0x8> |
||
1814 | bb0: 08 95 ret |
||
1815 | |||
1816 | 00000bb2 <_short_delay>: |
||
1817 | } |
||
1818 | |||
1819 | void _short_delay(void) |
||
1820 | { |
||
1821 | int t = 500; |
||
1822 | bb2: 84 ef ldi r24, 0xF4 ; 244 |
||
1823 | bb4: 91 e0 ldi r25, 0x01 ; 1 |
||
1824 | while (t--); |
||
1825 | bb6: 03 97 sbiw r24, 0x03 ; 3 |
||
1826 | bb8: 2f ef ldi r18, 0xFF ; 255 |
||
1827 | bba: 8f 3f cpi r24, 0xFF ; 255 |
||
1828 | bbc: 92 07 cpc r25, r18 |
||
1829 | bbe: d9 f7 brne .-10 ; 0xbb6 <_short_delay+0x4> |
||
1830 | bc0: 08 95 ret |
||
1831 | |||
1832 | 00000bc2 <_lcd_write_command>: |
||
1833 | } |
||
1834 | |||
1835 | |||
1836 | void _lcd_write_command(unsigned char data) |
||
1837 | { |
||
1838 | bc2: 28 2f mov r18, r24 |
||
1839 | LCD_PORT_w = (data & 0xf0) | DISPLAY_EN; |
||
1840 | bc4: 80 7f andi r24, 0xF0 ; 240 |
||
1841 | bc6: 98 2f mov r25, r24 |
||
1842 | bc8: 94 60 ori r25, 0x04 ; 4 |
||
1843 | bca: 95 bb out 0x15, r25 ; 21 |
||
1844 | LCD_PORT_w = (data & 0xf0) | DISPLAY_EN; |
||
1845 | bcc: 95 bb out 0x15, r25 ; 21 |
||
1846 | LCD_PORT_w = (data & 0xf0); |
||
1847 | bce: 85 bb out 0x15, r24 ; 21 |
||
1848 | LCD_PORT_w = (data & 0xf0); |
||
1849 | bd0: 85 bb out 0x15, r24 ; 21 |
||
1850 | LCD_PORT_w = (data << 4) | DISPLAY_EN; |
||
1851 | bd2: 82 2f mov r24, r18 |
||
1852 | bd4: 99 27 eor r25, r25 |
||
1853 | bd6: 34 e0 ldi r19, 0x04 ; 4 |
||
1854 | bd8: 88 0f add r24, r24 |
||
1855 | bda: 99 1f adc r25, r25 |
||
1856 | bdc: 3a 95 dec r19 |
||
1857 | bde: e1 f7 brne .-8 ; 0xbd8 <_lcd_write_command+0x16> |
||
1858 | be0: 84 60 ori r24, 0x04 ; 4 |
||
1859 | be2: 85 bb out 0x15, r24 ; 21 |
||
1860 | LCD_PORT_w = (data << 4) | DISPLAY_EN; |
||
1861 | be4: 85 bb out 0x15, r24 ; 21 |
||
1862 | LCD_PORT_w = (data << 4); |
||
1863 | be6: 22 95 swap r18 |
||
1864 | be8: 20 7f andi r18, 0xF0 ; 240 |
||
1865 | bea: 25 bb out 0x15, r18 ; 21 |
||
1866 | bec: 08 95 ret |
||
1867 | |||
1868 | 00000bee <_lcd_write_4bit>: |
||
1869 | } |
||
1870 | |||
1871 | void _lcd_write_4bit(unsigned char data) |
||
1872 | { |
||
1873 | LCD_PORT_w = (data << 4) | DISPLAY_EN; |
||
1874 | bee: 28 2f mov r18, r24 |
||
1875 | bf0: 33 27 eor r19, r19 |
||
1876 | bf2: 44 e0 ldi r20, 0x04 ; 4 |
||
1877 | bf4: 22 0f add r18, r18 |
||
1878 | bf6: 33 1f adc r19, r19 |
||
1879 | bf8: 4a 95 dec r20 |
||
1880 | bfa: e1 f7 brne .-8 ; 0xbf4 <_lcd_write_4bit+0x6> |
||
1881 | bfc: 92 2f mov r25, r18 |
||
1882 | bfe: 94 60 ori r25, 0x04 ; 4 |
||
1883 | c00: 95 bb out 0x15, r25 ; 21 |
||
1884 | LCD_PORT_w = (data << 4) | DISPLAY_EN; |
||
1885 | c02: 95 bb out 0x15, r25 ; 21 |
||
1886 | LCD_PORT_w = (data << 4); |
||
1887 | c04: 82 95 swap r24 |
||
1888 | c06: 80 7f andi r24, 0xF0 ; 240 |
||
1889 | c08: 85 bb out 0x15, r24 ; 21 |
||
1890 | c0a: 08 95 ret |
||
1891 | |||
1892 | 00000c0c <lcd_write_byte>: |
||
1893 | } |
||
1894 | |||
1895 | void lcd_write_byte(unsigned char data) |
||
1896 | { |
||
1897 | c0c: 28 2f mov r18, r24 |
||
1898 | LCD_PORT_w = (data & 0xf0) | DISPLAY_EN | DISPLAY_RS; |
||
1899 | c0e: 80 7f andi r24, 0xF0 ; 240 |
||
1900 | c10: 98 2f mov r25, r24 |
||
1901 | c12: 95 60 ori r25, 0x05 ; 5 |
||
1902 | c14: 95 bb out 0x15, r25 ; 21 |
||
1903 | LCD_PORT_w = (data & 0xf0) | DISPLAY_RS; |
||
1904 | c16: 81 60 ori r24, 0x01 ; 1 |
||
1905 | c18: 85 bb out 0x15, r24 ; 21 |
||
1906 | LCD_PORT_w = (data << 4) | DISPLAY_EN | DISPLAY_RS; |
||
1907 | c1a: 82 2f mov r24, r18 |
||
1908 | c1c: 99 27 eor r25, r25 |
||
1909 | c1e: 54 e0 ldi r21, 0x04 ; 4 |
||
1910 | c20: 88 0f add r24, r24 |
||
1911 | c22: 99 1f adc r25, r25 |
||
1912 | c24: 5a 95 dec r21 |
||
1913 | c26: e1 f7 brne .-8 ; 0xc20 <lcd_write_byte+0x14> |
||
1914 | c28: 28 2f mov r18, r24 |
||
1915 | c2a: 25 60 ori r18, 0x05 ; 5 |
||
1916 | c2c: 25 bb out 0x15, r18 ; 21 |
||
1917 | LCD_PORT_w = (data << 4) | DISPLAY_RS; |
||
1918 | c2e: 81 60 ori r24, 0x01 ; 1 |
||
1919 | c30: 85 bb out 0x15, r24 ; 21 |
||
1920 | c32: 08 95 ret |
||
1921 | |||
1922 | 00000c34 <my_pput>: |
||
1923 | } |
||
1924 | |||
1925 | |||
1926 | int my_pput(int zeichen) |
||
1927 | { |
||
1928 | lcd_write_byte((char) zeichen); |
||
1929 | c34: 0e 94 06 06 call 0xc0c <lcd_write_byte> |
||
1930 | return(1); |
||
1931 | } |
||
1932 | c38: 81 e0 ldi r24, 0x01 ; 1 |
||
1933 | c3a: 90 e0 ldi r25, 0x00 ; 0 |
||
1934 | c3c: 08 95 ret |
||
1935 | |||
1936 | 00000c3e <LCD_Init>: |
||
1937 | |||
1938 | // initialize the LCD controller |
||
1939 | void LCD_Init(void) |
||
1940 | { |
||
1941 | LCD_PORT_DDR = 0xff;//0xf0 | DISPLAY_RS | DISPLAY_EN; |
||
1942 | c3e: 8f ef ldi r24, 0xFF ; 255 |
||
1943 | c40: 84 bb out 0x14, r24 ; 20 |
||
1944 | _long_delay(); |
||
1945 | c42: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1946 | _long_delay(); |
||
1947 | c46: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1948 | _long_delay(); |
||
1949 | c4a: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1950 | _lcd_write_4bit(0x03); // noch 8 Bit |
||
1951 | c4e: 83 e0 ldi r24, 0x03 ; 3 |
||
1952 | c50: 0e 94 f7 05 call 0xbee <_lcd_write_4bit> |
||
1953 | _long_delay(); |
||
1954 | c54: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1955 | _lcd_write_4bit(0x03); // noch 8 Bit |
||
1956 | c58: 83 e0 ldi r24, 0x03 ; 3 |
||
1957 | c5a: 0e 94 f7 05 call 0xbee <_lcd_write_4bit> |
||
1958 | _long_delay(); |
||
1959 | c5e: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1960 | _lcd_write_4bit(0x03); // noch 8 Bit |
||
1961 | c62: 83 e0 ldi r24, 0x03 ; 3 |
||
1962 | c64: 0e 94 f7 05 call 0xbee <_lcd_write_4bit> |
||
1963 | _long_delay(); |
||
1964 | c68: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1965 | _lcd_write_4bit(0x02); // jetzt 4 Bit |
||
1966 | c6c: 82 e0 ldi r24, 0x02 ; 2 |
||
1967 | c6e: 0e 94 f7 05 call 0xbee <_lcd_write_4bit> |
||
1968 | _long_delay(); |
||
1969 | c72: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1970 | _lcd_write_command(0x28); // 4 Bit Zweizeilig |
||
1971 | c76: 88 e2 ldi r24, 0x28 ; 40 |
||
1972 | c78: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
1973 | _long_delay(); |
||
1974 | c7c: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1975 | _lcd_write_command(0x08); // Display aus |
||
1976 | c80: 88 e0 ldi r24, 0x08 ; 8 |
||
1977 | c82: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
1978 | _long_delay(); |
||
1979 | c86: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1980 | _lcd_write_command(0x01); // Clear |
||
1981 | c8a: 81 e0 ldi r24, 0x01 ; 1 |
||
1982 | c8c: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
1983 | _long_delay(); |
||
1984 | c90: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1985 | _lcd_write_command(0x06); //Entry mode |
||
1986 | c94: 86 e0 ldi r24, 0x06 ; 6 |
||
1987 | c96: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
1988 | _long_delay(); |
||
1989 | c9a: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1990 | _lcd_write_command(0x08 + 4); // Display an |
||
1991 | c9e: 8c e0 ldi r24, 0x0C ; 12 |
||
1992 | ca0: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
1993 | _long_delay(); |
||
1994 | ca4: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
1995 | ca8: 08 95 ret |
||
1996 | |||
1997 | 00000caa <LCD_Gotoxy>: |
||
1998 | } |
||
1999 | |||
2000 | |||
2001 | void LCD_Gotoxy(unsigned char x , unsigned char y) |
||
2002 | { |
||
2003 | caa: 1f 93 push r17 |
||
2004 | cac: cf 93 push r28 |
||
2005 | cae: c8 2f mov r28, r24 |
||
2006 | cb0: 16 2f mov r17, r22 |
||
2007 | _short_delay(); |
||
2008 | cb2: 0e 94 d9 05 call 0xbb2 <_short_delay> |
||
2009 | switch(y) |
||
2010 | cb6: 81 2f mov r24, r17 |
||
2011 | cb8: 99 27 eor r25, r25 |
||
2012 | cba: 81 30 cpi r24, 0x01 ; 1 |
||
2013 | cbc: 91 05 cpc r25, r1 |
||
2014 | cbe: 79 f0 breq .+30 ; 0xcde <LCD_Gotoxy+0x34> |
||
2015 | cc0: 82 30 cpi r24, 0x02 ; 2 |
||
2016 | cc2: 91 05 cpc r25, r1 |
||
2017 | cc4: 1c f4 brge .+6 ; 0xccc <LCD_Gotoxy+0x22> |
||
2018 | cc6: 89 2b or r24, r25 |
||
2019 | cc8: 39 f0 breq .+14 ; 0xcd8 <LCD_Gotoxy+0x2e> |
||
2020 | cca: 13 c0 rjmp .+38 ; 0xcf2 <LCD_Gotoxy+0x48> |
||
2021 | ccc: 82 30 cpi r24, 0x02 ; 2 |
||
2022 | cce: 91 05 cpc r25, r1 |
||
2023 | cd0: 49 f0 breq .+18 ; 0xce4 <LCD_Gotoxy+0x3a> |
||
2024 | cd2: 03 97 sbiw r24, 0x03 ; 3 |
||
2025 | cd4: 51 f0 breq .+20 ; 0xcea <LCD_Gotoxy+0x40> |
||
2026 | cd6: 0d c0 rjmp .+26 ; 0xcf2 <LCD_Gotoxy+0x48> |
||
2027 | { case 0 : _lcd_write_command(x + 0x80); break; |
||
2028 | cd8: 8c 2f mov r24, r28 |
||
2029 | cda: 80 58 subi r24, 0x80 ; 128 |
||
2030 | cdc: 08 c0 rjmp .+16 ; 0xcee <LCD_Gotoxy+0x44> |
||
2031 | case 1 : _lcd_write_command(x + 0xC0); break; |
||
2032 | cde: 8c 2f mov r24, r28 |
||
2033 | ce0: 80 54 subi r24, 0x40 ; 64 |
||
2034 | ce2: 05 c0 rjmp .+10 ; 0xcee <LCD_Gotoxy+0x44> |
||
2035 | case 2 : _lcd_write_command(x + (0x80 + 20)); break; |
||
2036 | ce4: 8c 2f mov r24, r28 |
||
2037 | ce6: 8c 56 subi r24, 0x6C ; 108 |
||
2038 | ce8: 02 c0 rjmp .+4 ; 0xcee <LCD_Gotoxy+0x44> |
||
2039 | case 3 : _lcd_write_command(x + (0xC0 + 20)); break; |
||
2040 | cea: 8c 2f mov r24, r28 |
||
2041 | cec: 8c 52 subi r24, 0x2C ; 44 |
||
2042 | cee: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
2043 | cf2: cf 91 pop r28 |
||
2044 | cf4: 1f 91 pop r17 |
||
2045 | cf6: 08 95 ret |
||
2046 | |||
2047 | 00000cf8 <LCD_Write>: |
||
2048 | } |
||
2049 | } |
||
2050 | |||
2051 | |||
2052 | void LCD_Write(unsigned char *this_text) |
||
2053 | { |
||
2054 | cf8: 1f 93 push r17 |
||
2055 | cfa: cf 93 push r28 |
||
2056 | cfc: df 93 push r29 |
||
2057 | cfe: ec 01 movw r28, r24 |
||
2058 | unsigned char i = 0; |
||
2059 | d00: 10 e0 ldi r17, 0x00 ; 0 |
||
2060 | while(this_text[i] != 0) |
||
2061 | { |
||
2062 | lcd_write_byte(this_text[i++]); |
||
2063 | _long_delay(); |
||
2064 | d02: 88 81 ld r24, Y |
||
2065 | d04: 88 23 and r24, r24 |
||
2066 | d06: 79 f0 breq .+30 ; 0xd26 <LCD_Write+0x2e> |
||
2067 | d08: fe 01 movw r30, r28 |
||
2068 | d0a: e1 0f add r30, r17 |
||
2069 | d0c: f1 1d adc r31, r1 |
||
2070 | d0e: 1f 5f subi r17, 0xFF ; 255 |
||
2071 | d10: 80 81 ld r24, Z |
||
2072 | d12: 0e 94 06 06 call 0xc0c <lcd_write_byte> |
||
2073 | d16: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
2074 | d1a: fe 01 movw r30, r28 |
||
2075 | d1c: e1 0f add r30, r17 |
||
2076 | d1e: f1 1d adc r31, r1 |
||
2077 | d20: 80 81 ld r24, Z |
||
2078 | d22: 88 23 and r24, r24 |
||
2079 | d24: 89 f7 brne .-30 ; 0xd08 <LCD_Write+0x10> |
||
2080 | d26: df 91 pop r29 |
||
2081 | d28: cf 91 pop r28 |
||
2082 | d2a: 1f 91 pop r17 |
||
2083 | d2c: 08 95 ret |
||
2084 | |||
2085 | 00000d2e <LCD_Putchar>: |
||
2086 | } |
||
2087 | } |
||
2088 | |||
2089 | |||
2090 | char LCD_Putchar(char zeichen) |
||
2091 | { |
||
2092 | d2e: 1f 93 push r17 |
||
2093 | d30: 18 2f mov r17, r24 |
||
2094 | _short_delay(); |
||
2095 | d32: 0e 94 d9 05 call 0xbb2 <_short_delay> |
||
2096 | lcd_write_byte((char) zeichen); |
||
2097 | d36: 81 2f mov r24, r17 |
||
2098 | d38: 0e 94 06 06 call 0xc0c <lcd_write_byte> |
||
2099 | return(1); |
||
2100 | } |
||
2101 | d3c: 81 e0 ldi r24, 0x01 ; 1 |
||
2102 | d3e: 90 e0 ldi r25, 0x00 ; 0 |
||
2103 | d40: 1f 91 pop r17 |
||
2104 | d42: 08 95 ret |
||
2105 | |||
2106 | 00000d44 <PRINT>: |
||
2107 | #include "old_macros.h" |
||
2108 | |||
2109 | //#define LIGHTPRINTF |
||
2110 | |||
2111 | void PRINT(const char * ptr, unsigned int len) { |
||
2112 | d44: 0f 93 push r16 |
||
2113 | d46: 1f 93 push r17 |
||
2114 | d48: cf 93 push r28 |
||
2115 | d4a: df 93 push r29 |
||
2116 | d4c: 8c 01 movw r16, r24 |
||
2117 | d4e: eb 01 movw r28, r22 |
||
2118 | for(;len;len--) |
||
2119 | d50: 67 2b or r22, r23 |
||
2120 | d52: 39 f0 breq .+14 ; 0xd62 <PRINT+0x1e> |
||
2121 | LCD_Putchar(*ptr++); |
||
2122 | d54: f8 01 movw r30, r16 |
||
2123 | d56: 81 91 ld r24, Z+ |
||
2124 | d58: 8f 01 movw r16, r30 |
||
2125 | d5a: 0e 94 97 06 call 0xd2e <LCD_Putchar> |
||
2126 | d5e: 21 97 sbiw r28, 0x01 ; 1 |
||
2127 | d60: c9 f7 brne .-14 ; 0xd54 <PRINT+0x10> |
||
2128 | d62: df 91 pop r29 |
||
2129 | d64: cf 91 pop r28 |
||
2130 | d66: 1f 91 pop r17 |
||
2131 | d68: 0f 91 pop r16 |
||
2132 | d6a: 08 95 ret |
||
2133 | |||
2134 | 00000d6c <PRINTP>: |
||
2135 | } |
||
2136 | |||
2137 | void PRINTP(const char * ptr, unsigned int len) { |
||
2138 | d6c: 0f 93 push r16 |
||
2139 | d6e: 1f 93 push r17 |
||
2140 | d70: cf 93 push r28 |
||
2141 | d72: df 93 push r29 |
||
2142 | d74: 8c 01 movw r16, r24 |
||
2143 | d76: eb 01 movw r28, r22 |
||
2144 | for(;len;len--) |
||
2145 | d78: 67 2b or r22, r23 |
||
2146 | d7a: 41 f0 breq .+16 ; 0xd8c <PRINTP+0x20> |
||
2147 | // LCD_Putchar(PRG_RDB(ptr++)); |
||
2148 | LCD_Putchar(pgm_read_byte(ptr++)); |
||
2149 | d7c: f8 01 movw r30, r16 |
||
2150 | d7e: 0f 5f subi r16, 0xFF ; 255 |
||
2151 | d80: 1f 4f sbci r17, 0xFF ; 255 |
||
2152 | d82: 84 91 lpm r24, Z |
||
2153 | d84: 0e 94 97 06 call 0xd2e <LCD_Putchar> |
||
2154 | d88: 21 97 sbiw r28, 0x01 ; 1 |
||
2155 | d8a: c1 f7 brne .-16 ; 0xd7c <PRINTP+0x10> |
||
2156 | d8c: df 91 pop r29 |
||
2157 | d8e: cf 91 pop r28 |
||
2158 | d90: 1f 91 pop r17 |
||
2159 | d92: 0f 91 pop r16 |
||
2160 | d94: 08 95 ret |
||
2161 | |||
2162 | 00000d96 <PAD_SP>: |
||
2163 | } |
||
2164 | |||
2165 | void PAD_SP(signed char howmany) { |
||
2166 | d96: cf 93 push r28 |
||
2167 | d98: c8 2f mov r28, r24 |
||
2168 | for(;howmany>0;howmany--) |
||
2169 | d9a: 18 16 cp r1, r24 |
||
2170 | d9c: 34 f4 brge .+12 ; 0xdaa <PAD_SP+0x14> |
||
2171 | LCD_Putchar(' '); |
||
2172 | d9e: 80 e2 ldi r24, 0x20 ; 32 |
||
2173 | da0: 0e 94 97 06 call 0xd2e <LCD_Putchar> |
||
2174 | da4: c1 50 subi r28, 0x01 ; 1 |
||
2175 | da6: 1c 16 cp r1, r28 |
||
2176 | da8: d4 f3 brlt .-12 ; 0xd9e <PAD_SP+0x8> |
||
2177 | daa: cf 91 pop r28 |
||
2178 | dac: 08 95 ret |
||
2179 | |||
2180 | 00000dae <PAD_0>: |
||
2181 | } |
||
2182 | |||
2183 | void PAD_0(signed char howmany) { |
||
2184 | dae: cf 93 push r28 |
||
2185 | db0: c8 2f mov r28, r24 |
||
2186 | for(;howmany>0;howmany--) |
||
2187 | db2: 18 16 cp r1, r24 |
||
2188 | db4: 34 f4 brge .+12 ; 0xdc2 <PAD_0+0x14> |
||
2189 | LCD_Putchar('0'); |
||
2190 | db6: 80 e3 ldi r24, 0x30 ; 48 |
||
2191 | db8: 0e 94 97 06 call 0xd2e <LCD_Putchar> |
||
2192 | dbc: c1 50 subi r28, 0x01 ; 1 |
||
2193 | dbe: 1c 16 cp r1, r28 |
||
2194 | dc0: d4 f3 brlt .-12 ; 0xdb6 <PAD_0+0x8> |
||
2195 | dc2: cf 91 pop r28 |
||
2196 | dc4: 08 95 ret |
||
2197 | |||
2198 | 00000dc6 <_printf_P>: |
||
2199 | } |
||
2200 | |||
2201 | #define BUF 40 |
||
2202 | |||
2203 | /* |
||
2204 | * Macros for converting digits to letters and vice versa |
||
2205 | */ |
||
2206 | #define to_digit(c) ((c) - '0') |
||
2207 | #define is_digit(c) ((c)<='9' && (c)>='0') |
||
2208 | #define to_char(n) ((n) + '0') |
||
2209 | |||
2210 | /* |
||
2211 | * Flags used during conversion. |
||
2212 | */ |
||
2213 | #define LONGINT 0x01 /* long integer */ |
||
2214 | #define LONGDBL 0x02 /* long double; unimplemented */ |
||
2215 | #define SHORTINT 0x04 /* short integer */ |
||
2216 | #define ALT 0x08 /* alternate form */ |
||
2217 | #define LADJUST 0x10 /* left adjustment */ |
||
2218 | #define ZEROPAD 0x20 /* zero (as opposed to blank) pad */ |
||
2219 | #define HEXPREFIX 0x40 /* add 0x or 0X prefix */ |
||
2220 | |||
2221 | void _printf_P (char const *fmt0, ...) /* Works with string from FLASH */ |
||
2222 | { |
||
2223 | dc6: 2f 92 push r2 |
||
2224 | dc8: 3f 92 push r3 |
||
2225 | dca: 4f 92 push r4 |
||
2226 | dcc: 5f 92 push r5 |
||
2227 | dce: 6f 92 push r6 |
||
2228 | dd0: 7f 92 push r7 |
||
2229 | dd2: 8f 92 push r8 |
||
2230 | dd4: 9f 92 push r9 |
||
2231 | dd6: af 92 push r10 |
||
2232 | dd8: bf 92 push r11 |
||
2233 | dda: cf 92 push r12 |
||
2234 | ddc: df 92 push r13 |
||
2235 | dde: ef 92 push r14 |
||
2236 | de0: ff 92 push r15 |
||
2237 | de2: 0f 93 push r16 |
||
2238 | de4: 1f 93 push r17 |
||
2239 | de6: cf 93 push r28 |
||
2240 | de8: df 93 push r29 |
||
2241 | dea: cd b7 in r28, 0x3d ; 61 |
||
2242 | dec: de b7 in r29, 0x3e ; 62 |
||
2243 | dee: e0 97 sbiw r28, 0x30 ; 48 |
||
2244 | df0: 0f b6 in r0, 0x3f ; 63 |
||
2245 | df2: f8 94 cli |
||
2246 | df4: de bf out 0x3e, r29 ; 62 |
||
2247 | df6: 0f be out 0x3f, r0 ; 63 |
||
2248 | df8: cd bf out 0x3d, r28 ; 61 |
||
2249 | dfa: a5 e4 ldi r26, 0x45 ; 69 |
||
2250 | dfc: 6a 2e mov r6, r26 |
||
2251 | dfe: 71 2c mov r7, r1 |
||
2252 | e00: 6c 0e add r6, r28 |
||
2253 | e02: 7d 1e adc r7, r29 |
||
2254 | va_list ap; |
||
2255 | register const char *fmt; /* format string */ |
||
2256 | register char ch; /* character from fmt */ |
||
2257 | register int n; /* handy integer (short term usage) */ |
||
2258 | register char *cp; /* handy char pointer (short term usage) */ |
||
2259 | const char *fmark; /* for remembering a place in fmt */ |
||
2260 | register unsigned char flags; /* flags as above */ |
||
2261 | signed char width; /* width from format (%8d), or 0 */ |
||
2262 | signed char prec; /* precision from format (%.3d), or -1 */ |
||
2263 | char sign; /* sign prefix (' ', '+', '-', or \0) */ |
||
2264 | unsigned long _ulong=0; /* integer arguments %[diouxX] */ |
||
2265 | e04: 1c a6 std Y+44, r1 ; 0x2c |
||
2266 | e06: 1d a6 std Y+45, r1 ; 0x2d |
||
2267 | e08: 1e a6 std Y+46, r1 ; 0x2e |
||
2268 | e0a: 1f a6 std Y+47, r1 ; 0x2f |
||
2269 | #define OCT 8 |
||
2270 | #define DEC 10 |
||
2271 | #define HEX 16 |
||
2272 | unsigned char base; /* base for [diouxX] conversion */ |
||
2273 | signed char dprec; /* a copy of prec if [diouxX], 0 otherwise */ |
||
2274 | signed char dpad; /* extra 0 padding needed for integers */ |
||
2275 | signed char fieldsz; /* field size expanded by sign, dpad etc */ |
||
2276 | /* The initialization of 'size' is to suppress a warning that |
||
2277 | 'size' might be used unitialized. It seems gcc can't |
||
2278 | quite grok this spaghetti code ... */ |
||
2279 | signed char size = 0; /* size of converted field or string */ |
||
2280 | char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ |
||
2281 | char ox[2]; /* space for 0x hex-prefix */ |
||
2282 | |||
2283 | va_start(ap, fmt0); |
||
2284 | |||
2285 | fmt = fmt0; |
||
2286 | e0c: d3 01 movw r26, r6 |
||
2287 | e0e: ad 90 ld r10, X+ |
||
2288 | e10: bd 90 ld r11, X+ |
||
2289 | e12: 3d 01 movw r6, r26 |
||
2290 | |||
2291 | /* |
||
2292 | * Scan the format for conversions (`%' character). |
||
2293 | */ |
||
2294 | for (;;) { |
||
2295 | for (fmark = fmt; (ch = pgm_read_byte(fmt)) != '\0' && ch != '%'; fmt++) |
||
2296 | e14: c5 01 movw r24, r10 |
||
2297 | e16: 05 c0 rjmp .+10 ; 0xe22 <_printf_P+0x5c> |
||
2298 | e18: 05 32 cpi r16, 0x25 ; 37 |
||
2299 | e1a: 39 f0 breq .+14 ; 0xe2a <_printf_P+0x64> |
||
2300 | e1c: 08 94 sec |
||
2301 | e1e: a1 1c adc r10, r1 |
||
2302 | e20: b1 1c adc r11, r1 |
||
2303 | e22: f5 01 movw r30, r10 |
||
2304 | e24: 04 91 lpm r16, Z |
||
2305 | e26: 00 23 and r16, r16 |
||
2306 | e28: b9 f7 brne .-18 ; 0xe18 <_printf_P+0x52> |
||
2307 | /* void */; |
||
2308 | if ((n = fmt - fmark) != 0) { |
||
2309 | e2a: b5 01 movw r22, r10 |
||
2310 | e2c: 68 1b sub r22, r24 |
||
2311 | e2e: 79 0b sbc r23, r25 |
||
2312 | e30: 11 f0 breq .+4 ; 0xe36 <_printf_P+0x70> |
||
2313 | PRINTP(fmark, n); |
||
2314 | e32: 0e 94 b6 06 call 0xd6c <PRINTP> |
||
2315 | } |
||
2316 | if (ch == '\0') |
||
2317 | e36: 00 23 and r16, r16 |
||
2318 | e38: 09 f4 brne .+2 ; 0xe3c <_printf_P+0x76> |
||
2319 | e3a: 30 c2 rjmp .+1120 ; 0x129c <_printf_P+0x4d6> |
||
2320 | goto done; |
||
2321 | fmt++; /* skip over '%' */ |
||
2322 | e3c: 08 94 sec |
||
2323 | e3e: a1 1c adc r10, r1 |
||
2324 | e40: b1 1c adc r11, r1 |
||
2325 | |||
2326 | flags = 0; |
||
2327 | e42: 55 24 eor r5, r5 |
||
2328 | dprec = 0; |
||
2329 | e44: 58 aa std Y+48, r5 ; 0x30 |
||
2330 | width = 0; |
||
2331 | e46: 25 2c mov r2, r5 |
||
2332 | prec = -1; |
||
2333 | e48: 1f ef ldi r17, 0xFF ; 255 |
||
2334 | sign = '\0'; |
||
2335 | e4a: 59 a6 std Y+41, r5 ; 0x29 |
||
2336 | |||
2337 | rflag: ch = PRG_RDB(fmt++); |
||
2338 | e4c: f5 01 movw r30, r10 |
||
2339 | e4e: 08 94 sec |
||
2340 | e50: a1 1c adc r10, r1 |
||
2341 | e52: b1 1c adc r11, r1 |
||
2342 | e54: 04 91 lpm r16, Z |
||
2343 | reswitch: |
||
2344 | #ifdef LIGHTPRINTF |
||
2345 | if (ch=='o' || ch=='u' || (ch|0x20)=='x') { |
||
2346 | #else |
||
2347 | if (ch=='u' || (ch|0x20)=='x') { |
||
2348 | e56: 05 37 cpi r16, 0x75 ; 117 |
||
2349 | e58: 21 f0 breq .+8 ; 0xe62 <_printf_P+0x9c> |
||
2350 | e5a: 80 2f mov r24, r16 |
||
2351 | e5c: 80 62 ori r24, 0x20 ; 32 |
||
2352 | e5e: 88 37 cpi r24, 0x78 ; 120 |
||
2353 | e60: f1 f4 brne .+60 ; 0xe9e <_printf_P+0xd8> |
||
2354 | #endif |
||
2355 | if (flags&LONGINT) { |
||
2356 | e62: 50 fe sbrs r5, 0 |
||
2357 | e64: 0e c0 rjmp .+28 ; 0xe82 <_printf_P+0xbc> |
||
2358 | _ulong=va_arg(ap, unsigned long); |
||
2359 | e66: f3 01 movw r30, r6 |
||
2360 | e68: 24 e0 ldi r18, 0x04 ; 4 |
||
2361 | e6a: 30 e0 ldi r19, 0x00 ; 0 |
||
2362 | e6c: 62 0e add r6, r18 |
||
2363 | e6e: 73 1e adc r7, r19 |
||
2364 | e70: 80 81 ld r24, Z |
||
2365 | e72: 91 81 ldd r25, Z+1 ; 0x01 |
||
2366 | e74: a2 81 ldd r26, Z+2 ; 0x02 |
||
2367 | e76: b3 81 ldd r27, Z+3 ; 0x03 |
||
2368 | e78: 8c a7 std Y+44, r24 ; 0x2c |
||
2369 | e7a: 9d a7 std Y+45, r25 ; 0x2d |
||
2370 | e7c: ae a7 std Y+46, r26 ; 0x2e |
||
2371 | e7e: bf a7 std Y+47, r27 ; 0x2f |
||
2372 | e80: 0e c0 rjmp .+28 ; 0xe9e <_printf_P+0xd8> |
||
2373 | } else { |
||
2374 | register unsigned int _d; |
||
2375 | _d=va_arg(ap, unsigned int); |
||
2376 | e82: f3 01 movw r30, r6 |
||
2377 | e84: a2 e0 ldi r26, 0x02 ; 2 |
||
2378 | e86: b0 e0 ldi r27, 0x00 ; 0 |
||
2379 | e88: 6a 0e add r6, r26 |
||
2380 | e8a: 7b 1e adc r7, r27 |
||
2381 | e8c: 80 81 ld r24, Z |
||
2382 | e8e: 91 81 ldd r25, Z+1 ; 0x01 |
||
2383 | _ulong = flags&SHORTINT ? (unsigned long)(unsigned short)_d : (unsigned long)_d; |
||
2384 | e90: 9c 01 movw r18, r24 |
||
2385 | e92: 44 27 eor r20, r20 |
||
2386 | e94: 55 27 eor r21, r21 |
||
2387 | e96: 2c a7 std Y+44, r18 ; 0x2c |
||
2388 | e98: 3d a7 std Y+45, r19 ; 0x2d |
||
2389 | e9a: 4e a7 std Y+46, r20 ; 0x2e |
||
2390 | e9c: 5f a7 std Y+47, r21 ; 0x2f |
||
2391 | } |
||
2392 | } |
||
2393 | |||
2394 | #ifndef LIGHTPRINTF |
||
2395 | if(ch==' ') { |
||
2396 | e9e: 00 32 cpi r16, 0x20 ; 32 |
||
2397 | ea0: 21 f4 brne .+8 ; 0xeaa <_printf_P+0xe4> |
||
2398 | /* |
||
2399 | * ``If the space and + flags both appear, the space |
||
2400 | * flag will be ignored.'' |
||
2401 | * -- ANSI X3J11 |
||
2402 | */ |
||
2403 | if (!sign) |
||
2404 | ea2: 89 a5 ldd r24, Y+41 ; 0x29 |
||
2405 | ea4: 88 23 and r24, r24 |
||
2406 | ea6: 91 f6 brne .-92 ; 0xe4c <_printf_P+0x86> |
||
2407 | ea8: 1b c0 rjmp .+54 ; 0xee0 <_printf_P+0x11a> |
||
2408 | sign = ' '; |
||
2409 | goto rflag; |
||
2410 | } else if (ch=='#') { |
||
2411 | eaa: 03 32 cpi r16, 0x23 ; 35 |
||
2412 | eac: 11 f4 brne .+4 ; 0xeb2 <_printf_P+0xec> |
||
2413 | flags |= ALT; |
||
2414 | eae: 38 e0 ldi r19, 0x08 ; 8 |
||
2415 | eb0: 81 c0 rjmp .+258 ; 0xfb4 <_printf_P+0x1ee> |
||
2416 | goto rflag; |
||
2417 | } else if (ch=='*'||ch=='-') { |
||
2418 | eb2: 0a 32 cpi r16, 0x2A ; 42 |
||
2419 | eb4: 11 f0 breq .+4 ; 0xeba <_printf_P+0xf4> |
||
2420 | eb6: 0d 32 cpi r16, 0x2D ; 45 |
||
2421 | eb8: 89 f4 brne .+34 ; 0xedc <_printf_P+0x116> |
||
2422 | if (ch=='*') { |
||
2423 | eba: 0a 32 cpi r16, 0x2A ; 42 |
||
2424 | ebc: 51 f4 brne .+20 ; 0xed2 <_printf_P+0x10c> |
||
2425 | /* |
||
2426 | * ``A negative field width argument is taken as a |
||
2427 | * - flag followed by a positive field width.'' |
||
2428 | * -- ANSI X3J11 |
||
2429 | * They don't exclude field widths read from args. |
||
2430 | */ |
||
2431 | if ((width = va_arg(ap, int)) >= 0) |
||
2432 | ebe: f3 01 movw r30, r6 |
||
2433 | ec0: 42 e0 ldi r20, 0x02 ; 2 |
||
2434 | ec2: 50 e0 ldi r21, 0x00 ; 0 |
||
2435 | ec4: 64 0e add r6, r20 |
||
2436 | ec6: 75 1e adc r7, r21 |
||
2437 | ec8: 20 80 ld r2, Z |
||
2438 | eca: 22 20 and r2, r2 |
||
2439 | ecc: 0c f0 brlt .+2 ; 0xed0 <_printf_P+0x10a> |
||
2440 | ece: be cf rjmp .-132 ; 0xe4c <_printf_P+0x86> |
||
2441 | goto rflag; |
||
2442 | width = -width; |
||
2443 | ed0: 21 94 neg r2 |
||
2444 | } |
||
2445 | flags |= LADJUST; |
||
2446 | ed2: 50 e1 ldi r21, 0x10 ; 16 |
||
2447 | ed4: 55 2a or r5, r21 |
||
2448 | flags &= ~ZEROPAD; /* '-' disables '0' */ |
||
2449 | ed6: 8f ed ldi r24, 0xDF ; 223 |
||
2450 | ed8: 58 22 and r5, r24 |
||
2451 | goto rflag; |
||
2452 | eda: b8 cf rjmp .-144 ; 0xe4c <_printf_P+0x86> |
||
2453 | } else if (ch=='+') { |
||
2454 | edc: 0b 32 cpi r16, 0x2B ; 43 |
||
2455 | ede: 11 f4 brne .+4 ; 0xee4 <_printf_P+0x11e> |
||
2456 | sign = '+'; |
||
2457 | ee0: 09 a7 std Y+41, r16 ; 0x29 |
||
2458 | goto rflag; |
||
2459 | ee2: b4 cf rjmp .-152 ; 0xe4c <_printf_P+0x86> |
||
2460 | } else if (ch=='.') { |
||
2461 | ee4: 0e 32 cpi r16, 0x2E ; 46 |
||
2462 | ee6: c1 f5 brne .+112 ; 0xf58 <_printf_P+0x192> |
||
2463 | if ((ch = PRG_RDB(fmt++)) == '*') { |
||
2464 | ee8: f5 01 movw r30, r10 |
||
2465 | eea: 08 94 sec |
||
2466 | eec: a1 1c adc r10, r1 |
||
2467 | eee: b1 1c adc r11, r1 |
||
2468 | ef0: 04 91 lpm r16, Z |
||
2469 | ef2: 0a 32 cpi r16, 0x2A ; 42 |
||
2470 | ef4: 79 f4 brne .+30 ; 0xf14 <_printf_P+0x14e> |
||
2471 | n = va_arg(ap, int); |
||
2472 | ef6: f3 01 movw r30, r6 |
||
2473 | ef8: a2 e0 ldi r26, 0x02 ; 2 |
||
2474 | efa: b0 e0 ldi r27, 0x00 ; 0 |
||
2475 | efc: 6a 0e add r6, r26 |
||
2476 | efe: 7b 1e adc r7, r27 |
||
2477 | f00: 60 81 ld r22, Z |
||
2478 | f02: 71 81 ldd r23, Z+1 ; 0x01 |
||
2479 | prec = n < 0 ? -1 : n; |
||
2480 | f04: bf ef ldi r27, 0xFF ; 255 |
||
2481 | f06: 6f 3f cpi r22, 0xFF ; 255 |
||
2482 | f08: 7b 07 cpc r23, r27 |
||
2483 | f0a: 14 f4 brge .+4 ; 0xf10 <_printf_P+0x14a> |
||
2484 | f0c: 6f ef ldi r22, 0xFF ; 255 |
||
2485 | f0e: 7f ef ldi r23, 0xFF ; 255 |
||
2486 | f10: 16 2f mov r17, r22 |
||
2487 | goto rflag; |
||
2488 | f12: 9c cf rjmp .-200 ; 0xe4c <_printf_P+0x86> |
||
2489 | } |
||
2490 | n = 0; |
||
2491 | f14: 60 e0 ldi r22, 0x00 ; 0 |
||
2492 | f16: 70 e0 ldi r23, 0x00 ; 0 |
||
2493 | while (is_digit(ch)) { |
||
2494 | n = n*10 + to_digit(ch); |
||
2495 | ch = PRG_RDB(fmt++); |
||
2496 | f18: 80 2f mov r24, r16 |
||
2497 | f1a: 80 53 subi r24, 0x30 ; 48 |
||
2498 | f1c: 8a 30 cpi r24, 0x0A ; 10 |
||
2499 | f1e: a0 f4 brcc .+40 ; 0xf48 <_printf_P+0x182> |
||
2500 | f20: cb 01 movw r24, r22 |
||
2501 | f22: f3 e0 ldi r31, 0x03 ; 3 |
||
2502 | f24: 88 0f add r24, r24 |
||
2503 | f26: 99 1f adc r25, r25 |
||
2504 | f28: fa 95 dec r31 |
||
2505 | f2a: e1 f7 brne .-8 ; 0xf24 <_printf_P+0x15e> |
||
2506 | f2c: 86 0f add r24, r22 |
||
2507 | f2e: 97 1f adc r25, r23 |
||
2508 | f30: 68 0f add r22, r24 |
||
2509 | f32: 79 1f adc r23, r25 |
||
2510 | f34: 60 0f add r22, r16 |
||
2511 | f36: 71 1d adc r23, r1 |
||
2512 | f38: 60 53 subi r22, 0x30 ; 48 |
||
2513 | f3a: 70 40 sbci r23, 0x00 ; 0 |
||
2514 | f3c: f5 01 movw r30, r10 |
||
2515 | f3e: 08 94 sec |
||
2516 | f40: a1 1c adc r10, r1 |
||
2517 | f42: b1 1c adc r11, r1 |
||
2518 | f44: 04 91 lpm r16, Z |
||
2519 | f46: e8 cf rjmp .-48 ; 0xf18 <_printf_P+0x152> |
||
2520 | } |
||
2521 | prec = n < 0 ? -1 : n; |
||
2522 | f48: ef ef ldi r30, 0xFF ; 255 |
||
2523 | f4a: 6f 3f cpi r22, 0xFF ; 255 |
||
2524 | f4c: 7e 07 cpc r23, r30 |
||
2525 | f4e: 14 f4 brge .+4 ; 0xf54 <_printf_P+0x18e> |
||
2526 | f50: 6f ef ldi r22, 0xFF ; 255 |
||
2527 | f52: 7f ef ldi r23, 0xFF ; 255 |
||
2528 | f54: 16 2f mov r17, r22 |
||
2529 | goto reswitch; |
||
2530 | f56: 7f cf rjmp .-258 ; 0xe56 <_printf_P+0x90> |
||
2531 | } else |
||
2532 | #endif /* LIGHTPRINTF */ |
||
2533 | if (ch=='0') { |
||
2534 | f58: 00 33 cpi r16, 0x30 ; 48 |
||
2535 | f5a: 29 f4 brne .+10 ; 0xf66 <_printf_P+0x1a0> |
||
2536 | /* |
||
2537 | * ``Note that 0 is taken as a flag, not as the |
||
2538 | * beginning of a field width.'' |
||
2539 | * -- ANSI X3J11 |
||
2540 | */ |
||
2541 | if (!(flags & LADJUST)) |
||
2542 | f5c: 54 fc sbrc r5, 4 |
||
2543 | f5e: 76 cf rjmp .-276 ; 0xe4c <_printf_P+0x86> |
||
2544 | flags |= ZEROPAD; /* '-' disables '0' */ |
||
2545 | f60: f0 e2 ldi r31, 0x20 ; 32 |
||
2546 | f62: 5f 2a or r5, r31 |
||
2547 | goto rflag; |
||
2548 | f64: 73 cf rjmp .-282 ; 0xe4c <_printf_P+0x86> |
||
2549 | } else if (ch>='1' && ch<='9') { |
||
2550 | f66: 80 2f mov r24, r16 |
||
2551 | f68: 81 53 subi r24, 0x31 ; 49 |
||
2552 | f6a: 89 30 cpi r24, 0x09 ; 9 |
||
2553 | f6c: d8 f4 brcc .+54 ; 0xfa4 <_printf_P+0x1de> |
||
2554 | n = 0; |
||
2555 | f6e: 60 e0 ldi r22, 0x00 ; 0 |
||
2556 | f70: 70 e0 ldi r23, 0x00 ; 0 |
||
2557 | do { |
||
2558 | n = 10 * n + to_digit(ch); |
||
2559 | f72: cb 01 movw r24, r22 |
||
2560 | f74: e3 e0 ldi r30, 0x03 ; 3 |
||
2561 | f76: 88 0f add r24, r24 |
||
2562 | f78: 99 1f adc r25, r25 |
||
2563 | f7a: ea 95 dec r30 |
||
2564 | f7c: e1 f7 brne .-8 ; 0xf76 <_printf_P+0x1b0> |
||
2565 | f7e: 86 0f add r24, r22 |
||
2566 | f80: 97 1f adc r25, r23 |
||
2567 | f82: 68 0f add r22, r24 |
||
2568 | f84: 79 1f adc r23, r25 |
||
2569 | f86: 60 0f add r22, r16 |
||
2570 | f88: 71 1d adc r23, r1 |
||
2571 | f8a: 60 53 subi r22, 0x30 ; 48 |
||
2572 | f8c: 70 40 sbci r23, 0x00 ; 0 |
||
2573 | ch = PRG_RDB(fmt++); |
||
2574 | f8e: f5 01 movw r30, r10 |
||
2575 | f90: 08 94 sec |
||
2576 | f92: a1 1c adc r10, r1 |
||
2577 | f94: b1 1c adc r11, r1 |
||
2578 | f96: 04 91 lpm r16, Z |
||
2579 | } while (is_digit(ch)); |
||
2580 | f98: 80 2f mov r24, r16 |
||
2581 | f9a: 80 53 subi r24, 0x30 ; 48 |
||
2582 | f9c: 8a 30 cpi r24, 0x0A ; 10 |
||
2583 | f9e: 48 f3 brcs .-46 ; 0xf72 <_printf_P+0x1ac> |
||
2584 | width = n; |
||
2585 | fa0: 26 2e mov r2, r22 |
||
2586 | goto reswitch; |
||
2587 | fa2: 59 cf rjmp .-334 ; 0xe56 <_printf_P+0x90> |
||
2588 | } else if (ch=='h') { |
||
2589 | fa4: 08 36 cpi r16, 0x68 ; 104 |
||
2590 | fa6: 19 f4 brne .+6 ; 0xfae <_printf_P+0x1e8> |
||
2591 | flags |= SHORTINT; |
||
2592 | fa8: 24 e0 ldi r18, 0x04 ; 4 |
||
2593 | faa: 52 2a or r5, r18 |
||
2594 | goto rflag; |
||
2595 | fac: 4f cf rjmp .-354 ; 0xe4c <_printf_P+0x86> |
||
2596 | } else if (ch=='l') { |
||
2597 | fae: 0c 36 cpi r16, 0x6C ; 108 |
||
2598 | fb0: 19 f4 brne .+6 ; 0xfb8 <_printf_P+0x1f2> |
||
2599 | flags |= LONGINT; |
||
2600 | fb2: 31 e0 ldi r19, 0x01 ; 1 |
||
2601 | fb4: 53 2a or r5, r19 |
||
2602 | goto rflag; |
||
2603 | fb6: 4a cf rjmp .-364 ; 0xe4c <_printf_P+0x86> |
||
2604 | } else if (ch=='c') { |
||
2605 | fb8: 03 36 cpi r16, 0x63 ; 99 |
||
2606 | fba: 61 f4 brne .+24 ; 0xfd4 <_printf_P+0x20e> |
||
2607 | *(cp = buf) = va_arg(ap, int); |
||
2608 | fbc: 4e 01 movw r8, r28 |
||
2609 | fbe: 08 94 sec |
||
2610 | fc0: 81 1c adc r8, r1 |
||
2611 | fc2: 91 1c adc r9, r1 |
||
2612 | fc4: f3 01 movw r30, r6 |
||
2613 | fc6: 42 e0 ldi r20, 0x02 ; 2 |
||
2614 | fc8: 50 e0 ldi r21, 0x00 ; 0 |
||
2615 | fca: 64 0e add r6, r20 |
||
2616 | fcc: 75 1e adc r7, r21 |
||
2617 | fce: 80 81 ld r24, Z |
||
2618 | fd0: 89 83 std Y+1, r24 ; 0x01 |
||
2619 | fd2: 1b c1 rjmp .+566 ; 0x120a <_printf_P+0x444> |
||
2620 | size = 1; |
||
2621 | sign = '\0'; |
||
2622 | } else if (ch=='D'||ch=='d'||ch=='i') { |
||
2623 | fd4: 04 34 cpi r16, 0x44 ; 68 |
||
2624 | fd6: 21 f0 breq .+8 ; 0xfe0 <_printf_P+0x21a> |
||
2625 | fd8: 04 36 cpi r16, 0x64 ; 100 |
||
2626 | fda: 11 f0 breq .+4 ; 0xfe0 <_printf_P+0x21a> |
||
2627 | fdc: 09 36 cpi r16, 0x69 ; 105 |
||
2628 | fde: b1 f5 brne .+108 ; 0x104c <_printf_P+0x286> |
||
2629 | if(ch=='D') |
||
2630 | fe0: 04 34 cpi r16, 0x44 ; 68 |
||
2631 | fe2: 11 f4 brne .+4 ; 0xfe8 <_printf_P+0x222> |
||
2632 | flags |= LONGINT; |
||
2633 | fe4: 51 e0 ldi r21, 0x01 ; 1 |
||
2634 | fe6: 55 2a or r5, r21 |
||
2635 | if (flags&LONGINT) { |
||
2636 | fe8: 50 fe sbrs r5, 0 |
||
2637 | fea: 0a c0 rjmp .+20 ; 0x1000 <_printf_P+0x23a> |
||
2638 | _ulong=va_arg(ap, long); |
||
2639 | fec: f3 01 movw r30, r6 |
||
2640 | fee: 84 e0 ldi r24, 0x04 ; 4 |
||
2641 | ff0: 90 e0 ldi r25, 0x00 ; 0 |
||
2642 | ff2: 68 0e add r6, r24 |
||
2643 | ff4: 79 1e adc r7, r25 |
||
2644 | ff6: 20 81 ld r18, Z |
||
2645 | ff8: 31 81 ldd r19, Z+1 ; 0x01 |
||
2646 | ffa: 42 81 ldd r20, Z+2 ; 0x02 |
||
2647 | ffc: 53 81 ldd r21, Z+3 ; 0x03 |
||
2648 | ffe: 0c c0 rjmp .+24 ; 0x1018 <_printf_P+0x252> |
||
2649 | } else { |
||
2650 | register int _d; |
||
2651 | _d=va_arg(ap, int); |
||
2652 | 1000: f3 01 movw r30, r6 |
||
2653 | 1002: 42 e0 ldi r20, 0x02 ; 2 |
||
2654 | 1004: 50 e0 ldi r21, 0x00 ; 0 |
||
2655 | 1006: 64 0e add r6, r20 |
||
2656 | 1008: 75 1e adc r7, r21 |
||
2657 | 100a: 80 81 ld r24, Z |
||
2658 | 100c: 91 81 ldd r25, Z+1 ; 0x01 |
||
2659 | _ulong = flags&SHORTINT ? (long)(short)_d : (long)_d; |
||
2660 | 100e: 9c 01 movw r18, r24 |
||
2661 | 1010: 44 27 eor r20, r20 |
||
2662 | 1012: 37 fd sbrc r19, 7 |
||
2663 | 1014: 40 95 com r20 |
||
2664 | 1016: 54 2f mov r21, r20 |
||
2665 | 1018: 2c a7 std Y+44, r18 ; 0x2c |
||
2666 | 101a: 3d a7 std Y+45, r19 ; 0x2d |
||
2667 | 101c: 4e a7 std Y+46, r20 ; 0x2e |
||
2668 | 101e: 5f a7 std Y+47, r21 ; 0x2f |
||
2669 | } |
||
2670 | |||
2671 | if ((long)_ulong < 0) { |
||
2672 | 1020: 8c a5 ldd r24, Y+44 ; 0x2c |
||
2673 | 1022: 9d a5 ldd r25, Y+45 ; 0x2d |
||
2674 | 1024: ae a5 ldd r26, Y+46 ; 0x2e |
||
2675 | 1026: bf a5 ldd r27, Y+47 ; 0x2f |
||
2676 | 1028: b7 ff sbrs r27, 7 |
||
2677 | 102a: 0d c0 rjmp .+26 ; 0x1046 <_printf_P+0x280> |
||
2678 | _ulong = -_ulong; |
||
2679 | 102c: b0 95 com r27 |
||
2680 | 102e: a0 95 com r26 |
||
2681 | 1030: 90 95 com r25 |
||
2682 | 1032: 81 95 neg r24 |
||
2683 | 1034: 9f 4f sbci r25, 0xFF ; 255 |
||
2684 | 1036: af 4f sbci r26, 0xFF ; 255 |
||
2685 | 1038: bf 4f sbci r27, 0xFF ; 255 |
||
2686 | 103a: 8c a7 std Y+44, r24 ; 0x2c |
||
2687 | 103c: 9d a7 std Y+45, r25 ; 0x2d |
||
2688 | 103e: ae a7 std Y+46, r26 ; 0x2e |
||
2689 | 1040: bf a7 std Y+47, r27 ; 0x2f |
||
2690 | sign = '-'; |
||
2691 | 1042: 8d e2 ldi r24, 0x2D ; 45 |
||
2692 | 1044: 89 a7 std Y+41, r24 ; 0x29 |
||
2693 | } |
||
2694 | base = DEC; |
||
2695 | 1046: 7a e0 ldi r23, 0x0A ; 10 |
||
2696 | 1048: 47 2e mov r4, r23 |
||
2697 | goto number; |
||
2698 | 104a: 7b c0 rjmp .+246 ; 0x1142 <_printf_P+0x37c> |
||
2699 | } else |
||
2700 | /* |
||
2701 | if (ch=='n') { |
||
2702 | if (flags & LONGINT) |
||
2703 | *va_arg(ap, long *) = ret; |
||
2704 | else if (flags & SHORTINT) |
||
2705 | *va_arg(ap, short *) = ret; |
||
2706 | else |
||
2707 | *va_arg(ap, int *) = ret; |
||
2708 | continue; // no output |
||
2709 | } else |
||
2710 | */ |
||
2711 | #ifndef LIGHTPRINTF |
||
2712 | if (ch=='O'||ch=='o') { |
||
2713 | 104c: 0f 34 cpi r16, 0x4F ; 79 |
||
2714 | 104e: 11 f0 breq .+4 ; 0x1054 <_printf_P+0x28e> |
||
2715 | 1050: 0f 36 cpi r16, 0x6F ; 111 |
||
2716 | 1052: 39 f4 brne .+14 ; 0x1062 <_printf_P+0x29c> |
||
2717 | if (ch=='O') |
||
2718 | 1054: 0f 34 cpi r16, 0x4F ; 79 |
||
2719 | 1056: 11 f4 brne .+4 ; 0x105c <_printf_P+0x296> |
||
2720 | flags |= LONGINT; |
||
2721 | 1058: 91 e0 ldi r25, 0x01 ; 1 |
||
2722 | 105a: 59 2a or r5, r25 |
||
2723 | base = OCT; |
||
2724 | 105c: 68 e0 ldi r22, 0x08 ; 8 |
||
2725 | 105e: 46 2e mov r4, r22 |
||
2726 | goto nosign; |
||
2727 | 1060: 6f c0 rjmp .+222 ; 0x1140 <_printf_P+0x37a> |
||
2728 | } else if (ch=='p') { |
||
2729 | 1062: 00 37 cpi r16, 0x70 ; 112 |
||
2730 | 1064: a1 f4 brne .+40 ; 0x108e <_printf_P+0x2c8> |
||
2731 | /* |
||
2732 | * ``The argument shall be a pointer to void. The |
||
2733 | * value of the pointer is converted to a sequence |
||
2734 | * of printable characters, in an implementation- |
||
2735 | * defined manner.'' |
||
2736 | * -- ANSI X3J11 |
||
2737 | */ |
||
2738 | /* NOSTRICT */ |
||
2739 | _ulong = (unsigned int)va_arg(ap, void *); |
||
2740 | 1066: f3 01 movw r30, r6 |
||
2741 | 1068: a2 e0 ldi r26, 0x02 ; 2 |
||
2742 | 106a: b0 e0 ldi r27, 0x00 ; 0 |
||
2743 | 106c: 6a 0e add r6, r26 |
||
2744 | 106e: 7b 1e adc r7, r27 |
||
2745 | 1070: 80 81 ld r24, Z |
||
2746 | 1072: 91 81 ldd r25, Z+1 ; 0x01 |
||
2747 | 1074: 9c 01 movw r18, r24 |
||
2748 | 1076: 44 27 eor r20, r20 |
||
2749 | 1078: 55 27 eor r21, r21 |
||
2750 | 107a: 2c a7 std Y+44, r18 ; 0x2c |
||
2751 | 107c: 3d a7 std Y+45, r19 ; 0x2d |
||
2752 | 107e: 4e a7 std Y+46, r20 ; 0x2e |
||
2753 | 1080: 5f a7 std Y+47, r21 ; 0x2f |
||
2754 | base = HEX; |
||
2755 | 1082: 50 e1 ldi r21, 0x10 ; 16 |
||
2756 | 1084: 45 2e mov r4, r21 |
||
2757 | flags |= HEXPREFIX; |
||
2758 | 1086: 30 e4 ldi r19, 0x40 ; 64 |
||
2759 | 1088: 53 2a or r5, r19 |
||
2760 | ch = 'x'; |
||
2761 | 108a: 08 e7 ldi r16, 0x78 ; 120 |
||
2762 | goto nosign; |
||
2763 | 108c: 59 c0 rjmp .+178 ; 0x1140 <_printf_P+0x37a> |
||
2764 | } else if (ch=='s') { // print a string from RAM |
||
2765 | 108e: 03 37 cpi r16, 0x73 ; 115 |
||
2766 | 1090: c1 f5 brne .+112 ; 0x1102 <_printf_P+0x33c> |
||
2767 | if ((cp = va_arg(ap, char *)) == NULL) { |
||
2768 | 1092: f3 01 movw r30, r6 |
||
2769 | 1094: 42 e0 ldi r20, 0x02 ; 2 |
||
2770 | 1096: 50 e0 ldi r21, 0x00 ; 0 |
||
2771 | 1098: 64 0e add r6, r20 |
||
2772 | 109a: 75 1e adc r7, r21 |
||
2773 | 109c: 80 80 ld r8, Z |
||
2774 | 109e: 91 80 ldd r9, Z+1 ; 0x01 |
||
2775 | 10a0: 81 14 cp r8, r1 |
||
2776 | 10a2: 91 04 cpc r9, r1 |
||
2777 | 10a4: 89 f4 brne .+34 ; 0x10c8 <_printf_P+0x302> |
||
2778 | cp=buf; |
||
2779 | 10a6: 4e 01 movw r8, r28 |
||
2780 | 10a8: 08 94 sec |
||
2781 | 10aa: 81 1c adc r8, r1 |
||
2782 | 10ac: 91 1c adc r9, r1 |
||
2783 | cp[0] = '('; |
||
2784 | 10ae: 88 e2 ldi r24, 0x28 ; 40 |
||
2785 | 10b0: 89 83 std Y+1, r24 ; 0x01 |
||
2786 | cp[1] = 'n'; |
||
2787 | 10b2: 8e e6 ldi r24, 0x6E ; 110 |
||
2788 | 10b4: f4 01 movw r30, r8 |
||
2789 | 10b6: 81 83 std Z+1, r24 ; 0x01 |
||
2790 | cp[2] = 'u'; |
||
2791 | 10b8: 85 e7 ldi r24, 0x75 ; 117 |
||
2792 | 10ba: 8b 83 std Y+3, r24 ; 0x03 |
||
2793 | cp[4] = cp[3] = 'l'; |
||
2794 | 10bc: 8c e6 ldi r24, 0x6C ; 108 |
||
2795 | 10be: 8c 83 std Y+4, r24 ; 0x04 |
||
2796 | 10c0: 8d 83 std Y+5, r24 ; 0x05 |
||
2797 | cp[5] = ')'; |
||
2798 | 10c2: 89 e2 ldi r24, 0x29 ; 41 |
||
2799 | 10c4: 8e 83 std Y+6, r24 ; 0x06 |
||
2800 | cp[6] = '\0'; |
||
2801 | 10c6: 1f 82 std Y+7, r1 ; 0x07 |
||
2802 | } |
||
2803 | if (prec >= 0) { |
||
2804 | 10c8: 17 fd sbrc r17, 7 |
||
2805 | 10ca: 13 c0 rjmp .+38 ; 0x10f2 <_printf_P+0x32c> |
||
2806 | /* |
||
2807 | * can't use strlen; can only look for the |
||
2808 | * NUL in the first `prec' characters, and |
||
2809 | * strlen() will go further. |
||
2810 | */ |
||
2811 | char *p = (char*)memchr(cp, 0, prec); |
||
2812 | 10cc: 81 2f mov r24, r17 |
||
2813 | 10ce: 99 27 eor r25, r25 |
||
2814 | 10d0: 87 fd sbrc r24, 7 |
||
2815 | 10d2: 90 95 com r25 |
||
2816 | 10d4: ac 01 movw r20, r24 |
||
2817 | 10d6: 60 e0 ldi r22, 0x00 ; 0 |
||
2818 | 10d8: 70 e0 ldi r23, 0x00 ; 0 |
||
2819 | 10da: c4 01 movw r24, r8 |
||
2820 | 10dc: 0e 94 64 0c call 0x18c8 <memchr> |
||
2821 | |||
2822 | if (p != NULL) { |
||
2823 | 10e0: 00 97 sbiw r24, 0x00 ; 0 |
||
2824 | 10e2: 29 f0 breq .+10 ; 0x10ee <_printf_P+0x328> |
||
2825 | size = p - cp; |
||
2826 | 10e4: d8 2e mov r13, r24 |
||
2827 | 10e6: d8 18 sub r13, r8 |
||
2828 | if (size > prec) |
||
2829 | 10e8: 1d 15 cp r17, r13 |
||
2830 | 10ea: 0c f0 brlt .+2 ; 0x10ee <_printf_P+0x328> |
||
2831 | 10ec: 90 c0 rjmp .+288 ; 0x120e <_printf_P+0x448> |
||
2832 | size = prec; |
||
2833 | } else |
||
2834 | size = prec; |
||
2835 | 10ee: d1 2e mov r13, r17 |
||
2836 | 10f0: 8e c0 rjmp .+284 ; 0x120e <_printf_P+0x448> |
||
2837 | } else |
||
2838 | size = strlen(cp); |
||
2839 | 10f2: f4 01 movw r30, r8 |
||
2840 | 10f4: 01 90 ld r0, Z+ |
||
2841 | 10f6: 00 20 and r0, r0 |
||
2842 | 10f8: e9 f7 brne .-6 ; 0x10f4 <_printf_P+0x32e> |
||
2843 | 10fa: 31 97 sbiw r30, 0x01 ; 1 |
||
2844 | 10fc: de 2e mov r13, r30 |
||
2845 | 10fe: d8 18 sub r13, r8 |
||
2846 | 1100: 86 c0 rjmp .+268 ; 0x120e <_printf_P+0x448> |
||
2847 | sign = '\0'; |
||
2848 | } else |
||
2849 | #endif /* LIGHTPRINTF */ |
||
2850 | if(ch=='U'||ch=='u') { |
||
2851 | 1102: 05 35 cpi r16, 0x55 ; 85 |
||
2852 | 1104: 11 f0 breq .+4 ; 0x110a <_printf_P+0x344> |
||
2853 | 1106: 05 37 cpi r16, 0x75 ; 117 |
||
2854 | 1108: 39 f4 brne .+14 ; 0x1118 <_printf_P+0x352> |
||
2855 | if (ch=='U') |
||
2856 | 110a: 05 35 cpi r16, 0x55 ; 85 |
||
2857 | 110c: 11 f4 brne .+4 ; 0x1112 <_printf_P+0x34c> |
||
2858 | flags |= LONGINT; |
||
2859 | 110e: f1 e0 ldi r31, 0x01 ; 1 |
||
2860 | 1110: 5f 2a or r5, r31 |
||
2861 | base = DEC; |
||
2862 | 1112: 4a e0 ldi r20, 0x0A ; 10 |
||
2863 | 1114: 44 2e mov r4, r20 |
||
2864 | goto nosign; |
||
2865 | 1116: 14 c0 rjmp .+40 ; 0x1140 <_printf_P+0x37a> |
||
2866 | } else if (ch=='X'||ch=='x') { |
||
2867 | 1118: 08 35 cpi r16, 0x58 ; 88 |
||
2868 | 111a: 19 f0 breq .+6 ; 0x1122 <_printf_P+0x35c> |
||
2869 | 111c: 08 37 cpi r16, 0x78 ; 120 |
||
2870 | 111e: 09 f0 breq .+2 ; 0x1122 <_printf_P+0x35c> |
||
2871 | 1120: 6c c0 rjmp .+216 ; 0x11fa <_printf_P+0x434> |
||
2872 | base = HEX; |
||
2873 | 1122: 30 e1 ldi r19, 0x10 ; 16 |
||
2874 | 1124: 43 2e mov r4, r19 |
||
2875 | /* leading 0x/X only if non-zero */ |
||
2876 | if (flags & ALT && _ulong != 0) |
||
2877 | 1126: 53 fe sbrs r5, 3 |
||
2878 | 1128: 0b c0 rjmp .+22 ; 0x1140 <_printf_P+0x37a> |
||
2879 | 112a: 2c a5 ldd r18, Y+44 ; 0x2c |
||
2880 | 112c: 3d a5 ldd r19, Y+45 ; 0x2d |
||
2881 | 112e: 4e a5 ldd r20, Y+46 ; 0x2e |
||
2882 | 1130: 5f a5 ldd r21, Y+47 ; 0x2f |
||
2883 | 1132: 21 15 cp r18, r1 |
||
2884 | 1134: 31 05 cpc r19, r1 |
||
2885 | 1136: 41 05 cpc r20, r1 |
||
2886 | 1138: 51 05 cpc r21, r1 |
||
2887 | 113a: 11 f0 breq .+4 ; 0x1140 <_printf_P+0x37a> |
||
2888 | flags |= HEXPREFIX; |
||
2889 | 113c: 30 e4 ldi r19, 0x40 ; 64 |
||
2890 | 113e: 53 2a or r5, r19 |
||
2891 | |||
2892 | /* unsigned conversions */ |
||
2893 | nosign: sign = '\0'; |
||
2894 | 1140: 19 a6 std Y+41, r1 ; 0x29 |
||
2895 | /* |
||
2896 | * ``... diouXx conversions ... if a precision is |
||
2897 | * specified, the 0 flag will be ignored.'' |
||
2898 | * -- ANSI X3J11 |
||
2899 | */ |
||
2900 | number: if ((dprec = prec) >= 0) |
||
2901 | 1142: 18 ab std Y+48, r17 ; 0x30 |
||
2902 | 1144: 17 fd sbrc r17, 7 |
||
2903 | 1146: 02 c0 rjmp .+4 ; 0x114c <_printf_P+0x386> |
||
2904 | flags &= ~ZEROPAD; |
||
2905 | 1148: 4f ed ldi r20, 0xDF ; 223 |
||
2906 | 114a: 54 22 and r5, r20 |
||
2907 | |||
2908 | /* |
||
2909 | * ``The result of converting a zero value with an |
||
2910 | * explicit precision of zero is no characters.'' |
||
2911 | * -- ANSI X3J11 |
||
2912 | */ |
||
2913 | cp = buf + BUF; |
||
2914 | 114c: 29 e2 ldi r18, 0x29 ; 41 |
||
2915 | 114e: 82 2e mov r8, r18 |
||
2916 | 1150: 91 2c mov r9, r1 |
||
2917 | 1152: 8c 0e add r8, r28 |
||
2918 | 1154: 9d 1e adc r9, r29 |
||
2919 | if (_ulong != 0 || prec != 0) { |
||
2920 | 1156: 8c a5 ldd r24, Y+44 ; 0x2c |
||
2921 | 1158: 9d a5 ldd r25, Y+45 ; 0x2d |
||
2922 | 115a: ae a5 ldd r26, Y+46 ; 0x2e |
||
2923 | 115c: bf a5 ldd r27, Y+47 ; 0x2f |
||
2924 | 115e: 00 97 sbiw r24, 0x00 ; 0 |
||
2925 | 1160: a1 05 cpc r26, r1 |
||
2926 | 1162: b1 05 cpc r27, r1 |
||
2927 | 1164: 21 f4 brne .+8 ; 0x116e <_printf_P+0x3a8> |
||
2928 | 1166: 98 a9 ldd r25, Y+48 ; 0x30 |
||
2929 | 1168: 99 23 and r25, r25 |
||
2930 | 116a: 09 f4 brne .+2 ; 0x116e <_printf_P+0x3a8> |
||
2931 | 116c: 3f c0 rjmp .+126 ; 0x11ec <_printf_P+0x426> |
||
2932 | 116e: c4 2c mov r12, r4 |
||
2933 | 1170: dd 24 eor r13, r13 |
||
2934 | 1172: ee 24 eor r14, r14 |
||
2935 | 1174: ff 24 eor r15, r15 |
||
2936 | register unsigned char _d,notlastdigit; |
||
2937 | do { |
||
2938 | notlastdigit=(_ulong>=base); |
||
2939 | 1176: 33 24 eor r3, r3 |
||
2940 | 1178: 2c a5 ldd r18, Y+44 ; 0x2c |
||
2941 | 117a: 3d a5 ldd r19, Y+45 ; 0x2d |
||
2942 | 117c: 4e a5 ldd r20, Y+46 ; 0x2e |
||
2943 | 117e: 5f a5 ldd r21, Y+47 ; 0x2f |
||
2944 | 1180: 2c 15 cp r18, r12 |
||
2945 | 1182: 3d 05 cpc r19, r13 |
||
2946 | 1184: 4e 05 cpc r20, r14 |
||
2947 | 1186: 5f 05 cpc r21, r15 |
||
2948 | 1188: 10 f0 brcs .+4 ; 0x118e <_printf_P+0x3c8> |
||
2949 | 118a: 91 e0 ldi r25, 0x01 ; 1 |
||
2950 | 118c: 39 2e mov r3, r25 |
||
2951 | _d = _ulong % base; |
||
2952 | 118e: 6c a5 ldd r22, Y+44 ; 0x2c |
||
2953 | 1190: 7d a5 ldd r23, Y+45 ; 0x2d |
||
2954 | 1192: 8e a5 ldd r24, Y+46 ; 0x2e |
||
2955 | 1194: 9f a5 ldd r25, Y+47 ; 0x2f |
||
2956 | 1196: a7 01 movw r20, r14 |
||
2957 | 1198: 96 01 movw r18, r12 |
||
2958 | 119a: 0e 94 d4 0d call 0x1ba8 <__udivmodsi4> |
||
2959 | 119e: dc 01 movw r26, r24 |
||
2960 | 11a0: cb 01 movw r24, r22 |
||
2961 | 11a2: 18 2f mov r17, r24 |
||
2962 | |||
2963 | if (_d<10) { |
||
2964 | 11a4: 8a 30 cpi r24, 0x0A ; 10 |
||
2965 | 11a6: 10 f4 brcc .+4 ; 0x11ac <_printf_P+0x3e6> |
||
2966 | _d+='0'; |
||
2967 | 11a8: 10 5d subi r17, 0xD0 ; 208 |
||
2968 | 11aa: 04 c0 rjmp .+8 ; 0x11b4 <_printf_P+0x3ee> |
||
2969 | } else { |
||
2970 | _d+='a'-10; |
||
2971 | 11ac: 19 5a subi r17, 0xA9 ; 169 |
||
2972 | if (ch=='X') _d&=~0x20; |
||
2973 | 11ae: 08 35 cpi r16, 0x58 ; 88 |
||
2974 | 11b0: 09 f4 brne .+2 ; 0x11b4 <_printf_P+0x3ee> |
||
2975 | 11b2: 1f 7d andi r17, 0xDF ; 223 |
||
2976 | } |
||
2977 | *--cp=_d; |
||
2978 | 11b4: d4 01 movw r26, r8 |
||
2979 | 11b6: 1e 93 st -X, r17 |
||
2980 | 11b8: 4d 01 movw r8, r26 |
||
2981 | _ulong /= base; |
||
2982 | 11ba: 6c a5 ldd r22, Y+44 ; 0x2c |
||
2983 | 11bc: 7d a5 ldd r23, Y+45 ; 0x2d |
||
2984 | 11be: 8e a5 ldd r24, Y+46 ; 0x2e |
||
2985 | 11c0: 9f a5 ldd r25, Y+47 ; 0x2f |
||
2986 | 11c2: a7 01 movw r20, r14 |
||
2987 | 11c4: 96 01 movw r18, r12 |
||
2988 | 11c6: 0e 94 d4 0d call 0x1ba8 <__udivmodsi4> |
||
2989 | 11ca: 2c a7 std Y+44, r18 ; 0x2c |
||
2990 | 11cc: 3d a7 std Y+45, r19 ; 0x2d |
||
2991 | 11ce: 4e a7 std Y+46, r20 ; 0x2e |
||
2992 | 11d0: 5f a7 std Y+47, r21 ; 0x2f |
||
2993 | } while (notlastdigit); |
||
2994 | 11d2: 33 20 and r3, r3 |
||
2995 | 11d4: 81 f6 brne .-96 ; 0x1176 <_printf_P+0x3b0> |
||
2996 | #ifndef LIGHTPRINTF |
||
2997 | // handle octal leading 0 |
||
2998 | if (base==OCT && flags & ALT && *cp != '0') |
||
2999 | 11d6: b8 e0 ldi r27, 0x08 ; 8 |
||
3000 | 11d8: 4b 16 cp r4, r27 |
||
3001 | 11da: 41 f4 brne .+16 ; 0x11ec <_printf_P+0x426> |
||
3002 | 11dc: 53 fe sbrs r5, 3 |
||
3003 | 11de: 06 c0 rjmp .+12 ; 0x11ec <_printf_P+0x426> |
||
3004 | 11e0: 10 33 cpi r17, 0x30 ; 48 |
||
3005 | 11e2: 21 f0 breq .+8 ; 0x11ec <_printf_P+0x426> |
||
3006 | *--cp = '0'; |
||
3007 | 11e4: 80 e3 ldi r24, 0x30 ; 48 |
||
3008 | 11e6: f4 01 movw r30, r8 |
||
3009 | 11e8: 82 93 st -Z, r24 |
||
3010 | 11ea: 4f 01 movw r8, r30 |
||
3011 | #endif |
||
3012 | } |
||
3013 | |||
3014 | size = buf + BUF - cp; |
||
3015 | 11ec: ce 01 movw r24, r28 |
||
3016 | 11ee: 01 96 adiw r24, 0x01 ; 1 |
||
3017 | 11f0: d8 2e mov r13, r24 |
||
3018 | 11f2: d8 18 sub r13, r8 |
||
3019 | 11f4: f8 e2 ldi r31, 0x28 ; 40 |
||
3020 | 11f6: df 0e add r13, r31 |
||
3021 | 11f8: 0b c0 rjmp .+22 ; 0x1210 <_printf_P+0x44a> |
||
3022 | } else { //default |
||
3023 | /* "%?" prints ?, unless ? is NUL */ |
||
3024 | if (ch == '\0') |
||
3025 | 11fa: 00 23 and r16, r16 |
||
3026 | 11fc: 09 f4 brne .+2 ; 0x1200 <_printf_P+0x43a> |
||
3027 | 11fe: 4e c0 rjmp .+156 ; 0x129c <_printf_P+0x4d6> |
||
3028 | goto done; |
||
3029 | /* pretend it was %c with argument ch */ |
||
3030 | cp = buf; |
||
3031 | 1200: 4e 01 movw r8, r28 |
||
3032 | 1202: 08 94 sec |
||
3033 | 1204: 81 1c adc r8, r1 |
||
3034 | 1206: 91 1c adc r9, r1 |
||
3035 | *cp = ch; |
||
3036 | 1208: 09 83 std Y+1, r16 ; 0x01 |
||
3037 | size = 1; |
||
3038 | 120a: 81 e0 ldi r24, 0x01 ; 1 |
||
3039 | 120c: d8 2e mov r13, r24 |
||
3040 | sign = '\0'; |
||
3041 | 120e: 19 a6 std Y+41, r1 ; 0x29 |
||
3042 | } |
||
3043 | |||
3044 | /* |
||
3045 | * All reasonable formats wind up here. At this point, |
||
3046 | * `cp' points to a string which (if not flags&LADJUST) |
||
3047 | * should be padded out to `width' places. If |
||
3048 | * flags&ZEROPAD, it should first be prefixed by any |
||
3049 | * sign or other prefix; otherwise, it should be blank |
||
3050 | * padded before the prefix is emitted. After any |
||
3051 | * left-hand padding and prefixing, emit zeroes |
||
3052 | * required by a decimal [diouxX] precision, then print |
||
3053 | * the string proper, then emit zeroes required by any |
||
3054 | * leftover floating precision; finally, if LADJUST, |
||
3055 | * pad with blanks. |
||
3056 | */ |
||
3057 | |||
3058 | /* |
||
3059 | * compute actual size, so we know how much to pad. |
||
3060 | */ |
||
3061 | fieldsz = size; |
||
3062 | 1210: 1d 2d mov r17, r13 |
||
3063 | |||
3064 | dpad = dprec - size; |
||
3065 | 1212: c8 a8 ldd r12, Y+48 ; 0x30 |
||
3066 | 1214: cd 18 sub r12, r13 |
||
3067 | if (dpad < 0) |
||
3068 | 1216: c7 fc sbrc r12, 7 |
||
3069 | dpad = 0; |
||
3070 | 1218: cc 24 eor r12, r12 |
||
3071 | |||
3072 | if (sign) |
||
3073 | 121a: 89 a5 ldd r24, Y+41 ; 0x29 |
||
3074 | 121c: 88 23 and r24, r24 |
||
3075 | 121e: 11 f0 breq .+4 ; 0x1224 <_printf_P+0x45e> |
||
3076 | fieldsz++; |
||
3077 | 1220: 1f 5f subi r17, 0xFF ; 255 |
||
3078 | 1222: 02 c0 rjmp .+4 ; 0x1228 <_printf_P+0x462> |
||
3079 | else if (flags & HEXPREFIX) |
||
3080 | 1224: 56 fc sbrc r5, 6 |
||
3081 | fieldsz += 2; |
||
3082 | 1226: 1e 5f subi r17, 0xFE ; 254 |
||
3083 | fieldsz += dpad; |
||
3084 | 1228: 1c 0d add r17, r12 |
||
3085 | |||
3086 | /* right-adjusting blank padding */ |
||
3087 | if ((flags & (LADJUST|ZEROPAD)) == 0) |
||
3088 | 122a: e5 2c mov r14, r5 |
||
3089 | 122c: ff 24 eor r15, r15 |
||
3090 | 122e: c7 01 movw r24, r14 |
||
3091 | 1230: 80 73 andi r24, 0x30 ; 48 |
||
3092 | 1232: 90 70 andi r25, 0x00 ; 0 |
||
3093 | 1234: 89 2b or r24, r25 |
||
3094 | 1236: 21 f4 brne .+8 ; 0x1240 <_printf_P+0x47a> |
||
3095 | PAD_SP(width - fieldsz); |
||
3096 | 1238: 82 2d mov r24, r2 |
||
3097 | 123a: 81 1b sub r24, r17 |
||
3098 | 123c: 0e 94 cb 06 call 0xd96 <PAD_SP> |
||
3099 | |||
3100 | /* prefix */ |
||
3101 | if (sign) { |
||
3102 | 1240: 89 a5 ldd r24, Y+41 ; 0x29 |
||
3103 | 1242: 88 23 and r24, r24 |
||
3104 | 1244: 29 f0 breq .+10 ; 0x1250 <_printf_P+0x48a> |
||
3105 | PRINT(&sign, 1); |
||
3106 | 1246: 61 e0 ldi r22, 0x01 ; 1 |
||
3107 | 1248: 70 e0 ldi r23, 0x00 ; 0 |
||
3108 | 124a: ce 01 movw r24, r28 |
||
3109 | 124c: 89 96 adiw r24, 0x29 ; 41 |
||
3110 | 124e: 09 c0 rjmp .+18 ; 0x1262 <_printf_P+0x49c> |
||
3111 | } else if (flags & HEXPREFIX) { |
||
3112 | 1250: e6 fe sbrs r14, 6 |
||
3113 | 1252: 09 c0 rjmp .+18 ; 0x1266 <_printf_P+0x4a0> |
||
3114 | ox[0] = '0'; |
||
3115 | 1254: 80 e3 ldi r24, 0x30 ; 48 |
||
3116 | 1256: 8a a7 std Y+42, r24 ; 0x2a |
||
3117 | ox[1] = ch; |
||
3118 | 1258: 0b a7 std Y+43, r16 ; 0x2b |
||
3119 | PRINT(ox, 2); |
||
3120 | 125a: 62 e0 ldi r22, 0x02 ; 2 |
||
3121 | 125c: 70 e0 ldi r23, 0x00 ; 0 |
||
3122 | 125e: ce 01 movw r24, r28 |
||
3123 | 1260: 8a 96 adiw r24, 0x2a ; 42 |
||
3124 | 1262: 0e 94 a2 06 call 0xd44 <PRINT> |
||
3125 | } |
||
3126 | |||
3127 | /* right-adjusting zero padding */ |
||
3128 | if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) |
||
3129 | 1266: c7 01 movw r24, r14 |
||
3130 | 1268: 80 73 andi r24, 0x30 ; 48 |
||
3131 | 126a: 90 70 andi r25, 0x00 ; 0 |
||
3132 | 126c: 80 97 sbiw r24, 0x20 ; 32 |
||
3133 | 126e: 21 f4 brne .+8 ; 0x1278 <_printf_P+0x4b2> |
||
3134 | PAD_0(width - fieldsz); |
||
3135 | 1270: 82 2d mov r24, r2 |
||
3136 | 1272: 81 1b sub r24, r17 |
||
3137 | 1274: 0e 94 d7 06 call 0xdae <PAD_0> |
||
3138 | |||
3139 | /* leading zeroes from decimal precision */ |
||
3140 | PAD_0(dpad); |
||
3141 | 1278: 8c 2d mov r24, r12 |
||
3142 | 127a: 0e 94 d7 06 call 0xdae <PAD_0> |
||
3143 | |||
3144 | /* the string or number proper */ |
||
3145 | PRINT(cp, size); |
||
3146 | 127e: 8d 2d mov r24, r13 |
||
3147 | 1280: 99 27 eor r25, r25 |
||
3148 | 1282: 87 fd sbrc r24, 7 |
||
3149 | 1284: 90 95 com r25 |
||
3150 | 1286: bc 01 movw r22, r24 |
||
3151 | 1288: c4 01 movw r24, r8 |
||
3152 | 128a: 0e 94 a2 06 call 0xd44 <PRINT> |
||
3153 | |||
3154 | /* left-adjusting padding (always blank) */ |
||
3155 | if (flags & LADJUST) |
||
3156 | 128e: e4 fe sbrs r14, 4 |
||
3157 | 1290: c1 cd rjmp .-1150 ; 0xe14 <_printf_P+0x4e> |
||
3158 | PAD_SP(width - fieldsz); |
||
3159 | 1292: 82 2d mov r24, r2 |
||
3160 | 1294: 81 1b sub r24, r17 |
||
3161 | 1296: 0e 94 cb 06 call 0xd96 <PAD_SP> |
||
3162 | 129a: bc cd rjmp .-1160 ; 0xe14 <_printf_P+0x4e> |
||
3163 | 129c: e0 96 adiw r28, 0x30 ; 48 |
||
3164 | 129e: 0f b6 in r0, 0x3f ; 63 |
||
3165 | 12a0: f8 94 cli |
||
3166 | 12a2: de bf out 0x3e, r29 ; 62 |
||
3167 | 12a4: 0f be out 0x3f, r0 ; 63 |
||
3168 | 12a6: cd bf out 0x3d, r28 ; 61 |
||
3169 | 12a8: df 91 pop r29 |
||
3170 | 12aa: cf 91 pop r28 |
||
3171 | 12ac: 1f 91 pop r17 |
||
3172 | 12ae: 0f 91 pop r16 |
||
3173 | 12b0: ff 90 pop r15 |
||
3174 | 12b2: ef 90 pop r14 |
||
3175 | 12b4: df 90 pop r13 |
||
3176 | 12b6: cf 90 pop r12 |
||
3177 | 12b8: bf 90 pop r11 |
||
3178 | 12ba: af 90 pop r10 |
||
3179 | 12bc: 9f 90 pop r9 |
||
3180 | 12be: 8f 90 pop r8 |
||
3181 | 12c0: 7f 90 pop r7 |
||
3182 | 12c2: 6f 90 pop r6 |
||
3183 | 12c4: 5f 90 pop r5 |
||
3184 | 12c6: 4f 90 pop r4 |
||
3185 | 12c8: 3f 90 pop r3 |
||
3186 | 12ca: 2f 90 pop r2 |
||
3187 | 12cc: 08 95 ret |
||
3188 | |||
3189 | 000012ce <__vector_9>: |
||
3190 | }; |
||
3191 | |||
3192 | |||
3193 | SIGNAL (SIG_OVERFLOW1) |
||
3194 | { |
||
3195 | 12ce: 1f 92 push r1 |
||
3196 | 12d0: 0f 92 push r0 |
||
3197 | 12d2: 0f b6 in r0, 0x3f ; 63 |
||
3198 | 12d4: 0f 92 push r0 |
||
3199 | 12d6: 11 24 eor r1, r1 |
||
3200 | 12d8: 8f 93 push r24 |
||
3201 | 12da: 9f 93 push r25 |
||
3202 | static unsigned char cnt_10ms = 0; |
||
3203 | TCNT1 -= TIMER_RELOAD_VALUE; |
||
3204 | 12dc: 8c b5 in r24, 0x2c ; 44 |
||
3205 | 12de: 9d b5 in r25, 0x2d ; 45 |
||
3206 | 12e0: 8a 5f subi r24, 0xFA ; 250 |
||
3207 | 12e2: 90 40 sbci r25, 0x00 ; 0 |
||
3208 | 12e4: 9d bd out 0x2d, r25 ; 45 |
||
3209 | 12e6: 8c bd out 0x2c, r24 ; 44 |
||
3210 | CountMilliseconds++; |
||
3211 | 12e8: 80 91 a5 00 lds r24, 0x00A5 |
||
3212 | 12ec: 90 91 a6 00 lds r25, 0x00A6 |
||
3213 | 12f0: 01 96 adiw r24, 0x01 ; 1 |
||
3214 | 12f2: 90 93 a6 00 sts 0x00A6, r25 |
||
3215 | 12f6: 80 93 a5 00 sts 0x00A5, r24 |
||
3216 | if(DisplayBusy) DisplayBusy--; |
||
3217 | 12fa: 80 91 93 00 lds r24, 0x0093 |
||
3218 | 12fe: 88 23 and r24, r24 |
||
3219 | 1300: 29 f0 breq .+10 ; 0x130c <__vector_9+0x3e> |
||
3220 | 1302: 80 91 93 00 lds r24, 0x0093 |
||
3221 | 1306: 81 50 subi r24, 0x01 ; 1 |
||
3222 | 1308: 80 93 93 00 sts 0x0093, r24 |
||
3223 | if(LoescheIrCodeTimer) |
||
3224 | 130c: 80 91 7c 00 lds r24, 0x007C |
||
3225 | 1310: 90 91 7d 00 lds r25, 0x007D |
||
3226 | 1314: 00 97 sbiw r24, 0x00 ; 0 |
||
3227 | 1316: 59 f0 breq .+22 ; 0x132e <__vector_9+0x60> |
||
3228 | { |
||
3229 | if(--LoescheIrCodeTimer == 0) IR_Code = 0; |
||
3230 | 1318: 01 97 sbiw r24, 0x01 ; 1 |
||
3231 | 131a: 90 93 7d 00 sts 0x007D, r25 |
||
3232 | 131e: 80 93 7c 00 sts 0x007C, r24 |
||
3233 | 1322: 00 97 sbiw r24, 0x00 ; 0 |
||
3234 | 1324: 21 f4 brne .+8 ; 0x132e <__vector_9+0x60> |
||
3235 | 1326: 90 93 c8 01 sts 0x01C8, r25 |
||
3236 | 132a: 80 93 c7 01 sts 0x01C7, r24 |
||
3237 | 132e: 9f 91 pop r25 |
||
3238 | 1330: 8f 91 pop r24 |
||
3239 | 1332: 0f 90 pop r0 |
||
3240 | 1334: 0f be out 0x3f, r0 ; 63 |
||
3241 | 1336: 0f 90 pop r0 |
||
3242 | 1338: 1f 90 pop r1 |
||
3243 | 133a: 18 95 reti |
||
3244 | |||
3245 | 0000133c <Timer1_Init>: |
||
3246 | } |
||
3247 | |||
3248 | } |
||
3249 | |||
3250 | |||
3251 | void Timer1_Init(void) |
||
3252 | { |
||
3253 | |||
3254 | TCCR1B = TIMER_TEILER; |
||
3255 | 133c: 83 e0 ldi r24, 0x03 ; 3 |
||
3256 | 133e: 8e bd out 0x2e, r24 ; 46 |
||
3257 | TCNT1 = -TIMER_RELOAD_VALUE; // reload |
||
3258 | 1340: 86 e0 ldi r24, 0x06 ; 6 |
||
3259 | 1342: 9f ef ldi r25, 0xFF ; 255 |
||
3260 | 1344: 9d bd out 0x2d, r25 ; 45 |
||
3261 | 1346: 8c bd out 0x2c, r24 ; 44 |
||
3262 | //OCR1 = 0x00; |
||
3263 | // Timer(s)/Counter(s) Interrupt(s) initialization |
||
3264 | |||
3265 | #if defined (__AVR_ATmega32__) |
||
3266 | TIMSK |= 0x04; |
||
3267 | 1348: 89 b7 in r24, 0x39 ; 57 |
||
3268 | 134a: 84 60 ori r24, 0x04 ; 4 |
||
3269 | 134c: 89 bf out 0x39, r24 ; 57 |
||
3270 | 134e: 08 95 ret |
||
3271 | |||
3272 | 00001350 <SetDelay>: |
||
3273 | #endif |
||
3274 | |||
3275 | #if defined (__AVR_ATmega644__) |
||
3276 | TIMSK1 |= _BV(TOIE1); |
||
3277 | #endif |
||
3278 | |||
3279 | } |
||
3280 | |||
3281 | |||
3282 | unsigned int SetDelay (unsigned int t) |
||
3283 | { |
||
3284 | return(CountMilliseconds + t - 1); |
||
3285 | 1350: 20 91 a5 00 lds r18, 0x00A5 |
||
3286 | 1354: 30 91 a6 00 lds r19, 0x00A6 |
||
3287 | 1358: 28 0f add r18, r24 |
||
3288 | 135a: 39 1f adc r19, r25 |
||
3289 | } |
||
3290 | 135c: c9 01 movw r24, r18 |
||
3291 | 135e: 01 97 sbiw r24, 0x01 ; 1 |
||
3292 | 1360: 08 95 ret |
||
3293 | |||
3294 | 00001362 <CheckDelay>: |
||
3295 | |||
3296 | char CheckDelay (unsigned int t) |
||
3297 | { |
||
3298 | return(((t - CountMilliseconds) & 0x8000) >> 8); |
||
3299 | 1362: 20 91 a5 00 lds r18, 0x00A5 |
||
3300 | 1366: 30 91 a6 00 lds r19, 0x00A6 |
||
3301 | 136a: 82 1b sub r24, r18 |
||
3302 | 136c: 93 0b sbc r25, r19 |
||
3303 | 136e: 89 2f mov r24, r25 |
||
3304 | 1370: 99 27 eor r25, r25 |
||
3305 | 1372: 80 78 andi r24, 0x80 ; 128 |
||
3306 | } |
||
3307 | 1374: 99 27 eor r25, r25 |
||
3308 | 1376: 08 95 ret |
||
3309 | |||
3310 | 00001378 <Delay_ms>: |
||
3311 | |||
3312 | void Delay_ms(unsigned int w) |
||
3313 | { |
||
3314 | 1378: cf 93 push r28 |
||
3315 | 137a: df 93 push r29 |
||
3316 | unsigned int akt; |
||
3317 | akt = SetDelay(w); |
||
3318 | 137c: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
3319 | 1380: ec 01 movw r28, r24 |
||
3320 | while (!CheckDelay(akt)); |
||
3321 | 1382: ce 01 movw r24, r28 |
||
3322 | 1384: 0e 94 b1 09 call 0x1362 <CheckDelay> |
||
3323 | 1388: 88 23 and r24, r24 |
||
3324 | 138a: d9 f3 breq .-10 ; 0x1382 <Delay_ms+0xa> |
||
3325 | 138c: df 91 pop r29 |
||
3326 | 138e: cf 91 pop r28 |
||
3327 | 1390: 08 95 ret |
||
3328 | |||
3329 | 00001392 <Keyboard_Init>: |
||
3330 | unsigned int KeyTimer = 0; |
||
3331 | |||
3332 | void Keyboard_Init(void) |
||
3333 | { |
||
3334 | KeyTimer = SetDelay(KEY_DELAY_MS); |
||
3335 | 1392: 82 e3 ldi r24, 0x32 ; 50 |
||
3336 | 1394: 90 e0 ldi r25, 0x00 ; 0 |
||
3337 | 1396: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
3338 | 139a: 90 93 a9 00 sts 0x00A9, r25 |
||
3339 | 139e: 80 93 a8 00 sts 0x00A8, r24 |
||
3340 | 13a2: 08 95 ret |
||
3341 | |||
3342 | 000013a4 <GetKeyboard>: |
||
3343 | } |
||
3344 | |||
3345 | unsigned char GetKeyboard(void) |
||
3346 | { |
||
3347 | 13a4: cf 93 push r28 |
||
3348 | static char taste1 = 0, taste2 = 0,taste3 = 0,taste4 = 0,taste5 = 0; |
||
3349 | unsigned char ret = 0; |
||
3350 | 13a6: c0 e0 ldi r28, 0x00 ; 0 |
||
3351 | if(CheckDelay(KeyTimer)) |
||
3352 | 13a8: 80 91 a8 00 lds r24, 0x00A8 |
||
3353 | 13ac: 90 91 a9 00 lds r25, 0x00A9 |
||
3354 | 13b0: 0e 94 b1 09 call 0x1362 <CheckDelay> |
||
3355 | 13b4: 88 23 and r24, r24 |
||
3356 | 13b6: 09 f4 brne .+2 ; 0x13ba <GetKeyboard+0x16> |
||
3357 | 13b8: 76 c0 rjmp .+236 ; 0x14a6 <GetKeyboard+0x102> |
||
3358 | { |
||
3359 | if(_TASTE1) { if(taste1++ == 0 || taste1 == CNT_TASTE) ret |= KEY1; if(taste1 == CNT_TASTE) taste1 = CNT_TASTE-CNT_TASTE/3;} else taste1 = 0; |
||
3360 | 13ba: cf 9b sbis 0x19, 7 ; 25 |
||
3361 | 13bc: 12 c0 rjmp .+36 ; 0x13e2 <GetKeyboard+0x3e> |
||
3362 | 13be: 80 91 aa 00 lds r24, 0x00AA |
||
3363 | 13c2: 8f 5f subi r24, 0xFF ; 255 |
||
3364 | 13c4: 80 93 aa 00 sts 0x00AA, r24 |
||
3365 | 13c8: 81 30 cpi r24, 0x01 ; 1 |
||
3366 | 13ca: 11 f0 breq .+4 ; 0x13d0 <GetKeyboard+0x2c> |
||
3367 | 13cc: 8a 30 cpi r24, 0x0A ; 10 |
||
3368 | 13ce: 09 f4 brne .+2 ; 0x13d2 <GetKeyboard+0x2e> |
||
3369 | 13d0: c1 e0 ldi r28, 0x01 ; 1 |
||
3370 | 13d2: 80 91 aa 00 lds r24, 0x00AA |
||
3371 | 13d6: 8a 30 cpi r24, 0x0A ; 10 |
||
3372 | 13d8: 31 f4 brne .+12 ; 0x13e6 <GetKeyboard+0x42> |
||
3373 | 13da: 87 e0 ldi r24, 0x07 ; 7 |
||
3374 | 13dc: 80 93 aa 00 sts 0x00AA, r24 |
||
3375 | 13e0: 02 c0 rjmp .+4 ; 0x13e6 <GetKeyboard+0x42> |
||
3376 | 13e2: c0 93 aa 00 sts 0x00AA, r28 |
||
3377 | if(_TASTE2) { if(taste2++ == 0 || taste2 == CNT_TASTE) ret |= KEY2; if(taste2 == CNT_TASTE) taste2 = CNT_TASTE-CNT_TASTE/3;} else taste2 = 0; |
||
3378 | 13e6: ce 9b sbis 0x19, 6 ; 25 |
||
3379 | 13e8: 12 c0 rjmp .+36 ; 0x140e <GetKeyboard+0x6a> |
||
3380 | 13ea: 80 91 ab 00 lds r24, 0x00AB |
||
3381 | 13ee: 8f 5f subi r24, 0xFF ; 255 |
||
3382 | 13f0: 80 93 ab 00 sts 0x00AB, r24 |
||
3383 | 13f4: 81 30 cpi r24, 0x01 ; 1 |
||
3384 | 13f6: 11 f0 breq .+4 ; 0x13fc <GetKeyboard+0x58> |
||
3385 | 13f8: 8a 30 cpi r24, 0x0A ; 10 |
||
3386 | 13fa: 09 f4 brne .+2 ; 0x13fe <GetKeyboard+0x5a> |
||
3387 | 13fc: c2 60 ori r28, 0x02 ; 2 |
||
3388 | 13fe: 80 91 ab 00 lds r24, 0x00AB |
||
3389 | 1402: 8a 30 cpi r24, 0x0A ; 10 |
||
3390 | 1404: 31 f4 brne .+12 ; 0x1412 <GetKeyboard+0x6e> |
||
3391 | 1406: 87 e0 ldi r24, 0x07 ; 7 |
||
3392 | 1408: 80 93 ab 00 sts 0x00AB, r24 |
||
3393 | 140c: 02 c0 rjmp .+4 ; 0x1412 <GetKeyboard+0x6e> |
||
3394 | 140e: 10 92 ab 00 sts 0x00AB, r1 |
||
3395 | if(_TASTE3) { if(taste3++ == 0 || taste3 == CNT_TASTE) ret |= KEY3; if(taste3 == CNT_TASTE) taste3 = CNT_TASTE-CNT_TASTE/3;} else taste3 = 0; |
||
3396 | 1412: cd 9b sbis 0x19, 5 ; 25 |
||
3397 | 1414: 12 c0 rjmp .+36 ; 0x143a <GetKeyboard+0x96> |
||
3398 | 1416: 80 91 ac 00 lds r24, 0x00AC |
||
3399 | 141a: 8f 5f subi r24, 0xFF ; 255 |
||
3400 | 141c: 80 93 ac 00 sts 0x00AC, r24 |
||
3401 | 1420: 81 30 cpi r24, 0x01 ; 1 |
||
3402 | 1422: 11 f0 breq .+4 ; 0x1428 <GetKeyboard+0x84> |
||
3403 | 1424: 8a 30 cpi r24, 0x0A ; 10 |
||
3404 | 1426: 09 f4 brne .+2 ; 0x142a <GetKeyboard+0x86> |
||
3405 | 1428: c4 60 ori r28, 0x04 ; 4 |
||
3406 | 142a: 80 91 ac 00 lds r24, 0x00AC |
||
3407 | 142e: 8a 30 cpi r24, 0x0A ; 10 |
||
3408 | 1430: 31 f4 brne .+12 ; 0x143e <GetKeyboard+0x9a> |
||
3409 | 1432: 87 e0 ldi r24, 0x07 ; 7 |
||
3410 | 1434: 80 93 ac 00 sts 0x00AC, r24 |
||
3411 | 1438: 02 c0 rjmp .+4 ; 0x143e <GetKeyboard+0x9a> |
||
3412 | 143a: 10 92 ac 00 sts 0x00AC, r1 |
||
3413 | if(_TASTE4) { if(taste4++ == 0 || taste4 == CNT_TASTE) ret |= KEY4; if(taste4 == CNT_TASTE) taste4 = CNT_TASTE-CNT_TASTE/3;} else taste4 = 0; |
||
3414 | 143e: cc 9b sbis 0x19, 4 ; 25 |
||
3415 | 1440: 12 c0 rjmp .+36 ; 0x1466 <GetKeyboard+0xc2> |
||
3416 | 1442: 80 91 ad 00 lds r24, 0x00AD |
||
3417 | 1446: 8f 5f subi r24, 0xFF ; 255 |
||
3418 | 1448: 80 93 ad 00 sts 0x00AD, r24 |
||
3419 | 144c: 81 30 cpi r24, 0x01 ; 1 |
||
3420 | 144e: 11 f0 breq .+4 ; 0x1454 <GetKeyboard+0xb0> |
||
3421 | 1450: 8a 30 cpi r24, 0x0A ; 10 |
||
3422 | 1452: 09 f4 brne .+2 ; 0x1456 <GetKeyboard+0xb2> |
||
3423 | 1454: c8 60 ori r28, 0x08 ; 8 |
||
3424 | 1456: 80 91 ad 00 lds r24, 0x00AD |
||
3425 | 145a: 8a 30 cpi r24, 0x0A ; 10 |
||
3426 | 145c: 31 f4 brne .+12 ; 0x146a <GetKeyboard+0xc6> |
||
3427 | 145e: 87 e0 ldi r24, 0x07 ; 7 |
||
3428 | 1460: 80 93 ad 00 sts 0x00AD, r24 |
||
3429 | 1464: 02 c0 rjmp .+4 ; 0x146a <GetKeyboard+0xc6> |
||
3430 | 1466: 10 92 ad 00 sts 0x00AD, r1 |
||
3431 | if(_TASTE5) { if(taste5++ == 0 || taste5 == CNT_TASTE) ret |= KEY5; if(taste5 == CNT_TASTE) taste5 = CNT_TASTE-CNT_TASTE/3;} else taste5 = 0; |
||
3432 | 146a: cb 9b sbis 0x19, 3 ; 25 |
||
3433 | 146c: 12 c0 rjmp .+36 ; 0x1492 <GetKeyboard+0xee> |
||
3434 | 146e: 80 91 ae 00 lds r24, 0x00AE |
||
3435 | 1472: 8f 5f subi r24, 0xFF ; 255 |
||
3436 | 1474: 80 93 ae 00 sts 0x00AE, r24 |
||
3437 | 1478: 81 30 cpi r24, 0x01 ; 1 |
||
3438 | 147a: 11 f0 breq .+4 ; 0x1480 <GetKeyboard+0xdc> |
||
3439 | 147c: 8a 30 cpi r24, 0x0A ; 10 |
||
3440 | 147e: 09 f4 brne .+2 ; 0x1482 <GetKeyboard+0xde> |
||
3441 | 1480: c0 61 ori r28, 0x10 ; 16 |
||
3442 | 1482: 80 91 ae 00 lds r24, 0x00AE |
||
3443 | 1486: 8a 30 cpi r24, 0x0A ; 10 |
||
3444 | 1488: 31 f4 brne .+12 ; 0x1496 <GetKeyboard+0xf2> |
||
3445 | 148a: 87 e0 ldi r24, 0x07 ; 7 |
||
3446 | 148c: 80 93 ae 00 sts 0x00AE, r24 |
||
3447 | 1490: 02 c0 rjmp .+4 ; 0x1496 <GetKeyboard+0xf2> |
||
3448 | 1492: 10 92 ae 00 sts 0x00AE, r1 |
||
3449 | KeyTimer = SetDelay(KEY_DELAY_MS); |
||
3450 | 1496: 82 e3 ldi r24, 0x32 ; 50 |
||
3451 | 1498: 90 e0 ldi r25, 0x00 ; 0 |
||
3452 | 149a: 0e 94 a8 09 call 0x1350 <SetDelay> |
||
3453 | 149e: 90 93 a9 00 sts 0x00A9, r25 |
||
3454 | 14a2: 80 93 a8 00 sts 0x00A8, r24 |
||
3455 | } |
||
3456 | return(ret); |
||
3457 | } |
||
3458 | 14a6: 8c 2f mov r24, r28 |
||
3459 | 14a8: 99 27 eor r25, r25 |
||
3460 | 14aa: cf 91 pop r28 |
||
3461 | 14ac: 08 95 ret |
||
3462 | |||
3463 | 000014ae <GetKeyboard2>: |
||
3464 | |||
3465 | unsigned char GetKeyboard2(void) |
||
3466 | { |
||
3467 | unsigned char ret = 0; |
||
3468 | 14ae: 80 e0 ldi r24, 0x00 ; 0 |
||
3469 | if(_TASTE1) ret |= KEY1; |
||
3470 | 14b0: cf 99 sbic 0x19, 7 ; 25 |
||
3471 | 14b2: 81 e0 ldi r24, 0x01 ; 1 |
||
3472 | if(_TASTE2) ret |= KEY2; |
||
3473 | 14b4: ce 99 sbic 0x19, 6 ; 25 |
||
3474 | 14b6: 82 60 ori r24, 0x02 ; 2 |
||
3475 | if(_TASTE3) ret |= KEY3; |
||
3476 | 14b8: cd 99 sbic 0x19, 5 ; 25 |
||
3477 | 14ba: 84 60 ori r24, 0x04 ; 4 |
||
3478 | if(_TASTE4) ret |= KEY4; |
||
3479 | 14bc: cc 99 sbic 0x19, 4 ; 25 |
||
3480 | 14be: 88 60 ori r24, 0x08 ; 8 |
||
3481 | if(_TASTE5) ret |= KEY5; |
||
3482 | 14c0: cb 99 sbic 0x19, 3 ; 25 |
||
3483 | 14c2: 80 61 ori r24, 0x10 ; 16 |
||
3484 | return(ret); |
||
3485 | } |
||
3486 | 14c4: 99 27 eor r25, r25 |
||
3487 | 14c6: 08 95 ret |
||
3488 | |||
3489 | 000014c8 <Menu>: |
||
3490 | unsigned char KanalVon[MAX_KANAL]; |
||
3491 | unsigned char KanalAn[MAX_KANAL]; |
||
3492 | |||
3493 | void Menu(unsigned char key) |
||
3494 | { |
||
3495 | 14c8: 0f 93 push r16 |
||
3496 | 14ca: 1f 93 push r17 |
||
3497 | 14cc: cf 93 push r28 |
||
3498 | 14ce: df 93 push r29 |
||
3499 | static unsigned int arr = 0; |
||
3500 | static unsigned char MaxMenue = 2,MenuePunkt=0; |
||
3501 | unsigned char kanal = 0; |
||
3502 | |||
3503 | if(key & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue; LCD_Clear; } |
||
3504 | 14d0: c8 2f mov r28, r24 |
||
3505 | 14d2: dd 27 eor r29, r29 |
||
3506 | 14d4: c0 ff sbrs r28, 0 |
||
3507 | 14d6: 0f c0 rjmp .+30 ; 0x14f6 <Menu+0x2e> |
||
3508 | 14d8: 80 91 b3 00 lds r24, 0x00B3 |
||
3509 | 14dc: 88 23 and r24, r24 |
||
3510 | 14de: 11 f0 breq .+4 ; 0x14e4 <Menu+0x1c> |
||
3511 | 14e0: 81 50 subi r24, 0x01 ; 1 |
||
3512 | 14e2: 02 c0 rjmp .+4 ; 0x14e8 <Menu+0x20> |
||
3513 | 14e4: 80 91 7b 00 lds r24, 0x007B |
||
3514 | 14e8: 80 93 b3 00 sts 0x00B3, r24 |
||
3515 | 14ec: 81 e0 ldi r24, 0x01 ; 1 |
||
3516 | 14ee: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
3517 | 14f2: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
3518 | if(key & KEY2) { MenuePunkt++; LCD_Clear; } |
||
3519 | 14f6: 8e 01 movw r16, r28 |
||
3520 | 14f8: 02 70 andi r16, 0x02 ; 2 |
||
3521 | 14fa: 10 70 andi r17, 0x00 ; 0 |
||
3522 | 14fc: c1 ff sbrs r28, 1 |
||
3523 | 14fe: 0a c0 rjmp .+20 ; 0x1514 <Menu+0x4c> |
||
3524 | 1500: 80 91 b3 00 lds r24, 0x00B3 |
||
3525 | 1504: 8f 5f subi r24, 0xFF ; 255 |
||
3526 | 1506: 80 93 b3 00 sts 0x00B3, r24 |
||
3527 | 150a: 81 e0 ldi r24, 0x01 ; 1 |
||
3528 | 150c: 0e 94 e1 05 call 0xbc2 <_lcd_write_command> |
||
3529 | 1510: 0e 94 c9 05 call 0xb92 <_long_delay> |
||
3530 | if((key & KEY1) && (key & KEY2)) MenuePunkt = 0; |
||
3531 | 1514: c0 ff sbrs r28, 0 |
||
3532 | 1516: 04 c0 rjmp .+8 ; 0x1520 <Menu+0x58> |
||
3533 | 1518: 01 2b or r16, r17 |
||
3534 | 151a: 11 f0 breq .+4 ; 0x1520 <Menu+0x58> |
||
3535 | 151c: 10 92 b3 00 sts 0x00B3, r1 |
||
3536 | // LCD_printfxy(13,0,"[%i]",MenuePunkt); |
||
3537 | switch(MenuePunkt) |
||
3538 | 1520: 20 91 b3 00 lds r18, 0x00B3 |
||
3539 | 1524: 82 2f mov r24, r18 |
||
3540 | 1526: 99 27 eor r25, r25 |
||
3541 | 1528: 81 30 cpi r24, 0x01 ; 1 |
||
3542 | 152a: 91 05 cpc r25, r1 |
||
3543 | 152c: 09 f4 brne .+2 ; 0x1530 <Menu+0x68> |
||
3544 | 152e: 41 c0 rjmp .+130 ; 0x15b2 <Menu+0xea> |
||
3545 | 1530: 82 30 cpi r24, 0x02 ; 2 |
||
3546 | 1532: 91 05 cpc r25, r1 |
||
3547 | 1534: 1c f4 brge .+6 ; 0x153c <Menu+0x74> |
||
3548 | 1536: 89 2b or r24, r25 |
||
3549 | 1538: 49 f0 breq .+18 ; 0x154c <Menu+0x84> |
||
3550 | 153a: bf c0 rjmp .+382 ; 0x16ba <Menu+0x1f2> |
||
3551 | 153c: 82 30 cpi r24, 0x02 ; 2 |
||
3552 | 153e: 91 05 cpc r25, r1 |
||
3553 | 1540: 09 f4 brne .+2 ; 0x1544 <Menu+0x7c> |
||
3554 | 1542: 6a c0 rjmp .+212 ; 0x1618 <Menu+0x150> |
||
3555 | 1544: 03 97 sbiw r24, 0x03 ; 3 |
||
3556 | 1546: 09 f4 brne .+2 ; 0x154a <Menu+0x82> |
||
3557 | 1548: 8e c0 rjmp .+284 ; 0x1666 <Menu+0x19e> |
||
3558 | 154a: b7 c0 rjmp .+366 ; 0x16ba <Menu+0x1f2> |
||
3559 | { |
||
3560 | case 0: |
||
3561 | LCD_printfxy(0,0,"Verbinden mit"); |
||
3562 | 154c: 60 e0 ldi r22, 0x00 ; 0 |
||
3563 | 154e: 86 2f mov r24, r22 |
||
3564 | 1550: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3565 | 1554: 84 eb ldi r24, 0xB4 ; 180 |
||
3566 | 1556: 90 e0 ldi r25, 0x00 ; 0 |
||
3567 | 1558: 9f 93 push r25 |
||
3568 | 155a: 8f 93 push r24 |
||
3569 | 155c: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3570 | LCD_printfxy(0,1,"MicroSPS:%2i ",SlaveAdresse); |
||
3571 | 1560: 61 e0 ldi r22, 0x01 ; 1 |
||
3572 | 1562: 80 e0 ldi r24, 0x00 ; 0 |
||
3573 | 1564: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3574 | 1568: 0f 90 pop r0 |
||
3575 | 156a: 0f 90 pop r0 |
||
3576 | 156c: 80 91 64 00 lds r24, 0x0064 |
||
3577 | 1570: 99 27 eor r25, r25 |
||
3578 | 1572: 9f 93 push r25 |
||
3579 | 1574: 8f 93 push r24 |
||
3580 | 1576: 82 ec ldi r24, 0xC2 ; 194 |
||
3581 | 1578: 90 e0 ldi r25, 0x00 ; 0 |
||
3582 | 157a: 9f 93 push r25 |
||
3583 | 157c: 8f 93 push r24 |
||
3584 | 157e: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3585 | if(key & KEY3 && SlaveAdresse > 1) SlaveAdresse--; |
||
3586 | 1582: 0f 90 pop r0 |
||
3587 | 1584: 0f 90 pop r0 |
||
3588 | 1586: 0f 90 pop r0 |
||
3589 | 1588: 0f 90 pop r0 |
||
3590 | 158a: c2 ff sbrs r28, 2 |
||
3591 | 158c: 07 c0 rjmp .+14 ; 0x159c <Menu+0xd4> |
||
3592 | 158e: 80 91 64 00 lds r24, 0x0064 |
||
3593 | 1592: 82 30 cpi r24, 0x02 ; 2 |
||
3594 | 1594: 18 f0 brcs .+6 ; 0x159c <Menu+0xd4> |
||
3595 | 1596: 81 50 subi r24, 0x01 ; 1 |
||
3596 | 1598: 80 93 64 00 sts 0x0064, r24 |
||
3597 | if(key & KEY4 && SlaveAdresse < 26) SlaveAdresse++; |
||
3598 | 159c: c3 ff sbrs r28, 3 |
||
3599 | 159e: 92 c0 rjmp .+292 ; 0x16c4 <Menu+0x1fc> |
||
3600 | 15a0: 80 91 64 00 lds r24, 0x0064 |
||
3601 | 15a4: 8a 31 cpi r24, 0x1A ; 26 |
||
3602 | 15a6: 08 f0 brcs .+2 ; 0x15aa <Menu+0xe2> |
||
3603 | 15a8: 8d c0 rjmp .+282 ; 0x16c4 <Menu+0x1fc> |
||
3604 | 15aa: 8f 5f subi r24, 0xFF ; 255 |
||
3605 | 15ac: 80 93 64 00 sts 0x0064, r24 |
||
3606 | break; |
||
3607 | 15b0: 89 c0 rjmp .+274 ; 0x16c4 <Menu+0x1fc> |
||
3608 | case 1: |
||
3609 | LCD_printfxy(0,0,"Max Adresse"); |
||
3610 | 15b2: 60 e0 ldi r22, 0x00 ; 0 |
||
3611 | 15b4: 86 2f mov r24, r22 |
||
3612 | 15b6: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3613 | 15ba: 80 ed ldi r24, 0xD0 ; 208 |
||
3614 | 15bc: 90 e0 ldi r25, 0x00 ; 0 |
||
3615 | 15be: 9f 93 push r25 |
||
3616 | 15c0: 8f 93 push r24 |
||
3617 | 15c2: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3618 | LCD_printfxy(0,1,"%2i ",AnzahlTeilnehmer); |
||
3619 | 15c6: 61 e0 ldi r22, 0x01 ; 1 |
||
3620 | 15c8: 80 e0 ldi r24, 0x00 ; 0 |
||
3621 | 15ca: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3622 | 15ce: 0f 90 pop r0 |
||
3623 | 15d0: 0f 90 pop r0 |
||
3624 | 15d2: 80 91 6c 00 lds r24, 0x006C |
||
3625 | 15d6: 99 27 eor r25, r25 |
||
3626 | 15d8: 9f 93 push r25 |
||
3627 | 15da: 8f 93 push r24 |
||
3628 | 15dc: 8c ed ldi r24, 0xDC ; 220 |
||
3629 | 15de: 90 e0 ldi r25, 0x00 ; 0 |
||
3630 | 15e0: 9f 93 push r25 |
||
3631 | 15e2: 8f 93 push r24 |
||
3632 | 15e4: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3633 | if(key & KEY3 && AnzahlTeilnehmer > 1) AnzahlTeilnehmer--; |
||
3634 | 15e8: 0f 90 pop r0 |
||
3635 | 15ea: 0f 90 pop r0 |
||
3636 | 15ec: 0f 90 pop r0 |
||
3637 | 15ee: 0f 90 pop r0 |
||
3638 | 15f0: c2 ff sbrs r28, 2 |
||
3639 | 15f2: 07 c0 rjmp .+14 ; 0x1602 <Menu+0x13a> |
||
3640 | 15f4: 80 91 6c 00 lds r24, 0x006C |
||
3641 | 15f8: 82 30 cpi r24, 0x02 ; 2 |
||
3642 | 15fa: 18 f0 brcs .+6 ; 0x1602 <Menu+0x13a> |
||
3643 | 15fc: 81 50 subi r24, 0x01 ; 1 |
||
3644 | 15fe: 80 93 6c 00 sts 0x006C, r24 |
||
3645 | if(key & KEY4 && AnzahlTeilnehmer < 26) AnzahlTeilnehmer++; |
||
3646 | 1602: c3 ff sbrs r28, 3 |
||
3647 | 1604: 5f c0 rjmp .+190 ; 0x16c4 <Menu+0x1fc> |
||
3648 | 1606: 80 91 6c 00 lds r24, 0x006C |
||
3649 | 160a: 8a 31 cpi r24, 0x1A ; 26 |
||
3650 | 160c: 08 f0 brcs .+2 ; 0x1610 <Menu+0x148> |
||
3651 | 160e: 5a c0 rjmp .+180 ; 0x16c4 <Menu+0x1fc> |
||
3652 | 1610: 8f 5f subi r24, 0xFF ; 255 |
||
3653 | 1612: 80 93 6c 00 sts 0x006C, r24 |
||
3654 | break; |
||
3655 | 1616: 56 c0 rjmp .+172 ; 0x16c4 <Menu+0x1fc> |
||
3656 | case 2: |
||
3657 | LCD_printfxy(0,0,"Checksum"); |
||
3658 | 1618: 60 e0 ldi r22, 0x00 ; 0 |
||
3659 | 161a: 86 2f mov r24, r22 |
||
3660 | 161c: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3661 | 1620: 81 ee ldi r24, 0xE1 ; 225 |
||
3662 | 1622: 90 e0 ldi r25, 0x00 ; 0 |
||
3663 | 1624: 9f 93 push r25 |
||
3664 | 1626: 8f 93 push r24 |
||
3665 | 1628: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3666 | LCD_printfxy(0,1,"Errors:%5i ",CntCrcError); |
||
3667 | 162c: 61 e0 ldi r22, 0x01 ; 1 |
||
3668 | 162e: 80 e0 ldi r24, 0x00 ; 0 |
||
3669 | 1630: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3670 | 1634: 0f 90 pop r0 |
||
3671 | 1636: 0f 90 pop r0 |
||
3672 | 1638: 80 91 99 00 lds r24, 0x0099 |
||
3673 | 163c: 90 91 9a 00 lds r25, 0x009A |
||
3674 | 1640: 9f 93 push r25 |
||
3675 | 1642: 8f 93 push r24 |
||
3676 | 1644: 8a ee ldi r24, 0xEA ; 234 |
||
3677 | 1646: 90 e0 ldi r25, 0x00 ; 0 |
||
3678 | 1648: 9f 93 push r25 |
||
3679 | 164a: 8f 93 push r24 |
||
3680 | 164c: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3681 | if(key & KEY3) CntCrcError = 0; |
||
3682 | 1650: 0f 90 pop r0 |
||
3683 | 1652: 0f 90 pop r0 |
||
3684 | 1654: 0f 90 pop r0 |
||
3685 | 1656: 0f 90 pop r0 |
||
3686 | 1658: c2 ff sbrs r28, 2 |
||
3687 | 165a: 34 c0 rjmp .+104 ; 0x16c4 <Menu+0x1fc> |
||
3688 | 165c: 10 92 9a 00 sts 0x009A, r1 |
||
3689 | 1660: 10 92 99 00 sts 0x0099, r1 |
||
3690 | break; |
||
3691 | 1664: 2f c0 rjmp .+94 ; 0x16c4 <Menu+0x1fc> |
||
3692 | case 3: |
||
3693 | LCD_printfxy(0,0,"Display"); |
||
3694 | 1666: 60 e0 ldi r22, 0x00 ; 0 |
||
3695 | 1668: 86 2f mov r24, r22 |
||
3696 | 166a: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3697 | 166e: 86 ef ldi r24, 0xF6 ; 246 |
||
3698 | 1670: 90 e0 ldi r25, 0x00 ; 0 |
||
3699 | 1672: 9f 93 push r25 |
||
3700 | 1674: 8f 93 push r24 |
||
3701 | 1676: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3702 | LCD_printfxy(0,1,"Zeilen:%1i ",DisplayZeilen); |
||
3703 | 167a: 61 e0 ldi r22, 0x01 ; 1 |
||
3704 | 167c: 80 e0 ldi r24, 0x00 ; 0 |
||
3705 | 167e: 0e 94 55 06 call 0xcaa <LCD_Gotoxy> |
||
3706 | 1682: 0f 90 pop r0 |
||
3707 | 1684: 0f 90 pop r0 |
||
3708 | 1686: 80 91 65 00 lds r24, 0x0065 |
||
3709 | 168a: 99 27 eor r25, r25 |
||
3710 | 168c: 9f 93 push r25 |
||
3711 | 168e: 8f 93 push r24 |
||
3712 | 1690: 8e ef ldi r24, 0xFE ; 254 |
||
3713 | 1692: 90 e0 ldi r25, 0x00 ; 0 |
||
3714 | 1694: 9f 93 push r25 |
||
3715 | 1696: 8f 93 push r24 |
||
3716 | 1698: 0e 94 e3 06 call 0xdc6 <_printf_P> |
||
3717 | if(key & KEY3) DisplayZeilen = 4; |
||
3718 | 169c: 0f 90 pop r0 |
||
3719 | 169e: 0f 90 pop r0 |
||
3720 | 16a0: 0f 90 pop r0 |
||
3721 | 16a2: 0f 90 pop r0 |
||
3722 | 16a4: c2 ff sbrs r28, 2 |
||
3723 | 16a6: 03 c0 rjmp .+6 ; 0x16ae <Menu+0x1e6> |
||
3724 | 16a8: 84 e0 ldi r24, 0x04 ; 4 |
||
3725 | 16aa: 80 93 65 00 sts 0x0065, r24 |
||
3726 | if(key & KEY4) DisplayZeilen = 2; |
||
3727 | 16ae: c3 ff sbrs r28, 3 |
||
3728 | 16b0: 09 c0 rjmp .+18 ; 0x16c4 <Menu+0x1fc> |
||
3729 | 16b2: 82 e0 ldi r24, 0x02 ; 2 |
||
3730 | 16b4: 80 93 65 00 sts 0x0065, r24 |
||
3731 | break; |
||
3732 | 16b8: 05 c0 rjmp .+10 ; 0x16c4 <Menu+0x1fc> |
||
3733 | |||
3734 | |||
3735 | /* case 1: |
||
3736 | case 2: |
||
3737 | case 3: |
||
3738 | case 4: |
||
3739 | kanal = MenuePunkt - 1; |
||
3740 | LCD_printfxy(0,0,"Datenkanal:%2i",kanal); |
||
3741 | LCD_printfxy(0,1,"Von:%2i an %2i ",KanalVon[kanal],KanalAn[kanal]); |
||
3742 | if(key & KEY3) KanalVon[kanal]++; |
||
3743 | if(key & KEY4) KanalAn[kanal]++; |
||
3744 | KanalVon[kanal] % MAX_KANAL; |
||
3745 | KanalAn[kanal] % MAX_KANAL; |
||
3746 | break; |
||
3747 | */ |
||
3748 | /* |
||
3749 | case 1: |
||
3750 | LCD_printfxy(0,0,"Intervall"); |
||
3751 | LCD_printfxy(0,1,"Display:%3ims ",IntervallDisplay); |
||
3752 | if(key & KEY3 && IntervallDisplay > 25) IntervallDisplay -= 5; |
||
3753 | if(key & KEY4 && IntervallDisplay < 990) IntervallDisplay += 5; |
||
3754 | break; |
||
3755 | case 2: |
||
3756 | LCD_printfxy(0,0,"Intervall"); |
||
3757 | LCD_printfxy(0,1,"Debug:%3ims ",IntervallDebug); |
||
3758 | if(key & KEY3 && IntervallDebug > 25) IntervallDebug -= 5; |
||
3759 | if(key & KEY4 && IntervallDebug < 990) IntervallDebug += 5; |
||
3760 | break; |
||
3761 | |||
3762 | case 1: |
||
3763 | LCD_printfxy(0,0,"Time"); |
||
3764 | LCD_printfxy(0,1,"%3i:%02i",Minute,Sekunde); |
||
3765 | if(key & KEY3) if(Minute) Minute--; |
||
3766 | if(key & KEY4) Minute++; |
||
3767 | if(key & KEY5) Sekunde = 0; |
||
3768 | break; |
||
3769 | case 2: |
||
3770 | LCD_printfxy(0,0,"Testvariable"); |
||
3771 | LCD_printfxy(0,1,"TestInt:%5i",TestInt); |
||
3772 | if(key & KEY3) TestInt--; |
||
3773 | if(key & KEY4) TestInt++; |
||
3774 | break; |
||
3775 | case 3: |
||
3776 | LCD_printfxy(0,0,"Testarray"); |
||
3777 | LCD_printfxy(0,1,"Array[%i]=%3i",arr,Array[arr]); |
||
3778 | if(key & KEY5) if(++arr == ARRAYGROESSE) arr = 0; |
||
3779 | if(key & KEY3) Array[arr]--; |
||
3780 | if(key & KEY4) Array[arr]++; |
||
3781 | break; |
||
3782 | case 4: |
||
3783 | LCD_printfxy(0,0,"Infrarot RC5:"); |
||
3784 | LCD_printfxy(0,1,"Adr:%2i Cmd:%3i",(IR_Code >> 8), IR_Code & 0xff); |
||
3785 | break; |
||
3786 | */ |
||
3787 | default: MaxMenue = MenuePunkt - 1; |
||
3788 | 16ba: 21 50 subi r18, 0x01 ; 1 |
||
3789 | 16bc: 20 93 7b 00 sts 0x007B, r18 |
||
3790 | MenuePunkt = 0; |
||
3791 | 16c0: 10 92 b3 00 sts 0x00B3, r1 |
||
3792 | 16c4: df 91 pop r29 |
||
3793 | 16c6: cf 91 pop r28 |
||
3794 | 16c8: 1f 91 pop r17 |
||
3795 | 16ca: 0f 91 pop r16 |
||
3796 | 16cc: 08 95 ret |
||
3797 | |||
3798 | 000016ce <InitIR>: |
||
3799 | // Init IR |
||
3800 | // ************************************************************************ |
||
3801 | void InitIR(void) |
||
3802 | { |
||
3803 | INT0_ENABLE; // ext. Int0 enable |
||
3804 | 16ce: 8b b7 in r24, 0x3b ; 59 |
||
3805 | 16d0: 80 64 ori r24, 0x40 ; 64 |
||
3806 | 16d2: 8b bf out 0x3b, r24 ; 59 |
||
3807 | CLR_INT0_FLAG; // war |= 0x40 |
||
3808 | 16d4: 8a b7 in r24, 0x3a ; 58 |
||
3809 | 16d6: 8f 7b andi r24, 0xBF ; 191 |
||
3810 | 16d8: 8a bf out 0x3a, r24 ; 58 |
||
3811 | INIT_INT0_FLANKE; |
||
3812 | 16da: 85 b7 in r24, 0x35 ; 53 |
||
3813 | 16dc: 8c 7f andi r24, 0xFC ; 252 |
||
3814 | 16de: 85 bf out 0x35, r24 ; 53 |
||
3815 | 16e0: 85 b7 in r24, 0x35 ; 53 |
||
3816 | 16e2: 82 60 ori r24, 0x02 ; 2 |
||
3817 | 16e4: 85 bf out 0x35, r24 ; 53 |
||
3818 | TIMER0_PRESCALER = 0x04; // Timer0: Clk div 256 |
||
3819 | 16e6: 84 e0 ldi r24, 0x04 ; 4 |
||
3820 | 16e8: 83 bf out 0x33, r24 ; 51 |
||
3821 | |||
3822 | Decodierung_Lauft = 0; |
||
3823 | 16ea: 10 92 c9 01 sts 0x01C9, r1 |
||
3824 | New_IR_Code = 0; |
||
3825 | 16ee: 10 92 c6 01 sts 0x01C6, r1 |
||
3826 | IR_Code = 0; |
||
3827 | 16f2: 10 92 c8 01 sts 0x01C8, r1 |
||
3828 | 16f6: 10 92 c7 01 sts 0x01C7, r1 |
||
3829 | 16fa: 08 95 ret |
||
3830 | |||
3831 | 000016fc <__vector_1>: |
||
3832 | |||
3833 | |||
3834 | |||
3835 | } |
||
3836 | // ************************************************************************** |
||
3837 | // * aufgerufen durch: externer Interrupt |
||
3838 | // ************************************************************************** |
||
3839 | // * Die Funktion wird durch einen externen Interrupt aufgerufen. |
||
3840 | // * Sie dient nur zum Starten der Abtastsequenz und zum Triggern auf die |
||
3841 | // * Signalflanken in der Mitte der Daten. |
||
3842 | // ************************************************************************** |
||
3843 | SIGNAL (SIG_INTERRUPT0) |
||
3844 | { |
||
3845 | 16fc: 1f 92 push r1 |
||
3846 | 16fe: 0f 92 push r0 |
||
3847 | 1700: 0f b6 in r0, 0x3f ; 63 |
||
3848 | 1702: 0f 92 push r0 |
||
3849 | 1704: 11 24 eor r1, r1 |
||
3850 | 1706: 8f 93 push r24 |
||
3851 | // Zeitbasis fuer Timer einstellen |
||
3852 | // Entspricht 1,5 mal einer Bitlaenge |
||
3853 | // PORTB++; |
||
3854 | TCNT0 = -41; |
||
3855 | 1708: 87 ed ldi r24, 0xD7 ; 215 |
||
3856 | 170a: 82 bf out 0x32, r24 ; 50 |
||
3857 | TIM0_START; // Timer 0 starten, |
||
3858 | 170c: 89 b7 in r24, 0x39 ; 57 |
||
3859 | 170e: 81 60 ori r24, 0x01 ; 1 |
||
3860 | 1710: 89 bf out 0x39, r24 ; 57 |
||
3861 | if(Decodierung_Lauft) INT0_DISABLE; // die erneute Int.-Ausl”sung soll |
||
3862 | 1712: 80 91 c9 01 lds r24, 0x01C9 |
||
3863 | 1716: 88 23 and r24, r24 |
||
3864 | 1718: 19 f0 breq .+6 ; 0x1720 <__vector_1+0x24> |
||
3865 | 171a: 8b b7 in r24, 0x3b ; 59 |
||
3866 | 171c: 8f 7b andi r24, 0xBF ; 191 |
||
3867 | 171e: 8b bf out 0x3b, r24 ; 59 |
||
3868 | 1720: 8f 91 pop r24 |
||
3869 | 1722: 0f 90 pop r0 |
||
3870 | 1724: 0f be out 0x3f, r0 ; 63 |
||
3871 | 1726: 0f 90 pop r0 |
||
3872 | 1728: 1f 90 pop r1 |
||
3873 | 172a: 18 95 reti |
||
3874 | |||
3875 | 0000172c <__vector_11>: |
||
3876 | // nur die Timer-Routine erlauben |
||
3877 | |||
3878 | } |
||
3879 | |||
3880 | // ************************************************************************** |
||
3881 | // * aufgerufen durch: Timerueberlauf Timer 0 |
||
3882 | // ************************************************************************** |
||
3883 | // * Die Funktion wird durch einen Timer0-Interrupt aufgerufen. |
||
3884 | // * Der Timer wird vom ext. Int0 gestartet. |
||
3885 | // * Das Infrarotsignal wird hier abgetastet und die Wertigkeiten der |
||
3886 | // * Bits entsprechend aufaddiert. Das empfangende Zeichen wird in der |
||
3887 | // * globalen Variablen IR_Code gespeichert. Nach Empfang wird das Bit |
||
3888 | // * Neues_Zeichen gesetzt. |
||
3889 | // ************************************************************************** |
||
3890 | SIGNAL (SIG_OVERFLOW0) |
||
3891 | { |
||
3892 | 172c: 1f 92 push r1 |
||
3893 | 172e: 0f 92 push r0 |
||
3894 | 1730: 0f b6 in r0, 0x3f ; 63 |
||
3895 | 1732: 0f 92 push r0 |
||
3896 | 1734: 11 24 eor r1, r1 |
||
3897 | 1736: 2f 93 push r18 |
||
3898 | 1738: 3f 93 push r19 |
||
3899 | 173a: 4f 93 push r20 |
||
3900 | 173c: 8f 93 push r24 |
||
3901 | 173e: 9f 93 push r25 |
||
3902 | |||
3903 | static unsigned int Shift,IR_Code_tmp; |
||
3904 | static unsigned char IR_Zaehler=0,IRSperrCounter=0; |
||
3905 | // Reinitialize Timer's 0 value |
||
3906 | TCNT1 = -41; |
||
3907 | 1740: 87 ed ldi r24, 0xD7 ; 215 |
||
3908 | 1742: 9f ef ldi r25, 0xFF ; 255 |
||
3909 | 1744: 9d bd out 0x2d, r25 ; 45 |
||
3910 | 1746: 8c bd out 0x2c, r24 ; 44 |
||
3911 | if (IRSperrCounter) |
||
3912 | 1748: 80 91 b9 00 lds r24, 0x00B9 |
||
3913 | 174c: 88 23 and r24, r24 |
||
3914 | 174e: 69 f0 breq .+26 ; 0x176a <__vector_11+0x3e> |
||
3915 | { IRSperrCounter--; |
||
3916 | 1750: 81 50 subi r24, 0x01 ; 1 |
||
3917 | 1752: 80 93 b9 00 sts 0x00B9, r24 |
||
3918 | if (!IRSperrCounter) |
||
3919 | 1756: 88 23 and r24, r24 |
||
3920 | 1758: 09 f0 breq .+2 ; 0x175c <__vector_11+0x30> |
||
3921 | 175a: 8a c0 rjmp .+276 ; 0x1870 <__vector_11+0x144> |
||
3922 | { |
||
3923 | TIM0_STOPP; // Timer0 sperre wird durch ExtInt0 gestartet |
||
3924 | 175c: 89 b7 in r24, 0x39 ; 57 |
||
3925 | 175e: 8e 7f andi r24, 0xFE ; 254 |
||
3926 | 1760: 89 bf out 0x39, r24 ; 57 |
||
3927 | CLR_INT0_FLAG; // IntFlag Loeschen |
||
3928 | 1762: 8a b7 in r24, 0x3a ; 58 |
||
3929 | 1764: 8f 7b andi r24, 0xBF ; 191 |
||
3930 | 1766: 8a bf out 0x3a, r24 ; 58 |
||
3931 | 1768: 80 c0 rjmp .+256 ; 0x186a <__vector_11+0x13e> |
||
3932 | INT0_ENABLE; // externen Interrupt wieder freigenben |
||
3933 | } |
||
3934 | } |
||
3935 | else |
||
3936 | { |
||
3937 | if(IR_Zaehler > 1) |
||
3938 | 176a: 40 91 b8 00 lds r20, 0x00B8 |
||
3939 | 176e: 42 30 cpi r20, 0x02 ; 2 |
||
3940 | 1770: 88 f0 brcs .+34 ; 0x1794 <__vector_11+0x68> |
||
3941 | { |
||
3942 | Decodierung_Lauft = 1; |
||
3943 | 1772: 81 e0 ldi r24, 0x01 ; 1 |
||
3944 | 1774: 80 93 c9 01 sts 0x01C9, r24 |
||
3945 | { |
||
3946 | CLR_INT0_FLAG; // Interrupt Flag loeschen |
||
3947 | 1778: 8a b7 in r24, 0x3a ; 58 |
||
3948 | 177a: 8f 7b andi r24, 0xBF ; 191 |
||
3949 | 177c: 8a bf out 0x3a, r24 ; 58 |
||
3950 | if(IR_PP) INT0_NEG_FLANKE; // naechste fallende Flanke soll Int0 ausloesen |
||
3951 | 177e: 82 9b sbis 0x10, 2 ; 16 |
||
3952 | 1780: 03 c0 rjmp .+6 ; 0x1788 <__vector_11+0x5c> |
||
3953 | 1782: 85 b7 in r24, 0x35 ; 53 |
||
3954 | 1784: 8e 7f andi r24, 0xFE ; 254 |
||
3955 | 1786: 02 c0 rjmp .+4 ; 0x178c <__vector_11+0x60> |
||
3956 | else INT0_POS_FLANKE; // naechste steigende Flanke soll Int0 ausloesen |
||
3957 | 1788: 85 b7 in r24, 0x35 ; 53 |
||
3958 | 178a: 81 60 ori r24, 0x01 ; 1 |
||
3959 | 178c: 85 bf out 0x35, r24 ; 53 |
||
3960 | INT0_ENABLE; // externen Int frei |
||
3961 | 178e: 8b b7 in r24, 0x3b ; 59 |
||
3962 | 1790: 80 64 ori r24, 0x40 ; 64 |
||
3963 | 1792: 8b bf out 0x3b, r24 ; 59 |
||
3964 | } |
||
3965 | } |
||
3966 | |||
3967 | if(!IR_Zaehler) // es beginnt eine neue Abtastung |
||
3968 | 1794: 44 23 and r20, r20 |
||
3969 | 1796: 59 f4 brne .+22 ; 0x17ae <__vector_11+0x82> |
||
3970 | { // es handelt sich um das 1. Sync-Bit |
||
3971 | IR_Code_tmp=0; // Merker löschen |
||
3972 | 1798: 10 92 b7 00 sts 0x00B7, r1 |
||
3973 | 179c: 10 92 b6 00 sts 0x00B6, r1 |
||
3974 | Shift=0x8000; //;8192; // Maske auf MSB |
||
3975 | 17a0: 80 e0 ldi r24, 0x00 ; 0 |
||
3976 | 17a2: 90 e8 ldi r25, 0x80 ; 128 |
||
3977 | 17a4: 90 93 b5 00 sts 0x00B5, r25 |
||
3978 | 17a8: 80 93 b4 00 sts 0x00B4, r24 |
||
3979 | 17ac: 14 c0 rjmp .+40 ; 0x17d6 <__vector_11+0xaa> |
||
3980 | } |
||
3981 | else |
||
3982 | if(IR_PP==1) // das empfangende Bit ist logisch High |
||
3983 | 17ae: 82 9b sbis 0x10, 2 ; 16 |
||
3984 | 17b0: 10 c0 rjmp .+32 ; 0x17d2 <__vector_11+0xa6> |
||
3985 | { if(IR_Zaehler>2) // (IR_Zaehler ist gleich 1 beim 2. Sync-Bit) |
||
3986 | 17b2: 43 30 cpi r20, 0x03 ; 3 |
||
3987 | 17b4: 70 f0 brcs .+28 ; 0x17d2 <__vector_11+0xa6> |
||
3988 | { // 2 --> Toggle-Bit (wird übersprungen) |
||
3989 | IR_Code_tmp |= Shift; // entsprechendse Bit setzen |
||
3990 | 17b6: 80 91 b6 00 lds r24, 0x00B6 |
||
3991 | 17ba: 90 91 b7 00 lds r25, 0x00B7 |
||
3992 | 17be: 20 91 b4 00 lds r18, 0x00B4 |
||
3993 | 17c2: 30 91 b5 00 lds r19, 0x00B5 |
||
3994 | 17c6: 82 2b or r24, r18 |
||
3995 | 17c8: 93 2b or r25, r19 |
||
3996 | 17ca: 90 93 b7 00 sts 0x00B7, r25 |
||
3997 | 17ce: 80 93 b6 00 sts 0x00B6, r24 |
||
3998 | } |
||
3999 | } |
||
4000 | |||
4001 | if ((IR_Zaehler < 2) && !(IR_PP==1)) // startbits überprüfen |
||
4002 | 17d2: 42 30 cpi r20, 0x02 ; 2 |
||
4003 | 17d4: 20 f4 brcc .+8 ; 0x17de <__vector_11+0xb2> |
||
4004 | 17d6: 82 99 sbic 0x10, 2 ; 16 |
||
4005 | 17d8: 02 c0 rjmp .+4 ; 0x17de <__vector_11+0xb2> |
||
4006 | { |
||
4007 | IR_Zaehler = 0; |
||
4008 | 17da: 10 92 b8 00 sts 0x00B8, r1 |
||
4009 | } |
||
4010 | |||
4011 | Shift >>=1; // Shiftregister um 1 nach rechts schieben |
||
4012 | 17de: 80 91 b4 00 lds r24, 0x00B4 |
||
4013 | 17e2: 90 91 b5 00 lds r25, 0x00B5 |
||
4014 | 17e6: 96 95 lsr r25 |
||
4015 | 17e8: 87 95 ror r24 |
||
4016 | 17ea: 90 93 b5 00 sts 0x00B5, r25 |
||
4017 | 17ee: 80 93 b4 00 sts 0x00B4, r24 |
||
4018 | // (für das nächste empf. Bit |
||
4019 | if (Shift == 128) Shift = 32; // Adresse ins HighByte, Kommando ins LowByte |
||
4020 | 17f2: 80 38 cpi r24, 0x80 ; 128 |
||
4021 | 17f4: 91 05 cpc r25, r1 |
||
4022 | 17f6: 31 f4 brne .+12 ; 0x1804 <__vector_11+0xd8> |
||
4023 | 17f8: 80 e2 ldi r24, 0x20 ; 32 |
||
4024 | 17fa: 90 e0 ldi r25, 0x00 ; 0 |
||
4025 | 17fc: 90 93 b5 00 sts 0x00B5, r25 |
||
4026 | 1800: 80 93 b4 00 sts 0x00B4, r24 |
||
4027 | |||
4028 | if(IR_Zaehler++==15) // Das IR-Wort wurde vollstaendig abgetastet |
||
4029 | 1804: 80 91 b8 00 lds r24, 0x00B8 |
||
4030 | 1808: 8f 5f subi r24, 0xFF ; 255 |
||
4031 | 180a: 80 93 b8 00 sts 0x00B8, r24 |
||
4032 | 180e: 80 31 cpi r24, 0x10 ; 16 |
||
4033 | 1810: 79 f5 brne .+94 ; 0x1870 <__vector_11+0x144> |
||
4034 | { |
||
4035 | CLR_INT0_FLAG; // IntFlag Loeschen |
||
4036 | 1812: 8a b7 in r24, 0x3a ; 58 |
||
4037 | 1814: 8f 7b andi r24, 0xBF ; 191 |
||
4038 | 1816: 8a bf out 0x3a, r24 ; 58 |
||
4039 | INT0_NEG_FLANKE; // fallende Flanke |
||
4040 | 1818: 85 b7 in r24, 0x35 ; 53 |
||
4041 | 181a: 8e 7f andi r24, 0xFE ; 254 |
||
4042 | 181c: 85 bf out 0x35, r24 ; 53 |
||
4043 | IR_Zaehler = 0; |
||
4044 | 181e: 10 92 b8 00 sts 0x00B8, r1 |
||
4045 | Decodierung_Lauft=0; |
||
4046 | 1822: 10 92 c9 01 sts 0x01C9, r1 |
||
4047 | /* if ((HIGH(IR_Code_tmp)==ALLOWED1)|| (HIGH(IR_Code_tmp)==ALLOWED2)|| |
||
4048 | (HIGH(IR_Code_tmp)==ALLOWED3)||(HIGH(IR_Code_tmp)==ALLOWED4)|| |
||
4049 | (HIGH(IR_Code_tmp)==ALLOWED5) ) |
||
4050 | if ((HIGH(IR_Code_tmp)< 10))*/ |
||
4051 | if ((HIGH(IR_Code_tmp)< 10 ) && (LOW(IR_Code_tmp)!=0x3F) ) |
||
4052 | 1826: 80 91 b7 00 lds r24, 0x00B7 |
||
4053 | 182a: 8a 30 cpi r24, 0x0A ; 10 |
||
4054 | 182c: d8 f4 brcc .+54 ; 0x1864 <__vector_11+0x138> |
||
4055 | 182e: 80 91 b6 00 lds r24, 0x00B6 |
||
4056 | 1832: 8f 33 cpi r24, 0x3F ; 63 |
||
4057 | 1834: b9 f0 breq .+46 ; 0x1864 <__vector_11+0x138> |
||
4058 | { // nur erlaubt Adressen werden akzepetiert |
||
4059 | IR_Code=IR_Code_tmp; // IR-Wort in die globale Variable schreiben |
||
4060 | 1836: 80 91 b6 00 lds r24, 0x00B6 |
||
4061 | 183a: 90 91 b7 00 lds r25, 0x00B7 |
||
4062 | 183e: 90 93 c8 01 sts 0x01C8, r25 |
||
4063 | 1842: 80 93 c7 01 sts 0x01C7, r24 |
||
4064 | New_IR_Code = 1; // Es ist ein neues Zeichen eingetragen worden |
||
4065 | 1846: 81 e0 ldi r24, 0x01 ; 1 |
||
4066 | 1848: 80 93 c6 01 sts 0x01C6, r24 |
||
4067 | IRSperrCounter = 4; // weitere Kommandos für 200 * 1,3ms unterdrücken |
||
4068 | 184c: 84 e0 ldi r24, 0x04 ; 4 |
||
4069 | 184e: 80 93 b9 00 sts 0x00B9, r24 |
||
4070 | INT0_ENABLE; // externen Interrupt wieder freigenben |
||
4071 | 1852: 8b b7 in r24, 0x3b ; 59 |
||
4072 | 1854: 80 64 ori r24, 0x40 ; 64 |
||
4073 | 1856: 8b bf out 0x3b, r24 ; 59 |
||
4074 | LoescheIrCodeTimer = 250; |
||
4075 | 1858: 8a ef ldi r24, 0xFA ; 250 |
||
4076 | 185a: 90 e0 ldi r25, 0x00 ; 0 |
||
4077 | 185c: 90 93 7d 00 sts 0x007D, r25 |
||
4078 | 1860: 80 93 7c 00 sts 0x007C, r24 |
||
4079 | } |
||
4080 | IRSperrCounter = 4; // weitere Kommandos für 200 * 1,3ms unterdrücken |
||
4081 | 1864: 84 e0 ldi r24, 0x04 ; 4 |
||
4082 | 1866: 80 93 b9 00 sts 0x00B9, r24 |
||
4083 | INT0_ENABLE; // externen Interrupt wieder freigenben |
||
4084 | 186a: 8b b7 in r24, 0x3b ; 59 |
||
4085 | 186c: 80 64 ori r24, 0x40 ; 64 |
||
4086 | 186e: 8b bf out 0x3b, r24 ; 59 |
||
4087 | 1870: 9f 91 pop r25 |
||
4088 | 1872: 8f 91 pop r24 |
||
4089 | 1874: 4f 91 pop r20 |
||
4090 | 1876: 3f 91 pop r19 |
||
4091 | 1878: 2f 91 pop r18 |
||
4092 | 187a: 0f 90 pop r0 |
||
4093 | 187c: 0f be out 0x3f, r0 ; 63 |
||
4094 | 187e: 0f 90 pop r0 |
||
4095 | 1880: 1f 90 pop r1 |
||
4096 | 1882: 18 95 reti |
||
4097 | |||
4098 | 00001884 <ADC_Init>: |
||
4099 | |||
4100 | // --------------------------------------------------------------------------------------- |
||
4101 | void ADC_Init(void) |
||
4102 | { |
||
4103 | ADMUX = 0; |
||
4104 | 1884: 17 b8 out 0x07, r1 ; 7 |
||
4105 | ADCSRA = 0x86; |
||
4106 | 1886: 86 e8 ldi r24, 0x86 ; 134 |
||
4107 | 1888: 86 b9 out 0x06, r24 ; 6 |
||
4108 | 188a: 08 95 ret |
||
4109 | |||
4110 | 0000188c <ReadADC>: |
||
4111 | } |
||
4112 | |||
4113 | // --------------------------------------------------------------------------------------- |
||
4114 | unsigned int ReadADC(unsigned char adc_input) |
||
4115 | { |
||
4116 | ADMUX = adc_input; |
||
4117 | 188c: 87 b9 out 0x07, r24 ; 7 |
||
4118 | ADCSRA |= 0x40; |
||
4119 | 188e: 36 9a sbi 0x06, 6 ; 6 |
||
4120 | //Delay_ms(10); |
||
4121 | while ((ADCSRA & 0x10) == 0); |
||
4122 | 1890: 34 9b sbis 0x06, 4 ; 6 |
||
4123 | 1892: fe cf rjmp .-4 ; 0x1890 <ReadADC+0x4> |
||
4124 | ADCSRA |= 0x10; |
||
4125 | 1894: 34 9a sbi 0x06, 4 ; 6 |
||
4126 | return ADCW; // read ad and calc. temp. |
||
4127 | 1896: 84 b1 in r24, 0x04 ; 4 |
||
4128 | 1898: 95 b1 in r25, 0x05 ; 5 |
||
4129 | 189a: 08 95 ret |
||
4130 | |||
4131 | 0000189c <GetAnalogWerte>: |
||
4132 | } |
||
4133 | |||
4134 | void GetAnalogWerte(void) |
||
4135 | { |
||
4136 | AnalogWerte[0] = ReadADC(0); |
||
4137 | 189c: 80 e0 ldi r24, 0x00 ; 0 |
||
4138 | 189e: 0e 94 46 0c call 0x188c <ReadADC> |
||
4139 | 18a2: 90 93 cb 01 sts 0x01CB, r25 |
||
4140 | 18a6: 80 93 ca 01 sts 0x01CA, r24 |
||
4141 | AnalogWerte[1] = ReadADC(1); |
||
4142 | 18aa: 81 e0 ldi r24, 0x01 ; 1 |
||
4143 | 18ac: 0e 94 46 0c call 0x188c <ReadADC> |
||
4144 | 18b0: 90 93 cd 01 sts 0x01CD, r25 |
||
4145 | 18b4: 80 93 cc 01 sts 0x01CC, r24 |
||
4146 | AnalogWerte[2] = ReadADC(2); |
||
4147 | 18b8: 82 e0 ldi r24, 0x02 ; 2 |
||
4148 | 18ba: 0e 94 46 0c call 0x188c <ReadADC> |
||
4149 | 18be: 90 93 cf 01 sts 0x01CF, r25 |
||
4150 | 18c2: 80 93 ce 01 sts 0x01CE, r24 |
||
4151 | 18c6: 08 95 ret |
||
4152 | |||
4153 | 000018c8 <memchr>: |
||
4154 | 18c8: fc 01 movw r30, r24 |
||
4155 | 18ca: 41 50 subi r20, 0x01 ; 1 |
||
4156 | 18cc: 50 40 sbci r21, 0x00 ; 0 |
||
4157 | 18ce: 30 f0 brcs .+12 ; 0x18dc <memchr+0x14> |
||
4158 | 18d0: 01 90 ld r0, Z+ |
||
4159 | 18d2: 06 16 cp r0, r22 |
||
4160 | 18d4: d1 f7 brne .-12 ; 0x18ca <memchr+0x2> |
||
4161 | 18d6: 31 97 sbiw r30, 0x01 ; 1 |
||
4162 | 18d8: cf 01 movw r24, r30 |
||
4163 | 18da: 08 95 ret |
||
4164 | 18dc: 88 27 eor r24, r24 |
||
4165 | 18de: 99 27 eor r25, r25 |
||
4166 | 18e0: 08 95 ret |
||
4167 | |||
4168 | 000018e2 <fdevopen>: |
||
4169 | 18e2: 0f 93 push r16 |
||
4170 | 18e4: 1f 93 push r17 |
||
4171 | 18e6: cf 93 push r28 |
||
4172 | 18e8: df 93 push r29 |
||
4173 | 18ea: 8c 01 movw r16, r24 |
||
4174 | 18ec: eb 01 movw r28, r22 |
||
4175 | 18ee: 00 97 sbiw r24, 0x00 ; 0 |
||
4176 | 18f0: 11 f4 brne .+4 ; 0x18f6 <fdevopen+0x14> |
||
4177 | 18f2: 67 2b or r22, r23 |
||
4178 | 18f4: c1 f1 breq .+112 ; 0x1966 <fdevopen+0x84> |
||
4179 | 18f6: 6e e0 ldi r22, 0x0E ; 14 |
||
4180 | 18f8: 70 e0 ldi r23, 0x00 ; 0 |
||
4181 | 18fa: 81 e0 ldi r24, 0x01 ; 1 |
||
4182 | 18fc: 90 e0 ldi r25, 0x00 ; 0 |
||
4183 | 18fe: 0e 94 b8 0c call 0x1970 <calloc> |
||
4184 | 1902: fc 01 movw r30, r24 |
||
4185 | 1904: 89 2b or r24, r25 |
||
4186 | 1906: 71 f1 breq .+92 ; 0x1964 <fdevopen+0x82> |
||
4187 | 1908: 80 e8 ldi r24, 0x80 ; 128 |
||
4188 | 190a: 83 83 std Z+3, r24 ; 0x03 |
||
4189 | 190c: 20 97 sbiw r28, 0x00 ; 0 |
||
4190 | 190e: 71 f0 breq .+28 ; 0x192c <fdevopen+0x4a> |
||
4191 | 1910: d3 87 std Z+11, r29 ; 0x0b |
||
4192 | 1912: c2 87 std Z+10, r28 ; 0x0a |
||
4193 | 1914: 81 e8 ldi r24, 0x81 ; 129 |
||
4194 | 1916: 83 83 std Z+3, r24 ; 0x03 |
||
4195 | 1918: 80 91 d0 01 lds r24, 0x01D0 |
||
4196 | 191c: 90 91 d1 01 lds r25, 0x01D1 |
||
4197 | 1920: 89 2b or r24, r25 |
||
4198 | 1922: 21 f4 brne .+8 ; 0x192c <fdevopen+0x4a> |
||
4199 | 1924: f0 93 d1 01 sts 0x01D1, r31 |
||
4200 | 1928: e0 93 d0 01 sts 0x01D0, r30 |
||
4201 | 192c: 01 15 cp r16, r1 |
||
4202 | 192e: 11 05 cpc r17, r1 |
||
4203 | 1930: c9 f0 breq .+50 ; 0x1964 <fdevopen+0x82> |
||
4204 | 1932: 11 87 std Z+9, r17 ; 0x09 |
||
4205 | 1934: 00 87 std Z+8, r16 ; 0x08 |
||
4206 | 1936: 83 81 ldd r24, Z+3 ; 0x03 |
||
4207 | 1938: 82 60 ori r24, 0x02 ; 2 |
||
4208 | 193a: 83 83 std Z+3, r24 ; 0x03 |
||
4209 | 193c: 80 91 d2 01 lds r24, 0x01D2 |
||
4210 | 1940: 90 91 d3 01 lds r25, 0x01D3 |
||
4211 | 1944: 89 2b or r24, r25 |
||
4212 | 1946: 71 f4 brne .+28 ; 0x1964 <fdevopen+0x82> |
||
4213 | 1948: f0 93 d3 01 sts 0x01D3, r31 |
||
4214 | 194c: e0 93 d2 01 sts 0x01D2, r30 |
||
4215 | 1950: 80 91 d4 01 lds r24, 0x01D4 |
||
4216 | 1954: 90 91 d5 01 lds r25, 0x01D5 |
||
4217 | 1958: 89 2b or r24, r25 |
||
4218 | 195a: 21 f4 brne .+8 ; 0x1964 <fdevopen+0x82> |
||
4219 | 195c: f0 93 d5 01 sts 0x01D5, r31 |
||
4220 | 1960: e0 93 d4 01 sts 0x01D4, r30 |
||
4221 | 1964: cf 01 movw r24, r30 |
||
4222 | 1966: df 91 pop r29 |
||
4223 | 1968: cf 91 pop r28 |
||
4224 | 196a: 1f 91 pop r17 |
||
4225 | 196c: 0f 91 pop r16 |
||
4226 | 196e: 08 95 ret |
||
4227 | |||
4228 | 00001970 <calloc>: |
||
4229 | 1970: 0f 93 push r16 |
||
4230 | 1972: 1f 93 push r17 |
||
4231 | 1974: cf 93 push r28 |
||
4232 | 1976: df 93 push r29 |
||
4233 | 1978: 86 9f mul r24, r22 |
||
4234 | 197a: 80 01 movw r16, r0 |
||
4235 | 197c: 87 9f mul r24, r23 |
||
4236 | 197e: 10 0d add r17, r0 |
||
4237 | 1980: 96 9f mul r25, r22 |
||
4238 | 1982: 10 0d add r17, r0 |
||
4239 | 1984: 11 24 eor r1, r1 |
||
4240 | 1986: c8 01 movw r24, r16 |
||
4241 | 1988: 0e 94 d4 0c call 0x19a8 <malloc> |
||
4242 | 198c: ec 01 movw r28, r24 |
||
4243 | 198e: 00 97 sbiw r24, 0x00 ; 0 |
||
4244 | 1990: 29 f0 breq .+10 ; 0x199c <calloc+0x2c> |
||
4245 | 1992: a8 01 movw r20, r16 |
||
4246 | 1994: 60 e0 ldi r22, 0x00 ; 0 |
||
4247 | 1996: 70 e0 ldi r23, 0x00 ; 0 |
||
4248 | 1998: 0e 94 ca 0d call 0x1b94 <memset> |
||
4249 | 199c: ce 01 movw r24, r28 |
||
4250 | 199e: df 91 pop r29 |
||
4251 | 19a0: cf 91 pop r28 |
||
4252 | 19a2: 1f 91 pop r17 |
||
4253 | 19a4: 0f 91 pop r16 |
||
4254 | 19a6: 08 95 ret |
||
4255 | |||
4256 | 000019a8 <malloc>: |
||
4257 | 19a8: cf 93 push r28 |
||
4258 | 19aa: df 93 push r29 |
||
4259 | 19ac: ac 01 movw r20, r24 |
||
4260 | 19ae: 02 97 sbiw r24, 0x02 ; 2 |
||
4261 | 19b0: 10 f4 brcc .+4 ; 0x19b6 <malloc+0xe> |
||
4262 | 19b2: 42 e0 ldi r20, 0x02 ; 2 |
||
4263 | 19b4: 50 e0 ldi r21, 0x00 ; 0 |
||
4264 | 19b6: 20 e0 ldi r18, 0x00 ; 0 |
||
4265 | 19b8: 30 e0 ldi r19, 0x00 ; 0 |
||
4266 | 19ba: a0 91 d8 01 lds r26, 0x01D8 |
||
4267 | 19be: b0 91 d9 01 lds r27, 0x01D9 |
||
4268 | 19c2: bd 01 movw r22, r26 |
||
4269 | 19c4: f9 01 movw r30, r18 |
||
4270 | 19c6: 10 97 sbiw r26, 0x00 ; 0 |
||
4271 | 19c8: 09 f4 brne .+2 ; 0x19cc <malloc+0x24> |
||
4272 | 19ca: 4c c0 rjmp .+152 ; 0x1a64 <malloc+0xbc> |
||
4273 | 19cc: 8d 91 ld r24, X+ |
||
4274 | 19ce: 9c 91 ld r25, X |
||
4275 | 19d0: 11 97 sbiw r26, 0x01 ; 1 |
||
4276 | 19d2: 84 17 cp r24, r20 |
||
4277 | 19d4: 95 07 cpc r25, r21 |
||
4278 | 19d6: 31 f1 breq .+76 ; 0x1a24 <malloc+0x7c> |
||
4279 | 19d8: 48 17 cp r20, r24 |
||
4280 | 19da: 59 07 cpc r21, r25 |
||
4281 | 19dc: 38 f4 brcc .+14 ; 0x19ec <malloc+0x44> |
||
4282 | 19de: 21 15 cp r18, r1 |
||
4283 | 19e0: 31 05 cpc r19, r1 |
||
4284 | 19e2: 19 f0 breq .+6 ; 0x19ea <malloc+0x42> |
||
4285 | 19e4: 82 17 cp r24, r18 |
||
4286 | 19e6: 93 07 cpc r25, r19 |
||
4287 | 19e8: 08 f4 brcc .+2 ; 0x19ec <malloc+0x44> |
||
4288 | 19ea: 9c 01 movw r18, r24 |
||
4289 | 19ec: fd 01 movw r30, r26 |
||
4290 | 19ee: a2 81 ldd r26, Z+2 ; 0x02 |
||
4291 | 19f0: b3 81 ldd r27, Z+3 ; 0x03 |
||
4292 | 19f2: 10 97 sbiw r26, 0x00 ; 0 |
||
4293 | 19f4: 59 f7 brne .-42 ; 0x19cc <malloc+0x24> |
||
4294 | 19f6: 21 15 cp r18, r1 |
||
4295 | 19f8: 31 05 cpc r19, r1 |
||
4296 | 19fa: a1 f1 breq .+104 ; 0x1a64 <malloc+0xbc> |
||
4297 | 19fc: c9 01 movw r24, r18 |
||
4298 | 19fe: 84 1b sub r24, r20 |
||
4299 | 1a00: 95 0b sbc r25, r21 |
||
4300 | 1a02: 04 97 sbiw r24, 0x04 ; 4 |
||
4301 | 1a04: 08 f4 brcc .+2 ; 0x1a08 <malloc+0x60> |
||
4302 | 1a06: a9 01 movw r20, r18 |
||
4303 | 1a08: db 01 movw r26, r22 |
||
4304 | 1a0a: e0 e0 ldi r30, 0x00 ; 0 |
||
4305 | 1a0c: f0 e0 ldi r31, 0x00 ; 0 |
||
4306 | 1a0e: 10 97 sbiw r26, 0x00 ; 0 |
||
4307 | 1a10: 49 f1 breq .+82 ; 0x1a64 <malloc+0xbc> |
||
4308 | 1a12: 8d 91 ld r24, X+ |
||
4309 | 1a14: 9c 91 ld r25, X |
||
4310 | 1a16: 11 97 sbiw r26, 0x01 ; 1 |
||
4311 | 1a18: 82 17 cp r24, r18 |
||
4312 | 1a1a: 93 07 cpc r25, r19 |
||
4313 | 1a1c: f9 f4 brne .+62 ; 0x1a5c <malloc+0xb4> |
||
4314 | 1a1e: 42 17 cp r20, r18 |
||
4315 | 1a20: 53 07 cpc r21, r19 |
||
4316 | 1a22: 79 f4 brne .+30 ; 0x1a42 <malloc+0x9a> |
||
4317 | 1a24: ed 01 movw r28, r26 |
||
4318 | 1a26: 8a 81 ldd r24, Y+2 ; 0x02 |
||
4319 | 1a28: 9b 81 ldd r25, Y+3 ; 0x03 |
||
4320 | 1a2a: 30 97 sbiw r30, 0x00 ; 0 |
||
4321 | 1a2c: 19 f0 breq .+6 ; 0x1a34 <malloc+0x8c> |
||
4322 | 1a2e: 93 83 std Z+3, r25 ; 0x03 |
||
4323 | 1a30: 82 83 std Z+2, r24 ; 0x02 |
||
4324 | 1a32: 04 c0 rjmp .+8 ; 0x1a3c <malloc+0x94> |
||
4325 | 1a34: 90 93 d9 01 sts 0x01D9, r25 |
||
4326 | 1a38: 80 93 d8 01 sts 0x01D8, r24 |
||
4327 | 1a3c: cd 01 movw r24, r26 |
||
4328 | 1a3e: 02 96 adiw r24, 0x02 ; 2 |
||
4329 | 1a40: 4a c0 rjmp .+148 ; 0x1ad6 <malloc+0x12e> |
||
4330 | 1a42: 24 1b sub r18, r20 |
||
4331 | 1a44: 35 0b sbc r19, r21 |
||
4332 | 1a46: fd 01 movw r30, r26 |
||
4333 | 1a48: e2 0f add r30, r18 |
||
4334 | 1a4a: f3 1f adc r31, r19 |
||
4335 | 1a4c: 41 93 st Z+, r20 |
||
4336 | 1a4e: 51 93 st Z+, r21 |
||
4337 | 1a50: 22 50 subi r18, 0x02 ; 2 |
||
4338 | 1a52: 30 40 sbci r19, 0x00 ; 0 |
||
4339 | 1a54: 2d 93 st X+, r18 |
||
4340 | 1a56: 3c 93 st X, r19 |
||
4341 | 1a58: cf 01 movw r24, r30 |
||
4342 | 1a5a: 3d c0 rjmp .+122 ; 0x1ad6 <malloc+0x12e> |
||
4343 | 1a5c: fd 01 movw r30, r26 |
||
4344 | 1a5e: a2 81 ldd r26, Z+2 ; 0x02 |
||
4345 | 1a60: b3 81 ldd r27, Z+3 ; 0x03 |
||
4346 | 1a62: d5 cf rjmp .-86 ; 0x1a0e <malloc+0x66> |
||
4347 | 1a64: 80 91 d6 01 lds r24, 0x01D6 |
||
4348 | 1a68: 90 91 d7 01 lds r25, 0x01D7 |
||
4349 | 1a6c: 89 2b or r24, r25 |
||
4350 | 1a6e: 41 f4 brne .+16 ; 0x1a80 <malloc+0xd8> |
||
4351 | 1a70: 80 91 80 00 lds r24, 0x0080 |
||
4352 | 1a74: 90 91 81 00 lds r25, 0x0081 |
||
4353 | 1a78: 90 93 d7 01 sts 0x01D7, r25 |
||
4354 | 1a7c: 80 93 d6 01 sts 0x01D6, r24 |
||
4355 | 1a80: e0 91 7e 00 lds r30, 0x007E |
||
4356 | 1a84: f0 91 7f 00 lds r31, 0x007F |
||
4357 | 1a88: 30 97 sbiw r30, 0x00 ; 0 |
||
4358 | 1a8a: 41 f4 brne .+16 ; 0x1a9c <malloc+0xf4> |
||
4359 | 1a8c: ed b7 in r30, 0x3d ; 61 |
||
4360 | 1a8e: fe b7 in r31, 0x3e ; 62 |
||
4361 | 1a90: 80 91 82 00 lds r24, 0x0082 |
||
4362 | 1a94: 90 91 83 00 lds r25, 0x0083 |
||
4363 | 1a98: e8 1b sub r30, r24 |
||
4364 | 1a9a: f9 0b sbc r31, r25 |
||
4365 | 1a9c: a0 91 d6 01 lds r26, 0x01D6 |
||
4366 | 1aa0: b0 91 d7 01 lds r27, 0x01D7 |
||
4367 | 1aa4: 9f 01 movw r18, r30 |
||
4368 | 1aa6: 2a 1b sub r18, r26 |
||
4369 | 1aa8: 3b 0b sbc r19, r27 |
||
4370 | 1aaa: 24 17 cp r18, r20 |
||
4371 | 1aac: 35 07 cpc r19, r21 |
||
4372 | 1aae: 88 f0 brcs .+34 ; 0x1ad2 <malloc+0x12a> |
||
4373 | 1ab0: ca 01 movw r24, r20 |
||
4374 | 1ab2: 02 96 adiw r24, 0x02 ; 2 |
||
4375 | 1ab4: 28 17 cp r18, r24 |
||
4376 | 1ab6: 39 07 cpc r19, r25 |
||
4377 | 1ab8: 60 f0 brcs .+24 ; 0x1ad2 <malloc+0x12a> |
||
4378 | 1aba: cd 01 movw r24, r26 |
||
4379 | 1abc: 84 0f add r24, r20 |
||
4380 | 1abe: 95 1f adc r25, r21 |
||
4381 | 1ac0: 02 96 adiw r24, 0x02 ; 2 |
||
4382 | 1ac2: 90 93 d7 01 sts 0x01D7, r25 |
||
4383 | 1ac6: 80 93 d6 01 sts 0x01D6, r24 |
||
4384 | 1aca: 4d 93 st X+, r20 |
||
4385 | 1acc: 5d 93 st X+, r21 |
||
4386 | 1ace: cd 01 movw r24, r26 |
||
4387 | 1ad0: 02 c0 rjmp .+4 ; 0x1ad6 <malloc+0x12e> |
||
4388 | 1ad2: 80 e0 ldi r24, 0x00 ; 0 |
||
4389 | 1ad4: 90 e0 ldi r25, 0x00 ; 0 |
||
4390 | 1ad6: df 91 pop r29 |
||
4391 | 1ad8: cf 91 pop r28 |
||
4392 | 1ada: 08 95 ret |
||
4393 | |||
4394 | 00001adc <free>: |
||
4395 | 1adc: cf 93 push r28 |
||
4396 | 1ade: df 93 push r29 |
||
4397 | 1ae0: 00 97 sbiw r24, 0x00 ; 0 |
||
4398 | 1ae2: 09 f4 brne .+2 ; 0x1ae6 <free+0xa> |
||
4399 | 1ae4: 54 c0 rjmp .+168 ; 0x1b8e <free+0xb2> |
||
4400 | 1ae6: dc 01 movw r26, r24 |
||
4401 | 1ae8: 12 97 sbiw r26, 0x02 ; 2 |
||
4402 | 1aea: ed 01 movw r28, r26 |
||
4403 | 1aec: 1b 82 std Y+3, r1 ; 0x03 |
||
4404 | 1aee: 1a 82 std Y+2, r1 ; 0x02 |
||
4405 | 1af0: 80 91 d8 01 lds r24, 0x01D8 |
||
4406 | 1af4: 90 91 d9 01 lds r25, 0x01D9 |
||
4407 | 1af8: 00 97 sbiw r24, 0x00 ; 0 |
||
4408 | 1afa: 21 f1 breq .+72 ; 0x1b44 <free+0x68> |
||
4409 | 1afc: fc 01 movw r30, r24 |
||
4410 | 1afe: 40 e0 ldi r20, 0x00 ; 0 |
||
4411 | 1b00: 50 e0 ldi r21, 0x00 ; 0 |
||
4412 | 1b02: ea 17 cp r30, r26 |
||
4413 | 1b04: fb 07 cpc r31, r27 |
||
4414 | 1b06: 18 f1 brcs .+70 ; 0x1b4e <free+0x72> |
||
4415 | 1b08: ed 01 movw r28, r26 |
||
4416 | 1b0a: fb 83 std Y+3, r31 ; 0x03 |
||
4417 | 1b0c: ea 83 std Y+2, r30 ; 0x02 |
||
4418 | 1b0e: 2d 91 ld r18, X+ |
||
4419 | 1b10: 3c 91 ld r19, X |
||
4420 | 1b12: 11 97 sbiw r26, 0x01 ; 1 |
||
4421 | 1b14: c2 0f add r28, r18 |
||
4422 | 1b16: d3 1f adc r29, r19 |
||
4423 | 1b18: ce 01 movw r24, r28 |
||
4424 | 1b1a: 02 96 adiw r24, 0x02 ; 2 |
||
4425 | 1b1c: 8e 17 cp r24, r30 |
||
4426 | 1b1e: 9f 07 cpc r25, r31 |
||
4427 | 1b20: 71 f4 brne .+28 ; 0x1b3e <free+0x62> |
||
4428 | 1b22: 8a 81 ldd r24, Y+2 ; 0x02 |
||
4429 | 1b24: 9b 81 ldd r25, Y+3 ; 0x03 |
||
4430 | 1b26: 28 0f add r18, r24 |
||
4431 | 1b28: 39 1f adc r19, r25 |
||
4432 | 1b2a: 2e 5f subi r18, 0xFE ; 254 |
||
4433 | 1b2c: 3f 4f sbci r19, 0xFF ; 255 |
||
4434 | 1b2e: 11 96 adiw r26, 0x01 ; 1 |
||
4435 | 1b30: 3c 93 st X, r19 |
||
4436 | 1b32: 2e 93 st -X, r18 |
||
4437 | 1b34: 82 81 ldd r24, Z+2 ; 0x02 |
||
4438 | 1b36: 93 81 ldd r25, Z+3 ; 0x03 |
||
4439 | 1b38: fd 01 movw r30, r26 |
||
4440 | 1b3a: 93 83 std Z+3, r25 ; 0x03 |
||
4441 | 1b3c: 82 83 std Z+2, r24 ; 0x02 |
||
4442 | 1b3e: 41 15 cp r20, r1 |
||
4443 | 1b40: 51 05 cpc r21, r1 |
||
4444 | 1b42: 59 f4 brne .+22 ; 0x1b5a <free+0x7e> |
||
4445 | 1b44: b0 93 d9 01 sts 0x01D9, r27 |
||
4446 | 1b48: a0 93 d8 01 sts 0x01D8, r26 |
||
4447 | 1b4c: 20 c0 rjmp .+64 ; 0x1b8e <free+0xb2> |
||
4448 | 1b4e: af 01 movw r20, r30 |
||
4449 | 1b50: 02 80 ldd r0, Z+2 ; 0x02 |
||
4450 | 1b52: f3 81 ldd r31, Z+3 ; 0x03 |
||
4451 | 1b54: e0 2d mov r30, r0 |
||
4452 | 1b56: 30 97 sbiw r30, 0x00 ; 0 |
||
4453 | 1b58: a1 f6 brne .-88 ; 0x1b02 <free+0x26> |
||
4454 | 1b5a: ea 01 movw r28, r20 |
||
4455 | 1b5c: bb 83 std Y+3, r27 ; 0x03 |
||
4456 | 1b5e: aa 83 std Y+2, r26 ; 0x02 |
||
4457 | 1b60: ca 01 movw r24, r20 |
||
4458 | 1b62: 02 96 adiw r24, 0x02 ; 2 |
||
4459 | 1b64: 28 81 ld r18, Y |
||
4460 | 1b66: 39 81 ldd r19, Y+1 ; 0x01 |
||
4461 | 1b68: 82 0f add r24, r18 |
||
4462 | 1b6a: 93 1f adc r25, r19 |
||
4463 | 1b6c: 8a 17 cp r24, r26 |
||
4464 | 1b6e: 9b 07 cpc r25, r27 |
||
4465 | 1b70: 71 f4 brne .+28 ; 0x1b8e <free+0xb2> |
||
4466 | 1b72: 8d 91 ld r24, X+ |
||
4467 | 1b74: 9c 91 ld r25, X |
||
4468 | 1b76: 11 97 sbiw r26, 0x01 ; 1 |
||
4469 | 1b78: 28 0f add r18, r24 |
||
4470 | 1b7a: 39 1f adc r19, r25 |
||
4471 | 1b7c: 2e 5f subi r18, 0xFE ; 254 |
||
4472 | 1b7e: 3f 4f sbci r19, 0xFF ; 255 |
||
4473 | 1b80: 39 83 std Y+1, r19 ; 0x01 |
||
4474 | 1b82: 28 83 st Y, r18 |
||
4475 | 1b84: fd 01 movw r30, r26 |
||
4476 | 1b86: 82 81 ldd r24, Z+2 ; 0x02 |
||
4477 | 1b88: 93 81 ldd r25, Z+3 ; 0x03 |
||
4478 | 1b8a: 9b 83 std Y+3, r25 ; 0x03 |
||
4479 | 1b8c: 8a 83 std Y+2, r24 ; 0x02 |
||
4480 | 1b8e: df 91 pop r29 |
||
4481 | 1b90: cf 91 pop r28 |
||
4482 | 1b92: 08 95 ret |
||
4483 | |||
4484 | 00001b94 <memset>: |
||
4485 | 1b94: dc 01 movw r26, r24 |
||
4486 | 1b96: 40 ff sbrs r20, 0 |
||
4487 | 1b98: 03 c0 rjmp .+6 ; 0x1ba0 <memset+0xc> |
||
4488 | 1b9a: 01 c0 rjmp .+2 ; 0x1b9e <memset+0xa> |
||
4489 | 1b9c: 6d 93 st X+, r22 |
||
4490 | 1b9e: 6d 93 st X+, r22 |
||
4491 | 1ba0: 42 50 subi r20, 0x02 ; 2 |
||
4492 | 1ba2: 50 40 sbci r21, 0x00 ; 0 |
||
4493 | 1ba4: d8 f7 brcc .-10 ; 0x1b9c <memset+0x8> |
||
4494 | 1ba6: 08 95 ret |
||
4495 | |||
4496 | 00001ba8 <__udivmodsi4>: |
||
4497 | 1ba8: a1 e2 ldi r26, 0x21 ; 33 |
||
4498 | 1baa: 1a 2e mov r1, r26 |
||
4499 | 1bac: aa 1b sub r26, r26 |
||
4500 | 1bae: bb 1b sub r27, r27 |
||
4501 | 1bb0: fd 01 movw r30, r26 |
||
4502 | 1bb2: 0d c0 rjmp .+26 ; 0x1bce <__udivmodsi4_ep> |
||
4503 | |||
4504 | 00001bb4 <__udivmodsi4_loop>: |
||
4505 | 1bb4: aa 1f adc r26, r26 |
||
4506 | 1bb6: bb 1f adc r27, r27 |
||
4507 | 1bb8: ee 1f adc r30, r30 |
||
4508 | 1bba: ff 1f adc r31, r31 |
||
4509 | 1bbc: a2 17 cp r26, r18 |
||
4510 | 1bbe: b3 07 cpc r27, r19 |
||
4511 | 1bc0: e4 07 cpc r30, r20 |
||
4512 | 1bc2: f5 07 cpc r31, r21 |
||
4513 | 1bc4: 20 f0 brcs .+8 ; 0x1bce <__udivmodsi4_ep> |
||
4514 | 1bc6: a2 1b sub r26, r18 |
||
4515 | 1bc8: b3 0b sbc r27, r19 |
||
4516 | 1bca: e4 0b sbc r30, r20 |
||
4517 | 1bcc: f5 0b sbc r31, r21 |
||
4518 | |||
4519 | 00001bce <__udivmodsi4_ep>: |
||
4520 | 1bce: 66 1f adc r22, r22 |
||
4521 | 1bd0: 77 1f adc r23, r23 |
||
4522 | 1bd2: 88 1f adc r24, r24 |
||
4523 | 1bd4: 99 1f adc r25, r25 |
||
4524 | 1bd6: 1a 94 dec r1 |
||
4525 | 1bd8: 69 f7 brne .-38 ; 0x1bb4 <__udivmodsi4_loop> |
||
4526 | 1bda: 60 95 com r22 |
||
4527 | 1bdc: 70 95 com r23 |
||
4528 | 1bde: 80 95 com r24 |
||
4529 | 1be0: 90 95 com r25 |
||
4530 | 1be2: 9b 01 movw r18, r22 |
||
4531 | 1be4: ac 01 movw r20, r24 |
||
4532 | 1be6: bd 01 movw r22, r26 |
||
4533 | 1be8: cf 01 movw r24, r30 |
||
4534 | 1bea: 08 95 ret |