datalog.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .data 0000008a 00800100 000019ac 00001a40 2**0 CONTENTS, ALLOC, LOAD, DATA 1 .text 000019ac 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .bss 00000081 0080018a 0080018a 00001aca 2**0 ALLOC 3 .stab 00002a6c 00000000 00000000 00001acc 2**2 CONTENTS, READONLY, DEBUGGING 4 .stabstr 00000471 00000000 00000000 00004538 2**0 CONTENTS, READONLY, DEBUGGING 5 .debug_aranges 00000238 00000000 00000000 000049a9 2**0 CONTENTS, READONLY, DEBUGGING 6 .debug_pubnames 000003c6 00000000 00000000 00004be1 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_info 00001499 00000000 00000000 00004fa7 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_abbrev 00000969 00000000 00000000 00006440 2**0 CONTENTS, READONLY, DEBUGGING 9 .debug_line 0000149c 00000000 00000000 00006da9 2**0 CONTENTS, READONLY, DEBUGGING 10 .debug_frame 00000330 00000000 00000000 00008248 2**2 CONTENTS, READONLY, DEBUGGING 11 .debug_str 000004e3 00000000 00000000 00008578 2**0 CONTENTS, READONLY, DEBUGGING 12 .debug_loc 00000ab7 00000000 00000000 00008a5b 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_ranges 00000200 00000000 00000000 00009512 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: * * Purpose : Clear the LCD * *****************************************************************************/ void LCD_Clear(void) { 0: 63 c0 rjmp .+198 ; 0xc8 <__ctors_end> str[s] = '\0'; return s; } int sprintf(char * str, const char * format, ...) { 2: 00 00 nop 4: 7d c0 rjmp .+250 ; 0x100 <__bad_interrupt> 6: 00 00 nop 8: 7b c0 rjmp .+246 ; 0x100 <__bad_interrupt> a: 00 00 nop c: 79 c0 rjmp .+242 ; 0x100 <__bad_interrupt> e: 00 00 nop 10: 77 c0 rjmp .+238 ; 0x100 <__bad_interrupt> 12: 00 00 nop 14: 75 c0 rjmp .+234 ; 0x100 <__bad_interrupt> 16: 00 00 nop 18: 73 c0 rjmp .+230 ; 0x100 <__bad_interrupt> 1a: 00 00 nop 1c: 71 c0 rjmp .+226 ; 0x100 <__bad_interrupt> 1e: 00 00 nop 20: 6f c0 rjmp .+222 ; 0x100 <__bad_interrupt> 22: 00 00 nop 24: 6d c0 rjmp .+218 ; 0x100 <__bad_interrupt> 26: 00 00 nop 28: 0c 94 55 09 jmp 0x12aa ; 0x12aa <__vector_10> 2c: 69 c0 rjmp .+210 ; 0x100 <__bad_interrupt> 2e: 00 00 nop 30: 67 c0 rjmp .+206 ; 0x100 <__bad_interrupt> 32: 00 00 nop 34: 65 c0 rjmp .+202 ; 0x100 <__bad_interrupt> 36: 00 00 nop 38: 63 c0 rjmp .+198 ; 0x100 <__bad_interrupt> 3a: 00 00 nop 3c: 61 c0 rjmp .+194 ; 0x100 <__bad_interrupt> 3e: 00 00 nop 40: 5f c0 rjmp .+190 ; 0x100 <__bad_interrupt> 42: 00 00 nop 44: 5d c0 rjmp .+186 ; 0x100 <__bad_interrupt> 46: 00 00 nop 48: 5b c0 rjmp .+182 ; 0x100 <__bad_interrupt> 4a: 00 00 nop 4c: 59 c0 rjmp .+178 ; 0x100 <__bad_interrupt> 4e: 00 00 nop 50: 57 c0 rjmp .+174 ; 0x100 <__bad_interrupt> 52: 00 00 nop 54: 55 c0 rjmp .+170 ; 0x100 <__bad_interrupt> 56: 00 00 nop 58: b6 c4 rjmp .+2412 ; 0x9c6 <__vector_22> ... 0000005c : 5c: 51 0a 80 2a 00 00 00 0a 00 ff 00 00 59 55 18 01 Q..*........YU.. 6c: 11 1e 11 1b 50 0b 41 1b 41 1f 11 01 51 1f 51 1b ....P.A.A...Q.Q. ... 88: 00 00 51 0f 91 39 41 14 91 31 41 1e 41 0e 41 1d ..Q..9A..1A.A.A. 98: 50 0f 80 20 10 15 48 86 40 14 78 05 70 85 51 15 P.. ..H.@.x.p.Q. a8: 51 0e 51 95 51 8e 21 90 81 20 50 15 48 44 50 c5 Q.Q.Q.!.. P.HDP. b8: 28 c0 28 20 09 50 00 00 00 00 00 00 00 00 00 00 (.( .P.......... 000000c8 <__ctors_end>: c8: 11 24 eor r1, r1 ca: 1f be out 0x3f, r1 ; 63 cc: cf ef ldi r28, 0xFF ; 255 ce: d4 e0 ldi r29, 0x04 ; 4 d0: de bf out 0x3e, r29 ; 62 d2: cd bf out 0x3d, r28 ; 61 000000d4 <__do_copy_data>: d4: 11 e0 ldi r17, 0x01 ; 1 d6: a0 e0 ldi r26, 0x00 ; 0 d8: b1 e0 ldi r27, 0x01 ; 1 da: ec ea ldi r30, 0xAC ; 172 dc: f9 e1 ldi r31, 0x19 ; 25 de: 02 c0 rjmp .+4 ; 0xe4 <.do_copy_data_start> 000000e0 <.do_copy_data_loop>: e0: 05 90 lpm r0, Z+ e2: 0d 92 st X+, r0 000000e4 <.do_copy_data_start>: e4: aa 38 cpi r26, 0x8A ; 138 e6: b1 07 cpc r27, r17 e8: d9 f7 brne .-10 ; 0xe0 <.do_copy_data_loop> 000000ea <__do_clear_bss>: ea: 12 e0 ldi r17, 0x02 ; 2 ec: aa e8 ldi r26, 0x8A ; 138 ee: b1 e0 ldi r27, 0x01 ; 1 f0: 01 c0 rjmp .+2 ; 0xf4 <.do_clear_bss_start> 000000f2 <.do_clear_bss_loop>: f2: 1d 92 st X+, r1 000000f4 <.do_clear_bss_start>: f4: ab 30 cpi r26, 0x0B ; 11 f6: b1 07 cpc r27, r17 f8: e1 f7 brne .-8 ; 0xf2 <.do_clear_bss_loop> fa: 9d d0 rcall .+314 ; 0x236
fc: 0c 94 d4 0c jmp 0x19a8 ; 0x19a8 <_exit> 00000100 <__bad_interrupt>: 100: 7f cf rjmp .-258 ; 0x0 <__vectors> 00000102 : * * Purpose : Delay-loop * *****************************************************************************/ void Delay(unsigned int millisec) { 102: 06 c0 rjmp .+12 ; 0x110 // mt, int i did not work in the simulator: int i; uint8_t i; while (millisec--) { 104: 20 e0 ldi r18, 0x00 ; 0 for (i=0; i<125; i++) { asm volatile ("nop"::); 106: 00 00 nop { // mt, int i did not work in the simulator: int i; uint8_t i; while (millisec--) { for (i=0; i<125; i++) { 108: 2f 5f subi r18, 0xFF ; 255 10a: 2d 37 cpi r18, 0x7D ; 125 10c: e1 f7 brne .-8 ; 0x106 10e: 01 97 sbiw r24, 0x01 ; 1 void Delay(unsigned int millisec) { // mt, int i did not work in the simulator: int i; uint8_t i; while (millisec--) { 110: 00 97 sbiw r24, 0x00 ; 0 112: c1 f7 brne .-16 ; 0x104 for (i=0; i<125; i++) { asm volatile ("nop"::); } } } 114: 08 95 ret 00000116 : { unsigned char calibrate = FALSE; int temp; unsigned char tempL; CLKPR = (1< Delay(1000); // wait for external crystal to stabilise 15c: 88 ee ldi r24, 0xE8 ; 232 15e: 93 e0 ldi r25, 0x03 ; 3 160: d0 df rcall .-96 ; 0x102 while(!calibrate) { cli(); // mt __disable_interrupt(); // disable global interrupt TIFR1 = 0xFF; // delete TIFR1 flags 162: 3f ef ldi r19, 0xFF ; 255 if (temp > 6250) { OSCCAL--; // the internRC oscillator runs to fast, decrease the OSCCAL } else if (temp < 6120) 164: 41 e0 ldi r20, 0x01 ; 1 Delay(1000); // wait for external crystal to stabilise while(!calibrate) { cli(); // mt __disable_interrupt(); // disable global interrupt 166: f8 94 cli TIFR1 = 0xFF; // delete TIFR1 flags 168: 36 bb out 0x16, r19 ; 22 TIFR2 = 0xFF; // delete TIFR2 flags 16a: 37 bb out 0x17, r19 ; 23 TCNT1H = 0; // clear timer1 counter 16c: 10 92 85 00 sts 0x0085, r1 TCNT1L = 0; 170: 10 92 84 00 sts 0x0084, r1 TCNT2 = 0; // clear timer2 counter 174: 10 92 b2 00 sts 0x00B2, r1 // shc/mt while ( !(TIFR2 && (1< TCCR1B = 0; // stop timer1 17c: 10 92 81 00 sts 0x0081, r1 sei(); // __enable_interrupt(); // enable global interrupt 180: 78 94 sei // shc/mt if ( (TIFR1 && (1< { temp = 0xFFFF; // if timer1 overflows, set the temp to 0xFFFF } else { // read out the timer1 counter value tempL = TCNT1L; 186: 20 91 84 00 lds r18, 0x0084 temp = TCNT1H; 18a: 80 91 85 00 lds r24, 0x0085 18e: 90 e0 ldi r25, 0x00 ; 0 temp = (temp << 8); 190: 98 2f mov r25, r24 192: 88 27 eor r24, r24 temp += tempL; 194: 82 0f add r24, r18 196: 91 1d adc r25, r1 } if (temp > 6250) 198: 28 e1 ldi r18, 0x18 ; 24 19a: 8b 36 cpi r24, 0x6B ; 107 19c: 92 07 cpc r25, r18 19e: 24 f0 brlt .+8 ; 0x1a8 { OSCCAL--; // the internRC oscillator runs to fast, decrease the OSCCAL 1a0: 80 91 66 00 lds r24, 0x0066 1a4: 81 50 subi r24, 0x01 ; 1 1a6: 08 c0 rjmp .+16 ; 0x1b8 } else if (temp < 6120) 1a8: 88 5e subi r24, 0xE8 ; 232 1aa: 97 41 sbci r25, 0x17 ; 23 1ac: 14 f0 brlt .+4 ; 0x1b2 1ae: 81 e0 ldi r24, 0x01 ; 1 1b0: 06 c0 rjmp .+12 ; 0x1be { OSCCAL++; // the internRC oscillator runs to slow, increase the OSCCAL 1b2: 80 91 66 00 lds r24, 0x0066 1b6: 8f 5f subi r24, 0xFF ; 255 1b8: 80 93 66 00 sts 0x0066, r24 1bc: 80 e0 ldi r24, 0x00 ; 0 } else calibrate = TRUE; // the interRC is correct TCCR1B = (1< else calibrate = TRUE; // the interRC is correct TCCR1B = (1<: * Purpose : Initializate the different modules * *****************************************************************************/ void Initialization(void) { OSCCAL_calibration(); // calibrate the OSCCAL byte 1c8: a6 df rcall .-180 ; 0x116 CLKPR = (1< USART_Init(UART_4800); // Baud rate = 4800bps 1da: 8c e0 ldi r24, 0x0C ; 12 1dc: 90 e0 ldi r25, 0x00 ; 0 1de: 0e 94 7e 09 call 0x12fc ; 0x12fc LCD_Init(); // initialize the LCD 1e2: d7 d3 rcall .+1966 ; 0x992 //Disable JTAG to use ADC4-7 MCUCR |= ( 1 <: { // Program initalization Initialization(); 236: c8 df rcall .-112 ; 0x1c8 sei(); // mt __enable_interrupt(); 238: 78 94 sei LCD_puts("hello"); 23a: 80 e0 ldi r24, 0x00 ; 0 23c: 91 e0 ldi r25, 0x01 ; 1 23e: 73 d4 rcall .+2278 ; 0xb26 USART_printf("\r\n# hello\r\n"); 240: 00 d0 rcall .+0 ; 0x242 242: 86 e0 ldi r24, 0x06 ; 6 244: 91 e0 ldi r25, 0x01 ; 1 246: ed b7 in r30, 0x3d ; 61 248: fe b7 in r31, 0x3e ; 62 24a: 92 83 std Z+2, r25 ; 0x02 24c: 81 83 std Z+1, r24 ; 0x01 24e: 0e 94 a7 09 call 0x134e ; 0x134e Delay(1000); 252: 0f 90 pop r0 254: 0f 90 pop r0 256: 88 ee ldi r24, 0xE8 ; 232 258: 93 e0 ldi r25, 0x03 ; 3 25a: 53 df rcall .-346 ; 0x102 for (;;) { ParseCommand(); 25c: 6e d5 rcall .+2780 ; 0xd3a 25e: fe cf rjmp .-4 ; 0x25c 00000260 : * * Purpose : Do a Analog to Digital Conversion * *****************************************************************************/ float ADC_read(uint8 input) { 260: 2f 92 push r2 262: 3f 92 push r3 264: 4f 92 push r4 266: 5f 92 push r5 268: 6f 92 push r6 26a: 7f 92 push r7 26c: 8f 92 push r8 26e: 9f 92 push r9 270: af 92 push r10 272: bf 92 push r11 274: cf 92 push r12 276: df 92 push r13 278: ef 92 push r14 27a: ff 92 push r15 27c: 0f 93 push r16 27e: 1f 93 push r17 280: df 93 push r29 282: cf 93 push r28 284: 00 d0 rcall .+0 ; 0x286 286: 00 d0 rcall .+0 ; 0x288 288: 0f 92 push r0 28a: cd b7 in r28, 0x3d ; 61 28c: de b7 in r29, 0x3e ; 62 28e: 8b 83 std Y+3, r24 ; 0x03 ADMUX = input; 290: 80 93 7c 00 sts 0x007C, r24 if (input == 1) 294: 81 30 cpi r24, 0x01 ; 1 296: 51 f4 brne .+20 ; 0x2ac { ADMUX |= (1< while (SCK_OFF); 2a6: 2b 9b sbis 0x05, 3 ; 5 2a8: fe cf rjmp .-4 ; 0x2a6 2aa: 0a c0 rjmp .+20 ; 0x2c0 } else { ADMUX |= (1< for(i=0;i { ADCSRA |= (1< ADC_temp = ADCL; // read out ADCL register 314: 60 91 78 00 lds r22, 0x0078 318: 70 e0 ldi r23, 0x00 ; 0 31a: 80 e0 ldi r24, 0x00 ; 0 31c: 90 e0 ldi r25, 0x00 ; 0 31e: 0e 94 db 0a call 0x15b6 ; 0x15b6 <__floatunsisf> 322: 7b 01 movw r14, r22 324: 8c 01 movw r16, r24 ADC_temp += (ADCH << 8); // read out ADCH register 326: 60 91 79 00 lds r22, 0x0079 32a: 70 e0 ldi r23, 0x00 ; 0 32c: 76 2f mov r23, r22 32e: 66 27 eor r22, r22 330: 88 27 eor r24, r24 332: 77 fd sbrc r23, 7 334: 80 95 com r24 336: 98 2f mov r25, r24 338: 0e 94 dd 0a call 0x15ba ; 0x15ba <__floatsisf> 33c: 9b 01 movw r18, r22 33e: ac 01 movw r20, r24 340: c8 01 movw r24, r16 342: b7 01 movw r22, r14 344: 0e 94 da 09 call 0x13b4 ; 0x13b4 <__addsf3> 348: 7b 01 movw r14, r22 34a: 8c 01 movw r16, r24 delta = ADC_temp - mean; 34c: a2 01 movw r20, r4 34e: 91 01 movw r18, r2 350: 0e 94 d9 09 call 0x13b2 ; 0x13b2 <__subsf3> 354: 5b 01 movw r10, r22 356: 6c 01 movw r12, r24 mean = mean + delta/(i+1); 358: 8c 81 ldd r24, Y+4 ; 0x04 35a: 9d 81 ldd r25, Y+5 ; 0x05 35c: 01 96 adiw r24, 0x01 ; 1 35e: 9d 83 std Y+5, r25 ; 0x05 360: 8c 83 std Y+4, r24 ; 0x04 362: bc 01 movw r22, r24 364: 80 e0 ldi r24, 0x00 ; 0 366: 90 e0 ldi r25, 0x00 ; 0 368: 0e 94 db 0a call 0x15b6 ; 0x15b6 <__floatunsisf> 36c: 9b 01 movw r18, r22 36e: ac 01 movw r20, r24 370: c6 01 movw r24, r12 372: b5 01 movw r22, r10 374: 0e 94 42 0a call 0x1484 ; 0x1484 <__divsf3> 378: 9b 01 movw r18, r22 37a: ac 01 movw r20, r24 37c: c2 01 movw r24, r4 37e: b1 01 movw r22, r2 380: 0e 94 da 09 call 0x13b4 ; 0x13b4 <__addsf3> 384: 1b 01 movw r2, r22 386: 2c 01 movw r4, r24 M2 = M2 + delta*(ADC_temp - mean); 388: c8 01 movw r24, r16 38a: b7 01 movw r22, r14 38c: a2 01 movw r20, r4 38e: 91 01 movw r18, r2 390: 0e 94 d9 09 call 0x13b2 ; 0x13b2 <__subsf3> 394: 9b 01 movw r18, r22 396: ac 01 movw r20, r24 398: c6 01 movw r24, r12 39a: b5 01 movw r22, r10 39c: 0e 94 8d 0b call 0x171a ; 0x171a <__mulsf3> 3a0: 9b 01 movw r18, r22 3a2: ac 01 movw r20, r24 3a4: c4 01 movw r24, r8 3a6: b3 01 movw r22, r6 3a8: 0e 94 da 09 call 0x13b4 ; 0x13b4 <__addsf3> 3ac: 3b 01 movw r6, r22 3ae: 4c 01 movw r8, r24 //do a dummy readout first ADCSRA |= (1< 3be: a1 cf rjmp .-190 ; 0x302 } // ADCr = ADCr / setup.adc_averages; // average the samples ADCSRA &= ~(1< 3f6: 88 23 and r24, r24 3f8: 24 f4 brge .+8 ; 0x402 M2 = -M2; 3fa: 97 fa bst r9, 7 3fc: 90 94 com r9 3fe: 97 f8 bld r9, 7 400: 90 94 com r9 setup.adc_variance[input] = M2/setup.adc_averages; 402: 00 0f add r16, r16 404: 11 1f adc r17, r17 406: 00 0f add r16, r16 408: 11 1f adc r17, r17 40a: 02 57 subi r16, 0x72 ; 114 40c: 1e 4f sbci r17, 0xFE ; 254 40e: e9 81 ldd r30, Y+1 ; 0x01 410: fa 81 ldd r31, Y+2 ; 0x02 412: bf 01 movw r22, r30 414: 80 e0 ldi r24, 0x00 ; 0 416: 90 e0 ldi r25, 0x00 ; 0 418: 0e 94 db 0a call 0x15b6 ; 0x15b6 <__floatunsisf> 41c: 9b 01 movw r18, r22 41e: ac 01 movw r20, r24 420: c4 01 movw r24, r8 422: b3 01 movw r22, r6 424: 0e 94 42 0a call 0x1484 ; 0x1484 <__divsf3> 428: f8 01 movw r30, r16 42a: 66 a7 std Z+46, r22 ; 0x2e 42c: 77 a7 std Z+47, r23 ; 0x2f 42e: 80 ab std Z+48, r24 ; 0x30 430: 91 ab std Z+49, r25 ; 0x31 // return (setup.adc_values[input]); } 432: c2 01 movw r24, r4 434: b1 01 movw r22, r2 436: 0f 90 pop r0 438: 0f 90 pop r0 43a: 0f 90 pop r0 43c: 0f 90 pop r0 43e: 0f 90 pop r0 440: cf 91 pop r28 442: df 91 pop r29 444: 1f 91 pop r17 446: 0f 91 pop r16 448: ff 90 pop r15 44a: ef 90 pop r14 44c: df 90 pop r13 44e: cf 90 pop r12 450: bf 90 pop r11 452: af 90 pop r10 454: 9f 90 pop r9 456: 8f 90 pop r8 458: 7f 90 pop r7 45a: 6f 90 pop r6 45c: 5f 90 pop r5 45e: 4f 90 pop r4 460: 3f 90 pop r3 462: 2f 90 pop r2 464: 08 95 ret 00000466 : return 0; } uint8 reset(char * arg) { Initialization(); 466: b0 de rcall .-672 ; 0x1c8 return 0; } 468: 80 e0 ldi r24, 0x00 ; 0 46a: 08 95 ret 0000046c : LCD_printf("timeout %i", setup.poll_timeout); return 0; } uint8 set_delay(char * arg) { 46c: fc 01 movw r30, r24 if (arg[0] != '\0') 46e: 80 81 ld r24, Z 470: 88 23 and r24, r24 472: 39 f0 breq .+14 ; 0x482 { setup.poll_delay = atoi(arg); 474: cf 01 movw r24, r30 476: 0e 94 af 0c call 0x195e ; 0x195e 47a: 90 93 8f 01 sts 0x018F, r25 47e: 80 93 8e 01 sts 0x018E, r24 } USART_printf("# delay %i\r\n", setup.poll_delay); 482: 00 d0 rcall .+0 ; 0x484 484: 00 d0 rcall .+0 ; 0x486 486: 82 e1 ldi r24, 0x12 ; 18 488: 91 e0 ldi r25, 0x01 ; 1 48a: ed b7 in r30, 0x3d ; 61 48c: fe b7 in r31, 0x3e ; 62 48e: 92 83 std Z+2, r25 ; 0x02 490: 81 83 std Z+1, r24 ; 0x01 492: 80 91 8e 01 lds r24, 0x018E 496: 90 91 8f 01 lds r25, 0x018F 49a: 94 83 std Z+4, r25 ; 0x04 49c: 83 83 std Z+3, r24 ; 0x03 49e: 57 d7 rcall .+3758 ; 0x134e LCD_printf("delay %i", setup.poll_delay); 4a0: 8f e1 ldi r24, 0x1F ; 31 4a2: 91 e0 ldi r25, 0x01 ; 1 4a4: ed b7 in r30, 0x3d ; 61 4a6: fe b7 in r31, 0x3e ; 62 4a8: 92 83 std Z+2, r25 ; 0x02 4aa: 81 83 std Z+1, r24 ; 0x01 4ac: 80 91 8e 01 lds r24, 0x018E 4b0: 90 91 8f 01 lds r25, 0x018F 4b4: 94 83 std Z+4, r25 ; 0x04 4b6: 83 83 std Z+3, r24 ; 0x03 4b8: 16 d4 rcall .+2092 ; 0xce6 4ba: 0f 90 pop r0 4bc: 0f 90 pop r0 4be: 0f 90 pop r0 4c0: 0f 90 pop r0 return 0; } 4c2: 80 e0 ldi r24, 0x00 ; 0 4c4: 08 95 ret 000004c6 : LCD_printf("Avgs %i", setup.adc_averages); return 0; } uint8 set_timeout(char * arg) { 4c6: fc 01 movw r30, r24 if (arg[0] != '\0') 4c8: 80 81 ld r24, Z 4ca: 88 23 and r24, r24 4cc: 79 f0 breq .+30 ; 0x4ec { setup.poll_timeout = atoi(arg); 4ce: cf 01 movw r24, r30 4d0: 0e 94 af 0c call 0x195e ; 0x195e 4d4: aa 27 eor r26, r26 4d6: 97 fd sbrc r25, 7 4d8: a0 95 com r26 4da: ba 2f mov r27, r26 4dc: 80 93 92 01 sts 0x0192, r24 4e0: 90 93 93 01 sts 0x0193, r25 4e4: a0 93 94 01 sts 0x0194, r26 4e8: b0 93 95 01 sts 0x0195, r27 } USART_printf("# timeout %i\r\n", setup.poll_timeout); 4ec: 00 d0 rcall .+0 ; 0x4ee 4ee: 00 d0 rcall .+0 ; 0x4f0 4f0: 00 d0 rcall .+0 ; 0x4f2 4f2: 88 e2 ldi r24, 0x28 ; 40 4f4: 91 e0 ldi r25, 0x01 ; 1 4f6: ed b7 in r30, 0x3d ; 61 4f8: fe b7 in r31, 0x3e ; 62 4fa: 92 83 std Z+2, r25 ; 0x02 4fc: 81 83 std Z+1, r24 ; 0x01 4fe: 80 91 92 01 lds r24, 0x0192 502: 90 91 93 01 lds r25, 0x0193 506: a0 91 94 01 lds r26, 0x0194 50a: b0 91 95 01 lds r27, 0x0195 50e: 83 83 std Z+3, r24 ; 0x03 510: 94 83 std Z+4, r25 ; 0x04 512: a5 83 std Z+5, r26 ; 0x05 514: b6 83 std Z+6, r27 ; 0x06 516: 1b d7 rcall .+3638 ; 0x134e LCD_printf("timeout %i", setup.poll_timeout); 518: 87 e3 ldi r24, 0x37 ; 55 51a: 91 e0 ldi r25, 0x01 ; 1 51c: ed b7 in r30, 0x3d ; 61 51e: fe b7 in r31, 0x3e ; 62 520: 92 83 std Z+2, r25 ; 0x02 522: 81 83 std Z+1, r24 ; 0x01 524: 80 91 92 01 lds r24, 0x0192 528: 90 91 93 01 lds r25, 0x0193 52c: a0 91 94 01 lds r26, 0x0194 530: b0 91 95 01 lds r27, 0x0195 534: 83 83 std Z+3, r24 ; 0x03 536: 94 83 std Z+4, r25 ; 0x04 538: a5 83 std Z+5, r26 ; 0x05 53a: b6 83 std Z+6, r27 ; 0x06 53c: d4 d3 rcall .+1960 ; 0xce6 53e: 8d b7 in r24, 0x3d ; 61 540: 9e b7 in r25, 0x3e ; 62 542: 06 96 adiw r24, 0x06 ; 6 544: 0f b6 in r0, 0x3f ; 63 546: f8 94 cli 548: 9e bf out 0x3e, r25 ; 62 54a: 0f be out 0x3f, r0 ; 63 54c: 8d bf out 0x3d, r24 ; 61 return 0; } 54e: 80 e0 ldi r24, 0x00 ; 0 550: 08 95 ret 00000552 : LCD_printf("D %i", setup.dac_value); return 0; } uint8 set_averages(char * arg) { 552: fc 01 movw r30, r24 if (arg[0] != '\0') 554: 80 81 ld r24, Z 556: 88 23 and r24, r24 558: 39 f0 breq .+14 ; 0x568 { setup.adc_averages = atoi(arg); 55a: cf 01 movw r24, r30 55c: 0e 94 af 0c call 0x195e ; 0x195e 560: 90 93 91 01 sts 0x0191, r25 564: 80 93 90 01 sts 0x0190, r24 } USART_printf("# Avgs %i\r\n", setup.adc_averages); 568: 00 d0 rcall .+0 ; 0x56a 56a: 00 d0 rcall .+0 ; 0x56c 56c: 82 e4 ldi r24, 0x42 ; 66 56e: 91 e0 ldi r25, 0x01 ; 1 570: ed b7 in r30, 0x3d ; 61 572: fe b7 in r31, 0x3e ; 62 574: 92 83 std Z+2, r25 ; 0x02 576: 81 83 std Z+1, r24 ; 0x01 578: 80 91 90 01 lds r24, 0x0190 57c: 90 91 91 01 lds r25, 0x0191 580: 94 83 std Z+4, r25 ; 0x04 582: 83 83 std Z+3, r24 ; 0x03 584: e4 d6 rcall .+3528 ; 0x134e LCD_printf("Avgs %i", setup.adc_averages); 586: 8e e4 ldi r24, 0x4E ; 78 588: 91 e0 ldi r25, 0x01 ; 1 58a: ed b7 in r30, 0x3d ; 61 58c: fe b7 in r31, 0x3e ; 62 58e: 92 83 std Z+2, r25 ; 0x02 590: 81 83 std Z+1, r24 ; 0x01 592: 80 91 90 01 lds r24, 0x0190 596: 90 91 91 01 lds r25, 0x0191 59a: 94 83 std Z+4, r25 ; 0x04 59c: 83 83 std Z+3, r24 ; 0x03 59e: a3 d3 rcall .+1862 ; 0xce6 5a0: 0f 90 pop r0 5a2: 0f 90 pop r0 5a4: 0f 90 pop r0 5a6: 0f 90 pop r0 return 0; } 5a8: 80 e0 ldi r24, 0x00 ; 0 5aa: 08 95 ret 000005ac : LCD_Colon(0); return 0; } uint8 set_dac(char * arg) { 5ac: fc 01 movw r30, r24 if (arg[0] != '\0') 5ae: 80 81 ld r24, Z 5b0: 88 23 and r24, r24 5b2: 41 f0 breq .+16 ; 0x5c4 { setup.dac_value = atoi(arg); 5b4: cf 01 movw r24, r30 5b6: 0e 94 af 0c call 0x195e ; 0x195e 5ba: 90 93 9b 01 sts 0x019B, r25 5be: 80 93 9a 01 sts 0x019A, r24 DAC_Set(setup.dac_value); 5c2: 44 d1 rcall .+648 ; 0x84c } USART_printf("# DAC %i\r\n", setup.dac_value); 5c4: 00 d0 rcall .+0 ; 0x5c6 5c6: 00 d0 rcall .+0 ; 0x5c8 5c8: 86 e5 ldi r24, 0x56 ; 86 5ca: 91 e0 ldi r25, 0x01 ; 1 5cc: ed b7 in r30, 0x3d ; 61 5ce: fe b7 in r31, 0x3e ; 62 5d0: 92 83 std Z+2, r25 ; 0x02 5d2: 81 83 std Z+1, r24 ; 0x01 5d4: 80 91 9a 01 lds r24, 0x019A 5d8: 90 91 9b 01 lds r25, 0x019B 5dc: 94 83 std Z+4, r25 ; 0x04 5de: 83 83 std Z+3, r24 ; 0x03 5e0: b6 d6 rcall .+3436 ; 0x134e LCD_printf("D %i", setup.dac_value); 5e2: 81 e6 ldi r24, 0x61 ; 97 5e4: 91 e0 ldi r25, 0x01 ; 1 5e6: ed b7 in r30, 0x3d ; 61 5e8: fe b7 in r31, 0x3e ; 62 5ea: 92 83 std Z+2, r25 ; 0x02 5ec: 81 83 std Z+1, r24 ; 0x01 5ee: 80 91 9a 01 lds r24, 0x019A 5f2: 90 91 9b 01 lds r25, 0x019B 5f6: 94 83 std Z+4, r25 ; 0x04 5f8: 83 83 std Z+3, r24 ; 0x03 5fa: 75 d3 rcall .+1770 ; 0xce6 5fc: 0f 90 pop r0 5fe: 0f 90 pop r0 600: 0f 90 pop r0 602: 0f 90 pop r0 return 0; } 604: 80 e0 ldi r24, 0x00 ; 0 606: 08 95 ret 00000608 : #include #include uint8 read_adc(char * arg) { 608: af 92 push r10 60a: bf 92 push r11 60c: cf 92 push r12 60e: df 92 push r13 610: ef 92 push r14 612: ff 92 push r15 614: 0f 93 push r16 616: 1f 93 push r17 618: cf 93 push r28 61a: df 93 push r29 61c: 6c 01 movw r12, r24 if (arg[0] == '\0') 61e: dc 01 movw r26, r24 620: 8c 91 ld r24, X 622: 88 23 and r24, r24 624: 31 f0 breq .+12 ; 0x632 626: e6 01 movw r28, r12 { for (char * a = arg; *a != '\0'; ++a) { //uint8 channel = *a - '0'; //if (channel >= 0 && channel <= 7) USART_printf("%f %f ", ADC_read(*a - '0'), sqrt(setup.adc_variance[(*a - '0')])); 628: 2a e6 ldi r18, 0x6A ; 106 62a: a2 2e mov r10, r18 62c: 21 e0 ldi r18, 0x01 ; 1 62e: b2 2e mov r11, r18 630: 56 c0 rjmp .+172 ; 0x6de #include uint8 read_adc(char * arg) { if (arg[0] == '\0') 632: 00 e0 ldi r16, 0x00 ; 0 { for (uint8 i=0; i < 8; ++i) { USART_printf("%i ", ADC_read(i)); 634: c6 e6 ldi r28, 0x66 ; 102 636: d1 e0 ldi r29, 0x01 ; 1 638: 80 2f mov r24, r16 63a: 12 de rcall .-988 ; 0x260 63c: 00 d0 rcall .+0 ; 0x63e 63e: 00 d0 rcall .+0 ; 0x640 640: 00 d0 rcall .+0 ; 0x642 642: ed b7 in r30, 0x3d ; 61 644: fe b7 in r31, 0x3e ; 62 646: d2 83 std Z+2, r29 ; 0x02 648: c1 83 std Z+1, r28 ; 0x01 64a: ad b7 in r26, 0x3d ; 61 64c: be b7 in r27, 0x3e ; 62 64e: 13 96 adiw r26, 0x03 ; 3 650: 6d 93 st X+, r22 652: 7d 93 st X+, r23 654: 8d 93 st X+, r24 656: 9c 93 st X, r25 658: 16 97 sbiw r26, 0x06 ; 6 65a: 79 d6 rcall .+3314 ; 0x134e uint8 read_adc(char * arg) { if (arg[0] == '\0') { for (uint8 i=0; i < 8; ++i) 65c: 0f 5f subi r16, 0xFF ; 255 65e: ed b7 in r30, 0x3d ; 61 660: fe b7 in r31, 0x3e ; 62 662: 36 96 adiw r30, 0x06 ; 6 664: 0f b6 in r0, 0x3f ; 63 666: f8 94 cli 668: fe bf out 0x3e, r31 ; 62 66a: 0f be out 0x3f, r0 ; 63 66c: ed bf out 0x3d, r30 ; 61 66e: 08 30 cpi r16, 0x08 ; 8 670: 19 f7 brne .-58 ; 0x638 672: 5c c0 rjmp .+184 ; 0x72c { for (char * a = arg; *a != '\0'; ++a) { //uint8 channel = *a - '0'; //if (channel >= 0 && channel <= 7) USART_printf("%f %f ", ADC_read(*a - '0'), sqrt(setup.adc_variance[(*a - '0')])); 674: 80 53 subi r24, 0x30 ; 48 676: f4 dd rcall .-1048 ; 0x260 678: 7b 01 movw r14, r22 67a: 8c 01 movw r16, r24 67c: e9 91 ld r30, Y+ 67e: f0 e0 ldi r31, 0x00 ; 0 680: ee 0f add r30, r30 682: ff 1f adc r31, r31 684: ee 0f add r30, r30 686: ff 1f adc r31, r31 688: e2 53 subi r30, 0x32 ; 50 68a: ff 4f sbci r31, 0xFF ; 255 68c: 66 a5 ldd r22, Z+46 ; 0x2e 68e: 77 a5 ldd r23, Z+47 ; 0x2f 690: 80 a9 ldd r24, Z+48 ; 0x30 692: 91 a9 ldd r25, Z+49 ; 0x31 694: 0e 94 f4 0b call 0x17e8 ; 0x17e8 698: 2d b7 in r18, 0x3d ; 61 69a: 3e b7 in r19, 0x3e ; 62 69c: 2a 50 subi r18, 0x0A ; 10 69e: 30 40 sbci r19, 0x00 ; 0 6a0: 0f b6 in r0, 0x3f ; 63 6a2: f8 94 cli 6a4: 3e bf out 0x3e, r19 ; 62 6a6: 0f be out 0x3f, r0 ; 63 6a8: 2d bf out 0x3d, r18 ; 61 6aa: ed b7 in r30, 0x3d ; 61 6ac: fe b7 in r31, 0x3e ; 62 6ae: 31 96 adiw r30, 0x01 ; 1 6b0: ad b7 in r26, 0x3d ; 61 6b2: be b7 in r27, 0x3e ; 62 6b4: 12 96 adiw r26, 0x02 ; 2 6b6: bc 92 st X, r11 6b8: ae 92 st -X, r10 6ba: 11 97 sbiw r26, 0x01 ; 1 6bc: e2 82 std Z+2, r14 ; 0x02 6be: f3 82 std Z+3, r15 ; 0x03 6c0: 04 83 std Z+4, r16 ; 0x04 6c2: 15 83 std Z+5, r17 ; 0x05 6c4: 66 83 std Z+6, r22 ; 0x06 6c6: 77 83 std Z+7, r23 ; 0x07 6c8: 80 87 std Z+8, r24 ; 0x08 6ca: 91 87 std Z+9, r25 ; 0x09 6cc: 40 d6 rcall .+3200 ; 0x134e USART_printf("%i ", ADC_read(i)); } } else { for (char * a = arg; *a != '\0'; ++a) 6ce: ed b7 in r30, 0x3d ; 61 6d0: fe b7 in r31, 0x3e ; 62 6d2: 3a 96 adiw r30, 0x0a ; 10 6d4: 0f b6 in r0, 0x3f ; 63 6d6: f8 94 cli 6d8: fe bf out 0x3e, r31 ; 62 6da: 0f be out 0x3f, r0 ; 63 6dc: ed bf out 0x3d, r30 ; 61 6de: 88 81 ld r24, Y 6e0: 88 23 and r24, r24 6e2: 41 f6 brne .-112 ; 0x674 { //uint8 channel = *a - '0'; //if (channel >= 0 && channel <= 7) USART_printf("%f %f ", ADC_read(*a - '0'), sqrt(setup.adc_variance[(*a - '0')])); } LCD_printf("%i", (uint)(setup.adc_values[(int)(arg[0] - '0')])); 6e4: 00 d0 rcall .+0 ; 0x6e6 6e6: 00 d0 rcall .+0 ; 0x6e8 6e8: 0d b7 in r16, 0x3d ; 61 6ea: 1e b7 in r17, 0x3e ; 62 6ec: 0f 5f subi r16, 0xFF ; 255 6ee: 1f 4f sbci r17, 0xFF ; 255 6f0: 81 e7 ldi r24, 0x71 ; 113 6f2: 91 e0 ldi r25, 0x01 ; 1 6f4: ad b7 in r26, 0x3d ; 61 6f6: be b7 in r27, 0x3e ; 62 6f8: 12 96 adiw r26, 0x02 ; 2 6fa: 9c 93 st X, r25 6fc: 8e 93 st -X, r24 6fe: 11 97 sbiw r26, 0x01 ; 1 700: d6 01 movw r26, r12 702: ec 91 ld r30, X 704: f0 e0 ldi r31, 0x00 ; 0 706: ee 0f add r30, r30 708: ff 1f adc r31, r31 70a: ee 0f add r30, r30 70c: ff 1f adc r31, r31 70e: e2 53 subi r30, 0x32 ; 50 710: ff 4f sbci r31, 0xFF ; 255 712: 66 85 ldd r22, Z+14 ; 0x0e 714: 77 85 ldd r23, Z+15 ; 0x0f 716: 80 89 ldd r24, Z+16 ; 0x10 718: 91 89 ldd r25, Z+17 ; 0x11 71a: 21 d7 rcall .+3650 ; 0x155e <__fixunssfsi> 71c: f8 01 movw r30, r16 71e: 73 83 std Z+3, r23 ; 0x03 720: 62 83 std Z+2, r22 ; 0x02 722: e1 d2 rcall .+1474 ; 0xce6 724: 0f 90 pop r0 726: 0f 90 pop r0 728: 0f 90 pop r0 72a: 0f 90 pop r0 } USART_printf("\r\n"); 72c: 00 d0 rcall .+0 ; 0x72e 72e: 84 e7 ldi r24, 0x74 ; 116 730: 91 e0 ldi r25, 0x01 ; 1 732: ad b7 in r26, 0x3d ; 61 734: be b7 in r27, 0x3e ; 62 736: 12 96 adiw r26, 0x02 ; 2 738: 9c 93 st X, r25 73a: 8e 93 st -X, r24 73c: 11 97 sbiw r26, 0x01 ; 1 73e: 07 d6 rcall .+3086 ; 0x134e 740: 0f 90 pop r0 742: 0f 90 pop r0 return 0; } 744: 80 e0 ldi r24, 0x00 ; 0 746: df 91 pop r29 748: cf 91 pop r28 74a: 1f 91 pop r17 74c: 0f 91 pop r16 74e: ff 90 pop r15 750: ef 90 pop r14 752: df 90 pop r13 754: cf 90 pop r12 756: bf 90 pop r11 758: af 90 pop r10 75a: 08 95 ret 0000075c : uint8 poll_adc(char * arg) { 75c: cf 92 push r12 75e: df 92 push r13 760: ef 92 push r14 762: ff 92 push r15 764: 0f 93 push r16 766: 1f 93 push r17 768: cf 93 push r28 76a: df 93 push r29 76c: ec 01 movw r28, r24 uint32 tmr = 0; //USART_printf("# poll\r\n"); LCD_puts("poll"); 76e: 87 e7 ldi r24, 0x77 ; 119 770: 91 e0 ldi r25, 0x01 ; 1 772: d9 d1 rcall .+946 ; 0xb26 774: ee 24 eor r14, r14 776: ff 24 eor r15, r15 778: 87 01 movw r16, r14 //USART_printf("#t ADC0 ADC1 ADC2 ADC3 ADC4 ADC5 ADC6 ADC7\r\n); do { setup.elapsed_time = 0; USART_printf("%l ", tmr); 77a: 3c e7 ldi r19, 0x7C ; 124 77c: c3 2e mov r12, r19 77e: 31 e0 ldi r19, 0x01 ; 1 780: d3 2e mov r13, r19 //USART_printf("# poll\r\n"); LCD_puts("poll"); //USART_printf("#t ADC0 ADC1 ADC2 ADC3 ADC4 ADC5 ADC6 ADC7\r\n); do { setup.elapsed_time = 0; 782: 10 92 96 01 sts 0x0196, r1 786: 10 92 97 01 sts 0x0197, r1 78a: 10 92 98 01 sts 0x0198, r1 78e: 10 92 99 01 sts 0x0199, r1 USART_printf("%l ", tmr); 792: 00 d0 rcall .+0 ; 0x794 794: 00 d0 rcall .+0 ; 0x796 796: 00 d0 rcall .+0 ; 0x798 798: ed b7 in r30, 0x3d ; 61 79a: fe b7 in r31, 0x3e ; 62 79c: d2 82 std Z+2, r13 ; 0x02 79e: c1 82 std Z+1, r12 ; 0x01 7a0: e3 82 std Z+3, r14 ; 0x03 7a2: f4 82 std Z+4, r15 ; 0x04 7a4: 05 83 std Z+5, r16 ; 0x05 7a6: 16 83 std Z+6, r17 ; 0x06 7a8: d2 d5 rcall .+2980 ; 0x134e read_adc(arg); 7aa: 8d b7 in r24, 0x3d ; 61 7ac: 9e b7 in r25, 0x3e ; 62 7ae: 06 96 adiw r24, 0x06 ; 6 7b0: 0f b6 in r0, 0x3f ; 63 7b2: f8 94 cli 7b4: 9e bf out 0x3e, r25 ; 62 7b6: 0f be out 0x3f, r0 ; 63 7b8: 8d bf out 0x3d, r24 ; 61 7ba: ce 01 movw r24, r28 7bc: 25 df rcall .-438 ; 0x608 if (arg[0] == '\0' || arg[1] == 't') 7be: 88 81 ld r24, Y 7c0: 88 23 and r24, r24 7c2: 19 f0 breq .+6 ; 0x7ca 7c4: 89 81 ldd r24, Y+1 ; 0x01 7c6: 84 37 cpi r24, 0x74 ; 116 7c8: 49 f4 brne .+18 ; 0x7dc { LCD_Colon(1); 7ca: 81 e0 ldi r24, 0x01 ; 1 7cc: dc d1 rcall .+952 ; 0xb86 LCD_ShowTime(tmr); 7ce: c8 01 movw r24, r16 7d0: b7 01 movw r22, r14 7d2: f0 d1 rcall .+992 ; 0xbb4 7d4: 03 c0 rjmp .+6 ; 0x7dc // return 255; //} while (setup.elapsed_time < setup.poll_delay) { if (USART_Poll() != '\0') 7d6: b2 d5 rcall .+2916 ; 0x133c 7d8: 88 23 and r24, r24 7da: 29 f5 brne .+74 ; 0x826 //{ // USART_printf("# tmr>delay\r\n"); // return 255; //} while (setup.elapsed_time < setup.poll_delay) 7dc: 20 91 96 01 lds r18, 0x0196 7e0: 30 91 97 01 lds r19, 0x0197 7e4: 40 91 98 01 lds r20, 0x0198 7e8: 50 91 99 01 lds r21, 0x0199 7ec: 80 91 8e 01 lds r24, 0x018E 7f0: 90 91 8f 01 lds r25, 0x018F 7f4: a0 e0 ldi r26, 0x00 ; 0 7f6: b0 e0 ldi r27, 0x00 ; 0 7f8: 28 17 cp r18, r24 7fa: 39 07 cpc r19, r25 7fc: 4a 07 cpc r20, r26 7fe: 5b 07 cpc r21, r27 800: 50 f3 brcs .-44 ; 0x7d6 //USART_printf("# STOP %i\r\n", tmr+setup.elapsed_time); LCD_Colon(0); return 0; } } tmr += setup.elapsed_time; 802: e2 0e add r14, r18 804: f3 1e adc r15, r19 806: 04 1f adc r16, r20 808: 15 1f adc r17, r21 } while (tmr < setup.poll_timeout); 80a: 80 91 92 01 lds r24, 0x0192 80e: 90 91 93 01 lds r25, 0x0193 812: a0 91 94 01 lds r26, 0x0194 816: b0 91 95 01 lds r27, 0x0195 81a: e8 16 cp r14, r24 81c: f9 06 cpc r15, r25 81e: 0a 07 cpc r16, r26 820: 1b 07 cpc r17, r27 822: 08 f4 brcc .+2 ; 0x826 824: ae cf rjmp .-164 ; 0x782 //USART_printf("# done.\r\n"); LCD_Colon(0); 826: 80 e0 ldi r24, 0x00 ; 0 828: ae d1 rcall .+860 ; 0xb86 return 0; } 82a: 80 e0 ldi r24, 0x00 ; 0 82c: df 91 pop r29 82e: cf 91 pop r28 830: 1f 91 pop r17 832: 0f 91 pop r16 834: ff 90 pop r15 836: ef 90 pop r14 838: df 90 pop r13 83a: cf 90 pop r12 83c: 08 95 ret 0000083e : void DAC_Init(void) { //prevDDR = DAC_DDR; //prevPORT = DAC_PORT; DAC_DDR = 0xFF & ~(1<: void DAC_Set(int output) { 84c: cf 93 push r28 84e: df 93 push r29 850: ec 01 movw r28, r24 DAC_Init(); 852: f5 df rcall .-22 ; 0x83e while (SCK_ON); 854: 2b 99 sbic 0x05, 3 ; 5 856: fe cf rjmp .-4 ; 0x854 DAC_PORT |= (1< while (SCK_ON); 862: 2b 99 sbic 0x05, 3 ; 5 864: fe cf rjmp .-4 ; 0x862 //Wait for clock off //Set CS low DAC_PORT &= ~(1< while (SCK_ON); 86e: 2b 99 sbic 0x05, 3 ; 5 870: fe cf rjmp .-4 ; 0x86e //BUF DAC_PORT |= (1< while (SCK_ON); 878: 2b 99 sbic 0x05, 3 ; 5 87a: fe cf rjmp .-4 ; 0x878 //GA if (output > 0xFFF) 87c: 80 e1 ldi r24, 0x10 ; 16 87e: c0 30 cpi r28, 0x00 ; 0 880: d8 07 cpc r29, r24 882: 24 f0 brlt .+8 ; 0x88c { DAC_PORT &= ~(1< } else DAC_PORT |= (1< while (SCK_ON); 892: 2b 99 sbic 0x05, 3 ; 5 894: fe cf rjmp .-4 ; 0x892 //SHDN DAC_PORT |= (1< while (SCK_ON); 89c: 2b 99 sbic 0x05, 3 ; 5 89e: fe cf rjmp .-4 ; 0x89c 8a0: 2b e0 ldi r18, 0x0B ; 11 8a2: 30 e0 ldi r19, 0x00 ; 0 //Now send the 12 data bits for (int i=1; i <= 12; ++i) { if ((output & (1<<(12-i))) == 0x00) 8a4: ce 01 movw r24, r28 8a6: 02 2e mov r0, r18 8a8: 02 c0 rjmp .+4 ; 0x8ae 8aa: 95 95 asr r25 8ac: 87 95 ror r24 8ae: 0a 94 dec r0 8b0: e2 f7 brpl .-8 ; 0x8aa 8b2: 80 fd sbrc r24, 0 8b4: 02 c0 rjmp .+4 ; 0x8ba DAC_PORT &= ~(1< else DAC_PORT |= (1< while (SCK_ON); 8c0: 2b 99 sbic 0x05, 3 ; 5 8c2: fe cf rjmp .-4 ; 0x8c0 8c4: 21 50 subi r18, 0x01 ; 1 8c6: 30 40 sbci r19, 0x00 ; 0 while (SCK_OFF); while (SCK_ON); //Now send the 12 data bits for (int i=1; i <= 12; ++i) 8c8: 8f ef ldi r24, 0xFF ; 255 8ca: 2f 3f cpi r18, 0xFF ; 255 8cc: 38 07 cpc r19, r24 8ce: 51 f7 brne .-44 ; 0x8a4 while (SCK_OFF); while (SCK_ON); } // Set CS to 1 DAC_PORT |= (1< while (SCK_ON); 8d6: 2b 99 sbic 0x05, 3 ; 5 8d8: fe cf rjmp .-4 ; 0x8d6 //Toggle LDAC DAC_PORT &= ~(1< while (SCK_ON); 8e0: 2b 99 sbic 0x05, 3 ; 5 8e2: fe cf rjmp .-4 ; 0x8e0 DAC_PORT |= (1< while (SCK_ON); 8ea: 2b 99 sbic 0x05, 3 ; 5 8ec: fe cf rjmp .-4 ; 0x8ea } 8ee: df 91 pop r29 8f0: cf 91 pop r28 8f2: 08 95 ret 000008f4 : * Purpose : Stores LCD control data in the LCD_displayData buffer. * (The LCD_displayData is latched in the LCD_SOF interrupt.) * *****************************************************************************/ void LCD_WriteDigit(char c, char digit) { 8f4: cf 93 push r28 8f6: df 93 push r29 8f8: 98 2f mov r25, r24 char mask, nibble; volatile char *ptr; char i; if (digit > 5) // Skip if digit is illegal 8fa: 66 30 cpi r22, 0x06 ; 6 8fc: c8 f5 brcc .+114 ; 0x970 return; //Lookup character table for segmet data if ((c >= '*') && (c <= 'z')) 8fe: 8a 52 subi r24, 0x2A ; 42 900: 81 35 cpi r24, 0x51 ; 81 902: 18 f0 brcs .+6 ; 0x90a 904: a0 e0 ldi r26, 0x00 ; 0 906: b0 e0 ldi r27, 0x00 ; 0 908: 0c c0 rjmp .+24 ; 0x922 { // c is a letter if (c >= 'a') // Convert to upper case 90a: 91 36 cpi r25, 0x61 ; 97 90c: 08 f0 brcs .+2 ; 0x910 c &= ~0x20; // if necessarry 90e: 9f 7d andi r25, 0xDF ; 223 c -= '*'; //mt seg = LCD_character_table[c]; seg = (unsigned int) pgm_read_word(&LCD_character_table[(uint8_t)c]); 910: 9a 52 subi r25, 0x2A ; 42 912: e9 2f mov r30, r25 914: f0 e0 ldi r31, 0x00 ; 0 916: ee 0f add r30, r30 918: ff 1f adc r31, r31 91a: e4 5a subi r30, 0xA4 ; 164 91c: ff 4f sbci r31, 0xFF ; 255 91e: a5 91 lpm r26, Z+ 920: b4 91 lpm r27, Z+ } // Adjust mask according to LCD segment mapping if (digit & 0x01) 922: 86 2f mov r24, r22 924: 90 e0 ldi r25, 0x00 ; 0 926: ec 01 movw r28, r24 928: c1 70 andi r28, 0x01 ; 1 92a: d0 70 andi r29, 0x00 ; 0 92c: 60 fd sbrc r22, 0 92e: 02 c0 rjmp .+4 ; 0x934 930: 90 ef ldi r25, 0xF0 ; 240 932: 01 c0 rjmp .+2 ; 0x936 934: 9f e0 ldi r25, 0x0F ; 15 mask = 0x0F; // Digit 1, 3, 5 else mask = 0xF0; // Digit 0, 2, 4 ptr = LCD_Data + (digit >> 1); // digit = {0,0,1,1,2,2} 936: 66 95 lsr r22 938: 70 e0 ldi r23, 0x00 ; 0 93a: 63 52 subi r22, 0x23 ; 35 93c: 7e 4f sbci r23, 0xFE ; 254 93e: 20 e0 ldi r18, 0x00 ; 0 940: 30 e0 ldi r19, 0x00 ; 0 942: fb 01 movw r30, r22 944: e2 0f add r30, r18 946: f3 1f adc r31, r19 for (i = 0; i < 4; i++) { nibble = seg & 0x000F; 948: 4a 2f mov r20, r26 94a: 4f 70 andi r20, 0x0F ; 15 seg >>= 4; 94c: 84 e0 ldi r24, 0x04 ; 4 94e: b6 95 lsr r27 950: a7 95 ror r26 952: 8a 95 dec r24 954: e1 f7 brne .-8 ; 0x94e if (digit & 0x01) 956: 20 97 sbiw r28, 0x00 ; 0 958: 11 f0 breq .+4 ; 0x95e nibble <<= 4; 95a: 42 95 swap r20 95c: 40 7f andi r20, 0xF0 ; 240 *ptr = (*ptr & mask) | nibble; 95e: 80 81 ld r24, Z 960: 89 23 and r24, r25 962: 48 2b or r20, r24 964: 40 83 st Z, r20 966: 2b 5f subi r18, 0xFB ; 251 968: 3f 4f sbci r19, 0xFF ; 255 else mask = 0xF0; // Digit 0, 2, 4 ptr = LCD_Data + (digit >> 1); // digit = {0,0,1,1,2,2} for (i = 0; i < 4; i++) 96a: 24 31 cpi r18, 0x14 ; 20 96c: 31 05 cpc r19, r1 96e: 49 f7 brne .-46 ; 0x942 if (digit & 0x01) nibble <<= 4; *ptr = (*ptr & mask) | nibble; ptr += 5; } } 970: df 91 pop r29 972: cf 91 pop r28 974: 08 95 ret 00000976 : *****************************************************************************/ void LCD_AllSegments(char show) { unsigned char i; if (show) 976: 81 11 cpse r24, r1 978: 8f ef ldi r24, 0xFF ; 255 97a: 20 e0 ldi r18, 0x00 ; 0 97c: 30 e0 ldi r19, 0x00 ; 0 97e: f9 01 movw r30, r18 980: e3 52 subi r30, 0x23 ; 35 982: fe 4f sbci r31, 0xFE ; 254 show = 0xFF; // Set/clear all bits in all LCD registers for (i=0; i < LCD_REGISTER_COUNT; i++) *(LCD_Data + i) = show; 984: 80 83 st Z, r24 986: 2f 5f subi r18, 0xFF ; 255 988: 3f 4f sbci r19, 0xFF ; 255 if (show) show = 0xFF; // Set/clear all bits in all LCD registers for (i=0; i < LCD_REGISTER_COUNT; i++) 98a: 24 31 cpi r18, 0x14 ; 20 98c: 31 05 cpc r19, r1 98e: b9 f7 brne .-18 ; 0x97e *(LCD_Data + i) = show; } 990: 08 95 ret 00000992 : * Set up the LCD (timing, contrast, etc.) * *****************************************************************************/ void LCD_Init(void) { LCD_AllSegments(FALSE); // Clear segment buffer. 992: 80 e0 ldi r24, 0x00 ; 0 994: f0 df rcall .-32 ; 0x976 LCD_CONTRAST_LEVEL(LCD_INITIAL_CONTRAST); //Set the LCD contrast level 996: a7 ee ldi r26, 0xE7 ; 231 998: b0 e0 ldi r27, 0x00 ; 0 99a: 8c 91 ld r24, X 99c: 8f 60 ori r24, 0x0F ; 15 99e: 8c 93 st X, r24 // Select asynchronous clock source, enable all COM pins and enable all // segment pins. LCDCRB = (1<: * Purpose: Latch the LCD_displayData and Set LCD_status.updateComplete * *****************************************************************************/ ISR(LCD_vect) { 9c6: 1f 92 push r1 9c8: 0f 92 push r0 9ca: 0f b6 in r0, 0x3f ; 63 9cc: 0f 92 push r0 9ce: 11 24 eor r1, r1 9d0: ef 92 push r14 9d2: ff 92 push r15 9d4: 0f 93 push r16 9d6: 1f 93 push r17 9d8: 2f 93 push r18 9da: 3f 93 push r19 9dc: 4f 93 push r20 9de: 5f 93 push r21 9e0: 6f 93 push r22 9e2: 7f 93 push r23 9e4: 8f 93 push r24 9e6: 9f 93 push r25 9e8: af 93 push r26 9ea: bf 93 push r27 9ec: cf 93 push r28 9ee: df 93 push r29 9f0: ef 93 push r30 9f2: ff 93 push r31 c_flash=0; // mt LCD_timer--; // Decreased every LCD frame 9f4: 00 91 89 01 lds r16, 0x0189 9f8: 01 50 subi r16, 0x01 ; 1 9fa: 00 93 89 01 sts 0x0189, r16 if (gScrollMode) 9fe: 80 91 dc 01 lds r24, 0x01DC a02: 88 23 and r24, r24 a04: 81 f0 breq .+32 ; 0xa26 <__vector_22+0x60> { // If we are in scroll mode, and the timer has expired, // we will update the LCD if (LCD_timer == 0) a06: 00 23 and r16, r16 a08: 81 f4 brne .+32 ; 0xa2a <__vector_22+0x64> { if (gLCD_Start_Scroll_Timer == 0) a0a: 80 91 8b 01 lds r24, 0x018B a0e: 88 23 and r24, r24 a10: 21 f4 brne .+8 ; 0xa1a <__vector_22+0x54> { gLCD_Update_Required = TRUE; a12: 81 e0 ldi r24, 0x01 ; 1 a14: 80 93 8a 01 sts 0x018A, r24 a18: 08 c0 rjmp .+16 ; 0xa2a <__vector_22+0x64> } else gLCD_Start_Scroll_Timer--; a1a: 80 91 8b 01 lds r24, 0x018B a1e: 81 50 subi r24, 0x01 ; 1 a20: 80 93 8b 01 sts 0x018B, r24 a24: 02 c0 rjmp .+4 ; 0xa2a <__vector_22+0x64> } else { // if not scrolling, // disble LCD start of frame interrupt // cbi(LCDCRA, LCDIE); //DEBUG gScroll = 0; a26: 10 92 0a 02 sts 0x020A, r1 } EOL = FALSE; if (gLCD_Update_Required == TRUE) a2a: 80 91 8a 01 lds r24, 0x018A a2e: 81 30 cpi r24, 0x01 ; 1 a30: 09 f0 breq .+2 ; 0xa34 <__vector_22+0x6e> a32: 51 c0 rjmp .+162 ; 0xad6 <__vector_22+0x110> { // Duty cycle of flashing characters if (gFlashTimer < (LCD_FLASH_SEED >> 1)) a34: e0 90 8c 01 lds r14, 0x018C a38: ff 24 eor r15, r15 a3a: 10 e0 ldi r17, 0x00 ; 0 a3c: c0 e0 ldi r28, 0x00 ; 0 a3e: d0 e0 ldi r29, 0x00 ; 0 a40: 6c 2f mov r22, r28 flash = 1; // Repeat for the six LCD characters for (i = 0; i < 6; i++) { if ((gScroll+i) >= 0 && (!EOL)) a42: 80 91 0a 02 lds r24, 0x020A a46: 99 27 eor r25, r25 a48: 87 fd sbrc r24, 7 a4a: 90 95 com r25 a4c: 8c 0f add r24, r28 a4e: 9d 1f adc r25, r29 a50: 97 fd sbrc r25, 7 a52: 15 c0 rjmp .+42 ; 0xa7e <__vector_22+0xb8> a54: 11 23 and r17, r17 a56: 99 f4 brne .+38 ; 0xa7e <__vector_22+0xb8> { // We have some visible characters c = gTextBuffer[i + gScroll]; a58: e0 91 0a 02 lds r30, 0x020A a5c: ff 27 eor r31, r31 a5e: e7 fd sbrc r30, 7 a60: f0 95 com r31 a62: ec 0f add r30, r28 a64: fd 1f adc r31, r29 a66: ef 50 subi r30, 0x0F ; 15 a68: fe 4f sbci r31, 0xFE ; 254 a6a: 80 81 ld r24, Z c_flash = c & 0x80 ? 1 : 0; a6c: f8 2e mov r15, r24 a6e: ff 1c adc r15, r15 a70: ff 24 eor r15, r15 a72: ff 1c adc r15, r15 c = c & 0x7F; a74: 8f 77 andi r24, 0x7F ; 127 if (c == '\0') a76: 21 f4 brne .+8 ; 0xa80 <__vector_22+0xba> a78: 1c 2f mov r17, r28 a7a: 1f 5f subi r17, 0xFF ; 255 a7c: 01 c0 rjmp .+2 ; 0xa80 <__vector_22+0xba> a7e: 80 e2 ldi r24, 0x20 ; 32 else c = ' '; // Check if this character is flashing if (c_flash && flash) a80: ff 20 and r15, r15 a82: 21 f0 breq .+8 ; 0xa8c <__vector_22+0xc6> a84: 94 e0 ldi r25, 0x04 ; 4 a86: 9e 15 cp r25, r14 a88: 08 f4 brcc .+2 ; 0xa8c <__vector_22+0xc6> LCD_WriteDigit(' ', i); a8a: 80 e2 ldi r24, 0x20 ; 32 else LCD_WriteDigit(c, i); a8c: 33 df rcall .-410 ; 0x8f4 a8e: 21 96 adiw r28, 0x01 ; 1 flash = 0; else flash = 1; // Repeat for the six LCD characters for (i = 0; i < 6; i++) a90: c6 30 cpi r28, 0x06 ; 6 a92: d1 05 cpc r29, r1 a94: a9 f6 brne .-86 ; 0xa40 <__vector_22+0x7a> a96: ac ee ldi r26, 0xEC ; 236 a98: b0 e0 ldi r27, 0x00 ; 0 a9a: fd 01 movw r30, r26 a9c: ef 50 subi r30, 0x0F ; 15 a9e: ff 4f sbci r31, 0xFF ; 255 LCD_WriteDigit(c, i); } // Copy the segment buffer to the real segments for (i = 0; i < LCD_REGISTER_COUNT; i++) *(pLCDREG + i) = *(LCD_Data+i); aa0: 80 81 ld r24, Z aa2: 8d 93 st X+, r24 else LCD_WriteDigit(c, i); } // Copy the segment buffer to the real segments for (i = 0; i < LCD_REGISTER_COUNT; i++) aa4: 81 e0 ldi r24, 0x01 ; 1 aa6: a0 30 cpi r26, 0x00 ; 0 aa8: b8 07 cpc r27, r24 aaa: b9 f7 brne .-18 ; 0xa9a <__vector_22+0xd4> *(pLCDREG + i) = *(LCD_Data+i); // Handle colon if (gColon) aac: 80 91 8d 01 lds r24, 0x018D ab0: 88 23 and r24, r24 ab2: 21 f0 breq .+8 ; 0xabc <__vector_22+0xf6> *(pLCDREG + 8) = 0x01; ab4: 81 e0 ldi r24, 0x01 ; 1 ab6: 80 93 f4 00 sts 0x00F4, r24 aba: 02 c0 rjmp .+4 ; 0xac0 <__vector_22+0xfa> else *(pLCDREG + 8) = 0x00; abc: 10 92 f4 00 sts 0x00F4, r1 // If the text scrolled off the display, // we have to start over again. if (EOL == 1) ac0: 11 30 cpi r17, 0x01 ; 1 ac2: 11 f4 brne .+4 ; 0xac8 <__vector_22+0x102> gScroll = -6; ac4: 8a ef ldi r24, 0xFA ; 250 ac6: 03 c0 rjmp .+6 ; 0xace <__vector_22+0x108> else gScroll++; ac8: 80 91 0a 02 lds r24, 0x020A acc: 8f 5f subi r24, 0xFF ; 255 ace: 80 93 0a 02 sts 0x020A, r24 // No need to update anymore gLCD_Update_Required = FALSE; ad2: 10 92 8a 01 sts 0x018A, r1 } // LCD_timer is used when scrolling text if (LCD_timer == 0) ad6: 00 23 and r16, r16 ad8: 19 f4 brne .+6 ; 0xae0 <__vector_22+0x11a> { /* if ((gScroll <= 0) || EOL) LCD_timer = LCD_TIMER_SEED/2; else*/ LCD_timer = LCD_TIMER_SEED; ada: 83 e0 ldi r24, 0x03 ; 3 adc: 80 93 89 01 sts 0x0189, r24 } // gFlashTimer is used when flashing characters if (gFlashTimer == LCD_FLASH_SEED) ae0: 80 91 8c 01 lds r24, 0x018C ae4: 8a 30 cpi r24, 0x0A ; 10 ae6: 19 f4 brne .+6 ; 0xaee <__vector_22+0x128> gFlashTimer= 0; ae8: 10 92 8c 01 sts 0x018C, r1 aec: 05 c0 rjmp .+10 ; 0xaf8 <__vector_22+0x132> else gFlashTimer++; aee: 80 91 8c 01 lds r24, 0x018C af2: 8f 5f subi r24, 0xFF ; 255 af4: 80 93 8c 01 sts 0x018C, r24 } af8: ff 91 pop r31 afa: ef 91 pop r30 afc: df 91 pop r29 afe: cf 91 pop r28 b00: bf 91 pop r27 b02: af 91 pop r26 b04: 9f 91 pop r25 b06: 8f 91 pop r24 b08: 7f 91 pop r23 b0a: 6f 91 pop r22 b0c: 5f 91 pop r21 b0e: 4f 91 pop r20 b10: 3f 91 pop r19 b12: 2f 91 pop r18 b14: 1f 91 pop r17 b16: 0f 91 pop r16 b18: ff 90 pop r15 b1a: ef 90 pop r14 b1c: 0f 90 pop r0 b1e: 0f be out 0x3f, r0 ; 63 b20: 0f 90 pop r0 b22: 1f 90 pop r1 b24: 18 95 reti 00000b26 : * * Purpose : Writes a string to the LCD * *****************************************************************************/ void LCD_puts(char *pStr) { b26: bc 01 movw r22, r24 uint8_t i; // char i; while (gLCD_Update_Required); // Wait for access to buffer b28: 80 91 8a 01 lds r24, 0x018A b2c: 88 23 and r24, r24 b2e: e1 f7 brne .-8 ; 0xb28 b30: 20 e0 ldi r18, 0x00 ; 0 b32: 30 e0 ldi r19, 0x00 ; 0 b34: 06 c0 rjmp .+12 ; 0xb42 for (i = 0; pStr[i] && i < TEXTBUFFER_SIZE; i++) { gTextBuffer[i] = pStr[i]; b36: f9 01 movw r30, r18 b38: ef 50 subi r30, 0x0F ; 15 b3a: fe 4f sbci r31, 0xFE ; 254 b3c: 80 83 st Z, r24 b3e: 2f 5f subi r18, 0xFF ; 255 b40: 3f 4f sbci r19, 0xFF ; 255 b42: 42 2f mov r20, r18 { uint8_t i; // char i; while (gLCD_Update_Required); // Wait for access to buffer for (i = 0; pStr[i] && i < TEXTBUFFER_SIZE; i++) b44: fb 01 movw r30, r22 b46: e2 0f add r30, r18 b48: f3 1f adc r31, r19 b4a: 80 81 ld r24, Z b4c: 88 23 and r24, r24 b4e: 19 f0 breq .+6 ; 0xb56 b50: 29 31 cpi r18, 0x19 ; 25 b52: 31 05 cpc r19, r1 b54: 81 f7 brne .-32 ; 0xb36 { gTextBuffer[i] = pStr[i]; } gTextBuffer[i] = '\0'; b56: e4 2f mov r30, r20 b58: f0 e0 ldi r31, 0x00 ; 0 b5a: ef 50 subi r30, 0x0F ; 15 b5c: fe 4f sbci r31, 0xFE ; 254 b5e: 10 82 st Z, r1 if (i > 6) b60: 47 30 cpi r20, 0x07 ; 7 b62: 48 f0 brcs .+18 ; 0xb76 { gScrollMode = 1; // Scroll if text is longer than display size b64: 81 e0 ldi r24, 0x01 ; 1 b66: 80 93 dc 01 sts 0x01DC, r24 gScroll = 0; b6a: 10 92 0a 02 sts 0x020A, r1 gLCD_Start_Scroll_Timer = 3; //Start-up delay before scrolling the text b6e: 83 e0 ldi r24, 0x03 ; 3 b70: 80 93 8b 01 sts 0x018B, r24 b74: 04 c0 rjmp .+8 ; 0xb7e } else { gScrollMode = 0; b76: 10 92 dc 01 sts 0x01DC, r1 gScroll = 0; b7a: 10 92 0a 02 sts 0x020A, r1 } gLCD_Update_Required = 1; b7e: 81 e0 ldi r24, 0x01 ; 1 b80: 80 93 8a 01 sts 0x018A, r24 } b84: 08 95 ret 00000b86 : * Purpose : Enable/disable colons on the LCD * *****************************************************************************/ void LCD_Colon(char show) { gColon = show; b86: 80 93 8d 01 sts 0x018D, r24 } b8a: 08 95 ret 00000b8c : * * Purpose : Tells the LCD that there is new data to be presented * *****************************************************************************/ void LCD_UpdateRequired(char update, char scrollmode) { b8c: 98 2f mov r25, r24 while (gLCD_Update_Required); b8e: 80 91 8a 01 lds r24, 0x018A b92: 88 23 and r24, r24 b94: e1 f7 brne .-8 ; 0xb8e gScrollMode = scrollmode; b96: 60 93 dc 01 sts 0x01DC, r22 gScroll = 0; b9a: 10 92 0a 02 sts 0x020A, r1 gLCD_Update_Required = update; b9e: 90 93 8a 01 sts 0x018A, r25 } ba2: 08 95 ret 00000ba4 : void LCD_putc(uint8_t digit, char character) { if (digit < TEXTBUFFER_SIZE) ba4: 89 31 cpi r24, 0x19 ; 25 ba6: 28 f4 brcc .+10 ; 0xbb2 gTextBuffer[digit] = character; ba8: e8 2f mov r30, r24 baa: f0 e0 ldi r31, 0x00 ; 0 bac: ef 50 subi r30, 0x0F ; 15 bae: fe 4f sbci r31, 0xFE ; 254 bb0: 60 83 st Z, r22 bb2: 08 95 ret 00000bb4 : } void LCD_ShowTime(uint32 tmr) { bb4: 6f 92 push r6 bb6: 7f 92 push r7 bb8: 8f 92 push r8 bba: 9f 92 push r9 bbc: af 92 push r10 bbe: bf 92 push r11 bc0: cf 92 push r12 bc2: df 92 push r13 bc4: ef 92 push r14 bc6: ff 92 push r15 bc8: 0f 93 push r16 bca: 1f 93 push r17 bcc: df 93 push r29 bce: cf 93 push r28 bd0: 00 d0 rcall .+0 ; 0xbd2 bd2: 00 d0 rcall .+0 ; 0xbd4 bd4: 00 d0 rcall .+0 ; 0xbd6 bd6: cd b7 in r28, 0x3d ; 61 bd8: de b7 in r29, 0x3e ; 62 bda: 5b 01 movw r10, r22 bdc: 6c 01 movw r12, r24 uint hours = tmr / 360000; bde: 20 e4 ldi r18, 0x40 ; 64 be0: 3e e7 ldi r19, 0x7E ; 126 be2: 45 e0 ldi r20, 0x05 ; 5 be4: 50 e0 ldi r21, 0x00 ; 0 be6: 99 d6 rcall .+3378 ; 0x191a <__udivmodsi4> be8: 39 01 movw r6, r18 bea: 4a 01 movw r8, r20 tmr = tmr - hours*360000; bec: b9 01 movw r22, r18 bee: 80 e0 ldi r24, 0x00 ; 0 bf0: 90 e0 ldi r25, 0x00 ; 0 bf2: 20 ec ldi r18, 0xC0 ; 192 bf4: 31 e8 ldi r19, 0x81 ; 129 bf6: 4a ef ldi r20, 0xFA ; 250 bf8: 5f ef ldi r21, 0xFF ; 255 bfa: 49 d6 rcall .+3218 ; 0x188e <__mulsi3> bfc: 7b 01 movw r14, r22 bfe: 8c 01 movw r16, r24 c00: ea 0c add r14, r10 c02: fb 1c adc r15, r11 c04: 0c 1d adc r16, r12 c06: 1d 1d adc r17, r13 uint minutes = tmr / 6000; c08: c8 01 movw r24, r16 c0a: b7 01 movw r22, r14 c0c: 20 e7 ldi r18, 0x70 ; 112 c0e: 37 e1 ldi r19, 0x17 ; 23 c10: 40 e0 ldi r20, 0x00 ; 0 c12: 50 e0 ldi r21, 0x00 ; 0 c14: 82 d6 rcall .+3332 ; 0x191a <__udivmodsi4> c16: 59 01 movw r10, r18 c18: 6a 01 movw r12, r20 tmr = tmr - minutes*6000; uint seconds = tmr / 100; c1a: 80 e7 ldi r24, 0x70 ; 112 c1c: 97 e1 ldi r25, 0x17 ; 23 c1e: 9c 01 movw r18, r24 c20: 2a 9d mul r18, r10 c22: c0 01 movw r24, r0 c24: 2b 9d mul r18, r11 c26: 90 0d add r25, r0 c28: 3a 9d mul r19, r10 c2a: 90 0d add r25, r0 c2c: 11 24 eor r1, r1 c2e: a0 e0 ldi r26, 0x00 ; 0 c30: b0 e0 ldi r27, 0x00 ; 0 c32: e8 1a sub r14, r24 c34: f9 0a sbc r15, r25 c36: 0a 0b sbc r16, r26 c38: 1b 0b sbc r17, r27 c3a: c8 01 movw r24, r16 c3c: b7 01 movw r22, r14 c3e: 24 e6 ldi r18, 0x64 ; 100 c40: 30 e0 ldi r19, 0x00 ; 0 c42: 40 e0 ldi r20, 0x00 ; 0 c44: 50 e0 ldi r21, 0x00 ; 0 c46: 69 d6 rcall .+3282 ; 0x191a <__udivmodsi4> c48: 89 01 movw r16, r18 c4a: 9a 01 movw r18, r20 tmr = tmr - seconds*100; uint8 digits[6]; digits[0] = hours/10; c4c: c3 01 movw r24, r6 c4e: 6a e0 ldi r22, 0x0A ; 10 c50: 70 e0 ldi r23, 0x00 ; 0 c52: 3c d6 rcall .+3192 ; 0x18cc <__udivmodhi4> c54: 69 83 std Y+1, r22 ; 0x01 digits[1] = hours%10; c56: c3 01 movw r24, r6 c58: 6a e0 ldi r22, 0x0A ; 10 c5a: 70 e0 ldi r23, 0x00 ; 0 c5c: 37 d6 rcall .+3182 ; 0x18cc <__udivmodhi4> c5e: 8a 83 std Y+2, r24 ; 0x02 digits[2] = minutes/10; c60: c5 01 movw r24, r10 c62: 6a e0 ldi r22, 0x0A ; 10 c64: 70 e0 ldi r23, 0x00 ; 0 c66: 32 d6 rcall .+3172 ; 0x18cc <__udivmodhi4> c68: 6b 83 std Y+3, r22 ; 0x03 digits[3] = minutes%10; c6a: c5 01 movw r24, r10 c6c: 6a e0 ldi r22, 0x0A ; 10 c6e: 70 e0 ldi r23, 0x00 ; 0 c70: 2d d6 rcall .+3162 ; 0x18cc <__udivmodhi4> c72: 8c 83 std Y+4, r24 ; 0x04 digits[4] = seconds/10; c74: c8 01 movw r24, r16 c76: 6a e0 ldi r22, 0x0A ; 10 c78: 70 e0 ldi r23, 0x00 ; 0 c7a: 28 d6 rcall .+3152 ; 0x18cc <__udivmodhi4> c7c: 6d 83 std Y+5, r22 ; 0x05 digits[5] = seconds%10; c7e: c8 01 movw r24, r16 c80: 6a e0 ldi r22, 0x0A ; 10 c82: 70 e0 ldi r23, 0x00 ; 0 c84: 23 d6 rcall .+3142 ; 0x18cc <__udivmodhi4> c86: 8e 83 std Y+6, r24 ; 0x06 c88: 7e 01 movw r14, r28 c8a: 08 94 sec c8c: e1 1c adc r14, r1 c8e: f1 1c adc r15, r1 c90: 87 01 movw r16, r14 for (uint8 i = 0; i < 6; ++i) c92: 87 e0 ldi r24, 0x07 ; 7 c94: c8 2e mov r12, r24 c96: d1 2c mov r13, r1 c98: cc 0e add r12, r28 c9a: dd 1e adc r13, r29 { LCD_putc(i, '0' + digits[i]); c9c: 80 2f mov r24, r16 c9e: 8e 19 sub r24, r14 ca0: f8 01 movw r30, r16 ca2: 61 91 ld r22, Z+ ca4: 8f 01 movw r16, r30 ca6: 60 5d subi r22, 0xD0 ; 208 ca8: 7d df rcall .-262 ; 0xba4 digits[2] = minutes/10; digits[3] = minutes%10; digits[4] = seconds/10; digits[5] = seconds%10; for (uint8 i = 0; i < 6; ++i) caa: 0c 15 cp r16, r12 cac: 1d 05 cpc r17, r13 cae: b1 f7 brne .-20 ; 0xc9c { LCD_putc(i, '0' + digits[i]); } LCD_putc(6, '\0'); cb0: 86 e0 ldi r24, 0x06 ; 6 cb2: 60 e0 ldi r22, 0x00 ; 0 cb4: 77 df rcall .-274 ; 0xba4 LCD_UpdateRequired(1, 0); cb6: 81 e0 ldi r24, 0x01 ; 1 cb8: 60 e0 ldi r22, 0x00 ; 0 cba: 68 df rcall .-304 ; 0xb8c } cbc: 26 96 adiw r28, 0x06 ; 6 cbe: 0f b6 in r0, 0x3f ; 63 cc0: f8 94 cli cc2: de bf out 0x3e, r29 ; 62 cc4: 0f be out 0x3f, r0 ; 63 cc6: cd bf out 0x3d, r28 ; 61 cc8: cf 91 pop r28 cca: df 91 pop r29 ccc: 1f 91 pop r17 cce: 0f 91 pop r16 cd0: ff 90 pop r15 cd2: ef 90 pop r14 cd4: df 90 pop r13 cd6: cf 90 pop r12 cd8: bf 90 pop r11 cda: af 90 pop r10 cdc: 9f 90 pop r9 cde: 8f 90 pop r8 ce0: 7f 90 pop r7 ce2: 6f 90 pop r6 ce4: 08 95 ret 00000ce6 : } #include #include "printf.h" int LCD_printf(const char * format, ...) { ce6: ef 92 push r14 ce8: ff 92 push r15 cea: 0f 93 push r16 cec: 1f 93 push r17 cee: df 93 push r29 cf0: cf 93 push r28 cf2: cd b7 in r28, 0x3d ; 61 cf4: de b7 in r29, 0x3e ; 62 cf6: 69 97 sbiw r28, 0x19 ; 25 cf8: 0f b6 in r0, 0x3f ; 63 cfa: f8 94 cli cfc: de bf out 0x3e, r29 ; 62 cfe: 0f be out 0x3f, r0 ; 63 d00: cd bf out 0x3d, r28 ; 61 d02: fe 01 movw r30, r28 d04: b2 96 adiw r30, 0x22 ; 34 d06: 61 91 ld r22, Z+ d08: 71 91 ld r23, Z+ char buffer[TEXTBUFFER_SIZE]; va_list args; va_start(args, format); int result = vsprintf(buffer, format, args); d0a: 7e 01 movw r14, r28 d0c: 08 94 sec d0e: e1 1c adc r14, r1 d10: f1 1c adc r15, r1 d12: c7 01 movw r24, r14 d14: af 01 movw r20, r30 d16: 3d d2 rcall .+1146 ; 0x1192 d18: 8c 01 movw r16, r24 LCD_puts(buffer); d1a: c7 01 movw r24, r14 d1c: 04 df rcall .-504 ; 0xb26 return result; } d1e: c8 01 movw r24, r16 d20: 69 96 adiw r28, 0x19 ; 25 d22: 0f b6 in r0, 0x3f ; 63 d24: f8 94 cli d26: de bf out 0x3e, r29 ; 62 d28: 0f be out 0x3f, r0 ; 63 d2a: cd bf out 0x3d, r28 ; 61 d2c: cf 91 pop r28 d2e: df 91 pop r29 d30: 1f 91 pop r17 d32: 0f 91 pop r16 d34: ff 90 pop r15 d36: ef 90 pop r14 d38: 08 95 ret 00000d3a : uint8 ParseCommand() { d3a: af 92 push r10 d3c: bf 92 push r11 d3e: cf 92 push r12 d40: df 92 push r13 d42: ef 92 push r14 d44: ff 92 push r15 d46: 0f 93 push r16 d48: 1f 93 push r17 d4a: df 93 push r29 d4c: cf 93 push r28 d4e: cd b7 in r28, 0x3d ; 61 d50: de b7 in r29, 0x3e ; 62 d52: 2a 97 sbiw r28, 0x0a ; 10 d54: 0f b6 in r0, 0x3f ; 63 d56: f8 94 cli d58: de bf out 0x3e, r29 ; 62 d5a: 0f be out 0x3f, r0 ; 63 d5c: cd bf out 0x3d, r28 ; 61 //return 0; USART_Tx('#'); d5e: 83 e2 ldi r24, 0x23 ; 35 d60: dc d2 rcall .+1464 ; 0x131a char c = USART_Rx(); d62: e4 d2 rcall .+1480 ; 0x132c d64: d8 2e mov r13, r24 //LCD_puts("input"); char arg[MAX_TOKEN_SIZE]; USART_Tx(c); d66: d9 d2 rcall .+1458 ; 0x131a d68: cc 24 eor r12, r12 uint8 i = 0; do { arg[i] = USART_Rx(); d6a: 5e 01 movw r10, r28 d6c: 08 94 sec d6e: a1 1c adc r10, r1 d70: b1 1c adc r11, r1 d72: ec 2c mov r14, r12 d74: ff 24 eor r15, r15 d76: da d2 rcall .+1460 ; 0x132c d78: 85 01 movw r16, r10 d7a: 0e 0d add r16, r14 d7c: 1f 1d adc r17, r15 d7e: d8 01 movw r26, r16 d80: 8c 93 st X, r24 USART_Tx(arg[i]); d82: cb d2 rcall .+1430 ; 0x131a switch (arg[i]) d84: f8 01 movw r30, r16 d86: 00 81 ld r16, Z d88: 0d 30 cpi r16, 0x0D ; 13 d8a: 49 f0 breq .+18 ; 0xd9e d8c: 0e 30 cpi r16, 0x0E ; 14 d8e: 18 f4 brcc .+6 ; 0xd96 d90: 0a 30 cpi r16, 0x0A ; 10 d92: 49 f4 brne .+18 ; 0xda6 d94: 04 c0 rjmp .+8 ; 0xd9e d96: 00 32 cpi r16, 0x20 ; 32 d98: 39 f0 breq .+14 ; 0xda8 d9a: 0b 33 cpi r16, 0x3B ; 59 d9c: 21 f4 brne .+8 ; 0xda6 case ' ': break; case ';': case '\r': case '\n': arg[i] = '\0'; d9e: ea 0c add r14, r10 da0: fb 1c adc r15, r11 da2: d7 01 movw r26, r14 da4: 1c 92 st X, r1 default: ++i; da6: c3 94 inc r12 break; } } while ((arg[i-1] != '\0') && (i < MAX_TOKEN_SIZE)); da8: ec 2c mov r14, r12 daa: ff 24 eor r15, r15 dac: 87 01 movw r16, r14 dae: 01 50 subi r16, 0x01 ; 1 db0: 10 40 sbci r17, 0x00 ; 0 db2: f5 01 movw r30, r10 db4: e0 0f add r30, r16 db6: f1 1f adc r31, r17 db8: 80 81 ld r24, Z dba: 88 23 and r24, r24 dbc: 19 f0 breq .+6 ; 0xdc4 dbe: b9 e0 ldi r27, 0x09 ; 9 dc0: bc 15 cp r27, r12 dc2: b8 f6 brcc .-82 ; 0xd72 USART_printf("\r\n"); dc4: 00 d0 rcall .+0 ; 0xdc6 dc6: 80 e8 ldi r24, 0x80 ; 128 dc8: 91 e0 ldi r25, 0x01 ; 1 dca: ed b7 in r30, 0x3d ; 61 dcc: fe b7 in r31, 0x3e ; 62 dce: 92 83 std Z+2, r25 ; 0x02 dd0: 81 83 std Z+1, r24 ; 0x01 dd2: bd d2 rcall .+1402 ; 0x134e if (arg[i-1] != '\0') dd4: fe 01 movw r30, r28 dd6: 31 96 adiw r30, 0x01 ; 1 dd8: 0e 0f add r16, r30 dda: 1f 1f adc r17, r31 ddc: 0f 90 pop r0 dde: 0f 90 pop r0 de0: d8 01 movw r26, r16 de2: 8c 91 ld r24, X de4: 88 23 and r24, r24 de6: 69 f0 breq .+26 ; 0xe02 { LCD_puts("?"); de8: 83 e8 ldi r24, 0x83 ; 131 dea: 91 e0 ldi r25, 0x01 ; 1 dec: 9c de rcall .-712 ; 0xb26 USART_printf("?\r\n"); dee: 00 d0 rcall .+0 ; 0xdf0 df0: 85 e8 ldi r24, 0x85 ; 133 df2: 91 e0 ldi r25, 0x01 ; 1 df4: ed b7 in r30, 0x3d ; 61 df6: fe b7 in r31, 0x3e ; 62 df8: 92 83 std Z+2, r25 ; 0x02 dfa: 81 83 std Z+1, r24 ; 0x01 dfc: a8 d2 rcall .+1360 ; 0x134e dfe: 8f ef ldi r24, 0xFF ; 255 e00: 47 c0 rjmp .+142 ; 0xe90 return 255; } arg[i] = '\0'; e02: ee 0d add r30, r14 e04: ff 1d adc r31, r15 e06: 10 82 st Z, r1 command funct = NULL; switch (c) e08: f4 e6 ldi r31, 0x64 ; 100 e0a: df 16 cp r13, r31 e0c: 11 f1 breq .+68 ; 0xe52 e0e: fd 15 cp r31, r13 e10: 50 f0 brcs .+20 ; 0xe26 e12: 81 e2 ldi r24, 0x21 ; 33 e14: d8 16 cp r13, r24 e16: 49 f1 breq .+82 ; 0xe6a e18: a1 e6 ldi r26, 0x61 ; 97 e1a: da 16 cp r13, r26 e1c: 19 f1 breq .+70 ; 0xe64 e1e: bd e0 ldi r27, 0x0D ; 13 e20: db 16 cp r13, r27 e22: 51 f5 brne .+84 ; 0xe78 e24: 10 c0 rjmp .+32 ; 0xe46 e26: e2 e7 ldi r30, 0x72 ; 114 e28: de 16 cp r13, r30 e2a: 69 f0 breq .+26 ; 0xe46 e2c: ed 15 cp r30, r13 e2e: 20 f0 brcs .+8 ; 0xe38 e30: f0 e7 ldi r31, 0x70 ; 112 e32: df 16 cp r13, r31 e34: 09 f5 brne .+66 ; 0xe78 e36: 0a c0 rjmp .+20 ; 0xe4c e38: 84 e7 ldi r24, 0x74 ; 116 e3a: d8 16 cp r13, r24 e3c: 69 f0 breq .+26 ; 0xe58 e3e: a7 e7 ldi r26, 0x77 ; 119 e40: da 16 cp r13, r26 e42: d1 f4 brne .+52 ; 0xe78 e44: 0c c0 rjmp .+24 ; 0xe5e e46: e4 e0 ldi r30, 0x04 ; 4 e48: f3 e0 ldi r31, 0x03 ; 3 e4a: 11 c0 rjmp .+34 ; 0xe6e e4c: ee ea ldi r30, 0xAE ; 174 e4e: f3 e0 ldi r31, 0x03 ; 3 e50: 0e c0 rjmp .+28 ; 0xe6e case 'r': funct = &read_adc; break; case 'p': funct = &poll_adc; break; e52: e6 ed ldi r30, 0xD6 ; 214 e54: f2 e0 ldi r31, 0x02 ; 2 e56: 0b c0 rjmp .+22 ; 0xe6e case 'd': funct = &set_dac; break; e58: e3 e6 ldi r30, 0x63 ; 99 e5a: f2 e0 ldi r31, 0x02 ; 2 e5c: 08 c0 rjmp .+16 ; 0xe6e case 't': funct = &set_timeout; break; e5e: e6 e3 ldi r30, 0x36 ; 54 e60: f2 e0 ldi r31, 0x02 ; 2 e62: 05 c0 rjmp .+10 ; 0xe6e case 'w': funct = &set_delay; break; e64: e9 ea ldi r30, 0xA9 ; 169 e66: f2 e0 ldi r31, 0x02 ; 2 e68: 02 c0 rjmp .+4 ; 0xe6e case 'a': funct = &set_averages; break; e6a: e3 e3 ldi r30, 0x33 ; 51 e6c: f2 e0 ldi r31, 0x02 ; 2 break; default: break; } if (funct == NULL || funct(arg) != 0) e6e: ce 01 movw r24, r28 e70: 01 96 adiw r24, 0x01 ; 1 e72: 09 95 icall e74: 88 23 and r24, r24 e76: 71 f0 breq .+28 ; 0xe94 { LCD_puts("?"); e78: 83 e8 ldi r24, 0x83 ; 131 e7a: 91 e0 ldi r25, 0x01 ; 1 e7c: 54 de rcall .-856 ; 0xb26 USART_printf("?\r\n"); e7e: 00 d0 rcall .+0 ; 0xe80 e80: 85 e8 ldi r24, 0x85 ; 133 e82: 91 e0 ldi r25, 0x01 ; 1 e84: ed b7 in r30, 0x3d ; 61 e86: fe b7 in r31, 0x3e ; 62 e88: 92 83 std Z+2, r25 ; 0x02 e8a: 81 83 std Z+1, r24 ; 0x01 e8c: 60 d2 rcall .+1216 ; 0x134e e8e: 8e ef ldi r24, 0xFE ; 254 e90: 0f 90 pop r0 e92: 0f 90 pop r0 return 254; } return 0; } e94: 2a 96 adiw r28, 0x0a ; 10 e96: 0f b6 in r0, 0x3f ; 63 e98: f8 94 cli e9a: de bf out 0x3e, r29 ; 62 e9c: 0f be out 0x3f, r0 ; 63 e9e: cd bf out 0x3d, r28 ; 61 ea0: cf 91 pop r28 ea2: df 91 pop r29 ea4: 1f 91 pop r17 ea6: 0f 91 pop r16 ea8: ff 90 pop r15 eaa: ef 90 pop r14 eac: df 90 pop r13 eae: cf 90 pop r12 eb0: bf 90 pop r11 eb2: af 90 pop r10 eb4: 08 95 ret 00000eb6 : */ //#include // Needed for modf int luint2str(char * str, uint32 integer) { eb6: 6f 92 push r6 eb8: 7f 92 push r7 eba: 8f 92 push r8 ebc: 9f 92 push r9 ebe: af 92 push r10 ec0: bf 92 push r11 ec2: cf 92 push r12 ec4: df 92 push r13 ec6: ef 92 push r14 ec8: ff 92 push r15 eca: 0f 93 push r16 ecc: 1f 93 push r17 ece: cf 93 push r28 ed0: df 93 push r29 ed2: 3c 01 movw r6, r24 ed4: 5a 01 movw r10, r20 ed6: 6b 01 movw r12, r22 uint8 base = 10; if (integer == 0) ed8: 41 15 cp r20, r1 eda: 51 05 cpc r21, r1 edc: 61 05 cpc r22, r1 ede: 71 05 cpc r23, r1 ee0: 19 f0 breq .+6 ; 0xee8 ee2: 80 e0 ldi r24, 0x00 ; 0 ee4: 90 e0 ldi r25, 0x00 ; 0 ee6: 1e c0 rjmp .+60 ; 0xf24 { str[0] = '0'; ee8: 80 e3 ldi r24, 0x30 ; 48 eea: f3 01 movw r30, r6 eec: 80 83 st Z, r24 str[1] = '\0'; eee: 11 82 std Z+1, r1 ; 0x01 ef0: 41 e0 ldi r20, 0x01 ; 1 ef2: 50 e0 ldi r21, 0x00 ; 0 ef4: 3b c0 rjmp .+118 ; 0xf6c int i = 0; uint remainder; while (integer >= base) { remainder = integer % base; ef6: c6 01 movw r24, r12 ef8: b5 01 movw r22, r10 efa: 2a e0 ldi r18, 0x0A ; 10 efc: 30 e0 ldi r19, 0x00 ; 0 efe: 40 e0 ldi r20, 0x00 ; 0 f00: 50 e0 ldi r21, 0x00 ; 0 f02: 0b d5 rcall .+2582 ; 0x191a <__udivmodsi4> f04: 7b 01 movw r14, r22 f06: 8c 01 movw r16, r24 integer = integer / base; f08: c6 01 movw r24, r12 f0a: b5 01 movw r22, r10 f0c: 2a e0 ldi r18, 0x0A ; 10 f0e: 30 e0 ldi r19, 0x00 ; 0 f10: 40 e0 ldi r20, 0x00 ; 0 f12: 50 e0 ldi r21, 0x00 ; 0 f14: 02 d5 rcall .+2564 ; 0x191a <__udivmodsi4> f16: 59 01 movw r10, r18 f18: 6a 01 movw r12, r20 str[i] = (char)((uint)'0' + remainder); f1a: f0 e3 ldi r31, 0x30 ; 48 f1c: ef 0e add r14, r31 f1e: f4 01 movw r30, r8 f20: e0 82 st Z, r14 ++i; f22: ce 01 movw r24, r28 f24: 43 01 movw r8, r6 f26: 88 0e add r8, r24 f28: 99 1e adc r9, r25 f2a: ec 01 movw r28, r24 f2c: 21 96 adiw r28, 0x01 ; 1 } int i = 0; uint remainder; while (integer >= base) f2e: fa e0 ldi r31, 0x0A ; 10 f30: af 16 cp r10, r31 f32: b1 04 cpc r11, r1 f34: c1 04 cpc r12, r1 f36: d1 04 cpc r13, r1 f38: f0 f6 brcc .-68 ; 0xef6 ++i; } if (integer != 0) { str[i] = (char)((uint)'0' + integer); f3a: 8a 2d mov r24, r10 f3c: 80 5d subi r24, 0xD0 ; 208 f3e: f4 01 movw r30, r8 f40: 80 83 st Z, r24 ++i; f42: ae 01 movw r20, r28 } //reverse the string for (int j = 0; j < i/2; ++j) f44: be 01 movw r22, r28 f46: 75 95 asr r23 f48: 67 95 ror r22 f4a: d3 01 movw r26, r6 f4c: 20 e0 ldi r18, 0x00 ; 0 f4e: 30 e0 ldi r19, 0x00 ; 0 f50: 07 c0 rjmp .+14 ; 0xf60 { char t = str[j]; f52: 9c 91 ld r25, X str[j] = str[i - 1 - j]; f54: 80 81 ld r24, Z f56: 8d 93 st X+, r24 str[i -1 - j] = t; f58: 90 83 st Z, r25 str[i] = (char)((uint)'0' + integer); ++i; } //reverse the string for (int j = 0; j < i/2; ++j) f5a: 2f 5f subi r18, 0xFF ; 255 f5c: 3f 4f sbci r19, 0xFF ; 255 f5e: 31 97 sbiw r30, 0x01 ; 1 f60: 26 17 cp r18, r22 f62: 37 07 cpc r19, r23 f64: b4 f3 brlt .-20 ; 0xf52 { char t = str[j]; str[j] = str[i - 1 - j]; str[i -1 - j] = t; } str[i] = '\0'; f66: c6 0d add r28, r6 f68: d7 1d adc r29, r7 f6a: 18 82 st Y, r1 return i; } f6c: ca 01 movw r24, r20 f6e: df 91 pop r29 f70: cf 91 pop r28 f72: 1f 91 pop r17 f74: 0f 91 pop r16 f76: ff 90 pop r15 f78: ef 90 pop r14 f7a: df 90 pop r13 f7c: cf 90 pop r12 f7e: bf 90 pop r11 f80: af 90 pop r10 f82: 9f 90 pop r9 f84: 8f 90 pop r8 f86: 7f 90 pop r7 f88: 6f 90 pop r6 f8a: 08 95 ret 00000f8c : int uint2str(char * str, uint integer) { f8c: ef 92 push r14 f8e: ff 92 push r15 f90: 0f 93 push r16 f92: 1f 93 push r17 f94: cf 93 push r28 f96: df 93 push r29 f98: 7c 01 movw r14, r24 f9a: fb 01 movw r30, r22 uint8 base = 10; if (integer == 0) f9c: 61 15 cp r22, r1 f9e: 71 05 cpc r23, r1 fa0: 19 f0 breq .+6 ; 0xfa8 fa2: 80 e0 ldi r24, 0x00 ; 0 fa4: 90 e0 ldi r25, 0x00 ; 0 fa6: 16 c0 rjmp .+44 ; 0xfd4 { str[0] = '0'; fa8: 80 e3 ldi r24, 0x30 ; 48 faa: d7 01 movw r26, r14 fac: 8c 93 st X, r24 str[1] = '\0'; fae: 11 96 adiw r26, 0x01 ; 1 fb0: 1c 92 st X, r1 fb2: 41 e0 ldi r20, 0x01 ; 1 fb4: 50 e0 ldi r21, 0x00 ; 0 fb6: 2f c0 rjmp .+94 ; 0x1016 int i = 0; uint remainder; while (integer >= base) { remainder = integer % base; fb8: cf 01 movw r24, r30 fba: 6a e0 ldi r22, 0x0A ; 10 fbc: 70 e0 ldi r23, 0x00 ; 0 fbe: 86 d4 rcall .+2316 ; 0x18cc <__udivmodhi4> fc0: 9c 01 movw r18, r24 integer = integer / base; fc2: cf 01 movw r24, r30 fc4: 6a e0 ldi r22, 0x0A ; 10 fc6: 70 e0 ldi r23, 0x00 ; 0 fc8: 81 d4 rcall .+2306 ; 0x18cc <__udivmodhi4> fca: fb 01 movw r30, r22 str[i] = (char)((uint)'0' + remainder); fcc: 20 5d subi r18, 0xD0 ; 208 fce: d8 01 movw r26, r16 fd0: 2c 93 st X, r18 ++i; fd2: ce 01 movw r24, r28 fd4: 87 01 movw r16, r14 fd6: 08 0f add r16, r24 fd8: 19 1f adc r17, r25 fda: ec 01 movw r28, r24 fdc: 21 96 adiw r28, 0x01 ; 1 } int i = 0; uint remainder; while (integer >= base) fde: ea 30 cpi r30, 0x0A ; 10 fe0: f1 05 cpc r31, r1 fe2: 50 f7 brcc .-44 ; 0xfb8 ++i; } if (integer != 0) { str[i] = (char)((uint)'0' + integer); fe4: 8e 2f mov r24, r30 fe6: 80 5d subi r24, 0xD0 ; 208 fe8: f8 01 movw r30, r16 fea: 80 83 st Z, r24 ++i; fec: ae 01 movw r20, r28 } //reverse the string for (int j = 0; j < i/2; ++j) fee: be 01 movw r22, r28 ff0: 75 95 asr r23 ff2: 67 95 ror r22 ff4: d7 01 movw r26, r14 ff6: 20 e0 ldi r18, 0x00 ; 0 ff8: 30 e0 ldi r19, 0x00 ; 0 ffa: 07 c0 rjmp .+14 ; 0x100a { char t = str[j]; ffc: 9c 91 ld r25, X str[j] = str[i - 1 - j]; ffe: 80 81 ld r24, Z 1000: 8d 93 st X+, r24 str[i -1 - j] = t; 1002: 90 83 st Z, r25 str[i] = (char)((uint)'0' + integer); ++i; } //reverse the string for (int j = 0; j < i/2; ++j) 1004: 2f 5f subi r18, 0xFF ; 255 1006: 3f 4f sbci r19, 0xFF ; 255 1008: 31 97 sbiw r30, 0x01 ; 1 100a: 26 17 cp r18, r22 100c: 37 07 cpc r19, r23 100e: b4 f3 brlt .-20 ; 0xffc { char t = str[j]; str[j] = str[i - 1 - j]; str[i -1 - j] = t; } str[i] = '\0'; 1010: ce 0d add r28, r14 1012: df 1d adc r29, r15 1014: 18 82 st Y, r1 return i; } 1016: ca 01 movw r24, r20 1018: df 91 pop r29 101a: cf 91 pop r28 101c: 1f 91 pop r17 101e: 0f 91 pop r16 1020: ff 90 pop r15 1022: ef 90 pop r14 1024: 08 95 ret 00001026 : int int2str(char * str, int integer) { 1026: cf 92 push r12 1028: df 92 push r13 102a: ef 92 push r14 102c: ff 92 push r15 102e: 0f 93 push r16 1030: 1f 93 push r17 1032: cf 93 push r28 1034: df 93 push r29 1036: ec 01 movw r28, r24 1038: 8b 01 movw r16, r22 uint8 base = 10; if (integer == 0) 103a: 61 15 cp r22, r1 103c: 71 05 cpc r23, r1 103e: 21 f0 breq .+8 ; 0x1048 1040: fb 01 movw r30, r22 1042: 80 e0 ldi r24, 0x00 ; 0 1044: 90 e0 ldi r25, 0x00 ; 0 1046: 14 c0 rjmp .+40 ; 0x1070 { str[0] = '0'; 1048: 80 e3 ldi r24, 0x30 ; 48 104a: 88 83 st Y, r24 str[1] = '\0'; 104c: 19 82 std Y+1, r1 ; 0x01 104e: 21 e0 ldi r18, 0x01 ; 1 1050: 30 e0 ldi r19, 0x00 ; 0 1052: 3b c0 rjmp .+118 ; 0x10ca int i = 0; uint remainder; while (integer >= base) { remainder = integer % base; 1054: cf 01 movw r24, r30 1056: 6a e0 ldi r22, 0x0A ; 10 1058: 70 e0 ldi r23, 0x00 ; 0 105a: 4c d4 rcall .+2200 ; 0x18f4 <__divmodhi4> 105c: 9c 01 movw r18, r24 integer = integer / base; 105e: cf 01 movw r24, r30 1060: 6a e0 ldi r22, 0x0A ; 10 1062: 70 e0 ldi r23, 0x00 ; 0 1064: 47 d4 rcall .+2190 ; 0x18f4 <__divmodhi4> 1066: fb 01 movw r30, r22 str[i] = (char)((uint)'0' + remainder); 1068: 20 5d subi r18, 0xD0 ; 208 106a: d7 01 movw r26, r14 106c: 2c 93 st X, r18 ++i; 106e: c6 01 movw r24, r12 1070: 7e 01 movw r14, r28 1072: e8 0e add r14, r24 1074: f9 1e adc r15, r25 1076: 6c 01 movw r12, r24 1078: 08 94 sec 107a: c1 1c adc r12, r1 107c: d1 1c adc r13, r1 negative = TRUE; int i = 0; uint remainder; while (integer >= base) 107e: ea 30 cpi r30, 0x0A ; 10 1080: f1 05 cpc r31, r1 1082: 44 f7 brge .-48 ; 0x1054 ++i; } if (integer != 0) { str[i] = (char)((uint)'0' + integer); 1084: 8e 2f mov r24, r30 1086: 80 5d subi r24, 0xD0 ; 208 1088: f7 01 movw r30, r14 108a: 80 83 st Z, r24 ++i; 108c: 96 01 movw r18, r12 } if (negative == TRUE) 108e: 17 ff sbrs r17, 7 1090: 07 c0 rjmp .+14 ; 0x10a0 { str[i] = '-'; 1092: fe 01 movw r30, r28 1094: ec 0d add r30, r12 1096: fd 1d adc r31, r13 1098: 8d e2 ldi r24, 0x2D ; 45 109a: 80 83 st Z, r24 ++i; 109c: 2f 5f subi r18, 0xFF ; 255 109e: 3f 4f sbci r19, 0xFF ; 255 } //reverse the string for (int j = 0; j < i/2; ++j) 10a0: b9 01 movw r22, r18 10a2: 75 95 asr r23 10a4: 67 95 ror r22 10a6: fe 01 movw r30, r28 } int int2str(char * str, int integer) { 10a8: c2 0f add r28, r18 10aa: d3 1f adc r29, r19 10ac: de 01 movw r26, r28 10ae: 40 e0 ldi r20, 0x00 ; 0 10b0: 50 e0 ldi r21, 0x00 ; 0 10b2: 06 c0 rjmp .+12 ; 0x10c0 } //reverse the string for (int j = 0; j < i/2; ++j) { char t = str[j]; 10b4: 90 81 ld r25, Z str[j] = str[i - 1 - j]; 10b6: 8c 91 ld r24, X 10b8: 81 93 st Z+, r24 str[i -1 - j] = t; 10ba: 9c 93 st X, r25 ++i; } //reverse the string for (int j = 0; j < i/2; ++j) 10bc: 4f 5f subi r20, 0xFF ; 255 10be: 5f 4f sbci r21, 0xFF ; 255 10c0: 11 97 sbiw r26, 0x01 ; 1 10c2: 46 17 cp r20, r22 10c4: 57 07 cpc r21, r23 10c6: b4 f3 brlt .-20 ; 0x10b4 { char t = str[j]; str[j] = str[i - 1 - j]; str[i -1 - j] = t; } str[i] = '\0'; 10c8: 18 82 st Y, r1 return i; } 10ca: c9 01 movw r24, r18 10cc: df 91 pop r29 10ce: cf 91 pop r28 10d0: 1f 91 pop r17 10d2: 0f 91 pop r16 10d4: ff 90 pop r15 10d6: ef 90 pop r14 10d8: df 90 pop r13 10da: cf 90 pop r12 10dc: 08 95 ret 000010de : int float2str(char * str, float flt) { 10de: 6f 92 push r6 10e0: 7f 92 push r7 10e2: 8f 92 push r8 10e4: 9f 92 push r9 10e6: af 92 push r10 10e8: bf 92 push r11 10ea: cf 92 push r12 10ec: df 92 push r13 10ee: ef 92 push r14 10f0: ff 92 push r15 10f2: 0f 93 push r16 10f4: 1f 93 push r17 10f6: 5c 01 movw r10, r24 10f8: 3a 01 movw r6, r20 10fa: 4b 01 movw r8, r22 int places = 100; int intpart = (int)(flt); 10fc: cb 01 movw r24, r22 10fe: ba 01 movw r22, r20 1100: 29 d2 rcall .+1106 ; 0x1554 <__fixsfsi> 1102: 9b 01 movw r18, r22 1104: ac 01 movw r20, r24 1106: 7b 01 movw r14, r22 double decpart = flt - (double)(intpart); int s = int2str(str, intpart); 1108: c5 01 movw r24, r10 110a: b9 01 movw r22, r18 110c: 8c df rcall .-232 ; 0x1026 110e: 6c 01 movw r12, r24 str[s] = '.'; 1110: f5 01 movw r30, r10 1112: e8 0f add r30, r24 1114: f9 1f adc r31, r25 1116: 8e e2 ldi r24, 0x2E ; 46 1118: 80 83 st Z, r24 ++s; 111a: 08 94 sec 111c: c1 1c adc r12, r1 111e: d1 1c adc r13, r1 s += int2str(str+s, (int)(decpart*places)); 1120: ac 0c add r10, r12 1122: bd 1c adc r11, r13 1124: 00 27 eor r16, r16 1126: f7 fc sbrc r15, 7 1128: 00 95 com r16 112a: 10 2f mov r17, r16 112c: c8 01 movw r24, r16 112e: b7 01 movw r22, r14 1130: 44 d2 rcall .+1160 ; 0x15ba <__floatsisf> 1132: 9b 01 movw r18, r22 1134: ac 01 movw r20, r24 1136: c4 01 movw r24, r8 1138: b3 01 movw r22, r6 113a: 3b d1 rcall .+630 ; 0x13b2 <__subsf3> 113c: 20 e0 ldi r18, 0x00 ; 0 113e: 30 e0 ldi r19, 0x00 ; 0 1140: 48 ec ldi r20, 0xC8 ; 200 1142: 52 e4 ldi r21, 0x42 ; 66 1144: ea d2 rcall .+1492 ; 0x171a <__mulsf3> 1146: 06 d2 rcall .+1036 ; 0x1554 <__fixsfsi> 1148: 9b 01 movw r18, r22 114a: ac 01 movw r20, r24 114c: c5 01 movw r24, r10 114e: b9 01 movw r22, r18 1150: 6a df rcall .-300 ; 0x1026 return s; } 1152: 8c 0d add r24, r12 1154: 9d 1d adc r25, r13 1156: 1f 91 pop r17 1158: 0f 91 pop r16 115a: ff 90 pop r15 115c: ef 90 pop r14 115e: df 90 pop r13 1160: cf 90 pop r12 1162: bf 90 pop r11 1164: af 90 pop r10 1166: 9f 90 pop r9 1168: 8f 90 pop r8 116a: 7f 90 pop r7 116c: 6f 90 pop r6 116e: 08 95 ret 00001170 : int str2str(char * str1, char * str2) { 1170: 9c 01 movw r18, r24 1172: 80 e0 ldi r24, 0x00 ; 0 1174: 90 e0 ldi r25, 0x00 ; 0 1176: 02 c0 rjmp .+4 ; 0x117c int i = 0; for (i = 0; str2[i] != '\0'; ++i) { str1[i] = str2[i]; 1178: ec 93 st X, r30 } int str2str(char * str1, char * str2) { int i = 0; for (i = 0; str2[i] != '\0'; ++i) 117a: 01 96 adiw r24, 0x01 ; 1 117c: fb 01 movw r30, r22 117e: e8 0f add r30, r24 1180: f9 1f adc r31, r25 1182: e0 81 ld r30, Z 1184: d9 01 movw r26, r18 1186: a8 0f add r26, r24 1188: b9 1f adc r27, r25 118a: ee 23 and r30, r30 118c: a9 f7 brne .-22 ; 0x1178 { str1[i] = str2[i]; } str1[i] = '\0'; 118e: 1c 92 st X, r1 return i; } 1190: 08 95 ret 00001192 : { int s; int f; s = 0; for (f = 0; format[f] != '\0'; ++f) { if (format[f] == '%') 1192: af 92 push r10 1194: bf 92 push r11 1196: cf 92 push r12 1198: df 92 push r13 119a: ef 92 push r14 119c: ff 92 push r15 119e: 0f 93 push r16 11a0: 1f 93 push r17 11a2: cf 93 push r28 11a4: df 93 push r29 11a6: 7c 01 movw r14, r24 11a8: 5b 01 movw r10, r22 11aa: da 01 movw r26, r20 11ac: c0 e0 ldi r28, 0x00 ; 0 11ae: d0 e0 ldi r29, 0x00 ; 0 11b0: cc 24 eor r12, r12 11b2: dd 24 eor r13, r13 11b4: 5a c0 rjmp .+180 ; 0x126a 11b6: 85 32 cpi r24, 0x25 ; 37 11b8: 09 f0 breq .+2 ; 0x11bc 11ba: 4f c0 rjmp .+158 ; 0x125a { switch (format[f+1]) 11bc: 81 81 ldd r24, Z+1 ; 0x01 11be: 89 36 cpi r24, 0x69 ; 105 11c0: 91 f0 breq .+36 ; 0x11e6 11c2: 8a 36 cpi r24, 0x6A ; 106 11c4: 38 f4 brcc .+14 ; 0x11d4 11c6: 84 36 cpi r24, 0x64 ; 100 11c8: 71 f0 breq .+28 ; 0x11e6 11ca: 86 36 cpi r24, 0x66 ; 102 11cc: 79 f1 breq .+94 ; 0x122c 11ce: 83 36 cpi r24, 0x63 ; 99 11d0: 39 f4 brne .+14 ; 0x11e0 11d2: 38 c0 rjmp .+112 ; 0x1244 11d4: 83 37 cpi r24, 0x73 ; 115 11d6: 01 f1 breq .+64 ; 0x1218 11d8: 85 37 cpi r24, 0x75 ; 117 11da: 29 f0 breq .+10 ; 0x11e6 11dc: 8c 36 cpi r24, 0x6C ; 108 11de: 69 f0 breq .+26 ; 0x11fa 11e0: cf ef ldi r28, 0xFF ; 255 11e2: df ef ldi r29, 0xFF ; 255 11e4: 4d c0 rjmp .+154 ; 0x1280 { case 'd': case 'u': case 'i': { uint integer = va_arg(args, uint); 11e6: 8d 01 movw r16, r26 11e8: 0e 5f subi r16, 0xFE ; 254 11ea: 1f 4f sbci r17, 0xFF ; 255 s += uint2str(str+s, integer); 11ec: 6d 91 ld r22, X+ 11ee: 7c 91 ld r23, X 11f0: c7 01 movw r24, r14 11f2: 8c 0f add r24, r28 11f4: 9d 1f adc r25, r29 11f6: ca de rcall .-620 ; 0xf8c 11f8: 0b c0 rjmp .+22 ; 0x1210 break; } case 'l': { uint32 integer = va_arg(args, uint32); 11fa: 8d 01 movw r16, r26 11fc: 0c 5f subi r16, 0xFC ; 252 11fe: 1f 4f sbci r17, 0xFF ; 255 s += luint2str(str+s, integer); 1200: 4d 91 ld r20, X+ 1202: 5d 91 ld r21, X+ 1204: 6d 91 ld r22, X+ 1206: 7c 91 ld r23, X 1208: c7 01 movw r24, r14 120a: 8c 0f add r24, r28 120c: 9d 1f adc r25, r29 120e: 53 de rcall .-858 ; 0xeb6 1210: c8 0f add r28, r24 1212: d9 1f adc r29, r25 1214: d8 01 movw r26, r16 1216: 1d c0 rjmp .+58 ; 0x1252 break; } case 's': { char * str2 = va_arg(args, char*); 1218: 8d 01 movw r16, r26 121a: 0e 5f subi r16, 0xFE ; 254 121c: 1f 4f sbci r17, 0xFF ; 255 s += str2str(str+s, str2); 121e: 6d 91 ld r22, X+ 1220: 7c 91 ld r23, X 1222: c7 01 movw r24, r14 1224: 8c 0f add r24, r28 1226: 9d 1f adc r25, r29 1228: a3 df rcall .-186 ; 0x1170 122a: f2 cf rjmp .-28 ; 0x1210 break; } case 'f': { float flt = va_arg(args, double); 122c: 8d 01 movw r16, r26 122e: 0c 5f subi r16, 0xFC ; 252 1230: 1f 4f sbci r17, 0xFF ; 255 s += float2str(str+s, flt); 1232: 4d 91 ld r20, X+ 1234: 5d 91 ld r21, X+ 1236: 6d 91 ld r22, X+ 1238: 7c 91 ld r23, X 123a: c7 01 movw r24, r14 123c: 8c 0f add r24, r28 123e: 9d 1f adc r25, r29 1240: 4e df rcall .-356 ; 0x10de 1242: e6 cf rjmp .-52 ; 0x1210 break; } case 'c': str[s] = (char)(va_arg(args, int)); 1244: f7 01 movw r30, r14 1246: ec 0f add r30, r28 1248: fd 1f adc r31, r29 124a: 8c 91 ld r24, X 124c: 80 83 st Z, r24 ++s; 124e: 21 96 adiw r28, 0x01 ; 1 1250: 12 96 adiw r26, 0x02 ; 2 break; case '\0': default: return -1; } ++f; 1252: 08 94 sec 1254: c1 1c adc r12, r1 1256: d1 1c adc r13, r1 1258: 05 c0 rjmp .+10 ; 0x1264 } else { str[s] = format[f]; 125a: f7 01 movw r30, r14 125c: ec 0f add r30, r28 125e: fd 1f adc r31, r29 1260: 80 83 st Z, r24 ++s; 1262: 21 96 adiw r28, 0x01 ; 1 int vsprintf(char * str, const char * format, va_list args) { int s; int f; s = 0; for (f = 0; format[f] != '\0'; ++f) 1264: 08 94 sec 1266: c1 1c adc r12, r1 1268: d1 1c adc r13, r1 126a: f5 01 movw r30, r10 126c: ec 0d add r30, r12 126e: fd 1d adc r31, r13 1270: 80 81 ld r24, Z 1272: 88 23 and r24, r24 1274: 09 f0 breq .+2 ; 0x1278 1276: 9f cf rjmp .-194 ; 0x11b6 { str[s] = format[f]; ++s; } } str[s] = '\0'; 1278: ec 0e add r14, r28 127a: fd 1e adc r15, r29 127c: f7 01 movw r30, r14 127e: 10 82 st Z, r1 return s; } 1280: ce 01 movw r24, r28 1282: df 91 pop r29 1284: cf 91 pop r28 1286: 1f 91 pop r17 1288: 0f 91 pop r16 128a: ff 90 pop r15 128c: ef 90 pop r14 128e: df 90 pop r13 1290: cf 90 pop r12 1292: bf 90 pop r11 1294: af 90 pop r10 1296: 08 95 ret 00001298 : *****************************************************************************/ void Timer0_Init(void) { //mt char i; // uint8_t i; DDRB |= (1<: // mtA // #pragma vector = TIMER0_COMP_vect // __interrupt void TIMER0_COMP_interrupt(void) // SIGNAL(SIG_OUTPUT_COMPARE0) ISR(TIMER0_COMP_vect) { 12aa: 1f 92 push r1 12ac: 0f 92 push r0 12ae: 0f b6 in r0, 0x3f ; 63 12b0: 0f 92 push r0 12b2: 11 24 eor r1, r1 12b4: 8f 93 push r24 12b6: 9f 93 push r25 12b8: af 93 push r26 12ba: bf 93 push r27 setup.elapsed_time += 1; 12bc: 80 91 96 01 lds r24, 0x0196 12c0: 90 91 97 01 lds r25, 0x0197 12c4: a0 91 98 01 lds r26, 0x0198 12c8: b0 91 99 01 lds r27, 0x0199 12cc: 01 96 adiw r24, 0x01 ; 1 12ce: a1 1d adc r26, r1 12d0: b1 1d adc r27, r1 12d2: 80 93 96 01 sts 0x0196, r24 12d6: 90 93 97 01 sts 0x0197, r25 12da: a0 93 98 01 sts 0x0198, r26 12de: b0 93 99 01 sts 0x0199, r27 PORTB ^= (1<: * *****************************************************************************/ void USART_Init(unsigned int baudrate) { // Set baud rate UBRRH = (unsigned char)(baudrate>>8); 12fc: 29 2f mov r18, r25 12fe: 33 27 eor r19, r19 1300: 20 93 c5 00 sts 0x00C5, r18 UBRRL = (unsigned char)baudrate; 1304: 80 93 c4 00 sts 0x00C4, r24 // Disable 2x speed UCSRA = 0; 1308: 10 92 c0 00 sts 0x00C0, r1 // cbiBF(PORTB, 6); // cbiBF(PORTB, 7); #ifdef WITH_TRANSMIT // enabled receive and transmit UCSRB = (1<: * Purpose : Send one byte through the USART * *****************************************************************************/ void USART_Tx(char data) { 131a: 98 2f mov r25, r24 sbiBF(PORTB, 6); 131c: 2e 9a sbi 0x05, 6 ; 5 while (!(UCSRA & (1< UDR = data; 1326: 90 93 c6 00 sts 0x00C6, r25 // cbiBF(PORTB, 6); } 132a: 08 95 ret 0000132c : * Purpose : Receives one byte from the USART * *****************************************************************************/ char USART_Rx(void) { sbiBF(PORTB, 7); 132c: 2f 9a sbi 0x05, 7 ; 5 while (!(UCSRA & (1< // cbiBF(PORTB, 5); return UDR; 1336: 80 91 c6 00 lds r24, 0x00C6 } 133a: 08 95 ret 0000133c : char USART_Poll(void) { if (!(UCSRA & (1< 1344: 80 e0 ldi r24, 0x00 ; 0 1346: 08 95 ret return '\0'; return UDR; 1348: 80 91 c6 00 lds r24, 0x00C6 } 134c: 08 95 ret 0000134e : int USART_printf(const char * format, ...) { 134e: ef 92 push r14 1350: ff 92 push r15 1352: 0f 93 push r16 1354: 1f 93 push r17 1356: df 93 push r29 1358: cf 93 push r28 135a: cd b7 in r28, 0x3d ; 61 135c: de b7 in r29, 0x3e ; 62 135e: c0 55 subi r28, 0x50 ; 80 1360: d0 40 sbci r29, 0x00 ; 0 1362: 0f b6 in r0, 0x3f ; 63 1364: f8 94 cli 1366: de bf out 0x3e, r29 ; 62 1368: 0f be out 0x3f, r0 ; 63 136a: cd bf out 0x3d, r28 ; 61 136c: fe 01 movw r30, r28 136e: e7 5a subi r30, 0xA7 ; 167 1370: ff 4f sbci r31, 0xFF ; 255 1372: 61 91 ld r22, Z+ 1374: 71 91 ld r23, Z+ char buffer[80]; va_list args; va_start(args, format); int result = vsprintf(buffer, format, args); 1376: 8e 01 movw r16, r28 1378: 0f 5f subi r16, 0xFF ; 255 137a: 1f 4f sbci r17, 0xFF ; 255 137c: c8 01 movw r24, r16 137e: af 01 movw r20, r30 1380: 08 df rcall .-496 ; 0x1192 1382: 7c 01 movw r14, r24 1384: 03 c0 rjmp .+6 ; 0x138c va_end(args); for (char * b = buffer; *b != '\0'; ++b) USART_Tx(*b); 1386: c9 df rcall .-110 ; 0x131a va_list args; va_start(args, format); int result = vsprintf(buffer, format, args); va_end(args); for (char * b = buffer; *b != '\0'; ++b) 1388: 0f 5f subi r16, 0xFF ; 255 138a: 1f 4f sbci r17, 0xFF ; 255 138c: f8 01 movw r30, r16 138e: 80 81 ld r24, Z 1390: 88 23 and r24, r24 1392: c9 f7 brne .-14 ; 0x1386 USART_Tx(*b); return result; } 1394: c7 01 movw r24, r14 1396: c0 5b subi r28, 0xB0 ; 176 1398: df 4f sbci r29, 0xFF ; 255 139a: 0f b6 in r0, 0x3f ; 63 139c: f8 94 cli 139e: de bf out 0x3e, r29 ; 62 13a0: 0f be out 0x3f, r0 ; 63 13a2: cd bf out 0x3d, r28 ; 61 13a4: cf 91 pop r28 13a6: df 91 pop r29 13a8: 1f 91 pop r17 13aa: 0f 91 pop r16 13ac: ff 90 pop r15 13ae: ef 90 pop r14 13b0: 08 95 ret 000013b2 <__subsf3>: 13b2: 50 58 subi r21, 0x80 ; 128 000013b4 <__addsf3>: 13b4: bb 27 eor r27, r27 13b6: aa 27 eor r26, r26 13b8: 0e d0 rcall .+28 ; 0x13d6 <__addsf3x> 13ba: 75 c1 rjmp .+746 ; 0x16a6 <__fp_round> 13bc: 66 d1 rcall .+716 ; 0x168a <__fp_pscA> 13be: 30 f0 brcs .+12 ; 0x13cc <__addsf3+0x18> 13c0: 6b d1 rcall .+726 ; 0x1698 <__fp_pscB> 13c2: 20 f0 brcs .+8 ; 0x13cc <__addsf3+0x18> 13c4: 31 f4 brne .+12 ; 0x13d2 <__addsf3+0x1e> 13c6: 9f 3f cpi r25, 0xFF ; 255 13c8: 11 f4 brne .+4 ; 0x13ce <__addsf3+0x1a> 13ca: 1e f4 brtc .+6 ; 0x13d2 <__addsf3+0x1e> 13cc: 5b c1 rjmp .+694 ; 0x1684 <__fp_nan> 13ce: 0e f4 brtc .+2 ; 0x13d2 <__addsf3+0x1e> 13d0: e0 95 com r30 13d2: e7 fb bst r30, 7 13d4: 51 c1 rjmp .+674 ; 0x1678 <__fp_inf> 000013d6 <__addsf3x>: 13d6: e9 2f mov r30, r25 13d8: 77 d1 rcall .+750 ; 0x16c8 <__fp_split3> 13da: 80 f3 brcs .-32 ; 0x13bc <__addsf3+0x8> 13dc: ba 17 cp r27, r26 13de: 62 07 cpc r22, r18 13e0: 73 07 cpc r23, r19 13e2: 84 07 cpc r24, r20 13e4: 95 07 cpc r25, r21 13e6: 18 f0 brcs .+6 ; 0x13ee <__addsf3x+0x18> 13e8: 71 f4 brne .+28 ; 0x1406 <__addsf3x+0x30> 13ea: 9e f5 brtc .+102 ; 0x1452 <__addsf3x+0x7c> 13ec: 8f c1 rjmp .+798 ; 0x170c <__fp_zero> 13ee: 0e f4 brtc .+2 ; 0x13f2 <__addsf3x+0x1c> 13f0: e0 95 com r30 13f2: 0b 2e mov r0, r27 13f4: ba 2f mov r27, r26 13f6: a0 2d mov r26, r0 13f8: 0b 01 movw r0, r22 13fa: b9 01 movw r22, r18 13fc: 90 01 movw r18, r0 13fe: 0c 01 movw r0, r24 1400: ca 01 movw r24, r20 1402: a0 01 movw r20, r0 1404: 11 24 eor r1, r1 1406: ff 27 eor r31, r31 1408: 59 1b sub r21, r25 140a: 99 f0 breq .+38 ; 0x1432 <__addsf3x+0x5c> 140c: 59 3f cpi r21, 0xF9 ; 249 140e: 50 f4 brcc .+20 ; 0x1424 <__addsf3x+0x4e> 1410: 50 3e cpi r21, 0xE0 ; 224 1412: 68 f1 brcs .+90 ; 0x146e <__addsf3x+0x98> 1414: 1a 16 cp r1, r26 1416: f0 40 sbci r31, 0x00 ; 0 1418: a2 2f mov r26, r18 141a: 23 2f mov r18, r19 141c: 34 2f mov r19, r20 141e: 44 27 eor r20, r20 1420: 58 5f subi r21, 0xF8 ; 248 1422: f3 cf rjmp .-26 ; 0x140a <__addsf3x+0x34> 1424: 46 95 lsr r20 1426: 37 95 ror r19 1428: 27 95 ror r18 142a: a7 95 ror r26 142c: f0 40 sbci r31, 0x00 ; 0 142e: 53 95 inc r21 1430: c9 f7 brne .-14 ; 0x1424 <__addsf3x+0x4e> 1432: 7e f4 brtc .+30 ; 0x1452 <__addsf3x+0x7c> 1434: 1f 16 cp r1, r31 1436: ba 0b sbc r27, r26 1438: 62 0b sbc r22, r18 143a: 73 0b sbc r23, r19 143c: 84 0b sbc r24, r20 143e: ba f0 brmi .+46 ; 0x146e <__addsf3x+0x98> 1440: 91 50 subi r25, 0x01 ; 1 1442: a1 f0 breq .+40 ; 0x146c <__addsf3x+0x96> 1444: ff 0f add r31, r31 1446: bb 1f adc r27, r27 1448: 66 1f adc r22, r22 144a: 77 1f adc r23, r23 144c: 88 1f adc r24, r24 144e: c2 f7 brpl .-16 ; 0x1440 <__addsf3x+0x6a> 1450: 0e c0 rjmp .+28 ; 0x146e <__addsf3x+0x98> 1452: ba 0f add r27, r26 1454: 62 1f adc r22, r18 1456: 73 1f adc r23, r19 1458: 84 1f adc r24, r20 145a: 48 f4 brcc .+18 ; 0x146e <__addsf3x+0x98> 145c: 87 95 ror r24 145e: 77 95 ror r23 1460: 67 95 ror r22 1462: b7 95 ror r27 1464: f7 95 ror r31 1466: 9e 3f cpi r25, 0xFE ; 254 1468: 08 f0 brcs .+2 ; 0x146c <__addsf3x+0x96> 146a: b3 cf rjmp .-154 ; 0x13d2 <__addsf3+0x1e> 146c: 93 95 inc r25 146e: 88 0f add r24, r24 1470: 08 f0 brcs .+2 ; 0x1474 <__addsf3x+0x9e> 1472: 99 27 eor r25, r25 1474: ee 0f add r30, r30 1476: 97 95 ror r25 1478: 87 95 ror r24 147a: 08 95 ret 0000147c <__cmpsf2>: 147c: d9 d0 rcall .+434 ; 0x1630 <__fp_cmp> 147e: 08 f4 brcc .+2 ; 0x1482 <__cmpsf2+0x6> 1480: 81 e0 ldi r24, 0x01 ; 1 1482: 08 95 ret 00001484 <__divsf3>: 1484: 0c d0 rcall .+24 ; 0x149e <__divsf3x> 1486: 0f c1 rjmp .+542 ; 0x16a6 <__fp_round> 1488: 07 d1 rcall .+526 ; 0x1698 <__fp_pscB> 148a: 40 f0 brcs .+16 ; 0x149c <__divsf3+0x18> 148c: fe d0 rcall .+508 ; 0x168a <__fp_pscA> 148e: 30 f0 brcs .+12 ; 0x149c <__divsf3+0x18> 1490: 21 f4 brne .+8 ; 0x149a <__divsf3+0x16> 1492: 5f 3f cpi r21, 0xFF ; 255 1494: 19 f0 breq .+6 ; 0x149c <__divsf3+0x18> 1496: f0 c0 rjmp .+480 ; 0x1678 <__fp_inf> 1498: 51 11 cpse r21, r1 149a: 39 c1 rjmp .+626 ; 0x170e <__fp_szero> 149c: f3 c0 rjmp .+486 ; 0x1684 <__fp_nan> 0000149e <__divsf3x>: 149e: 14 d1 rcall .+552 ; 0x16c8 <__fp_split3> 14a0: 98 f3 brcs .-26 ; 0x1488 <__divsf3+0x4> 000014a2 <__divsf3_pse>: 14a2: 99 23 and r25, r25 14a4: c9 f3 breq .-14 ; 0x1498 <__divsf3+0x14> 14a6: 55 23 and r21, r21 14a8: b1 f3 breq .-20 ; 0x1496 <__divsf3+0x12> 14aa: 95 1b sub r25, r21 14ac: 55 0b sbc r21, r21 14ae: bb 27 eor r27, r27 14b0: aa 27 eor r26, r26 14b2: 62 17 cp r22, r18 14b4: 73 07 cpc r23, r19 14b6: 84 07 cpc r24, r20 14b8: 38 f0 brcs .+14 ; 0x14c8 <__divsf3_pse+0x26> 14ba: 9f 5f subi r25, 0xFF ; 255 14bc: 5f 4f sbci r21, 0xFF ; 255 14be: 22 0f add r18, r18 14c0: 33 1f adc r19, r19 14c2: 44 1f adc r20, r20 14c4: aa 1f adc r26, r26 14c6: a9 f3 breq .-22 ; 0x14b2 <__divsf3_pse+0x10> 14c8: 33 d0 rcall .+102 ; 0x1530 <__divsf3_pse+0x8e> 14ca: 0e 2e mov r0, r30 14cc: 3a f0 brmi .+14 ; 0x14dc <__divsf3_pse+0x3a> 14ce: e0 e8 ldi r30, 0x80 ; 128 14d0: 30 d0 rcall .+96 ; 0x1532 <__divsf3_pse+0x90> 14d2: 91 50 subi r25, 0x01 ; 1 14d4: 50 40 sbci r21, 0x00 ; 0 14d6: e6 95 lsr r30 14d8: 00 1c adc r0, r0 14da: ca f7 brpl .-14 ; 0x14ce <__divsf3_pse+0x2c> 14dc: 29 d0 rcall .+82 ; 0x1530 <__divsf3_pse+0x8e> 14de: fe 2f mov r31, r30 14e0: 27 d0 rcall .+78 ; 0x1530 <__divsf3_pse+0x8e> 14e2: 66 0f add r22, r22 14e4: 77 1f adc r23, r23 14e6: 88 1f adc r24, r24 14e8: bb 1f adc r27, r27 14ea: 26 17 cp r18, r22 14ec: 37 07 cpc r19, r23 14ee: 48 07 cpc r20, r24 14f0: ab 07 cpc r26, r27 14f2: b0 e8 ldi r27, 0x80 ; 128 14f4: 09 f0 breq .+2 ; 0x14f8 <__divsf3_pse+0x56> 14f6: bb 0b sbc r27, r27 14f8: 80 2d mov r24, r0 14fa: bf 01 movw r22, r30 14fc: ff 27 eor r31, r31 14fe: 93 58 subi r25, 0x83 ; 131 1500: 5f 4f sbci r21, 0xFF ; 255 1502: 2a f0 brmi .+10 ; 0x150e <__divsf3_pse+0x6c> 1504: 9e 3f cpi r25, 0xFE ; 254 1506: 51 05 cpc r21, r1 1508: 68 f0 brcs .+26 ; 0x1524 <__divsf3_pse+0x82> 150a: b6 c0 rjmp .+364 ; 0x1678 <__fp_inf> 150c: 00 c1 rjmp .+512 ; 0x170e <__fp_szero> 150e: 5f 3f cpi r21, 0xFF ; 255 1510: ec f3 brlt .-6 ; 0x150c <__divsf3_pse+0x6a> 1512: 98 3e cpi r25, 0xE8 ; 232 1514: dc f3 brlt .-10 ; 0x150c <__divsf3_pse+0x6a> 1516: 86 95 lsr r24 1518: 77 95 ror r23 151a: 67 95 ror r22 151c: b7 95 ror r27 151e: f7 95 ror r31 1520: 9f 5f subi r25, 0xFF ; 255 1522: c9 f7 brne .-14 ; 0x1516 <__divsf3_pse+0x74> 1524: 88 0f add r24, r24 1526: 91 1d adc r25, r1 1528: 96 95 lsr r25 152a: 87 95 ror r24 152c: 97 f9 bld r25, 7 152e: 08 95 ret 1530: e1 e0 ldi r30, 0x01 ; 1 1532: 66 0f add r22, r22 1534: 77 1f adc r23, r23 1536: 88 1f adc r24, r24 1538: bb 1f adc r27, r27 153a: 62 17 cp r22, r18 153c: 73 07 cpc r23, r19 153e: 84 07 cpc r24, r20 1540: ba 07 cpc r27, r26 1542: 20 f0 brcs .+8 ; 0x154c <__divsf3_pse+0xaa> 1544: 62 1b sub r22, r18 1546: 73 0b sbc r23, r19 1548: 84 0b sbc r24, r20 154a: ba 0b sbc r27, r26 154c: ee 1f adc r30, r30 154e: 88 f7 brcc .-30 ; 0x1532 <__divsf3_pse+0x90> 1550: e0 95 com r30 1552: 08 95 ret 00001554 <__fixsfsi>: 1554: 04 d0 rcall .+8 ; 0x155e <__fixunssfsi> 1556: 68 94 set 1558: b1 11 cpse r27, r1 155a: d9 c0 rjmp .+434 ; 0x170e <__fp_szero> 155c: 08 95 ret 0000155e <__fixunssfsi>: 155e: bc d0 rcall .+376 ; 0x16d8 <__fp_splitA> 1560: 88 f0 brcs .+34 ; 0x1584 <__fixunssfsi+0x26> 1562: 9f 57 subi r25, 0x7F ; 127 1564: 90 f0 brcs .+36 ; 0x158a <__fixunssfsi+0x2c> 1566: b9 2f mov r27, r25 1568: 99 27 eor r25, r25 156a: b7 51 subi r27, 0x17 ; 23 156c: a0 f0 brcs .+40 ; 0x1596 <__fixunssfsi+0x38> 156e: d1 f0 breq .+52 ; 0x15a4 <__fixunssfsi+0x46> 1570: 66 0f add r22, r22 1572: 77 1f adc r23, r23 1574: 88 1f adc r24, r24 1576: 99 1f adc r25, r25 1578: 1a f0 brmi .+6 ; 0x1580 <__fixunssfsi+0x22> 157a: ba 95 dec r27 157c: c9 f7 brne .-14 ; 0x1570 <__fixunssfsi+0x12> 157e: 12 c0 rjmp .+36 ; 0x15a4 <__fixunssfsi+0x46> 1580: b1 30 cpi r27, 0x01 ; 1 1582: 81 f0 breq .+32 ; 0x15a4 <__fixunssfsi+0x46> 1584: c3 d0 rcall .+390 ; 0x170c <__fp_zero> 1586: b1 e0 ldi r27, 0x01 ; 1 1588: 08 95 ret 158a: c0 c0 rjmp .+384 ; 0x170c <__fp_zero> 158c: 67 2f mov r22, r23 158e: 78 2f mov r23, r24 1590: 88 27 eor r24, r24 1592: b8 5f subi r27, 0xF8 ; 248 1594: 39 f0 breq .+14 ; 0x15a4 <__fixunssfsi+0x46> 1596: b9 3f cpi r27, 0xF9 ; 249 1598: cc f3 brlt .-14 ; 0x158c <__fixunssfsi+0x2e> 159a: 86 95 lsr r24 159c: 77 95 ror r23 159e: 67 95 ror r22 15a0: b3 95 inc r27 15a2: d9 f7 brne .-10 ; 0x159a <__fixunssfsi+0x3c> 15a4: 3e f4 brtc .+14 ; 0x15b4 <__fixunssfsi+0x56> 15a6: 90 95 com r25 15a8: 80 95 com r24 15aa: 70 95 com r23 15ac: 61 95 neg r22 15ae: 7f 4f sbci r23, 0xFF ; 255 15b0: 8f 4f sbci r24, 0xFF ; 255 15b2: 9f 4f sbci r25, 0xFF ; 255 15b4: 08 95 ret 000015b6 <__floatunsisf>: 15b6: e8 94 clt 15b8: 09 c0 rjmp .+18 ; 0x15cc <__floatsisf+0x12> 000015ba <__floatsisf>: 15ba: 97 fb bst r25, 7 15bc: 3e f4 brtc .+14 ; 0x15cc <__floatsisf+0x12> 15be: 90 95 com r25 15c0: 80 95 com r24 15c2: 70 95 com r23 15c4: 61 95 neg r22 15c6: 7f 4f sbci r23, 0xFF ; 255 15c8: 8f 4f sbci r24, 0xFF ; 255 15ca: 9f 4f sbci r25, 0xFF ; 255 15cc: 99 23 and r25, r25 15ce: a9 f0 breq .+42 ; 0x15fa <__floatsisf+0x40> 15d0: f9 2f mov r31, r25 15d2: 96 e9 ldi r25, 0x96 ; 150 15d4: bb 27 eor r27, r27 15d6: 93 95 inc r25 15d8: f6 95 lsr r31 15da: 87 95 ror r24 15dc: 77 95 ror r23 15de: 67 95 ror r22 15e0: b7 95 ror r27 15e2: f1 11 cpse r31, r1 15e4: f8 cf rjmp .-16 ; 0x15d6 <__floatsisf+0x1c> 15e6: fa f4 brpl .+62 ; 0x1626 <__floatsisf+0x6c> 15e8: bb 0f add r27, r27 15ea: 11 f4 brne .+4 ; 0x15f0 <__floatsisf+0x36> 15ec: 60 ff sbrs r22, 0 15ee: 1b c0 rjmp .+54 ; 0x1626 <__floatsisf+0x6c> 15f0: 6f 5f subi r22, 0xFF ; 255 15f2: 7f 4f sbci r23, 0xFF ; 255 15f4: 8f 4f sbci r24, 0xFF ; 255 15f6: 9f 4f sbci r25, 0xFF ; 255 15f8: 16 c0 rjmp .+44 ; 0x1626 <__floatsisf+0x6c> 15fa: 88 23 and r24, r24 15fc: 11 f0 breq .+4 ; 0x1602 <__floatsisf+0x48> 15fe: 96 e9 ldi r25, 0x96 ; 150 1600: 11 c0 rjmp .+34 ; 0x1624 <__floatsisf+0x6a> 1602: 77 23 and r23, r23 1604: 21 f0 breq .+8 ; 0x160e <__floatsisf+0x54> 1606: 9e e8 ldi r25, 0x8E ; 142 1608: 87 2f mov r24, r23 160a: 76 2f mov r23, r22 160c: 05 c0 rjmp .+10 ; 0x1618 <__floatsisf+0x5e> 160e: 66 23 and r22, r22 1610: 71 f0 breq .+28 ; 0x162e <__floatsisf+0x74> 1612: 96 e8 ldi r25, 0x86 ; 134 1614: 86 2f mov r24, r22 1616: 70 e0 ldi r23, 0x00 ; 0 1618: 60 e0 ldi r22, 0x00 ; 0 161a: 2a f0 brmi .+10 ; 0x1626 <__floatsisf+0x6c> 161c: 9a 95 dec r25 161e: 66 0f add r22, r22 1620: 77 1f adc r23, r23 1622: 88 1f adc r24, r24 1624: da f7 brpl .-10 ; 0x161c <__floatsisf+0x62> 1626: 88 0f add r24, r24 1628: 96 95 lsr r25 162a: 87 95 ror r24 162c: 97 f9 bld r25, 7 162e: 08 95 ret 00001630 <__fp_cmp>: 1630: 99 0f add r25, r25 1632: 00 08 sbc r0, r0 1634: 55 0f add r21, r21 1636: aa 0b sbc r26, r26 1638: e0 e8 ldi r30, 0x80 ; 128 163a: fe ef ldi r31, 0xFE ; 254 163c: 16 16 cp r1, r22 163e: 17 06 cpc r1, r23 1640: e8 07 cpc r30, r24 1642: f9 07 cpc r31, r25 1644: c0 f0 brcs .+48 ; 0x1676 <__fp_cmp+0x46> 1646: 12 16 cp r1, r18 1648: 13 06 cpc r1, r19 164a: e4 07 cpc r30, r20 164c: f5 07 cpc r31, r21 164e: 98 f0 brcs .+38 ; 0x1676 <__fp_cmp+0x46> 1650: 62 1b sub r22, r18 1652: 73 0b sbc r23, r19 1654: 84 0b sbc r24, r20 1656: 95 0b sbc r25, r21 1658: 39 f4 brne .+14 ; 0x1668 <__fp_cmp+0x38> 165a: 0a 26 eor r0, r26 165c: 61 f0 breq .+24 ; 0x1676 <__fp_cmp+0x46> 165e: 23 2b or r18, r19 1660: 24 2b or r18, r20 1662: 25 2b or r18, r21 1664: 21 f4 brne .+8 ; 0x166e <__fp_cmp+0x3e> 1666: 08 95 ret 1668: 0a 26 eor r0, r26 166a: 09 f4 brne .+2 ; 0x166e <__fp_cmp+0x3e> 166c: a1 40 sbci r26, 0x01 ; 1 166e: a6 95 lsr r26 1670: 8f ef ldi r24, 0xFF ; 255 1672: 81 1d adc r24, r1 1674: 81 1d adc r24, r1 1676: 08 95 ret 00001678 <__fp_inf>: 1678: 97 f9 bld r25, 7 167a: 9f 67 ori r25, 0x7F ; 127 167c: 80 e8 ldi r24, 0x80 ; 128 167e: 70 e0 ldi r23, 0x00 ; 0 1680: 60 e0 ldi r22, 0x00 ; 0 1682: 08 95 ret 00001684 <__fp_nan>: 1684: 9f ef ldi r25, 0xFF ; 255 1686: 80 ec ldi r24, 0xC0 ; 192 1688: 08 95 ret 0000168a <__fp_pscA>: 168a: 00 24 eor r0, r0 168c: 0a 94 dec r0 168e: 16 16 cp r1, r22 1690: 17 06 cpc r1, r23 1692: 18 06 cpc r1, r24 1694: 09 06 cpc r0, r25 1696: 08 95 ret 00001698 <__fp_pscB>: 1698: 00 24 eor r0, r0 169a: 0a 94 dec r0 169c: 12 16 cp r1, r18 169e: 13 06 cpc r1, r19 16a0: 14 06 cpc r1, r20 16a2: 05 06 cpc r0, r21 16a4: 08 95 ret 000016a6 <__fp_round>: 16a6: 09 2e mov r0, r25 16a8: 03 94 inc r0 16aa: 00 0c add r0, r0 16ac: 11 f4 brne .+4 ; 0x16b2 <__fp_round+0xc> 16ae: 88 23 and r24, r24 16b0: 52 f0 brmi .+20 ; 0x16c6 <__fp_round+0x20> 16b2: bb 0f add r27, r27 16b4: 40 f4 brcc .+16 ; 0x16c6 <__fp_round+0x20> 16b6: bf 2b or r27, r31 16b8: 11 f4 brne .+4 ; 0x16be <__fp_round+0x18> 16ba: 60 ff sbrs r22, 0 16bc: 04 c0 rjmp .+8 ; 0x16c6 <__fp_round+0x20> 16be: 6f 5f subi r22, 0xFF ; 255 16c0: 7f 4f sbci r23, 0xFF ; 255 16c2: 8f 4f sbci r24, 0xFF ; 255 16c4: 9f 4f sbci r25, 0xFF ; 255 16c6: 08 95 ret 000016c8 <__fp_split3>: 16c8: 57 fd sbrc r21, 7 16ca: 90 58 subi r25, 0x80 ; 128 16cc: 44 0f add r20, r20 16ce: 55 1f adc r21, r21 16d0: 59 f0 breq .+22 ; 0x16e8 <__fp_splitA+0x10> 16d2: 5f 3f cpi r21, 0xFF ; 255 16d4: 71 f0 breq .+28 ; 0x16f2 <__fp_splitA+0x1a> 16d6: 47 95 ror r20 000016d8 <__fp_splitA>: 16d8: 88 0f add r24, r24 16da: 97 fb bst r25, 7 16dc: 99 1f adc r25, r25 16de: 61 f0 breq .+24 ; 0x16f8 <__fp_splitA+0x20> 16e0: 9f 3f cpi r25, 0xFF ; 255 16e2: 79 f0 breq .+30 ; 0x1702 <__fp_splitA+0x2a> 16e4: 87 95 ror r24 16e6: 08 95 ret 16e8: 12 16 cp r1, r18 16ea: 13 06 cpc r1, r19 16ec: 14 06 cpc r1, r20 16ee: 55 1f adc r21, r21 16f0: f2 cf rjmp .-28 ; 0x16d6 <__fp_split3+0xe> 16f2: 46 95 lsr r20 16f4: f1 df rcall .-30 ; 0x16d8 <__fp_splitA> 16f6: 08 c0 rjmp .+16 ; 0x1708 <__fp_splitA+0x30> 16f8: 16 16 cp r1, r22 16fa: 17 06 cpc r1, r23 16fc: 18 06 cpc r1, r24 16fe: 99 1f adc r25, r25 1700: f1 cf rjmp .-30 ; 0x16e4 <__fp_splitA+0xc> 1702: 86 95 lsr r24 1704: 71 05 cpc r23, r1 1706: 61 05 cpc r22, r1 1708: 08 94 sec 170a: 08 95 ret 0000170c <__fp_zero>: 170c: e8 94 clt 0000170e <__fp_szero>: 170e: bb 27 eor r27, r27 1710: 66 27 eor r22, r22 1712: 77 27 eor r23, r23 1714: cb 01 movw r24, r22 1716: 97 f9 bld r25, 7 1718: 08 95 ret 0000171a <__mulsf3>: 171a: 0b d0 rcall .+22 ; 0x1732 <__mulsf3x> 171c: c4 cf rjmp .-120 ; 0x16a6 <__fp_round> 171e: b5 df rcall .-150 ; 0x168a <__fp_pscA> 1720: 28 f0 brcs .+10 ; 0x172c <__mulsf3+0x12> 1722: ba df rcall .-140 ; 0x1698 <__fp_pscB> 1724: 18 f0 brcs .+6 ; 0x172c <__mulsf3+0x12> 1726: 95 23 and r25, r21 1728: 09 f0 breq .+2 ; 0x172c <__mulsf3+0x12> 172a: a6 cf rjmp .-180 ; 0x1678 <__fp_inf> 172c: ab cf rjmp .-170 ; 0x1684 <__fp_nan> 172e: 11 24 eor r1, r1 1730: ee cf rjmp .-36 ; 0x170e <__fp_szero> 00001732 <__mulsf3x>: 1732: ca df rcall .-108 ; 0x16c8 <__fp_split3> 1734: a0 f3 brcs .-24 ; 0x171e <__mulsf3+0x4> 00001736 <__mulsf3_pse>: 1736: 95 9f mul r25, r21 1738: d1 f3 breq .-12 ; 0x172e <__mulsf3+0x14> 173a: 95 0f add r25, r21 173c: 50 e0 ldi r21, 0x00 ; 0 173e: 55 1f adc r21, r21 1740: 62 9f mul r22, r18 1742: f0 01 movw r30, r0 1744: 72 9f mul r23, r18 1746: bb 27 eor r27, r27 1748: f0 0d add r31, r0 174a: b1 1d adc r27, r1 174c: 63 9f mul r22, r19 174e: aa 27 eor r26, r26 1750: f0 0d add r31, r0 1752: b1 1d adc r27, r1 1754: aa 1f adc r26, r26 1756: 64 9f mul r22, r20 1758: 66 27 eor r22, r22 175a: b0 0d add r27, r0 175c: a1 1d adc r26, r1 175e: 66 1f adc r22, r22 1760: 82 9f mul r24, r18 1762: 22 27 eor r18, r18 1764: b0 0d add r27, r0 1766: a1 1d adc r26, r1 1768: 62 1f adc r22, r18 176a: 73 9f mul r23, r19 176c: b0 0d add r27, r0 176e: a1 1d adc r26, r1 1770: 62 1f adc r22, r18 1772: 83 9f mul r24, r19 1774: a0 0d add r26, r0 1776: 61 1d adc r22, r1 1778: 22 1f adc r18, r18 177a: 74 9f mul r23, r20 177c: 33 27 eor r19, r19 177e: a0 0d add r26, r0 1780: 61 1d adc r22, r1 1782: 23 1f adc r18, r19 1784: 84 9f mul r24, r20 1786: 60 0d add r22, r0 1788: 21 1d adc r18, r1 178a: 82 2f mov r24, r18 178c: 76 2f mov r23, r22 178e: 6a 2f mov r22, r26 1790: 11 24 eor r1, r1 1792: 9f 57 subi r25, 0x7F ; 127 1794: 50 40 sbci r21, 0x00 ; 0 1796: 8a f0 brmi .+34 ; 0x17ba <__mulsf3_pse+0x84> 1798: e1 f0 breq .+56 ; 0x17d2 <__mulsf3_pse+0x9c> 179a: 88 23 and r24, r24 179c: 4a f0 brmi .+18 ; 0x17b0 <__mulsf3_pse+0x7a> 179e: ee 0f add r30, r30 17a0: ff 1f adc r31, r31 17a2: bb 1f adc r27, r27 17a4: 66 1f adc r22, r22 17a6: 77 1f adc r23, r23 17a8: 88 1f adc r24, r24 17aa: 91 50 subi r25, 0x01 ; 1 17ac: 50 40 sbci r21, 0x00 ; 0 17ae: a9 f7 brne .-22 ; 0x179a <__mulsf3_pse+0x64> 17b0: 9e 3f cpi r25, 0xFE ; 254 17b2: 51 05 cpc r21, r1 17b4: 70 f0 brcs .+28 ; 0x17d2 <__mulsf3_pse+0x9c> 17b6: 60 cf rjmp .-320 ; 0x1678 <__fp_inf> 17b8: aa cf rjmp .-172 ; 0x170e <__fp_szero> 17ba: 5f 3f cpi r21, 0xFF ; 255 17bc: ec f3 brlt .-6 ; 0x17b8 <__mulsf3_pse+0x82> 17be: 98 3e cpi r25, 0xE8 ; 232 17c0: dc f3 brlt .-10 ; 0x17b8 <__mulsf3_pse+0x82> 17c2: 86 95 lsr r24 17c4: 77 95 ror r23 17c6: 67 95 ror r22 17c8: b7 95 ror r27 17ca: f7 95 ror r31 17cc: e7 95 ror r30 17ce: 9f 5f subi r25, 0xFF ; 255 17d0: c1 f7 brne .-16 ; 0x17c2 <__mulsf3_pse+0x8c> 17d2: fe 2b or r31, r30 17d4: 88 0f add r24, r24 17d6: 91 1d adc r25, r1 17d8: 96 95 lsr r25 17da: 87 95 ror r24 17dc: 97 f9 bld r25, 7 17de: 08 95 ret 17e0: 11 f4 brne .+4 ; 0x17e6 <__mulsf3_pse+0xb0> 17e2: 0e f4 brtc .+2 ; 0x17e6 <__mulsf3_pse+0xb0> 17e4: 4f cf rjmp .-354 ; 0x1684 <__fp_nan> 17e6: 3e c0 rjmp .+124 ; 0x1864 <__fp_mpack> 000017e8 : 17e8: 77 df rcall .-274 ; 0x16d8 <__fp_splitA> 17ea: d0 f3 brcs .-12 ; 0x17e0 <__mulsf3_pse+0xaa> 17ec: 99 23 and r25, r25 17ee: d9 f3 breq .-10 ; 0x17e6 <__mulsf3_pse+0xb0> 17f0: ce f3 brts .-14 ; 0x17e4 <__mulsf3_pse+0xae> 17f2: 9f 57 subi r25, 0x7F ; 127 17f4: 55 0b sbc r21, r21 17f6: 87 ff sbrs r24, 7 17f8: 43 d0 rcall .+134 ; 0x1880 <__fp_norm2> 17fa: 00 24 eor r0, r0 17fc: a0 e6 ldi r26, 0x60 ; 96 17fe: 40 ea ldi r20, 0xA0 ; 160 1800: 90 01 movw r18, r0 1802: 80 58 subi r24, 0x80 ; 128 1804: 56 95 lsr r21 1806: 97 95 ror r25 1808: 28 f4 brcc .+10 ; 0x1814 180a: 80 5c subi r24, 0xC0 ; 192 180c: 66 0f add r22, r22 180e: 77 1f adc r23, r23 1810: 88 1f adc r24, r24 1812: 20 f0 brcs .+8 ; 0x181c 1814: 26 17 cp r18, r22 1816: 37 07 cpc r19, r23 1818: 48 07 cpc r20, r24 181a: 30 f4 brcc .+12 ; 0x1828 181c: 62 1b sub r22, r18 181e: 73 0b sbc r23, r19 1820: 84 0b sbc r24, r20 1822: 20 29 or r18, r0 1824: 31 29 or r19, r1 1826: 4a 2b or r20, r26 1828: a6 95 lsr r26 182a: 17 94 ror r1 182c: 07 94 ror r0 182e: 20 25 eor r18, r0 1830: 31 25 eor r19, r1 1832: 4a 27 eor r20, r26 1834: 58 f7 brcc .-42 ; 0x180c 1836: 66 0f add r22, r22 1838: 77 1f adc r23, r23 183a: 88 1f adc r24, r24 183c: 20 f0 brcs .+8 ; 0x1846 183e: 26 17 cp r18, r22 1840: 37 07 cpc r19, r23 1842: 48 07 cpc r20, r24 1844: 30 f4 brcc .+12 ; 0x1852 1846: 62 0b sbc r22, r18 1848: 73 0b sbc r23, r19 184a: 84 0b sbc r24, r20 184c: 20 0d add r18, r0 184e: 31 1d adc r19, r1 1850: 41 1d adc r20, r1 1852: a0 95 com r26 1854: 81 f7 brne .-32 ; 0x1836 1856: b9 01 movw r22, r18 1858: 84 2f mov r24, r20 185a: 91 58 subi r25, 0x81 ; 129 185c: 88 0f add r24, r24 185e: 96 95 lsr r25 1860: 87 95 ror r24 1862: 08 95 ret 00001864 <__fp_mpack>: 1864: 9f 3f cpi r25, 0xFF ; 255 1866: 31 f0 breq .+12 ; 0x1874 <__fp_mpack_finite+0xc> 00001868 <__fp_mpack_finite>: 1868: 91 50 subi r25, 0x01 ; 1 186a: 20 f4 brcc .+8 ; 0x1874 <__fp_mpack_finite+0xc> 186c: 87 95 ror r24 186e: 77 95 ror r23 1870: 67 95 ror r22 1872: b7 95 ror r27 1874: 88 0f add r24, r24 1876: 91 1d adc r25, r1 1878: 96 95 lsr r25 187a: 87 95 ror r24 187c: 97 f9 bld r25, 7 187e: 08 95 ret 00001880 <__fp_norm2>: 1880: 91 50 subi r25, 0x01 ; 1 1882: 50 40 sbci r21, 0x00 ; 0 1884: 66 0f add r22, r22 1886: 77 1f adc r23, r23 1888: 88 1f adc r24, r24 188a: d2 f7 brpl .-12 ; 0x1880 <__fp_norm2> 188c: 08 95 ret 0000188e <__mulsi3>: 188e: 62 9f mul r22, r18 1890: d0 01 movw r26, r0 1892: 73 9f mul r23, r19 1894: f0 01 movw r30, r0 1896: 82 9f mul r24, r18 1898: e0 0d add r30, r0 189a: f1 1d adc r31, r1 189c: 64 9f mul r22, r20 189e: e0 0d add r30, r0 18a0: f1 1d adc r31, r1 18a2: 92 9f mul r25, r18 18a4: f0 0d add r31, r0 18a6: 83 9f mul r24, r19 18a8: f0 0d add r31, r0 18aa: 74 9f mul r23, r20 18ac: f0 0d add r31, r0 18ae: 65 9f mul r22, r21 18b0: f0 0d add r31, r0 18b2: 99 27 eor r25, r25 18b4: 72 9f mul r23, r18 18b6: b0 0d add r27, r0 18b8: e1 1d adc r30, r1 18ba: f9 1f adc r31, r25 18bc: 63 9f mul r22, r19 18be: b0 0d add r27, r0 18c0: e1 1d adc r30, r1 18c2: f9 1f adc r31, r25 18c4: bd 01 movw r22, r26 18c6: cf 01 movw r24, r30 18c8: 11 24 eor r1, r1 18ca: 08 95 ret 000018cc <__udivmodhi4>: 18cc: aa 1b sub r26, r26 18ce: bb 1b sub r27, r27 18d0: 51 e1 ldi r21, 0x11 ; 17 18d2: 07 c0 rjmp .+14 ; 0x18e2 <__udivmodhi4_ep> 000018d4 <__udivmodhi4_loop>: 18d4: aa 1f adc r26, r26 18d6: bb 1f adc r27, r27 18d8: a6 17 cp r26, r22 18da: b7 07 cpc r27, r23 18dc: 10 f0 brcs .+4 ; 0x18e2 <__udivmodhi4_ep> 18de: a6 1b sub r26, r22 18e0: b7 0b sbc r27, r23 000018e2 <__udivmodhi4_ep>: 18e2: 88 1f adc r24, r24 18e4: 99 1f adc r25, r25 18e6: 5a 95 dec r21 18e8: a9 f7 brne .-22 ; 0x18d4 <__udivmodhi4_loop> 18ea: 80 95 com r24 18ec: 90 95 com r25 18ee: bc 01 movw r22, r24 18f0: cd 01 movw r24, r26 18f2: 08 95 ret 000018f4 <__divmodhi4>: 18f4: 97 fb bst r25, 7 18f6: 09 2e mov r0, r25 18f8: 07 26 eor r0, r23 18fa: 0a d0 rcall .+20 ; 0x1910 <__divmodhi4_neg1> 18fc: 77 fd sbrc r23, 7 18fe: 04 d0 rcall .+8 ; 0x1908 <__divmodhi4_neg2> 1900: e5 df rcall .-54 ; 0x18cc <__udivmodhi4> 1902: 06 d0 rcall .+12 ; 0x1910 <__divmodhi4_neg1> 1904: 00 20 and r0, r0 1906: 1a f4 brpl .+6 ; 0x190e <__divmodhi4_exit> 00001908 <__divmodhi4_neg2>: 1908: 70 95 com r23 190a: 61 95 neg r22 190c: 7f 4f sbci r23, 0xFF ; 255 0000190e <__divmodhi4_exit>: 190e: 08 95 ret 00001910 <__divmodhi4_neg1>: 1910: f6 f7 brtc .-4 ; 0x190e <__divmodhi4_exit> 1912: 90 95 com r25 1914: 81 95 neg r24 1916: 9f 4f sbci r25, 0xFF ; 255 1918: 08 95 ret 0000191a <__udivmodsi4>: 191a: a1 e2 ldi r26, 0x21 ; 33 191c: 1a 2e mov r1, r26 191e: aa 1b sub r26, r26 1920: bb 1b sub r27, r27 1922: fd 01 movw r30, r26 1924: 0d c0 rjmp .+26 ; 0x1940 <__udivmodsi4_ep> 00001926 <__udivmodsi4_loop>: 1926: aa 1f adc r26, r26 1928: bb 1f adc r27, r27 192a: ee 1f adc r30, r30 192c: ff 1f adc r31, r31 192e: a2 17 cp r26, r18 1930: b3 07 cpc r27, r19 1932: e4 07 cpc r30, r20 1934: f5 07 cpc r31, r21 1936: 20 f0 brcs .+8 ; 0x1940 <__udivmodsi4_ep> 1938: a2 1b sub r26, r18 193a: b3 0b sbc r27, r19 193c: e4 0b sbc r30, r20 193e: f5 0b sbc r31, r21 00001940 <__udivmodsi4_ep>: 1940: 66 1f adc r22, r22 1942: 77 1f adc r23, r23 1944: 88 1f adc r24, r24 1946: 99 1f adc r25, r25 1948: 1a 94 dec r1 194a: 69 f7 brne .-38 ; 0x1926 <__udivmodsi4_loop> 194c: 60 95 com r22 194e: 70 95 com r23 1950: 80 95 com r24 1952: 90 95 com r25 1954: 9b 01 movw r18, r22 1956: ac 01 movw r20, r24 1958: bd 01 movw r22, r26 195a: cf 01 movw r24, r30 195c: 08 95 ret 0000195e : 195e: fc 01 movw r30, r24 1960: 88 27 eor r24, r24 1962: 99 27 eor r25, r25 1964: e8 94 clt 1966: 21 91 ld r18, Z+ 1968: 20 32 cpi r18, 0x20 ; 32 196a: e9 f3 breq .-6 ; 0x1966 196c: 29 30 cpi r18, 0x09 ; 9 196e: 10 f0 brcs .+4 ; 0x1974 1970: 2e 30 cpi r18, 0x0E ; 14 1972: c8 f3 brcs .-14 ; 0x1966 1974: 2b 32 cpi r18, 0x2B ; 43 1976: 39 f0 breq .+14 ; 0x1986 1978: 2d 32 cpi r18, 0x2D ; 45 197a: 31 f4 brne .+12 ; 0x1988 197c: 68 94 set 197e: 03 c0 rjmp .+6 ; 0x1986 1980: 0b d0 rcall .+22 ; 0x1998 <__mulhi_const_10> 1982: 82 0f add r24, r18 1984: 91 1d adc r25, r1 1986: 21 91 ld r18, Z+ 1988: 20 53 subi r18, 0x30 ; 48 198a: 2a 30 cpi r18, 0x0A ; 10 198c: c8 f3 brcs .-14 ; 0x1980 198e: 1e f4 brtc .+6 ; 0x1996 1990: 90 95 com r25 1992: 81 95 neg r24 1994: 9f 4f sbci r25, 0xFF ; 255 1996: 08 95 ret 00001998 <__mulhi_const_10>: 1998: 7a e0 ldi r23, 0x0A ; 10 199a: 97 9f mul r25, r23 199c: 90 2d mov r25, r0 199e: 87 9f mul r24, r23 19a0: 80 2d mov r24, r0 19a2: 91 0d add r25, r1 19a4: 11 24 eor r1, r1 19a6: 08 95 ret 000019a8 <_exit>: 19a8: f8 94 cli 000019aa <__stop_program>: 19aa: ff cf rjmp .-2 ; 0x19aa <__stop_program>