Test.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .data 000000f2 00800100 000017f6 0000188a 2**0 CONTENTS, ALLOC, LOAD, DATA 1 .text 000017f6 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .bss 00000014 008001f2 008001f2 0000197c 2**0 ALLOC 3 .stab 00001254 00000000 00000000 0000197c 2**2 CONTENTS, READONLY, DEBUGGING 4 .stabstr 0000032e 00000000 00000000 00002bd0 2**0 CONTENTS, READONLY, DEBUGGING 5 .comment 0000002f 00000000 00000000 00002efe 2**0 CONTENTS, READONLY 6 .debug_aranges 00000208 00000000 00000000 00002f2d 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_info 000027cc 00000000 00000000 00003135 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_abbrev 00000fcb 00000000 00000000 00005901 2**0 CONTENTS, READONLY, DEBUGGING 9 .debug_line 000013d8 00000000 00000000 000068cc 2**0 CONTENTS, READONLY, DEBUGGING 10 .debug_frame 000004f8 00000000 00000000 00007ca4 2**2 CONTENTS, READONLY, DEBUGGING 11 .debug_str 000008f9 00000000 00000000 0000819c 2**0 CONTENTS, READONLY, DEBUGGING 12 .debug_loc 0000202b 00000000 00000000 00008a95 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_ranges 00000150 00000000 00000000 0000aac0 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: 0: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__ctors_end> 4: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 8: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 10: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 14: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 18: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 1c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 20: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 24: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 28: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 2c: 0c 94 e1 03 jmp 0x7c2 ; 0x7c2 <__vector_11> 30: 0c 94 09 04 jmp 0x812 ; 0x812 <__vector_12> 34: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 38: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 3c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 40: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 44: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 48: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 4c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 50: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 54: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 58: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 5c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 60: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 64: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 68: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 6c: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 70: 0c 94 86 00 jmp 0x10c ; 0x10c <__bad_interrupt> 00000074 : 74: 12 01 00 02 02 00 00 10 01 00 03 00 00 01 01 02 ................ 84: 03 01 .. 00000086 : 86: 04 03 09 04 .... 0000008a : 8a: 14 03 42 00 6c 00 75 00 62 00 62 00 46 00 69 00 ..B.l.u.b.b.F.i. 9a: 73 00 68 00 00 00 s.h... 000000a0 : a0: 20 03 48 00 61 00 63 00 6b 00 65 00 72 00 2d 00 .H.a.c.k.e.r.-. b0: 4a 00 65 00 6f 00 70 00 61 00 72 00 64 00 79 00 J.e.o.p.a.r.d.y. ... 000000c2 : c2: 0e 03 30 00 30 00 30 00 30 00 30 00 30 00 00 00 ..0.0.0.0.0.0... 000000d2 <__ctors_end>: d2: 11 24 eor r1, r1 d4: 1f be out 0x3f, r1 ; 63 d6: cf ef ldi r28, 0xFF ; 255 d8: d4 e0 ldi r29, 0x04 ; 4 da: de bf out 0x3e, r29 ; 62 dc: cd bf out 0x3d, r28 ; 61 000000de <__do_copy_data>: de: 11 e0 ldi r17, 0x01 ; 1 e0: a0 e0 ldi r26, 0x00 ; 0 e2: b1 e0 ldi r27, 0x01 ; 1 e4: e6 ef ldi r30, 0xF6 ; 246 e6: f7 e1 ldi r31, 0x17 ; 23 e8: 02 c0 rjmp .+4 ; 0xee <__do_copy_data+0x10> ea: 05 90 lpm r0, Z+ ec: 0d 92 st X+, r0 ee: a2 3f cpi r26, 0xF2 ; 242 f0: b1 07 cpc r27, r17 f2: d9 f7 brne .-10 ; 0xea <__do_copy_data+0xc> 000000f4 <__do_clear_bss>: f4: 22 e0 ldi r18, 0x02 ; 2 f6: a2 ef ldi r26, 0xF2 ; 242 f8: b1 e0 ldi r27, 0x01 ; 1 fa: 01 c0 rjmp .+2 ; 0xfe <.do_clear_bss_start> 000000fc <.do_clear_bss_loop>: fc: 1d 92 st X+, r1 000000fe <.do_clear_bss_start>: fe: a6 30 cpi r26, 0x06 ; 6 100: b2 07 cpc r27, r18 102: e1 f7 brne .-8 ; 0xfc <.do_clear_bss_loop> 104: 0e 94 44 02 call 0x488 ; 0x488
108: 0c 94 f9 0b jmp 0x17f2 ; 0x17f2 <_exit> 0000010c <__bad_interrupt>: 10c: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> 00000110 : int rgb = 0; rgb |= (mask & (1<<0)) ? (1<<0) : (0<<0); rgb |= (mask & (1<<1)) ? (1<<1) : (0<<1); rgb |= (mask & (1<<2)) ? (1<<2) : (0<<2); PORTB &= ~((1<: } void init_led() { DDRB |= (1<: #include "rs232.h" int uart_putchar(char c, FILE *stream) { 12c: cf 93 push r28 12e: c8 2f mov r28, r24 if (c == '\n') { 130: 8a 30 cpi r24, 0x0A ; 10 132: 19 f4 brne .+6 ; 0x13a uart_putchar('\r', stream); //Warten solange bis Zeichen gesendet wurde 134: 8d e0 ldi r24, 0x0D ; 13 136: 0e 94 96 00 call 0x12c ; 0x12c } loop_until_bit_is_set(UCSR1A, UDRE1); //Ausgabe des Zeichens 13a: e8 ec ldi r30, 0xC8 ; 200 13c: f0 e0 ldi r31, 0x00 ; 0 13e: 90 81 ld r25, Z 140: 95 ff sbrs r25, 5 142: fd cf rjmp .-6 ; 0x13e UDR1 = c; 144: c0 93 ce 00 sts 0x00CE, r28 return (0); } 148: 80 e0 ldi r24, 0x00 ; 0 14a: 90 e0 ldi r25, 0x00 ; 0 14c: cf 91 pop r28 14e: 08 95 ret 00000150 : void init_rs232() { UCSR1C = (1 << UCSZ11) |(1 << UCSZ10); //8N1 150: 86 e0 ldi r24, 0x06 ; 6 152: 80 93 ca 00 sts 0x00CA, r24 UCSR1B |= /*(1<: #include "usb_serial_config.h" // USB configuration #include "usb_serial.h" void init() { init_led(); 174: 0e 94 92 00 call 0x124 ; 0x124 ledg(YELLOW); 178: 86 e0 ldi r24, 0x06 ; 6 17a: 90 e0 ldi r25, 0x00 ; 0 17c: 0e 94 88 00 call 0x110 ; 0x110 ledg(WHITE); 180: 87 e0 ldi r24, 0x07 ; 7 182: 90 e0 ldi r25, 0x00 ; 0 184: 0e 94 88 00 call 0x110 ; 0x110 init_rs232(); 188: 0e 94 a8 00 call 0x150 ; 0x150 ledg(YELLOW); 18c: 86 e0 ldi r24, 0x06 ; 6 18e: 90 e0 ldi r25, 0x00 ; 0 190: 0e 94 88 00 call 0x110 ; 0x110 usb_init(); // initialize USB 194: 0e 94 9f 02 call 0x53e ; 0x53e sei(); 198: 78 94 sei fprintf(&rs232, "Init....\n"); 19a: 2e e0 ldi r18, 0x0E ; 14 19c: 31 e0 ldi r19, 0x01 ; 1 19e: 49 e0 ldi r20, 0x09 ; 9 1a0: 50 e0 ldi r21, 0x00 ; 0 1a2: 61 e0 ldi r22, 0x01 ; 1 1a4: 70 e0 ldi r23, 0x00 ; 0 1a6: 8f e6 ldi r24, 0x6F ; 111 1a8: 91 e0 ldi r25, 0x01 ; 1 1aa: 0e 94 a0 08 call 0x1140 ; 0x1140 1ae: 08 95 ret 000001b0 : //----------------------------------------------------------------------------- // This routine is called, when baudrate and transmission parameters (see // cdc_linecoding in usb_serial.h) are requested by the host. // Parameters of this variable can be modified in this routine, before they // will be sent to host. { 1b0: 08 95 ret 000001b2 : void cdc_notify_setlinecoding(void) //----------------------------------------------------------------------------- // This routine is called, when baudrate and transmission parameters (see // cdc_linecoding in usb_serial.h) are set by the host. // New settings are available in this variable, when this routine is called. { 1b2: 08 95 ret 000001b4 : //----------------------------------------------------------------------------- // This routine is called, when host is changing handshake output lines RTS and // DTR. // New settings are available in the global variable cdc_rtsdtr (see // usb_serial.h). { 1b4: 08 95 ret 000001b6 : //----------------------------------------------------------------------------- void usb_ep(uint8_t endpoint, uint16_t datasize) //----------------------------------------------------------------------------- // handle of endpoint interrupt for incoming data // "datasize" contains the number od bytes in the USB FIFO buffer { 1b6: 0f 93 push r16 1b8: 1f 93 push r17 1ba: cf 93 push r28 1bc: df 93 push r29 1be: cd b7 in r28, 0x3d ; 61 1c0: de b7 in r29, 0x3e ; 62 1c2: c8 54 subi r28, 0x48 ; 72 1c4: d1 09 sbc r29, r1 1c6: 0f b6 in r0, 0x3f ; 63 1c8: f8 94 cli 1ca: de bf out 0x3e, r29 ; 62 1cc: 0f be out 0x3f, r0 ; 63 1ce: cd bf out 0x3d, r28 ; 61 char r[32]; // use endpoint buffer size (= maximum length of one transfered string) char t[32]; char s[8]; uint8_t n; if (endpoint==CDC_RX_ENDPOINT) { 1d0: 83 30 cpi r24, 0x03 ; 3 1d2: 09 f0 breq .+2 ; 0x1d6 1d4: 4d c1 rjmp .+666 ; 0x470 // serial data received n=usb_rxdata(endpoint,(unsigned char *)r,sizeof(r)); // read data into buffer 1d6: 40 e2 ldi r20, 0x20 ; 32 1d8: be 01 movw r22, r28 1da: 6f 5f subi r22, 0xFF ; 255 1dc: 7f 4f sbci r23, 0xFF ; 255 1de: 0e 94 9c 03 call 0x738 ; 0x738 // parse command and prepare response t[0]=0; // clear response string buffer 1e2: 19 a2 std Y+33, r1 ; 0x21 switch (r[0]) { // 1st byte is command 1e4: 89 81 ldd r24, Y+1 ; 0x01 1e6: 88 36 cpi r24, 0x68 ; 104 1e8: 69 f0 breq .+26 ; 0x204 1ea: 30 f4 brcc .+12 ; 0x1f8 1ec: 8f 33 cpi r24, 0x3F ; 63 1ee: 51 f0 breq .+20 ; 0x204 1f0: 83 36 cpi r24, 0x63 ; 99 1f2: 09 f0 breq .+2 ; 0x1f6 1f4: 1b c1 rjmp .+566 ; 0x42c 1f6: 1a c0 rjmp .+52 ; 0x22c 1f8: 89 36 cpi r24, 0x69 ; 105 1fa: 71 f0 breq .+28 ; 0x218 1fc: 80 37 cpi r24, 0x70 ; 112 1fe: 09 f0 breq .+2 ; 0x202 200: 15 c1 rjmp .+554 ; 0x42c 202: 1e c0 rjmp .+60 ; 0x240 case '?': // help command case 'h': strcpy(t,"Valid commands: ? h i c p"); 204: 8a e1 ldi r24, 0x1A ; 26 206: e9 e7 ldi r30, 0x79 ; 121 208: f1 e0 ldi r31, 0x01 ; 1 20a: de 01 movw r26, r28 20c: 91 96 adiw r26, 0x21 ; 33 20e: 01 90 ld r0, Z+ 210: 0d 92 st X+, r0 212: 8a 95 dec r24 214: e1 f7 brne .-8 ; 0x20e break; 216: 13 c1 rjmp .+550 ; 0x43e case 'i': // info command strcpy(t,"UxDIL CDC Demo V1.0"); 218: 84 e1 ldi r24, 0x14 ; 20 21a: e3 e9 ldi r30, 0x93 ; 147 21c: f1 e0 ldi r31, 0x01 ; 1 21e: de 01 movw r26, r28 220: 91 96 adiw r26, 0x21 ; 33 222: 01 90 ld r0, Z+ 224: 0d 92 st X+, r0 226: 8a 95 dec r24 228: e1 f7 brne .-8 ; 0x222 break; 22a: 09 c1 rjmp .+530 ; 0x43e case 'c': // copyright command strcpy(t,"(c) 2011 Reusch Elektronik"); 22c: 8b e1 ldi r24, 0x1B ; 27 22e: e7 ea ldi r30, 0xA7 ; 167 230: f1 e0 ldi r31, 0x01 ; 1 232: de 01 movw r26, r28 234: 91 96 adiw r26, 0x21 ; 33 236: 01 90 ld r0, Z+ 238: 0d 92 st X+, r0 23a: 8a 95 dec r24 23c: e1 f7 brne .-8 ; 0x236 break; 23e: ff c0 rjmp .+510 ; 0x43e case 'p': // parameter settings command strcpy(t,"ppp"); 240: 8e 01 movw r16, r28 242: 0f 5d subi r16, 0xDF ; 223 244: 1f 4f sbci r17, 0xFF ; 255 246: 80 e7 ldi r24, 0x70 ; 112 248: 90 e7 ldi r25, 0x70 ; 112 24a: a0 e7 ldi r26, 0x70 ; 112 24c: b0 e0 ldi r27, 0x00 ; 0 24e: 89 a3 std Y+33, r24 ; 0x21 250: 9a a3 std Y+34, r25 ; 0x22 252: ab a3 std Y+35, r26 ; 0x23 254: bc a3 std Y+36, r27 ; 0x24 ltoa(cdc_linecoding.dwDTERate,t,10); 256: 60 91 f5 01 lds r22, 0x01F5 25a: 70 91 f6 01 lds r23, 0x01F6 25e: 80 91 f7 01 lds r24, 0x01F7 262: 90 91 f8 01 lds r25, 0x01F8 266: 2a e0 ldi r18, 0x0A ; 10 268: 30 e0 ldi r19, 0x00 ; 0 26a: a8 01 movw r20, r16 26c: 0e 94 5a 08 call 0x10b4 ; 0x10b4 strcat(t,":"); 270: f8 01 movw r30, r16 272: 01 90 ld r0, Z+ 274: 00 20 and r0, r0 276: e9 f7 brne .-6 ; 0x272 278: 31 97 sbiw r30, 0x01 ; 1 27a: 8a e3 ldi r24, 0x3A ; 58 27c: 90 e0 ldi r25, 0x00 ; 0 27e: 91 83 std Z+1, r25 ; 0x01 280: 80 83 st Z, r24 itoa(cdc_linecoding.bDataBits,s,10); 282: 4a e0 ldi r20, 0x0A ; 10 284: 50 e0 ldi r21, 0x00 ; 0 286: be 01 movw r22, r28 288: 6f 5b subi r22, 0xBF ; 191 28a: 7f 4f sbci r23, 0xFF ; 255 28c: 80 91 fb 01 lds r24, 0x01FB 290: 90 e0 ldi r25, 0x00 ; 0 292: 0e 94 39 08 call 0x1072 ; 0x1072 strcat(t,s); 296: be 01 movw r22, r28 298: 6f 5b subi r22, 0xBF ; 191 29a: 7f 4f sbci r23, 0xFF ; 255 29c: c8 01 movw r24, r16 29e: 0e 94 2e 08 call 0x105c ; 0x105c switch (cdc_linecoding.bParityType) { 2a2: 80 91 fa 01 lds r24, 0x01FA 2a6: 82 30 cpi r24, 0x02 ; 2 2a8: 09 f1 breq .+66 ; 0x2ec 2aa: 28 f4 brcc .+10 ; 0x2b6 2ac: 88 23 and r24, r24 2ae: 41 f0 breq .+16 ; 0x2c0 2b0: 81 30 cpi r24, 0x01 ; 1 2b2: e9 f5 brne .+122 ; 0x32e 2b4: 10 c0 rjmp .+32 ; 0x2d6 2b6: 83 30 cpi r24, 0x03 ; 3 2b8: 21 f1 breq .+72 ; 0x302 2ba: 84 30 cpi r24, 0x04 ; 4 2bc: c1 f5 brne .+112 ; 0x32e 2be: 2c c0 rjmp .+88 ; 0x318 case 0: strcat(t,"N"); 2c0: fe 01 movw r30, r28 2c2: b1 96 adiw r30, 0x21 ; 33 2c4: 01 90 ld r0, Z+ 2c6: 00 20 and r0, r0 2c8: e9 f7 brne .-6 ; 0x2c4 2ca: 31 97 sbiw r30, 0x01 ; 1 2cc: 8e e4 ldi r24, 0x4E ; 78 2ce: 90 e0 ldi r25, 0x00 ; 0 2d0: 91 83 std Z+1, r25 ; 0x01 2d2: 80 83 st Z, r24 break; 2d4: 36 c0 rjmp .+108 ; 0x342 case 1: strcat(t,"O"); 2d6: fe 01 movw r30, r28 2d8: b1 96 adiw r30, 0x21 ; 33 2da: 01 90 ld r0, Z+ 2dc: 00 20 and r0, r0 2de: e9 f7 brne .-6 ; 0x2da 2e0: 31 97 sbiw r30, 0x01 ; 1 2e2: 8f e4 ldi r24, 0x4F ; 79 2e4: 90 e0 ldi r25, 0x00 ; 0 2e6: 91 83 std Z+1, r25 ; 0x01 2e8: 80 83 st Z, r24 break; 2ea: 2b c0 rjmp .+86 ; 0x342 case 2: strcat(t,"E"); 2ec: fe 01 movw r30, r28 2ee: b1 96 adiw r30, 0x21 ; 33 2f0: 01 90 ld r0, Z+ 2f2: 00 20 and r0, r0 2f4: e9 f7 brne .-6 ; 0x2f0 2f6: 31 97 sbiw r30, 0x01 ; 1 2f8: 85 e4 ldi r24, 0x45 ; 69 2fa: 90 e0 ldi r25, 0x00 ; 0 2fc: 91 83 std Z+1, r25 ; 0x01 2fe: 80 83 st Z, r24 break; 300: 20 c0 rjmp .+64 ; 0x342 case 3: strcat(t,"M"); 302: fe 01 movw r30, r28 304: b1 96 adiw r30, 0x21 ; 33 306: 01 90 ld r0, Z+ 308: 00 20 and r0, r0 30a: e9 f7 brne .-6 ; 0x306 30c: 31 97 sbiw r30, 0x01 ; 1 30e: 8d e4 ldi r24, 0x4D ; 77 310: 90 e0 ldi r25, 0x00 ; 0 312: 91 83 std Z+1, r25 ; 0x01 314: 80 83 st Z, r24 break; 316: 15 c0 rjmp .+42 ; 0x342 case 4: strcat(t,"S"); 318: fe 01 movw r30, r28 31a: b1 96 adiw r30, 0x21 ; 33 31c: 01 90 ld r0, Z+ 31e: 00 20 and r0, r0 320: e9 f7 brne .-6 ; 0x31c 322: 31 97 sbiw r30, 0x01 ; 1 324: 83 e5 ldi r24, 0x53 ; 83 326: 90 e0 ldi r25, 0x00 ; 0 328: 91 83 std Z+1, r25 ; 0x01 32a: 80 83 st Z, r24 break; 32c: 0a c0 rjmp .+20 ; 0x342 default: strcat(t,"?"); 32e: fe 01 movw r30, r28 330: b1 96 adiw r30, 0x21 ; 33 332: 01 90 ld r0, Z+ 334: 00 20 and r0, r0 336: e9 f7 brne .-6 ; 0x332 338: 31 97 sbiw r30, 0x01 ; 1 33a: 8f e3 ldi r24, 0x3F ; 63 33c: 90 e0 ldi r25, 0x00 ; 0 33e: 91 83 std Z+1, r25 ; 0x01 340: 80 83 st Z, r24 }; switch (cdc_linecoding.bCharFormat) { 342: 80 91 f9 01 lds r24, 0x01F9 346: 81 30 cpi r24, 0x01 ; 1 348: 79 f0 breq .+30 ; 0x368 34a: 18 f0 brcs .+6 ; 0x352 34c: 82 30 cpi r24, 0x02 ; 2 34e: 31 f5 brne .+76 ; 0x39c 350: 1a c0 rjmp .+52 ; 0x386 case 0: strcat(t,"1"); 352: fe 01 movw r30, r28 354: b1 96 adiw r30, 0x21 ; 33 356: 01 90 ld r0, Z+ 358: 00 20 and r0, r0 35a: e9 f7 brne .-6 ; 0x356 35c: 31 97 sbiw r30, 0x01 ; 1 35e: 81 e3 ldi r24, 0x31 ; 49 360: 90 e0 ldi r25, 0x00 ; 0 362: 91 83 std Z+1, r25 ; 0x01 364: 80 83 st Z, r24 break; 366: 24 c0 rjmp .+72 ; 0x3b0 case 1: strcat(t,"1.5"); 368: fe 01 movw r30, r28 36a: b1 96 adiw r30, 0x21 ; 33 36c: 01 90 ld r0, Z+ 36e: 00 20 and r0, r0 370: e9 f7 brne .-6 ; 0x36c 372: 31 97 sbiw r30, 0x01 ; 1 374: 81 e3 ldi r24, 0x31 ; 49 376: 9e e2 ldi r25, 0x2E ; 46 378: a5 e3 ldi r26, 0x35 ; 53 37a: b0 e0 ldi r27, 0x00 ; 0 37c: 80 83 st Z, r24 37e: 91 83 std Z+1, r25 ; 0x01 380: a2 83 std Z+2, r26 ; 0x02 382: b3 83 std Z+3, r27 ; 0x03 break; 384: 15 c0 rjmp .+42 ; 0x3b0 case 2: strcat(t,"2"); 386: fe 01 movw r30, r28 388: b1 96 adiw r30, 0x21 ; 33 38a: 01 90 ld r0, Z+ 38c: 00 20 and r0, r0 38e: e9 f7 brne .-6 ; 0x38a 390: 31 97 sbiw r30, 0x01 ; 1 392: 82 e3 ldi r24, 0x32 ; 50 394: 90 e0 ldi r25, 0x00 ; 0 396: 91 83 std Z+1, r25 ; 0x01 398: 80 83 st Z, r24 break; 39a: 0a c0 rjmp .+20 ; 0x3b0 default: strcat(t,"?"); 39c: fe 01 movw r30, r28 39e: b1 96 adiw r30, 0x21 ; 33 3a0: 01 90 ld r0, Z+ 3a2: 00 20 and r0, r0 3a4: e9 f7 brne .-6 ; 0x3a0 3a6: 31 97 sbiw r30, 0x01 ; 1 3a8: 8f e3 ldi r24, 0x3F ; 63 3aa: 90 e0 ldi r25, 0x00 ; 0 3ac: 91 83 std Z+1, r25 ; 0x01 3ae: 80 83 st Z, r24 }; strcat(t," RTS="); 3b0: 8e 01 movw r16, r28 3b2: 0f 5d subi r16, 0xDF ; 223 3b4: 1f 4f sbci r17, 0xFF ; 255 3b6: d8 01 movw r26, r16 3b8: 0d 90 ld r0, X+ 3ba: 00 20 and r0, r0 3bc: e9 f7 brne .-6 ; 0x3b8 3be: 11 97 sbiw r26, 0x01 ; 1 3c0: 86 e0 ldi r24, 0x06 ; 6 3c2: e2 ec ldi r30, 0xC2 ; 194 3c4: f1 e0 ldi r31, 0x01 ; 1 3c6: 01 90 ld r0, Z+ 3c8: 0d 92 st X+, r0 3ca: 8a 95 dec r24 3cc: e1 f7 brne .-8 ; 0x3c6 itoa(cdc_rtsdtr>>1,s,10); 3ce: 80 91 f4 01 lds r24, 0x01F4 3d2: 4a e0 ldi r20, 0x0A ; 10 3d4: 50 e0 ldi r21, 0x00 ; 0 3d6: be 01 movw r22, r28 3d8: 6f 5b subi r22, 0xBF ; 191 3da: 7f 4f sbci r23, 0xFF ; 255 3dc: 86 95 lsr r24 3de: 90 e0 ldi r25, 0x00 ; 0 3e0: 0e 94 39 08 call 0x1072 ; 0x1072 strcat(t,s); 3e4: be 01 movw r22, r28 3e6: 6f 5b subi r22, 0xBF ; 191 3e8: 7f 4f sbci r23, 0xFF ; 255 3ea: c8 01 movw r24, r16 3ec: 0e 94 2e 08 call 0x105c ; 0x105c strcat(t," DTR="); 3f0: d8 01 movw r26, r16 3f2: 0d 90 ld r0, X+ 3f4: 00 20 and r0, r0 3f6: e9 f7 brne .-6 ; 0x3f2 3f8: 11 97 sbiw r26, 0x01 ; 1 3fa: 86 e0 ldi r24, 0x06 ; 6 3fc: e8 ec ldi r30, 0xC8 ; 200 3fe: f1 e0 ldi r31, 0x01 ; 1 400: 01 90 ld r0, Z+ 402: 0d 92 st X+, r0 404: 8a 95 dec r24 406: e1 f7 brne .-8 ; 0x400 itoa(cdc_rtsdtr&0x01,s,10); 408: 80 91 f4 01 lds r24, 0x01F4 40c: 4a e0 ldi r20, 0x0A ; 10 40e: 50 e0 ldi r21, 0x00 ; 0 410: be 01 movw r22, r28 412: 6f 5b subi r22, 0xBF ; 191 414: 7f 4f sbci r23, 0xFF ; 255 416: 81 70 andi r24, 0x01 ; 1 418: 90 e0 ldi r25, 0x00 ; 0 41a: 0e 94 39 08 call 0x1072 ; 0x1072 strcat(t,s); 41e: be 01 movw r22, r28 420: 6f 5b subi r22, 0xBF ; 191 422: 7f 4f sbci r23, 0xFF ; 255 424: c8 01 movw r24, r16 426: 0e 94 2e 08 call 0x105c ; 0x105c break; 42a: 09 c0 rjmp .+18 ; 0x43e default: strcpy(t,"invalid command"); 42c: 80 e1 ldi r24, 0x10 ; 16 42e: ee ec ldi r30, 0xCE ; 206 430: f1 e0 ldi r31, 0x01 ; 1 432: de 01 movw r26, r28 434: 91 96 adiw r26, 0x21 ; 33 436: 01 90 ld r0, Z+ 438: 0d 92 st X+, r0 43a: 8a 95 dec r24 43c: e1 f7 brne .-8 ; 0x436 } strcat(t,"\r\n"); 43e: be 01 movw r22, r28 440: 6f 5d subi r22, 0xDF ; 223 442: 7f 4f sbci r23, 0xFF ; 255 444: fb 01 movw r30, r22 446: 01 90 ld r0, Z+ 448: 00 20 and r0, r0 44a: e9 f7 brne .-6 ; 0x446 44c: 31 97 sbiw r30, 0x01 ; 1 44e: 8d e0 ldi r24, 0x0D ; 13 450: 9a e0 ldi r25, 0x0A ; 10 452: a0 e0 ldi r26, 0x00 ; 0 454: 80 83 st Z, r24 456: 91 83 std Z+1, r25 ; 0x01 458: a2 83 std Z+2, r26 ; 0x02 // response usb_txdata(CDC_TX_ENDPOINT,(unsigned char *)t,strlen(t)); // return answer to host 45a: fb 01 movw r30, r22 45c: 01 90 ld r0, Z+ 45e: 00 20 and r0, r0 460: e9 f7 brne .-6 ; 0x45c 462: 31 97 sbiw r30, 0x01 ; 1 464: af 01 movw r20, r30 466: 46 1b sub r20, r22 468: 57 0b sbc r21, r23 46a: 84 e0 ldi r24, 0x04 ; 4 46c: 0e 94 b2 03 call 0x764 ; 0x764 } } 470: c8 5b subi r28, 0xB8 ; 184 472: df 4f sbci r29, 0xFF ; 255 474: 0f b6 in r0, 0x3f ; 63 476: f8 94 cli 478: de bf out 0x3e, r29 ; 62 47a: 0f be out 0x3f, r0 ; 63 47c: cd bf out 0x3d, r28 ; 61 47e: df 91 pop r29 480: cf 91 pop r28 482: 1f 91 pop r17 484: 0f 91 pop r16 486: 08 95 ret 00000488
: int main(void) { 488: cf 93 push r28 48a: df 93 push r29 48c: cd b7 in r28, 0x3d ; 61 48e: de b7 in r29, 0x3e ; 62 490: a0 97 sbiw r28, 0x20 ; 32 492: 0f b6 in r0, 0x3f ; 63 494: f8 94 cli 496: de bf out 0x3e, r29 ; 62 498: 0f be out 0x3f, r0 ; 63 49a: cd bf out 0x3d, r28 ; 61 init(); 49c: 0e 94 ba 00 call 0x174 ; 0x174 ledg(GREEN); 4a0: 82 e0 ldi r24, 0x02 ; 2 4a2: 90 e0 ldi r25, 0x00 ; 0 4a4: 0e 94 88 00 call 0x110 ; 0x110 char t[32]; uint8_t i = 0; 4a8: 91 2c mov r9, r1 while(1) { ledg(YELLOW); fprintf(&rs232, "test %d\n",++i); 4aa: 0f 2e mov r0, r31 4ac: fe ed ldi r31, 0xDE ; 222 4ae: af 2e mov r10, r31 4b0: f1 e0 ldi r31, 0x01 ; 1 4b2: bf 2e mov r11, r31 4b4: f0 2d mov r31, r0 4b6: 0f 2e mov r0, r31 4b8: fe e0 ldi r31, 0x0E ; 14 4ba: cf 2e mov r12, r31 4bc: f1 e0 ldi r31, 0x01 ; 1 4be: df 2e mov r13, r31 4c0: f0 2d mov r31, r0 t[0]=0; // clear response string buffer sprintf(t, "test %d\r\n",i); 4c2: 0f 2e mov r0, r31 4c4: f7 ee ldi r31, 0xE7 ; 231 4c6: ef 2e mov r14, r31 4c8: f1 e0 ldi r31, 0x01 ; 1 4ca: ff 2e mov r15, r31 4cc: f0 2d mov r31, r0 4ce: 8e 01 movw r16, r28 4d0: 0f 5f subi r16, 0xFF ; 255 4d2: 1f 4f sbci r17, 0xFF ; 255 ledg(GREEN); char t[32]; uint8_t i = 0; while(1) { ledg(YELLOW); 4d4: 86 e0 ldi r24, 0x06 ; 6 4d6: 90 e0 ldi r25, 0x00 ; 0 4d8: 0e 94 88 00 call 0x110 ; 0x110 fprintf(&rs232, "test %d\n",++i); 4dc: 93 94 inc r9 4de: 1f 92 push r1 4e0: 9f 92 push r9 4e2: bf 92 push r11 4e4: af 92 push r10 4e6: df 92 push r13 4e8: cf 92 push r12 4ea: 0e 94 8e 08 call 0x111c ; 0x111c t[0]=0; // clear response string buffer 4ee: 19 82 std Y+1, r1 ; 0x01 sprintf(t, "test %d\r\n",i); 4f0: 1f 92 push r1 4f2: 9f 92 push r9 4f4: ff 92 push r15 4f6: ef 92 push r14 4f8: 1f 93 push r17 4fa: 0f 93 push r16 4fc: 0e 94 d1 08 call 0x11a2 ; 0x11a2 usb_txdata(CDC_TX_ENDPOINT,(unsigned char *)t,strlen(t)); 500: f8 01 movw r30, r16 502: 01 90 ld r0, Z+ 504: 00 20 and r0, r0 506: e9 f7 brne .-6 ; 0x502 <__stack+0x3> 508: 31 97 sbiw r30, 0x01 ; 1 50a: af 01 movw r20, r30 50c: 40 1b sub r20, r16 50e: 51 0b sbc r21, r17 510: b8 01 movw r22, r16 512: 84 e0 ldi r24, 0x04 ; 4 514: 0e 94 b2 03 call 0x764 ; 0x764 ledg(GREEN); 518: 82 e0 ldi r24, 0x02 ; 2 51a: 90 e0 ldi r25, 0x00 ; 0 51c: 0e 94 88 00 call 0x110 ; 0x110 #else //round up by default __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); #endif __builtin_avr_delay_cycles(__ticks_dc); 520: 2f ef ldi r18, 0xFF ; 255 522: 81 ee ldi r24, 0xE1 ; 225 524: 94 e0 ldi r25, 0x04 ; 4 526: 21 50 subi r18, 0x01 ; 1 528: 80 40 sbci r24, 0x00 ; 0 52a: 90 40 sbci r25, 0x00 ; 0 52c: e1 f7 brne .-8 ; 0x526 <__stack+0x27> 52e: 00 c0 rjmp .+0 ; 0x530 <__stack+0x31> 530: 00 00 nop 532: 0f b6 in r0, 0x3f ; 63 534: f8 94 cli 536: de bf out 0x3e, r29 ; 62 538: 0f be out 0x3f, r0 ; 63 53a: cd bf out 0x3d, r28 ; 61 53c: cb cf rjmp .-106 ; 0x4d4 0000053e : UHWCON = _BV(UVREGE); // enable PAD regulator #endif #ifdef MEGA6 UHWCON = _BV(UIMOD)|_BV(UVREGE); // set device mode, enable PAD regulator #endif USBCON = _BV(USBE) | _BV(FRZCLK); // enable USB 53e: 80 ea ldi r24, 0xA0 ; 160 540: 80 93 d8 00 sts 0x00D8, r24 #if (F_CPU==16000000) // 16MHz #ifdef MEGA2 PLLCSR = _BV(PLLE) | _BV(PLLP0); // config PLL, 16 MHz xtal 544: 86 e0 ldi r24, 0x06 ; 6 546: 89 bd out 0x29, r24 ; 41 PLLCSR = _BV(PLLE); // config PLL, 8 MHz xtal #endif #endif while (!(PLLCSR & _BV(PLOCK))) ; // wait for PLL lock 548: 09 b4 in r0, 0x29 ; 41 54a: 00 fe sbrs r0, 0 54c: fd cf rjmp .-6 ; 0x548 #ifdef MEGA4_6 USBCON = _BV(USBE)|_BV(OTGPADE); // start USB clock #else USBCON = _BV(USBE); // start USB clock 54e: 80 e8 ldi r24, 0x80 ; 128 550: 80 93 d8 00 sts 0x00D8, r24 #endif UDCON = 0; // enable attach resistor 554: 10 92 e0 00 sts 0x00E0, r1 usb_conf = 0; 558: 10 92 f2 01 sts 0x01F2, r1 #if (NUMINTERFACES>1) usb_if = 0xFF; 55c: 8f ef ldi r24, 0xFF ; 255 55e: 80 93 25 01 sts 0x0125, r24 #endif #ifdef MEGA2 // port for VBUS detection VBUSDIR &= ~_BV(VBUSPIN); // port as input 562: 3c 98 cbi 0x07, 4 ; 7 #endif UDIEN = _BV(EORSTE); // enable "end of reset" interrupt 564: 88 e0 ldi r24, 0x08 ; 8 566: 80 93 e2 00 sts 0x00E2, r24 56a: 08 95 ret 0000056c : //----------------------------------------------------------------------------- #ifdef STATICENDPOINTS // physical endpoint configuration for all interfaces, may differ from descriptor defintions void usb_endpoints(void) { 56c: 2f 92 push r2 56e: 3f 92 push r3 570: 4f 92 push r4 572: 5f 92 push r5 574: 7f 92 push r7 576: 8f 92 push r8 578: 9f 92 push r9 57a: af 92 push r10 57c: cf 92 push r12 57e: df 92 push r13 580: ef 92 push r14 582: ff 92 push r15 584: 0f 93 push r16 586: 1f 93 push r17 588: cf 93 push r28 58a: df 93 push r29 58c: ec e2 ldi r30, 0x2C ; 44 58e: f1 e0 ldi r31, 0x01 ; 1 590: 8e e2 ldi r24, 0x2E ; 46 592: 91 e0 ldi r25, 0x01 ; 1 594: 41 e0 ldi r20, 0x01 ; 1 uint8_t i; for (i=0; i UENUM = i+1; // select endpoint 5d6: e6 01 movw r28, r12 5d8: 48 83 st Y, r20 UECONX = _BV(EPEN); // enable endpoint 5da: e7 01 movw r28, r14 5dc: a8 82 st Y, r10 UECFG0X = EPC.ep_type; // transfer type and direction 5de: 20 81 ld r18, Z 5e0: e8 01 movw r28, r16 5e2: 28 83 st Y, r18 // Initializing Endpoints //----------------------------------------------------------------------------- #ifdef STATICENDPOINTS // physical endpoint configuration for all interfaces, may differ from descriptor defintions void usb_endpoints(void) 5e4: 1c 01 movw r2, r24 5e6: 9c 01 movw r18, r24 5e8: 21 50 subi r18, 0x01 ; 1 5ea: 31 09 sbc r19, r1 for (i=0; i 5f4: 20 34 cpi r18, 0x40 ; 64 5f6: 41 f0 breq .+16 ; 0x608 5f8: 20 32 cpi r18, 0x20 ; 32 5fa: 41 f0 breq .+16 ; 0x60c 5fc: 20 31 cpi r18, 0x10 ; 16 5fe: 41 f4 brne .+16 ; 0x610 600: 37 2d mov r19, r7 602: 07 c0 rjmp .+14 ; 0x612 604: 30 e4 ldi r19, 0x40 ; 64 606: 05 c0 rjmp .+10 ; 0x612 608: 30 e3 ldi r19, 0x30 ; 48 60a: 03 c0 rjmp .+6 ; 0x612 60c: 30 e2 ldi r19, 0x20 ; 32 60e: 01 c0 rjmp .+2 ; 0x612 610: 38 2d mov r19, r8 612: e1 01 movw r28, r2 614: 28 81 ld r18, Y 616: 23 2b or r18, r19 618: eb 01 movw r28, r22 61a: 28 83 st Y, r18 (EPC.ep_buffer); // buffer size and bank if (IN_TRANSFER) UEIENX = 0; // no interrupts handling for IN endpoints 61c: 2c 91 ld r18, X 61e: 20 ff sbrs r18, 0 620: 03 c0 rjmp .+6 ; 0x628 622: d2 01 movw r26, r4 624: 1c 92 st X, r1 626: 02 c0 rjmp .+4 ; 0x62c else UEIENX = _BV(RXOUTE); // interrupt handling for incoming data (OUT endpoint) 628: e2 01 movw r28, r4 62a: 98 82 st Y, r9 62c: 4f 5f subi r20, 0xFF ; 255 62e: 34 96 adiw r30, 0x04 ; 4 630: 04 96 adiw r24, 0x04 ; 4 #endif uint8_t i; for (i=0; i } } #ifdef MEGA4_6 UERST = 0x7E; // endpoint FIFO reset for endpoint 1, 2, 3, 4, 5 and 6 #else UERST = 0x1E; // endpoint FIFO reset for endpoint 1, 2, 3 and 4 636: ea ee ldi r30, 0xEA ; 234 638: f0 e0 ldi r31, 0x00 ; 0 63a: 8e e1 ldi r24, 0x1E ; 30 63c: 80 83 st Z, r24 #endif UERST = 0; 63e: 10 82 st Z, r1 } 640: df 91 pop r29 642: cf 91 pop r28 644: 1f 91 pop r17 646: 0f 91 pop r16 648: ff 90 pop r15 64a: ef 90 pop r14 64c: df 90 pop r13 64e: cf 90 pop r12 650: af 90 pop r10 652: 9f 90 pop r9 654: 8f 90 pop r8 656: 7f 90 pop r7 658: 5f 90 pop r5 65a: 4f 90 pop r4 65c: 3f 90 pop r3 65e: 2f 90 pop r2 660: 08 95 ret 00000662 : void usb_wait_in(void) // wait for host, until it's ready to receive IN package { uint8_t i; do { i = UEINTX; 662: e8 ee ldi r30, 0xE8 ; 232 664: f0 e0 ldi r31, 0x00 ; 0 666: 80 81 ld r24, Z } while (!(i & (_BV(TXINI)|_BV(RXOUTI)))); 668: 85 70 andi r24, 0x05 ; 5 66a: e9 f3 breq .-6 ; 0x666 } 66c: 08 95 ret 0000066e : void usb_wait_receive_out(void) { while (!(UEINTX & _BV(RXOUTI))) ; 66e: e8 ee ldi r30, 0xE8 ; 232 670: f0 e0 ldi r31, 0x00 ; 0 672: 80 81 ld r24, Z 674: 82 ff sbrs r24, 2 676: fd cf rjmp .-6 ; 0x672 } 678: 08 95 ret 0000067a : void usb_desc_out(bool isRAM, const uint8_t *pgmaddr, uint8_t size, uint16_t maxsize) // return descriptor over endpoint 0 to host from flash memory or RAM { 67a: 8f 92 push r8 67c: 9f 92 push r9 67e: af 92 push r10 680: bf 92 push r11 682: cf 92 push r12 684: df 92 push r13 686: ef 92 push r14 688: ff 92 push r15 68a: 0f 93 push r16 68c: 1f 93 push r17 68e: cf 93 push r28 690: df 93 push r29 692: d8 2e mov r13, r24 uint8_t i, len, n; const uint8_t *addr; addr=pgmaddr; len=size; if (len>maxsize) len=maxsize; 694: e4 2f mov r30, r20 696: f0 e0 ldi r31, 0x00 ; 0 698: 2e 17 cp r18, r30 69a: 3f 07 cpc r19, r31 69c: 10 f4 brcc .+4 ; 0x6a2 69e: c2 2e mov r12, r18 6a0: 01 c0 rjmp .+2 ; 0x6a4 { uint8_t i, len, n; const uint8_t *addr; addr=pgmaddr; len=size; 6a2: c4 2e mov r12, r20 6a4: 06 2f mov r16, r22 6a6: 17 2f mov r17, r23 if (len>maxsize) len=maxsize; do { usb_wait_in(); if (i & _BV(RXOUTI)) return; // cancel // send IN package n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; 6a8: 68 94 set 6aa: 99 24 eor r9, r9 6ac: 94 f8 bld r9, 4 for (i = n; i; i--) UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); len -= n; USB_SEND_IN; 6ae: 0f 2e mov r0, r31 6b0: f8 ee ldi r31, 0xE8 ; 232 6b2: ef 2e mov r14, r31 6b4: f1 2c mov r15, r1 6b6: f0 2d mov r31, r0 6b8: 0f 2e mov r0, r31 6ba: fe ef ldi r31, 0xFE ; 254 6bc: bf 2e mov r11, r31 6be: f0 2d mov r31, r0 usb_wait_in(); if (i & _BV(RXOUTI)) return; // cancel // send IN package n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; for (i = n; i; i--) UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); 6c0: c1 ef ldi r28, 0xF1 ; 241 6c2: d0 e0 ldi r29, 0x00 ; 0 6c4: a1 2c mov r10, r1 6c6: 01 c0 rjmp .+2 ; 0x6ca 6c8: 8a 2c mov r8, r10 addr=pgmaddr; len=size; if (len>maxsize) len=maxsize; do { usb_wait_in(); 6ca: 0e 94 31 03 call 0x662 ; 0x662 if (i & _BV(RXOUTI)) return; // cancel 6ce: 82 fc sbrc r8, 2 6d0: 26 c0 rjmp .+76 ; 0x71e // send IN package n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; 6d2: 2c 2d mov r18, r12 6d4: 80 e1 ldi r24, 0x10 ; 16 6d6: 8c 15 cp r24, r12 6d8: 08 f4 brcc .+2 ; 0x6dc 6da: 29 2d mov r18, r9 for (i = n; i; i--) 6dc: 22 23 and r18, r18 6de: d9 f0 breq .+54 ; 0x716 6e0: f8 01 movw r30, r16 6e2: 92 2f mov r25, r18 UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); 6e4: dd 20 and r13, r13 6e6: 11 f0 breq .+4 ; 0x6ec 6e8: 80 81 ld r24, Z 6ea: 01 c0 rjmp .+2 ; 0x6ee 6ec: 84 91 lpm r24, Z 6ee: 88 83 st Y, r24 do { usb_wait_in(); if (i & _BV(RXOUTI)) return; // cancel // send IN package n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; for (i = n; i; i--) 6f0: 91 50 subi r25, 0x01 ; 1 6f2: 31 96 adiw r30, 0x01 ; 1 6f4: 91 11 cpse r25, r1 6f6: f6 cf rjmp .-20 ; 0x6e4 void usb_wait_receive_out(void) { while (!(UEINTX & _BV(RXOUTI))) ; } void usb_desc_out(bool isRAM, const uint8_t *pgmaddr, uint8_t size, uint16_t maxsize) 6f8: 62 2f mov r22, r18 6fa: 61 50 subi r22, 0x01 ; 1 6fc: 70 e0 ldi r23, 0x00 ; 0 6fe: 6f 5f subi r22, 0xFF ; 255 700: 7f 4f sbci r23, 0xFF ; 255 702: 06 0f add r16, r22 704: 17 1f adc r17, r23 if (i & _BV(RXOUTI)) return; // cancel // send IN package n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; for (i = n; i; i--) UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); len -= n; 706: c2 1a sub r12, r18 USB_SEND_IN; 708: f7 01 movw r30, r14 70a: b0 82 st Z, r11 } while (len || n == ENDPOINT0_SIZE); 70c: c1 10 cpse r12, r1 70e: dc cf rjmp .-72 ; 0x6c8 710: 20 31 cpi r18, 0x10 ; 16 712: d1 f2 breq .-76 ; 0x6c8 714: 04 c0 rjmp .+8 ; 0x71e // send IN package n = (len < ENDPOINT0_SIZE) ? len : ENDPOINT0_SIZE; for (i = n; i; i--) UEDATX = isRAM ? *addr++ : pgm_read_byte(addr++); len -= n; USB_SEND_IN; 716: f7 01 movw r30, r14 718: b0 82 st Z, r11 } while (len || n == ENDPOINT0_SIZE); 71a: c1 10 cpse r12, r1 71c: d5 cf rjmp .-86 ; 0x6c8 } 71e: df 91 pop r29 720: cf 91 pop r28 722: 1f 91 pop r17 724: 0f 91 pop r16 726: ff 90 pop r15 728: ef 90 pop r14 72a: df 90 pop r13 72c: cf 90 pop r12 72e: bf 90 pop r11 730: af 90 pop r10 732: 9f 90 pop r9 734: 8f 90 pop r8 736: 08 95 ret 00000738 : uint16_t r, i; #else uint8_t r, i; #endif UENUM = endpoint; // select endpoint 738: 80 93 e9 00 sts 0x00E9, r24 #ifdef MEGA4_6 r = ((uint16_t)(UEBCHX)<<8)+UEBCLX; #else r = UEBCLX; 73c: 90 91 f2 00 lds r25, 0x00F2 740: 84 2f mov r24, r20 742: 94 17 cp r25, r20 744: 08 f4 brcc .+2 ; 0x748 746: 89 2f mov r24, r25 #endif if (r>maxdatasize) r = maxdatasize; if (r) { // data available in input endpoint 748: 88 23 and r24, r24 74a: 59 f0 breq .+22 ; 0x762 74c: 26 2f mov r18, r22 74e: e6 2f mov r30, r22 750: f7 2f mov r31, r23 for (i=0; i #endif } ****/ } return r; } 762: 08 95 ret 00000764 : #ifdef MEGA4_6 bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint16_t datasize) #else bool usb_txdata(uint8_t endpoint, uint8_t *buffer, uint8_t datasize) #endif { 764: cf 93 push r28 766: df 93 push r29 uint16_t i; #else uint8_t i; #endif if (datasize) { 768: 44 23 and r20, r20 76a: 29 f1 breq .+74 ; 0x7b6 UENUM = endpoint; 76c: 80 93 e9 00 sts 0x00E9, r24 #define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) static inline void usb_wait_in_ready(void) { while (!(UEINTX & _BV(TXINI))); 770: e8 ee ldi r30, 0xE8 ; 232 772: f0 e0 ldi r31, 0x00 ; 0 774: 80 81 ld r24, Z 776: 80 ff sbrs r24, 0 778: fd cf rjmp .-6 ; 0x774 UENUM = endpoint; usb_wait_in_ready(); #ifdef MEGA4_6 if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty #else if (UEBCLX==0) { // buffer is empty 77a: 80 91 f2 00 lds r24, 0x00F2 77e: 81 11 cpse r24, r1 780: 1c c0 rjmp .+56 ; 0x7ba 782: 96 2f mov r25, r22 784: e6 2f mov r30, r22 786: f7 2f mov r31, r23 #endif for (i=0; i 796: 80 81 ld r24, Z 798: 88 83 st Y, r24 79a: 31 96 adiw r30, 0x01 ; 1 #ifdef MEGA4_6 if ((((uint16_t)(UEBCHX)<<8)+UEBCLX)==0) { // buffer is empty #else if (UEBCLX==0) { // buffer is empty #endif for (i=0; i if (UEINTX & _BV(RWAL)) UEDATX = buffer[i]; UEINTX&=~_BV(TXINI); // necessary (in this order) (changed V1.1.1) 7a4: e8 ee ldi r30, 0xE8 ; 232 7a6: f0 e0 ldi r31, 0x00 ; 0 7a8: 80 81 ld r24, Z 7aa: 8e 7f andi r24, 0xFE ; 254 7ac: 80 83 st Z, r24 UEINTX=0x7F; // (uint8_t)~_BV(FIFOCON); 7ae: 8f e7 ldi r24, 0x7F ; 127 7b0: 80 83 st Z, r24 return true; 7b2: 81 e0 ldi r24, 0x01 ; 1 7b4: 03 c0 rjmp .+6 ; 0x7bc } } return false; 7b6: 80 e0 ldi r24, 0x00 ; 0 7b8: 01 c0 rjmp .+2 ; 0x7bc 7ba: 80 e0 ldi r24, 0x00 ; 0 } 7bc: df 91 pop r29 7be: cf 91 pop r28 7c0: 08 95 ret 000007c2 <__vector_11>: // USB Device Interrupt //----------------------------------------------------------------------------- // Hardware interrupts of the USB controller ISR(USB_GEN_vect) { 7c2: 1f 92 push r1 7c4: 0f 92 push r0 7c6: 0f b6 in r0, 0x3f ; 63 7c8: 0f 92 push r0 7ca: 11 24 eor r1, r1 7cc: 8f 93 push r24 7ce: ef 93 push r30 7d0: ff 93 push r31 uint8_t intbits; intbits = UDINT; // save flags 7d2: e1 ee ldi r30, 0xE1 ; 225 7d4: f0 e0 ldi r31, 0x00 ; 0 7d6: 80 81 ld r24, Z UDINT = 0; // reset flags 7d8: 10 82 st Z, r1 if (intbits & _BV(EORSTI)) { // End Of Reset Interrupt Flag 7da: 83 ff sbrs r24, 3 7dc: 12 c0 rjmp .+36 ; 0x802 <__vector_11+0x40> // initialize endpoint 0 for control transfers UENUM = 0; 7de: 10 92 e9 00 sts 0x00E9, r1 UECONX = _BV(EPEN); 7e2: 81 e0 ldi r24, 0x01 ; 1 7e4: 80 93 eb 00 sts 0x00EB, r24 UECFG0X = EP_TYPE_CONTROL; 7e8: 10 92 ec 00 sts 0x00EC, r1 UECFG1X = EP_SIZE(ENDPOINT0_SIZE) | EP_SINGLE_BUFFER; 7ec: 82 e1 ldi r24, 0x12 ; 18 7ee: 80 93 ed 00 sts 0x00ED, r24 UEIENX = _BV(RXSTPE); // enable interrupt for incoming data 7f2: 88 e0 ldi r24, 0x08 ; 8 7f4: 80 93 f0 00 sts 0x00F0, r24 usb_conf = 0; 7f8: 10 92 f2 01 sts 0x01F2, r1 #if (NUMINTERFACES>1) usb_if = 0xFF; 7fc: 8f ef ldi r24, 0xFF ; 255 7fe: 80 93 25 01 sts 0x0125, r24 #endif } } 802: ff 91 pop r31 804: ef 91 pop r30 806: 8f 91 pop r24 808: 0f 90 pop r0 80a: 0f be out 0x3f, r0 ; 63 80c: 0f 90 pop r0 80e: 1f 90 pop r1 810: 18 95 reti 00000812 <__vector_12>: // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) { 812: 1f 92 push r1 814: 0f 92 push r0 816: 0f b6 in r0, 0x3f ; 63 818: 0f 92 push r0 81a: 11 24 eor r1, r1 81c: 2f 92 push r2 81e: 3f 92 push r3 820: 4f 92 push r4 822: 5f 92 push r5 824: 6f 92 push r6 826: 7f 92 push r7 828: 8f 92 push r8 82a: 9f 92 push r9 82c: af 92 push r10 82e: bf 92 push r11 830: cf 92 push r12 832: df 92 push r13 834: ef 92 push r14 836: ff 92 push r15 838: 0f 93 push r16 83a: 1f 93 push r17 83c: 2f 93 push r18 83e: 3f 93 push r19 840: 4f 93 push r20 842: 5f 93 push r21 844: 6f 93 push r22 846: 7f 93 push r23 848: 8f 93 push r24 84a: 9f 93 push r25 84c: af 93 push r26 84e: bf 93 push r27 850: ef 93 push r30 852: ff 93 push r31 854: cf 93 push r28 856: df 93 push r29 858: cd b7 in r28, 0x3d ; 61 85a: de b7 in r29, 0x3e ; 62 85c: 29 97 sbiw r28, 0x09 ; 9 85e: de bf out 0x3e, r29 ; 62 860: cd bf out 0x3d, r28 ; 61 #if (USESN==2) // serial number in RAM struct usb_string_descriptor_ram buf; #endif struct usb_control_request ucr; if (UEINT & 0x01) { 862: 80 91 f4 00 lds r24, 0x00F4 866: 80 ff sbrs r24, 0 868: 8f c2 rjmp .+1310 ; 0xd88 <__vector_12+0x576> // handle interrupts of endpoint 0 (control transfers) UENUM = 0; 86a: 10 92 e9 00 sts 0x00E9, r1 intbits = UEINTX; // save interrupt flags of the endpoint 86e: 80 91 e8 00 lds r24, 0x00E8 if (intbits & _BV(RXSTPI)) { // control transfer, setup 872: 83 ff sbrs r24, 3 874: 58 c2 rjmp .+1200 ; 0xd26 <__vector_12+0x514> ucr.bmRequestType = UEDATX; 876: e1 ef ldi r30, 0xF1 ; 241 878: f0 e0 ldi r31, 0x00 ; 0 87a: 50 81 ld r21, Z ucr.bRequest = UEDATX; 87c: 40 81 ld r20, Z ucr.wValue = UEDATX; 87e: 20 81 ld r18, Z ucr.wValue |= (UEDATX << 8); 880: 30 81 ld r19, Z 882: 93 2f mov r25, r19 884: 80 e0 ldi r24, 0x00 ; 0 886: 82 2b or r24, r18 ucr.wIndex = UEDATX; 888: 60 81 ld r22, Z ucr.wIndex |= (UEDATX << 8); 88a: 70 81 ld r23, Z ucr.wLength = UEDATX; 88c: 30 81 ld r19, Z ucr.wLength |= (UEDATX << 8); 88e: e0 81 ld r30, Z UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); 890: 22 ef ldi r18, 0xF2 ; 242 892: 20 93 e8 00 sts 0x00E8, r18 if (ucr.bRequest == GET_DESCRIPTOR) { 896: 46 30 cpi r20, 0x06 ; 6 898: 09 f0 breq .+2 ; 0x89c <__vector_12+0x8a> 89a: 5a c1 rjmp .+692 ; 0xb50 <__vector_12+0x33e> ucr.wValue = UEDATX; ucr.wValue |= (UEDATX << 8); ucr.wIndex = UEDATX; ucr.wIndex |= (UEDATX << 8); ucr.wLength = UEDATX; ucr.wLength |= (UEDATX << 8); 89c: 1e 2f mov r17, r30 89e: 00 e0 ldi r16, 0x00 ; 0 8a0: 03 2b or r16, r19 UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); if (ucr.bRequest == GET_DESCRIPTOR) { switch (ucr.wValue) { 8a2: 81 15 cp r24, r1 8a4: 23 e0 ldi r18, 0x03 ; 3 8a6: 92 07 cpc r25, r18 8a8: 09 f4 brne .+2 ; 0x8ac <__vector_12+0x9a> 8aa: 2a c1 rjmp .+596 ; 0xb00 <__vector_12+0x2ee> 8ac: 48 f4 brcc .+18 ; 0x8c0 <__vector_12+0xae> 8ae: 81 15 cp r24, r1 8b0: 41 e0 ldi r20, 0x01 ; 1 8b2: 94 07 cpc r25, r20 8b4: f9 f0 breq .+62 ; 0x8f4 <__vector_12+0xe2> 8b6: 81 15 cp r24, r1 8b8: 92 40 sbci r25, 0x02 ; 2 8ba: 09 f0 breq .+2 ; 0x8be <__vector_12+0xac> 8bc: 45 c1 rjmp .+650 ; 0xb48 <__vector_12+0x336> 8be: 0c c0 rjmp .+24 ; 0x8d8 <__vector_12+0xc6> 8c0: 82 30 cpi r24, 0x02 ; 2 8c2: a3 e0 ldi r26, 0x03 ; 3 8c4: 9a 07 cpc r25, r26 8c6: 09 f4 brne .+2 ; 0x8ca <__vector_12+0xb8> 8c8: 2d c1 rjmp .+602 ; 0xb24 <__vector_12+0x312> 8ca: 08 f4 brcc .+2 ; 0x8ce <__vector_12+0xbc> 8cc: 22 c1 rjmp .+580 ; 0xb12 <__vector_12+0x300> 8ce: 83 30 cpi r24, 0x03 ; 3 8d0: 93 40 sbci r25, 0x03 ; 3 8d2: 09 f0 breq .+2 ; 0x8d6 <__vector_12+0xc4> 8d4: 39 c1 rjmp .+626 ; 0xb48 <__vector_12+0x336> 8d6: 2f c1 rjmp .+606 ; 0xb36 <__vector_12+0x324> 8d8: 2c e3 ldi r18, 0x3C ; 60 8da: 31 e0 ldi r19, 0x01 ; 1 8dc: 3d 83 std Y+5, r19 ; 0x05 8de: 2c 83 std Y+4, r18 ; 0x04 //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) 8e0: 6c e5 ldi r22, 0x5C ; 92 8e2: 71 e0 ldi r23, 0x01 ; 1 8e4: a0 e0 ldi r26, 0x00 ; 0 { 8e6: 40 e0 ldi r20, 0x00 ; 0 8e8: 50 e0 ldi r21, 0x00 ; 0 case 0x0200: // configuration descriptor // get number of activated endpoints n=0; #if (NUMINTERFACES>1) for (j=0; j ucr.wLength |= (UEDATX << 8); UEINTX = ~(_BV(RXSTPI) | _BV(RXOUTI) | _BV(TXINI)); if (ucr.bRequest == GET_DESCRIPTOR) { switch (ucr.wValue) { case 0x0100: // device descriptor usb_desc_out(false,&device_descriptor[0],pgm_read_byte(&device_descriptor[0]),ucr.wLength); 8f4: e4 e7 ldi r30, 0x74 ; 116 8f6: f0 e0 ldi r31, 0x00 ; 0 8f8: 44 91 lpm r20, Z 8fa: 98 01 movw r18, r16 8fc: bf 01 movw r22, r30 8fe: 80 e0 ldi r24, 0x00 ; 0 900: 0e 94 3d 03 call 0x67a ; 0x67a break; 904: 4a c2 rjmp .+1172 ; 0xd9a <__vector_12+0x588> //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) 906: f9 01 movw r30, r18 908: e8 0f add r30, r24 90a: f9 1f adc r31, r25 case 0x0200: // configuration descriptor // get number of activated endpoints n=0; #if (NUMINTERFACES>1) for (j=0; j 914: be 2d mov r27, r14 916: ab 0f add r26, r27 918: 04 96 adiw r24, 0x04 ; 4 91a: 80 31 cpi r24, 0x10 ; 16 91c: 91 05 cpc r25, r1 91e: 99 f7 brne .-26 ; 0x906 <__vector_12+0xf4> 920: 20 5f subi r18, 0xF0 ; 240 922: 3f 4f sbci r19, 0xFF ; 255 break; case 0x0200: // configuration descriptor // get number of activated endpoints n=0; #if (NUMINTERFACES>1) for (j=0; j // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) { 92a: ca 01 movw r24, r20 92c: ec cf rjmp .-40 ; 0x906 <__vector_12+0xf4> 92e: dd 82 std Y+5, r13 ; 0x05 930: cc 82 std Y+4, r12 ; 0x04 for (i=0; i 946: e8 2e mov r14, r24 948: f9 2e mov r15, r25 // initialize configuration descriptor cfg->bLength = sizeof(cfg_desc); 94a: 89 e0 ldi r24, 0x09 ; 9 94c: d7 01 movw r26, r14 94e: 8c 93 st X, r24 cfg->bDescriptorType = 2; 950: 82 e0 ldi r24, 0x02 ; 2 952: 11 96 adiw r26, 0x01 ; 1 954: 8c 93 st X, r24 956: 11 97 sbiw r26, 0x01 ; 1 cfg->wTotalLength = s; 958: e9 81 ldd r30, Y+1 ; 0x01 95a: 12 96 adiw r26, 0x02 ; 2 95c: ec 93 st X, r30 95e: 12 97 sbiw r26, 0x02 ; 2 960: 13 96 adiw r26, 0x03 ; 3 962: 1c 92 st X, r1 964: 13 97 sbiw r26, 0x03 ; 3 cfg->bNumInterfaces = NUMINTERFACES; 966: 14 96 adiw r26, 0x04 ; 4 968: 8c 93 st X, r24 96a: 14 97 sbiw r26, 0x04 ; 4 cfg->bConfigurationValue = 1; 96c: 81 e0 ldi r24, 0x01 ; 1 96e: 15 96 adiw r26, 0x05 ; 5 970: 8c 93 st X, r24 972: 15 97 sbiw r26, 0x05 ; 5 cfg->iConfiguration = 0; 974: 16 96 adiw r26, 0x06 ; 6 976: 1c 92 st X, r1 978: 16 97 sbiw r26, 0x06 ; 6 cfg->bmAttributes = POWERING; 97a: 80 e8 ldi r24, 0x80 ; 128 97c: 17 96 adiw r26, 0x07 ; 7 97e: 8c 93 st X, r24 980: 17 97 sbiw r26, 0x07 ; 7 cfg->bMaxPower = MAXPOWER>>1; 982: 8a ef ldi r24, 0xFA ; 250 984: 18 96 adiw r26, 0x08 ; 8 986: 8c 93 st X, r24 988: 18 97 sbiw r26, 0x08 ; 8 // initialize interface descriptor ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); 98a: 19 96 adiw r26, 0x09 ; 9 98c: 0f 2e mov r0, r31 98e: f2 e2 ldi r31, 0x22 ; 34 990: af 2e mov r10, r31 992: f1 e0 ldi r31, 0x01 ; 1 994: bf 2e mov r11, r31 996: f0 2d mov r31, r0 998: 0f 2e mov r0, r31 99a: ff e1 ldi r31, 0x1F ; 31 99c: 8f 2e mov r8, r31 99e: f1 e0 ldi r31, 0x01 ; 1 9a0: 9f 2e mov r9, r31 9a2: f0 2d mov r31, r0 9a4: 0f 2e mov r0, r31 9a6: fc e1 ldi r31, 0x1C ; 28 9a8: 6f 2e mov r6, r31 9aa: f1 e0 ldi r31, 0x01 ; 1 9ac: 7f 2e mov r7, r31 9ae: f0 2d mov r31, r0 9b0: 40 e0 ldi r20, 0x00 ; 0 9b2: 50 e0 ldi r21, 0x00 ; 0 //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) 9b4: 41 2c mov r4, r1 9b6: 51 2c mov r5, r1 9b8: 31 2c mov r3, r1 // initialize interface descriptor ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); #if (NUMINTERFACES>1) for (j=0; j 9cc: d8 01 movw r26, r16 9ce: a2 0f add r26, r18 9d0: b3 1f adc r27, r19 // initialize interface descriptor ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); #if (NUMINTERFACES>1) for (j=0; j 9da: 62 2d mov r22, r2 9dc: c6 0e add r12, r22 9de: 2c 5f subi r18, 0xFC ; 252 9e0: 3f 4f sbci r19, 0xFF ; 255 9e2: 20 31 cpi r18, 0x10 ; 16 9e4: 31 05 cpc r19, r1 9e6: 91 f7 brne .-28 ; 0x9cc <__vector_12+0x1ba> 9e8: 1d 83 std Y+5, r17 ; 0x05 9ea: 0c 83 std Y+4, r16 ; 0x04 #else j = 0; #endif ifp->bLength = sizeof(if_desc); 9ec: 19 e0 ldi r17, 0x09 ; 9 9ee: 10 83 st Z, r17 ifp->bDescriptorType = 4; 9f0: 24 e0 ldi r18, 0x04 ; 4 9f2: 21 83 std Z+1, r18 ; 0x01 ifp->bInterfaceNumber = j; 9f4: 72 83 std Z+2, r23 ; 0x02 ifp->bAlternateSetting = 0; 9f6: 13 82 std Z+3, r1 ; 0x03 ifp->bNumEndpoints = n; 9f8: c4 82 std Z+4, r12 ; 0x04 ifp->bInterfaceClass = InterfaceClasses[j]; 9fa: 9a 01 movw r18, r20 9fc: d5 01 movw r26, r10 9fe: 6d 91 ld r22, X+ a00: 5d 01 movw r10, r26 a02: 65 83 std Z+5, r22 ; 0x05 ifp->bInterfaceSubClass = InterfaceSubClasses[j]; a04: d4 01 movw r26, r8 a06: 6d 91 ld r22, X+ a08: 4d 01 movw r8, r26 a0a: 66 83 std Z+6, r22 ; 0x06 ifp->bInterfaceProtocol = InterfaceProtocols[j]; a0c: d3 01 movw r26, r6 a0e: 6d 91 ld r22, X+ a10: 3d 01 movw r6, r26 a12: 67 83 std Z+7, r22 ; 0x07 ifp->iInterface = 0; a14: 10 86 std Z+8, r1 ; 0x08 #ifdef CDC if (j==0) { a16: 71 11 cpse r23, r1 a18: 0c c0 rjmp .+24 ; 0xa32 <__vector_12+0x220> cdc = (cdc_desc *)((uint16_t)(ifp)+sizeof(if_desc)); a1a: bf 01 movw r22, r30 a1c: 39 96 adiw r30, 0x09 ; 9 a1e: ac e5 ldi r26, 0x5C ; 92 a20: b1 e0 ldi r27, 0x01 ; 1 for (i=0; i epp = (ep_desc *)((uint16_t)(cdc)+sizeof(cdc_desc)); a2c: fb 01 movw r30, r22 a2e: 7c 96 adiw r30, 0x1c ; 28 a30: 01 c0 rjmp .+2 ; 0xa34 <__vector_12+0x222> } else epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); a32: 39 96 adiw r30, 0x09 ; 9 #else epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); #endif if (n) { // endpoints a34: cc 20 and r12, r12 a36: 09 f4 brne .+2 ; 0xa3a <__vector_12+0x228> a38: 46 c0 rjmp .+140 ; 0xac6 <__vector_12+0x2b4> //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) a3a: 22 95 swap r18 a3c: 32 95 swap r19 a3e: 30 7f andi r19, 0xF0 ; 240 a40: 32 27 eor r19, r18 a42: 20 7f andi r18, 0xF0 ; 240 a44: 32 27 eor r19, r18 a46: 21 5c subi r18, 0xC1 ; 193 a48: 3e 4f sbci r19, 0xFE ; 254 a4a: 11 e0 ldi r17, 0x01 ; 1 a4c: 59 87 std Y+9, r21 ; 0x09 a4e: 48 87 std Y+8, r20 ; 0x08 a50: 6c 81 ldd r22, Y+4 ; 0x04 a52: 7d 81 ldd r23, Y+5 ; 0x05 a54: 3f 83 std Y+7, r19 ; 0x07 a56: 2e 83 std Y+6, r18 ; 0x06 a58: a9 01 movw r20, r18 a5a: 43 50 subi r20, 0x03 ; 3 a5c: 51 09 sbc r21, r1 #else epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); #endif if (n) { // endpoints for (i=0; i epp->bLength = sizeof(ep_desc); a66: b7 e0 ldi r27, 0x07 ; 7 a68: b0 83 st Z, r27 epp->bDescriptorType = 5; a6a: 45 e0 ldi r20, 0x05 ; 5 a6c: 41 83 std Z+1, r20 ; 0x01 epp->bEndpointAddress = (i+1)|(EPCO.ep_type<<7); a6e: 40 2f mov r20, r16 a70: 47 95 ror r20 a72: 44 27 eor r20, r20 a74: 47 95 ror r20 a76: 41 2b or r20, r17 a78: 42 83 std Z+2, r20 ; 0x02 epp->bmAttributes = EP_TRANSFER(EPCO.ep_type); a7a: 01 34 cpi r16, 0x41 ; 65 a7c: 41 f0 breq .+16 ; 0xa8e <__vector_12+0x27c> a7e: 00 34 cpi r16, 0x40 ; 64 a80: 41 f0 breq .+16 ; 0xa92 <__vector_12+0x280> a82: 01 38 cpi r16, 0x81 ; 129 a84: 41 f0 breq .+16 ; 0xa96 <__vector_12+0x284> a86: 00 38 cpi r16, 0x80 ; 128 a88: 41 f4 brne .+16 ; 0xa9a <__vector_12+0x288> a8a: 42 e0 ldi r20, 0x02 ; 2 a8c: 07 c0 rjmp .+14 ; 0xa9c <__vector_12+0x28a> a8e: 4d 2d mov r20, r13 a90: 05 c0 rjmp .+10 ; 0xa9c <__vector_12+0x28a> a92: 4d 2d mov r20, r13 a94: 03 c0 rjmp .+6 ; 0xa9c <__vector_12+0x28a> a96: 42 e0 ldi r20, 0x02 ; 2 a98: 01 c0 rjmp .+2 ; 0xa9c <__vector_12+0x28a> a9a: 43 e0 ldi r20, 0x03 ; 3 a9c: 43 83 std Z+3, r20 ; 0x03 //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) a9e: ae 81 ldd r26, Y+6 ; 0x06 aa0: bf 81 ldd r27, Y+7 ; 0x07 aa2: 12 97 sbiw r26, 0x02 ; 2 if (EPCO.ep_type!=EP_TYPE_DISABLED) { epp->bLength = sizeof(ep_desc); epp->bDescriptorType = 5; epp->bEndpointAddress = (i+1)|(EPCO.ep_type<<7); epp->bmAttributes = EP_TRANSFER(EPCO.ep_type); epp->wMaxPacketSize = EPCO.ep_size; aa4: 4c 91 ld r20, X aa6: 44 83 std Z+4, r20 ; 0x04 aa8: 15 82 std Z+5, r1 ; 0x05 epp->bInterval = EPCO.ep_interval; aaa: ae 81 ldd r26, Y+6 ; 0x06 aac: bf 81 ldd r27, Y+7 ; 0x07 aae: 4c 91 ld r20, X ab0: 46 83 std Z+6, r20 ; 0x06 epp = (ep_desc *)((uint16_t)(epp)+sizeof(ep_desc)); ab2: 37 96 adiw r30, 0x07 ; 7 ab4: 1f 5f subi r17, 0xFF ; 255 ab6: 2c 5f subi r18, 0xFC ; 252 ab8: 3f 4f sbci r19, 0xFF ; 255 } else epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); #else epp = (ep_desc *)((uint16_t)(ifp)+sizeof(if_desc)); #endif if (n) { // endpoints for (i=0; i abe: 48 85 ldd r20, Y+8 ; 0x08 ac0: 59 85 ldd r21, Y+9 ; 0x09 ac2: 7d 83 std Y+5, r23 ; 0x05 ac4: 6c 83 std Y+4, r22 ; 0x04 ac6: 4f 5f subi r20, 0xFF ; 255 ac8: 5f 4f sbci r21, 0xFF ; 255 aca: 0c 81 ldd r16, Y+4 ; 0x04 acc: 1d 81 ldd r17, Y+5 ; 0x05 ace: 00 5f subi r16, 0xF0 ; 240 ad0: 1f 4f sbci r17, 0xFF ; 255 ad2: 1d 83 std Y+5, r17 ; 0x05 ad4: 0c 83 std Y+4, r16 ; 0x04 cfg->bmAttributes = POWERING; cfg->bMaxPower = MAXPOWER>>1; // initialize interface descriptor ifp = (if_desc *)((uint16_t)(cfg)+sizeof(cfg_desc)); #if (NUMINTERFACES>1) for (j=0; j adc: 74 2f mov r23, r20 //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) ade: 92 01 movw r18, r4 ae0: c3 2c mov r12, r3 ae2: 0c 81 ldd r16, Y+4 ; 0x04 ae4: 1d 81 ldd r17, Y+5 ; 0x05 ae6: 72 cf rjmp .-284 ; 0x9cc <__vector_12+0x1ba> ae8: 0a 81 ldd r16, Y+2 ; 0x02 aea: 1b 81 ldd r17, Y+3 ; 0x03 #if (NUMINTERFACES>1) ifp = (if_desc *)epp; } #endif // finally usb_desc_out(true,(uint8_t *)cfg,s,ucr.wLength); aec: 98 01 movw r18, r16 aee: 49 81 ldd r20, Y+1 ; 0x01 af0: b7 01 movw r22, r14 af2: 81 e0 ldi r24, 0x01 ; 1 af4: 0e 94 3d 03 call 0x67a ; 0x67a free(cfg); af8: c7 01 movw r24, r14 afa: 0e 94 91 07 call 0xf22 ; 0xf22 break; afe: 4d c1 rjmp .+666 ; 0xd9a <__vector_12+0x588> case 0x0300: // String 0 usb_desc_out(false,(uint8_t *)&string0.bLength,pgm_read_byte(&string0.bLength),ucr.wLength); b00: e6 e8 ldi r30, 0x86 ; 134 b02: f0 e0 ldi r31, 0x00 ; 0 b04: 44 91 lpm r20, Z b06: 98 01 movw r18, r16 b08: bf 01 movw r22, r30 b0a: 80 e0 ldi r24, 0x00 ; 0 b0c: 0e 94 3d 03 call 0x67a ; 0x67a break; b10: 44 c1 rjmp .+648 ; 0xd9a <__vector_12+0x588> case 0x0301: // String 1 usb_desc_out(false,(uint8_t *)&string1.bLength,pgm_read_byte(&string1.bLength),ucr.wLength); b12: ea e8 ldi r30, 0x8A ; 138 b14: f0 e0 ldi r31, 0x00 ; 0 b16: 44 91 lpm r20, Z b18: 98 01 movw r18, r16 b1a: bf 01 movw r22, r30 b1c: 80 e0 ldi r24, 0x00 ; 0 b1e: 0e 94 3d 03 call 0x67a ; 0x67a break; b22: 3b c1 rjmp .+630 ; 0xd9a <__vector_12+0x588> case 0x0302: // String 2 usb_desc_out(false,(uint8_t *)&string2.bLength,pgm_read_byte(&string2.bLength),ucr.wLength); b24: e0 ea ldi r30, 0xA0 ; 160 b26: f0 e0 ldi r31, 0x00 ; 0 b28: 44 91 lpm r20, Z b2a: 98 01 movw r18, r16 b2c: bf 01 movw r22, r30 b2e: 80 e0 ldi r24, 0x00 ; 0 b30: 0e 94 3d 03 call 0x67a ; 0x67a break; b34: 32 c1 rjmp .+612 ; 0xd9a <__vector_12+0x588> #if (USESN>0) case 0x0303: // String 3, serial number #if (USESN==1) // serial number in the flash usb_desc_out(false,(uint8_t *)&string3.bLength,pgm_read_byte(&string3.bLength),ucr.wLength); b36: e2 ec ldi r30, 0xC2 ; 194 b38: f0 e0 ldi r31, 0x00 ; 0 b3a: 44 91 lpm r20, Z b3c: 98 01 movw r18, r16 b3e: bf 01 movw r22, r30 b40: 80 e0 ldi r24, 0x00 ; 0 b42: 0e 94 3d 03 call 0x67a ; 0x67a i++; } buf.bLength=2*i+2; // total length of the data set usb_desc_out(true,(uint8_t *)&buf,buf.bLength,ucr.wLength); #endif break; b46: 29 c1 rjmp .+594 ; 0xd9a <__vector_12+0x588> #endif default: STALL; // stall b48: 81 e2 ldi r24, 0x21 ; 33 b4a: 80 93 eb 00 sts 0x00EB, r24 b4e: 25 c1 rjmp .+586 ; 0xd9a <__vector_12+0x588> } return; } if (ucr.bRequest == SET_ADDRESS) { b50: 45 30 cpi r20, 0x05 ; 5 b52: 61 f4 brne .+24 ; 0xb6c <__vector_12+0x35a> USB_SEND_IN; b54: 2e ef ldi r18, 0xFE ; 254 b56: 20 93 e8 00 sts 0x00E8, r18 #define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) static inline void usb_wait_in_ready(void) { while (!(UEINTX & _BV(TXINI))); b5a: e8 ee ldi r30, 0xE8 ; 232 b5c: f0 e0 ldi r31, 0x00 ; 0 b5e: 20 81 ld r18, Z b60: 20 ff sbrs r18, 0 b62: fd cf rjmp .-6 ; 0xb5e <__vector_12+0x34c> return; } if (ucr.bRequest == SET_ADDRESS) { USB_SEND_IN; usb_wait_in_ready(); UDADDR = ucr.wValue | _BV(ADDEN); b64: 80 68 ori r24, 0x80 ; 128 b66: 80 93 e3 00 sts 0x00E3, r24 b6a: 17 c1 rjmp .+558 ; 0xd9a <__vector_12+0x588> ucr.bmRequestType = UEDATX; ucr.bRequest = UEDATX; ucr.wValue = UEDATX; ucr.wValue |= (UEDATX << 8); ucr.wIndex = UEDATX; ucr.wIndex |= (UEDATX << 8); b6c: 37 2f mov r19, r23 b6e: 20 e0 ldi r18, 0x00 ; 0 b70: 26 2b or r18, r22 USB_SEND_IN; usb_wait_in_ready(); UDADDR = ucr.wValue | _BV(ADDEN); return; } if (ucr.bRequest == SET_CONFIGURATION && ucr.bmRequestType == 0) { // another configuration will be chosen b72: 49 30 cpi r20, 0x09 ; 9 b74: 99 f4 brne .+38 ; 0xb9c <__vector_12+0x38a> b76: 51 11 cpse r21, r1 b78: 3e c0 rjmp .+124 ; 0xbf6 <__vector_12+0x3e4> if (ucr.wValue==1) { // configuration 1 will be chosen b7a: 01 97 sbiw r24, 0x01 ; 1 b7c: 59 f4 brne .+22 ; 0xb94 <__vector_12+0x382> usb_conf = ucr.wValue; b7e: 81 e0 ldi r24, 0x01 ; 1 b80: 80 93 f2 01 sts 0x01F2, r24 USB_SEND_IN; b84: 8e ef ldi r24, 0xFE ; 254 b86: 80 93 e8 00 sts 0x00E8, r24 #ifdef STATICENDPOINTS usb_if = 0; // select interface 0 b8a: 10 92 25 01 sts 0x0125, r1 usb_endpoints(); // initialize endpoints b8e: 0e 94 b6 02 call 0x56c ; 0x56c b92: 03 c1 rjmp .+518 ; 0xd9a <__vector_12+0x588> usb_if = 0; // select interface 0 usb_endpoints(usb_if); // initialize endpoints #endif #endif } else { // other configurations are not supported in this version STALL; // stall b94: 81 e2 ldi r24, 0x21 ; 33 b96: 80 93 eb 00 sts 0x00EB, r24 b9a: ff c0 rjmp .+510 ; 0xd9a <__vector_12+0x588> } return; } if (ucr.bRequest == GET_CONFIGURATION && ucr.bmRequestType == 0x80) { b9c: 48 30 cpi r20, 0x08 ; 8 b9e: 81 f4 brne .+32 ; 0xbc0 <__vector_12+0x3ae> ba0: 50 38 cpi r21, 0x80 ; 128 ba2: 09 f0 breq .+2 ; 0xba6 <__vector_12+0x394> ba4: 43 c0 rjmp .+134 ; 0xc2c <__vector_12+0x41a> #define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) static inline void usb_wait_in_ready(void) { while (!(UEINTX & _BV(TXINI))); ba6: e8 ee ldi r30, 0xE8 ; 232 ba8: f0 e0 ldi r31, 0x00 ; 0 baa: 80 81 ld r24, Z bac: 80 ff sbrs r24, 0 bae: fd cf rjmp .-6 ; 0xbaa <__vector_12+0x398> } return; } if (ucr.bRequest == GET_CONFIGURATION && ucr.bmRequestType == 0x80) { usb_wait_in_ready(); UEDATX = usb_conf; bb0: 80 91 f2 01 lds r24, 0x01F2 bb4: 80 93 f1 00 sts 0x00F1, r24 USB_SEND_IN; bb8: 8e ef ldi r24, 0xFE ; 254 bba: 80 93 e8 00 sts 0x00E8, r24 bbe: ed c0 rjmp .+474 ; 0xd9a <__vector_12+0x588> return; } if (ucr.bRequest == CDC_GET_LINE_CODING && ucr.bmRequestType == 0xA1) { bc0: 41 32 cpi r20, 0x21 ; 33 bc2: c9 f4 brne .+50 ; 0xbf6 <__vector_12+0x3e4> bc4: 51 3a cpi r21, 0xA1 ; 161 bc6: 09 f0 breq .+2 ; 0xbca <__vector_12+0x3b8> bc8: 43 c0 rjmp .+134 ; 0xc50 <__vector_12+0x43e> #define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) static inline void usb_wait_in_ready(void) { while (!(UEINTX & _BV(TXINI))); bca: e8 ee ldi r30, 0xE8 ; 232 bcc: f0 e0 ldi r31, 0x00 ; 0 bce: 80 81 ld r24, Z bd0: 80 ff sbrs r24, 0 bd2: fd cf rjmp .-6 ; 0xbce <__vector_12+0x3bc> return; } if (ucr.bRequest == CDC_GET_LINE_CODING && ucr.bmRequestType == 0xA1) { // request baudrate and transmission format usb_wait_in_ready(); cdc_notify_getlinecoding(); bd4: 0e 94 d8 00 call 0x1b0 ; 0x1b0 bd8: e5 ef ldi r30, 0xF5 ; 245 bda: f1 e0 ldi r31, 0x01 ; 1 //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) bdc: 8c ef ldi r24, 0xFC ; 252 bde: 91 e0 ldi r25, 0x01 ; 1 } if (ucr.bRequest == CDC_GET_LINE_CODING && ucr.bmRequestType == 0xA1) { // request baudrate and transmission format usb_wait_in_ready(); cdc_notify_getlinecoding(); for (i=0; i<7; i++) UEDATX = cdc_linecoding.data[i]; be0: a1 ef ldi r26, 0xF1 ; 241 be2: b0 e0 ldi r27, 0x00 ; 0 be4: 21 91 ld r18, Z+ be6: 2c 93 st X, r18 be8: e8 17 cp r30, r24 bea: f9 07 cpc r31, r25 bec: d9 f7 brne .-10 ; 0xbe4 <__vector_12+0x3d2> USB_SEND_IN; bee: 8e ef ldi r24, 0xFE ; 254 bf0: 80 93 e8 00 sts 0x00E8, r24 bf4: d2 c0 rjmp .+420 ; 0xd9a <__vector_12+0x588> return; } if (ucr.bRequest == CDC_SET_LINE_CODING && ucr.bmRequestType == 0x21) { bf6: 40 32 cpi r20, 0x20 ; 32 bf8: c9 f4 brne .+50 ; 0xc2c <__vector_12+0x41a> bfa: 51 32 cpi r21, 0x21 ; 33 bfc: 09 f0 breq .+2 ; 0xc00 <__vector_12+0x3ee> bfe: 59 c0 rjmp .+178 ; 0xcb2 <__vector_12+0x4a0> // set baudrate and transmission format usb_wait_receive_out(); c00: 0e 94 37 03 call 0x66e ; 0x66e c04: e5 ef ldi r30, 0xF5 ; 245 c06: f1 e0 ldi r31, 0x01 ; 1 //----------------------------------------------------------------------------- // Endpoint Interrupts //----------------------------------------------------------------------------- // Interrupts, triggered by incoming data in an endpoint, are handled here. ISR(USB_COM_vect) c08: 8c ef ldi r24, 0xFC ; 252 c0a: 91 e0 ldi r25, 0x01 ; 1 return; } if (ucr.bRequest == CDC_SET_LINE_CODING && ucr.bmRequestType == 0x21) { // set baudrate and transmission format usb_wait_receive_out(); for (i=0; i<7; i++) cdc_linecoding.data[i] = UEDATX; c0c: a1 ef ldi r26, 0xF1 ; 241 c0e: b0 e0 ldi r27, 0x00 ; 0 c10: 2c 91 ld r18, X c12: 21 93 st Z+, r18 c14: e8 17 cp r30, r24 c16: f9 07 cpc r31, r25 c18: d9 f7 brne .-10 ; 0xc10 <__vector_12+0x3fe> USB_ACK; c1a: e8 ee ldi r30, 0xE8 ; 232 c1c: f0 e0 ldi r31, 0x00 ; 0 c1e: 8b ef ldi r24, 0xFB ; 251 c20: 80 83 st Z, r24 USB_SEND_IN; c22: 8e ef ldi r24, 0xFE ; 254 c24: 80 83 st Z, r24 cdc_notify_setlinecoding(); c26: 0e 94 d9 00 call 0x1b2 ; 0x1b2 c2a: b7 c0 rjmp .+366 ; 0xd9a <__vector_12+0x588> return; } if (ucr.bRequest == CDC_SET_CONTROL_LINE_STATE && ucr.bmRequestType == 0x21) { c2c: 42 32 cpi r20, 0x22 ; 34 c2e: 81 f4 brne .+32 ; 0xc50 <__vector_12+0x43e> c30: 51 32 cpi r21, 0x21 ; 33 c32: 09 f0 breq .+2 ; 0xc36 <__vector_12+0x424> c34: 4f c0 rjmp .+158 ; 0xcd4 <__vector_12+0x4c2> // set handshake outputs RTS and DTR cdc_rtsdtr = (uint8_t)ucr.wValue; c36: 80 93 f4 01 sts 0x01F4, r24 #define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) static inline void usb_wait_in_ready(void) { while (!(UEINTX & _BV(TXINI))); c3a: e8 ee ldi r30, 0xE8 ; 232 c3c: f0 e0 ldi r31, 0x00 ; 0 c3e: 80 81 ld r24, Z c40: 80 ff sbrs r24, 0 c42: fd cf rjmp .-6 ; 0xc3e <__vector_12+0x42c> } if (ucr.bRequest == CDC_SET_CONTROL_LINE_STATE && ucr.bmRequestType == 0x21) { // set handshake outputs RTS and DTR cdc_rtsdtr = (uint8_t)ucr.wValue; usb_wait_in_ready(); USB_SEND_IN; c44: 8e ef ldi r24, 0xFE ; 254 c46: 80 93 e8 00 sts 0x00E8, r24 cdc_notify_setcontrollinestate(); c4a: 0e 94 da 00 call 0x1b4 ; 0x1b4 c4e: a5 c0 rjmp .+330 ; 0xd9a <__vector_12+0x588> return; } if (ucr.bRequest == GET_STATUS) { c50: 41 11 cpse r20, r1 c52: 1a c0 rjmp .+52 ; 0xc88 <__vector_12+0x476> #define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) static inline void usb_wait_in_ready(void) { while (!(UEINTX & _BV(TXINI))); c54: e8 ee ldi r30, 0xE8 ; 232 c56: f0 e0 ldi r31, 0x00 ; 0 c58: 80 81 ld r24, Z c5a: 80 ff sbrs r24, 0 c5c: fd cf rjmp .-6 ; 0xc58 <__vector_12+0x446> } if (ucr.bRequest == GET_STATUS) { usb_wait_in_ready(); i = 0; #ifdef SUPPORT_ENDPOINT_HALT if (ucr.bmRequestType == 0x82) { c5e: 52 38 cpi r21, 0x82 ; 130 c60: 51 f4 brne .+20 ; 0xc76 <__vector_12+0x464> UENUM = ucr.wIndex; c62: e9 ee ldi r30, 0xE9 ; 233 c64: f0 e0 ldi r31, 0x00 ; 0 c66: 20 83 st Z, r18 if (UECONX & _BV(STALLRQ)) i = 1; c68: 80 91 eb 00 lds r24, 0x00EB c6c: 85 fb bst r24, 5 c6e: 88 27 eor r24, r24 c70: 80 f9 bld r24, 0 UENUM = 0; c72: 10 82 st Z, r1 c74: 01 c0 rjmp .+2 ; 0xc78 <__vector_12+0x466> cdc_notify_setcontrollinestate(); return; } if (ucr.bRequest == GET_STATUS) { usb_wait_in_ready(); i = 0; c76: 80 e0 ldi r24, 0x00 ; 0 UENUM = ucr.wIndex; if (UECONX & _BV(STALLRQ)) i = 1; UENUM = 0; } #endif UEDATX = i; c78: e1 ef ldi r30, 0xF1 ; 241 c7a: f0 e0 ldi r31, 0x00 ; 0 c7c: 80 83 st Z, r24 UEDATX = 0; c7e: 10 82 st Z, r1 USB_SEND_IN; c80: 8e ef ldi r24, 0xFE ; 254 c82: 80 93 e8 00 sts 0x00E8, r24 c86: 89 c0 rjmp .+274 ; 0xd9a <__vector_12+0x588> return; } #if (NUMINTERFACES>1) if (ucr.bRequest == SET_INTERFACE && (ucr.bmRequestType == 0x20 || ucr.bmRequestType == 0)) { // another interface will be chosen c88: 4b 30 cpi r20, 0x0B ; 11 c8a: 99 f4 brne .+38 ; 0xcb2 <__vector_12+0x4a0> c8c: 50 32 cpi r21, 0x20 ; 32 c8e: 11 f0 breq .+4 ; 0xc94 <__vector_12+0x482> c90: 51 11 cpse r21, r1 c92: 49 c0 rjmp .+146 ; 0xd26 <__vector_12+0x514> if (ucr.wIndex usb_if = ucr.wIndex; c9a: 20 93 25 01 sts 0x0125, r18 USB_SEND_IN; c9e: 8e ef ldi r24, 0xFE ; 254 ca0: 80 93 e8 00 sts 0x00E8, r24 #ifdef STATICENDPOINTS usb_endpoints(); // initialize endpoints ca4: 0e 94 b6 02 call 0x56c ; 0x56c ca8: 78 c0 rjmp .+240 ; 0xd9a <__vector_12+0x588> #else usb_endpoints(usb_if); // initialize endpoints #endif } else { // other configurations are not supported in this version STALL; // stall caa: 81 e2 ldi r24, 0x21 ; 33 cac: 80 93 eb 00 sts 0x00EB, r24 cb0: 74 c0 rjmp .+232 ; 0xd9a <__vector_12+0x588> } return; } if (ucr.bRequest == GET_INTERFACE && ucr.bmRequestType == 0x80) { cb2: 4a 30 cpi r20, 0x0A ; 10 cb4: 79 f4 brne .+30 ; 0xcd4 <__vector_12+0x4c2> cb6: 50 38 cpi r21, 0x80 ; 128 cb8: b1 f5 brne .+108 ; 0xd26 <__vector_12+0x514> #define STALL UECONX = _BV(STALLRQ) | _BV(EPEN) static inline void usb_wait_in_ready(void) { while (!(UEINTX & _BV(TXINI))); cba: e8 ee ldi r30, 0xE8 ; 232 cbc: f0 e0 ldi r31, 0x00 ; 0 cbe: 80 81 ld r24, Z cc0: 80 ff sbrs r24, 0 cc2: fd cf rjmp .-6 ; 0xcbe <__vector_12+0x4ac> } return; } if (ucr.bRequest == GET_INTERFACE && ucr.bmRequestType == 0x80) { usb_wait_in_ready(); UEDATX = usb_if; cc4: 80 91 25 01 lds r24, 0x0125 cc8: 80 93 f1 00 sts 0x00F1, r24 USB_SEND_IN; ccc: 8e ef ldi r24, 0xFE ; 254 cce: 80 93 e8 00 sts 0x00E8, r24 cd2: 63 c0 rjmp .+198 ; 0xd9a <__vector_12+0x588> return; } #endif #ifdef SUPPORT_ENDPOINT_HALT if ((ucr.bRequest == CLEAR_FEATURE || ucr.bRequest == SET_FEATURE) cd4: 41 30 cpi r20, 0x01 ; 1 cd6: 11 f0 breq .+4 ; 0xcdc <__vector_12+0x4ca> cd8: 43 30 cpi r20, 0x03 ; 3 cda: 29 f5 brne .+74 ; 0xd26 <__vector_12+0x514> && ucr.bmRequestType == 0x02 && ucr.wValue == 0) { cdc: 52 30 cpi r21, 0x02 ; 2 cde: 19 f5 brne .+70 ; 0xd26 <__vector_12+0x514> ce0: 89 2b or r24, r25 ce2: 09 f5 brne .+66 ; 0xd26 <__vector_12+0x514> i = ucr.wIndex & 0x7F; ce4: 2f 77 andi r18, 0x7F ; 127 ce6: 33 27 eor r19, r19 if (i >= 1 && i <= MAX_ENDPOINT) { ce8: 92 2f mov r25, r18 cea: 91 50 subi r25, 0x01 ; 1 cec: 94 30 cpi r25, 0x04 ; 4 cee: d8 f4 brcc .+54 ; 0xd26 <__vector_12+0x514> USB_SEND_IN; cf0: 9e ef ldi r25, 0xFE ; 254 cf2: 90 93 e8 00 sts 0x00E8, r25 UENUM = i; cf6: 20 93 e9 00 sts 0x00E9, r18 if (ucr.bRequest == SET_FEATURE) { cfa: 43 30 cpi r20, 0x03 ; 3 cfc: 21 f4 brne .+8 ; 0xd06 <__vector_12+0x4f4> UECONX = _BV(STALLRQ)|_BV(EPEN); cfe: 81 e2 ldi r24, 0x21 ; 33 d00: 80 93 eb 00 sts 0x00EB, r24 d04: 4a c0 rjmp .+148 ; 0xd9a <__vector_12+0x588> } else { UECONX = _BV(STALLRQC)|_BV(RSTDT)|_BV(EPEN); d06: 89 e1 ldi r24, 0x19 ; 25 d08: 80 93 eb 00 sts 0x00EB, r24 UERST = _BV(i); d0c: 81 e0 ldi r24, 0x01 ; 1 d0e: 90 e0 ldi r25, 0x00 ; 0 d10: ac 01 movw r20, r24 d12: 02 c0 rjmp .+4 ; 0xd18 <__vector_12+0x506> d14: 44 0f add r20, r20 d16: 55 1f adc r21, r21 d18: 2a 95 dec r18 d1a: e2 f7 brpl .-8 ; 0xd14 <__vector_12+0x502> d1c: ea ee ldi r30, 0xEA ; 234 d1e: f0 e0 ldi r31, 0x00 ; 0 d20: 40 83 st Z, r20 UERST = 0; d22: 10 82 st Z, r1 d24: 3a c0 rjmp .+116 ; 0xd9a <__vector_12+0x588> if (!usb_controlrequest(&ucr)) UECONX = _BV(STALLRQ) | _BV(EPEN); // stall return; #endif } UECONX = _BV(STALLRQ) | _BV(EPEN); // stall d26: 81 e2 ldi r24, 0x21 ; 33 d28: 80 93 eb 00 sts 0x00EB, r24 d2c: 2d c0 rjmp .+90 ; 0xd88 <__vector_12+0x576> d2e: 12 2f mov r17, r18 } // handle pending interrupts for other endpoints for (i=1; i<=MAX_ENDPOINT; i++) { if (UEINT & _BV(i)) { d30: 80 81 ld r24, Z d32: 90 e0 ldi r25, 0x00 ; 0 d34: 02 2e mov r0, r18 d36: 02 c0 rjmp .+4 ; 0xd3c <__vector_12+0x52a> d38: 95 95 asr r25 d3a: 87 95 ror r24 d3c: 0a 94 dec r0 d3e: e2 f7 brpl .-8 ; 0xd38 <__vector_12+0x526> d40: 80 ff sbrs r24, 0 d42: 19 c0 rjmp .+50 ; 0xd76 <__vector_12+0x564> UENUM=i; // select endpoint d44: da 01 movw r26, r20 d46: 2c 93 st X, r18 intbits = UEINTX; // save interrupt bits of the endpoint d48: db 01 movw r26, r22 d4a: 8c 91 ld r24, X if (intbits & _BV(RXOUTI)) { // interrupt occured by incoming data d4c: 82 ff sbrs r24, 2 d4e: 13 c0 rjmp .+38 ; 0xd76 <__vector_12+0x564> #ifdef MEGA4_6 if (((uint16_t)(UEBCHX)<<8)+UEBCLX) { // data available in input endpoint usb_ep(i,((uint16_t)(UEBCHX)<<8)+UEBCLX); #else if (UEBCLX) { // data available in input endpoint d50: 80 91 f2 00 lds r24, 0x00F2 d54: 88 23 and r24, r24 d56: 41 f0 breq .+16 ; 0xd68 <__vector_12+0x556> usb_ep(i,UEBCLX); d58: 60 91 f2 00 lds r22, 0x00F2 d5c: 70 e0 ldi r23, 0x00 ; 0 d5e: 82 2f mov r24, r18 d60: 0e 94 db 00 call 0x1b6 ; 0x1b6 #endif UENUM=i; // reselect endpoint (if changed by handling routine) d64: 10 93 e9 00 sts 0x00E9, r17 } UEINTX = ~(_BV(RXOUTI)|_BV(STALLEDI)); // clear interrupt flags d68: e8 ee ldi r30, 0xE8 ; 232 d6a: f0 e0 ldi r31, 0x00 ; 0 d6c: 89 ef ldi r24, 0xF9 ; 249 d6e: 80 83 st Z, r24 UEINTX = 0x7F; // free bank (FIFOCON), has to be executed after RXOUTI! d70: 8f e7 ldi r24, 0x7F ; 127 d72: 80 83 st Z, r24 d74: 12 c0 rjmp .+36 ; 0xd9a <__vector_12+0x588> d76: 2f 5f subi r18, 0xFF ; 255 d78: 3f 4f sbci r19, 0xFF ; 255 } UECONX = _BV(STALLRQ) | _BV(EPEN); // stall } // handle pending interrupts for other endpoints for (i=1; i<=MAX_ENDPOINT; i++) { d7a: 25 30 cpi r18, 0x05 ; 5 d7c: 31 05 cpc r19, r1 d7e: b9 f6 brne .-82 ; 0xd2e <__vector_12+0x51c> UEINTX = 0x7F; // free bank (FIFOCON), has to be executed after RXOUTI! return; } } } STALL; // stall d80: 81 e2 ldi r24, 0x21 ; 33 d82: 80 93 eb 00 sts 0x00EB, r24 d86: 09 c0 rjmp .+18 ; 0xd9a <__vector_12+0x588> cdc_notify_setcontrollinestate(); return; } if (ucr.bRequest == GET_STATUS) { usb_wait_in_ready(); i = 0; d88: 21 e0 ldi r18, 0x01 ; 1 d8a: 30 e0 ldi r19, 0x00 ; 0 UECONX = _BV(STALLRQ) | _BV(EPEN); // stall } // handle pending interrupts for other endpoints for (i=1; i<=MAX_ENDPOINT; i++) { if (UEINT & _BV(i)) { d8c: e4 ef ldi r30, 0xF4 ; 244 d8e: f0 e0 ldi r31, 0x00 ; 0 UENUM=i; // select endpoint d90: 49 ee ldi r20, 0xE9 ; 233 d92: 50 e0 ldi r21, 0x00 ; 0 intbits = UEINTX; // save interrupt bits of the endpoint d94: 68 ee ldi r22, 0xE8 ; 232 d96: 70 e0 ldi r23, 0x00 ; 0 d98: ca cf rjmp .-108 ; 0xd2e <__vector_12+0x51c> return; } } } STALL; // stall } d9a: 29 96 adiw r28, 0x09 ; 9 d9c: 0f b6 in r0, 0x3f ; 63 d9e: f8 94 cli da0: de bf out 0x3e, r29 ; 62 da2: 0f be out 0x3f, r0 ; 63 da4: cd bf out 0x3d, r28 ; 61 da6: df 91 pop r29 da8: cf 91 pop r28 daa: ff 91 pop r31 dac: ef 91 pop r30 dae: bf 91 pop r27 db0: af 91 pop r26 db2: 9f 91 pop r25 db4: 8f 91 pop r24 db6: 7f 91 pop r23 db8: 6f 91 pop r22 dba: 5f 91 pop r21 dbc: 4f 91 pop r20 dbe: 3f 91 pop r19 dc0: 2f 91 pop r18 dc2: 1f 91 pop r17 dc4: 0f 91 pop r16 dc6: ff 90 pop r15 dc8: ef 90 pop r14 dca: df 90 pop r13 dcc: cf 90 pop r12 dce: bf 90 pop r11 dd0: af 90 pop r10 dd2: 9f 90 pop r9 dd4: 8f 90 pop r8 dd6: 7f 90 pop r7 dd8: 6f 90 pop r6 dda: 5f 90 pop r5 ddc: 4f 90 pop r4 dde: 3f 90 pop r3 de0: 2f 90 pop r2 de2: 0f 90 pop r0 de4: 0f be out 0x3f, r0 ; 63 de6: 0f 90 pop r0 de8: 1f 90 pop r1 dea: 18 95 reti 00000dec : dec: 0f 93 push r16 dee: 1f 93 push r17 df0: cf 93 push r28 df2: df 93 push r29 df4: 82 30 cpi r24, 0x02 ; 2 df6: 91 05 cpc r25, r1 df8: 10 f4 brcc .+4 ; 0xdfe dfa: 82 e0 ldi r24, 0x02 ; 2 dfc: 90 e0 ldi r25, 0x00 ; 0 dfe: e0 91 fe 01 lds r30, 0x01FE e02: f0 91 ff 01 lds r31, 0x01FF e06: 20 e0 ldi r18, 0x00 ; 0 e08: 30 e0 ldi r19, 0x00 ; 0 e0a: c0 e0 ldi r28, 0x00 ; 0 e0c: d0 e0 ldi r29, 0x00 ; 0 e0e: 23 c0 rjmp .+70 ; 0xe56 e10: 40 81 ld r20, Z e12: 51 81 ldd r21, Z+1 ; 0x01 e14: 48 17 cp r20, r24 e16: 59 07 cpc r21, r25 e18: a8 f0 brcs .+42 ; 0xe44 e1a: 48 17 cp r20, r24 e1c: 59 07 cpc r21, r25 e1e: 61 f4 brne .+24 ; 0xe38 e20: 82 81 ldd r24, Z+2 ; 0x02 e22: 93 81 ldd r25, Z+3 ; 0x03 e24: 20 97 sbiw r28, 0x00 ; 0 e26: 19 f0 breq .+6 ; 0xe2e e28: 9b 83 std Y+3, r25 ; 0x03 e2a: 8a 83 std Y+2, r24 ; 0x02 e2c: 2e c0 rjmp .+92 ; 0xe8a e2e: 90 93 ff 01 sts 0x01FF, r25 e32: 80 93 fe 01 sts 0x01FE, r24 e36: 29 c0 rjmp .+82 ; 0xe8a e38: 21 15 cp r18, r1 e3a: 31 05 cpc r19, r1 e3c: 29 f0 breq .+10 ; 0xe48 e3e: 42 17 cp r20, r18 e40: 53 07 cpc r21, r19 e42: 10 f0 brcs .+4 ; 0xe48 e44: a9 01 movw r20, r18 e46: 02 c0 rjmp .+4 ; 0xe4c e48: be 01 movw r22, r28 e4a: df 01 movw r26, r30 e4c: 02 81 ldd r16, Z+2 ; 0x02 e4e: 13 81 ldd r17, Z+3 ; 0x03 e50: ef 01 movw r28, r30 e52: 9a 01 movw r18, r20 e54: f8 01 movw r30, r16 e56: 30 97 sbiw r30, 0x00 ; 0 e58: d9 f6 brne .-74 ; 0xe10 e5a: 21 15 cp r18, r1 e5c: 31 05 cpc r19, r1 e5e: 09 f1 breq .+66 ; 0xea2 e60: 28 1b sub r18, r24 e62: 39 0b sbc r19, r25 e64: 24 30 cpi r18, 0x04 ; 4 e66: 31 05 cpc r19, r1 e68: 90 f4 brcc .+36 ; 0xe8e e6a: 12 96 adiw r26, 0x02 ; 2 e6c: 8d 91 ld r24, X+ e6e: 9c 91 ld r25, X e70: 13 97 sbiw r26, 0x03 ; 3 e72: 61 15 cp r22, r1 e74: 71 05 cpc r23, r1 e76: 21 f0 breq .+8 ; 0xe80 e78: fb 01 movw r30, r22 e7a: 93 83 std Z+3, r25 ; 0x03 e7c: 82 83 std Z+2, r24 ; 0x02 e7e: 04 c0 rjmp .+8 ; 0xe88 e80: 90 93 ff 01 sts 0x01FF, r25 e84: 80 93 fe 01 sts 0x01FE, r24 e88: fd 01 movw r30, r26 e8a: 32 96 adiw r30, 0x02 ; 2 e8c: 44 c0 rjmp .+136 ; 0xf16 e8e: fd 01 movw r30, r26 e90: e2 0f add r30, r18 e92: f3 1f adc r31, r19 e94: 81 93 st Z+, r24 e96: 91 93 st Z+, r25 e98: 22 50 subi r18, 0x02 ; 2 e9a: 31 09 sbc r19, r1 e9c: 2d 93 st X+, r18 e9e: 3c 93 st X, r19 ea0: 3a c0 rjmp .+116 ; 0xf16 ea2: 20 91 fc 01 lds r18, 0x01FC ea6: 30 91 fd 01 lds r19, 0x01FD eaa: 23 2b or r18, r19 eac: 41 f4 brne .+16 ; 0xebe eae: 20 91 28 01 lds r18, 0x0128 eb2: 30 91 29 01 lds r19, 0x0129 eb6: 30 93 fd 01 sts 0x01FD, r19 eba: 20 93 fc 01 sts 0x01FC, r18 ebe: 20 91 26 01 lds r18, 0x0126 ec2: 30 91 27 01 lds r19, 0x0127 ec6: 21 15 cp r18, r1 ec8: 31 05 cpc r19, r1 eca: 41 f4 brne .+16 ; 0xedc ecc: 2d b7 in r18, 0x3d ; 61 ece: 3e b7 in r19, 0x3e ; 62 ed0: 40 91 2a 01 lds r20, 0x012A ed4: 50 91 2b 01 lds r21, 0x012B ed8: 24 1b sub r18, r20 eda: 35 0b sbc r19, r21 edc: e0 91 fc 01 lds r30, 0x01FC ee0: f0 91 fd 01 lds r31, 0x01FD ee4: e2 17 cp r30, r18 ee6: f3 07 cpc r31, r19 ee8: a0 f4 brcc .+40 ; 0xf12 eea: 2e 1b sub r18, r30 eec: 3f 0b sbc r19, r31 eee: 28 17 cp r18, r24 ef0: 39 07 cpc r19, r25 ef2: 78 f0 brcs .+30 ; 0xf12 ef4: ac 01 movw r20, r24 ef6: 4e 5f subi r20, 0xFE ; 254 ef8: 5f 4f sbci r21, 0xFF ; 255 efa: 24 17 cp r18, r20 efc: 35 07 cpc r19, r21 efe: 48 f0 brcs .+18 ; 0xf12 f00: 4e 0f add r20, r30 f02: 5f 1f adc r21, r31 f04: 50 93 fd 01 sts 0x01FD, r21 f08: 40 93 fc 01 sts 0x01FC, r20 f0c: 81 93 st Z+, r24 f0e: 91 93 st Z+, r25 f10: 02 c0 rjmp .+4 ; 0xf16 f12: e0 e0 ldi r30, 0x00 ; 0 f14: f0 e0 ldi r31, 0x00 ; 0 f16: cf 01 movw r24, r30 f18: df 91 pop r29 f1a: cf 91 pop r28 f1c: 1f 91 pop r17 f1e: 0f 91 pop r16 f20: 08 95 ret 00000f22 : f22: ef 92 push r14 f24: ff 92 push r15 f26: 0f 93 push r16 f28: 1f 93 push r17 f2a: cf 93 push r28 f2c: df 93 push r29 f2e: 00 97 sbiw r24, 0x00 ; 0 f30: 09 f4 brne .+2 ; 0xf34 f32: 8f c0 rjmp .+286 ; 0x1052 f34: dc 01 movw r26, r24 f36: 12 97 sbiw r26, 0x02 ; 2 f38: 13 96 adiw r26, 0x03 ; 3 f3a: 1c 92 st X, r1 f3c: 1e 92 st -X, r1 f3e: 12 97 sbiw r26, 0x02 ; 2 f40: e0 90 fe 01 lds r14, 0x01FE f44: f0 90 ff 01 lds r15, 0x01FF f48: e1 14 cp r14, r1 f4a: f1 04 cpc r15, r1 f4c: 89 f4 brne .+34 ; 0xf70 f4e: 2d 91 ld r18, X+ f50: 3c 91 ld r19, X f52: 11 97 sbiw r26, 0x01 ; 1 f54: 28 0f add r18, r24 f56: 39 1f adc r19, r25 f58: 80 91 fc 01 lds r24, 0x01FC f5c: 90 91 fd 01 lds r25, 0x01FD f60: 82 17 cp r24, r18 f62: 93 07 cpc r25, r19 f64: 89 f5 brne .+98 ; 0xfc8 f66: b0 93 fd 01 sts 0x01FD, r27 f6a: a0 93 fc 01 sts 0x01FC, r26 f6e: 71 c0 rjmp .+226 ; 0x1052 f70: e7 01 movw r28, r14 f72: 20 e0 ldi r18, 0x00 ; 0 f74: 30 e0 ldi r19, 0x00 ; 0 f76: 01 c0 rjmp .+2 ; 0xf7a f78: ea 01 movw r28, r20 f7a: ca 17 cp r28, r26 f7c: db 07 cpc r29, r27 f7e: 38 f4 brcc .+14 ; 0xf8e f80: 4a 81 ldd r20, Y+2 ; 0x02 f82: 5b 81 ldd r21, Y+3 ; 0x03 f84: 9e 01 movw r18, r28 f86: 41 15 cp r20, r1 f88: 51 05 cpc r21, r1 f8a: b1 f7 brne .-20 ; 0xf78 f8c: 22 c0 rjmp .+68 ; 0xfd2 f8e: bc 01 movw r22, r24 f90: 62 50 subi r22, 0x02 ; 2 f92: 71 09 sbc r23, r1 f94: fb 01 movw r30, r22 f96: d3 83 std Z+3, r29 ; 0x03 f98: c2 83 std Z+2, r28 ; 0x02 f9a: 00 81 ld r16, Z f9c: 11 81 ldd r17, Z+1 ; 0x01 f9e: ac 01 movw r20, r24 fa0: 40 0f add r20, r16 fa2: 51 1f adc r21, r17 fa4: 4c 17 cp r20, r28 fa6: 5d 07 cpc r21, r29 fa8: 61 f4 brne .+24 ; 0xfc2 faa: 48 81 ld r20, Y fac: 59 81 ldd r21, Y+1 ; 0x01 fae: 40 0f add r20, r16 fb0: 51 1f adc r21, r17 fb2: 4e 5f subi r20, 0xFE ; 254 fb4: 5f 4f sbci r21, 0xFF ; 255 fb6: 51 83 std Z+1, r21 ; 0x01 fb8: 40 83 st Z, r20 fba: 4a 81 ldd r20, Y+2 ; 0x02 fbc: 5b 81 ldd r21, Y+3 ; 0x03 fbe: 53 83 std Z+3, r21 ; 0x03 fc0: 42 83 std Z+2, r20 ; 0x02 fc2: 21 15 cp r18, r1 fc4: 31 05 cpc r19, r1 fc6: 29 f4 brne .+10 ; 0xfd2 fc8: b0 93 ff 01 sts 0x01FF, r27 fcc: a0 93 fe 01 sts 0x01FE, r26 fd0: 40 c0 rjmp .+128 ; 0x1052 fd2: f9 01 movw r30, r18 fd4: b3 83 std Z+3, r27 ; 0x03 fd6: a2 83 std Z+2, r26 ; 0x02 fd8: e9 01 movw r28, r18 fda: 69 91 ld r22, Y+ fdc: 79 91 ld r23, Y+ fde: c6 0f add r28, r22 fe0: d7 1f adc r29, r23 fe2: ac 17 cp r26, r28 fe4: bd 07 cpc r27, r29 fe6: 79 f4 brne .+30 ; 0x1006 fe8: dc 01 movw r26, r24 fea: 5e 91 ld r21, -X fec: 4e 91 ld r20, -X fee: 46 0f add r20, r22 ff0: 57 1f adc r21, r23 ff2: 4e 5f subi r20, 0xFE ; 254 ff4: 5f 4f sbci r21, 0xFF ; 255 ff6: 51 83 std Z+1, r21 ; 0x01 ff8: 40 83 st Z, r20 ffa: 12 96 adiw r26, 0x02 ; 2 ffc: 8d 91 ld r24, X+ ffe: 9c 91 ld r25, X 1000: 13 97 sbiw r26, 0x03 ; 3 1002: 93 83 std Z+3, r25 ; 0x03 1004: 82 83 std Z+2, r24 ; 0x02 1006: a0 e0 ldi r26, 0x00 ; 0 1008: b0 e0 ldi r27, 0x00 ; 0 100a: 02 c0 rjmp .+4 ; 0x1010 100c: d7 01 movw r26, r14 100e: 7c 01 movw r14, r24 1010: f7 01 movw r30, r14 1012: 82 81 ldd r24, Z+2 ; 0x02 1014: 93 81 ldd r25, Z+3 ; 0x03 1016: 00 97 sbiw r24, 0x00 ; 0 1018: c9 f7 brne .-14 ; 0x100c 101a: c7 01 movw r24, r14 101c: 02 96 adiw r24, 0x02 ; 2 101e: 20 81 ld r18, Z 1020: 31 81 ldd r19, Z+1 ; 0x01 1022: 82 0f add r24, r18 1024: 93 1f adc r25, r19 1026: 20 91 fc 01 lds r18, 0x01FC 102a: 30 91 fd 01 lds r19, 0x01FD 102e: 28 17 cp r18, r24 1030: 39 07 cpc r19, r25 1032: 79 f4 brne .+30 ; 0x1052 1034: 10 97 sbiw r26, 0x00 ; 0 1036: 29 f4 brne .+10 ; 0x1042 1038: 10 92 ff 01 sts 0x01FF, r1 103c: 10 92 fe 01 sts 0x01FE, r1 1040: 04 c0 rjmp .+8 ; 0x104a 1042: 13 96 adiw r26, 0x03 ; 3 1044: 1c 92 st X, r1 1046: 1e 92 st -X, r1 1048: 12 97 sbiw r26, 0x02 ; 2 104a: f0 92 fd 01 sts 0x01FD, r15 104e: e0 92 fc 01 sts 0x01FC, r14 1052: cd b7 in r28, 0x3d ; 61 1054: de b7 in r29, 0x3e ; 62 1056: e6 e0 ldi r30, 0x06 ; 6 1058: 0c 94 ea 0b jmp 0x17d4 ; 0x17d4 <__epilogue_restores__+0x18> 0000105c : 105c: fb 01 movw r30, r22 105e: dc 01 movw r26, r24 1060: 0d 90 ld r0, X+ 1062: 00 20 and r0, r0 1064: e9 f7 brne .-6 ; 0x1060 1066: 11 97 sbiw r26, 0x01 ; 1 1068: 01 90 ld r0, Z+ 106a: 0d 92 st X+, r0 106c: 00 20 and r0, r0 106e: e1 f7 brne .-8 ; 0x1068 1070: 08 95 ret 00001072 : 1072: fb 01 movw r30, r22 1074: 9f 01 movw r18, r30 1076: e8 94 clt 1078: 42 30 cpi r20, 0x02 ; 2 107a: c4 f0 brlt .+48 ; 0x10ac 107c: 45 32 cpi r20, 0x25 ; 37 107e: b4 f4 brge .+44 ; 0x10ac 1080: 4a 30 cpi r20, 0x0A ; 10 1082: 29 f4 brne .+10 ; 0x108e 1084: 97 fb bst r25, 7 1086: 1e f4 brtc .+6 ; 0x108e 1088: 90 95 com r25 108a: 81 95 neg r24 108c: 9f 4f sbci r25, 0xFF ; 255 108e: 64 2f mov r22, r20 1090: 77 27 eor r23, r23 1092: 0e 94 8c 0b call 0x1718 ; 0x1718 <__udivmodhi4> 1096: 80 5d subi r24, 0xD0 ; 208 1098: 8a 33 cpi r24, 0x3A ; 58 109a: 0c f0 brlt .+2 ; 0x109e 109c: 89 5d subi r24, 0xD9 ; 217 109e: 81 93 st Z+, r24 10a0: cb 01 movw r24, r22 10a2: 00 97 sbiw r24, 0x00 ; 0 10a4: a1 f7 brne .-24 ; 0x108e 10a6: 16 f4 brtc .+4 ; 0x10ac 10a8: 5d e2 ldi r21, 0x2D ; 45 10aa: 51 93 st Z+, r21 10ac: 10 82 st Z, r1 10ae: c9 01 movw r24, r18 10b0: 0c 94 e7 0a jmp 0x15ce ; 0x15ce 000010b4 : 10b4: fa 01 movw r30, r20 10b6: cf 93 push r28 10b8: ff 93 push r31 10ba: ef 93 push r30 10bc: 22 30 cpi r18, 0x02 ; 2 10be: 44 f1 brlt .+80 ; 0x1110 10c0: 25 32 cpi r18, 0x25 ; 37 10c2: 34 f5 brge .+76 ; 0x1110 10c4: c2 2f mov r28, r18 10c6: e8 94 clt 10c8: ca 30 cpi r28, 0x0A ; 10 10ca: 49 f4 brne .+18 ; 0x10de 10cc: 97 fb bst r25, 7 10ce: 3e f4 brtc .+14 ; 0x10de 10d0: 90 95 com r25 10d2: 80 95 com r24 10d4: 70 95 com r23 10d6: 61 95 neg r22 10d8: 7f 4f sbci r23, 0xFF ; 255 10da: 8f 4f sbci r24, 0xFF ; 255 10dc: 9f 4f sbci r25, 0xFF ; 255 10de: 2c 2f mov r18, r28 10e0: 33 27 eor r19, r19 10e2: 44 27 eor r20, r20 10e4: 55 27 eor r21, r21 10e6: ff 93 push r31 10e8: ef 93 push r30 10ea: 0e 94 a0 0b call 0x1740 ; 0x1740 <__udivmodsi4> 10ee: ef 91 pop r30 10f0: ff 91 pop r31 10f2: 60 5d subi r22, 0xD0 ; 208 10f4: 6a 33 cpi r22, 0x3A ; 58 10f6: 0c f0 brlt .+2 ; 0x10fa 10f8: 69 5d subi r22, 0xD9 ; 217 10fa: 61 93 st Z+, r22 10fc: b9 01 movw r22, r18 10fe: ca 01 movw r24, r20 1100: 60 50 subi r22, 0x00 ; 0 1102: 70 40 sbci r23, 0x00 ; 0 1104: 80 40 sbci r24, 0x00 ; 0 1106: 90 40 sbci r25, 0x00 ; 0 1108: 51 f7 brne .-44 ; 0x10de 110a: 16 f4 brtc .+4 ; 0x1110 110c: cd e2 ldi r28, 0x2D ; 45 110e: c1 93 st Z+, r28 1110: 10 82 st Z, r1 1112: 8f 91 pop r24 1114: 9f 91 pop r25 1116: cf 91 pop r28 1118: 0c 94 e7 0a jmp 0x15ce ; 0x15ce 0000111c : 111c: a0 e0 ldi r26, 0x00 ; 0 111e: b0 e0 ldi r27, 0x00 ; 0 1120: e4 e9 ldi r30, 0x94 ; 148 1122: f8 e0 ldi r31, 0x08 ; 8 1124: 0c 94 d2 0b jmp 0x17a4 ; 0x17a4 <__prologue_saves__+0x20> 1128: ce 01 movw r24, r28 112a: 09 96 adiw r24, 0x09 ; 9 112c: ac 01 movw r20, r24 112e: 6f 81 ldd r22, Y+7 ; 0x07 1130: 78 85 ldd r23, Y+8 ; 0x08 1132: 8d 81 ldd r24, Y+5 ; 0x05 1134: 9e 81 ldd r25, Y+6 ; 0x06 1136: 0e 94 f3 08 call 0x11e6 ; 0x11e6 113a: e2 e0 ldi r30, 0x02 ; 2 113c: 0c 94 ee 0b jmp 0x17dc ; 0x17dc <__epilogue_restores__+0x20> 00001140 : 1140: a0 e0 ldi r26, 0x00 ; 0 1142: b0 e0 ldi r27, 0x00 ; 0 1144: e6 ea ldi r30, 0xA6 ; 166 1146: f8 e0 ldi r31, 0x08 ; 8 1148: 0c 94 c8 0b jmp 0x1790 ; 0x1790 <__prologue_saves__+0xc> 114c: 6b 01 movw r12, r22 114e: 4a 01 movw r8, r20 1150: 79 01 movw r14, r18 1152: d9 01 movw r26, r18 1154: 13 96 adiw r26, 0x03 ; 3 1156: 2c 91 ld r18, X 1158: 21 ff sbrs r18, 1 115a: 1b c0 rjmp .+54 ; 0x1192 115c: 8c 01 movw r16, r24 115e: c0 e0 ldi r28, 0x00 ; 0 1160: d0 e0 ldi r29, 0x00 ; 0 1162: 10 c0 rjmp .+32 ; 0x1184 1164: d7 01 movw r26, r14 1166: 18 96 adiw r26, 0x08 ; 8 1168: ed 91 ld r30, X+ 116a: fc 91 ld r31, X 116c: 19 97 sbiw r26, 0x09 ; 9 116e: b7 01 movw r22, r14 1170: d8 01 movw r26, r16 1172: 8d 91 ld r24, X+ 1174: 8d 01 movw r16, r26 1176: 09 95 icall 1178: 89 2b or r24, r25 117a: 69 f4 brne .+26 ; 0x1196 117c: 0a 15 cp r16, r10 117e: 1b 05 cpc r17, r11 1180: 89 f7 brne .-30 ; 0x1164 1182: 21 96 adiw r28, 0x01 ; 1 1184: c8 15 cp r28, r8 1186: d9 05 cpc r29, r9 1188: 31 f0 breq .+12 ; 0x1196 118a: 58 01 movw r10, r16 118c: ac 0c add r10, r12 118e: bd 1c adc r11, r13 1190: f5 cf rjmp .-22 ; 0x117c 1192: c0 e0 ldi r28, 0x00 ; 0 1194: d0 e0 ldi r29, 0x00 ; 0 1196: ce 01 movw r24, r28 1198: cd b7 in r28, 0x3d ; 61 119a: de b7 in r29, 0x3e ; 62 119c: ec e0 ldi r30, 0x0C ; 12 119e: 0c 94 e4 0b jmp 0x17c8 ; 0x17c8 <__epilogue_restores__+0xc> 000011a2 : 11a2: ae e0 ldi r26, 0x0E ; 14 11a4: b0 e0 ldi r27, 0x00 ; 0 11a6: e7 ed ldi r30, 0xD7 ; 215 11a8: f8 e0 ldi r31, 0x08 ; 8 11aa: 0c 94 d0 0b jmp 0x17a0 ; 0x17a0 <__prologue_saves__+0x1c> 11ae: 0d 89 ldd r16, Y+21 ; 0x15 11b0: 1e 89 ldd r17, Y+22 ; 0x16 11b2: 86 e0 ldi r24, 0x06 ; 6 11b4: 8c 83 std Y+4, r24 ; 0x04 11b6: 1a 83 std Y+2, r17 ; 0x02 11b8: 09 83 std Y+1, r16 ; 0x01 11ba: 8f ef ldi r24, 0xFF ; 255 11bc: 9f e7 ldi r25, 0x7F ; 127 11be: 9e 83 std Y+6, r25 ; 0x06 11c0: 8d 83 std Y+5, r24 ; 0x05 11c2: ce 01 movw r24, r28 11c4: 49 96 adiw r24, 0x19 ; 25 11c6: ac 01 movw r20, r24 11c8: 6f 89 ldd r22, Y+23 ; 0x17 11ca: 78 8d ldd r23, Y+24 ; 0x18 11cc: ce 01 movw r24, r28 11ce: 01 96 adiw r24, 0x01 ; 1 11d0: 0e 94 f3 08 call 0x11e6 ; 0x11e6 11d4: ef 81 ldd r30, Y+7 ; 0x07 11d6: f8 85 ldd r31, Y+8 ; 0x08 11d8: e0 0f add r30, r16 11da: f1 1f adc r31, r17 11dc: 10 82 st Z, r1 11de: 2e 96 adiw r28, 0x0e ; 14 11e0: e4 e0 ldi r30, 0x04 ; 4 11e2: 0c 94 ec 0b jmp 0x17d8 ; 0x17d8 <__epilogue_restores__+0x1c> 000011e6 : 11e6: ac e0 ldi r26, 0x0C ; 12 11e8: b0 e0 ldi r27, 0x00 ; 0 11ea: e9 ef ldi r30, 0xF9 ; 249 11ec: f8 e0 ldi r31, 0x08 ; 8 11ee: 0c 94 c2 0b jmp 0x1784 ; 0x1784 <__prologue_saves__> 11f2: 7c 01 movw r14, r24 11f4: 6b 01 movw r12, r22 11f6: 8a 01 movw r16, r20 11f8: fc 01 movw r30, r24 11fa: 17 82 std Z+7, r1 ; 0x07 11fc: 16 82 std Z+6, r1 ; 0x06 11fe: 83 81 ldd r24, Z+3 ; 0x03 1200: 81 ff sbrs r24, 1 1202: c8 c1 rjmp .+912 ; 0x1594 1204: 88 24 eor r8, r8 1206: 83 94 inc r8 1208: 91 2c mov r9, r1 120a: 8c 0e add r8, r28 120c: 9d 1e adc r9, r29 120e: f7 01 movw r30, r14 1210: 93 81 ldd r25, Z+3 ; 0x03 1212: f6 01 movw r30, r12 1214: 93 fd sbrc r25, 3 1216: 85 91 lpm r24, Z+ 1218: 93 ff sbrs r25, 3 121a: 81 91 ld r24, Z+ 121c: 6f 01 movw r12, r30 121e: 88 23 and r24, r24 1220: 09 f4 brne .+2 ; 0x1224 1222: b4 c1 rjmp .+872 ; 0x158c 1224: 85 32 cpi r24, 0x25 ; 37 1226: 39 f4 brne .+14 ; 0x1236 1228: 93 fd sbrc r25, 3 122a: 85 91 lpm r24, Z+ 122c: 93 ff sbrs r25, 3 122e: 81 91 ld r24, Z+ 1230: 6f 01 movw r12, r30 1232: 85 32 cpi r24, 0x25 ; 37 1234: 29 f4 brne .+10 ; 0x1240 1236: b7 01 movw r22, r14 1238: 90 e0 ldi r25, 0x00 ; 0 123a: 0e 94 f7 0a call 0x15ee ; 0x15ee 123e: e7 cf rjmp .-50 ; 0x120e 1240: 51 2c mov r5, r1 1242: 31 2c mov r3, r1 1244: 20 e0 ldi r18, 0x00 ; 0 1246: 20 32 cpi r18, 0x20 ; 32 1248: a8 f4 brcc .+42 ; 0x1274 124a: 8b 32 cpi r24, 0x2B ; 43 124c: 61 f0 breq .+24 ; 0x1266 124e: 28 f4 brcc .+10 ; 0x125a 1250: 80 32 cpi r24, 0x20 ; 32 1252: 51 f0 breq .+20 ; 0x1268 1254: 83 32 cpi r24, 0x23 ; 35 1256: 71 f4 brne .+28 ; 0x1274 1258: 0b c0 rjmp .+22 ; 0x1270 125a: 8d 32 cpi r24, 0x2D ; 45 125c: 39 f0 breq .+14 ; 0x126c 125e: 80 33 cpi r24, 0x30 ; 48 1260: 49 f4 brne .+18 ; 0x1274 1262: 21 60 ori r18, 0x01 ; 1 1264: 2a c0 rjmp .+84 ; 0x12ba 1266: 22 60 ori r18, 0x02 ; 2 1268: 24 60 ori r18, 0x04 ; 4 126a: 27 c0 rjmp .+78 ; 0x12ba 126c: 28 60 ori r18, 0x08 ; 8 126e: 25 c0 rjmp .+74 ; 0x12ba 1270: 20 61 ori r18, 0x10 ; 16 1272: 23 c0 rjmp .+70 ; 0x12ba 1274: 27 fd sbrc r18, 7 1276: 29 c0 rjmp .+82 ; 0x12ca 1278: 38 2f mov r19, r24 127a: 30 53 subi r19, 0x30 ; 48 127c: 3a 30 cpi r19, 0x0A ; 10 127e: 88 f4 brcc .+34 ; 0x12a2 1280: 26 ff sbrs r18, 6 1282: 07 c0 rjmp .+14 ; 0x1292 1284: 85 2d mov r24, r5 1286: 6a e0 ldi r22, 0x0A ; 10 1288: 0e 94 83 0b call 0x1706 ; 0x1706 <__mulqi3> 128c: 58 2e mov r5, r24 128e: 53 0e add r5, r19 1290: 14 c0 rjmp .+40 ; 0x12ba 1292: 83 2d mov r24, r3 1294: 6a e0 ldi r22, 0x0A ; 10 1296: 0e 94 83 0b call 0x1706 ; 0x1706 <__mulqi3> 129a: 38 2e mov r3, r24 129c: 33 0e add r3, r19 129e: 20 62 ori r18, 0x20 ; 32 12a0: 0c c0 rjmp .+24 ; 0x12ba 12a2: 8e 32 cpi r24, 0x2E ; 46 12a4: 21 f4 brne .+8 ; 0x12ae 12a6: 26 fd sbrc r18, 6 12a8: 71 c1 rjmp .+738 ; 0x158c 12aa: 20 64 ori r18, 0x40 ; 64 12ac: 06 c0 rjmp .+12 ; 0x12ba 12ae: 8c 36 cpi r24, 0x6C ; 108 12b0: 11 f4 brne .+4 ; 0x12b6 12b2: 20 68 ori r18, 0x80 ; 128 12b4: 02 c0 rjmp .+4 ; 0x12ba 12b6: 88 36 cpi r24, 0x68 ; 104 12b8: 41 f4 brne .+16 ; 0x12ca 12ba: f6 01 movw r30, r12 12bc: 93 fd sbrc r25, 3 12be: 85 91 lpm r24, Z+ 12c0: 93 ff sbrs r25, 3 12c2: 81 91 ld r24, Z+ 12c4: 6f 01 movw r12, r30 12c6: 81 11 cpse r24, r1 12c8: be cf rjmp .-132 ; 0x1246 12ca: 98 2f mov r25, r24 12cc: 95 54 subi r25, 0x45 ; 69 12ce: 93 30 cpi r25, 0x03 ; 3 12d0: 18 f0 brcs .+6 ; 0x12d8 12d2: 90 52 subi r25, 0x20 ; 32 12d4: 93 30 cpi r25, 0x03 ; 3 12d6: 28 f4 brcc .+10 ; 0x12e2 12d8: 0c 5f subi r16, 0xFC ; 252 12da: 1f 4f sbci r17, 0xFF ; 255 12dc: ff e3 ldi r31, 0x3F ; 63 12de: f9 83 std Y+1, r31 ; 0x01 12e0: 0d c0 rjmp .+26 ; 0x12fc 12e2: 83 36 cpi r24, 0x63 ; 99 12e4: 31 f0 breq .+12 ; 0x12f2 12e6: 83 37 cpi r24, 0x73 ; 115 12e8: 71 f0 breq .+28 ; 0x1306 12ea: 83 35 cpi r24, 0x53 ; 83 12ec: 09 f0 breq .+2 ; 0x12f0 12ee: 5e c0 rjmp .+188 ; 0x13ac 12f0: 23 c0 rjmp .+70 ; 0x1338 12f2: f8 01 movw r30, r16 12f4: 80 81 ld r24, Z 12f6: 89 83 std Y+1, r24 ; 0x01 12f8: 0e 5f subi r16, 0xFE ; 254 12fa: 1f 4f sbci r17, 0xFF ; 255 12fc: 44 24 eor r4, r4 12fe: 43 94 inc r4 1300: 51 2c mov r5, r1 1302: 54 01 movw r10, r8 1304: 15 c0 rjmp .+42 ; 0x1330 1306: 38 01 movw r6, r16 1308: f2 e0 ldi r31, 0x02 ; 2 130a: 6f 0e add r6, r31 130c: 71 1c adc r7, r1 130e: f8 01 movw r30, r16 1310: a0 80 ld r10, Z 1312: b1 80 ldd r11, Z+1 ; 0x01 1314: 26 ff sbrs r18, 6 1316: 03 c0 rjmp .+6 ; 0x131e 1318: 65 2d mov r22, r5 131a: 70 e0 ldi r23, 0x00 ; 0 131c: 02 c0 rjmp .+4 ; 0x1322 131e: 6f ef ldi r22, 0xFF ; 255 1320: 7f ef ldi r23, 0xFF ; 255 1322: c5 01 movw r24, r10 1324: 2c 87 std Y+12, r18 ; 0x0c 1326: 0e 94 dc 0a call 0x15b8 ; 0x15b8 132a: 2c 01 movw r4, r24 132c: 83 01 movw r16, r6 132e: 2c 85 ldd r18, Y+12 ; 0x0c 1330: 6f e7 ldi r22, 0x7F ; 127 1332: 26 2e mov r2, r22 1334: 22 22 and r2, r18 1336: 18 c0 rjmp .+48 ; 0x1368 1338: 38 01 movw r6, r16 133a: f2 e0 ldi r31, 0x02 ; 2 133c: 6f 0e add r6, r31 133e: 71 1c adc r7, r1 1340: f8 01 movw r30, r16 1342: a0 80 ld r10, Z 1344: b1 80 ldd r11, Z+1 ; 0x01 1346: 26 ff sbrs r18, 6 1348: 03 c0 rjmp .+6 ; 0x1350 134a: 65 2d mov r22, r5 134c: 70 e0 ldi r23, 0x00 ; 0 134e: 02 c0 rjmp .+4 ; 0x1354 1350: 6f ef ldi r22, 0xFF ; 255 1352: 7f ef ldi r23, 0xFF ; 255 1354: c5 01 movw r24, r10 1356: 2c 87 std Y+12, r18 ; 0x0c 1358: 0e 94 d1 0a call 0x15a2 ; 0x15a2 135c: 2c 01 movw r4, r24 135e: 2c 85 ldd r18, Y+12 ; 0x0c 1360: 50 e8 ldi r21, 0x80 ; 128 1362: 25 2e mov r2, r21 1364: 22 2a or r2, r18 1366: 83 01 movw r16, r6 1368: 23 fc sbrc r2, 3 136a: 1c c0 rjmp .+56 ; 0x13a4 136c: 06 c0 rjmp .+12 ; 0x137a 136e: b7 01 movw r22, r14 1370: 80 e2 ldi r24, 0x20 ; 32 1372: 90 e0 ldi r25, 0x00 ; 0 1374: 0e 94 f7 0a call 0x15ee ; 0x15ee 1378: 3a 94 dec r3 137a: 83 2d mov r24, r3 137c: 90 e0 ldi r25, 0x00 ; 0 137e: 48 16 cp r4, r24 1380: 59 06 cpc r5, r25 1382: a8 f3 brcs .-22 ; 0x136e 1384: 0f c0 rjmp .+30 ; 0x13a4 1386: f5 01 movw r30, r10 1388: 27 fc sbrc r2, 7 138a: 85 91 lpm r24, Z+ 138c: 27 fe sbrs r2, 7 138e: 81 91 ld r24, Z+ 1390: 5f 01 movw r10, r30 1392: b7 01 movw r22, r14 1394: 90 e0 ldi r25, 0x00 ; 0 1396: 0e 94 f7 0a call 0x15ee ; 0x15ee 139a: 31 10 cpse r3, r1 139c: 3a 94 dec r3 139e: f1 e0 ldi r31, 0x01 ; 1 13a0: 4f 1a sub r4, r31 13a2: 51 08 sbc r5, r1 13a4: 41 14 cp r4, r1 13a6: 51 04 cpc r5, r1 13a8: 71 f7 brne .-36 ; 0x1386 13aa: ed c0 rjmp .+474 ; 0x1586 13ac: 84 36 cpi r24, 0x64 ; 100 13ae: 11 f0 breq .+4 ; 0x13b4 13b0: 89 36 cpi r24, 0x69 ; 105 13b2: 41 f5 brne .+80 ; 0x1404 13b4: f8 01 movw r30, r16 13b6: 27 ff sbrs r18, 7 13b8: 07 c0 rjmp .+14 ; 0x13c8 13ba: 60 81 ld r22, Z 13bc: 71 81 ldd r23, Z+1 ; 0x01 13be: 82 81 ldd r24, Z+2 ; 0x02 13c0: 93 81 ldd r25, Z+3 ; 0x03 13c2: 0c 5f subi r16, 0xFC ; 252 13c4: 1f 4f sbci r17, 0xFF ; 255 13c6: 08 c0 rjmp .+16 ; 0x13d8 13c8: 60 81 ld r22, Z 13ca: 71 81 ldd r23, Z+1 ; 0x01 13cc: 88 27 eor r24, r24 13ce: 77 fd sbrc r23, 7 13d0: 80 95 com r24 13d2: 98 2f mov r25, r24 13d4: 0e 5f subi r16, 0xFE ; 254 13d6: 1f 4f sbci r17, 0xFF ; 255 13d8: 4f e6 ldi r20, 0x6F ; 111 13da: b4 2e mov r11, r20 13dc: b2 22 and r11, r18 13de: 97 ff sbrs r25, 7 13e0: 09 c0 rjmp .+18 ; 0x13f4 13e2: 90 95 com r25 13e4: 80 95 com r24 13e6: 70 95 com r23 13e8: 61 95 neg r22 13ea: 7f 4f sbci r23, 0xFF ; 255 13ec: 8f 4f sbci r24, 0xFF ; 255 13ee: 9f 4f sbci r25, 0xFF ; 255 13f0: f0 e8 ldi r31, 0x80 ; 128 13f2: bf 2a or r11, r31 13f4: 2a e0 ldi r18, 0x0A ; 10 13f6: 30 e0 ldi r19, 0x00 ; 0 13f8: a4 01 movw r20, r8 13fa: 0e 94 23 0b call 0x1646 ; 0x1646 <__ultoa_invert> 13fe: a8 2e mov r10, r24 1400: a8 18 sub r10, r8 1402: 43 c0 rjmp .+134 ; 0x148a 1404: 85 37 cpi r24, 0x75 ; 117 1406: 31 f4 brne .+12 ; 0x1414 1408: 3f ee ldi r19, 0xEF ; 239 140a: b3 2e mov r11, r19 140c: b2 22 and r11, r18 140e: 2a e0 ldi r18, 0x0A ; 10 1410: 30 e0 ldi r19, 0x00 ; 0 1412: 24 c0 rjmp .+72 ; 0x145c 1414: 99 ef ldi r25, 0xF9 ; 249 1416: b9 2e mov r11, r25 1418: b2 22 and r11, r18 141a: 8f 36 cpi r24, 0x6F ; 111 141c: b9 f0 breq .+46 ; 0x144c 141e: 20 f4 brcc .+8 ; 0x1428 1420: 88 35 cpi r24, 0x58 ; 88 1422: 09 f0 breq .+2 ; 0x1426 1424: b3 c0 rjmp .+358 ; 0x158c 1426: 0d c0 rjmp .+26 ; 0x1442 1428: 80 37 cpi r24, 0x70 ; 112 142a: 21 f0 breq .+8 ; 0x1434 142c: 88 37 cpi r24, 0x78 ; 120 142e: 09 f0 breq .+2 ; 0x1432 1430: ad c0 rjmp .+346 ; 0x158c 1432: 02 c0 rjmp .+4 ; 0x1438 1434: 20 e1 ldi r18, 0x10 ; 16 1436: b2 2a or r11, r18 1438: b4 fe sbrs r11, 4 143a: 0b c0 rjmp .+22 ; 0x1452 143c: 84 e0 ldi r24, 0x04 ; 4 143e: b8 2a or r11, r24 1440: 08 c0 rjmp .+16 ; 0x1452 1442: 24 ff sbrs r18, 4 1444: 09 c0 rjmp .+18 ; 0x1458 1446: e6 e0 ldi r30, 0x06 ; 6 1448: be 2a or r11, r30 144a: 06 c0 rjmp .+12 ; 0x1458 144c: 28 e0 ldi r18, 0x08 ; 8 144e: 30 e0 ldi r19, 0x00 ; 0 1450: 05 c0 rjmp .+10 ; 0x145c 1452: 20 e1 ldi r18, 0x10 ; 16 1454: 30 e0 ldi r19, 0x00 ; 0 1456: 02 c0 rjmp .+4 ; 0x145c 1458: 20 e1 ldi r18, 0x10 ; 16 145a: 32 e0 ldi r19, 0x02 ; 2 145c: f8 01 movw r30, r16 145e: b7 fe sbrs r11, 7 1460: 07 c0 rjmp .+14 ; 0x1470 1462: 60 81 ld r22, Z 1464: 71 81 ldd r23, Z+1 ; 0x01 1466: 82 81 ldd r24, Z+2 ; 0x02 1468: 93 81 ldd r25, Z+3 ; 0x03 146a: 0c 5f subi r16, 0xFC ; 252 146c: 1f 4f sbci r17, 0xFF ; 255 146e: 06 c0 rjmp .+12 ; 0x147c 1470: 60 81 ld r22, Z 1472: 71 81 ldd r23, Z+1 ; 0x01 1474: 80 e0 ldi r24, 0x00 ; 0 1476: 90 e0 ldi r25, 0x00 ; 0 1478: 0e 5f subi r16, 0xFE ; 254 147a: 1f 4f sbci r17, 0xFF ; 255 147c: a4 01 movw r20, r8 147e: 0e 94 23 0b call 0x1646 ; 0x1646 <__ultoa_invert> 1482: a8 2e mov r10, r24 1484: a8 18 sub r10, r8 1486: ff e7 ldi r31, 0x7F ; 127 1488: bf 22 and r11, r31 148a: b6 fe sbrs r11, 6 148c: 0b c0 rjmp .+22 ; 0x14a4 148e: 2b 2d mov r18, r11 1490: 2e 7f andi r18, 0xFE ; 254 1492: a5 14 cp r10, r5 1494: 50 f4 brcc .+20 ; 0x14aa 1496: b4 fe sbrs r11, 4 1498: 0a c0 rjmp .+20 ; 0x14ae 149a: b2 fc sbrc r11, 2 149c: 08 c0 rjmp .+16 ; 0x14ae 149e: 2b 2d mov r18, r11 14a0: 2e 7e andi r18, 0xEE ; 238 14a2: 05 c0 rjmp .+10 ; 0x14ae 14a4: 7a 2c mov r7, r10 14a6: 2b 2d mov r18, r11 14a8: 03 c0 rjmp .+6 ; 0x14b0 14aa: 7a 2c mov r7, r10 14ac: 01 c0 rjmp .+2 ; 0x14b0 14ae: 75 2c mov r7, r5 14b0: 24 ff sbrs r18, 4 14b2: 0d c0 rjmp .+26 ; 0x14ce 14b4: fe 01 movw r30, r28 14b6: ea 0d add r30, r10 14b8: f1 1d adc r31, r1 14ba: 80 81 ld r24, Z 14bc: 80 33 cpi r24, 0x30 ; 48 14be: 11 f4 brne .+4 ; 0x14c4 14c0: 29 7e andi r18, 0xE9 ; 233 14c2: 09 c0 rjmp .+18 ; 0x14d6 14c4: 22 ff sbrs r18, 2 14c6: 06 c0 rjmp .+12 ; 0x14d4 14c8: 73 94 inc r7 14ca: 73 94 inc r7 14cc: 04 c0 rjmp .+8 ; 0x14d6 14ce: 82 2f mov r24, r18 14d0: 86 78 andi r24, 0x86 ; 134 14d2: 09 f0 breq .+2 ; 0x14d6 14d4: 73 94 inc r7 14d6: 23 fd sbrc r18, 3 14d8: 14 c0 rjmp .+40 ; 0x1502 14da: 20 ff sbrs r18, 0 14dc: 0f c0 rjmp .+30 ; 0x14fc 14de: 5a 2c mov r5, r10 14e0: 73 14 cp r7, r3 14e2: 60 f4 brcc .+24 ; 0x14fc 14e4: 53 0c add r5, r3 14e6: 57 18 sub r5, r7 14e8: 73 2c mov r7, r3 14ea: 08 c0 rjmp .+16 ; 0x14fc 14ec: b7 01 movw r22, r14 14ee: 80 e2 ldi r24, 0x20 ; 32 14f0: 90 e0 ldi r25, 0x00 ; 0 14f2: 2c 87 std Y+12, r18 ; 0x0c 14f4: 0e 94 f7 0a call 0x15ee ; 0x15ee 14f8: 73 94 inc r7 14fa: 2c 85 ldd r18, Y+12 ; 0x0c 14fc: 73 14 cp r7, r3 14fe: b0 f3 brcs .-20 ; 0x14ec 1500: 04 c0 rjmp .+8 ; 0x150a 1502: 73 14 cp r7, r3 1504: 10 f4 brcc .+4 ; 0x150a 1506: 37 18 sub r3, r7 1508: 01 c0 rjmp .+2 ; 0x150c 150a: 31 2c mov r3, r1 150c: 24 ff sbrs r18, 4 150e: 12 c0 rjmp .+36 ; 0x1534 1510: b7 01 movw r22, r14 1512: 80 e3 ldi r24, 0x30 ; 48 1514: 90 e0 ldi r25, 0x00 ; 0 1516: 2c 87 std Y+12, r18 ; 0x0c 1518: 0e 94 f7 0a call 0x15ee ; 0x15ee 151c: 2c 85 ldd r18, Y+12 ; 0x0c 151e: 22 ff sbrs r18, 2 1520: 1e c0 rjmp .+60 ; 0x155e 1522: 21 ff sbrs r18, 1 1524: 03 c0 rjmp .+6 ; 0x152c 1526: 88 e5 ldi r24, 0x58 ; 88 1528: 90 e0 ldi r25, 0x00 ; 0 152a: 02 c0 rjmp .+4 ; 0x1530 152c: 88 e7 ldi r24, 0x78 ; 120 152e: 90 e0 ldi r25, 0x00 ; 0 1530: b7 01 movw r22, r14 1532: 0c c0 rjmp .+24 ; 0x154c 1534: 82 2f mov r24, r18 1536: 86 78 andi r24, 0x86 ; 134 1538: 91 f0 breq .+36 ; 0x155e 153a: 21 fd sbrc r18, 1 153c: 02 c0 rjmp .+4 ; 0x1542 153e: 80 e2 ldi r24, 0x20 ; 32 1540: 01 c0 rjmp .+2 ; 0x1544 1542: 8b e2 ldi r24, 0x2B ; 43 1544: 27 fd sbrc r18, 7 1546: 8d e2 ldi r24, 0x2D ; 45 1548: b7 01 movw r22, r14 154a: 90 e0 ldi r25, 0x00 ; 0 154c: 0e 94 f7 0a call 0x15ee ; 0x15ee 1550: 06 c0 rjmp .+12 ; 0x155e 1552: b7 01 movw r22, r14 1554: 80 e3 ldi r24, 0x30 ; 48 1556: 90 e0 ldi r25, 0x00 ; 0 1558: 0e 94 f7 0a call 0x15ee ; 0x15ee 155c: 5a 94 dec r5 155e: a5 14 cp r10, r5 1560: c0 f3 brcs .-16 ; 0x1552 1562: aa 94 dec r10 1564: f4 01 movw r30, r8 1566: ea 0d add r30, r10 1568: f1 1d adc r31, r1 156a: b7 01 movw r22, r14 156c: 80 81 ld r24, Z 156e: 90 e0 ldi r25, 0x00 ; 0 1570: 0e 94 f7 0a call 0x15ee ; 0x15ee 1574: a1 10 cpse r10, r1 1576: f5 cf rjmp .-22 ; 0x1562 1578: 06 c0 rjmp .+12 ; 0x1586 157a: b7 01 movw r22, r14 157c: 80 e2 ldi r24, 0x20 ; 32 157e: 90 e0 ldi r25, 0x00 ; 0 1580: 0e 94 f7 0a call 0x15ee ; 0x15ee 1584: 3a 94 dec r3 1586: 31 10 cpse r3, r1 1588: f8 cf rjmp .-16 ; 0x157a 158a: 41 ce rjmp .-894 ; 0x120e 158c: f7 01 movw r30, r14 158e: 26 81 ldd r18, Z+6 ; 0x06 1590: 37 81 ldd r19, Z+7 ; 0x07 1592: 02 c0 rjmp .+4 ; 0x1598 1594: 2f ef ldi r18, 0xFF ; 255 1596: 3f ef ldi r19, 0xFF ; 255 1598: c9 01 movw r24, r18 159a: 2c 96 adiw r28, 0x0c ; 12 159c: e2 e1 ldi r30, 0x12 ; 18 159e: 0c 94 de 0b jmp 0x17bc ; 0x17bc <__epilogue_restores__> 000015a2 : 15a2: fc 01 movw r30, r24 15a4: 05 90 lpm r0, Z+ 15a6: 61 50 subi r22, 0x01 ; 1 15a8: 70 40 sbci r23, 0x00 ; 0 15aa: 01 10 cpse r0, r1 15ac: d8 f7 brcc .-10 ; 0x15a4 15ae: 80 95 com r24 15b0: 90 95 com r25 15b2: 8e 0f add r24, r30 15b4: 9f 1f adc r25, r31 15b6: 08 95 ret 000015b8 : 15b8: fc 01 movw r30, r24 15ba: 61 50 subi r22, 0x01 ; 1 15bc: 70 40 sbci r23, 0x00 ; 0 15be: 01 90 ld r0, Z+ 15c0: 01 10 cpse r0, r1 15c2: d8 f7 brcc .-10 ; 0x15ba 15c4: 80 95 com r24 15c6: 90 95 com r25 15c8: 8e 0f add r24, r30 15ca: 9f 1f adc r25, r31 15cc: 08 95 ret 000015ce : 15ce: dc 01 movw r26, r24 15d0: fc 01 movw r30, r24 15d2: 67 2f mov r22, r23 15d4: 71 91 ld r23, Z+ 15d6: 77 23 and r23, r23 15d8: e1 f7 brne .-8 ; 0x15d2 15da: 32 97 sbiw r30, 0x02 ; 2 15dc: 04 c0 rjmp .+8 ; 0x15e6 15de: 7c 91 ld r23, X 15e0: 6d 93 st X+, r22 15e2: 70 83 st Z, r23 15e4: 62 91 ld r22, -Z 15e6: ae 17 cp r26, r30 15e8: bf 07 cpc r27, r31 15ea: c8 f3 brcs .-14 ; 0x15de 15ec: 08 95 ret 000015ee : 15ee: 0f 93 push r16 15f0: 1f 93 push r17 15f2: cf 93 push r28 15f4: df 93 push r29 15f6: 8c 01 movw r16, r24 15f8: eb 01 movw r28, r22 15fa: 8b 81 ldd r24, Y+3 ; 0x03 15fc: 81 fd sbrc r24, 1 15fe: 03 c0 rjmp .+6 ; 0x1606 1600: 0f ef ldi r16, 0xFF ; 255 1602: 1f ef ldi r17, 0xFF ; 255 1604: 1a c0 rjmp .+52 ; 0x163a 1606: 82 ff sbrs r24, 2 1608: 0d c0 rjmp .+26 ; 0x1624 160a: 2e 81 ldd r18, Y+6 ; 0x06 160c: 3f 81 ldd r19, Y+7 ; 0x07 160e: 8c 81 ldd r24, Y+4 ; 0x04 1610: 9d 81 ldd r25, Y+5 ; 0x05 1612: 28 17 cp r18, r24 1614: 39 07 cpc r19, r25 1616: 64 f4 brge .+24 ; 0x1630 1618: e8 81 ld r30, Y 161a: f9 81 ldd r31, Y+1 ; 0x01 161c: 01 93 st Z+, r16 161e: f9 83 std Y+1, r31 ; 0x01 1620: e8 83 st Y, r30 1622: 06 c0 rjmp .+12 ; 0x1630 1624: e8 85 ldd r30, Y+8 ; 0x08 1626: f9 85 ldd r31, Y+9 ; 0x09 1628: 80 2f mov r24, r16 162a: 09 95 icall 162c: 89 2b or r24, r25 162e: 41 f7 brne .-48 ; 0x1600 1630: 8e 81 ldd r24, Y+6 ; 0x06 1632: 9f 81 ldd r25, Y+7 ; 0x07 1634: 01 96 adiw r24, 0x01 ; 1 1636: 9f 83 std Y+7, r25 ; 0x07 1638: 8e 83 std Y+6, r24 ; 0x06 163a: c8 01 movw r24, r16 163c: df 91 pop r29 163e: cf 91 pop r28 1640: 1f 91 pop r17 1642: 0f 91 pop r16 1644: 08 95 ret 00001646 <__ultoa_invert>: 1646: fa 01 movw r30, r20 1648: aa 27 eor r26, r26 164a: 28 30 cpi r18, 0x08 ; 8 164c: 61 f1 breq .+88 ; 0x16a6 <__ultoa_invert+0x60> 164e: 20 31 cpi r18, 0x10 ; 16 1650: 91 f1 breq .+100 ; 0x16b6 <__ultoa_invert+0x70> 1652: e8 94 clt 1654: 6f 93 push r22 1656: 6e 7f andi r22, 0xFE ; 254 1658: 6e 5f subi r22, 0xFE ; 254 165a: 7f 4f sbci r23, 0xFF ; 255 165c: 8f 4f sbci r24, 0xFF ; 255 165e: 9f 4f sbci r25, 0xFF ; 255 1660: af 4f sbci r26, 0xFF ; 255 1662: b1 e0 ldi r27, 0x01 ; 1 1664: 40 d0 rcall .+128 ; 0x16e6 <__ultoa_invert+0xa0> 1666: b4 e0 ldi r27, 0x04 ; 4 1668: 3e d0 rcall .+124 ; 0x16e6 <__ultoa_invert+0xa0> 166a: 67 0f add r22, r23 166c: 78 1f adc r23, r24 166e: 89 1f adc r24, r25 1670: 9a 1f adc r25, r26 1672: a1 1d adc r26, r1 1674: 68 0f add r22, r24 1676: 79 1f adc r23, r25 1678: 8a 1f adc r24, r26 167a: 91 1d adc r25, r1 167c: a1 1d adc r26, r1 167e: 6a 0f add r22, r26 1680: 71 1d adc r23, r1 1682: 81 1d adc r24, r1 1684: 91 1d adc r25, r1 1686: a1 1d adc r26, r1 1688: 22 d0 rcall .+68 ; 0x16ce <__ultoa_invert+0x88> 168a: 09 f4 brne .+2 ; 0x168e <__ultoa_invert+0x48> 168c: 68 94 set 168e: 3f 91 pop r19 1690: 06 2e mov r0, r22 1692: 00 0c add r0, r0 1694: 30 19 sub r19, r0 1696: 00 0c add r0, r0 1698: 00 0c add r0, r0 169a: 30 19 sub r19, r0 169c: 30 5d subi r19, 0xD0 ; 208 169e: 31 93 st Z+, r19 16a0: ce f6 brtc .-78 ; 0x1654 <__ultoa_invert+0xe> 16a2: cf 01 movw r24, r30 16a4: 08 95 ret 16a6: 46 2f mov r20, r22 16a8: 47 70 andi r20, 0x07 ; 7 16aa: 40 5d subi r20, 0xD0 ; 208 16ac: 41 93 st Z+, r20 16ae: b3 e0 ldi r27, 0x03 ; 3 16b0: 0f d0 rcall .+30 ; 0x16d0 <__ultoa_invert+0x8a> 16b2: c9 f7 brne .-14 ; 0x16a6 <__ultoa_invert+0x60> 16b4: f6 cf rjmp .-20 ; 0x16a2 <__ultoa_invert+0x5c> 16b6: 46 2f mov r20, r22 16b8: 4f 70 andi r20, 0x0F ; 15 16ba: 40 5d subi r20, 0xD0 ; 208 16bc: 4a 33 cpi r20, 0x3A ; 58 16be: 18 f0 brcs .+6 ; 0x16c6 <__ultoa_invert+0x80> 16c0: 49 5d subi r20, 0xD9 ; 217 16c2: 31 fd sbrc r19, 1 16c4: 40 52 subi r20, 0x20 ; 32 16c6: 41 93 st Z+, r20 16c8: 02 d0 rcall .+4 ; 0x16ce <__ultoa_invert+0x88> 16ca: a9 f7 brne .-22 ; 0x16b6 <__ultoa_invert+0x70> 16cc: ea cf rjmp .-44 ; 0x16a2 <__ultoa_invert+0x5c> 16ce: b4 e0 ldi r27, 0x04 ; 4 16d0: a6 95 lsr r26 16d2: 97 95 ror r25 16d4: 87 95 ror r24 16d6: 77 95 ror r23 16d8: 67 95 ror r22 16da: ba 95 dec r27 16dc: c9 f7 brne .-14 ; 0x16d0 <__ultoa_invert+0x8a> 16de: 00 97 sbiw r24, 0x00 ; 0 16e0: 61 05 cpc r22, r1 16e2: 71 05 cpc r23, r1 16e4: 08 95 ret 16e6: 9b 01 movw r18, r22 16e8: ac 01 movw r20, r24 16ea: 0a 2e mov r0, r26 16ec: 06 94 lsr r0 16ee: 57 95 ror r21 16f0: 47 95 ror r20 16f2: 37 95 ror r19 16f4: 27 95 ror r18 16f6: ba 95 dec r27 16f8: c9 f7 brne .-14 ; 0x16ec <__ultoa_invert+0xa6> 16fa: 62 0f add r22, r18 16fc: 73 1f adc r23, r19 16fe: 84 1f adc r24, r20 1700: 95 1f adc r25, r21 1702: a0 1d adc r26, r0 1704: 08 95 ret 00001706 <__mulqi3>: 1706: 00 24 eor r0, r0 00001708 <__mulqi3_loop>: 1708: 80 fd sbrc r24, 0 170a: 06 0e add r0, r22 170c: 66 0f add r22, r22 170e: 11 f0 breq .+4 ; 0x1714 <__mulqi3_exit> 1710: 86 95 lsr r24 1712: d1 f7 brne .-12 ; 0x1708 <__mulqi3_loop> 00001714 <__mulqi3_exit>: 1714: 80 2d mov r24, r0 1716: 08 95 ret 00001718 <__udivmodhi4>: 1718: aa 1b sub r26, r26 171a: bb 1b sub r27, r27 171c: 51 e1 ldi r21, 0x11 ; 17 171e: 07 c0 rjmp .+14 ; 0x172e <__udivmodhi4_ep> 00001720 <__udivmodhi4_loop>: 1720: aa 1f adc r26, r26 1722: bb 1f adc r27, r27 1724: a6 17 cp r26, r22 1726: b7 07 cpc r27, r23 1728: 10 f0 brcs .+4 ; 0x172e <__udivmodhi4_ep> 172a: a6 1b sub r26, r22 172c: b7 0b sbc r27, r23 0000172e <__udivmodhi4_ep>: 172e: 88 1f adc r24, r24 1730: 99 1f adc r25, r25 1732: 5a 95 dec r21 1734: a9 f7 brne .-22 ; 0x1720 <__udivmodhi4_loop> 1736: 80 95 com r24 1738: 90 95 com r25 173a: bc 01 movw r22, r24 173c: cd 01 movw r24, r26 173e: 08 95 ret 00001740 <__udivmodsi4>: 1740: a1 e2 ldi r26, 0x21 ; 33 1742: 1a 2e mov r1, r26 1744: aa 1b sub r26, r26 1746: bb 1b sub r27, r27 1748: fd 01 movw r30, r26 174a: 0d c0 rjmp .+26 ; 0x1766 <__udivmodsi4_ep> 0000174c <__udivmodsi4_loop>: 174c: aa 1f adc r26, r26 174e: bb 1f adc r27, r27 1750: ee 1f adc r30, r30 1752: ff 1f adc r31, r31 1754: a2 17 cp r26, r18 1756: b3 07 cpc r27, r19 1758: e4 07 cpc r30, r20 175a: f5 07 cpc r31, r21 175c: 20 f0 brcs .+8 ; 0x1766 <__udivmodsi4_ep> 175e: a2 1b sub r26, r18 1760: b3 0b sbc r27, r19 1762: e4 0b sbc r30, r20 1764: f5 0b sbc r31, r21 00001766 <__udivmodsi4_ep>: 1766: 66 1f adc r22, r22 1768: 77 1f adc r23, r23 176a: 88 1f adc r24, r24 176c: 99 1f adc r25, r25 176e: 1a 94 dec r1 1770: 69 f7 brne .-38 ; 0x174c <__udivmodsi4_loop> 1772: 60 95 com r22 1774: 70 95 com r23 1776: 80 95 com r24 1778: 90 95 com r25 177a: 9b 01 movw r18, r22 177c: ac 01 movw r20, r24 177e: bd 01 movw r22, r26 1780: cf 01 movw r24, r30 1782: 08 95 ret 00001784 <__prologue_saves__>: 1784: 2f 92 push r2 1786: 3f 92 push r3 1788: 4f 92 push r4 178a: 5f 92 push r5 178c: 6f 92 push r6 178e: 7f 92 push r7 1790: 8f 92 push r8 1792: 9f 92 push r9 1794: af 92 push r10 1796: bf 92 push r11 1798: cf 92 push r12 179a: df 92 push r13 179c: ef 92 push r14 179e: ff 92 push r15 17a0: 0f 93 push r16 17a2: 1f 93 push r17 17a4: cf 93 push r28 17a6: df 93 push r29 17a8: cd b7 in r28, 0x3d ; 61 17aa: de b7 in r29, 0x3e ; 62 17ac: ca 1b sub r28, r26 17ae: db 0b sbc r29, r27 17b0: 0f b6 in r0, 0x3f ; 63 17b2: f8 94 cli 17b4: de bf out 0x3e, r29 ; 62 17b6: 0f be out 0x3f, r0 ; 63 17b8: cd bf out 0x3d, r28 ; 61 17ba: 09 94 ijmp 000017bc <__epilogue_restores__>: 17bc: 2a 88 ldd r2, Y+18 ; 0x12 17be: 39 88 ldd r3, Y+17 ; 0x11 17c0: 48 88 ldd r4, Y+16 ; 0x10 17c2: 5f 84 ldd r5, Y+15 ; 0x0f 17c4: 6e 84 ldd r6, Y+14 ; 0x0e 17c6: 7d 84 ldd r7, Y+13 ; 0x0d 17c8: 8c 84 ldd r8, Y+12 ; 0x0c 17ca: 9b 84 ldd r9, Y+11 ; 0x0b 17cc: aa 84 ldd r10, Y+10 ; 0x0a 17ce: b9 84 ldd r11, Y+9 ; 0x09 17d0: c8 84 ldd r12, Y+8 ; 0x08 17d2: df 80 ldd r13, Y+7 ; 0x07 17d4: ee 80 ldd r14, Y+6 ; 0x06 17d6: fd 80 ldd r15, Y+5 ; 0x05 17d8: 0c 81 ldd r16, Y+4 ; 0x04 17da: 1b 81 ldd r17, Y+3 ; 0x03 17dc: aa 81 ldd r26, Y+2 ; 0x02 17de: b9 81 ldd r27, Y+1 ; 0x01 17e0: ce 0f add r28, r30 17e2: d1 1d adc r29, r1 17e4: 0f b6 in r0, 0x3f ; 63 17e6: f8 94 cli 17e8: de bf out 0x3e, r29 ; 62 17ea: 0f be out 0x3f, r0 ; 63 17ec: cd bf out 0x3d, r28 ; 61 17ee: ed 01 movw r28, r26 17f0: 08 95 ret 000017f2 <_exit>: 17f2: f8 94 cli 000017f4 <__stop_program>: 17f4: ff cf rjmp .-2 ; 0x17f4 <__stop_program>