glg.elf: file format elf32-avrSections:Idx Name Size VMA LMA File off Algn0 .data 00000006 00800100 000022ec 00002360 2**0CONTENTS, ALLOC, LOAD, DATA1 .text 000022ec 00000000 00000000 00000074 2**1CONTENTS, ALLOC, LOAD, READONLY, CODE2 .bss 00000341 00800106 000022f2 00002366 2**0ALLOC3 .stab 0000087c 00000000 00000000 00002368 2**2CONTENTS, READONLY, DEBUGGING4 .stabstr 0000019e 00000000 00000000 00002be4 2**0CONTENTS, READONLY, DEBUGGING5 .debug_aranges 00000060 00000000 00000000 00002d82 2**0CONTENTS, READONLY, DEBUGGING6 .debug_pubnames 0000019e 00000000 00000000 00002de2 2**0CONTENTS, READONLY, DEBUGGING7 .debug_info 00001cfd 00000000 00000000 00002f80 2**0CONTENTS, READONLY, DEBUGGING8 .debug_abbrev 000007a6 00000000 00000000 00004c7d 2**0CONTENTS, READONLY, DEBUGGING9 .debug_line 000019a4 00000000 00000000 00005423 2**0CONTENTS, READONLY, DEBUGGING10 .debug_frame 00000260 00000000 00000000 00006dc8 2**2CONTENTS, READONLY, DEBUGGING11 .debug_str 000005e7 00000000 00000000 00007028 2**0CONTENTS, READONLY, DEBUGGING12 .debug_loc 000020ca 00000000 00000000 0000760f 2**0CONTENTS, READONLY, DEBUGGING13 .debug_ranges 00000178 00000000 00000000 000096d9 2**0CONTENTS, READONLY, DEBUGGINGDisassembly of section .text:00000000 <__vectors>:0: 0c 94 4c 00 jmp 0x98 ; 0x98 <__ctors_end>4: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>8: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>c: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>10: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>14: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>18: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>1c: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>20: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>24: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>28: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>2c: 0c 94 7a 01 jmp 0x2f4 ; 0x2f4 <__vector_11>30: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>34: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>38: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>3c: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>40: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>44: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>48: 0c 94 d6 00 jmp 0x1ac ; 0x1ac <__vector_18>4c: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>50: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>54: 0c 94 6b 00 jmp 0xd6 ; 0xd6 <__vector_21>58: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>5c: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>60: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>64: 0c 94 69 00 jmp 0xd2 ; 0xd2 <__bad_interrupt>00000068 <__c.2081>:68: 0d 0a 00 ...0000006b <__c.2079>:6b: 2c 00 ,.0000006d <__c.2075>:6d: 24 47 50 52 4d 43 00 $GPRMC.00000074 <__c.2073>:74: 24 47 50 47 47 41 00 $GPGGA.0000007b <__c.2071>:7b: 2e 6c 6f 67 00 .log.00000080 <__c.2065>:80: 24 47 50 52 4d 43 00 $GPRMC.00000087 <__c.2014>:87: 24 50 53 52 46 31 30 36 2c 32 31 2a 30 46 0d 0a $PSRF106,21*0F.....00000098 <__ctors_end>:98: 11 24 eor r1, r19a: 1f be out 0x3f, r1 ; 639c: cf ef ldi r28, 0xFF ; 2559e: d4 e0 ldi r29, 0x04 ; 4a0: de bf out 0x3e, r29 ; 62a2: cd bf out 0x3d, r28 ; 61000000a4 <__do_copy_data>:a4: 11 e0 ldi r17, 0x01 ; 1a6: a0 e0 ldi r26, 0x00 ; 0a8: b1 e0 ldi r27, 0x01 ; 1aa: ec ee ldi r30, 0xEC ; 236ac: f2 e2 ldi r31, 0x22 ; 34ae: 02 c0 rjmp .+4 ; 0xb4 <.do_copy_data_start>000000b0 <.do_copy_data_loop>:b0: 05 90 lpm r0, Z+b2: 0d 92 st X+, r0000000b4 <.do_copy_data_start>:b4: a6 30 cpi r26, 0x06 ; 6b6: b1 07 cpc r27, r17b8: d9 f7 brne .-10 ; 0xb0 <.do_copy_data_loop>000000ba <__do_clear_bss>:ba: 14 e0 ldi r17, 0x04 ; 4bc: a6 e0 ldi r26, 0x06 ; 6be: b1 e0 ldi r27, 0x01 ; 1c0: 01 c0 rjmp .+2 ; 0xc4 <.do_clear_bss_start>000000c2 <.do_clear_bss_loop>:c2: 1d 92 st X+, r1000000c4 <.do_clear_bss_start>:c4: a7 34 cpi r26, 0x47 ; 71c6: b1 07 cpc r27, r17c8: e1 f7 brne .-8 ; 0xc2 <.do_clear_bss_loop>ca: 0e 94 ba 01 call 0x374 ; 0x374 <main>ce: 0c 94 75 11 jmp 0x22ea ; 0x22ea <_exit>000000d2 <__bad_interrupt>:d2: 0c 94 00 00 jmp 0 ; 0x0 <__heap_end>000000d6 <__vector_21>:/*---------------------------------------------------------*//* ADC interrupt *//*---------------------------------------------------------*/ISR(ADC_vect){d6: 1f 92 push r1d8: 0f 92 push r0da: 0f b6 in r0, 0x3f ; 63dc: 0f 92 push r0de: 11 24 eor r1, r1e0: 2f 93 push r18e2: 3f 93 push r19e4: 8f 93 push r24WORD n;static BYTE l, h;n = ADC;e6: 20 91 78 00 lds r18, 0x0078ea: 30 91 79 00 lds r19, 0x0079if(ADMUX == POWER_check)ee: 80 91 7c 00 lds r24, 0x007C{if (n < VTH_LOW) {f2: 20 3d cpi r18, 0xD0 ; 208f4: 31 05 cpc r19, r1f6: 70 f4 brcc .+28 ; 0x114 <__vector_21+0x3e>if (l >= 15) {f8: 80 91 09 01 lds r24, 0x0109fc: 8f 30 cpi r24, 0x0F ; 15fe: 30 f0 brcs .+12 ; 0x10c <__vector_21+0x36>Stat |= 0x01;100: 80 91 69 01 lds r24, 0x0169104: 81 60 ori r24, 0x01 ; 1106: 80 93 69 01 sts 0x0169, r2410a: 06 c0 rjmp .+12 ; 0x118 <__vector_21+0x42>}else {l++;}10c: 8f 5f subi r24, 0xFF ; 25510e: 80 93 09 01 sts 0x0109, r24112: 02 c0 rjmp .+4 ; 0x118 <__vector_21+0x42>}else {l = 0;}114: 10 92 09 01 sts 0x0109, r1if (n > VTH_HIGH) {118: 81 e0 ldi r24, 0x01 ; 111a: 2c 32 cpi r18, 0x2C ; 4411c: 38 07 cpc r19, r2411e: 70 f0 brcs .+28 ; 0x13c <__vector_21+0x66>if (h >= 15) {120: 80 91 08 01 lds r24, 0x0108124: 8f 30 cpi r24, 0x0F ; 15126: 30 f0 brcs .+12 ; 0x134 <__vector_21+0x5e>Stat &= 0xFE;128: 80 91 69 01 lds r24, 0x016912c: 8e 7f andi r24, 0xFE ; 25412e: 80 93 69 01 sts 0x0169, r24132: 06 c0 rjmp .+12 ; 0x140 <__vector_21+0x6a>}else {h++;}134: 8f 5f subi r24, 0xFF ; 255136: 80 93 08 01 sts 0x0108, r2413a: 02 c0 rjmp .+4 ; 0x140 <__vector_21+0x6a>}else {h = 0;}13c: 10 92 08 01 sts 0x0108, r1battery = n;140: 30 93 6f 01 sts 0x016F, r19144: 20 93 6e 01 sts 0x016E, r18ADMUX = ANALOG_IN1;148: 82 e4 ldi r24, 0x42 ; 6614a: 80 93 7c 00 sts 0x007C, r24}if(ADMUX == ANALOG_IN1)14e: 80 91 7c 00 lds r24, 0x007C{intensity = n;152: 30 93 0a 02 sts 0x020A, r19156: 20 93 09 02 sts 0x0209, r18ADMUX = POWER_check;15a: 81 e4 ldi r24, 0x41 ; 6515c: 80 93 7c 00 sts 0x007C, r24}//!!!!//Stat &= 0xFE;ADCSRA = _BV(ADEN)|_BV(ADSC)|_BV(ADIF)|_BV(ADIE)|0b111;160: 8f ed ldi r24, 0xDF ; 223162: 80 93 7a 00 sts 0x007A, r24166: 8f 91 pop r24168: 3f 91 pop r1916a: 2f 91 pop r1816c: 0f 90 pop r016e: 0f be out 0x3f, r0 ; 63170: 0f 90 pop r0172: 1f 90 pop r1174: 18 95 reti00000176 <get_fattime>:/* FatFs module. Any valid time must be returned even if *//* the system does not support a real time clock. */DWORD get_fattime (){176: 60 e0 ldi r22, 0x00 ; 0178: 70 e0 ldi r23, 0x00 ; 017a: 81 ea ldi r24, 0xA1 ; 16117c: 96 e3 ldi r25, 0x36 ; 5417e: 08 95 ret00000180 <uart_init>:/* UART control */staticvoid uart_init (void){180: f8 94 clicli();UCSR0B = 0;182: e1 ec ldi r30, 0xC1 ; 193184: f0 e0 ldi r31, 0x00 ; 0186: 10 82 st Z, r1rxfifo.idx_r = 0;188: 10 92 71 01 sts 0x0171, r1rxfifo.idx_w = 0;18c: 10 92 70 01 sts 0x0170, r1rxfifo.count = 0;190: 10 92 72 01 sts 0x0172, r1UBRR0L = SYSCLK/16/9600; // Enable USRAT0 in N81,4800bps194: 81 e4 ldi r24, 0x41 ; 65196: 80 93 c4 00 sts 0x00C4, r24UCSR0B = _BV(RXCIE0)|_BV(RXEN0)|_BV(TXEN0);19a: 88 e9 ldi r24, 0x98 ; 15219c: 80 83 st Z, r24Stat &= 0xFD; // Clear overflow flag19e: 80 91 69 01 lds r24, 0x01691a2: 8d 7f andi r24, 0xFD ; 2531a4: 80 93 69 01 sts 0x0169, r24sei();1a8: 78 94 sei1aa: 08 95 ret000001ac <__vector_18>:}/* USART0 RXC interrupt */ISR(USART_RX_vect){1ac: 1f 92 push r11ae: 0f 92 push r01b0: 0f b6 in r0, 0x3f ; 631b2: 0f 92 push r01b4: 11 24 eor r1, r11b6: 8f 93 push r241b8: 9f 93 push r251ba: ef 93 push r301bc: ff 93 push r31uint8_t d, n, i;d = UDR0;1be: 90 91 c6 00 lds r25, 0x00C6n = rxfifo.count;1c2: 80 91 72 01 lds r24, 0x0172if(n < sizeof(rxfifo.buff)) {1c6: 86 39 cpi r24, 0x96 ; 1501c8: 88 f4 brcc .+34 ; 0x1ec <__vector_18+0x40>rxfifo.count = ++n;1ca: 8f 5f subi r24, 0xFF ; 2551cc: 80 93 72 01 sts 0x0172, r24i = rxfifo.idx_w;1d0: 80 91 70 01 lds r24, 0x0170rxfifo.buff[i++] = d;1d4: e8 2f mov r30, r241d6: ff 27 eor r31, r311d8: e0 59 subi r30, 0x90 ; 1441da: fe 4f sbci r31, 0xFE ; 2541dc: 93 83 std Z+3, r25 ; 0x031de: 8f 5f subi r24, 0xFF ; 255if(i >= sizeof(rxfifo.buff))1e0: 86 39 cpi r24, 0x96 ; 1501e2: 08 f0 brcs .+2 ; 0x1e6 <__vector_18+0x3a>1e4: 80 e0 ldi r24, 0x00 ; 0i = 0;rxfifo.idx_w = i;1e6: 80 93 70 01 sts 0x0170, r241ea: 05 c0 rjmp .+10 ; 0x1f6 <__vector_18+0x4a>} else {Stat |= 2;1ec: 80 91 69 01 lds r24, 0x01691f0: 82 60 ori r24, 0x02 ; 21f2: 80 93 69 01 sts 0x0169, r241f6: ff 91 pop r311f8: ef 91 pop r301fa: 9f 91 pop r251fc: 8f 91 pop r241fe: 0f 90 pop r0200: 0f be out 0x3f, r0 ; 63202: 0f 90 pop r0204: 1f 90 pop r1206: 18 95 reti00000208 <get_line>:/* Get a line received from GPS module *//*----------------------------------------------------*/staticBYTE get_line (void) // 0: Power fail occured, >0: Number of bytes received.{208: 90 e0 ldi r25, 0x00 ; 0BYTE c, i = 0;for (;;) {if (Stat & 1) return 0; // When power fail is detected, return with zero.20a: 80 91 69 01 lds r24, 0x016920e: 80 ff sbrs r24, 0210: 03 c0 rjmp .+6 ; 0x218 <get_line+0x10>212: 80 e0 ldi r24, 0x00 ; 0214: 90 e0 ldi r25, 0x00 ; 0216: 08 95 retuint8_t uart_get (){uint8_t d, i;i = rxfifo.idx_r;218: 20 91 71 01 lds r18, 0x0171if (rxfifo.count == 0) return 0;21c: 80 91 72 01 lds r24, 0x0172220: 88 23 and r24, r24222: 19 f4 brne .+6 ; 0x22a <get_line+0x22>224: 20 e0 ldi r18, 0x00 ; 0226: 30 e0 ldi r19, 0x00 ; 0228: 15 c0 rjmp .+42 ; 0x254 <get_line+0x4c>d = rxfifo.buff[i++];22a: e2 2f mov r30, r1822c: ff 27 eor r31, r3122e: e0 59 subi r30, 0x90 ; 144230: fe 4f sbci r31, 0xFE ; 254232: 33 81 ldd r19, Z+3 ; 0x03234: e2 2f mov r30, r18236: ef 5f subi r30, 0xFF ; 255cli();238: f8 94 clirxfifo.count--;23a: 80 91 72 01 lds r24, 0x017223e: 81 50 subi r24, 0x01 ; 1240: 80 93 72 01 sts 0x0172, r24sei();244: 78 94 seiif(i >= sizeof(rxfifo.buff))246: e6 39 cpi r30, 0x96 ; 150248: 08 f0 brcs .+2 ; 0x24c <get_line+0x44>24a: e0 e0 ldi r30, 0x00 ; 0i = 0;rxfifo.idx_r = i;24c: e0 93 71 01 sts 0x0171, r30return d;250: 23 2f mov r18, r19252: 33 27 eor r19, r19for (;;) {if (Stat & 1) return 0; // When power fail is detected, return with zero.c = uart_get();if (Stat & 2) { // When buffer overflow has occured, restert to receive line.254: 80 91 69 01 lds r24, 0x0169258: 81 ff sbrs r24, 125a: 03 c0 rjmp .+6 ; 0x262 <get_line+0x5a>uart_init();25c: 0e 94 c0 00 call 0x180 ; 0x180 <uart_init>260: d3 cf rjmp .-90 ; 0x208 <get_line>BYTE c, i = 0;for (;;) {if (Stat & 1) return 0; // When power fail is detected, return with zero.c = uart_get();262: 82 2f mov r24, r18if (Stat & 2) { // When buffer overflow has occured, restert to receive line.uart_init();i = 0; c = 0;}if (!c || (i == 0 && c != '$')) continue;264: 22 23 and r18, r18266: 89 f2 breq .-94 ; 0x20a <get_line+0x2>268: 99 23 and r25, r2526a: 11 f4 brne .+4 ; 0x270 <get_line+0x68>26c: 24 32 cpi r18, 0x24 ; 3626e: 69 f6 brne .-102 ; 0x20a <get_line+0x2>Buff[i++] = c;270: e9 2f mov r30, r25272: ff 27 eor r31, r31274: e9 5e subi r30, 0xE9 ; 233276: fe 4f sbci r31, 0xFE ; 254278: 20 83 st Z, r1827a: 9f 5f subi r25, 0xFF ; 255if (c == '\n') break;27c: 8a 30 cpi r24, 0x0A ; 1027e: 21 f0 breq .+8 ; 0x288 <get_line+0x80>if (i >= sizeof(Buff)) i = 0;280: 92 35 cpi r25, 0x52 ; 82282: 08 f0 brcs .+2 ; 0x286 <get_line+0x7e>284: c1 cf rjmp .-126 ; 0x208 <get_line>286: c1 cf rjmp .-126 ; 0x20a <get_line+0x2>}return i;288: 89 2f mov r24, r2528a: 99 27 eor r25, r25}28c: 08 95 ret0000028e <beep>:/*--------------------------------------------------------------------------*//* Controls */staticvoid beep (BYTE len, BYTE cnt){28e: 98 2f mov r25, r24290: 0f c0 rjmp .+30 ; 0x2b0 <beep+0x22>while (cnt--) {BEEP_ON();292: 83 e0 ldi r24, 0x03 ; 3294: 85 bd out 0x25, r24 ; 37DELAY(len);296: 90 93 16 01 sts 0x0116, r2529a: 80 91 16 01 lds r24, 0x011629e: 88 23 and r24, r242a0: e1 f7 brne .-8 ; 0x29a <beep+0xc>BEEP_OFF();2a2: 15 bc out 0x25, r1 ; 37DELAY(len);2a4: 90 93 16 01 sts 0x0116, r252a8: 80 91 16 01 lds r24, 0x01162ac: 88 23 and r24, r242ae: e1 f7 brne .-8 ; 0x2a8 <beep+0x1a>/* Controls */staticvoid beep (BYTE len, BYTE cnt){while (cnt--) {2b0: 61 50 subi r22, 0x01 ; 12b2: 78 f7 brcc .-34 ; 0x292 <beep+0x4>2b4: 08 95 ret000002b6 <gp_comp>:/* Compare sentence header string */staticBYTE gp_comp (BYTE *str1, const prog_uint8_t *str2){2b6: dc 01 movw r26, r242b8: fb 01 movw r30, r22BYTE c;do {c = pgm_read_byte(str2++);2ba: 6f 5f subi r22, 0xFF ; 2552bc: 7f 4f sbci r23, 0xFF ; 2552be: 94 91 lpm r25, Z} while (c && c == *str1++);2c0: 99 23 and r25, r252c2: 29 f0 breq .+10 ; 0x2ce <gp_comp+0x18>2c4: 8c 91 ld r24, X2c6: 98 17 cp r25, r242c8: 11 f4 brne .+4 ; 0x2ce <gp_comp+0x18>2ca: 11 96 adiw r26, 0x01 ; 12cc: f5 cf rjmp .-22 ; 0x2b8 <gp_comp+0x2>return c;}2ce: 89 2f mov r24, r252d0: 99 27 eor r25, r252d2: 08 95 ret000002d4 <gp_col>:/* Get a column item */staticBYTE* gp_col ( /* Returns pointer to the item (returns a NULL when not found) */const BYTE* buf, /* Pointer to the sentence */BYTE col /* Column number (0 is the 1st item) */) {2d4: fc 01 movw r30, r242d6: 0a c0 rjmp .+20 ; 0x2ec <gp_col+0x18>BYTE c;while (col) {do {c = *buf++;2d8: 80 81 ld r24, Zif (c <= ' ') return NULL;2da: 81 32 cpi r24, 0x21 ; 332dc: 18 f4 brcc .+6 ; 0x2e4 <gp_col+0x10>2de: 80 e0 ldi r24, 0x00 ; 02e0: 90 e0 ldi r25, 0x00 ; 02e2: 08 95 retBYTE c;while (col) {do {c = *buf++;2e4: 31 96 adiw r30, 0x01 ; 1if (c <= ' ') return NULL;} while (c != ',');2e6: 8c 32 cpi r24, 0x2C ; 442e8: b9 f7 brne .-18 ; 0x2d8 <gp_col+0x4>col--;2ea: 61 50 subi r22, 0x01 ; 1BYTE col /* Column number (0 is the 1st item) */) {BYTE c;while (col) {2ec: 66 23 and r22, r222ee: a1 f7 brne .-24 ; 0x2d8 <gp_col+0x4>c = *buf++;if (c <= ' ') return NULL;} while (c != ',');col--;}return (BYTE*)buf;2f0: cf 01 movw r24, r30}2f2: 08 95 ret000002f4 <__vector_11>:/* 100Hz timer interrupt generated by OC1A *//*---------------------------------------------------------*/ISR(TIMER1_COMPA_vect){2f4: 1f 92 push r12f6: 0f 92 push r02f8: 0f b6 in r0, 0x3f ; 632fa: 0f 92 push r02fc: 11 24 eor r1, r12fe: 2f 93 push r18300: 3f 93 push r19302: 4f 93 push r20304: 5f 93 push r21306: 6f 93 push r22308: 7f 93 push r2330a: 8f 93 push r2430c: 9f 93 push r2530e: af 93 push r26310: bf 93 push r27312: ef 93 push r30314: ff 93 push r31BYTE n;static WORD ivt_sync;n = Timer;316: 80 91 16 01 lds r24, 0x0116if (n) Timer = n - 1;31a: 88 23 and r24, r2431c: 19 f0 breq .+6 ; 0x324 <__vector_11+0x30>31e: 81 50 subi r24, 0x01 ; 1320: 80 93 16 01 sts 0x0116, r24if (++ivt_sync >= 180 * 100) {324: 80 91 06 01 lds r24, 0x0106328: 90 91 07 01 lds r25, 0x010732c: 01 96 adiw r24, 0x01 ; 132e: 90 93 07 01 sts 0x0107, r25332: 80 93 06 01 sts 0x0106, r24336: 80 55 subi r24, 0x50 ; 80338: 96 44 sbci r25, 0x46 ; 7033a: 48 f0 brcs .+18 ; 0x34e <__vector_11+0x5a>ivt_sync = 0;33c: 10 92 07 01 sts 0x0107, r1340: 10 92 06 01 sts 0x0106, r1Stat |= 4;344: 80 91 69 01 lds r24, 0x0169348: 84 60 ori r24, 0x04 ; 434a: 80 93 69 01 sts 0x0169, r24}disk_timerproc(); /* Drive timer procedure of low level disk I/O module */34e: 0e 94 c8 0d call 0x1b90 ; 0x1b90 <disk_timerproc>352: ff 91 pop r31354: ef 91 pop r30356: bf 91 pop r27358: af 91 pop r2635a: 9f 91 pop r2535c: 8f 91 pop r2435e: 7f 91 pop r23360: 6f 91 pop r22362: 5f 91 pop r21364: 4f 91 pop r20366: 3f 91 pop r19368: 2f 91 pop r1836a: 0f 90 pop r036c: 0f be out 0x3f, r0 ; 6336e: 0f 90 pop r0370: 1f 90 pop r1372: 18 95 reti00000374 <main>:/*-----------------------------------------------------------------------*//* Main */int main (){374: cd ef ldi r28, 0xFD ; 253376: d4 e0 ldi r29, 0x04 ; 4378: de bf out 0x3e, r29 ; 6237a: cd bf out 0x3d, r28 ; 61staticvoid ioinit (void){PORTB = 0b00001101; // Port B37c: 8d e0 ldi r24, 0x0D ; 1337e: 85 b9 out 0x05, r24 ; 5DDRB = 0b00101110;380: 8e e2 ldi r24, 0x2E ; 46382: 84 b9 out 0x04, r24 ; 4PORTC = 0b00111111; // Port C384: 8f e3 ldi r24, 0x3F ; 63386: 88 b9 out 0x08, r24 ; 8DDRC = 0b00000000;388: 17 b8 out 0x07, r1 ; 7PORTD = 0b10101110; // Port D38a: 8e ea ldi r24, 0xAE ; 17438c: 8b b9 out 0x0b, r24 ; 11DDRD = 0b01010010;38e: 82 e5 ldi r24, 0x52 ; 82390: 8a b9 out 0x0a, r24 ; 10SPCR = 0b01010000; /* Initialize SPI port (Mode 0) */392: 80 e5 ldi r24, 0x50 ; 80394: 8c bd out 0x2c, r24 ; 44SPSR = 0b00000001;396: 81 e0 ldi r24, 0x01 ; 1398: 8d bd out 0x2d, r24 ; 45OCR1A = SYSCLK/8/100-1; // Timer1: 100Hz interval (OC1A)39a: 83 ed ldi r24, 0xD3 ; 21139c: 90 e3 ldi r25, 0x30 ; 4839e: 90 93 89 00 sts 0x0089, r253a2: 80 93 88 00 sts 0x0088, r24TCCR1B = 0b00001010;3a6: 8a e0 ldi r24, 0x0A ; 103a8: 80 93 81 00 sts 0x0081, r24TIMSK1 = _BV(OCIE1A); // Enable TC1.oca interrupt3ac: 82 e0 ldi r24, 0x02 ; 23ae: 80 93 6f 00 sts 0x006F, r24OCR0A = SYSCLK/64/4000/2-1; // Timer0: 4kHz sound (OC0A)3b2: 82 e1 ldi r24, 0x12 ; 183b4: 87 bd out 0x27, r24 ; 39TCCR0A = 0b01000010;3b6: 82 e4 ldi r24, 0x42 ; 663b8: 84 bd out 0x24, r24 ; 36ADMUX = POWER_check; // Select ADC input3ba: 81 e4 ldi r24, 0x41 ; 653bc: 80 93 7c 00 sts 0x007C, r24ADCSRA = _BV(ADEN)|_BV(ADSC)|_BV(ADIF)|_BV(ADIE)|0b111;3c0: 8f ed ldi r24, 0xDF ; 2233c2: 80 93 7a 00 sts 0x007A, r24sei();3c6: 78 94 seiBYTE b, err, *p = NULL;WORD s;ioinit();f_mount(0, &fatfs); /* Enable file I/O layer */3c8: 67 e2 ldi r22, 0x27 ; 393ca: 72 e0 ldi r23, 0x02 ; 23cc: 80 e0 ldi r24, 0x00 ; 03ce: 0e 94 ef 08 call 0x11de ; 0x11de <f_mount>3d2: cc 24 eor r12, r123d4: dd 24 eor r13, r133d6: 47 e1 ldi r20, 0x17 ; 233d8: e4 2e mov r14, r203da: 41 e0 ldi r20, 0x01 ; 13dc: f4 2e mov r15, r203de: 3b e0 ldi r19, 0x0B ; 113e0: a3 2e mov r10, r193e2: 32 e0 ldi r19, 0x02 ; 23e4: b3 2e mov r11, r19// || !gp_comp(Buff, PSTR("$GPGSV"))// || !gp_comp(Buff, PSTR("$GPZDA"))// || !gp_comp(Buff, PSTR("$GPVTG"))){if (f_write(&file1, Buff, b, &s) || b != s) { err = 5; break; };3e6: 2e 01 movw r4, r283e8: 08 94 sec3ea: 41 1c adc r4, r13ec: 51 1c adc r5, r13ee: 22 e1 ldi r18, 0x12 ; 183f0: 62 2e mov r6, r183f2: 21 e0 ldi r18, 0x01 ; 13f4: 72 2e mov r7, r183f6: 9a e6 ldi r25, 0x6A ; 1063f8: 89 2e mov r8, r253fa: 91 e0 ldi r25, 0x01 ; 13fc: 99 2e mov r9, r253fe: 89 e0 ldi r24, 0x09 ; 9400: 28 2e mov r2, r24402: 31 2c mov r3, r1404: 2e 0c add r2, r14406: 3f 1c adc r3, r15staticvoid uart_stop (void){UCSR0B = 0;408: 10 92 c1 00 sts 0x00C1, r1ioinit();f_mount(0, &fatfs); /* Enable file I/O layer */for (;;) {uart_stop();GPS_OFF();40c: 29 98 cbi 0x05, 1 ; 5Timer = 100;40e: 84 e6 ldi r24, 0x64 ; 100410: 80 93 16 01 sts 0x0116, r24do {if (Stat & 1) Timer = 100;414: 80 91 69 01 lds r24, 0x0169418: 80 ff sbrs r24, 041a: 03 c0 rjmp .+6 ; 0x422 <main+0xae>41c: 84 e6 ldi r24, 0x64 ; 10041e: 80 93 16 01 sts 0x0116, r24} while (Timer);422: 80 91 16 01 lds r24, 0x0116426: 88 23 and r24, r24428: a9 f7 brne .-22 ; 0x414 <main+0xa0>GPS_ON();42a: 29 9a sbi 0x05, 1 ; 5Timer = 255;42c: 8f ef ldi r24, 0xFF ; 25542e: 80 93 16 01 sts 0x0116, r24do {if ((Stat & 1) || (disk_status(0) & STA_NODISK)) Timer = 255;432: 80 91 69 01 lds r24, 0x0169436: 80 fd sbrc r24, 0438: 05 c0 rjmp .+10 ; 0x444 <main+0xd0>43a: 80 e0 ldi r24, 0x00 ; 043c: 0e 94 bf 0d call 0x1b7e ; 0x1b7e <disk_status>440: 81 ff sbrs r24, 1442: 03 c0 rjmp .+6 ; 0x44a <main+0xd6>444: 8f ef ldi r24, 0xFF ; 255446: 80 93 16 01 sts 0x0116, r24} while (Timer);44a: 80 91 16 01 lds r24, 0x011644e: 88 23 and r24, r24450: 81 f7 brne .-32 ; 0x432 <main+0xbe>beep(5, 1); // Single beep. Start to get current time.452: 61 e0 ldi r22, 0x01 ; 1454: 85 e0 ldi r24, 0x05 ; 5456: 0e 94 47 01 call 0x28e ; 0x28e <beep>uart_init();45a: 0e 94 c0 00 call 0x180 ; 0x180 <uart_init>/* Initialize GPS module (depends on each product) */staticvoid gp_init (void){const prog_char *s =PSTR("$PSRF106,21*0F\r\n"); // Select datum of WGS84 (for EM-406A)45e: 27 e8 ldi r18, 0x87 ; 135460: 30 e0 ldi r19, 0x00 ; 0462: 06 c0 rjmp .+12 ; 0x470 <main+0xfc>/* Put a character to transmit */staticvoid uart_put (uint8_t d){while (bit_is_clear(UCSR0A, UDRE0));464: 80 91 c0 00 lds r24, 0x00C0468: 85 ff sbrs r24, 546a: fc cf rjmp .-8 ; 0x464 <main+0xf0>UDR0 = d;46c: 90 93 c6 00 sts 0x00C6, r25470: f9 01 movw r30, r18{const prog_char *s =PSTR("$PSRF106,21*0F\r\n"); // Select datum of WGS84 (for EM-406A)char c;while ((c = pgm_read_byte(s++)) != 0) uart_put(c);472: 2f 5f subi r18, 0xFF ; 255474: 3f 4f sbci r19, 0xFF ; 255476: 94 91 lpm r25, Z478: 99 23 and r25, r2547a: a1 f7 brne .-24 ; 0x464 <main+0xf0>beep(5, 1); // Single beep. Start to get current time.uart_init();gp_init(); // Initialize GPS module to let output data in NMEA-0183 format.do { // Wait for valid RMC sentence.b = get_line();47c: 0e 94 04 01 call 0x208 ; 0x208 <get_line>if (!b) break;480: 88 23 and r24, r24482: 09 f4 brne .+2 ; 0x486 <main+0x112>484: c1 cf rjmp .-126 ; 0x408 <main+0x94>if (gp_comp(Buff, PSTR("$GPRMC"))) continue;486: 60 e8 ldi r22, 0x80 ; 128488: 70 e0 ldi r23, 0x00 ; 048a: c7 01 movw r24, r1448c: 0e 94 5b 01 call 0x2b6 ; 0x2b6 <gp_comp>490: 88 23 and r24, r24492: 29 f4 brne .+10 ; 0x49e <main+0x12a>p = gp_col(Buff,2);494: 62 e0 ldi r22, 0x02 ; 2496: c7 01 movw r24, r14498: 0e 94 6a 01 call 0x2d4 ; 0x2d4 <gp_col>49c: 6c 01 movw r12, r24} while (!p || *p != 'A');49e: c1 14 cp r12, r14a0: d1 04 cpc r13, r14a2: 61 f3 breq .-40 ; 0x47c <main+0x108>4a4: f6 01 movw r30, r124a6: 80 81 ld r24, Z4a8: 81 34 cpi r24, 0x41 ; 654aa: 41 f7 brne .-48 ; 0x47c <main+0x108>if (!b) continue;p = gp_col(Buff,9); // Open log file with the name of current date (YYMMDD.log in UTC).4ac: 69 e0 ldi r22, 0x09 ; 94ae: c7 01 movw r24, r144b0: 0e 94 6a 01 call 0x2d4 ; 0x2d4 <gp_col>4b4: 6c 01 movw r12, r24if (!p) {err = 3; break;}4b6: 00 97 sbiw r24, 0x00 ; 04b8: 11 f4 brne .+4 ; 0x4be <main+0x14a>4ba: 63 e0 ldi r22, 0x03 ; 34bc: a8 c0 rjmp .+336 ; 0x60e <__stack+0x10f>memcpy(&Buff[0], p+4, 2);4be: fc 01 movw r30, r244c0: 84 81 ldd r24, Z+4 ; 0x044c2: 95 81 ldd r25, Z+5 ; 0x054c4: 90 93 18 01 sts 0x0118, r254c8: 80 93 17 01 sts 0x0117, r24memcpy(&Buff[2], p+2, 2);4cc: 82 81 ldd r24, Z+2 ; 0x024ce: 93 81 ldd r25, Z+3 ; 0x034d0: 90 93 1a 01 sts 0x011A, r254d4: 80 93 19 01 sts 0x0119, r24memcpy(&Buff[4], p+0, 2);4d8: 80 81 ld r24, Z4da: 91 81 ldd r25, Z+1 ; 0x014dc: 90 93 1c 01 sts 0x011C, r254e0: 80 93 1b 01 sts 0x011B, r24strcpy_P(&Buff[6], PSTR(".log"));4e4: 6b e7 ldi r22, 0x7B ; 1234e6: 70 e0 ldi r23, 0x00 ; 04e8: 8d e1 ldi r24, 0x1D ; 294ea: 91 e0 ldi r25, 0x01 ; 14ec: 0e 94 8d 10 call 0x211a ; 0x211a <strcpy_P>if (f_open(&file1, Buff, FA_OPEN_ALWAYS | FA_WRITE) || f_lseek(&file1, file1.fsize)) { err = 4; break; }4f0: 42 e1 ldi r20, 0x12 ; 184f2: b7 01 movw r22, r144f4: c5 01 movw r24, r104f6: 0e 94 44 09 call 0x1288 ; 0x1288 <f_open>4fa: 89 2b or r24, r254fc: 09 f0 breq .+2 ; 0x500 <__stack+0x1>4fe: 86 c0 rjmp .+268 ; 0x60c <__stack+0x10d>500: 40 91 15 02 lds r20, 0x0215504: 50 91 16 02 lds r21, 0x0216508: 60 91 17 02 lds r22, 0x021750c: 70 91 18 02 lds r23, 0x0218510: c5 01 movw r24, r10512: 0e 94 8b 05 call 0xb16 ; 0xb16 <f_lseek>516: 89 2b or r24, r25518: 09 f0 breq .+2 ; 0x51c <__stack+0x1d>51a: 78 c0 rjmp .+240 ; 0x60c <__stack+0x10d>beep(5, 2); // Two beeps. Start logging.51c: 62 e0 ldi r22, 0x02 ; 251e: 85 e0 ldi r24, 0x05 ; 5520: 0e 94 47 01 call 0x28e ; 0x28e <beep>524: 65 c0 rjmp .+202 ; 0x5f0 <__stack+0xf1>err = 0;while ((b = get_line()) > 0) {if ( !gp_comp(Buff, PSTR("$GPGGA")) // Which sentence is logged?526: 64 e7 ldi r22, 0x74 ; 116528: 70 e0 ldi r23, 0x00 ; 052a: c7 01 movw r24, r1452c: 0e 94 5b 01 call 0x2b6 ; 0x2b6 <gp_comp>530: 88 23 and r24, r24532: 41 f0 breq .+16 ; 0x544 <__stack+0x45>534: 6d e6 ldi r22, 0x6D ; 109536: 70 e0 ldi r23, 0x00 ; 0538: c7 01 movw r24, r1453a: 0e 94 5b 01 call 0x2b6 ; 0x2b6 <gp_comp>53e: 88 23 and r24, r24540: 09 f0 breq .+2 ; 0x544 <__stack+0x45>542: 44 c0 rjmp .+136 ; 0x5cc <__stack+0xcd>// || !gp_comp(Buff, PSTR("$GPGSV"))// || !gp_comp(Buff, PSTR("$GPZDA"))// || !gp_comp(Buff, PSTR("$GPVTG"))){if (f_write(&file1, Buff, b, &s) || b != s) { err = 5; break; };544: 01 2f mov r16, r17546: 11 27 eor r17, r17548: 92 01 movw r18, r454a: a8 01 movw r20, r1654c: b7 01 movw r22, r1454e: c5 01 movw r24, r10550: 0e 94 c0 06 call 0xd80 ; 0xd80 <f_write>554: 89 2b or r24, r25556: 09 f0 breq .+2 ; 0x55a <__stack+0x5b>558: 52 c0 rjmp .+164 ; 0x5fe <__stack+0xff>55a: 89 81 ldd r24, Y+1 ; 0x0155c: 9a 81 ldd r25, Y+2 ; 0x0255e: 08 17 cp r16, r24560: 19 07 cpc r17, r25562: 09 f0 breq .+2 ; 0x566 <__stack+0x67>564: 4c c0 rjmp .+152 ; 0x5fe <__stack+0xff>itoa(battery,&Value1,10);566: 4a e0 ldi r20, 0x0A ; 10568: 50 e0 ldi r21, 0x00 ; 056a: b3 01 movw r22, r656c: 80 91 6e 01 lds r24, 0x016E570: 90 91 6f 01 lds r25, 0x016F574: 0e 94 b8 10 call 0x2170 ; 0x2170 <itoa>itoa(intensity,&Value2,10);578: 4a e0 ldi r20, 0x0A ; 1057a: 50 e0 ldi r21, 0x00 ; 057c: b4 01 movw r22, r857e: 80 91 09 02 lds r24, 0x0209582: 90 91 0a 02 lds r25, 0x020A586: 0e 94 b8 10 call 0x2170 ; 0x2170 <itoa>strcpy(&Buff[0], Value1);58a: b3 01 movw r22, r658c: c7 01 movw r24, r1458e: 0e 94 b1 10 call 0x2162 ; 0x2162 <strcpy>strcpy_P(&Buff[4], PSTR(","));592: 6b e6 ldi r22, 0x6B ; 107594: 70 e0 ldi r23, 0x00 ; 0596: 8b e1 ldi r24, 0x1B ; 27598: 91 e0 ldi r25, 0x01 ; 159a: 0e 94 8d 10 call 0x211a ; 0x211a <strcpy_P>strcpy(&Buff[5], Value2);59e: b4 01 movw r22, r85a0: 8c e1 ldi r24, 0x1C ; 285a2: 91 e0 ldi r25, 0x01 ; 15a4: 0e 94 b1 10 call 0x2162 ; 0x2162 <strcpy>strcpy_P(&Buff[9], PSTR("\r\n"));5a8: 68 e6 ldi r22, 0x68 ; 1045aa: 70 e0 ldi r23, 0x00 ; 05ac: c1 01 movw r24, r25ae: 0e 94 8d 10 call 0x211a ; 0x211a <strcpy_P>if (f_write(&file1, Buff, 11, &s) || 11 != s) { err = 5; break; };5b2: 92 01 movw r18, r45b4: 4b e0 ldi r20, 0x0B ; 115b6: 50 e0 ldi r21, 0x00 ; 05b8: b7 01 movw r22, r145ba: c5 01 movw r24, r105bc: 0e 94 c0 06 call 0xd80 ; 0xd80 <f_write>5c0: 89 2b or r24, r255c2: e9 f4 brne .+58 ; 0x5fe <__stack+0xff>5c4: 89 81 ldd r24, Y+1 ; 0x015c6: 9a 81 ldd r25, Y+2 ; 0x025c8: 0b 97 sbiw r24, 0x0b ; 115ca: c9 f4 brne .+50 ; 0x5fe <__stack+0xff>}if ((Stat & 4) == 0) continue;5cc: 80 91 69 01 lds r24, 0x01695d0: 82 ff sbrs r24, 25d2: 0e c0 rjmp .+28 ; 0x5f0 <__stack+0xf1>if (f_sync(&file1)) { err = 6; break; };// Synchronize the file in interval of 300 sec.5d4: c5 01 movw r24, r105d6: 0e 94 5d 06 call 0xcba ; 0xcba <f_sync>5da: 89 2b or r24, r255dc: 11 f0 breq .+4 ; 0x5e2 <__stack+0xe3>5de: 66 e0 ldi r22, 0x06 ; 65e0: 16 c0 rjmp .+44 ; 0x60e <__stack+0x10f>cli(); Stat &= 0xFB; sei(); // Clear sync request5e2: f8 94 cli5e4: 80 91 69 01 lds r24, 0x01695e8: 8b 7f andi r24, 0xFB ; 2515ea: 80 93 69 01 sts 0x0169, r245ee: 78 94 seistrcpy_P(&Buff[6], PSTR(".log"));if (f_open(&file1, Buff, FA_OPEN_ALWAYS | FA_WRITE) || f_lseek(&file1, file1.fsize)) { err = 4; break; }beep(5, 2); // Two beeps. Start logging.err = 0;while ((b = get_line()) > 0) {5f0: 0e 94 04 01 call 0x208 ; 0x208 <get_line>5f4: 18 2f mov r17, r245f6: 88 23 and r24, r245f8: 09 f0 breq .+2 ; 0x5fc <__stack+0xfd>5fa: 95 cf rjmp .-214 ; 0x526 <__stack+0x27>5fc: 0f c0 rjmp .+30 ; 0x61c <__stack+0x11d>5fe: 65 e0 ldi r22, 0x05 ; 5600: 06 c0 rjmp .+12 ; 0x60e <__stack+0x10f>uart_stop();GPS_OFF();if (f_close(&file1)) { err = 7; break; };// When a long beep is sounded, the shutdoun process has been succeeded.beep(50, 1);602: 61 e0 ldi r22, 0x01 ; 1604: 82 e3 ldi r24, 0x32 ; 50606: 0e 94 47 01 call 0x28e ; 0x28e <beep>60a: fe ce rjmp .-516 ; 0x408 <main+0x94>60c: 64 e0 ldi r22, 0x04 ; 4staticvoid uart_stop (void){UCSR0B = 0;60e: 10 92 c1 00 sts 0x00C1, r1beep(50, 1);}// Unrecoverble error. Enter shutdown state.uart_stop();GPS_OFF();612: 29 98 cbi 0x05, 1 ; 5beep(25, err);614: 89 e1 ldi r24, 0x19 ; 25616: 0e 94 47 01 call 0x28e ; 0x28e <beep>61a: ff cf rjmp .-2 ; 0x61a <__stack+0x11b>staticvoid uart_stop (void){UCSR0B = 0;61c: 10 92 c1 00 sts 0x00C1, r1}if (err) break;// Turn-off GPS power and close the log file by power supply is discharged.uart_stop();GPS_OFF();620: 29 98 cbi 0x05, 1 ; 5if (f_close(&file1)) { err = 7; break; };622: c5 01 movw r24, r10624: 0e 94 b4 06 call 0xd68 ; 0xd68 <f_close>628: 89 2b or r24, r2562a: 59 f3 breq .-42 ; 0x602 <__stack+0x103>62c: 67 e0 ldi r22, 0x07 ; 762e: ef cf rjmp .-34 ; 0x60e <__stack+0x10f>00000630 <clust2sect>:staticDWORD clust2sect ( /* !=0: sector number, 0: failed - invalid cluster# */CLUST clust /* Cluster# to be converted */){630: cf 93 push r28632: df 93 push r29FATFS *fs = FatFs;634: c0 91 0a 01 lds r28, 0x010A638: d0 91 0b 01 lds r29, 0x010Bclust -= 2;63c: bc 01 movw r22, r2463e: 62 50 subi r22, 0x02 ; 2640: 70 40 sbci r23, 0x00 ; 0if (clust >= (fs->max_clust - 2)) return 0; /* Invalid cluster# */642: 8e 89 ldd r24, Y+22 ; 0x16644: 9f 89 ldd r25, Y+23 ; 0x17646: 02 97 sbiw r24, 0x02 ; 2648: 68 17 cp r22, r2464a: 79 07 cpc r23, r2564c: 28 f0 brcs .+10 ; 0x658 <clust2sect+0x28>64e: 20 e0 ldi r18, 0x00 ; 0650: 30 e0 ldi r19, 0x00 ; 0652: 40 e0 ldi r20, 0x00 ; 0654: 50 e0 ldi r21, 0x00 ; 0656: 12 c0 rjmp .+36 ; 0x67c <clust2sect+0x4c>return (DWORD)clust * fs->sects_clust + fs->database;658: 88 27 eor r24, r2465a: 99 27 eor r25, r2565c: 2d 8d ldd r18, Y+29 ; 0x1d65e: 33 27 eor r19, r19660: 44 27 eor r20, r20662: 55 27 eor r21, r21664: 0e 94 e9 10 call 0x21d2 ; 0x21d2 <__mulsi3>668: 9b 01 movw r18, r2266a: ac 01 movw r20, r2466c: 88 89 ldd r24, Y+16 ; 0x1066e: 99 89 ldd r25, Y+17 ; 0x11670: aa 89 ldd r26, Y+18 ; 0x12672: bb 89 ldd r27, Y+19 ; 0x13674: 28 0f add r18, r24676: 39 1f adc r19, r25678: 4a 1f adc r20, r2667a: 5b 1f adc r21, r27}67c: ca 01 movw r24, r2067e: b9 01 movw r22, r18680: df 91 pop r29682: cf 91 pop r28684: 08 95 ret00000686 <validate>:staticFRESULT validate ( /* FR_OK(0): The id is valid, !=0: Not valid */const FATFS *fs, /* Pointer to the file system object */WORD id /* id member of the target object to be checked */){686: fc 01 movw r30, r24if (!fs || fs->id != id)688: 89 2b or r24, r2568a: 61 f0 breq .+24 ; 0x6a4 <validate+0x1e>68c: 80 81 ld r24, Z68e: 91 81 ldd r25, Z+1 ; 0x01690: 86 17 cp r24, r22692: 97 07 cpc r25, r23694: 39 f4 brne .+14 ; 0x6a4 <validate+0x1e>return FR_INVALID_OBJECT;if (disk_status(0) & STA_NOINIT)696: 80 e0 ldi r24, 0x00 ; 0698: 0e 94 bf 0d call 0x1b7e ; 0x1b7e <disk_status>69c: 99 27 eor r25, r2569e: 81 70 andi r24, 0x01 ; 16a0: 90 70 andi r25, 0x00 ; 06a2: 08 95 ret6a4: 8c e0 ldi r24, 0x0C ; 126a6: 90 e0 ldi r25, 0x00 ; 0return FR_NOT_READY;return FR_OK;}6a8: 08 95 ret000006aa <move_window>:staticBOOL move_window ( /* TRUE: successful, FALSE: failed */DWORD sector /* Sector number to make apperance in the FatFs->win */) /* Move to zero only writes back dirty window */{6aa: a0 e0 ldi r26, 0x00 ; 06ac: b0 e0 ldi r27, 0x00 ; 06ae: eb e5 ldi r30, 0x5B ; 916b0: f3 e0 ldi r31, 0x03 ; 36b2: 0c 94 2e 11 jmp 0x225c ; 0x225c <__prologue_saves__+0x8>6b6: 4b 01 movw r8, r226b8: 5c 01 movw r10, r24DWORD wsect;FATFS *fs = FatFs;6ba: c0 91 0a 01 lds r28, 0x010A6be: d0 91 0b 01 lds r29, 0x010Bwsect = fs->winsect;6c2: cc 80 ldd r12, Y+4 ; 0x046c4: dd 80 ldd r13, Y+5 ; 0x056c6: ee 80 ldd r14, Y+6 ; 0x066c8: ff 80 ldd r15, Y+7 ; 0x07if (wsect != sector) { /* Changed current window */6ca: c6 16 cp r12, r226cc: d7 06 cpc r13, r236ce: e8 06 cpc r14, r246d0: f9 06 cpc r15, r256d2: 09 f4 brne .+2 ; 0x6d6 <move_window+0x2c>6d4: 4f c0 rjmp .+158 ; 0x774 <move_window+0xca>#if !_FS_READONLYBYTE n;if (fs->winflag) { /* Write back dirty window if needed */6d6: 8f 8d ldd r24, Y+31 ; 0x1f6d8: 88 23 and r24, r246da: a1 f1 breq .+104 ; 0x744 <move_window+0x9a>if (disk_write(0, fs->win, wsect, 1) != RES_OK)6dc: 80 e2 ldi r24, 0x20 ; 326de: 68 2e mov r6, r246e0: 71 2c mov r7, r16e2: 6c 0e add r6, r286e4: 7d 1e adc r7, r296e6: 01 e0 ldi r16, 0x01 ; 16e8: a7 01 movw r20, r146ea: 96 01 movw r18, r126ec: b3 01 movw r22, r66ee: 80 e0 ldi r24, 0x00 ; 06f0: 0e 94 d3 0e call 0x1da6 ; 0x1da6 <disk_write>6f4: 89 2b or r24, r256f6: d9 f5 brne .+118 ; 0x76e <move_window+0xc4>return FALSE;fs->winflag = 0;6f8: 1f 8e std Y+31, r1 ; 0x1fif (wsect < (fs->fatbase + fs->sects_fat)) { /* In FAT area */6fa: 8c 89 ldd r24, Y+20 ; 0x146fc: 9d 89 ldd r25, Y+21 ; 0x156fe: aa 27 eor r26, r26700: bb 27 eor r27, r27702: 28 85 ldd r18, Y+8 ; 0x08704: 39 85 ldd r19, Y+9 ; 0x09706: 4a 85 ldd r20, Y+10 ; 0x0a708: 5b 85 ldd r21, Y+11 ; 0x0b70a: 82 0f add r24, r1870c: 93 1f adc r25, r1970e: a4 1f adc r26, r20710: b5 1f adc r27, r21712: c8 16 cp r12, r24714: d9 06 cpc r13, r25716: ea 06 cpc r14, r26718: fb 06 cpc r15, r2771a: a0 f4 brcc .+40 ; 0x744 <move_window+0x9a>for (n = fs->n_fats; n >= 2; n--) { /* Refrect the change to all FAT copies */71c: 1e 8d ldd r17, Y+30 ; 0x1e71e: 10 c0 rjmp .+32 ; 0x740 <move_window+0x96>wsect += fs->sects_fat;720: 8c 89 ldd r24, Y+20 ; 0x14722: 9d 89 ldd r25, Y+21 ; 0x15724: aa 27 eor r26, r26726: bb 27 eor r27, r27728: c8 0e add r12, r2472a: d9 1e adc r13, r2572c: ea 1e adc r14, r2672e: fb 1e adc r15, r27disk_write(0, fs->win, wsect, 1);730: 01 e0 ldi r16, 0x01 ; 1732: a7 01 movw r20, r14734: 96 01 movw r18, r12736: b3 01 movw r22, r6738: 80 e0 ldi r24, 0x00 ; 073a: 0e 94 d3 0e call 0x1da6 ; 0x1da6 <disk_write>if (fs->winflag) { /* Write back dirty window if needed */if (disk_write(0, fs->win, wsect, 1) != RES_OK)return FALSE;fs->winflag = 0;if (wsect < (fs->fatbase + fs->sects_fat)) { /* In FAT area */for (n = fs->n_fats; n >= 2; n--) { /* Refrect the change to all FAT copies */73e: 11 50 subi r17, 0x01 ; 1740: 12 30 cpi r17, 0x02 ; 2742: 70 f7 brcc .-36 ; 0x720 <move_window+0x76>disk_write(0, fs->win, wsect, 1);}}}#endifif (sector) {744: 81 14 cp r8, r1746: 91 04 cpc r9, r1748: a1 04 cpc r10, r174a: b1 04 cpc r11, r174c: 99 f0 breq .+38 ; 0x774 <move_window+0xca>if (disk_read(0, fs->win, sector, 1) != RES_OK)74e: be 01 movw r22, r28750: 60 5e subi r22, 0xE0 ; 224752: 7f 4f sbci r23, 0xFF ; 255754: 01 e0 ldi r16, 0x01 ; 1756: a5 01 movw r20, r10758: 94 01 movw r18, r875a: 80 e0 ldi r24, 0x00 ; 075c: 0e 94 51 0f call 0x1ea2 ; 0x1ea2 <disk_read>760: 89 2b or r24, r25762: 29 f4 brne .+10 ; 0x76e <move_window+0xc4>return FALSE;fs->winsect = sector;764: 8c 82 std Y+4, r8 ; 0x04766: 9d 82 std Y+5, r9 ; 0x05768: ae 82 std Y+6, r10 ; 0x0676a: bf 82 std Y+7, r11 ; 0x0776c: 03 c0 rjmp .+6 ; 0x774 <move_window+0xca>76e: 80 e0 ldi r24, 0x00 ; 0770: 90 e0 ldi r25, 0x00 ; 0772: 02 c0 rjmp .+4 ; 0x778 <move_window+0xce>774: 81 e0 ldi r24, 0x01 ; 1776: 90 e0 ldi r25, 0x00 ; 0778: ee e0 ldi r30, 0x0E ; 1477a: cd b7 in r28, 0x3d ; 6177c: de b7 in r29, 0x3e ; 6277e: 0c 94 4a 11 jmp 0x2294 ; 0x2294 <__epilogue_restores__+0x8>00000782 <put_cluster>:staticBOOL put_cluster ( /* TRUE: successful, FALSE: failed */CLUST clust, /* Cluster# to change */CLUST val /* New value to mark the cluster */){782: a0 e0 ldi r26, 0x00 ; 0784: b0 e0 ldi r27, 0x00 ; 0786: e7 ec ldi r30, 0xC7 ; 199788: f3 e0 ldi r31, 0x03 ; 378a: 0c 94 2d 11 jmp 0x225a ; 0x225a <__prologue_saves__+0x6>78e: ec 01 movw r28, r24790: 5b 01 movw r10, r22WORD bc;BYTE *p;DWORD fatsect;FATFS *fs = FatFs;792: 80 90 0a 01 lds r8, 0x010A796: 90 90 0b 01 lds r9, 0x010Bfatsect = fs->fatbase;79a: f4 01 movw r30, r879c: c0 84 ldd r12, Z+8 ; 0x0879e: d1 84 ldd r13, Z+9 ; 0x097a0: e2 84 ldd r14, Z+10 ; 0x0a7a2: f3 84 ldd r15, Z+11 ; 0x0bswitch (fs->fs_type) {7a4: 84 8d ldd r24, Z+28 ; 0x1c7a6: 81 30 cpi r24, 0x01 ; 17a8: 21 f0 breq .+8 ; 0x7b2 <put_cluster+0x30>7aa: 82 30 cpi r24, 0x02 ; 27ac: 09 f0 breq .+2 ; 0x7b0 <put_cluster+0x2e>7ae: 70 c0 rjmp .+224 ; 0x890 <put_cluster+0x10e>7b0: 56 c0 rjmp .+172 ; 0x85e <put_cluster+0xdc>case FS_FAT12 :bc = (WORD)clust * 3 / 2;7b2: 8e 01 movw r16, r287b4: 00 0f add r16, r167b6: 11 1f adc r17, r177b8: 0c 0f add r16, r287ba: 1d 1f adc r17, r297bc: 16 95 lsr r177be: 07 95 ror r16if (!move_window(fatsect + bc / 512)) return FALSE;7c0: b8 01 movw r22, r167c2: 67 2f mov r22, r237c4: 77 27 eor r23, r237c6: 66 95 lsr r227c8: 88 27 eor r24, r247ca: 99 27 eor r25, r257cc: 6c 0d add r22, r127ce: 7d 1d adc r23, r137d0: 8e 1d adc r24, r147d2: 9f 1d adc r25, r157d4: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>7d8: 88 23 and r24, r247da: 09 f4 brne .+2 ; 0x7de <put_cluster+0x5c>7dc: 59 c0 rjmp .+178 ; 0x890 <put_cluster+0x10e>p = &fs->win[bc % 512];7de: 60 e2 ldi r22, 0x20 ; 327e0: 66 2e mov r6, r227e2: 71 2c mov r7, r17e4: 68 0c add r6, r87e6: 79 1c adc r7, r97e8: f8 01 movw r30, r167ea: f1 70 andi r31, 0x01 ; 17ec: e6 0d add r30, r67ee: f7 1d adc r31, r7*p = (clust & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val;7f0: ce 01 movw r24, r287f2: 81 70 andi r24, 0x01 ; 17f4: 90 70 andi r25, 0x00 ; 07f6: 58 2e mov r5, r247f8: 88 23 and r24, r247fa: 39 f0 breq .+14 ; 0x80a <put_cluster+0x88>7fc: 80 81 ld r24, Z7fe: 8f 70 andi r24, 0x0F ; 15800: 9a 2d mov r25, r10802: 92 95 swap r25804: 90 7f andi r25, 0xF0 ; 240806: 98 2b or r25, r24808: 01 c0 rjmp .+2 ; 0x80c <put_cluster+0x8a>80a: 9a 2d mov r25, r1080c: 90 83 st Z, r25bc++;80e: e8 01 movw r28, r16810: 21 96 adiw r28, 0x01 ; 1fs->winflag = 1;812: 81 e0 ldi r24, 0x01 ; 1814: f4 01 movw r30, r8816: 87 8f std Z+31, r24 ; 0x1fif (!move_window(fatsect + bc / 512)) return FALSE;818: be 01 movw r22, r2881a: 67 2f mov r22, r2381c: 77 27 eor r23, r2381e: 66 95 lsr r22820: 88 27 eor r24, r24822: 99 27 eor r25, r25824: 6c 0d add r22, r12826: 7d 1d adc r23, r13828: 8e 1d adc r24, r1482a: 9f 1d adc r25, r1582c: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>830: 88 23 and r24, r24832: 71 f1 breq .+92 ; 0x890 <put_cluster+0x10e>p = &fs->win[bc % 512];834: fe 01 movw r30, r28836: f1 70 andi r31, 0x01 ; 1838: e6 0d add r30, r683a: f7 1d adc r31, r7*p = (clust & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F));83c: 55 20 and r5, r583e: 39 f0 breq .+14 ; 0x84e <put_cluster+0xcc>840: 44 e0 ldi r20, 0x04 ; 4842: b6 94 lsr r11844: a7 94 ror r10846: 4a 95 dec r20848: e1 f7 brne .-8 ; 0x842 <put_cluster+0xc0>84a: 2a 2d mov r18, r1084c: 06 c0 rjmp .+12 ; 0x85a <put_cluster+0xd8>84e: 20 81 ld r18, Z850: 20 7f andi r18, 0xF0 ; 240852: 8b 2d mov r24, r11854: 99 27 eor r25, r25856: 8f 70 andi r24, 0x0F ; 15858: 28 2b or r18, r2485a: 20 83 st Z, r1885c: 13 c0 rjmp .+38 ; 0x884 <put_cluster+0x102>break;case FS_FAT16 :if (!move_window(fatsect + clust / 256)) return FALSE;85e: 6d 2f mov r22, r29860: 77 27 eor r23, r23862: 88 27 eor r24, r24864: 99 27 eor r25, r25866: 6c 0d add r22, r12868: 7d 1d adc r23, r1386a: 8e 1d adc r24, r1486c: 9f 1d adc r25, r1586e: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>872: 88 23 and r24, r24874: 69 f0 breq .+26 ; 0x890 <put_cluster+0x10e>ST_WORD(&fs->win[((WORD)clust * 2) % 512], (WORD)val);876: cc 0f add r28, r28878: dd 1f adc r29, r2987a: d1 70 andi r29, 0x01 ; 187c: c8 0d add r28, r887e: d9 1d adc r29, r9880: b9 a2 std Y+33, r11 ; 0x21882: a8 a2 std Y+32, r10 ; 0x20break;#endifdefault :return FALSE;}fs->winflag = 1;884: 81 e0 ldi r24, 0x01 ; 1886: f4 01 movw r30, r8888: 87 8f std Z+31, r24 ; 0x1f88a: 81 e0 ldi r24, 0x01 ; 188c: 90 e0 ldi r25, 0x00 ; 088e: 02 c0 rjmp .+4 ; 0x894 <put_cluster+0x112>return TRUE;890: 80 e0 ldi r24, 0x00 ; 0892: 90 e0 ldi r25, 0x00 ; 0894: ef e0 ldi r30, 0x0F ; 15896: cd b7 in r28, 0x3d ; 61898: de b7 in r29, 0x3e ; 6289a: 0c 94 49 11 jmp 0x2292 ; 0x2292 <__epilogue_restores__+0x6>0000089e <get_cluster>:staticCLUST get_cluster ( /* 0,>=2: successful, 1: failed */CLUST clust /* Cluster# to get the link information */){89e: a0 e0 ldi r26, 0x00 ; 08a0: b0 e0 ldi r27, 0x00 ; 08a2: e5 e5 ldi r30, 0x55 ; 858a4: f4 e0 ldi r31, 0x04 ; 48a6: 0c 94 31 11 jmp 0x2262 ; 0x2262 <__prologue_saves__+0xe>8aa: 8c 01 movw r16, r24WORD wc, bc;DWORD fatsect;FATFS *fs = FatFs;8ac: e0 90 0a 01 lds r14, 0x010A8b0: f0 90 0b 01 lds r15, 0x010Bif (clust >= 2 && clust < fs->max_clust) { /* Valid cluster# */8b4: 02 97 sbiw r24, 0x02 ; 28b6: 08 f4 brcc .+2 ; 0x8ba <get_cluster+0x1c>8b8: 67 c0 rjmp .+206 ; 0x988 <get_cluster+0xea>8ba: f7 01 movw r30, r148bc: 86 89 ldd r24, Z+22 ; 0x168be: 97 89 ldd r25, Z+23 ; 0x178c0: 08 17 cp r16, r248c2: 19 07 cpc r17, r258c4: 08 f0 brcs .+2 ; 0x8c8 <get_cluster+0x2a>8c6: 60 c0 rjmp .+192 ; 0x988 <get_cluster+0xea>fatsect = fs->fatbase;8c8: a0 84 ldd r10, Z+8 ; 0x088ca: b1 84 ldd r11, Z+9 ; 0x098cc: c2 84 ldd r12, Z+10 ; 0x0a8ce: d3 84 ldd r13, Z+11 ; 0x0bswitch (fs->fs_type) {8d0: 84 8d ldd r24, Z+28 ; 0x1c8d2: 81 30 cpi r24, 0x01 ; 18d4: 21 f0 breq .+8 ; 0x8de <get_cluster+0x40>8d6: 82 30 cpi r24, 0x02 ; 28d8: 09 f0 breq .+2 ; 0x8dc <get_cluster+0x3e>8da: 56 c0 rjmp .+172 ; 0x988 <get_cluster+0xea>8dc: 40 c0 rjmp .+128 ; 0x95e <get_cluster+0xc0>case FS_FAT12 :bc = (WORD)clust * 3 / 2;8de: e8 01 movw r28, r168e0: cc 0f add r28, r288e2: dd 1f adc r29, r298e4: c0 0f add r28, r168e6: d1 1f adc r29, r178e8: d6 95 lsr r298ea: c7 95 ror r28if (!move_window(fatsect + bc / 512)) break;8ec: be 01 movw r22, r288ee: 67 2f mov r22, r238f0: 77 27 eor r23, r238f2: 66 95 lsr r228f4: 88 27 eor r24, r248f6: 99 27 eor r25, r258f8: 6a 0d add r22, r108fa: 7b 1d adc r23, r118fc: 8c 1d adc r24, r128fe: 9d 1d adc r25, r13900: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>904: 88 23 and r24, r24906: 09 f4 brne .+2 ; 0x90a <get_cluster+0x6c>908: 3f c0 rjmp .+126 ; 0x988 <get_cluster+0xea>wc = fs->win[bc % 512]; bc++;90a: fe 01 movw r30, r2890c: f1 70 andi r31, 0x01 ; 190e: ee 0d add r30, r14910: ff 1d adc r31, r15912: 90 a0 ldd r9, Z+32 ; 0x20914: 21 96 adiw r28, 0x01 ; 1if (!move_window(fatsect + bc / 512)) break;916: be 01 movw r22, r28918: 67 2f mov r22, r2391a: 77 27 eor r23, r2391c: 66 95 lsr r2291e: 88 27 eor r24, r24920: 99 27 eor r25, r25922: 6a 0d add r22, r10924: 7b 1d adc r23, r11926: 8c 1d adc r24, r12928: 9d 1d adc r25, r1392a: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>92e: 88 23 and r24, r24930: 59 f1 breq .+86 ; 0x988 <get_cluster+0xea>fatsect = fs->fatbase;switch (fs->fs_type) {case FS_FAT12 :bc = (WORD)clust * 3 / 2;if (!move_window(fatsect + bc / 512)) break;wc = fs->win[bc % 512]; bc++;932: 29 2d mov r18, r9934: 33 27 eor r19, r19if (!move_window(fatsect + bc / 512)) break;wc |= (WORD)fs->win[bc % 512] << 8;936: d1 70 andi r29, 0x01 ; 1938: ec 0e add r14, r2893a: fd 1e adc r15, r2993c: f7 01 movw r30, r1493e: 80 a1 ldd r24, Z+32 ; 0x20940: 99 27 eor r25, r25942: 98 2f mov r25, r24944: 88 27 eor r24, r24946: 82 2b or r24, r18948: 93 2b or r25, r19return (clust & 1) ? (wc >> 4) : (wc & 0xFFF);94a: 00 ff sbrs r16, 094c: 06 c0 rjmp .+12 ; 0x95a <get_cluster+0xbc>94e: 24 e0 ldi r18, 0x04 ; 4950: 96 95 lsr r25952: 87 95 ror r24954: 2a 95 dec r18956: e1 f7 brne .-8 ; 0x950 <get_cluster+0xb2>958: 19 c0 rjmp .+50 ; 0x98c <get_cluster+0xee>95a: 9f 70 andi r25, 0x0F ; 1595c: 17 c0 rjmp .+46 ; 0x98c <get_cluster+0xee>case FS_FAT16 :if (!move_window(fatsect + clust / 256)) break;95e: 61 2f mov r22, r17960: 77 27 eor r23, r23962: 88 27 eor r24, r24964: 99 27 eor r25, r25966: 6a 0d add r22, r10968: 7b 1d adc r23, r1196a: 8c 1d adc r24, r1296c: 9d 1d adc r25, r1396e: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>972: 88 23 and r24, r24974: 49 f0 breq .+18 ; 0x988 <get_cluster+0xea>return LD_WORD(&fs->win[((WORD)clust * 2) % 512]);976: 00 0f add r16, r16978: 11 1f adc r17, r1797a: 11 70 andi r17, 0x01 ; 197c: e0 0e add r14, r1697e: f1 1e adc r15, r17980: f7 01 movw r30, r14982: 80 a1 ldd r24, Z+32 ; 0x20984: 91 a1 ldd r25, Z+33 ; 0x21986: 02 c0 rjmp .+4 ; 0x98c <get_cluster+0xee>988: 81 e0 ldi r24, 0x01 ; 198a: 90 e0 ldi r25, 0x00 ; 098c: eb e0 ldi r30, 0x0B ; 1198e: cd b7 in r28, 0x3d ; 61990: de b7 in r29, 0x3e ; 62992: 0c 94 4d 11 jmp 0x229a ; 0x229a <__epilogue_restores__+0xe>00000996 <next_dir_entry>:staticBOOL next_dir_entry ( /* TRUE: successful, FALSE: could not move next */DIR *dirobj /* Pointer to directory object */){996: ef 92 push r14998: ff 92 push r1599a: 0f 93 push r1699c: 1f 93 push r1799e: cf 93 push r289a0: df 93 push r299a2: ec 01 movw r28, r24CLUST clust;WORD idx;FATFS *fs = FatFs;9a4: e0 90 0a 01 lds r14, 0x010A9a8: f0 90 0b 01 lds r15, 0x010Bidx = dirobj->index + 1;9ac: 0a 81 ldd r16, Y+2 ; 0x029ae: 1b 81 ldd r17, Y+3 ; 0x039b0: 0f 5f subi r16, 0xFF ; 2559b2: 1f 4f sbci r17, 0xFF ; 255if ((idx & 15) == 0) { /* Table sector changed? */9b4: c8 01 movw r24, r169b6: 8f 70 andi r24, 0x0F ; 159b8: 90 70 andi r25, 0x00 ; 09ba: 89 2b or r24, r259bc: d1 f5 brne .+116 ; 0xa32 <next_dir_entry+0x9c>dirobj->sect++; /* Next sector */9be: 8a 85 ldd r24, Y+10 ; 0x0a9c0: 9b 85 ldd r25, Y+11 ; 0x0b9c2: ac 85 ldd r26, Y+12 ; 0x0c9c4: bd 85 ldd r27, Y+13 ; 0x0d9c6: 01 96 adiw r24, 0x01 ; 19c8: a1 1d adc r26, r19ca: b1 1d adc r27, r19cc: 8a 87 std Y+10, r24 ; 0x0a9ce: 9b 87 std Y+11, r25 ; 0x0b9d0: ac 87 std Y+12, r26 ; 0x0c9d2: bd 87 std Y+13, r27 ; 0x0dif (!dirobj->clust) { /* In static table */9d4: 48 85 ldd r20, Y+8 ; 0x089d6: 59 85 ldd r21, Y+9 ; 0x099d8: 41 15 cp r20, r19da: 51 05 cpc r21, r19dc: 39 f4 brne .+14 ; 0x9ec <next_dir_entry+0x56>if (idx >= fs->n_rootdir) return FALSE; /* Reached to end of table */9de: f7 01 movw r30, r149e0: 82 81 ldd r24, Z+2 ; 0x029e2: 93 81 ldd r25, Z+3 ; 0x039e4: 08 17 cp r16, r249e6: 19 07 cpc r17, r259e8: 20 f1 brcs .+72 ; 0xa32 <next_dir_entry+0x9c>9ea: 28 c0 rjmp .+80 ; 0xa3c <next_dir_entry+0xa6>} else { /* In dynamic table */if (((idx / 16) & (fs->sects_clust - 1)) == 0) { /* Cluster changed? */9ec: f7 01 movw r30, r149ee: 85 8d ldd r24, Z+29 ; 0x1d9f0: 99 27 eor r25, r259f2: 01 97 sbiw r24, 0x01 ; 19f4: 98 01 movw r18, r169f6: b4 e0 ldi r27, 0x04 ; 49f8: 36 95 lsr r199fa: 27 95 ror r189fc: ba 95 dec r279fe: e1 f7 brne .-8 ; 0x9f8 <next_dir_entry+0x62>a00: 82 23 and r24, r18a02: 93 23 and r25, r19a04: 89 2b or r24, r25a06: a9 f4 brne .+42 ; 0xa32 <next_dir_entry+0x9c>clust = get_cluster(dirobj->clust); /* Get next cluster */a08: ca 01 movw r24, r20a0a: 0e 94 4f 04 call 0x89e ; 0x89e <get_cluster>a0e: 9c 01 movw r18, r24if (clust < 2 || clust >= fs->max_clust) /* Reached to end of table */a10: 02 97 sbiw r24, 0x02 ; 2a12: a0 f0 brcs .+40 ; 0xa3c <next_dir_entry+0xa6>a14: f7 01 movw r30, r14a16: 86 89 ldd r24, Z+22 ; 0x16a18: 97 89 ldd r25, Z+23 ; 0x17a1a: 28 17 cp r18, r24a1c: 39 07 cpc r19, r25a1e: 70 f4 brcc .+28 ; 0xa3c <next_dir_entry+0xa6>return FALSE;dirobj->clust = clust; /* Initialize for new cluster */a20: 39 87 std Y+9, r19 ; 0x09a22: 28 87 std Y+8, r18 ; 0x08dirobj->sect = clust2sect(clust);a24: c9 01 movw r24, r18a26: 0e 94 18 03 call 0x630 ; 0x630 <clust2sect>a2a: 6a 87 std Y+10, r22 ; 0x0aa2c: 7b 87 std Y+11, r23 ; 0x0ba2e: 8c 87 std Y+12, r24 ; 0x0ca30: 9d 87 std Y+13, r25 ; 0x0d}}}dirobj->index = idx; /* Lower 4 bit of dirobj->index indicates offset in dirobj->sect */a32: 1b 83 std Y+3, r17 ; 0x03a34: 0a 83 std Y+2, r16 ; 0x02a36: 81 e0 ldi r24, 0x01 ; 1a38: 90 e0 ldi r25, 0x00 ; 0a3a: 02 c0 rjmp .+4 ; 0xa40 <next_dir_entry+0xaa>return TRUE;a3c: 80 e0 ldi r24, 0x00 ; 0a3e: 90 e0 ldi r25, 0x00 ; 0a40: e6 e0 ldi r30, 0x06 ; 6a42: cd b7 in r28, 0x3d ; 61a44: de b7 in r29, 0x3e ; 62a46: 0c 94 52 11 jmp 0x22a4 ; 0x22a4 <__epilogue_restores__+0x18>00000a4a <create_chain>:#if !_FS_READONLYstaticCLUST create_chain ( /* 0: no free cluster, 1: error, >=2: new cluster number */CLUST clust /* Cluster# to stretch, 0 means create new */){a4a: a0 e0 ldi r26, 0x00 ; 0a4c: b0 e0 ldi r27, 0x00 ; 0a4e: eb e2 ldi r30, 0x2B ; 43a50: f5 e0 ldi r31, 0x05 ; 5a52: 0c 94 32 11 jmp 0x2264 ; 0x2264 <__prologue_saves__+0x10>a56: 7c 01 movw r14, r24CLUST cstat, ncl, scl, mcl;FATFS *fs = FatFs;a58: a0 90 0a 01 lds r10, 0x010Aa5c: b0 90 0b 01 lds r11, 0x010Bmcl = fs->max_clust;a60: f5 01 movw r30, r10a62: c6 88 ldd r12, Z+22 ; 0x16a64: d7 88 ldd r13, Z+23 ; 0x17if (clust == 0) { /* Create new chain */a66: 00 97 sbiw r24, 0x00 ; 0a68: 49 f4 brne .+18 ; 0xa7c <create_chain+0x32>scl = fs->last_clust; /* Get last allocated cluster */a6a: 00 8d ldd r16, Z+24 ; 0x18a6c: 11 8d ldd r17, Z+25 ; 0x19if (scl < 2 || scl >= mcl) scl = 1;a6e: 02 30 cpi r16, 0x02 ; 2a70: 11 05 cpc r17, r1a72: 80 f0 brcs .+32 ; 0xa94 <create_chain+0x4a>a74: 0c 15 cp r16, r12a76: 1d 05 cpc r17, r13a78: 68 f4 brcc .+26 ; 0xa94 <create_chain+0x4a>a7a: 0e c0 rjmp .+28 ; 0xa98 <create_chain+0x4e>}else { /* Stretch existing chain */cstat = get_cluster(clust); /* Check the cluster status */a7c: 0e 94 4f 04 call 0x89e ; 0x89e <get_cluster>if (cstat < 2) return 1; /* It is an invalid cluster */a80: 82 30 cpi r24, 0x02 ; 2a82: 91 05 cpc r25, r1a84: e8 f1 brcs .+122 ; 0xb00 <create_chain+0xb6>if (cstat < mcl) return cstat; /* It is already followed by next cluster */a86: 8c 15 cp r24, r12a88: 9d 05 cpc r25, r13a8a: 10 f4 brcc .+4 ; 0xa90 <create_chain+0x46>a8c: bc 01 movw r22, r24a8e: 3d c0 rjmp .+122 ; 0xb0a <create_chain+0xc0>a90: 87 01 movw r16, r14a92: 02 c0 rjmp .+4 ; 0xa98 <create_chain+0x4e>a94: 01 e0 ldi r16, 0x01 ; 1a96: 10 e0 ldi r17, 0x00 ; 0a98: e8 01 movw r28, r16scl = clust;}ncl = scl; /* Start cluster */for (;;) {ncl++; /* Next cluster */a9a: 21 96 adiw r28, 0x01 ; 1if (ncl >= mcl) { /* Wrap around */a9c: cc 15 cp r28, r12a9e: dd 05 cpc r29, r13aa0: 28 f0 brcs .+10 ; 0xaac <create_chain+0x62>ncl = 2;if (ncl > scl) return 0; /* No free custer */aa2: 02 30 cpi r16, 0x02 ; 2aa4: 11 05 cpc r17, r1aa6: 78 f1 brcs .+94 ; 0xb06 <create_chain+0xbc>aa8: c2 e0 ldi r28, 0x02 ; 2aaa: d0 e0 ldi r29, 0x00 ; 0}cstat = get_cluster(ncl); /* Get the cluster status */aac: ce 01 movw r24, r28aae: 0e 94 4f 04 call 0x89e ; 0x89e <get_cluster>if (cstat == 0) break; /* Found a free cluster */ab2: 00 97 sbiw r24, 0x00 ; 0ab4: 31 f0 breq .+12 ; 0xac2 <create_chain+0x78>if (cstat == 1) return 1; /* Any error occured */ab6: 01 97 sbiw r24, 0x01 ; 1ab8: 19 f1 breq .+70 ; 0xb00 <create_chain+0xb6>if (ncl == scl) return 0; /* No free custer */aba: c0 17 cp r28, r16abc: d1 07 cpc r29, r17abe: 19 f1 breq .+70 ; 0xb06 <create_chain+0xbc>ac0: ec cf rjmp .-40 ; 0xa9a <create_chain+0x50>}if (!put_cluster(ncl, (CLUST)0x0FFFFFFF)) return 1; /* Mark the new cluster "in use" */ac2: 6f ef ldi r22, 0xFF ; 255ac4: 7f ef ldi r23, 0xFF ; 255ac6: ce 01 movw r24, r28ac8: 0e 94 c1 03 call 0x782 ; 0x782 <put_cluster>acc: 88 23 and r24, r24ace: c1 f0 breq .+48 ; 0xb00 <create_chain+0xb6>if (clust && !put_cluster(clust, ncl)) return 1; /* Link it to previous one if needed */ad0: e1 14 cp r14, r1ad2: f1 04 cpc r15, r1ad4: 31 f0 breq .+12 ; 0xae2 <create_chain+0x98>ad6: be 01 movw r22, r28ad8: c7 01 movw r24, r14ada: 0e 94 c1 03 call 0x782 ; 0x782 <put_cluster>ade: 88 23 and r24, r24ae0: 79 f0 breq .+30 ; 0xb00 <create_chain+0xb6>fs->last_clust = ncl; /* Update fsinfo */ae2: f5 01 movw r30, r10ae4: d1 8f std Z+25, r29 ; 0x19ae6: c0 8f std Z+24, r28 ; 0x18if (fs->free_clust != (CLUST)0xFFFFFFFF) {ae8: 82 8d ldd r24, Z+26 ; 0x1aaea: 93 8d ldd r25, Z+27 ; 0x1baec: ff ef ldi r31, 0xFF ; 255aee: 8f 3f cpi r24, 0xFF ; 255af0: 9f 07 cpc r25, r31af2: 21 f0 breq .+8 ; 0xafc <create_chain+0xb2>fs->free_clust--;af4: 01 97 sbiw r24, 0x01 ; 1af6: f5 01 movw r30, r10af8: 93 8f std Z+27, r25 ; 0x1bafa: 82 8f std Z+26, r24 ; 0x1aafc: be 01 movw r22, r28afe: 05 c0 rjmp .+10 ; 0xb0a <create_chain+0xc0>b00: 61 e0 ldi r22, 0x01 ; 1b02: 70 e0 ldi r23, 0x00 ; 0b04: 02 c0 rjmp .+4 ; 0xb0a <create_chain+0xc0>b06: 60 e0 ldi r22, 0x00 ; 0b08: 70 e0 ldi r23, 0x00 ; 0fs->fsi_flag = 1;#endif}return ncl; /* Return new cluster number */}b0a: cb 01 movw r24, r22b0c: ea e0 ldi r30, 0x0A ; 10b0e: cd b7 in r28, 0x3d ; 61b10: de b7 in r29, 0x3e ; 62b12: 0c 94 4e 11 jmp 0x229c ; 0x229c <__epilogue_restores__+0x10>00000b16 <f_lseek>:FRESULT f_lseek (FIL *fp, /* Pointer to the file object */DWORD ofs /* File pointer from top of file */){b16: a0 e0 ldi r26, 0x00 ; 0b18: b0 e0 ldi r27, 0x00 ; 0b1a: e1 e9 ldi r30, 0x91 ; 145b1c: f5 e0 ldi r31, 0x05 ; 5b1e: 0c 94 2a 11 jmp 0x2254 ; 0x2254 <__prologue_saves__>b22: ec 01 movw r28, r24b24: 3a 01 movw r6, r20b26: 4b 01 movw r8, r22CLUST clust;DWORD csize;BYTE csect;FRESULT res;FATFS *fs = fp->fs;b28: 4c 80 ldd r4, Y+4 ; 0x04b2a: 5d 80 ldd r5, Y+5 ; 0x05res = validate(fs, fp->id); /* Check validity of the object */b2c: 68 81 ld r22, Yb2e: 79 81 ldd r23, Y+1 ; 0x01b30: c2 01 movw r24, r4b32: 0e 94 43 03 call 0x686 ; 0x686 <validate>b36: 1c 01 movw r2, r24if (res) return res;b38: 89 2b or r24, r25b3a: 09 f0 breq .+2 ; 0xb3e <f_lseek+0x28>b3c: b8 c0 rjmp .+368 ; 0xcae <f_lseek+0x198>if (fp->flag & FA__ERROR) return FR_RW_ERROR;b3e: 2a 81 ldd r18, Y+2 ; 0x02b40: 22 23 and r18, r18b42: 0c f4 brge .+2 ; 0xb46 <f_lseek+0x30>b44: b1 c0 rjmp .+354 ; 0xca8 <f_lseek+0x192>#if !_FS_READONLYif (ofs > fp->fsize && !(fp->flag & FA_WRITE))b46: 8a 85 ldd r24, Y+10 ; 0x0ab48: 9b 85 ldd r25, Y+11 ; 0x0bb4a: ac 85 ldd r26, Y+12 ; 0x0cb4c: bd 85 ldd r27, Y+13 ; 0x0db4e: 86 15 cp r24, r6b50: 97 05 cpc r25, r7b52: a8 05 cpc r26, r8b54: b9 05 cpc r27, r9b56: 20 f4 brcc .+8 ; 0xb60 <f_lseek+0x4a>b58: 21 fd sbrc r18, 1b5a: 02 c0 rjmp .+4 ; 0xb60 <f_lseek+0x4a>b5c: 3c 01 movw r6, r24b5e: 4d 01 movw r8, r26#elseif (ofs > fp->fsize)#endifofs = fp->fsize;fp->fptr = 0; fp->sect_clust = 1; /* Set file R/W pointer to top of the file */b60: 1e 82 std Y+6, r1 ; 0x06b62: 1f 82 std Y+7, r1 ; 0x07b64: 18 86 std Y+8, r1 ; 0x08b66: 19 86 std Y+9, r1 ; 0x09b68: 81 e0 ldi r24, 0x01 ; 1b6a: 8b 83 std Y+3, r24 ; 0x03/* Move file R/W pointer if needed */if (ofs) {b6c: 61 14 cp r6, r1b6e: 71 04 cpc r7, r1b70: 81 04 cpc r8, r1b72: 91 04 cpc r9, r1b74: 09 f4 brne .+2 ; 0xb78 <f_lseek+0x62>b76: 7e c0 rjmp .+252 ; 0xc74 <f_lseek+0x15e>clust = fp->org_clust; /* Get start cluster */b78: 2e 85 ldd r18, Y+14 ; 0x0eb7a: 3f 85 ldd r19, Y+15 ; 0x0f#if !_FS_READONLYif (!clust) { /* If the file does not have a cluster chain, create new cluster chain */b7c: 21 15 cp r18, r1b7e: 31 05 cpc r19, r1b80: 71 f4 brne .+28 ; 0xb9e <f_lseek+0x88>clust = create_chain(0);b82: 80 e0 ldi r24, 0x00 ; 0b84: 90 e0 ldi r25, 0x00 ; 0b86: 0e 94 25 05 call 0xa4a ; 0xa4a <create_chain>b8a: 9c 01 movw r18, r24if (clust == 1) goto fk_error;b8c: 81 30 cpi r24, 0x01 ; 1b8e: 91 05 cpc r25, r1b90: 09 f4 brne .+2 ; 0xb94 <f_lseek+0x7e>b92: 87 c0 rjmp .+270 ; 0xca2 <f_lseek+0x18c>fp->org_clust = clust;b94: 9f 87 std Y+15, r25 ; 0x0fb96: 8e 87 std Y+14, r24 ; 0x0e}#endifif (clust) { /* If the file has a cluster chain, it can be followed */b98: 89 2b or r24, r25b9a: 09 f4 brne .+2 ; 0xb9e <f_lseek+0x88>b9c: 6b c0 rjmp .+214 ; 0xc74 <f_lseek+0x15e>csize = (DWORD)fs->sects_clust * 512; /* Cluster size in unit of byte */b9e: f2 01 movw r30, r4ba0: 85 8d ldd r24, Z+29 ; 0x1dba2: e8 2e mov r14, r24ba4: ff 24 eor r15, r15ba6: 00 27 eor r16, r16ba8: 11 27 eor r17, r17baa: 89 e0 ldi r24, 0x09 ; 9bac: ee 0c add r14, r14bae: ff 1c adc r15, r15bb0: 00 1f adc r16, r16bb2: 11 1f adc r17, r17bb4: 8a 95 dec r24bb6: d1 f7 brne .-12 ; 0xbac <f_lseek+0x96>for (;;) { /* Loop to skip leading clusters */fp->curr_clust = clust; /* Update current cluster */bb8: 39 8b std Y+17, r19 ; 0x11bba: 28 8b std Y+16, r18 ; 0x10if (ofs <= csize) break;bbc: e6 14 cp r14, r6bbe: f7 04 cpc r15, r7bc0: 08 05 cpc r16, r8bc2: 19 05 cpc r17, r9bc4: 50 f5 brcc .+84 ; 0xc1a <f_lseek+0x104>#if !_FS_READONLYif (fp->flag & FA_WRITE) /* Check if in write mode or not */bc6: 8a 81 ldd r24, Y+2 ; 0x02bc8: 81 ff sbrs r24, 1bca: 04 c0 rjmp .+8 ; 0xbd4 <f_lseek+0xbe>clust = create_chain(clust); /* Force streached if in write mode */bcc: c9 01 movw r24, r18bce: 0e 94 25 05 call 0xa4a ; 0xa4a <create_chain>bd2: 03 c0 rjmp .+6 ; 0xbda <f_lseek+0xc4>else#endifclust = get_cluster(clust); /* Only follow cluster chain if not in write mode */bd4: c9 01 movw r24, r18bd6: 0e 94 4f 04 call 0x89e ; 0x89e <get_cluster>bda: 9c 01 movw r18, r24if (clust == 0) { /* Stop if could not follow the cluster chain */bdc: 00 97 sbiw r24, 0x00 ; 0bde: d9 f0 breq .+54 ; 0xc16 <f_lseek+0x100>ofs = csize; break;}if (clust == 1 || clust >= fs->max_clust) goto fk_error;be0: 01 97 sbiw r24, 0x01 ; 1be2: 09 f4 brne .+2 ; 0xbe6 <f_lseek+0xd0>be4: 5e c0 rjmp .+188 ; 0xca2 <f_lseek+0x18c>be6: f2 01 movw r30, r4be8: 86 89 ldd r24, Z+22 ; 0x16bea: 97 89 ldd r25, Z+23 ; 0x17bec: 28 17 cp r18, r24bee: 39 07 cpc r19, r25bf0: 08 f0 brcs .+2 ; 0xbf4 <f_lseek+0xde>bf2: 57 c0 rjmp .+174 ; 0xca2 <f_lseek+0x18c>fp->fptr += csize; /* Update R/W pointer */bf4: 8e 81 ldd r24, Y+6 ; 0x06bf6: 9f 81 ldd r25, Y+7 ; 0x07bf8: a8 85 ldd r26, Y+8 ; 0x08bfa: b9 85 ldd r27, Y+9 ; 0x09bfc: 8e 0d add r24, r14bfe: 9f 1d adc r25, r15c00: a0 1f adc r26, r16c02: b1 1f adc r27, r17c04: 8e 83 std Y+6, r24 ; 0x06c06: 9f 83 std Y+7, r25 ; 0x07c08: a8 87 std Y+8, r26 ; 0x08c0a: b9 87 std Y+9, r27 ; 0x09ofs -= csize;c0c: 6e 18 sub r6, r14c0e: 7f 08 sbc r7, r15c10: 80 0a sbc r8, r16c12: 91 0a sbc r9, r17c14: d1 cf rjmp .-94 ; 0xbb8 <f_lseek+0xa2>}c16: 37 01 movw r6, r14c18: 48 01 movw r8, r16csect = (BYTE)((ofs - 1) / 512); /* Sector offset in the cluster */c1a: 64 01 movw r12, r8c1c: 53 01 movw r10, r6c1e: 08 94 secc20: a1 08 sbc r10, r1c22: b1 08 sbc r11, r1c24: c1 08 sbc r12, r1c26: d1 08 sbc r13, r1c28: 09 e0 ldi r16, 0x09 ; 9c2a: d6 94 lsr r13c2c: c7 94 ror r12c2e: b7 94 ror r11c30: a7 94 ror r10c32: 0a 95 dec r16c34: d1 f7 brne .-12 ; 0xc2a <f_lseek+0x114>fp->curr_sect = clust2sect(clust) + csect; /* Current sector */c36: ea 2c mov r14, r10c38: ff 24 eor r15, r15c3a: 00 27 eor r16, r16c3c: 11 27 eor r17, r17c3e: c9 01 movw r24, r18c40: 0e 94 18 03 call 0x630 ; 0x630 <clust2sect>c44: e6 0e add r14, r22c46: f7 1e adc r15, r23c48: 08 1f adc r16, r24c4a: 19 1f adc r17, r25c4c: ea 8a std Y+18, r14 ; 0x12c4e: fb 8a std Y+19, r15 ; 0x13c50: 0c 8b std Y+20, r16 ; 0x14c52: 1d 8b std Y+21, r17 ; 0x15fp->sect_clust = fs->sects_clust - csect; /* Left sector counter in the cluster */c54: f2 01 movw r30, r4c56: 85 8d ldd r24, Z+29 ; 0x1dc58: 8a 19 sub r24, r10c5a: 8b 83 std Y+3, r24 ; 0x03fp->fptr += ofs; /* Update file R/W pointer */c5c: 8e 81 ldd r24, Y+6 ; 0x06c5e: 9f 81 ldd r25, Y+7 ; 0x07c60: a8 85 ldd r26, Y+8 ; 0x08c62: b9 85 ldd r27, Y+9 ; 0x09c64: 86 0d add r24, r6c66: 97 1d adc r25, r7c68: a8 1d adc r26, r8c6a: b9 1d adc r27, r9c6c: 8e 83 std Y+6, r24 ; 0x06c6e: 9f 83 std Y+7, r25 ; 0x07c70: a8 87 std Y+8, r26 ; 0x08c72: b9 87 std Y+9, r27 ; 0x09}}#if !_FS_READONLYif ((fp->flag & FA_WRITE) && fp->fptr > fp->fsize) { /* Set updated flag if in write mode */c74: 6a 81 ldd r22, Y+2 ; 0x02c76: 61 ff sbrs r22, 1c78: 1a c0 rjmp .+52 ; 0xcae <f_lseek+0x198>c7a: 2e 81 ldd r18, Y+6 ; 0x06c7c: 3f 81 ldd r19, Y+7 ; 0x07c7e: 48 85 ldd r20, Y+8 ; 0x08c80: 59 85 ldd r21, Y+9 ; 0x09c82: 8a 85 ldd r24, Y+10 ; 0x0ac84: 9b 85 ldd r25, Y+11 ; 0x0bc86: ac 85 ldd r26, Y+12 ; 0x0cc88: bd 85 ldd r27, Y+13 ; 0x0dc8a: 82 17 cp r24, r18c8c: 93 07 cpc r25, r19c8e: a4 07 cpc r26, r20c90: b5 07 cpc r27, r21c92: 68 f4 brcc .+26 ; 0xcae <f_lseek+0x198>fp->fsize = fp->fptr;c94: 2a 87 std Y+10, r18 ; 0x0ac96: 3b 87 std Y+11, r19 ; 0x0bc98: 4c 87 std Y+12, r20 ; 0x0cc9a: 5d 87 std Y+13, r21 ; 0x0dfp->flag |= FA__WRITTEN;c9c: 60 62 ori r22, 0x20 ; 32c9e: 6a 83 std Y+2, r22 ; 0x02ca0: 06 c0 rjmp .+12 ; 0xcae <f_lseek+0x198>#endifreturn FR_OK;fk_error: /* Abort this function due to an unrecoverable error */fp->flag |= FA__ERROR;ca2: 8a 81 ldd r24, Y+2 ; 0x02ca4: 80 68 ori r24, 0x80 ; 128ca6: 8a 83 std Y+2, r24 ; 0x02ca8: 18 e0 ldi r17, 0x08 ; 8caa: 21 2e mov r2, r17cac: 31 2c mov r3, r1return FR_RW_ERROR;}cae: c1 01 movw r24, r2cb0: e2 e1 ldi r30, 0x12 ; 18cb2: cd b7 in r28, 0x3d ; 61cb4: de b7 in r29, 0x3e ; 62cb6: 0c 94 46 11 jmp 0x228c ; 0x228c <__epilogue_restores__>00000cba <f_sync>:/*-----------------------------------------------------------------------*/FRESULT f_sync (FIL *fp /* Pointer to the file object */){cba: ef 92 push r14cbc: ff 92 push r15cbe: 0f 93 push r16cc0: 1f 93 push r17cc2: cf 93 push r28cc4: df 93 push r29cc6: ec 01 movw r28, r24BYTE *dir;FRESULT res;FATFS *fs = fp->fs;res = validate(fs, fp->id); /* Check validity of the object */cc8: 68 81 ld r22, Ycca: 79 81 ldd r23, Y+1 ; 0x01ccc: 8c 81 ldd r24, Y+4 ; 0x04cce: 9d 81 ldd r25, Y+5 ; 0x05cd0: 0e 94 43 03 call 0x686 ; 0x686 <validate>cd4: 7c 01 movw r14, r24if (res == FR_OK) {cd6: 89 2b or r24, r25cd8: 09 f0 breq .+2 ; 0xcdc <f_sync+0x22>cda: 40 c0 rjmp .+128 ; 0xd5c <f_sync+0xa2>if (fp->flag & FA__WRITTEN) { /* Has the file been written? */cdc: 8a 81 ldd r24, Y+2 ; 0x02cde: 85 ff sbrs r24, 5ce0: 3d c0 rjmp .+122 ; 0xd5c <f_sync+0xa2>/* Update the directory entry */if (!move_window(fp->dir_sect))ce2: 6e 89 ldd r22, Y+22 ; 0x16ce4: 7f 89 ldd r23, Y+23 ; 0x17ce6: 88 8d ldd r24, Y+24 ; 0x18ce8: 99 8d ldd r25, Y+25 ; 0x19cea: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>cee: 88 23 and r24, r24cf0: 91 f1 breq .+100 ; 0xd56 <f_sync+0x9c>return FR_RW_ERROR;dir = fp->dir_ptr;cf2: 0a 8d ldd r16, Y+26 ; 0x1acf4: 1b 8d ldd r17, Y+27 ; 0x1bdir[DIR_Attr] |= AM_ARC; /* Set archive bit */cf6: f8 01 movw r30, r16cf8: 83 85 ldd r24, Z+11 ; 0x0bcfa: 80 62 ori r24, 0x20 ; 32cfc: 83 87 std Z+11, r24 ; 0x0bST_DWORD(&dir[DIR_FileSize], fp->fsize); /* Update file size */cfe: 8a 85 ldd r24, Y+10 ; 0x0ad00: 9b 85 ldd r25, Y+11 ; 0x0bd02: ac 85 ldd r26, Y+12 ; 0x0cd04: bd 85 ldd r27, Y+13 ; 0x0dd06: 84 8f std Z+28, r24 ; 0x1cd08: 95 8f std Z+29, r25 ; 0x1dd0a: a6 8f std Z+30, r26 ; 0x1ed0c: b7 8f std Z+31, r27 ; 0x1fST_WORD(&dir[DIR_FstClusLO], fp->org_clust); /* Update start cluster */d0e: 8e 85 ldd r24, Y+14 ; 0x0ed10: 9f 85 ldd r25, Y+15 ; 0x0fd12: 93 8f std Z+27, r25 ; 0x1bd14: 82 8f std Z+26, r24 ; 0x1a#if _FAT32ST_WORD(&dir[DIR_FstClusHI], fp->org_clust >> 16);#endiftim = get_fattime(); /* Updated time */d16: 0e 94 bb 00 call 0x176 ; 0x176 <get_fattime>ST_DWORD(&dir[DIR_WrtTime], tim);d1a: f8 01 movw r30, r16d1c: 66 8b std Z+22, r22 ; 0x16d1e: 77 8b std Z+23, r23 ; 0x17d20: 80 8f std Z+24, r24 ; 0x18d22: 91 8f std Z+25, r25 ; 0x19fp->flag &= ~FA__WRITTEN;d24: 8a 81 ldd r24, Y+2 ; 0x02d26: 8f 7d andi r24, 0xDF ; 223d28: 8a 83 std Y+2, r24 ; 0x02FRESULT sync (void) /* FR_OK: successful, FR_RW_ERROR: failed */{FATFS *fs = FatFs;fs->winflag = 1;d2a: e0 91 0a 01 lds r30, 0x010Ad2e: f0 91 0b 01 lds r31, 0x010Bd32: 81 e0 ldi r24, 0x01 ; 1d34: 87 8f std Z+31, r24 ; 0x1fif (!move_window(0)) return FR_RW_ERROR;d36: 60 e0 ldi r22, 0x00 ; 0d38: 70 e0 ldi r23, 0x00 ; 0d3a: 80 e0 ldi r24, 0x00 ; 0d3c: 90 e0 ldi r25, 0x00 ; 0d3e: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>d42: 88 23 and r24, r24d44: 41 f0 breq .+16 ; 0xd56 <f_sync+0x9c>ST_DWORD(&fs->win[FSI_Nxt_Free], fs->last_clust);disk_write(0, fs->win, fs->fsi_sector, 1);fs->fsi_flag = 0;}#endifif (disk_ioctl(0, CTRL_SYNC, NULL) != RES_OK) return FR_RW_ERROR;d46: 40 e0 ldi r20, 0x00 ; 0d48: 50 e0 ldi r21, 0x00 ; 0d4a: 63 e0 ldi r22, 0x03 ; 3d4c: 80 e0 ldi r24, 0x00 ; 0d4e: 0e 94 e8 0d call 0x1bd0 ; 0x1bd0 <disk_ioctl>d52: 89 2b or r24, r25d54: 19 f0 breq .+6 ; 0xd5c <f_sync+0xa2>d56: 98 e0 ldi r25, 0x08 ; 8d58: e9 2e mov r14, r25d5a: f1 2c mov r15, r1fp->flag &= ~FA__WRITTEN;res = sync();}}return res;}d5c: c7 01 movw r24, r14d5e: e6 e0 ldi r30, 0x06 ; 6d60: cd b7 in r28, 0x3d ; 61d62: de b7 in r29, 0x3e ; 62d64: 0c 94 52 11 jmp 0x22a4 ; 0x22a4 <__epilogue_restores__+0x18>00000d68 <f_close>:/*-----------------------------------------------------------------------*/FRESULT f_close (FIL *fp /* Pointer to the file object to be closed */){d68: cf 93 push r28d6a: df 93 push r29d6c: ec 01 movw r28, r24FRESULT res;#if !_FS_READONLYres = f_sync(fp);d6e: 0e 94 5d 06 call 0xcba ; 0xcba <f_sync>#elseres = validate(fp->fs, fp->id);#endifif (res == FR_OK)d72: 00 97 sbiw r24, 0x00 ; 0d74: 11 f4 brne .+4 ; 0xd7a <f_close+0x12>fp->fs = NULL;d76: 1d 82 std Y+5, r1 ; 0x05d78: 1c 82 std Y+4, r1 ; 0x04d7a: df 91 pop r29d7c: cf 91 pop r28d7e: 08 95 ret00000d80 <f_write>:FIL *fp, /* Pointer to the file object */const void *buff, /* Pointer to the data to be written */WORD btw, /* Number of bytes to write */WORD *bw /* Pointer to number of bytes written */){d80: a0 e0 ldi r26, 0x00 ; 0d82: b0 e0 ldi r27, 0x00 ; 0d84: e6 ec ldi r30, 0xC6 ; 198d86: f6 e0 ldi r31, 0x06 ; 6d88: 0c 94 2c 11 jmp 0x2258 ; 0x2258 <__prologue_saves__+0x4>d8c: ec 01 movw r28, r24d8e: 8b 01 movw r16, r22d90: 7a 01 movw r14, r20d92: 39 01 movw r6, r18WORD wcnt;CLUST clust;BYTE cc;FRESULT res;const BYTE *wbuff = buff;FATFS *fs = fp->fs;d94: cc 80 ldd r12, Y+4 ; 0x04d96: dd 80 ldd r13, Y+5 ; 0x05*bw = 0;d98: f9 01 movw r30, r18d9a: 11 82 std Z+1, r1 ; 0x01d9c: 10 82 st Z, r1res = validate(fs, fp->id); /* Check validity of the object */d9e: 68 81 ld r22, Yda0: 79 81 ldd r23, Y+1 ; 0x01da2: c6 01 movw r24, r12da4: 0e 94 43 03 call 0x686 ; 0x686 <validate>da8: 4c 01 movw r8, r24if (res) return res;daa: 89 2b or r24, r25dac: 09 f0 breq .+2 ; 0xdb0 <f_write+0x30>dae: 1a c1 rjmp .+564 ; 0xfe4 <f_write+0x264>if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */db0: 8a 81 ldd r24, Y+2 ; 0x02db2: 88 23 and r24, r24db4: 0c f4 brge .+2 ; 0xdb8 <f_write+0x38>db6: 13 c1 rjmp .+550 ; 0xfde <f_write+0x25e>if (!(fp->flag & FA_WRITE)) return FR_DENIED; /* Check access mode */db8: 81 fd sbrc r24, 1dba: 04 c0 rjmp .+8 ; 0xdc4 <f_write+0x44>dbc: e6 e0 ldi r30, 0x06 ; 6dbe: 8e 2e mov r8, r30dc0: 91 2c mov r9, r1dc2: 10 c1 rjmp .+544 ; 0xfe4 <f_write+0x264>if (fp->fsize + btw < fp->fsize) return FR_OK; /* File size cannot reach 4GB */dc4: 2a 85 ldd r18, Y+10 ; 0x0adc6: 3b 85 ldd r19, Y+11 ; 0x0bdc8: 4c 85 ldd r20, Y+12 ; 0x0cdca: 5d 85 ldd r21, Y+13 ; 0x0ddcc: c7 01 movw r24, r14dce: aa 27 eor r26, r26dd0: bb 27 eor r27, r27dd2: 82 0f add r24, r18dd4: 93 1f adc r25, r19dd6: a4 1f adc r26, r20dd8: b5 1f adc r27, r21dda: 82 17 cp r24, r18ddc: 93 07 cpc r25, r19dde: a4 07 cpc r26, r20de0: b5 07 cpc r27, r21de2: 08 f4 brcc .+2 ; 0xde6 <f_write+0x66>de4: ff c0 rjmp .+510 ; 0xfe4 <f_write+0x264>DWORD sect;WORD wcnt;CLUST clust;BYTE cc;FRESULT res;const BYTE *wbuff = buff;de6: 58 01 movw r10, r16}if (!move_window(fp->curr_sect)) /* Move sector window */goto fw_error;wcnt = 512 - (WORD)(fp->fptr % 512); /* Copy fractional bytes bytes to sector window */if (wcnt > btw) wcnt = btw;memcpy(&fs->win[(WORD)fp->fptr % 512], wbuff, wcnt);de8: 70 e2 ldi r23, 0x20 ; 32dea: 47 2e mov r4, r23dec: 51 2c mov r5, r1dee: 4c 0c add r4, r12df0: 5d 1c adc r5, r13df2: d9 c0 rjmp .+434 ; 0xfa6 <f_write+0x226>if (!(fp->flag & FA_WRITE)) return FR_DENIED; /* Check access mode */if (fp->fsize + btw < fp->fsize) return FR_OK; /* File size cannot reach 4GB */for ( ; btw; /* Repeat until all data transferred */wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) {if ((fp->fptr % 512) == 0) { /* On the sector boundary */df4: 2e 81 ldd r18, Y+6 ; 0x06df6: 3f 81 ldd r19, Y+7 ; 0x07df8: 48 85 ldd r20, Y+8 ; 0x08dfa: 59 85 ldd r21, Y+9 ; 0x09dfc: da 01 movw r26, r20dfe: c9 01 movw r24, r18e00: 91 70 andi r25, 0x01 ; 1e02: a0 70 andi r26, 0x00 ; 0e04: b0 70 andi r27, 0x00 ; 0e06: 00 97 sbiw r24, 0x00 ; 0e08: a1 05 cpc r26, r1e0a: b1 05 cpc r27, r1e0c: 09 f0 breq .+2 ; 0xe10 <f_write+0x90>e0e: 93 c0 rjmp .+294 ; 0xf36 <f_write+0x1b6>if (--(fp->sect_clust)) { /* Decrement left sector counter */e10: 8b 81 ldd r24, Y+3 ; 0x03e12: 81 50 subi r24, 0x01 ; 1e14: 8b 83 std Y+3, r24 ; 0x03e16: 88 23 and r24, r24e18: 49 f0 breq .+18 ; 0xe2c <f_write+0xac>sect = fp->curr_sect + 1; /* Get current sector */e1a: 2a 89 ldd r18, Y+18 ; 0x12e1c: 3b 89 ldd r19, Y+19 ; 0x13e1e: 4c 89 ldd r20, Y+20 ; 0x14e20: 5d 89 ldd r21, Y+21 ; 0x15e22: 2f 5f subi r18, 0xFF ; 255e24: 3f 4f sbci r19, 0xFF ; 255e26: 4f 4f sbci r20, 0xFF ; 255e28: 5f 4f sbci r21, 0xFF ; 255e2a: 30 c0 rjmp .+96 ; 0xe8c <f_write+0x10c>} else { /* On the cluster boundary, get next cluster */if (fp->fptr == 0) { /* Is top of the file */e2c: 21 15 cp r18, r1e2e: 31 05 cpc r19, r1e30: 41 05 cpc r20, r1e32: 51 05 cpc r21, r1e34: 69 f4 brne .+26 ; 0xe50 <f_write+0xd0>clust = fp->org_clust;e36: 2e 85 ldd r18, Y+14 ; 0x0ee38: 3f 85 ldd r19, Y+15 ; 0x0fif (clust == 0) /* No cluster is created yet */e3a: 21 15 cp r18, r1e3c: 31 05 cpc r19, r1e3e: 89 f4 brne .+34 ; 0xe62 <f_write+0xe2>fp->org_clust = clust = create_chain(0); /* Create a new cluster chain */e40: 80 e0 ldi r24, 0x00 ; 0e42: 90 e0 ldi r25, 0x00 ; 0e44: 0e 94 25 05 call 0xa4a ; 0xa4a <create_chain>e48: 9c 01 movw r18, r24e4a: 9f 87 std Y+15, r25 ; 0x0fe4c: 8e 87 std Y+14, r24 ; 0x0ee4e: 05 c0 rjmp .+10 ; 0xe5a <f_write+0xda>} else { /* Middle or end of file */clust = create_chain(fp->curr_clust); /* Trace or streach cluster chain */e50: 88 89 ldd r24, Y+16 ; 0x10e52: 99 89 ldd r25, Y+17 ; 0x11e54: 0e 94 25 05 call 0xa4a ; 0xa4a <create_chain>e58: 9c 01 movw r18, r24}if (clust == 0) break; /* Disk full */e5a: 21 15 cp r18, r1e5c: 31 05 cpc r19, r1e5e: 09 f4 brne .+2 ; 0xe62 <f_write+0xe2>e60: a6 c0 rjmp .+332 ; 0xfae <f_write+0x22e>if (clust == 1 || clust >= fs->max_clust) goto fw_error;e62: 21 30 cpi r18, 0x01 ; 1e64: 31 05 cpc r19, r1e66: 09 f4 brne .+2 ; 0xe6a <f_write+0xea>e68: b7 c0 rjmp .+366 ; 0xfd8 <f_write+0x258>e6a: f6 01 movw r30, r12e6c: 86 89 ldd r24, Z+22 ; 0x16e6e: 97 89 ldd r25, Z+23 ; 0x17e70: 28 17 cp r18, r24e72: 39 07 cpc r19, r25e74: 08 f0 brcs .+2 ; 0xe78 <f_write+0xf8>e76: b0 c0 rjmp .+352 ; 0xfd8 <f_write+0x258>fp->curr_clust = clust; /* Current cluster */e78: 39 8b std Y+17, r19 ; 0x11e7a: 28 8b std Y+16, r18 ; 0x10sect = clust2sect(clust); /* Get current sector */e7c: c9 01 movw r24, r18e7e: 0e 94 18 03 call 0x630 ; 0x630 <clust2sect>e82: 9b 01 movw r18, r22e84: ac 01 movw r20, r24fp->sect_clust = fs->sects_clust; /* Re-initialize the left sector counter */e86: f6 01 movw r30, r12e88: 85 8d ldd r24, Z+29 ; 0x1de8a: 8b 83 std Y+3, r24 ; 0x03}fp->curr_sect = sect; /* Update current sector */e8c: 2a 8b std Y+18, r18 ; 0x12e8e: 3b 8b std Y+19, r19 ; 0x13e90: 4c 8b std Y+20, r20 ; 0x14e92: 5d 8b std Y+21, r21 ; 0x15cc = btw / 512; /* When left bytes >= 512, */e94: 87 01 movw r16, r14e96: 01 2f mov r16, r17e98: 11 27 eor r17, r17e9a: 06 95 lsr r16if (cc) { /* Write maximum contiguous sectors directly */e9c: 00 23 and r16, r16e9e: 61 f1 breq .+88 ; 0xef8 <f_write+0x178>ea0: 8b 81 ldd r24, Y+3 ; 0x03ea2: 10 2f mov r17, r16ea4: 80 17 cp r24, r16ea6: 08 f4 brcc .+2 ; 0xeaa <f_write+0x12a>ea8: 18 2f mov r17, r24if (cc > fp->sect_clust) cc = fp->sect_clust;if (disk_write(0, wbuff, sect, cc) != RES_OK)eaa: 01 2f mov r16, r17eac: b5 01 movw r22, r10eae: 80 e0 ldi r24, 0x00 ; 0eb0: 0e 94 d3 0e call 0x1da6 ; 0x1da6 <disk_write>eb4: 89 2b or r24, r25eb6: 09 f0 breq .+2 ; 0xeba <f_write+0x13a>eb8: 8f c0 rjmp .+286 ; 0xfd8 <f_write+0x258>goto fw_error;fp->sect_clust -= cc - 1;eba: 8b 81 ldd r24, Y+3 ; 0x03ebc: 8f 5f subi r24, 0xFF ; 255ebe: 81 1b sub r24, r17ec0: 8b 83 std Y+3, r24 ; 0x03fp->curr_sect += cc - 1;ec2: 81 2f mov r24, r17ec4: 99 27 eor r25, r25ec6: 01 97 sbiw r24, 0x01 ; 1ec8: 9c 01 movw r18, r24eca: 44 27 eor r20, r20ecc: 37 fd sbrc r19, 7ece: 40 95 com r20ed0: 54 2f mov r21, r20ed2: 8c 01 movw r16, r24ed4: 0f 5f subi r16, 0xFF ; 255ed6: 1f 4f sbci r17, 0xFF ; 255ed8: 8a 89 ldd r24, Y+18 ; 0x12eda: 9b 89 ldd r25, Y+19 ; 0x13edc: ac 89 ldd r26, Y+20 ; 0x14ede: bd 89 ldd r27, Y+21 ; 0x15ee0: 82 0f add r24, r18ee2: 93 1f adc r25, r19ee4: a4 1f adc r26, r20ee6: b5 1f adc r27, r21ee8: 8a 8b std Y+18, r24 ; 0x12eea: 9b 8b std Y+19, r25 ; 0x13eec: ac 8b std Y+20, r26 ; 0x14eee: bd 8b std Y+21, r27 ; 0x15wcnt = cc * 512; continue;ef0: 10 2f mov r17, r16ef2: 00 27 eor r16, r16ef4: 11 0f add r17, r17ef6: 3d c0 rjmp .+122 ; 0xf72 <f_write+0x1f2>}if (fp->fptr >= fp->fsize) { /* Flush R/W window if needed */ef8: 2e 81 ldd r18, Y+6 ; 0x06efa: 3f 81 ldd r19, Y+7 ; 0x07efc: 48 85 ldd r20, Y+8 ; 0x08efe: 59 85 ldd r21, Y+9 ; 0x09f00: 8a 85 ldd r24, Y+10 ; 0x0af02: 9b 85 ldd r25, Y+11 ; 0x0bf04: ac 85 ldd r26, Y+12 ; 0x0cf06: bd 85 ldd r27, Y+13 ; 0x0df08: 28 17 cp r18, r24f0a: 39 07 cpc r19, r25f0c: 4a 07 cpc r20, r26f0e: 5b 07 cpc r21, r27f10: 90 f0 brcs .+36 ; 0xf36 <f_write+0x1b6>if (!move_window(0)) goto fw_error;f12: 60 e0 ldi r22, 0x00 ; 0f14: 70 e0 ldi r23, 0x00 ; 0f16: 80 e0 ldi r24, 0x00 ; 0f18: 90 e0 ldi r25, 0x00 ; 0f1a: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>f1e: 88 23 and r24, r24f20: 09 f4 brne .+2 ; 0xf24 <f_write+0x1a4>f22: 5a c0 rjmp .+180 ; 0xfd8 <f_write+0x258>fs->winsect = fp->curr_sect;f24: 8a 89 ldd r24, Y+18 ; 0x12f26: 9b 89 ldd r25, Y+19 ; 0x13f28: ac 89 ldd r26, Y+20 ; 0x14f2a: bd 89 ldd r27, Y+21 ; 0x15f2c: f6 01 movw r30, r12f2e: 84 83 std Z+4, r24 ; 0x04f30: 95 83 std Z+5, r25 ; 0x05f32: a6 83 std Z+6, r26 ; 0x06f34: b7 83 std Z+7, r27 ; 0x07}}if (!move_window(fp->curr_sect)) /* Move sector window */f36: 6a 89 ldd r22, Y+18 ; 0x12f38: 7b 89 ldd r23, Y+19 ; 0x13f3a: 8c 89 ldd r24, Y+20 ; 0x14f3c: 9d 89 ldd r25, Y+21 ; 0x15f3e: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>f42: 88 23 and r24, r24f44: 09 f4 brne .+2 ; 0xf48 <f_write+0x1c8>f46: 48 c0 rjmp .+144 ; 0xfd8 <f_write+0x258>goto fw_error;wcnt = 512 - (WORD)(fp->fptr % 512); /* Copy fractional bytes bytes to sector window */f48: 8e 81 ldd r24, Y+6 ; 0x06f4a: 9f 81 ldd r25, Y+7 ; 0x07f4c: 91 70 andi r25, 0x01 ; 1f4e: 20 e0 ldi r18, 0x00 ; 0f50: 32 e0 ldi r19, 0x02 ; 2f52: 28 1b sub r18, r24f54: 39 0b sbc r19, r25f56: 87 01 movw r16, r14f58: 2e 15 cp r18, r14f5a: 3f 05 cpc r19, r15f5c: 08 f4 brcc .+2 ; 0xf60 <f_write+0x1e0>f5e: 89 01 movw r16, r18if (wcnt > btw) wcnt = btw;memcpy(&fs->win[(WORD)fp->fptr % 512], wbuff, wcnt);f60: a8 01 movw r20, r16f62: b5 01 movw r22, r10f64: 84 0d add r24, r4f66: 95 1d adc r25, r5f68: 0e 94 a1 10 call 0x2142 ; 0x2142 <memcpy>fs->winflag = 1;f6c: 81 e0 ldi r24, 0x01 ; 1f6e: f6 01 movw r30, r12f70: 87 8f std Z+31, r24 ; 0x1fif (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */if (!(fp->flag & FA_WRITE)) return FR_DENIED; /* Check access mode */if (fp->fsize + btw < fp->fsize) return FR_OK; /* File size cannot reach 4GB */for ( ; btw; /* Repeat until all data transferred */wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) {f72: a0 0e add r10, r16f74: b1 1e adc r11, r17f76: c8 01 movw r24, r16f78: aa 27 eor r26, r26f7a: bb 27 eor r27, r27f7c: 2e 81 ldd r18, Y+6 ; 0x06f7e: 3f 81 ldd r19, Y+7 ; 0x07f80: 48 85 ldd r20, Y+8 ; 0x08f82: 59 85 ldd r21, Y+9 ; 0x09f84: 28 0f add r18, r24f86: 39 1f adc r19, r25f88: 4a 1f adc r20, r26f8a: 5b 1f adc r21, r27f8c: 2e 83 std Y+6, r18 ; 0x06f8e: 3f 83 std Y+7, r19 ; 0x07f90: 48 87 std Y+8, r20 ; 0x08f92: 59 87 std Y+9, r21 ; 0x09f94: f3 01 movw r30, r6f96: 80 81 ld r24, Zf98: 91 81 ldd r25, Z+1 ; 0x01f9a: 80 0f add r24, r16f9c: 91 1f adc r25, r17f9e: 91 83 std Z+1, r25 ; 0x01fa0: 80 83 st Z, r24fa2: e0 1a sub r14, r16fa4: f1 0a sbc r15, r17if (res) return res;if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */if (!(fp->flag & FA_WRITE)) return FR_DENIED; /* Check access mode */if (fp->fsize + btw < fp->fsize) return FR_OK; /* File size cannot reach 4GB */for ( ; btw; /* Repeat until all data transferred */fa6: e1 14 cp r14, r1fa8: f1 04 cpc r15, r1faa: 09 f0 breq .+2 ; 0xfae <f_write+0x22e>fac: 23 cf rjmp .-442 ; 0xdf4 <f_write+0x74>if (wcnt > btw) wcnt = btw;memcpy(&fs->win[(WORD)fp->fptr % 512], wbuff, wcnt);fs->winflag = 1;}if (fp->fptr > fp->fsize) fp->fsize = fp->fptr; /* Update file size if needed */fae: 2e 81 ldd r18, Y+6 ; 0x06fb0: 3f 81 ldd r19, Y+7 ; 0x07fb2: 48 85 ldd r20, Y+8 ; 0x08fb4: 59 85 ldd r21, Y+9 ; 0x09fb6: 8a 85 ldd r24, Y+10 ; 0x0afb8: 9b 85 ldd r25, Y+11 ; 0x0bfba: ac 85 ldd r26, Y+12 ; 0x0cfbc: bd 85 ldd r27, Y+13 ; 0x0dfbe: 82 17 cp r24, r18fc0: 93 07 cpc r25, r19fc2: a4 07 cpc r26, r20fc4: b5 07 cpc r27, r21fc6: 20 f4 brcc .+8 ; 0xfd0 <f_write+0x250>fc8: 2a 87 std Y+10, r18 ; 0x0afca: 3b 87 std Y+11, r19 ; 0x0bfcc: 4c 87 std Y+12, r20 ; 0x0cfce: 5d 87 std Y+13, r21 ; 0x0dfp->flag |= FA__WRITTEN; /* Set file changed flag */fd0: 8a 81 ldd r24, Y+2 ; 0x02fd2: 80 62 ori r24, 0x20 ; 32fd4: 8a 83 std Y+2, r24 ; 0x02fd6: 06 c0 rjmp .+12 ; 0xfe4 <f_write+0x264>return FR_OK;fw_error: /* Abort this function due to an unrecoverable error */fp->flag |= FA__ERROR;fd8: 8a 81 ldd r24, Y+2 ; 0x02fda: 80 68 ori r24, 0x80 ; 128fdc: 8a 83 std Y+2, r24 ; 0x02fde: 28 e0 ldi r18, 0x08 ; 8fe0: 82 2e mov r8, r18fe2: 91 2c mov r9, r1return FR_RW_ERROR;}fe4: c4 01 movw r24, r8fe6: e0 e1 ldi r30, 0x10 ; 16fe8: cd b7 in r28, 0x3d ; 61fea: de b7 in r29, 0x3e ; 62fec: 0c 94 48 11 jmp 0x2290 ; 0x2290 <__epilogue_restores__+0x4>00000ff0 <f_read>:FIL *fp, /* Pointer to the file object */void *buff, /* Pointer to data buffer */WORD btr, /* Number of bytes to read */WORD *br /* Pointer to number of bytes read */){ff0: a0 e0 ldi r26, 0x00 ; 0ff2: b0 e0 ldi r27, 0x00 ; 0ff4: ee ef ldi r30, 0xFE ; 254ff6: f7 e0 ldi r31, 0x07 ; 7ff8: 0c 94 2c 11 jmp 0x2258 ; 0x2258 <__prologue_saves__+0x4>ffc: ec 01 movw r28, r24ffe: 8b 01 movw r16, r221000: 7a 01 movw r14, r201002: 39 01 movw r6, r18DWORD sect, remain;WORD rcnt;CLUST clust;BYTE cc, *rbuff = buff;FRESULT res;FATFS *fs = fp->fs;1004: 8c 80 ldd r8, Y+4 ; 0x041006: 9d 80 ldd r9, Y+5 ; 0x05*br = 0;1008: f9 01 movw r30, r18100a: 11 82 std Z+1, r1 ; 0x01100c: 10 82 st Z, r1res = validate(fs, fp->id); /* Check validity of the object */100e: 68 81 ld r22, Y1010: 79 81 ldd r23, Y+1 ; 0x011012: c4 01 movw r24, r81014: 0e 94 43 03 call 0x686 ; 0x686 <validate>1018: 5c 01 movw r10, r24if (res) return res;101a: 89 2b or r24, r25101c: 09 f0 breq .+2 ; 0x1020 <f_read+0x30>101e: d9 c0 rjmp .+434 ; 0x11d2 <f_read+0x1e2>if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */1020: 8a 81 ldd r24, Y+2 ; 0x021022: 88 23 and r24, r241024: 0c f4 brge .+2 ; 0x1028 <f_read+0x38>1026: d2 c0 rjmp .+420 ; 0x11cc <f_read+0x1dc>if (!(fp->flag & FA_READ)) return FR_DENIED; /* Check access mode */1028: 80 fd sbrc r24, 0102a: 04 c0 rjmp .+8 ; 0x1034 <f_read+0x44>102c: 06 e0 ldi r16, 0x06 ; 6102e: a0 2e mov r10, r161030: b1 2c mov r11, r11032: cf c0 rjmp .+414 ; 0x11d2 <f_read+0x1e2>remain = fp->fsize - fp->fptr;1034: 2a 85 ldd r18, Y+10 ; 0x0a1036: 3b 85 ldd r19, Y+11 ; 0x0b1038: 4c 85 ldd r20, Y+12 ; 0x0c103a: 5d 85 ldd r21, Y+13 ; 0x0d103c: 8e 81 ldd r24, Y+6 ; 0x06103e: 9f 81 ldd r25, Y+7 ; 0x071040: a8 85 ldd r26, Y+8 ; 0x081042: b9 85 ldd r27, Y+9 ; 0x091044: 28 1b sub r18, r241046: 39 0b sbc r19, r251048: 4a 0b sbc r20, r26104a: 5b 0b sbc r21, r27if (btr > remain) btr = (WORD)remain; /* Truncate read count by number of bytes left */104c: c7 01 movw r24, r14104e: aa 27 eor r26, r261050: bb 27 eor r27, r271052: 28 17 cp r18, r241054: 39 07 cpc r19, r251056: 4a 07 cpc r20, r261058: 5b 07 cpc r21, r27105a: 08 f4 brcc .+2 ; 0x105e <f_read+0x6e>105c: 79 01 movw r14, r18){DWORD sect, remain;WORD rcnt;CLUST clust;BYTE cc, *rbuff = buff;105e: 68 01 movw r12, r16}}if (!move_window(fp->curr_sect)) goto fr_error; /* Move sector window */rcnt = 512 - (WORD)(fp->fptr % 512); /* Copy fractional bytes from sector window */if (rcnt > btr) rcnt = btr;memcpy(rbuff, &fs->win[(WORD)fp->fptr % 512], rcnt);1060: 10 e2 ldi r17, 0x20 ; 321062: 41 2e mov r4, r171064: 51 2c mov r5, r11066: 48 0c add r4, r81068: 59 1c adc r5, r9106a: a8 c0 rjmp .+336 ; 0x11bc <f_read+0x1cc>remain = fp->fsize - fp->fptr;if (btr > remain) btr = (WORD)remain; /* Truncate read count by number of bytes left */for ( ; btr; /* Repeat until all data transferred */rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {if ((fp->fptr % 512) == 0) { /* On the sector boundary */106c: 2e 81 ldd r18, Y+6 ; 0x06106e: 3f 81 ldd r19, Y+7 ; 0x071070: 48 85 ldd r20, Y+8 ; 0x081072: 59 85 ldd r21, Y+9 ; 0x091074: da 01 movw r26, r201076: c9 01 movw r24, r181078: 91 70 andi r25, 0x01 ; 1107a: a0 70 andi r26, 0x00 ; 0107c: b0 70 andi r27, 0x00 ; 0107e: 00 97 sbiw r24, 0x00 ; 01080: a1 05 cpc r26, r11082: b1 05 cpc r27, r11084: 09 f0 breq .+2 ; 0x1088 <f_read+0x98>1086: 66 c0 rjmp .+204 ; 0x1154 <f_read+0x164>if (--fp->sect_clust) { /* Decrement left sector counter */1088: 8b 81 ldd r24, Y+3 ; 0x03108a: 81 50 subi r24, 0x01 ; 1108c: 8b 83 std Y+3, r24 ; 0x03108e: 88 23 and r24, r241090: 49 f0 breq .+18 ; 0x10a4 <f_read+0xb4>sect = fp->curr_sect + 1; /* Get current sector */1092: 2a 89 ldd r18, Y+18 ; 0x121094: 3b 89 ldd r19, Y+19 ; 0x131096: 4c 89 ldd r20, Y+20 ; 0x141098: 5d 89 ldd r21, Y+21 ; 0x15109a: 2f 5f subi r18, 0xFF ; 255109c: 3f 4f sbci r19, 0xFF ; 255109e: 4f 4f sbci r20, 0xFF ; 25510a0: 5f 4f sbci r21, 0xFF ; 25510a2: 22 c0 rjmp .+68 ; 0x10e8 <f_read+0xf8>} else { /* On the cluster boundary, get next cluster */clust = (fp->fptr == 0) ?10a4: 21 15 cp r18, r110a6: 31 05 cpc r19, r110a8: 41 05 cpc r20, r110aa: 51 05 cpc r21, r110ac: 19 f4 brne .+6 ; 0x10b4 <f_read+0xc4>10ae: 2e 85 ldd r18, Y+14 ; 0x0e10b0: 3f 85 ldd r19, Y+15 ; 0x0f10b2: 05 c0 rjmp .+10 ; 0x10be <f_read+0xce>10b4: 88 89 ldd r24, Y+16 ; 0x1010b6: 99 89 ldd r25, Y+17 ; 0x1110b8: 0e 94 4f 04 call 0x89e ; 0x89e <get_cluster>10bc: 9c 01 movw r18, r24fp->org_clust : get_cluster(fp->curr_clust);if (clust < 2 || clust >= fs->max_clust)10be: 22 30 cpi r18, 0x02 ; 210c0: 31 05 cpc r19, r110c2: 08 f4 brcc .+2 ; 0x10c6 <f_read+0xd6>10c4: 80 c0 rjmp .+256 ; 0x11c6 <f_read+0x1d6>10c6: f4 01 movw r30, r810c8: 86 89 ldd r24, Z+22 ; 0x1610ca: 97 89 ldd r25, Z+23 ; 0x1710cc: 28 17 cp r18, r2410ce: 39 07 cpc r19, r2510d0: 08 f0 brcs .+2 ; 0x10d4 <f_read+0xe4>10d2: 79 c0 rjmp .+242 ; 0x11c6 <f_read+0x1d6>goto fr_error;fp->curr_clust = clust; /* Current cluster */10d4: 39 8b std Y+17, r19 ; 0x1110d6: 28 8b std Y+16, r18 ; 0x10sect = clust2sect(clust); /* Get current sector */10d8: c9 01 movw r24, r1810da: 0e 94 18 03 call 0x630 ; 0x630 <clust2sect>10de: 9b 01 movw r18, r2210e0: ac 01 movw r20, r24fp->sect_clust = fs->sects_clust; /* Re-initialize the left sector counter */10e2: f4 01 movw r30, r810e4: 85 8d ldd r24, Z+29 ; 0x1d10e6: 8b 83 std Y+3, r24 ; 0x03}fp->curr_sect = sect; /* Update current sector */10e8: 2a 8b std Y+18, r18 ; 0x1210ea: 3b 8b std Y+19, r19 ; 0x1310ec: 4c 8b std Y+20, r20 ; 0x1410ee: 5d 8b std Y+21, r21 ; 0x15cc = btr / 512; /* When left bytes >= 512, */10f0: 87 01 movw r16, r1410f2: 01 2f mov r16, r1710f4: 11 27 eor r17, r1710f6: 06 95 lsr r16if (cc) { /* Read maximum contiguous sectors directly */10f8: 00 23 and r16, r1610fa: 61 f1 breq .+88 ; 0x1154 <f_read+0x164>10fc: 8b 81 ldd r24, Y+3 ; 0x0310fe: 10 2f mov r17, r161100: 80 17 cp r24, r161102: 08 f4 brcc .+2 ; 0x1106 <f_read+0x116>1104: 18 2f mov r17, r24if (cc > fp->sect_clust) cc = fp->sect_clust;if (disk_read(0, rbuff, sect, cc) != RES_OK)1106: 01 2f mov r16, r171108: b6 01 movw r22, r12110a: 80 e0 ldi r24, 0x00 ; 0110c: 0e 94 51 0f call 0x1ea2 ; 0x1ea2 <disk_read>1110: 89 2b or r24, r251112: 09 f0 breq .+2 ; 0x1116 <f_read+0x126>1114: 58 c0 rjmp .+176 ; 0x11c6 <f_read+0x1d6>goto fr_error;fp->sect_clust -= cc - 1;1116: 8b 81 ldd r24, Y+3 ; 0x031118: 8f 5f subi r24, 0xFF ; 255111a: 81 1b sub r24, r17111c: 8b 83 std Y+3, r24 ; 0x03fp->curr_sect += cc - 1;111e: 81 2f mov r24, r171120: 99 27 eor r25, r251122: 01 97 sbiw r24, 0x01 ; 11124: 9c 01 movw r18, r241126: 44 27 eor r20, r201128: 37 fd sbrc r19, 7112a: 40 95 com r20112c: 54 2f mov r21, r20112e: 8c 01 movw r16, r241130: 0f 5f subi r16, 0xFF ; 2551132: 1f 4f sbci r17, 0xFF ; 2551134: 8a 89 ldd r24, Y+18 ; 0x121136: 9b 89 ldd r25, Y+19 ; 0x131138: ac 89 ldd r26, Y+20 ; 0x14113a: bd 89 ldd r27, Y+21 ; 0x15113c: 82 0f add r24, r18113e: 93 1f adc r25, r191140: a4 1f adc r26, r201142: b5 1f adc r27, r211144: 8a 8b std Y+18, r24 ; 0x121146: 9b 8b std Y+19, r25 ; 0x131148: ac 8b std Y+20, r26 ; 0x14114a: bd 8b std Y+21, r27 ; 0x15rcnt = cc * 512; continue;114c: 10 2f mov r17, r16114e: 00 27 eor r16, r161150: 11 0f add r17, r171152: 1a c0 rjmp .+52 ; 0x1188 <f_read+0x198>}}if (!move_window(fp->curr_sect)) goto fr_error; /* Move sector window */1154: 6a 89 ldd r22, Y+18 ; 0x121156: 7b 89 ldd r23, Y+19 ; 0x131158: 8c 89 ldd r24, Y+20 ; 0x14115a: 9d 89 ldd r25, Y+21 ; 0x15115c: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>1160: 88 23 and r24, r241162: 89 f1 breq .+98 ; 0x11c6 <f_read+0x1d6>rcnt = 512 - (WORD)(fp->fptr % 512); /* Copy fractional bytes from sector window */1164: 6e 81 ldd r22, Y+6 ; 0x061166: 7f 81 ldd r23, Y+7 ; 0x071168: 71 70 andi r23, 0x01 ; 1116a: 80 e0 ldi r24, 0x00 ; 0116c: 92 e0 ldi r25, 0x02 ; 2116e: 86 1b sub r24, r221170: 97 0b sbc r25, r231172: 87 01 movw r16, r141174: 8e 15 cp r24, r141176: 9f 05 cpc r25, r151178: 08 f4 brcc .+2 ; 0x117c <f_read+0x18c>117a: 8c 01 movw r16, r24if (rcnt > btr) rcnt = btr;memcpy(rbuff, &fs->win[(WORD)fp->fptr % 512], rcnt);117c: 64 0d add r22, r4117e: 75 1d adc r23, r51180: a8 01 movw r20, r161182: c6 01 movw r24, r121184: 0e 94 a1 10 call 0x2142 ; 0x2142 <memcpy>if (!(fp->flag & FA_READ)) return FR_DENIED; /* Check access mode */remain = fp->fsize - fp->fptr;if (btr > remain) btr = (WORD)remain; /* Truncate read count by number of bytes left */for ( ; btr; /* Repeat until all data transferred */rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {1188: c0 0e add r12, r16118a: d1 1e adc r13, r17118c: c8 01 movw r24, r16118e: aa 27 eor r26, r261190: bb 27 eor r27, r271192: 2e 81 ldd r18, Y+6 ; 0x061194: 3f 81 ldd r19, Y+7 ; 0x071196: 48 85 ldd r20, Y+8 ; 0x081198: 59 85 ldd r21, Y+9 ; 0x09119a: 28 0f add r18, r24119c: 39 1f adc r19, r25119e: 4a 1f adc r20, r2611a0: 5b 1f adc r21, r2711a2: 2e 83 std Y+6, r18 ; 0x0611a4: 3f 83 std Y+7, r19 ; 0x0711a6: 48 87 std Y+8, r20 ; 0x0811a8: 59 87 std Y+9, r21 ; 0x0911aa: f3 01 movw r30, r611ac: 80 81 ld r24, Z11ae: 91 81 ldd r25, Z+1 ; 0x0111b0: 80 0f add r24, r1611b2: 91 1f adc r25, r1711b4: 91 83 std Z+1, r25 ; 0x0111b6: 80 83 st Z, r2411b8: e0 1a sub r14, r1611ba: f1 0a sbc r15, r17if (fp->flag & FA__ERROR) return FR_RW_ERROR; /* Check error flag */if (!(fp->flag & FA_READ)) return FR_DENIED; /* Check access mode */remain = fp->fsize - fp->fptr;if (btr > remain) btr = (WORD)remain; /* Truncate read count by number of bytes left */for ( ; btr; /* Repeat until all data transferred */11bc: e1 14 cp r14, r111be: f1 04 cpc r15, r111c0: 09 f0 breq .+2 ; 0x11c4 <f_read+0x1d4>11c2: 54 cf rjmp .-344 ; 0x106c <f_read+0x7c>11c4: 06 c0 rjmp .+12 ; 0x11d2 <f_read+0x1e2>}return FR_OK;fr_error: /* Abort this function due to an unrecoverable error */fp->flag |= FA__ERROR;11c6: 8a 81 ldd r24, Y+2 ; 0x0211c8: 80 68 ori r24, 0x80 ; 12811ca: 8a 83 std Y+2, r24 ; 0x0211cc: f8 e0 ldi r31, 0x08 ; 811ce: af 2e mov r10, r3111d0: b1 2c mov r11, r1return FR_RW_ERROR;}11d2: c5 01 movw r24, r1011d4: e0 e1 ldi r30, 0x10 ; 1611d6: cd b7 in r28, 0x3d ; 6111d8: de b7 in r29, 0x3e ; 6211da: 0c 94 48 11 jmp 0x2290 ; 0x2290 <__epilogue_restores__+0x4>000011de <f_mount>:FRESULT f_mount (BYTE drv, /* Logical drive number to be mounted/unmounted */FATFS *fs /* Pointer to new file system object (NULL for unmount)*/){11de: fb 01 movw r30, r22FATFS *fsobj;if (drv) return FR_INVALID_DRIVE;11e0: 88 23 and r24, r2411e2: 19 f0 breq .+6 ; 0x11ea <f_mount+0xc>11e4: 85 e0 ldi r24, 0x05 ; 511e6: 90 e0 ldi r25, 0x00 ; 011e8: 08 95 retfsobj = FatFs;11ea: a0 91 0a 01 lds r26, 0x010A11ee: b0 91 0b 01 lds r27, 0x010BFatFs = fs;11f2: 70 93 0b 01 sts 0x010B, r2311f6: 60 93 0a 01 sts 0x010A, r22if (fsobj) memset(fsobj, 0, sizeof(FATFS));11fa: 10 97 sbiw r26, 0x00 ; 011fc: 29 f0 breq .+10 ; 0x1208 <f_mount+0x2a>11fe: 80 e2 ldi r24, 0x20 ; 321200: 92 e0 ldi r25, 0x02 ; 21202: 1d 92 st X+, r11204: 01 97 sbiw r24, 0x01 ; 11206: e9 f7 brne .-6 ; 0x1202 <f_mount+0x24>if (fs) memset(fs, 0, sizeof(FATFS));1208: 30 97 sbiw r30, 0x00 ; 0120a: 19 f4 brne .+6 ; 0x1212 <f_mount+0x34>120c: 80 e0 ldi r24, 0x00 ; 0120e: 90 e0 ldi r25, 0x00 ; 01210: 08 95 ret1212: 80 e2 ldi r24, 0x20 ; 321214: 92 e0 ldi r25, 0x02 ; 21216: 11 92 st Z+, r11218: 01 97 sbiw r24, 0x01 ; 1121a: e9 f7 brne .-6 ; 0x1216 <f_mount+0x38>121c: 80 e0 ldi r24, 0x00 ; 0121e: 90 e0 ldi r25, 0x00 ; 0return FR_OK;}1220: 08 95 ret00001222 <check_fs>:staticBYTE check_fs ( /* 0:The FAT boot record, 1:Valid boot record but not an FAT, 2:Not a boot record or error */DWORD sect /* Sector# to check if it is a FAT boot record or not */){1222: 0f 93 push r161224: cf 93 push r281226: df 93 push r291228: 9b 01 movw r18, r22122a: ac 01 movw r20, r24FATFS *fs = FatFs;122c: c0 91 0a 01 lds r28, 0x010A1230: d0 91 0b 01 lds r29, 0x010Bif (disk_read(0, fs->win, sect, 1) != RES_OK) /* Load boot record */1234: be 01 movw r22, r281236: 60 5e subi r22, 0xE0 ; 2241238: 7f 4f sbci r23, 0xFF ; 255123a: 01 e0 ldi r16, 0x01 ; 1123c: 80 e0 ldi r24, 0x00 ; 0123e: 0e 94 51 0f call 0x1ea2 ; 0x1ea2 <disk_read>1242: 89 2b or r24, r251244: d9 f4 brne .+54 ; 0x127c <check_fs+0x5a>return 2;if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature */1246: c2 5e subi r28, 0xE2 ; 2261248: dd 4f sbci r29, 0xFD ; 253124a: 88 81 ld r24, Y124c: 99 81 ldd r25, Y+1 ; 0x01124e: ce 51 subi r28, 0x1E ; 301250: d2 40 sbci r29, 0x02 ; 21252: 85 55 subi r24, 0x55 ; 851254: 9a 4a sbci r25, 0xAA ; 1701256: 91 f4 brne .+36 ; 0x127c <check_fs+0x5a>1258: 00 e0 ldi r16, 0x00 ; 0return 2;if (!memcmp(&fs->win[BS_FilSysType], "FAT", 3)) /* Check FAT signature */125a: 43 e0 ldi r20, 0x03 ; 3125c: 50 e0 ldi r21, 0x00 ; 0125e: 60 e0 ldi r22, 0x00 ; 01260: 71 e0 ldi r23, 0x01 ; 11262: ce 01 movw r24, r281264: 8a 5a subi r24, 0xAA ; 1701266: 9f 4f sbci r25, 0xFF ; 2551268: 0e 94 94 10 call 0x2128 ; 0x2128 <memcmp>126c: 89 2b or r24, r25126e: 09 f4 brne .+2 ; 0x1272 <check_fs+0x50>1270: 01 e0 ldi r16, 0x01 ; 11272: 81 e0 ldi r24, 0x01 ; 11274: 08 27 eor r16, r241276: 80 2f mov r24, r161278: 99 27 eor r25, r25127a: 02 c0 rjmp .+4 ; 0x1280 <check_fs+0x5e>127c: 82 e0 ldi r24, 0x02 ; 2127e: 90 e0 ldi r25, 0x00 ; 01280: df 91 pop r291282: cf 91 pop r281284: 0f 91 pop r161286: 08 95 ret00001288 <f_open>:FRESULT f_open (FIL *fp, /* Pointer to the blank file object */const char *path, /* Pointer to the file name */BYTE mode /* Access mode and file open mode flags */){1288: ad e1 ldi r26, 0x1D ; 29128a: b0 e0 ldi r27, 0x00 ; 0128c: ea e4 ldi r30, 0x4A ; 74128e: f9 e0 ldi r31, 0x09 ; 91290: 0c 94 2a 11 jmp 0x2254 ; 0x2254 <__prologue_saves__>1294: 9d 8f std Y+29, r25 ; 0x1d1296: 8c 8f std Y+28, r24 ; 0x1c1298: 6b 01 movw r12, r22FRESULT res;BYTE *dir;DIR dirobj;char fn[8+3+1];FATFS *fs = FatFs;129a: a0 90 0a 01 lds r10, 0x010A129e: b0 90 0b 01 lds r11, 0x010Bfp->fs = NULL;12a2: fc 01 movw r30, r2412a4: 15 82 std Z+5, r1 ; 0x0512a6: 14 82 std Z+4, r1 ; 0x04#if !_FS_READONLYmode &= (FA_READ|FA_WRITE|FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW);12a8: f4 2f mov r31, r2012aa: ff 71 andi r31, 0x1F ; 3112ac: fb 8f std Y+27, r31 ; 0x1b12ae: 03 c0 rjmp .+6 ; 0x12b6 <f_open+0x2e>const char *p = *path;FATFS *fs = FatFs;while (*p == ' ') p++; /* Strip leading spaces */12b0: 08 94 sec12b2: c1 1c adc r12, r112b4: d1 1c adc r13, r112b6: d6 01 movw r26, r1212b8: 8c 91 ld r24, X12ba: 80 32 cpi r24, 0x20 ; 3212bc: c9 f3 breq .-14 ; 0x12b0 <f_open+0x28>if (*p == '/') p++; /* Strip heading slash */12be: 8f 32 cpi r24, 0x2F ; 4712c0: 19 f4 brne .+6 ; 0x12c8 <f_open+0x40>12c2: 08 94 sec12c4: c1 1c adc r12, r112c6: d1 1c adc r13, r1*path = p; /* Return pointer to the path name *//* Is the file system object registered? */if (!fs) return FR_NOT_ENABLED;12c8: a1 14 cp r10, r112ca: b1 04 cpc r11, r112cc: 09 f4 brne .+2 ; 0x12d0 <f_open+0x48>12ce: 15 c1 rjmp .+554 ; 0x14fa <f_open+0x272>fp->fs = NULL;#if !_FS_READONLYmode &= (FA_READ|FA_WRITE|FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW);res = auto_mount(&path, (BYTE)(mode & (FA_WRITE|FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW)));12d0: 1b 8d ldd r17, Y+27 ; 0x1b12d2: 1e 71 andi r17, 0x1E ; 30/* Is the file system object registered? */if (!fs) return FR_NOT_ENABLED;/* Chekck if the logical drive has been mounted or not */if (fs->fs_type) {12d4: f5 01 movw r30, r1012d6: 84 8d ldd r24, Z+28 ; 0x1c12d8: 88 23 and r24, r2412da: 61 f0 breq .+24 ; 0x12f4 <f_open+0x6c>stat = disk_status(0);12dc: 80 e0 ldi r24, 0x00 ; 012de: 0e 94 bf 0d call 0x1b7e ; 0x1b7e <disk_status>if (!(stat & STA_NOINIT)) { /* If the physical drive is kept initialized */12e2: 99 27 eor r25, r2512e4: 80 fd sbrc r24, 012e6: 06 c0 rjmp .+12 ; 0x12f4 <f_open+0x6c>#if !_FS_READONLYif (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */12e8: 11 23 and r17, r1712ea: 09 f4 brne .+2 ; 0x12ee <f_open+0x66>12ec: 29 c3 rjmp .+1618 ; 0x1940 <f_open+0x6b8>12ee: 82 fd sbrc r24, 212f0: 07 c1 rjmp .+526 ; 0x1500 <f_open+0x278>12f2: 26 c3 rjmp .+1612 ; 0x1940 <f_open+0x6b8>}}/* The logical drive has not been mounted, following code attempts to mount the logical drive */memset(fs, 0, sizeof(FATFS)); /* Clean-up the file system object */12f4: 80 e2 ldi r24, 0x20 ; 3212f6: 92 e0 ldi r25, 0x02 ; 212f8: d5 01 movw r26, r1012fa: 1d 92 st X+, r112fc: 01 97 sbiw r24, 0x01 ; 112fe: e9 f7 brne .-6 ; 0x12fa <f_open+0x72>stat = disk_initialize(0); /* Initialize low level disk I/O layer */1300: 80 e0 ldi r24, 0x00 ; 01302: 0e 94 ae 0f call 0x1f5c ; 0x1f5c <disk_initialize>if (stat & STA_NOINIT) /* Check if the drive is ready */1306: 99 27 eor r25, r251308: 80 ff sbrs r24, 0130a: 03 c0 rjmp .+6 ; 0x1312 <f_open+0x8a>130c: 21 e0 ldi r18, 0x01 ; 1130e: 30 e0 ldi r19, 0x00 ; 01310: 45 c3 rjmp .+1674 ; 0x199c <f_open+0x714>return FR_NOT_READY;#if !_FS_READONLYif (chk_wp && (stat & STA_PROTECT)) /* Check write protection if needed */1312: 11 23 and r17, r171314: 11 f0 breq .+4 ; 0x131a <f_open+0x92>1316: 82 fd sbrc r24, 21318: f3 c0 rjmp .+486 ; 0x1500 <f_open+0x278>return FR_WRITE_PROTECTED;#endif/* Search FAT partition on the drive */fmt = check_fs(bootsect = 0); /* Check sector 0 as an SFD format */131a: 60 e0 ldi r22, 0x00 ; 0131c: 70 e0 ldi r23, 0x00 ; 0131e: 80 e0 ldi r24, 0x00 ; 01320: 90 e0 ldi r25, 0x00 ; 01322: 0e 94 11 09 call 0x1222 ; 0x1222 <check_fs>if (fmt == 1) { /* Not a FAT boot record, it may be patitioned */1326: 81 30 cpi r24, 0x01 ; 11328: 21 f0 breq .+8 ; 0x1332 <f_open+0xaa>132a: ee 24 eor r14, r14132c: ff 24 eor r15, r15132e: 87 01 movw r16, r141330: 1e c0 rjmp .+60 ; 0x136e <f_open+0xe6>/* Check a partition listed in top of the partition table */if (fs->win[MBR_Table+4]) { /* Is the 1st partition existing? */1332: e2 ee ldi r30, 0xE2 ; 2261334: f1 e0 ldi r31, 0x01 ; 11336: ae 0e add r10, r301338: bf 1e adc r11, r31133a: d5 01 movw r26, r10133c: 8c 91 ld r24, X133e: ee e1 ldi r30, 0x1E ; 301340: fe ef ldi r31, 0xFE ; 2541342: ae 0e add r10, r301344: bf 1e adc r11, r311346: 88 23 and r24, r241348: 09 f4 brne .+2 ; 0x134c <f_open+0xc4>134a: dd c0 rjmp .+442 ; 0x1506 <f_open+0x27e>bootsect = LD_DWORD(&fs->win[MBR_Table+8]); /* Partition offset in LBA */134c: 26 ee ldi r18, 0xE6 ; 230134e: 31 e0 ldi r19, 0x01 ; 11350: a2 0e add r10, r181352: b3 1e adc r11, r191354: d5 01 movw r26, r101356: ed 90 ld r14, X+1358: fd 90 ld r15, X+135a: 0d 91 ld r16, X+135c: 1c 91 ld r17, X135e: ea e1 ldi r30, 0x1A ; 261360: fe ef ldi r31, 0xFE ; 2541362: ae 0e add r10, r301364: bf 1e adc r11, r31fmt = check_fs(bootsect); /* Check the partition */1366: c8 01 movw r24, r161368: b7 01 movw r22, r14136a: 0e 94 11 09 call 0x1222 ; 0x1222 <check_fs>}}if (fmt || LD_WORD(&fs->win[BPB_BytsPerSec]) != 512) /* No valid FAT patition is found */136e: 88 23 and r24, r241370: 09 f0 breq .+2 ; 0x1374 <f_open+0xec>1372: c9 c0 rjmp .+402 ; 0x1506 <f_open+0x27e>1374: f5 01 movw r30, r101376: 83 a5 ldd r24, Z+43 ; 0x2b1378: 94 a5 ldd r25, Z+44 ; 0x2c137a: 80 50 subi r24, 0x00 ; 0137c: 92 40 sbci r25, 0x02 ; 2137e: 09 f0 breq .+2 ; 0x1382 <f_open+0xfa>1380: c2 c0 rjmp .+388 ; 0x1506 <f_open+0x27e>return FR_NO_FILESYSTEM;/* Initialize the file system object */fatsize = LD_WORD(&fs->win[BPB_FATSz16]); /* Number of sectors per FAT */1382: f5 01 movw r30, r101384: 66 a9 ldd r22, Z+54 ; 0x361386: 77 a9 ldd r23, Z+55 ; 0x37if (!fatsize) fatsize = LD_DWORD(&fs->win[BPB_FATSz32]);1388: 61 15 cp r22, r1138a: 71 05 cpc r23, r1138c: 19 f0 breq .+6 ; 0x1394 <f_open+0x10c>}if (fmt || LD_WORD(&fs->win[BPB_BytsPerSec]) != 512) /* No valid FAT patition is found */return FR_NO_FILESYSTEM;/* Initialize the file system object */fatsize = LD_WORD(&fs->win[BPB_FATSz16]); /* Number of sectors per FAT */138e: 88 27 eor r24, r241390: 99 27 eor r25, r251392: 0d c0 rjmp .+26 ; 0x13ae <f_open+0x126>if (!fatsize) fatsize = LD_DWORD(&fs->win[BPB_FATSz32]);1394: 24 e4 ldi r18, 0x44 ; 681396: 30 e0 ldi r19, 0x00 ; 01398: a2 0e add r10, r18139a: b3 1e adc r11, r19139c: d5 01 movw r26, r10139e: 6d 91 ld r22, X+13a0: 7d 91 ld r23, X+13a2: 8d 91 ld r24, X+13a4: 9c 91 ld r25, X13a6: ec eb ldi r30, 0xBC ; 18813a8: ff ef ldi r31, 0xFF ; 25513aa: ae 0e add r10, r3013ac: bf 1e adc r11, r31fs->sects_fat = (CLUST)fatsize;13ae: f5 01 movw r30, r1013b0: 75 8b std Z+21, r23 ; 0x1513b2: 64 8b std Z+20, r22 ; 0x14fs->n_fats = fs->win[BPB_NumFATs]; /* Number of FAT copies */13b4: 20 a9 ldd r18, Z+48 ; 0x3013b6: 26 8f std Z+30, r18 ; 0x1efatsize *= fs->n_fats; /* (Number of sectors in FAT area) */13b8: 33 27 eor r19, r1913ba: 44 27 eor r20, r2013bc: 55 27 eor r21, r2113be: 0e 94 e9 10 call 0x21d2 ; 0x21d2 <__mulsi3>13c2: 3b 01 movw r6, r2213c4: 4c 01 movw r8, r24fs->fatbase = bootsect + LD_WORD(&fs->win[BPB_RsvdSecCnt]); /* FAT start sector (lba) */13c6: a5 01 movw r20, r1013c8: 42 5d subi r20, 0xD2 ; 21013ca: 5f 4f sbci r21, 0xFF ; 25513cc: f5 01 movw r30, r1013ce: 86 a5 ldd r24, Z+46 ; 0x2e13d0: 97 a5 ldd r25, Z+47 ; 0x2f13d2: aa 27 eor r26, r2613d4: bb 27 eor r27, r2713d6: e8 0e add r14, r2413d8: f9 1e adc r15, r2513da: 0a 1f adc r16, r2613dc: 1b 1f adc r17, r2713de: e0 86 std Z+8, r14 ; 0x0813e0: f1 86 std Z+9, r15 ; 0x0913e2: 02 87 std Z+10, r16 ; 0x0a13e4: 13 87 std Z+11, r17 ; 0x0bfs->sects_clust = fs->win[BPB_SecPerClus]; /* Number of sectors per cluster */13e6: 85 a5 ldd r24, Z+45 ; 0x2d13e8: 85 8f std Z+29, r24 ; 0x1dfs->n_rootdir = LD_WORD(&fs->win[BPB_RootEntCnt]); /* Nmuber of root directory entries */13ea: 21 a9 ldd r18, Z+49 ; 0x3113ec: 32 a9 ldd r19, Z+50 ; 0x3213ee: 33 83 std Z+3, r19 ; 0x0313f0: 22 83 std Z+2, r18 ; 0x02totalsect = LD_WORD(&fs->win[BPB_TotSec16]); /* Number of sectors on the file system */13f2: 63 a9 ldd r22, Z+51 ; 0x3313f4: 74 a9 ldd r23, Z+52 ; 0x34if (!totalsect) totalsect = LD_DWORD(&fs->win[BPB_TotSec32]);13f6: 61 15 cp r22, r113f8: 71 05 cpc r23, r113fa: 21 f0 breq .+8 ; 0x1404 <f_open+0x17c>fs->n_fats = fs->win[BPB_NumFATs]; /* Number of FAT copies */fatsize *= fs->n_fats; /* (Number of sectors in FAT area) */fs->fatbase = bootsect + LD_WORD(&fs->win[BPB_RsvdSecCnt]); /* FAT start sector (lba) */fs->sects_clust = fs->win[BPB_SecPerClus]; /* Number of sectors per cluster */fs->n_rootdir = LD_WORD(&fs->win[BPB_RootEntCnt]); /* Nmuber of root directory entries */totalsect = LD_WORD(&fs->win[BPB_TotSec16]); /* Number of sectors on the file system */13fc: 7b 01 movw r14, r2213fe: 00 27 eor r16, r161400: 11 27 eor r17, r171402: 0d c0 rjmp .+26 ; 0x141e <f_open+0x196>if (!totalsect) totalsect = LD_DWORD(&fs->win[BPB_TotSec32]);1404: 80 e4 ldi r24, 0x40 ; 641406: 90 e0 ldi r25, 0x00 ; 01408: a8 0e add r10, r24140a: b9 1e adc r11, r25140c: d5 01 movw r26, r10140e: ed 90 ld r14, X+1410: fd 90 ld r15, X+1412: 0d 91 ld r16, X+1414: 1c 91 ld r17, X1416: e0 ec ldi r30, 0xC0 ; 1921418: ff ef ldi r31, 0xFF ; 255141a: ae 0e add r10, r30141c: bf 1e adc r11, r31fs->max_clust = maxclust = (totalsect /* Last cluster# + 1 */141e: da 01 movw r26, r201420: 8d 91 ld r24, X+1422: 9c 91 ld r25, X1424: aa 27 eor r26, r261426: bb 27 eor r27, r271428: e8 1a sub r14, r24142a: f9 0a sbc r15, r25142c: 0a 0b sbc r16, r26142e: 1b 0b sbc r17, r271430: e6 18 sub r14, r61432: f7 08 sbc r15, r71434: 08 09 sbc r16, r81436: 19 09 sbc r17, r91438: e4 e0 ldi r30, 0x04 ; 4143a: 36 95 lsr r19143c: 27 95 ror r18143e: ea 95 dec r301440: e1 f7 brne .-8 ; 0x143a <f_open+0x1b2>1442: c9 01 movw r24, r181444: aa 27 eor r26, r261446: bb 27 eor r27, r271448: e8 1a sub r14, r24144a: f9 0a sbc r15, r25144c: 0a 0b sbc r16, r26144e: 1b 0b sbc r17, r271450: f5 01 movw r30, r101452: 25 8d ldd r18, Z+29 ; 0x1d1454: 33 27 eor r19, r191456: 44 27 eor r20, r201458: 55 27 eor r21, r21145a: c8 01 movw r24, r16145c: b7 01 movw r22, r14145e: 0e 94 08 11 call 0x2210 ; 0x2210 <__udivmodsi4>1462: 2e 5f subi r18, 0xFE ; 2541464: 3f 4f sbci r19, 0xFF ; 2551466: 4f 4f sbci r20, 0xFF ; 2551468: 5f 4f sbci r21, 0xFF ; 255146a: f5 01 movw r30, r10146c: 37 8b std Z+23, r19 ; 0x17146e: 26 8b std Z+22, r18 ; 0x16- LD_WORD(&fs->win[BPB_RsvdSecCnt]) - fatsize - fs->n_rootdir / 16) / fs->sects_clust + 2;fmt = FS_FAT12; /* Determine the FAT sub type */if (maxclust > 0xFF7) fmt = FS_FAT16;1470: 28 3f cpi r18, 0xF8 ; 2481472: ff e0 ldi r31, 0x0F ; 151474: 3f 07 cpc r19, r311476: f0 e0 ldi r31, 0x00 ; 01478: 4f 07 cpc r20, r31147a: f0 e0 ldi r31, 0x00 ; 0147c: 5f 07 cpc r21, r31147e: 10 f4 brcc .+4 ; 0x1484 <f_open+0x1fc>1480: 61 e0 ldi r22, 0x01 ; 11482: 06 c0 rjmp .+12 ; 0x1490 <f_open+0x208>if (maxclust > 0xFFF7)1484: 28 5f subi r18, 0xF8 ; 2481486: 3f 4f sbci r19, 0xFF ; 2551488: 40 40 sbci r20, 0x00 ; 0148a: 50 40 sbci r21, 0x00 ; 0148c: e0 f5 brcc .+120 ; 0x1506 <f_open+0x27e>148e: 62 e0 ldi r22, 0x02 ; 2fmt = FS_FAT32;if (fmt == FS_FAT32)fs->dirbase = LD_DWORD(&fs->win[BPB_RootClus]); /* Root directory start cluster */else#endiffs->dirbase = fs->fatbase + fatsize; /* Root directory start sector (lba) */1490: f5 01 movw r30, r101492: 20 85 ldd r18, Z+8 ; 0x081494: 31 85 ldd r19, Z+9 ; 0x091496: 42 85 ldd r20, Z+10 ; 0x0a1498: 53 85 ldd r21, Z+11 ; 0x0b149a: d4 01 movw r26, r8149c: c3 01 movw r24, r6149e: 82 0f add r24, r1814a0: 93 1f adc r25, r1914a2: a4 1f adc r26, r2014a4: b5 1f adc r27, r2114a6: 84 87 std Z+12, r24 ; 0x0c14a8: 95 87 std Z+13, r25 ; 0x0d14aa: a6 87 std Z+14, r26 ; 0x0e14ac: b7 87 std Z+15, r27 ; 0x0ffs->database = fs->fatbase + fatsize + fs->n_rootdir / 16; /* Data start sector (lba) */14ae: 82 81 ldd r24, Z+2 ; 0x0214b0: 93 81 ldd r25, Z+3 ; 0x0314b2: 74 e0 ldi r23, 0x04 ; 414b4: 96 95 lsr r2514b6: 87 95 ror r2414b8: 7a 95 dec r2314ba: e1 f7 brne .-8 ; 0x14b4 <f_open+0x22c>14bc: aa 27 eor r26, r2614be: bb 27 eor r27, r2714c0: 82 0f add r24, r1814c2: 93 1f adc r25, r1914c4: a4 1f adc r26, r2014c6: b5 1f adc r27, r2114c8: 86 0d add r24, r614ca: 97 1d adc r25, r714cc: a8 1d adc r26, r814ce: b9 1d adc r27, r914d0: 80 8b std Z+16, r24 ; 0x1014d2: 91 8b std Z+17, r25 ; 0x1114d4: a2 8b std Z+18, r26 ; 0x1214d6: b3 8b std Z+19, r27 ; 0x13fs->fs_type = fmt; /* FAT sub-type */14d8: 64 8f std Z+28, r22 ; 0x1c#if !_FS_READONLYfs->free_clust = (CLUST)0xFFFFFFFF;14da: 8f ef ldi r24, 0xFF ; 25514dc: 9f ef ldi r25, 0xFF ; 25514de: 93 8f std Z+27, r25 ; 0x1b14e0: 82 8f std Z+26, r24 ; 0x1afs->free_clust = LD_DWORD(&fs->win[FSI_Free_Count]);}}#endif#endiffs->id = ++fsid; /* File system mount ID */14e2: 80 91 0c 01 lds r24, 0x010C14e6: 90 91 0d 01 lds r25, 0x010D14ea: 01 96 adiw r24, 0x01 ; 114ec: 90 93 0d 01 sts 0x010D, r2514f0: 80 93 0c 01 sts 0x010C, r2414f4: 91 83 std Z+1, r25 ; 0x0114f6: 80 83 st Z, r2414f8: 23 c2 rjmp .+1094 ; 0x1940 <f_open+0x6b8>14fa: 2a e0 ldi r18, 0x0A ; 1014fc: 30 e0 ldi r19, 0x00 ; 014fe: 4e c2 rjmp .+1180 ; 0x199c <f_open+0x714>1500: 29 e0 ldi r18, 0x09 ; 91502: 30 e0 ldi r19, 0x00 ; 01504: 4b c2 rjmp .+1174 ; 0x199c <f_open+0x714>1506: 2b e0 ldi r18, 0x0B ; 111508: 30 e0 ldi r19, 0x00 ; 0150a: 48 c2 rjmp .+1168 ; 0x199c <f_open+0x714>150c: 36 01 movw r6, r12){BYTE n, t, c, a, b;memset(dirname, ' ', 8+3); /* Fill buffer with spaces */150e: 4e 01 movw r8, r281510: 08 94 sec1512: 81 1c adc r8, r11514: 91 1c adc r9, r1for (;;) {ds = make_dirfile(&path, fn); /* Get a paragraph into fn[] */if (ds == 1) return FR_INVALID_NAME;for (;;) {if (!move_window(dirobj->sect)) return FR_RW_ERROR;dptr = &fs->win[(dirobj->index & 15) * 32]; /* Pointer to the directory entry */1516: 50 e2 ldi r21, 0x20 ; 321518: 45 2e mov r4, r21151a: 51 2c mov r5, r1151c: 4e 0e add r4, r30151e: 5f 1e adc r5, r31if (dptr[DIR_Name] == 0) /* Has it reached to end of dir? */return !ds ? FR_NO_FILE : FR_NO_PATH;if (dptr[DIR_Name] != 0xE5 /* Matched? */&& !(dptr[DIR_Attr] & AM_VOL)&& !memcmp(&dptr[DIR_Name], fn, 8+3) ) break;if (!next_dir_entry(dirobj)) /* Next directory pointer */1520: 4d e0 ldi r20, 0x0D ; 131522: 24 2e mov r2, r201524: 31 2c mov r3, r11526: 2c 0e add r2, r281528: 3d 1e adc r3, r29){BYTE n, t, c, a, b;memset(dirname, ' ', 8+3); /* Fill buffer with spaces */152a: 4b e0 ldi r20, 0x0B ; 11152c: 50 e0 ldi r21, 0x00 ; 0152e: 60 e2 ldi r22, 0x20 ; 321530: 70 e0 ldi r23, 0x00 ; 01532: c4 01 movw r24, r81534: 0e 94 aa 10 call 0x2154 ; 0x2154 <memset>1538: 40 e0 ldi r20, 0x00 ; 0153a: 68 e0 ldi r22, 0x08 ; 8153c: 30 e0 ldi r19, 0x00 ; 0153e: 58 e1 ldi r21, 0x18 ; 241540: 02 c0 rjmp .+4 ; 0x1546 <f_open+0x2be>1542: 48 e0 ldi r20, 0x08 ; 81544: 6b e0 ldi r22, 0x0B ; 11a = 0; b = 0x18; /* NT flag */n = 0; t = 8;for (;;) {c = *(*path)++;1546: d3 01 movw r26, r61548: 2d 91 ld r18, X+154a: 3d 01 movw r6, r26if (c == '\0' || c == '/') { /* Reached to end of str or directory separator */154c: 22 23 and r18, r18154e: 11 f0 breq .+4 ; 0x1554 <f_open+0x2cc>1550: 2f 32 cpi r18, 0x2F ; 471552: 51 f4 brne .+20 ; 0x1568 <f_open+0x2e0>if (n == 0) break;1554: 44 23 and r20, r201556: 09 f4 brne .+2 ; 0x155a <f_open+0x2d2>1558: 43 c0 rjmp .+134 ; 0x15e0 <f_open+0x358>dirname[11] = _USE_NTFLAG ? (a & b) : 0;155a: 53 23 and r21, r19155c: 5c 87 std Y+12, r21 ; 0x0creturn c;155e: 82 2f mov r24, r181560: 99 27 eor r25, r251562: 87 fd sbrc r24, 71564: 90 95 com r251566: 3e c0 rjmp .+124 ; 0x15e4 <f_open+0x35c>memset(dirname, ' ', 8+3); /* Fill buffer with spaces */a = 0; b = 0x18; /* NT flag */n = 0; t = 8;for (;;) {c = *(*path)++;1568: 92 2f mov r25, r18if (c == '\0' || c == '/') { /* Reached to end of str or directory separator */if (n == 0) break;dirname[11] = _USE_NTFLAG ? (a & b) : 0;return c;}if (c <= ' ' || c == 0x7F) break; /* Reject invisible chars */156a: 21 32 cpi r18, 0x21 ; 33156c: c8 f1 brcs .+114 ; 0x15e0 <f_open+0x358>156e: 2f 37 cpi r18, 0x7F ; 1271570: b9 f1 breq .+110 ; 0x15e0 <f_open+0x358>if (c == '.') {1572: 2e 32 cpi r18, 0x2E ; 461574: 39 f4 brne .+14 ; 0x1584 <f_open+0x2fc>if (!(a & 1) && n >= 1 && n <= 8) { /* Enter extension part */1576: 30 fd sbrc r19, 01578: 33 c0 rjmp .+102 ; 0x15e0 <f_open+0x358>157a: 44 23 and r20, r20157c: 89 f1 breq .+98 ; 0x15e0 <f_open+0x358>157e: 49 30 cpi r20, 0x09 ; 91580: 00 f3 brcs .-64 ; 0x1542 <f_open+0x2ba>1582: 2e c0 rjmp .+92 ; 0x15e0 <f_open+0x358>(c >= 0xE0 && c <= 0xFC))) {if (n == 0 && c == 0xE5) /* Change heading \xE5 to \x05 */c = 0x05;a ^= 1; goto md_l2;}if (c == '"') break; /* Reject " */1584: 22 32 cpi r18, 0x22 ; 341586: 61 f1 breq .+88 ; 0x15e0 <f_open+0x358>if (c <= ')') goto md_l1; /* Accept ! # $ % & ' ( ) */1588: 2a 32 cpi r18, 0x2A ; 42158a: 08 f1 brcs .+66 ; 0x15ce <f_open+0x346>if (c <= ',') break; /* Reject * + , */158c: 2d 32 cpi r18, 0x2D ; 45158e: 40 f1 brcs .+80 ; 0x15e0 <f_open+0x358>if (c <= '9') goto md_l1; /* Accept - 0-9 */1590: 2a 33 cpi r18, 0x3A ; 581592: e8 f0 brcs .+58 ; 0x15ce <f_open+0x346>if (c <= '?') break; /* Reject : ; < = > ? */1594: 20 34 cpi r18, 0x40 ; 641596: 20 f1 brcs .+72 ; 0x15e0 <f_open+0x358>if (!(a & 1)) { /* These checks are not applied to S-JIS 2nd byte */1598: 30 fd sbrc r19, 0159a: 19 c0 rjmp .+50 ; 0x15ce <f_open+0x346>if (c == '|') break; /* Reject | */159c: 2c 37 cpi r18, 0x7C ; 124159e: 01 f1 breq .+64 ; 0x15e0 <f_open+0x358>if (c >= '[' && c <= ']') break;/* Reject [ \ ] */15a0: 82 2f mov r24, r1815a2: 8b 55 subi r24, 0x5B ; 9115a4: 83 30 cpi r24, 0x03 ; 315a6: e0 f0 brcs .+56 ; 0x15e0 <f_open+0x358>if (_USE_NTFLAG && c >= 'A' && c <= 'Z')15a8: 86 5e subi r24, 0xE6 ; 23015aa: 8a 31 cpi r24, 0x1A ; 2615ac: 28 f4 brcc .+10 ; 0x15b8 <f_open+0x330>(t == 8) ? (b &= ~0x08) : (b &= ~0x10);15ae: 68 30 cpi r22, 0x08 ; 815b0: 11 f4 brne .+4 ; 0x15b6 <f_open+0x32e>15b2: 57 7f andi r21, 0xF7 ; 24715b4: 01 c0 rjmp .+2 ; 0x15b8 <f_open+0x330>15b6: 5f 7e andi r21, 0xEF ; 239if (c >= 'a' && c <= 'z') { /* Convert to upper case */15b8: 82 2f mov r24, r1815ba: 81 56 subi r24, 0x61 ; 9715bc: 8a 31 cpi r24, 0x1A ; 2615be: 38 f4 brcc .+14 ; 0x15ce <f_open+0x346>c -= 0x20;15c0: 92 2f mov r25, r1815c2: 90 52 subi r25, 0x20 ; 32if (_USE_NTFLAG) (t == 8) ? (a |= 0x08) : (a |= 0x10);15c4: 68 30 cpi r22, 0x08 ; 815c6: 11 f4 brne .+4 ; 0x15cc <f_open+0x344>15c8: 38 60 ori r19, 0x08 ; 815ca: 01 c0 rjmp .+2 ; 0x15ce <f_open+0x346>15cc: 30 61 ori r19, 0x10 ; 16}}md_l1:a &= ~1;md_l2:if (n >= t) break;15ce: 46 17 cp r20, r2215d0: 38 f4 brcc .+14 ; 0x15e0 <f_open+0x358>c -= 0x20;if (_USE_NTFLAG) (t == 8) ? (a |= 0x08) : (a |= 0x10);}}md_l1:a &= ~1;15d2: 3e 7f andi r19, 0xFE ; 254md_l2:if (n >= t) break;dirname[n++] = c;15d4: f4 01 movw r30, r815d6: e4 0f add r30, r2015d8: f1 1d adc r31, r115da: 90 83 st Z, r2515dc: 4f 5f subi r20, 0xFF ; 25515de: b3 cf rjmp .-154 ; 0x1546 <f_open+0x2be>15e0: 81 e0 ldi r24, 0x01 ; 115e2: 90 e0 ldi r25, 0x00 ; 0if (*path == '\0') { /* Null path means the root directory */*dir = NULL; return FR_OK;}for (;;) {ds = make_dirfile(&path, fn); /* Get a paragraph into fn[] */15e4: d8 2e mov r13, r24if (ds == 1) return FR_INVALID_NAME;15e6: b1 e0 ldi r27, 0x01 ; 115e8: 8b 17 cp r24, r2715ea: 19 f4 brne .+6 ; 0x15f2 <f_open+0x36a>15ec: 24 e0 ldi r18, 0x04 ; 415ee: 30 e0 ldi r19, 0x00 ; 015f0: 55 c0 rjmp .+170 ; 0x169c <f_open+0x414>for (;;) {if (!move_window(dirobj->sect)) return FR_RW_ERROR;15f2: 6f 89 ldd r22, Y+23 ; 0x1715f4: 78 8d ldd r23, Y+24 ; 0x1815f6: 89 8d ldd r24, Y+25 ; 0x1915f8: 9a 8d ldd r25, Y+26 ; 0x1a15fa: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>15fe: 88 23 and r24, r241600: 19 f4 brne .+6 ; 0x1608 <f_open+0x380>1602: 28 e0 ldi r18, 0x08 ; 81604: 30 e0 ldi r19, 0x00 ; 01606: 4a c0 rjmp .+148 ; 0x169c <f_open+0x414>dptr = &fs->win[(dirobj->index & 15) * 32]; /* Pointer to the directory entry */1608: 0f 85 ldd r16, Y+15 ; 0x0f160a: 18 89 ldd r17, Y+16 ; 0x10160c: 0f 70 andi r16, 0x0F ; 15160e: 10 70 andi r17, 0x00 ; 01610: 35 e0 ldi r19, 0x05 ; 51612: 00 0f add r16, r161614: 11 1f adc r17, r171616: 3a 95 dec r191618: e1 f7 brne .-8 ; 0x1612 <f_open+0x38a>161a: 04 0d add r16, r4161c: 15 1d adc r17, r5if (dptr[DIR_Name] == 0) /* Has it reached to end of dir? */161e: f8 01 movw r30, r161620: 80 81 ld r24, Z1622: 88 23 and r24, r241624: a9 f0 breq .+42 ; 0x1650 <f_open+0x3c8>return !ds ? FR_NO_FILE : FR_NO_PATH;if (dptr[DIR_Name] != 0xE5 /* Matched? */1626: 85 3e cpi r24, 0xE5 ; 2291628: 71 f0 breq .+28 ; 0x1646 <f_open+0x3be>162a: f8 01 movw r30, r16162c: 83 85 ldd r24, Z+11 ; 0x0b162e: e8 2e mov r14, r241630: ff 24 eor r15, r151632: e3 fc sbrc r14, 31634: 08 c0 rjmp .+16 ; 0x1646 <f_open+0x3be>1636: 4b e0 ldi r20, 0x0B ; 111638: 50 e0 ldi r21, 0x00 ; 0163a: b4 01 movw r22, r8163c: c8 01 movw r24, r16163e: 0e 94 94 10 call 0x2128 ; 0x2128 <memcmp>1642: 89 2b or r24, r251644: 51 f0 breq .+20 ; 0x165a <f_open+0x3d2>&& !(dptr[DIR_Attr] & AM_VOL)&& !memcmp(&dptr[DIR_Name], fn, 8+3) ) break;if (!next_dir_entry(dirobj)) /* Next directory pointer */1646: c1 01 movw r24, r21648: 0e 94 cb 04 call 0x996 ; 0x996 <next_dir_entry>164c: 88 23 and r24, r24164e: 89 f6 brne .-94 ; 0x15f2 <f_open+0x36a>return !ds ? FR_NO_FILE : FR_NO_PATH;1650: dd 20 and r13, r131652: 59 f4 brne .+22 ; 0x166a <f_open+0x3e2>1654: 22 e0 ldi r18, 0x02 ; 21656: 30 e0 ldi r19, 0x00 ; 01658: 21 c0 rjmp .+66 ; 0x169c <f_open+0x414>}if (!ds) { *dir = dptr; return FR_OK; } /* Matched with end of path */165a: dd 20 and r13, r13165c: 21 f4 brne .+8 ; 0x1666 <f_open+0x3de>165e: 68 01 movw r12, r161660: 20 e0 ldi r18, 0x00 ; 01662: 30 e0 ldi r19, 0x00 ; 01664: 1b c0 rjmp .+54 ; 0x169c <f_open+0x414>if (!(dptr[DIR_Attr] & AM_DIR)) return FR_NO_PATH; /* Cannot trace because it is a file */1666: e4 fc sbrc r14, 41668: 03 c0 rjmp .+6 ; 0x1670 <f_open+0x3e8>166a: 23 e0 ldi r18, 0x03 ; 3166c: 30 e0 ldi r19, 0x00 ; 0166e: 16 c0 rjmp .+44 ; 0x169c <f_open+0x414>clust = /* Get cluster# of the directory */1670: f8 01 movw r30, r161672: 82 8d ldd r24, Z+26 ; 0x1a1674: 93 8d ldd r25, Z+27 ; 0x1b#if _FAT32((DWORD)LD_WORD(&dptr[DIR_FstClusHI]) << 16) |#endifLD_WORD(&dptr[DIR_FstClusLO]);dirobj->clust = dirobj->sclust = clust; /* Restart scannig with the new directory */1676: 9c 8b std Y+20, r25 ; 0x141678: 8b 8b std Y+19, r24 ; 0x13167a: 9e 8b std Y+22, r25 ; 0x16167c: 8d 8b std Y+21, r24 ; 0x15dirobj->sect = clust2sect(clust);167e: 0e 94 18 03 call 0x630 ; 0x630 <clust2sect>1682: 6f 8b std Y+23, r22 ; 0x171684: 78 8f std Y+24, r23 ; 0x181686: 89 8f std Y+25, r24 ; 0x191688: 9a 8f std Y+26, r25 ; 0x1adirobj->index = 2;168a: 82 e0 ldi r24, 0x02 ; 2168c: 90 e0 ldi r25, 0x00 ; 0168e: 98 8b std Y+16, r25 ; 0x101690: 8f 87 std Y+15, r24 ; 0x0f1692: 4b cf rjmp .-362 ; 0x152a <f_open+0x2a2>1694: 20 e0 ldi r18, 0x00 ; 01696: 30 e0 ldi r19, 0x00 ; 01698: cc 24 eor r12, r12169a: dd 24 eor r13, r13/* Trace the file path */res = trace_path(&dirobj, fn, path, &dir); /* Trace the file path */#if !_FS_READONLY/* Create or Open a File */if (mode & (FA_CREATE_ALWAYS|FA_OPEN_ALWAYS|FA_CREATE_NEW)) {169c: fb 8d ldd r31, Y+27 ; 0x1b169e: 4f 2f mov r20, r3116a0: 55 27 eor r21, r2116a2: ca 01 movw r24, r2016a4: 8c 71 andi r24, 0x1C ; 2816a6: 90 70 andi r25, 0x00 ; 016a8: 89 2b or r24, r2516aa: 09 f4 brne .+2 ; 0x16ae <f_open+0x426>16ac: fe c0 rjmp .+508 ; 0x18aa <f_open+0x622>CLUST rs;DWORD dw;if (res != FR_OK) { /* No file, create new */16ae: 21 15 cp r18, r116b0: 31 05 cpc r19, r116b2: 09 f4 brne .+2 ; 0x16b6 <f_open+0x42e>16b4: 8f c0 rjmp .+286 ; 0x17d4 <f_open+0x54c>if (res != FR_NO_FILE) return res;16b6: 22 30 cpi r18, 0x02 ; 216b8: 31 05 cpc r19, r116ba: 09 f0 breq .+2 ; 0x16be <f_open+0x436>16bc: 6f c1 rjmp .+734 ; 0x199c <f_open+0x714>){CLUST clust;DWORD sector;BYTE c, n, *dptr;FATFS *fs = FatFs;16be: 60 90 0a 01 lds r6, 0x010A16c2: 70 90 0b 01 lds r7, 0x010B/* Re-initialize directory object */clust = dirobj->sclust;16c6: 0b 89 ldd r16, Y+19 ; 0x1316c8: 1c 89 ldd r17, Y+20 ; 0x14if (clust) { /* Dyanmic directory table */16ca: 01 15 cp r16, r116cc: 11 05 cpc r17, r116ce: 51 f0 breq .+20 ; 0x16e4 <f_open+0x45c>dirobj->clust = clust;16d0: 1e 8b std Y+22, r17 ; 0x1616d2: 0d 8b std Y+21, r16 ; 0x15dirobj->sect = clust2sect(clust);16d4: c8 01 movw r24, r1616d6: 0e 94 18 03 call 0x630 ; 0x630 <clust2sect>16da: 6f 8b std Y+23, r22 ; 0x1716dc: 78 8f std Y+24, r23 ; 0x1816de: 89 8f std Y+25, r24 ; 0x1916e0: 9a 8f std Y+26, r25 ; 0x1a16e2: 09 c0 rjmp .+18 ; 0x16f6 <f_open+0x46e>} else { /* Static directory table */dirobj->sect = fs->dirbase;16e4: f3 01 movw r30, r616e6: 84 85 ldd r24, Z+12 ; 0x0c16e8: 95 85 ldd r25, Z+13 ; 0x0d16ea: a6 85 ldd r26, Z+14 ; 0x0e16ec: b7 85 ldd r27, Z+15 ; 0x0f16ee: 8f 8b std Y+23, r24 ; 0x1716f0: 98 8f std Y+24, r25 ; 0x1816f2: a9 8f std Y+25, r26 ; 0x1916f4: ba 8f std Y+26, r27 ; 0x1a}dirobj->index = 0;16f6: 18 8a std Y+16, r1 ; 0x1016f8: 1f 86 std Y+15, r1 ; 0x0fdo {if (!move_window(dirobj->sect)) return FR_RW_ERROR;dptr = &fs->win[(dirobj->index & 15) * 32]; /* Pointer to the directory entry */16fa: 20 e2 ldi r18, 0x20 ; 3216fc: e2 2e mov r14, r1816fe: f1 2c mov r15, r11700: e6 0c add r14, r61702: f7 1c adc r15, r7c = dptr[DIR_Name];if (c == 0 || c == 0xE5) { /* Found an empty entry! */*dir = dptr; return FR_OK;}} while (next_dir_entry(dirobj)); /* Next directory pointer */1704: 9d e0 ldi r25, 0x0D ; 131706: 49 2e mov r4, r251708: 51 2c mov r5, r1170a: 4c 0e add r4, r28170c: 5d 1e adc r5, r29dirobj->sect = fs->dirbase;}dirobj->index = 0;do {if (!move_window(dirobj->sect)) return FR_RW_ERROR;170e: 6f 89 ldd r22, Y+23 ; 0x171710: 78 8d ldd r23, Y+24 ; 0x181712: 89 8d ldd r24, Y+25 ; 0x191714: 9a 8d ldd r25, Y+26 ; 0x1a1716: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>171a: 88 23 and r24, r24171c: 09 f4 brne .+2 ; 0x1720 <f_open+0x498>171e: 0a c1 rjmp .+532 ; 0x1934 <f_open+0x6ac>dptr = &fs->win[(dirobj->index & 15) * 32]; /* Pointer to the directory entry */1720: 47 01 movw r8, r141722: cf 84 ldd r12, Y+15 ; 0x0f1724: d8 88 ldd r13, Y+16 ; 0x101726: ff e0 ldi r31, 0x0F ; 151728: cf 22 and r12, r31172a: dd 24 eor r13, r13172c: 85 e0 ldi r24, 0x05 ; 5172e: cc 0c add r12, r121730: dd 1c adc r13, r131732: 8a 95 dec r241734: e1 f7 brne .-8 ; 0x172e <f_open+0x4a6>1736: ce 0c add r12, r141738: df 1c adc r13, r15c = dptr[DIR_Name];173a: d6 01 movw r26, r12173c: 8c 91 ld r24, Xif (c == 0 || c == 0xE5) { /* Found an empty entry! */173e: 88 23 and r24, r241740: 09 f4 brne .+2 ; 0x1744 <f_open+0x4bc>1742: 18 c1 rjmp .+560 ; 0x1974 <f_open+0x6ec>1744: 85 3e cpi r24, 0xE5 ; 2291746: 09 f4 brne .+2 ; 0x174a <f_open+0x4c2>1748: 15 c1 rjmp .+554 ; 0x1974 <f_open+0x6ec>*dir = dptr; return FR_OK;}} while (next_dir_entry(dirobj)); /* Next directory pointer */174a: c2 01 movw r24, r4174c: 0e 94 cb 04 call 0x996 ; 0x996 <next_dir_entry>1750: 88 23 and r24, r241752: e9 f6 brne .-70 ; 0x170e <f_open+0x486>/* Reached to end of the directory table *//* Abort when static table or could not stretch dynamic table */if (!clust || !(clust = create_chain(dirobj->clust))) return FR_DENIED;1754: 01 2b or r16, r171756: 09 f4 brne .+2 ; 0x175a <f_open+0x4d2>1758: ea c0 rjmp .+468 ; 0x192e <f_open+0x6a6>175a: 8d 89 ldd r24, Y+21 ; 0x15175c: 9e 89 ldd r25, Y+22 ; 0x16175e: 0e 94 25 05 call 0xa4a ; 0xa4a <create_chain>1762: 8c 01 movw r16, r241764: 00 97 sbiw r24, 0x00 ; 01766: 09 f4 brne .+2 ; 0x176a <f_open+0x4e2>1768: e2 c0 rjmp .+452 ; 0x192e <f_open+0x6a6>if (clust == 1 || !move_window(0)) return FR_RW_ERROR;176a: 01 97 sbiw r24, 0x01 ; 1176c: 09 f4 brne .+2 ; 0x1770 <f_open+0x4e8>176e: e2 c0 rjmp .+452 ; 0x1934 <f_open+0x6ac>1770: 60 e0 ldi r22, 0x00 ; 01772: 70 e0 ldi r23, 0x00 ; 01774: 80 e0 ldi r24, 0x00 ; 01776: 90 e0 ldi r25, 0x00 ; 01778: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>177c: 88 23 and r24, r24177e: 09 f4 brne .+2 ; 0x1782 <f_open+0x4fa>1780: d9 c0 rjmp .+434 ; 0x1934 <f_open+0x6ac>fs->winsect = sector = clust2sect(clust); /* Cleanup the expanded table */1782: c8 01 movw r24, r161784: 0e 94 18 03 call 0x630 ; 0x630 <clust2sect>1788: 6b 01 movw r12, r22178a: 7c 01 movw r14, r24178c: f3 01 movw r30, r6178e: 64 83 std Z+4, r22 ; 0x041790: 75 83 std Z+5, r23 ; 0x051792: 86 83 std Z+6, r24 ; 0x061794: 97 83 std Z+7, r25 ; 0x07memset(fs->win, 0, 512);1796: 80 e0 ldi r24, 0x00 ; 01798: 92 e0 ldi r25, 0x02 ; 2179a: d4 01 movw r26, r8179c: 1d 92 st X+, r1179e: 01 97 sbiw r24, 0x01 ; 117a0: e9 f7 brne .-6 ; 0x179c <f_open+0x514>for (n = fs->sects_clust; n; n--) {17a2: 15 8d ldd r17, Z+29 ; 0x1d17a4: 10 c0 rjmp .+32 ; 0x17c6 <f_open+0x53e>if (disk_write(0, fs->win, sector, 1) != RES_OK)17a6: 01 e0 ldi r16, 0x01 ; 117a8: a7 01 movw r20, r1417aa: 96 01 movw r18, r1217ac: b4 01 movw r22, r817ae: 80 e0 ldi r24, 0x00 ; 017b0: 0e 94 d3 0e call 0x1da6 ; 0x1da6 <disk_write>17b4: 89 2b or r24, r2517b6: 09 f0 breq .+2 ; 0x17ba <f_open+0x532>17b8: bd c0 rjmp .+378 ; 0x1934 <f_open+0x6ac>return FR_RW_ERROR;sector++;17ba: 08 94 sec17bc: c1 1c adc r12, r117be: d1 1c adc r13, r117c0: e1 1c adc r14, r117c2: f1 1c adc r15, r1if (!clust || !(clust = create_chain(dirobj->clust))) return FR_DENIED;if (clust == 1 || !move_window(0)) return FR_RW_ERROR;fs->winsect = sector = clust2sect(clust); /* Cleanup the expanded table */memset(fs->win, 0, 512);for (n = fs->sects_clust; n; n--) {17c4: 11 50 subi r17, 0x01 ; 117c6: 11 23 and r17, r1717c8: 71 f7 brne .-36 ; 0x17a6 <f_open+0x51e>if (disk_write(0, fs->win, sector, 1) != RES_OK)return FR_RW_ERROR;sector++;}fs->winflag = 1;17ca: 81 e0 ldi r24, 0x01 ; 117cc: f3 01 movw r30, r617ce: 87 8f std Z+31, r24 ; 0x1f17d0: 64 01 movw r12, r817d2: d0 c0 rjmp .+416 ; 0x1974 <f_open+0x6ec>memset(dir, 0, 32); /* Initialize the new entry */memcpy(&dir[DIR_Name], fn, 8+3);dir[DIR_NTres] = fn[11];mode |= FA_CREATE_ALWAYS;} else { /* Any object is already existing */if (mode & FA_CREATE_NEW) /* Cannot create new */17d4: 42 ff sbrs r20, 217d6: 03 c0 rjmp .+6 ; 0x17de <f_open+0x556>17d8: 27 e0 ldi r18, 0x07 ; 717da: 30 e0 ldi r19, 0x00 ; 017dc: df c0 rjmp .+446 ; 0x199c <f_open+0x714>return FR_EXIST;if (dir == NULL || (dir[DIR_Attr] & (AM_RDO|AM_DIR))) /* Cannot overwrite (R/O or DIR) */17de: c1 14 cp r12, r117e0: d1 04 cpc r13, r117e2: 09 f4 brne .+2 ; 0x17e6 <f_open+0x55e>17e4: a4 c0 rjmp .+328 ; 0x192e <f_open+0x6a6>17e6: f6 01 movw r30, r1217e8: 83 85 ldd r24, Z+11 ; 0x0b17ea: 81 71 andi r24, 0x11 ; 1717ec: 09 f0 breq .+2 ; 0x17f0 <f_open+0x568>17ee: 9f c0 rjmp .+318 ; 0x192e <f_open+0x6a6>return FR_DENIED;if (mode & FA_CREATE_ALWAYS) { /* Resize it to zero */17f0: 43 ff sbrs r20, 317f2: 46 c0 rjmp .+140 ; 0x1880 <f_open+0x5f8>#if _FAT32rs = ((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) | LD_WORD(&dir[DIR_FstClusLO]);ST_WORD(&dir[DIR_FstClusHI], 0);#elsers = LD_WORD(&dir[DIR_FstClusLO]);17f4: 82 8c ldd r8, Z+26 ; 0x1a17f6: 93 8c ldd r9, Z+27 ; 0x1b#endifST_WORD(&dir[DIR_FstClusLO], 0); /* cluster = 0 */17f8: 13 8e std Z+27, r1 ; 0x1b17fa: 12 8e std Z+26, r1 ; 0x1aST_DWORD(&dir[DIR_FileSize], 0); /* size = 0 */17fc: 14 8e std Z+28, r1 ; 0x1c17fe: 15 8e std Z+29, r1 ; 0x1d1800: 16 8e std Z+30, r1 ; 0x1e1802: 17 8e std Z+31, r1 ; 0x1ffs->winflag = 1;1804: 81 e0 ldi r24, 0x01 ; 11806: f5 01 movw r30, r101808: 87 8f std Z+31, r24 ; 0x1fdw = fs->winsect; /* Remove the cluster chain */180a: 24 80 ldd r2, Z+4 ; 0x04180c: 35 80 ldd r3, Z+5 ; 0x05180e: 46 80 ldd r4, Z+6 ; 0x061810: 57 80 ldd r5, Z+7 ; 0x07BOOL remove_chain ( /* TRUE: successful, FALSE: failed */CLUST clust /* Cluster# to remove chain from */){CLUST nxt;FATFS *fs = FatFs;1812: e0 90 0a 01 lds r14, 0x010A1816: f0 90 0b 01 lds r15, 0x010B181a: 84 01 movw r16, r8181c: 1b c0 rjmp .+54 ; 0x1854 <f_open+0x5cc>while (clust >= 2 && clust < fs->max_clust) {nxt = get_cluster(clust);181e: c8 01 movw r24, r161820: 0e 94 4f 04 call 0x89e ; 0x89e <get_cluster>1824: 3c 01 movw r6, r24if (nxt == 1) return FALSE;1826: 01 97 sbiw r24, 0x01 ; 11828: 09 f4 brne .+2 ; 0x182c <f_open+0x5a4>182a: 84 c0 rjmp .+264 ; 0x1934 <f_open+0x6ac>if (!put_cluster(clust, 0)) return FALSE;182c: 60 e0 ldi r22, 0x00 ; 0182e: 70 e0 ldi r23, 0x00 ; 01830: c8 01 movw r24, r161832: 0e 94 c1 03 call 0x782 ; 0x782 <put_cluster>1836: 88 23 and r24, r241838: 09 f4 brne .+2 ; 0x183c <f_open+0x5b4>183a: 7c c0 rjmp .+248 ; 0x1934 <f_open+0x6ac>if (fs->free_clust != (CLUST)0xFFFFFFFF) {183c: f7 01 movw r30, r14183e: 82 8d ldd r24, Z+26 ; 0x1a1840: 93 8d ldd r25, Z+27 ; 0x1b1842: ff ef ldi r31, 0xFF ; 2551844: 8f 3f cpi r24, 0xFF ; 2551846: 9f 07 cpc r25, r311848: 21 f0 breq .+8 ; 0x1852 <f_open+0x5ca>fs->free_clust++;184a: 01 96 adiw r24, 0x01 ; 1184c: f7 01 movw r30, r14184e: 93 8f std Z+27, r25 ; 0x1b1850: 82 8f std Z+26, r24 ; 0x1a1852: 83 01 movw r16, r6{CLUST nxt;FATFS *fs = FatFs;while (clust >= 2 && clust < fs->max_clust) {1854: 02 30 cpi r16, 0x02 ; 21856: 11 05 cpc r17, r11858: 30 f0 brcs .+12 ; 0x1866 <f_open+0x5de>185a: f7 01 movw r30, r14185c: 86 89 ldd r24, Z+22 ; 0x16185e: 97 89 ldd r25, Z+23 ; 0x171860: 08 17 cp r16, r241862: 19 07 cpc r17, r251864: e0 f2 brcs .-72 ; 0x181e <f_open+0x596>#endifST_WORD(&dir[DIR_FstClusLO], 0); /* cluster = 0 */ST_DWORD(&dir[DIR_FileSize], 0); /* size = 0 */fs->winflag = 1;dw = fs->winsect; /* Remove the cluster chain */if (!remove_chain(rs) || !move_window(dw))1866: c2 01 movw r24, r41868: b1 01 movw r22, r2186a: 0e 94 55 03 call 0x6aa ; 0x6aa <move_window>186e: 88 23 and r24, r241870: 09 f4 brne .+2 ; 0x1874 <f_open+0x5ec>1872: 60 c0 rjmp .+192 ; 0x1934 <f_open+0x6ac>return FR_RW_ERROR;fs->last_clust = rs - 1; /* Reuse the cluster hole */1874: 08 94 sec1876: 81 08 sbc r8, r11878: 91 08 sbc r9, r1187a: f5 01 movw r30, r10187c: 91 8e std Z+25, r9 ; 0x19187e: 80 8e std Z+24, r8 ; 0x18}}if (mode & FA_CREATE_ALWAYS) {1880: fb 8d ldd r31, Y+27 ; 0x1b1882: f3 ff sbrs r31, 31884: 23 c0 rjmp .+70 ; 0x18cc <f_open+0x644>dir[DIR_Attr] = AM_ARC; /* New attribute */1886: 80 e2 ldi r24, 0x20 ; 321888: f6 01 movw r30, r12188a: 83 87 std Z+11, r24 ; 0x0bdw = get_fattime();188c: 0e 94 bb 00 call 0x176 ; 0x176 <get_fattime>ST_DWORD(&dir[DIR_WrtTime], dw); /* Updated time */1890: f6 01 movw r30, r121892: 66 8b std Z+22, r22 ; 0x161894: 77 8b std Z+23, r23 ; 0x171896: 80 8f std Z+24, r24 ; 0x181898: 91 8f std Z+25, r25 ; 0x19ST_DWORD(&dir[DIR_CrtTime], dw); /* Created time */189a: 66 87 std Z+14, r22 ; 0x0e189c: 77 87 std Z+15, r23 ; 0x0f189e: 80 8b std Z+16, r24 ; 0x1018a0: 91 8b std Z+17, r25 ; 0x11fs->winflag = 1;18a2: 81 e0 ldi r24, 0x01 ; 118a4: f5 01 movw r30, r1018a6: 87 8f std Z+31, r24 ; 0x1f18a8: 11 c0 rjmp .+34 ; 0x18cc <f_open+0x644>}}/* Open a File */else {#endif /* !_FS_READONLY */if (res != FR_OK) return res; /* Trace failed */18aa: 21 15 cp r18, r118ac: 31 05 cpc r19, r118ae: 09 f0 breq .+2 ; 0x18b2 <f_open+0x62a>18b0: 75 c0 rjmp .+234 ; 0x199c <f_open+0x714>if (dir == NULL || (dir[DIR_Attr] & AM_DIR)) /* It is a directory */18b2: c1 14 cp r12, r118b4: d1 04 cpc r13, r118b6: 09 f4 brne .+2 ; 0x18ba <f_open+0x632>18b8: 40 c0 rjmp .+128 ; 0x193a <f_open+0x6b2>18ba: f6 01 movw r30, r1218bc: 83 85 ldd r24, Z+11 ; 0x0b18be: 99 27 eor r25, r2518c0: 84 fd sbrc r24, 418c2: 3b c0 rjmp .+118 ; 0x193a <f_open+0x6b2>return FR_NO_FILE;#if !_FS_READONLYif ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */18c4: 41 ff sbrs r20, 118c6: 02 c0 rjmp .+4 ; 0x18cc <f_open+0x644>18c8: 80 fd sbrc r24, 018ca: 31 c0 rjmp .+98 ; 0x192e <f_open+0x6a6>return FR_DENIED;}fp->dir_sect = fs->winsect; /* Pointer to the directory entry */18cc: f5 01 movw r30, r1018ce: 84 81 ldd r24, Z+4 ; 0x0418d0: 95 81 ldd r25, Z+5 ; 0x0518d2: a6 81 ldd r26, Z+6 ; 0x0618d4: b7 81 ldd r27, Z+7 ; 0x0718d6: ec 8d ldd r30, Y+28 ; 0x1c18d8: fd 8d ldd r31, Y+29 ; 0x1d18da: 86 8b std Z+22, r24 ; 0x1618dc: 97 8b std Z+23, r25 ; 0x1718de: a0 8f std Z+24, r26 ; 0x1818e0: b1 8f std Z+25, r27 ; 0x19fp->dir_ptr = dir;18e2: d3 8e std Z+27, r13 ; 0x1b18e4: c2 8e std Z+26, r12 ; 0x1a#endiffp->flag = mode; /* File access mode */18e6: 2b 8d ldd r18, Y+27 ; 0x1b18e8: 22 83 std Z+2, r18 ; 0x02fp->org_clust = /* File start cluster */18ea: f6 01 movw r30, r1218ec: 82 8d ldd r24, Z+26 ; 0x1a18ee: 93 8d ldd r25, Z+27 ; 0x1b18f0: ec 8d ldd r30, Y+28 ; 0x1c18f2: fd 8d ldd r31, Y+29 ; 0x1d18f4: 97 87 std Z+15, r25 ; 0x0f18f6: 86 87 std Z+14, r24 ; 0x0e#if _FAT32((DWORD)LD_WORD(&dir[DIR_FstClusHI]) << 16) |#endifLD_WORD(&dir[DIR_FstClusLO]);fp->fsize = LD_DWORD(&dir[DIR_FileSize]); /* File size */18f8: f6 01 movw r30, r1218fa: 84 8d ldd r24, Z+28 ; 0x1c18fc: 95 8d ldd r25, Z+29 ; 0x1d18fe: a6 8d ldd r26, Z+30 ; 0x1e1900: b7 8d ldd r27, Z+31 ; 0x1f1902: ec 8d ldd r30, Y+28 ; 0x1c1904: fd 8d ldd r31, Y+29 ; 0x1d1906: 82 87 std Z+10, r24 ; 0x0a1908: 93 87 std Z+11, r25 ; 0x0b190a: a4 87 std Z+12, r26 ; 0x0c190c: b5 87 std Z+13, r27 ; 0x0dfp->fptr = 0; /* File ptr */190e: 16 82 std Z+6, r1 ; 0x061910: 17 82 std Z+7, r1 ; 0x071912: 10 86 std Z+8, r1 ; 0x081914: 11 86 std Z+9, r1 ; 0x09fp->sect_clust = 1; /* Sector counter */1916: 81 e0 ldi r24, 0x01 ; 11918: 83 83 std Z+3, r24 ; 0x03fp->fs = fs; fp->id = fs->id; /* Owner file system object of the file */191a: b5 82 std Z+5, r11 ; 0x05191c: a4 82 std Z+4, r10 ; 0x04191e: d5 01 movw r26, r101920: 8d 91 ld r24, X+1922: 9c 91 ld r25, X1924: 91 83 std Z+1, r25 ; 0x011926: 80 83 st Z, r241928: 20 e0 ldi r18, 0x00 ; 0192a: 30 e0 ldi r19, 0x00 ; 0192c: 37 c0 rjmp .+110 ; 0x199c <f_open+0x714>return FR_OK;192e: 26 e0 ldi r18, 0x06 ; 61930: 30 e0 ldi r19, 0x00 ; 01932: 34 c0 rjmp .+104 ; 0x199c <f_open+0x714>1934: 28 e0 ldi r18, 0x08 ; 81936: 30 e0 ldi r19, 0x00 ; 01938: 31 c0 rjmp .+98 ; 0x199c <f_open+0x714>193a: 22 e0 ldi r18, 0x02 ; 2193c: 30 e0 ldi r19, 0x00 ; 0193e: 2e c0 rjmp .+92 ; 0x199c <f_open+0x714>){CLUST clust;char ds;BYTE *dptr = NULL;FATFS *fs = FatFs;1940: e0 91 0a 01 lds r30, 0x010A1944: f0 91 0b 01 lds r31, 0x010B/* Initialize directory object */clust = fs->dirbase;1948: 84 85 ldd r24, Z+12 ; 0x0c194a: 95 85 ldd r25, Z+13 ; 0x0ddirobj->clust = dirobj->sclust = clust;dirobj->sect = clust2sect(clust);} else#endif{dirobj->clust = dirobj->sclust = 0;194c: 1c 8a std Y+20, r1 ; 0x14194e: 1b 8a std Y+19, r1 ; 0x131950: 1e 8a std Y+22, r1 ; 0x161952: 1d 8a std Y+21, r1 ; 0x15dirobj->sect = clust;1954: aa 27 eor r26, r261956: bb 27 eor r27, r271958: 8f 8b std Y+23, r24 ; 0x17195a: 98 8f std Y+24, r25 ; 0x18195c: a9 8f std Y+25, r26 ; 0x19195e: ba 8f std Y+26, r27 ; 0x1a}dirobj->index = 0;1960: 18 8a std Y+16, r1 ; 0x101962: 1f 86 std Y+15, r1 ; 0x0fdirobj->fs = fs;1964: fa 8b std Y+18, r31 ; 0x121966: e9 8b std Y+17, r30 ; 0x11if (*path == '\0') { /* Null path means the root directory */1968: d6 01 movw r26, r12196a: 8c 91 ld r24, X196c: 88 23 and r24, r24196e: 09 f4 brne .+2 ; 0x1972 <f_open+0x6ea>1970: 91 ce rjmp .-734 ; 0x1694 <f_open+0x40c>1972: cc cd rjmp .-1128 ; 0x150c <f_open+0x284>DWORD dw;if (res != FR_OK) { /* No file, create new */if (res != FR_NO_FILE) return res;res = reserve_direntry(&dirobj, &dir);if (res != FR_OK) return res;memset(dir, 0, 32); /* Initialize the new entry */1974: 80 e2 ldi r24, 0x20 ; 321976: f6 01 movw r30, r121978: 11 92 st Z+, r1197a: 8a 95 dec r24197c: e9 f7 brne .-6 ; 0x1978 <f_open+0x6f0>memcpy(&dir[DIR_Name], fn, 8+3);197e: f6 01 movw r30, r121980: de 01 movw r26, r281982: 11 96 adiw r26, 0x01 ; 11984: 8b e0 ldi r24, 0x0B ; 111986: 0d 90 ld r0, X+1988: 01 92 st Z+, r0198a: 81 50 subi r24, 0x01 ; 1198c: e1 f7 brne .-8 ; 0x1986 <f_open+0x6fe>dir[DIR_NTres] = fn[11];198e: 8c 85 ldd r24, Y+12 ; 0x0c1990: f6 01 movw r30, r121992: 84 87 std Z+12, r24 ; 0x0cmode |= FA_CREATE_ALWAYS;1994: fb 8d ldd r31, Y+27 ; 0x1b1996: f8 60 ori r31, 0x08 ; 81998: fb 8f std Y+27, r31 ; 0x1b199a: 72 cf rjmp .-284 ; 0x1880 <f_open+0x5f8>fp->fptr = 0; /* File ptr */fp->sect_clust = 1; /* Sector counter */fp->fs = fs; fp->id = fs->id; /* Owner file system object of the file */return FR_OK;}199c: c9 01 movw r24, r18199e: e2 e1 ldi r30, 0x12 ; 1819a0: 6d 96 adiw r28, 0x1d ; 2919a2: 0c 94 46 11 jmp 0x228c ; 0x228c <__epilogue_restores__>000019a6 <wait_ready>:/* Wait for card ready *//*-----------------------------------------------------------------------*/staticBYTE wait_ready (void){19a6: 82 e3 ldi r24, 0x32 ; 5019a8: 80 93 10 01 sts 0x0110, r24/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;19ac: 8f ef ldi r24, 0xFF ; 25519ae: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);19b0: 0d b4 in r0, 0x2d ; 4519b2: 07 fe sbrs r0, 719b4: fd cf rjmp .-6 ; 0x19b0 <wait_ready+0xa>return SPDR;19b6: 8e b5 in r24, 0x2e ; 46/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;19b8: 8f ef ldi r24, 0xFF ; 25519ba: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);19bc: 0d b4 in r0, 0x2d ; 4519be: 07 fe sbrs r0, 719c0: fd cf rjmp .-6 ; 0x19bc <wait_ready+0x16>return SPDR;19c2: 8e b5 in r24, 0x2e ; 4619c4: 28 2f mov r18, r2419c6: 33 27 eor r19, r19Timer2 = 50; /* Wait for ready in timeout of 500ms */rcvr_spi();dores = rcvr_spi();while ((res != 0xFF) && Timer2);19c8: 8f 3f cpi r24, 0xFF ; 25519ca: 21 f0 breq .+8 ; 0x19d4 <wait_ready+0x2e>19cc: 80 91 10 01 lds r24, 0x011019d0: 88 23 and r24, r2419d2: 91 f7 brne .-28 ; 0x19b8 <wait_ready+0x12>return res;}19d4: c9 01 movw r24, r1819d6: 08 95 ret000019d8 <rcvr_datablock>:staticBOOL rcvr_datablock (BYTE *buff, /* Data buffer to store received data */UINT btr /* Byte count (must be even number) */){19d8: fc 01 movw r30, r24BYTE token;Timer1 = 10;19da: 8a e0 ldi r24, 0x0A ; 1019dc: 80 93 0f 01 sts 0x010F, r24/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;19e0: 8f ef ldi r24, 0xFF ; 25519e2: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);19e4: 0d b4 in r0, 0x2d ; 4519e6: 07 fe sbrs r0, 719e8: fd cf rjmp .-6 ; 0x19e4 <rcvr_datablock+0xc>return SPDR;19ea: 8e b5 in r24, 0x2e ; 46Timer1 = 10;do { /* Wait for data packet in timeout of 100ms */token = rcvr_spi();} while ((token == 0xFF) && Timer1);19ec: 8f 3f cpi r24, 0xFF ; 25519ee: 29 f4 brne .+10 ; 0x19fa <rcvr_datablock+0x22>19f0: 80 91 0f 01 lds r24, 0x010F19f4: 88 23 and r24, r2419f6: 29 f1 breq .+74 ; 0x1a42 <rcvr_datablock+0x6a>19f8: f3 cf rjmp .-26 ; 0x19e0 <rcvr_datablock+0x8>if(token != 0xFE) return FALSE; /* If not valid data token, retutn with error */19fa: 8e 3f cpi r24, 0xFE ; 25419fc: 11 f5 brne .+68 ; 0x1a42 <rcvr_datablock+0x6a>do { /* Receive the data block into buffer */rcvr_spi_m(buff++);19fe: 8f ef ldi r24, 0xFF ; 2551a00: 8e bd out 0x2e, r24 ; 461a02: 0d b4 in r0, 0x2d ; 451a04: 07 fe sbrs r0, 71a06: fd cf rjmp .-6 ; 0x1a02 <rcvr_datablock+0x2a>1a08: 8e b5 in r24, 0x2e ; 461a0a: 80 83 st Z, r24rcvr_spi_m(buff++);1a0c: 8f ef ldi r24, 0xFF ; 2551a0e: 8e bd out 0x2e, r24 ; 461a10: 0d b4 in r0, 0x2d ; 451a12: 07 fe sbrs r0, 71a14: fd cf rjmp .-6 ; 0x1a10 <rcvr_datablock+0x38>1a16: 8e b5 in r24, 0x2e ; 461a18: 81 83 std Z+1, r24 ; 0x01} while (btr -= 2);1a1a: 62 50 subi r22, 0x02 ; 21a1c: 70 40 sbci r23, 0x00 ; 01a1e: 11 f0 breq .+4 ; 0x1a24 <rcvr_datablock+0x4c>1a20: 32 96 adiw r30, 0x02 ; 21a22: ed cf rjmp .-38 ; 0x19fe <rcvr_datablock+0x26>/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1a24: 8f ef ldi r24, 0xFF ; 2551a26: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1a28: 0d b4 in r0, 0x2d ; 451a2a: 07 fe sbrs r0, 71a2c: fd cf rjmp .-6 ; 0x1a28 <rcvr_datablock+0x50>return SPDR;1a2e: 8e b5 in r24, 0x2e ; 46/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1a30: 8f ef ldi r24, 0xFF ; 2551a32: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1a34: 0d b4 in r0, 0x2d ; 451a36: 07 fe sbrs r0, 71a38: fd cf rjmp .-6 ; 0x1a34 <rcvr_datablock+0x5c>return SPDR;1a3a: 8e b5 in r24, 0x2e ; 461a3c: 81 e0 ldi r24, 0x01 ; 11a3e: 90 e0 ldi r25, 0x00 ; 01a40: 08 95 retrcvr_spi_m(buff++);} while (btr -= 2);rcvr_spi(); /* Discard CRC */rcvr_spi();return TRUE; /* Return with success */1a42: 80 e0 ldi r24, 0x00 ; 01a44: 90 e0 ldi r25, 0x00 ; 0}1a46: 08 95 ret00001a48 <xmit_datablock>:staticBOOL xmit_datablock (const BYTE *buff, /* 512 byte data block to be transmitted */BYTE token /* Data/Stop token */){1a48: 1f 93 push r171a4a: cf 93 push r281a4c: df 93 push r291a4e: ec 01 movw r28, r241a50: 16 2f mov r17, r22BYTE resp, wc;if (wait_ready() != 0xFF) return FALSE;1a52: 0e 94 d3 0c call 0x19a6 ; 0x19a6 <wait_ready>1a56: 8f 3f cpi r24, 0xFF ; 2551a58: 19 f0 breq .+6 ; 0x1a60 <xmit_datablock+0x18>1a5a: 80 e0 ldi r24, 0x00 ; 01a5c: 90 e0 ldi r25, 0x00 ; 01a5e: 31 c0 rjmp .+98 ; 0x1ac2 <xmit_datablock+0x7a>xmit_spi(token); /* Xmit data token */1a60: 1e bd out 0x2e, r17 ; 461a62: 0d b4 in r0, 0x2d ; 451a64: 07 fe sbrs r0, 71a66: fd cf rjmp .-6 ; 0x1a62 <xmit_datablock+0x1a>if (token != 0xFD) { /* Is data token */1a68: 1d 3f cpi r17, 0xFD ; 2531a6a: 19 f4 brne .+6 ; 0x1a72 <xmit_datablock+0x2a>1a6c: 81 e0 ldi r24, 0x01 ; 11a6e: 90 e0 ldi r25, 0x00 ; 01a70: 28 c0 rjmp .+80 ; 0x1ac2 <xmit_datablock+0x7a>1a72: 90 e0 ldi r25, 0x00 ; 0wc = 0;do { /* Xmit the 512 byte data block to MMC */xmit_spi(*buff++);1a74: 88 81 ld r24, Y1a76: 8e bd out 0x2e, r24 ; 461a78: 0d b4 in r0, 0x2d ; 451a7a: 07 fe sbrs r0, 71a7c: fd cf rjmp .-6 ; 0x1a78 <xmit_datablock+0x30>xmit_spi(*buff++);1a7e: 89 81 ldd r24, Y+1 ; 0x011a80: 8e bd out 0x2e, r24 ; 461a82: 0d b4 in r0, 0x2d ; 451a84: 07 fe sbrs r0, 71a86: fd cf rjmp .-6 ; 0x1a82 <xmit_datablock+0x3a>} while (--wc);1a88: 91 50 subi r25, 0x01 ; 11a8a: 11 f0 breq .+4 ; 0x1a90 <xmit_datablock+0x48>1a8c: 22 96 adiw r28, 0x02 ; 21a8e: f2 cf rjmp .-28 ; 0x1a74 <xmit_datablock+0x2c>xmit_spi(0xFF); /* CRC (Dummy) */1a90: 8f ef ldi r24, 0xFF ; 2551a92: 8e bd out 0x2e, r24 ; 461a94: 0d b4 in r0, 0x2d ; 451a96: 07 fe sbrs r0, 71a98: fd cf rjmp .-6 ; 0x1a94 <xmit_datablock+0x4c>xmit_spi(0xFF);1a9a: 8f ef ldi r24, 0xFF ; 2551a9c: 8e bd out 0x2e, r24 ; 461a9e: 0d b4 in r0, 0x2d ; 451aa0: 07 fe sbrs r0, 71aa2: fd cf rjmp .-6 ; 0x1a9e <xmit_datablock+0x56>/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1aa4: 8f ef ldi r24, 0xFF ; 2551aa6: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1aa8: 0d b4 in r0, 0x2d ; 451aaa: 07 fe sbrs r0, 71aac: fd cf rjmp .-6 ; 0x1aa8 <xmit_datablock+0x60>return SPDR;1aae: 8e b5 in r24, 0x2e ; 461ab0: 90 e0 ldi r25, 0x00 ; 01ab2: 8f 71 andi r24, 0x1F ; 311ab4: 85 30 cpi r24, 0x05 ; 51ab6: 09 f0 breq .+2 ; 0x1aba <xmit_datablock+0x72>1ab8: 91 e0 ldi r25, 0x01 ; 11aba: 81 e0 ldi r24, 0x01 ; 11abc: 98 27 eor r25, r241abe: 89 2f mov r24, r251ac0: 99 27 eor r25, r251ac2: df 91 pop r291ac4: cf 91 pop r281ac6: 1f 91 pop r171ac8: 08 95 ret00001aca <send_cmd>:staticBYTE send_cmd (BYTE cmd, /* Command byte */DWORD arg /* Argument */){1aca: df 92 push r131acc: ef 92 push r141ace: ff 92 push r151ad0: 0f 93 push r161ad2: 1f 93 push r171ad4: d8 2e mov r13, r241ad6: 7a 01 movw r14, r201ad8: 8b 01 movw r16, r22BYTE n, res;if (wait_ready() != 0xFF) return 0xFF;1ada: 0e 94 d3 0c call 0x19a6 ; 0x19a6 <wait_ready>1ade: 8f 3f cpi r24, 0xFF ; 2551ae0: 19 f0 breq .+6 ; 0x1ae8 <send_cmd+0x1e>1ae2: 2f ef ldi r18, 0xFF ; 2551ae4: 30 e0 ldi r19, 0x00 ; 01ae6: 44 c0 rjmp .+136 ; 0x1b70 <send_cmd+0xa6>/* Send command packet */xmit_spi(cmd); /* Command */1ae8: de bc out 0x2e, r13 ; 461aea: 0d b4 in r0, 0x2d ; 451aec: 07 fe sbrs r0, 71aee: fd cf rjmp .-6 ; 0x1aea <send_cmd+0x20>xmit_spi((BYTE)(arg >> 24)); /* Argument[31..24] */1af0: 81 2f mov r24, r171af2: 99 27 eor r25, r251af4: aa 27 eor r26, r261af6: bb 27 eor r27, r271af8: 8e bd out 0x2e, r24 ; 461afa: 0d b4 in r0, 0x2d ; 451afc: 07 fe sbrs r0, 71afe: fd cf rjmp .-6 ; 0x1afa <send_cmd+0x30>xmit_spi((BYTE)(arg >> 16)); /* Argument[23..16] */1b00: c8 01 movw r24, r161b02: aa 27 eor r26, r261b04: bb 27 eor r27, r271b06: 8e bd out 0x2e, r24 ; 461b08: 0d b4 in r0, 0x2d ; 451b0a: 07 fe sbrs r0, 71b0c: fd cf rjmp .-6 ; 0x1b08 <send_cmd+0x3e>xmit_spi((BYTE)(arg >> 8)); /* Argument[15..8] */1b0e: bb 27 eor r27, r271b10: a1 2f mov r26, r171b12: 90 2f mov r25, r161b14: 8f 2d mov r24, r151b16: 8e bd out 0x2e, r24 ; 461b18: 0d b4 in r0, 0x2d ; 451b1a: 07 fe sbrs r0, 71b1c: fd cf rjmp .-6 ; 0x1b18 <send_cmd+0x4e>xmit_spi((BYTE)arg); /* Argument[7..0] */1b1e: ee bc out 0x2e, r14 ; 461b20: 0d b4 in r0, 0x2d ; 451b22: 07 fe sbrs r0, 71b24: fd cf rjmp .-6 ; 0x1b20 <send_cmd+0x56>n = 0;if (cmd == CMD0) n = 0x95; /* CRC for CMD0(0) */1b26: 80 e4 ldi r24, 0x40 ; 641b28: d8 16 cp r13, r241b2a: 11 f4 brne .+4 ; 0x1b30 <send_cmd+0x66>1b2c: 85 e9 ldi r24, 0x95 ; 1491b2e: 06 c0 rjmp .+12 ; 0x1b3c <send_cmd+0x72>if (cmd == CMD8) n = 0x87; /* CRC for CMD8(0x1AA) */1b30: 88 e4 ldi r24, 0x48 ; 721b32: d8 16 cp r13, r241b34: 11 f4 brne .+4 ; 0x1b3a <send_cmd+0x70>1b36: 87 e8 ldi r24, 0x87 ; 1351b38: 01 c0 rjmp .+2 ; 0x1b3c <send_cmd+0x72>1b3a: 80 e0 ldi r24, 0x00 ; 0xmit_spi(n);1b3c: 8e bd out 0x2e, r24 ; 461b3e: 0d b4 in r0, 0x2d ; 451b40: 07 fe sbrs r0, 71b42: fd cf rjmp .-6 ; 0x1b3e <send_cmd+0x74>/* Receive command response */if (cmd == CMD12) rcvr_spi(); /* Skip a stuff byte when stop reading */1b44: 8c e4 ldi r24, 0x4C ; 761b46: d8 16 cp r13, r241b48: 31 f4 brne .+12 ; 0x1b56 <send_cmd+0x8c>/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1b4a: 8f ef ldi r24, 0xFF ; 2551b4c: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1b4e: 0d b4 in r0, 0x2d ; 451b50: 07 fe sbrs r0, 71b52: fd cf rjmp .-6 ; 0x1b4e <send_cmd+0x84>return SPDR;1b54: 8e b5 in r24, 0x2e ; 461b56: 9a e0 ldi r25, 0x0A ; 10/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1b58: 8f ef ldi r24, 0xFF ; 2551b5a: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1b5c: 0d b4 in r0, 0x2d ; 451b5e: 07 fe sbrs r0, 71b60: fd cf rjmp .-6 ; 0x1b5c <send_cmd+0x92>return SPDR;1b62: 8e b5 in r24, 0x2e ; 461b64: 28 2f mov r18, r241b66: 33 27 eor r19, r19/* Receive command response */if (cmd == CMD12) rcvr_spi(); /* Skip a stuff byte when stop reading */n = 10; /* Wait for a valid response in timeout of 10 attempts */dores = rcvr_spi();while ((res & 0x80) && --n);1b68: 87 ff sbrs r24, 71b6a: 02 c0 rjmp .+4 ; 0x1b70 <send_cmd+0xa6>1b6c: 91 50 subi r25, 0x01 ; 11b6e: a1 f7 brne .-24 ; 0x1b58 <send_cmd+0x8e>return res; /* Return with the response value */}1b70: c9 01 movw r24, r181b72: 1f 91 pop r171b74: 0f 91 pop r161b76: ff 90 pop r151b78: ef 90 pop r141b7a: df 90 pop r131b7c: 08 95 ret00001b7e <disk_status>:/*-----------------------------------------------------------------------*/DSTATUS disk_status (BYTE drv /* Physical drive nmuber (0) */){1b7e: 88 23 and r24, r241b80: 19 f0 breq .+6 ; 0x1b88 <disk_status+0xa>if (drv) return STA_NOINIT; /* Supports only single drive */1b82: 81 e0 ldi r24, 0x01 ; 11b84: 90 e0 ldi r25, 0x00 ; 01b86: 08 95 retreturn Stat;1b88: 80 91 04 01 lds r24, 0x01041b8c: 99 27 eor r25, r25}1b8e: 08 95 ret00001b90 <disk_timerproc>:/* Device timer interrupt procedure *//* This must be called in period of 10ms *//* (Platform dependent) */void disk_timerproc (void){1b90: 80 91 0f 01 lds r24, 0x010Fstatic BYTE pv;BYTE n, s;n = Timer1; /* 100Hz decrement timer */if (n) Timer1 = --n;1b94: 88 23 and r24, r241b96: 19 f0 breq .+6 ; 0x1b9e <disk_timerproc+0xe>1b98: 81 50 subi r24, 0x01 ; 11b9a: 80 93 0f 01 sts 0x010F, r24n = Timer2;1b9e: 80 91 10 01 lds r24, 0x0110if (n) Timer2 = --n;1ba2: 88 23 and r24, r241ba4: 19 f0 breq .+6 ; 0x1bac <disk_timerproc+0x1c>1ba6: 81 50 subi r24, 0x01 ; 11ba8: 80 93 10 01 sts 0x0110, r24n = pv;1bac: 90 91 0e 01 lds r25, 0x010Epv = SOCKPORT & (SOCKINS); /* Sample socket switch */1bb0: 83 b1 in r24, 0x03 ; 31bb2: 81 70 andi r24, 0x01 ; 11bb4: 80 93 0e 01 sts 0x010E, r24if (n == pv) { /* Have contacts stabled? */1bb8: 98 17 cp r25, r241bba: 49 f4 brne .+18 ; 0x1bce <disk_timerproc+0x3e>s = Stat;1bbc: 80 91 04 01 lds r24, 0x0104if (pv & SOCKINS) /* INS = H (Socket empty) */1bc0: 90 ff sbrs r25, 01bc2: 02 c0 rjmp .+4 ; 0x1bc8 <disk_timerproc+0x38>s |= (STA_NODISK | STA_NOINIT);1bc4: 83 60 ori r24, 0x03 ; 31bc6: 01 c0 rjmp .+2 ; 0x1bca <disk_timerproc+0x3a>else /* INS = L (Card inserted) */s &= ~STA_NODISK;1bc8: 8d 7f andi r24, 0xFD ; 253Stat = s;1bca: 80 93 04 01 sts 0x0104, r241bce: 08 95 ret00001bd0 <disk_ioctl>:DRESULT disk_ioctl (BYTE drv, /* Physical drive nmuber (0) */BYTE ctrl, /* Control code */void *buff /* Buffer to send/receive data block */){1bd0: a0 e1 ldi r26, 0x10 ; 161bd2: b0 e0 ldi r27, 0x00 ; 01bd4: ee ee ldi r30, 0xEE ; 2381bd6: fd e0 ldi r31, 0x0D ; 131bd8: 0c 94 38 11 jmp 0x2270 ; 0x2270 <__prologue_saves__+0x1c>1bdc: fa 01 movw r30, r20DRESULT res;BYTE n, csd[16], *ptr = buff;WORD csize;if (drv) return RES_PARERR;1bde: 88 23 and r24, r241be0: 19 f0 breq .+6 ; 0x1be8 <disk_ioctl+0x18>1be2: 24 e0 ldi r18, 0x04 ; 41be4: 30 e0 ldi r19, 0x00 ; 01be6: da c0 rjmp .+436 ; 0x1d9c <disk_ioctl+0x1cc>BYTE ctrl, /* Control code */void *buff /* Buffer to send/receive data block */){DRESULT res;BYTE n, csd[16], *ptr = buff;1be8: 8a 01 movw r16, r20WORD csize;if (drv) return RES_PARERR;SELECT(); /* CS = L */1bea: 2a 98 cbi 0x05, 2 ; 5res = RES_ERROR;switch (ctrl) {1bec: 63 30 cpi r22, 0x03 ; 31bee: 09 f4 brne .+2 ; 0x1bf2 <disk_ioctl+0x22>1bf0: 82 c0 rjmp .+260 ; 0x1cf6 <disk_ioctl+0x126>1bf2: 64 30 cpi r22, 0x04 ; 41bf4: 28 f4 brcc .+10 ; 0x1c00 <disk_ioctl+0x30>1bf6: 61 30 cpi r22, 0x01 ; 11bf8: 79 f0 breq .+30 ; 0x1c18 <disk_ioctl+0x48>1bfa: 62 30 cpi r22, 0x02 ; 21bfc: 51 f4 brne .+20 ; 0x1c12 <disk_ioctl+0x42>1bfe: 74 c0 rjmp .+232 ; 0x1ce8 <disk_ioctl+0x118>1c00: 6b 30 cpi r22, 0x0B ; 111c02: 09 f4 brne .+2 ; 0x1c06 <disk_ioctl+0x36>1c04: 88 c0 rjmp .+272 ; 0x1d16 <disk_ioctl+0x146>1c06: 6c 30 cpi r22, 0x0C ; 121c08: 09 f4 brne .+2 ; 0x1c0c <disk_ioctl+0x3c>1c0a: 9f c0 rjmp .+318 ; 0x1d4a <disk_ioctl+0x17a>1c0c: 6a 30 cpi r22, 0x0A ; 101c0e: 09 f4 brne .+2 ; 0x1c12 <disk_ioctl+0x42>1c10: 78 c0 rjmp .+240 ; 0x1d02 <disk_ioctl+0x132>1c12: 24 e0 ldi r18, 0x04 ; 41c14: 30 e0 ldi r19, 0x00 ; 01c16: b8 c0 rjmp .+368 ; 0x1d88 <disk_ioctl+0x1b8>case GET_SECTOR_COUNT : /* Get number of sectors on the disk (DWORD) */if ((send_cmd(CMD9, 0) == 0) && rcvr_datablock(csd, 16)) {1c18: 40 e0 ldi r20, 0x00 ; 01c1a: 50 e0 ldi r21, 0x00 ; 01c1c: 60 e0 ldi r22, 0x00 ; 01c1e: 70 e0 ldi r23, 0x00 ; 01c20: 89 e4 ldi r24, 0x49 ; 731c22: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1c26: 88 23 and r24, r241c28: 09 f0 breq .+2 ; 0x1c2c <disk_ioctl+0x5c>1c2a: ac c0 rjmp .+344 ; 0x1d84 <disk_ioctl+0x1b4>1c2c: 60 e1 ldi r22, 0x10 ; 161c2e: 70 e0 ldi r23, 0x00 ; 01c30: ce 01 movw r24, r281c32: 01 96 adiw r24, 0x01 ; 11c34: 0e 94 ec 0c call 0x19d8 ; 0x19d8 <rcvr_datablock>1c38: 88 23 and r24, r241c3a: 09 f4 brne .+2 ; 0x1c3e <disk_ioctl+0x6e>1c3c: a3 c0 rjmp .+326 ; 0x1d84 <disk_ioctl+0x1b4>if ((csd[0] >> 6) == 1) { /* SDC ver 2.00 */1c3e: 89 81 ldd r24, Y+1 ; 0x011c40: 82 95 swap r241c42: 86 95 lsr r241c44: 86 95 lsr r241c46: 83 70 andi r24, 0x03 ; 31c48: 7a 85 ldd r23, Y+10 ; 0x0a1c4a: 49 85 ldd r20, Y+9 ; 0x091c4c: 81 30 cpi r24, 0x01 ; 11c4e: c1 f4 brne .+48 ; 0x1c80 <disk_ioctl+0xb0>csize = csd[9] + ((WORD)csd[8] << 8) + 1;*(DWORD*)buff = (DWORD)csize << 10;1c50: 87 2f mov r24, r231c52: 99 27 eor r25, r251c54: 01 96 adiw r24, 0x01 ; 11c56: 24 2f mov r18, r201c58: 33 27 eor r19, r191c5a: 32 2f mov r19, r181c5c: 22 27 eor r18, r181c5e: 82 0f add r24, r181c60: 93 1f adc r25, r191c62: aa 27 eor r26, r261c64: bb 27 eor r27, r271c66: 6a e0 ldi r22, 0x0A ; 101c68: 88 0f add r24, r241c6a: 99 1f adc r25, r251c6c: aa 1f adc r26, r261c6e: bb 1f adc r27, r271c70: 6a 95 dec r221c72: d1 f7 brne .-12 ; 0x1c68 <disk_ioctl+0x98>1c74: f8 01 movw r30, r161c76: 80 83 st Z, r241c78: 91 83 std Z+1, r25 ; 0x011c7a: a2 83 std Z+2, r26 ; 0x021c7c: b3 83 std Z+3, r27 ; 0x031c7e: 38 c0 rjmp .+112 ; 0x1cf0 <disk_ioctl+0x120>} else { /* MMC or SDC ver 1.XX */n = (csd[5] & 15) + ((csd[10] & 128) >> 7) + ((csd[9] & 3) << 1) + 2;csize = (csd[8] >> 6) + ((WORD)csd[7] << 2) + ((WORD)(csd[6] & 3) << 10) + 1;*(DWORD*)buff = (DWORD)csize << (n - 9);1c80: 42 95 swap r201c82: 46 95 lsr r201c84: 46 95 lsr r201c86: 43 70 andi r20, 0x03 ; 31c88: 28 85 ldd r18, Y+8 ; 0x081c8a: 33 27 eor r19, r191c8c: 22 0f add r18, r181c8e: 33 1f adc r19, r191c90: 22 0f add r18, r181c92: 33 1f adc r19, r191c94: 24 0f add r18, r201c96: 31 1d adc r19, r11c98: 2f 5f subi r18, 0xFF ; 2551c9a: 3f 4f sbci r19, 0xFF ; 2551c9c: 8f 81 ldd r24, Y+7 ; 0x071c9e: 99 27 eor r25, r251ca0: 83 70 andi r24, 0x03 ; 31ca2: 90 70 andi r25, 0x00 ; 01ca4: 98 2f mov r25, r241ca6: 88 27 eor r24, r241ca8: 99 0f add r25, r251caa: 99 0f add r25, r251cac: 28 0f add r18, r241cae: 39 1f adc r19, r251cb0: 44 27 eor r20, r201cb2: 55 27 eor r21, r211cb4: 6e 81 ldd r22, Y+6 ; 0x061cb6: 6f 70 andi r22, 0x0F ; 151cb8: 6e 5f subi r22, 0xFE ; 2541cba: 73 70 andi r23, 0x03 ; 31cbc: 77 0f add r23, r231cbe: 67 0f add r22, r231cc0: 8b 85 ldd r24, Y+11 ; 0x0b1cc2: 88 1f adc r24, r241cc4: 88 27 eor r24, r241cc6: 88 1f adc r24, r241cc8: 86 0f add r24, r221cca: 99 27 eor r25, r251ccc: 09 97 sbiw r24, 0x09 ; 91cce: 04 c0 rjmp .+8 ; 0x1cd8 <disk_ioctl+0x108>1cd0: 22 0f add r18, r181cd2: 33 1f adc r19, r191cd4: 44 1f adc r20, r201cd6: 55 1f adc r21, r211cd8: 8a 95 dec r241cda: d2 f7 brpl .-12 ; 0x1cd0 <disk_ioctl+0x100>1cdc: f8 01 movw r30, r161cde: 20 83 st Z, r181ce0: 31 83 std Z+1, r19 ; 0x011ce2: 42 83 std Z+2, r20 ; 0x021ce4: 53 83 std Z+3, r21 ; 0x031ce6: 04 c0 rjmp .+8 ; 0x1cf0 <disk_ioctl+0x120>res = RES_OK;}break;case GET_SECTOR_SIZE : /* Get sectors on the disk (WORD) */*(WORD*)buff = 512;1ce8: 80 e0 ldi r24, 0x00 ; 01cea: 92 e0 ldi r25, 0x02 ; 21cec: 91 83 std Z+1, r25 ; 0x011cee: 80 83 st Z, r241cf0: 20 e0 ldi r18, 0x00 ; 01cf2: 30 e0 ldi r19, 0x00 ; 01cf4: 49 c0 rjmp .+146 ; 0x1d88 <disk_ioctl+0x1b8>res = RES_OK;break;case CTRL_SYNC : /* Make sure that data has been written */if (wait_ready() == 0xFF)1cf6: 0e 94 d3 0c call 0x19a6 ; 0x19a6 <wait_ready>1cfa: 90 e0 ldi r25, 0x00 ; 01cfc: 8f 3f cpi r24, 0xFF ; 2551cfe: 01 f5 brne .+64 ; 0x1d40 <disk_ioctl+0x170>1d00: 1e c0 rjmp .+60 ; 0x1d3e <disk_ioctl+0x16e>res = RES_OK;break;case MMC_GET_CSD : /* Receive CSD as a data block (16 bytes) */if (Stat & STA_NOINIT) return RES_NOTRDY;1d02: 80 91 04 01 lds r24, 0x01041d06: 80 fd sbrc r24, 01d08: 47 c0 rjmp .+142 ; 0x1d98 <disk_ioctl+0x1c8>if ((send_cmd(CMD9, 0) == 0) /* READ_CSD */1d0a: 40 e0 ldi r20, 0x00 ; 01d0c: 50 e0 ldi r21, 0x00 ; 01d0e: 60 e0 ldi r22, 0x00 ; 01d10: 70 e0 ldi r23, 0x00 ; 01d12: 89 e4 ldi r24, 0x49 ; 731d14: 09 c0 rjmp .+18 ; 0x1d28 <disk_ioctl+0x158>&& rcvr_datablock(ptr, 16))res = RES_OK;break;case MMC_GET_CID : /* Receive CID as a data block (16 bytes) */if (Stat & STA_NOINIT) return RES_NOTRDY;1d16: 80 91 04 01 lds r24, 0x01041d1a: 80 fd sbrc r24, 01d1c: 3d c0 rjmp .+122 ; 0x1d98 <disk_ioctl+0x1c8>if ((send_cmd(CMD10, 0) == 0) /* READ_CID */1d1e: 40 e0 ldi r20, 0x00 ; 01d20: 50 e0 ldi r21, 0x00 ; 01d22: 60 e0 ldi r22, 0x00 ; 01d24: 70 e0 ldi r23, 0x00 ; 01d26: 8a e4 ldi r24, 0x4A ; 741d28: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1d2c: 88 23 and r24, r241d2e: 51 f5 brne .+84 ; 0x1d84 <disk_ioctl+0x1b4>1d30: 60 e1 ldi r22, 0x10 ; 161d32: 70 e0 ldi r23, 0x00 ; 01d34: c8 01 movw r24, r161d36: 0e 94 ec 0c call 0x19d8 ; 0x19d8 <rcvr_datablock>1d3a: 90 e0 ldi r25, 0x00 ; 01d3c: 81 11 cpse r24, r11d3e: 91 e0 ldi r25, 0x01 ; 11d40: 81 e0 ldi r24, 0x01 ; 11d42: 98 27 eor r25, r241d44: 29 2f mov r18, r251d46: 33 27 eor r19, r191d48: 1f c0 rjmp .+62 ; 0x1d88 <disk_ioctl+0x1b8>&& rcvr_datablock(ptr, 16))res = RES_OK;break;case MMC_GET_OCR : /* Receive OCR as an R3 resp (4 bytes) */if (Stat & STA_NOINIT) return RES_NOTRDY;1d4a: 80 91 04 01 lds r24, 0x01041d4e: 80 fd sbrc r24, 01d50: 23 c0 rjmp .+70 ; 0x1d98 <disk_ioctl+0x1c8>if (send_cmd(CMD58, 0) == 0) { /* READ_OCR */1d52: 40 e0 ldi r20, 0x00 ; 01d54: 50 e0 ldi r21, 0x00 ; 01d56: 60 e0 ldi r22, 0x00 ; 01d58: 70 e0 ldi r23, 0x00 ; 01d5a: 8a e7 ldi r24, 0x7A ; 1221d5c: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1d60: 88 23 and r24, r241d62: 81 f4 brne .+32 ; 0x1d84 <disk_ioctl+0x1b4>1d64: 90 e0 ldi r25, 0x00 ; 0/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1d66: 8f ef ldi r24, 0xFF ; 2551d68: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1d6a: 0d b4 in r0, 0x2d ; 451d6c: 07 fe sbrs r0, 71d6e: fd cf rjmp .-6 ; 0x1d6a <disk_ioctl+0x19a>return SPDR;1d70: 8e b5 in r24, 0x2e ; 46case MMC_GET_OCR : /* Receive OCR as an R3 resp (4 bytes) */if (Stat & STA_NOINIT) return RES_NOTRDY;if (send_cmd(CMD58, 0) == 0) { /* READ_OCR */for (n = 0; n < 4; n++)*ptr++ = rcvr_spi();1d72: f8 01 movw r30, r161d74: 80 83 st Z, r24break;case MMC_GET_OCR : /* Receive OCR as an R3 resp (4 bytes) */if (Stat & STA_NOINIT) return RES_NOTRDY;if (send_cmd(CMD58, 0) == 0) { /* READ_OCR */for (n = 0; n < 4; n++)1d76: 9f 5f subi r25, 0xFF ; 2551d78: 94 30 cpi r25, 0x04 ; 41d7a: 09 f4 brne .+2 ; 0x1d7e <disk_ioctl+0x1ae>1d7c: b9 cf rjmp .-142 ; 0x1cf0 <disk_ioctl+0x120>*ptr++ = rcvr_spi();1d7e: 0f 5f subi r16, 0xFF ; 2551d80: 1f 4f sbci r17, 0xFF ; 2551d82: f1 cf rjmp .-30 ; 0x1d66 <disk_ioctl+0x196>1d84: 21 e0 ldi r18, 0x01 ; 11d86: 30 e0 ldi r19, 0x00 ; 0default:res = RES_PARERR;}DESELECT(); /* CS = H */1d88: 2a 9a sbi 0x05, 2 ; 5/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1d8a: 8f ef ldi r24, 0xFF ; 2551d8c: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1d8e: 0d b4 in r0, 0x2d ; 451d90: 07 fe sbrs r0, 71d92: fd cf rjmp .-6 ; 0x1d8e <disk_ioctl+0x1be>return SPDR;1d94: 8e b5 in r24, 0x2e ; 461d96: 02 c0 rjmp .+4 ; 0x1d9c <disk_ioctl+0x1cc>}DESELECT(); /* CS = H */rcvr_spi(); /* Idle (Release DO) */return res;1d98: 23 e0 ldi r18, 0x03 ; 31d9a: 30 e0 ldi r19, 0x00 ; 0}1d9c: c9 01 movw r24, r181d9e: e4 e0 ldi r30, 0x04 ; 41da0: 60 96 adiw r28, 0x10 ; 161da2: 0c 94 54 11 jmp 0x22a8 ; 0x22a8 <__epilogue_restores__+0x1c>00001da6 <disk_write>:BYTE drv, /* Physical drive nmuber (0) */const BYTE *buff, /* Pointer to the data to be written */DWORD sector, /* Start sector number (LBA) */BYTE count /* Sector count (1..255) */){1da6: cf 92 push r121da8: df 92 push r131daa: ef 92 push r141dac: ff 92 push r151dae: 0f 93 push r161db0: cf 93 push r281db2: df 93 push r291db4: eb 01 movw r28, r221db6: 69 01 movw r12, r181db8: 7a 01 movw r14, r20if (drv || !count) return RES_PARERR;1dba: 88 23 and r24, r241dbc: 09 f0 breq .+2 ; 0x1dc0 <disk_write+0x1a>1dbe: 67 c0 rjmp .+206 ; 0x1e8e <disk_write+0xe8>1dc0: 00 23 and r16, r161dc2: 09 f4 brne .+2 ; 0x1dc6 <disk_write+0x20>1dc4: 64 c0 rjmp .+200 ; 0x1e8e <disk_write+0xe8>if (Stat & STA_NOINIT) return RES_NOTRDY;1dc6: 80 91 04 01 lds r24, 0x01041dca: 80 ff sbrs r24, 01dcc: 03 c0 rjmp .+6 ; 0x1dd4 <disk_write+0x2e>1dce: 83 e0 ldi r24, 0x03 ; 31dd0: 90 e0 ldi r25, 0x00 ; 01dd2: 5f c0 rjmp .+190 ; 0x1e92 <disk_write+0xec>if (Stat & STA_PROTECT) return RES_WRPRT;1dd4: 80 91 04 01 lds r24, 0x01041dd8: 82 ff sbrs r24, 21dda: 03 c0 rjmp .+6 ; 0x1de2 <disk_write+0x3c>1ddc: 82 e0 ldi r24, 0x02 ; 21dde: 90 e0 ldi r25, 0x00 ; 01de0: 58 c0 rjmp .+176 ; 0x1e92 <disk_write+0xec>if (!(CardType & 4)) sector *= 512; /* Convert to byte address if needed */1de2: 80 91 11 01 lds r24, 0x01111de6: 99 27 eor r25, r251de8: 82 fd sbrc r24, 21dea: 07 c0 rjmp .+14 ; 0x1dfa <disk_write+0x54>1dec: e9 e0 ldi r30, 0x09 ; 91dee: cc 0c add r12, r121df0: dd 1c adc r13, r131df2: ee 1c adc r14, r141df4: ff 1c adc r15, r151df6: ea 95 dec r301df8: d1 f7 brne .-12 ; 0x1dee <disk_write+0x48>SELECT(); /* CS = L */1dfa: 2a 98 cbi 0x05, 2 ; 5if (count == 1) { /* Single block write */1dfc: 01 30 cpi r16, 0x01 ; 11dfe: 79 f4 brne .+30 ; 0x1e1e <disk_write+0x78>if ((send_cmd(CMD24, sector) == 0) /* WRITE_BLOCK */1e00: b7 01 movw r22, r141e02: a6 01 movw r20, r121e04: 88 e5 ldi r24, 0x58 ; 881e06: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1e0a: 88 23 and r24, r241e0c: 91 f5 brne .+100 ; 0x1e72 <disk_write+0xcc>1e0e: 6e ef ldi r22, 0xFE ; 2541e10: ce 01 movw r24, r281e12: 0e 94 24 0d call 0x1a48 ; 0x1a48 <xmit_datablock>1e16: 81 11 cpse r24, r11e18: 81 e0 ldi r24, 0x01 ; 11e1a: 08 27 eor r16, r241e1c: 2a c0 rjmp .+84 ; 0x1e72 <disk_write+0xcc>&& xmit_datablock(buff, 0xFE))count = 0;}else { /* Multiple block write */if (CardType & 2) {1e1e: 81 ff sbrs r24, 11e20: 0e c0 rjmp .+28 ; 0x1e3e <disk_write+0x98>send_cmd(CMD55, 0); send_cmd(CMD23, count); /* ACMD23 */1e22: 40 e0 ldi r20, 0x00 ; 01e24: 50 e0 ldi r21, 0x00 ; 01e26: 60 e0 ldi r22, 0x00 ; 01e28: 70 e0 ldi r23, 0x00 ; 01e2a: 87 e7 ldi r24, 0x77 ; 1191e2c: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1e30: 40 2f mov r20, r161e32: 55 27 eor r21, r211e34: 66 27 eor r22, r221e36: 77 27 eor r23, r231e38: 87 e5 ldi r24, 0x57 ; 871e3a: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>}if (send_cmd(CMD25, sector) == 0) { /* WRITE_MULTIPLE_BLOCK */1e3e: b7 01 movw r22, r141e40: a6 01 movw r20, r121e42: 89 e5 ldi r24, 0x59 ; 891e44: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1e48: 88 23 and r24, r241e4a: 99 f4 brne .+38 ; 0x1e72 <disk_write+0xcc>do {if (!xmit_datablock(buff, 0xFC)) break;1e4c: 6c ef ldi r22, 0xFC ; 2521e4e: ce 01 movw r24, r281e50: 0e 94 24 0d call 0x1a48 ; 0x1a48 <xmit_datablock>1e54: 88 23 and r24, r241e56: 29 f0 breq .+10 ; 0x1e62 <disk_write+0xbc>buff += 512;} while (--count);1e58: 01 50 subi r16, 0x01 ; 11e5a: 19 f0 breq .+6 ; 0x1e62 <disk_write+0xbc>send_cmd(CMD55, 0); send_cmd(CMD23, count); /* ACMD23 */}if (send_cmd(CMD25, sector) == 0) { /* WRITE_MULTIPLE_BLOCK */do {if (!xmit_datablock(buff, 0xFC)) break;buff += 512;1e5c: c0 50 subi r28, 0x00 ; 01e5e: de 4f sbci r29, 0xFE ; 2541e60: f5 cf rjmp .-22 ; 0x1e4c <disk_write+0xa6>} while (--count);if (!xmit_datablock(0, 0xFD)) /* STOP_TRAN token */1e62: 6d ef ldi r22, 0xFD ; 2531e64: 80 e0 ldi r24, 0x00 ; 01e66: 90 e0 ldi r25, 0x00 ; 01e68: 0e 94 24 0d call 0x1a48 ; 0x1a48 <xmit_datablock>1e6c: 88 23 and r24, r241e6e: 09 f4 brne .+2 ; 0x1e72 <disk_write+0xcc>1e70: 01 e0 ldi r16, 0x01 ; 1count = 1;}}DESELECT(); /* CS = H */1e72: 2a 9a sbi 0x05, 2 ; 5/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1e74: 8f ef ldi r24, 0xFF ; 2551e76: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1e78: 0d b4 in r0, 0x2d ; 451e7a: 07 fe sbrs r0, 71e7c: fd cf rjmp .-6 ; 0x1e78 <disk_write+0xd2>return SPDR;1e7e: 8e b5 in r24, 0x2e ; 46}DESELECT(); /* CS = H */rcvr_spi(); /* Idle (Release DO) */return count ? RES_ERROR : RES_OK;1e80: 80 e0 ldi r24, 0x00 ; 01e82: 90 e0 ldi r25, 0x00 ; 01e84: 00 23 and r16, r161e86: 29 f0 breq .+10 ; 0x1e92 <disk_write+0xec>1e88: 81 e0 ldi r24, 0x01 ; 11e8a: 90 e0 ldi r25, 0x00 ; 01e8c: 02 c0 rjmp .+4 ; 0x1e92 <disk_write+0xec>1e8e: 84 e0 ldi r24, 0x04 ; 41e90: 90 e0 ldi r25, 0x00 ; 01e92: df 91 pop r291e94: cf 91 pop r281e96: 0f 91 pop r161e98: ff 90 pop r151e9a: ef 90 pop r141e9c: df 90 pop r131e9e: cf 90 pop r121ea0: 08 95 ret00001ea2 <disk_read>:BYTE drv, /* Physical drive nmuber (0) */BYTE *buff, /* Pointer to the data buffer to store read data */DWORD sector, /* Start sector number (LBA) */BYTE count /* Sector count (1..255) */){1ea2: 0f 93 push r161ea4: cf 93 push r281ea6: df 93 push r291ea8: eb 01 movw r28, r22if (drv || !count) return RES_PARERR;1eaa: 88 23 and r24, r241eac: 09 f0 breq .+2 ; 0x1eb0 <disk_read+0xe>1eae: 50 c0 rjmp .+160 ; 0x1f50 <disk_read+0xae>1eb0: 00 23 and r16, r161eb2: 09 f4 brne .+2 ; 0x1eb6 <disk_read+0x14>1eb4: 4d c0 rjmp .+154 ; 0x1f50 <disk_read+0xae>if (Stat & STA_NOINIT) return RES_NOTRDY;1eb6: 80 91 04 01 lds r24, 0x01041eba: 80 ff sbrs r24, 01ebc: 03 c0 rjmp .+6 ; 0x1ec4 <disk_read+0x22>1ebe: 83 e0 ldi r24, 0x03 ; 31ec0: 90 e0 ldi r25, 0x00 ; 01ec2: 48 c0 rjmp .+144 ; 0x1f54 <disk_read+0xb2>if (!(CardType & 4)) sector *= 512; /* Convert to byte address if needed */1ec4: 80 91 11 01 lds r24, 0x01111ec8: 82 fd sbrc r24, 21eca: 07 c0 rjmp .+14 ; 0x1eda <disk_read+0x38>1ecc: f9 e0 ldi r31, 0x09 ; 91ece: 22 0f add r18, r181ed0: 33 1f adc r19, r191ed2: 44 1f adc r20, r201ed4: 55 1f adc r21, r211ed6: fa 95 dec r311ed8: d1 f7 brne .-12 ; 0x1ece <disk_read+0x2c>SELECT(); /* CS = L */1eda: 2a 98 cbi 0x05, 2 ; 5if (count == 1) { /* Single block read */1edc: 01 30 cpi r16, 0x01 ; 11ede: 81 f4 brne .+32 ; 0x1f00 <disk_read+0x5e>if ((send_cmd(CMD17, sector) == 0) /* READ_SINGLE_BLOCK */1ee0: ba 01 movw r22, r201ee2: a9 01 movw r20, r181ee4: 81 e5 ldi r24, 0x51 ; 811ee6: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1eea: 88 23 and r24, r241eec: 19 f5 brne .+70 ; 0x1f34 <disk_read+0x92>1eee: 60 e0 ldi r22, 0x00 ; 01ef0: 72 e0 ldi r23, 0x02 ; 21ef2: ce 01 movw r24, r281ef4: 0e 94 ec 0c call 0x19d8 ; 0x19d8 <rcvr_datablock>1ef8: 81 11 cpse r24, r11efa: 81 e0 ldi r24, 0x01 ; 11efc: 08 27 eor r16, r241efe: 1a c0 rjmp .+52 ; 0x1f34 <disk_read+0x92>&& rcvr_datablock(buff, 512))count = 0;}else { /* Multiple block read */if (send_cmd(CMD18, sector) == 0) { /* READ_MULTIPLE_BLOCK */1f00: ba 01 movw r22, r201f02: a9 01 movw r20, r181f04: 82 e5 ldi r24, 0x52 ; 821f06: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1f0a: 88 23 and r24, r241f0c: 99 f4 brne .+38 ; 0x1f34 <disk_read+0x92>do {if (!rcvr_datablock(buff, 512)) break;1f0e: 60 e0 ldi r22, 0x00 ; 01f10: 72 e0 ldi r23, 0x02 ; 21f12: ce 01 movw r24, r281f14: 0e 94 ec 0c call 0x19d8 ; 0x19d8 <rcvr_datablock>1f18: 88 23 and r24, r241f1a: 29 f0 breq .+10 ; 0x1f26 <disk_read+0x84>buff += 512;} while (--count);1f1c: 01 50 subi r16, 0x01 ; 11f1e: 19 f0 breq .+6 ; 0x1f26 <disk_read+0x84>}else { /* Multiple block read */if (send_cmd(CMD18, sector) == 0) { /* READ_MULTIPLE_BLOCK */do {if (!rcvr_datablock(buff, 512)) break;buff += 512;1f20: c0 50 subi r28, 0x00 ; 01f22: de 4f sbci r29, 0xFE ; 2541f24: f4 cf rjmp .-24 ; 0x1f0e <disk_read+0x6c>} while (--count);send_cmd(CMD12, 0); /* STOP_TRANSMISSION */1f26: 40 e0 ldi r20, 0x00 ; 01f28: 50 e0 ldi r21, 0x00 ; 01f2a: 60 e0 ldi r22, 0x00 ; 01f2c: 70 e0 ldi r23, 0x00 ; 01f2e: 8c e4 ldi r24, 0x4C ; 761f30: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>}}DESELECT(); /* CS = H */1f34: 2a 9a sbi 0x05, 2 ; 5/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1f36: 8f ef ldi r24, 0xFF ; 2551f38: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1f3a: 0d b4 in r0, 0x2d ; 451f3c: 07 fe sbrs r0, 71f3e: fd cf rjmp .-6 ; 0x1f3a <disk_read+0x98>return SPDR;1f40: 8e b5 in r24, 0x2e ; 46}DESELECT(); /* CS = H */rcvr_spi(); /* Idle (Release DO) */return count ? RES_ERROR : RES_OK;1f42: 80 e0 ldi r24, 0x00 ; 01f44: 90 e0 ldi r25, 0x00 ; 01f46: 00 23 and r16, r161f48: 29 f0 breq .+10 ; 0x1f54 <disk_read+0xb2>1f4a: 81 e0 ldi r24, 0x01 ; 11f4c: 90 e0 ldi r25, 0x00 ; 01f4e: 02 c0 rjmp .+4 ; 0x1f54 <disk_read+0xb2>1f50: 84 e0 ldi r24, 0x04 ; 41f52: 90 e0 ldi r25, 0x00 ; 01f54: df 91 pop r291f56: cf 91 pop r281f58: 0f 91 pop r161f5a: 08 95 ret00001f5c <disk_initialize>:/*-----------------------------------------------------------------------*/DSTATUS disk_initialize (BYTE drv /* Physical drive nmuber (0) */){1f5c: a4 e0 ldi r26, 0x04 ; 41f5e: b0 e0 ldi r27, 0x00 ; 01f60: e4 eb ldi r30, 0xB4 ; 1801f62: ff e0 ldi r31, 0x0F ; 151f64: 0c 94 36 11 jmp 0x226c ; 0x226c <__prologue_saves__+0x18>BYTE n, ty, ocr[4];if (drv) return STA_NOINIT; /* Supports only single drive */1f68: 88 23 and r24, r241f6a: 19 f0 breq .+6 ; 0x1f72 <disk_initialize+0x16>1f6c: 81 e0 ldi r24, 0x01 ; 11f6e: 90 e0 ldi r25, 0x00 ; 01f70: d0 c0 rjmp .+416 ; 0x2112 <disk_initialize+0x1b6>if (Stat & STA_NODISK) return Stat; /* No card in the socket */1f72: 80 91 04 01 lds r24, 0x01041f76: 81 fd sbrc r24, 11f78: c9 c0 rjmp .+402 ; 0x210c <disk_initialize+0x1b0>1f7a: 9a e0 ldi r25, 0x0A ; 10/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1f7c: 8f ef ldi r24, 0xFF ; 2551f7e: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1f80: 0d b4 in r0, 0x2d ; 451f82: 07 fe sbrs r0, 71f84: fd cf rjmp .-6 ; 0x1f80 <disk_initialize+0x24>return SPDR;1f86: 8e b5 in r24, 0x2e ; 46if (drv) return STA_NOINIT; /* Supports only single drive */if (Stat & STA_NODISK) return Stat; /* No card in the socket */for (n = 10; n; n--) rcvr_spi(); /* 80 dummy clocks */1f88: 91 50 subi r25, 0x01 ; 11f8a: c1 f7 brne .-16 ; 0x1f7c <disk_initialize+0x20>SELECT(); /* CS = L */1f8c: 2a 98 cbi 0x05, 2 ; 5ty = 0;if (send_cmd(CMD0, 0) == 1) { /* Enter Idle state */1f8e: 40 e0 ldi r20, 0x00 ; 01f90: 50 e0 ldi r21, 0x00 ; 01f92: 60 e0 ldi r22, 0x00 ; 01f94: 70 e0 ldi r23, 0x00 ; 01f96: 80 e4 ldi r24, 0x40 ; 641f98: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1f9c: 81 30 cpi r24, 0x01 ; 11f9e: 09 f0 breq .+2 ; 0x1fa2 <disk_initialize+0x46>1fa0: a0 c0 rjmp .+320 ; 0x20e2 <disk_initialize+0x186>Timer1 = 100; /* Initialization timeout of 1000 msec */1fa2: 84 e6 ldi r24, 0x64 ; 1001fa4: 80 93 0f 01 sts 0x010F, r24if (send_cmd(CMD8, 0x1AA) == 1) { /* SDC Ver2+ */1fa8: 4a ea ldi r20, 0xAA ; 1701faa: 51 e0 ldi r21, 0x01 ; 11fac: 60 e0 ldi r22, 0x00 ; 01fae: 70 e0 ldi r23, 0x00 ; 01fb0: 88 e4 ldi r24, 0x48 ; 721fb2: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>1fb6: 81 30 cpi r24, 0x01 ; 11fb8: 09 f0 breq .+2 ; 0x1fbc <disk_initialize+0x60>1fba: 54 c0 rjmp .+168 ; 0x2064 <disk_initialize+0x108>1fbc: 7e 01 movw r14, r281fbe: 08 94 sec1fc0: e1 1c adc r14, r11fc2: f1 1c adc r15, r11fc4: 87 01 movw r16, r14for (n = 0; n < 4; n++) ocr[n] = rcvr_spi();1fc6: 9e 01 movw r18, r281fc8: 2b 5f subi r18, 0xFB ; 2511fca: 3f 4f sbci r19, 0xFF ; 255/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;1fcc: 8f ef ldi r24, 0xFF ; 2551fce: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);1fd0: 0d b4 in r0, 0x2d ; 451fd2: 07 fe sbrs r0, 71fd4: fd cf rjmp .-6 ; 0x1fd0 <disk_initialize+0x74>return SPDR;1fd6: 8e b5 in r24, 0x2e ; 46SELECT(); /* CS = L */ty = 0;if (send_cmd(CMD0, 0) == 1) { /* Enter Idle state */Timer1 = 100; /* Initialization timeout of 1000 msec */if (send_cmd(CMD8, 0x1AA) == 1) { /* SDC Ver2+ */for (n = 0; n < 4; n++) ocr[n] = rcvr_spi();1fd8: f8 01 movw r30, r161fda: 81 93 st Z+, r241fdc: 8f 01 movw r16, r301fde: e2 17 cp r30, r181fe0: f3 07 cpc r31, r191fe2: a1 f7 brne .-24 ; 0x1fcc <disk_initialize+0x70>if (ocr[2] == 0x01 && ocr[3] == 0xAA) { /* The card can work at vdd range of 2.7-3.6V */1fe4: 8b 81 ldd r24, Y+3 ; 0x031fe6: 81 30 cpi r24, 0x01 ; 11fe8: 09 f0 breq .+2 ; 0x1fec <disk_initialize+0x90>1fea: 7b c0 rjmp .+246 ; 0x20e2 <disk_initialize+0x186>1fec: 8c 81 ldd r24, Y+4 ; 0x041fee: 8a 3a cpi r24, 0xAA ; 1701ff0: 09 f0 breq .+2 ; 0x1ff4 <disk_initialize+0x98>1ff2: 77 c0 rjmp .+238 ; 0x20e2 <disk_initialize+0x186>do {if (send_cmd(CMD55, 0) <= 1 && send_cmd(CMD41, 1UL << 30) == 0) break; /* ACMD41 with HCS bit */1ff4: 40 e0 ldi r20, 0x00 ; 01ff6: 50 e0 ldi r21, 0x00 ; 01ff8: 60 e0 ldi r22, 0x00 ; 01ffa: 70 e0 ldi r23, 0x00 ; 01ffc: 87 e7 ldi r24, 0x77 ; 1191ffe: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>2002: 82 30 cpi r24, 0x02 ; 22004: 48 f4 brcc .+18 ; 0x2018 <disk_initialize+0xbc>2006: 40 e0 ldi r20, 0x00 ; 02008: 50 e0 ldi r21, 0x00 ; 0200a: 60 e0 ldi r22, 0x00 ; 0200c: 70 e4 ldi r23, 0x40 ; 64200e: 89 e6 ldi r24, 0x69 ; 1052010: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>2014: 88 23 and r24, r242016: 21 f0 breq .+8 ; 0x2020 <disk_initialize+0xc4>} while (Timer1);2018: 80 91 0f 01 lds r24, 0x010F201c: 88 23 and r24, r24201e: 51 f7 brne .-44 ; 0x1ff4 <disk_initialize+0x98>if (Timer1 && send_cmd(CMD58, 0) == 0) { /* Check CCS bit */2020: 80 91 0f 01 lds r24, 0x010F2024: 88 23 and r24, r242026: 09 f4 brne .+2 ; 0x202a <disk_initialize+0xce>2028: 5c c0 rjmp .+184 ; 0x20e2 <disk_initialize+0x186>202a: 40 e0 ldi r20, 0x00 ; 0202c: 50 e0 ldi r21, 0x00 ; 0202e: 60 e0 ldi r22, 0x00 ; 02030: 70 e0 ldi r23, 0x00 ; 02032: 8a e7 ldi r24, 0x7A ; 1222034: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>2038: 88 23 and r24, r24203a: 09 f0 breq .+2 ; 0x203e <disk_initialize+0xe2>203c: 52 c0 rjmp .+164 ; 0x20e2 <disk_initialize+0x186>/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;203e: 8f ef ldi r24, 0xFF ; 2552040: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);2042: 0d b4 in r0, 0x2d ; 452044: 07 fe sbrs r0, 72046: fd cf rjmp .-6 ; 0x2042 <disk_initialize+0xe6>return SPDR;2048: 8e b5 in r24, 0x2e ; 46if (ocr[2] == 0x01 && ocr[3] == 0xAA) { /* The card can work at vdd range of 2.7-3.6V */do {if (send_cmd(CMD55, 0) <= 1 && send_cmd(CMD41, 1UL << 30) == 0) break; /* ACMD41 with HCS bit */} while (Timer1);if (Timer1 && send_cmd(CMD58, 0) == 0) { /* Check CCS bit */for (n = 0; n < 4; n++) ocr[n] = rcvr_spi();204a: f7 01 movw r30, r14204c: 81 93 st Z+, r24204e: 7f 01 movw r14, r302050: e0 17 cp r30, r162052: f1 07 cpc r31, r172054: a1 f7 brne .-24 ; 0x203e <disk_initialize+0xe2>ty = (ocr[0] & 0x40) ? 6 : 2;2056: 89 81 ldd r24, Y+1 ; 0x012058: 86 ff sbrs r24, 6205a: 02 c0 rjmp .+4 ; 0x2060 <disk_initialize+0x104>205c: 16 e0 ldi r17, 0x06 ; 6205e: 42 c0 rjmp .+132 ; 0x20e4 <disk_initialize+0x188>2060: 12 e0 ldi r17, 0x02 ; 22062: 40 c0 rjmp .+128 ; 0x20e4 <disk_initialize+0x188>}}} else { /* SDC Ver1 or MMC */ty = (send_cmd(CMD55, 0) <= 1 && send_cmd(CMD41, 0) <= 1) ? 2 : 1; /* SDC : MMC */2064: 40 e0 ldi r20, 0x00 ; 02066: 50 e0 ldi r21, 0x00 ; 02068: 60 e0 ldi r22, 0x00 ; 0206a: 70 e0 ldi r23, 0x00 ; 0206c: 87 e7 ldi r24, 0x77 ; 119206e: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>2072: 82 30 cpi r24, 0x02 ; 22074: 58 f4 brcc .+22 ; 0x208c <disk_initialize+0x130>2076: 40 e0 ldi r20, 0x00 ; 02078: 50 e0 ldi r21, 0x00 ; 0207a: 60 e0 ldi r22, 0x00 ; 0207c: 70 e0 ldi r23, 0x00 ; 0207e: 89 e6 ldi r24, 0x69 ; 1052080: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>2084: 82 30 cpi r24, 0x02 ; 22086: 10 f4 brcc .+4 ; 0x208c <disk_initialize+0x130>2088: 12 e0 ldi r17, 0x02 ; 2208a: 01 c0 rjmp .+2 ; 0x208e <disk_initialize+0x132>208c: 11 e0 ldi r17, 0x01 ; 1do {if (ty == 2) {208e: 12 30 cpi r17, 0x02 ; 22090: 79 f4 brne .+30 ; 0x20b0 <disk_initialize+0x154>if (send_cmd(CMD55, 0) <= 1 && send_cmd(CMD41, 0) == 0) break; /* ACMD41 */2092: 40 e0 ldi r20, 0x00 ; 02094: 50 e0 ldi r21, 0x00 ; 02096: 60 e0 ldi r22, 0x00 ; 02098: 70 e0 ldi r23, 0x00 ; 0209a: 87 e7 ldi r24, 0x77 ; 119209c: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>20a0: 82 30 cpi r24, 0x02 ; 220a2: 78 f4 brcc .+30 ; 0x20c2 <disk_initialize+0x166>20a4: 40 e0 ldi r20, 0x00 ; 020a6: 50 e0 ldi r21, 0x00 ; 020a8: 60 e0 ldi r22, 0x00 ; 020aa: 70 e0 ldi r23, 0x00 ; 020ac: 89 e6 ldi r24, 0x69 ; 10520ae: 05 c0 rjmp .+10 ; 0x20ba <disk_initialize+0x15e>} else {if (send_cmd(CMD1, 0) == 0) break; /* CMD1 */20b0: 40 e0 ldi r20, 0x00 ; 020b2: 50 e0 ldi r21, 0x00 ; 020b4: 60 e0 ldi r22, 0x00 ; 020b6: 70 e0 ldi r23, 0x00 ; 020b8: 81 e4 ldi r24, 0x41 ; 6520ba: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>20be: 88 23 and r24, r2420c0: 21 f0 breq .+8 ; 0x20ca <disk_initialize+0x16e>}} while (Timer1);20c2: 80 91 0f 01 lds r24, 0x010F20c6: 88 23 and r24, r2420c8: 11 f7 brne .-60 ; 0x208e <disk_initialize+0x132>if (!Timer1 || send_cmd(CMD16, 512) != 0) /* Select R/W block length */20ca: 80 91 0f 01 lds r24, 0x010F20ce: 88 23 and r24, r2420d0: 41 f0 breq .+16 ; 0x20e2 <disk_initialize+0x186>20d2: 40 e0 ldi r20, 0x00 ; 020d4: 52 e0 ldi r21, 0x02 ; 220d6: 60 e0 ldi r22, 0x00 ; 020d8: 70 e0 ldi r23, 0x00 ; 020da: 80 e5 ldi r24, 0x50 ; 8020dc: 0e 94 65 0d call 0x1aca ; 0x1aca <send_cmd>20e0: 81 11 cpse r24, r120e2: 10 e0 ldi r17, 0x00 ; 0ty = 0;}}CardType = ty;20e4: 10 93 11 01 sts 0x0111, r17DESELECT(); /* CS = H */20e8: 2a 9a sbi 0x05, 2 ; 5/*-----------------------------------------------------------------------*/staticBYTE rcvr_spi (void){SPDR = 0xFF;20ea: 8f ef ldi r24, 0xFF ; 25520ec: 8e bd out 0x2e, r24 ; 46loop_until_bit_is_set(SPSR, SPIF);20ee: 0d b4 in r0, 0x2d ; 4520f0: 07 fe sbrs r0, 720f2: fd cf rjmp .-6 ; 0x20ee <disk_initialize+0x192>return SPDR;20f4: 8e b5 in r24, 0x2e ; 46}CardType = ty;DESELECT(); /* CS = H */rcvr_spi(); /* Idle (Release DO) */if (ty) { /* Initialization succeded */20f6: 11 23 and r17, r1720f8: 21 f0 breq .+8 ; 0x2102 <disk_initialize+0x1a6>Stat &= ~STA_NOINIT; /* Clear STA_NOINIT */20fa: 80 91 04 01 lds r24, 0x010420fe: 8e 7f andi r24, 0xFE ; 2542100: 03 c0 rjmp .+6 ; 0x2108 <disk_initialize+0x1ac>} else { /* Initialization failed */Stat |= STA_NOINIT; /* Set STA_NOINIT */2102: 80 91 04 01 lds r24, 0x01042106: 81 60 ori r24, 0x01 ; 12108: 80 93 04 01 sts 0x0104, r24}return Stat;210c: 80 91 04 01 lds r24, 0x01042110: 99 27 eor r25, r252112: e6 e0 ldi r30, 0x06 ; 62114: 24 96 adiw r28, 0x04 ; 42116: 0c 94 52 11 jmp 0x22a4 ; 0x22a4 <__epilogue_restores__+0x18>0000211a <strcpy_P>:211a: fb 01 movw r30, r22211c: dc 01 movw r26, r24211e: 05 90 lpm r0, Z+2120: 0d 92 st X+, r02122: 00 20 and r0, r02124: e1 f7 brne .-8 ; 0x211e <strcpy_P+0x4>2126: 08 95 ret00002128 <memcmp>:2128: fb 01 movw r30, r22212a: dc 01 movw r26, r24212c: 04 c0 rjmp .+8 ; 0x2136 <memcmp+0xe>212e: 8d 91 ld r24, X+2130: 01 90 ld r0, Z+2132: 80 19 sub r24, r02134: 21 f4 brne .+8 ; 0x213e <memcmp+0x16>2136: 41 50 subi r20, 0x01 ; 12138: 50 40 sbci r21, 0x00 ; 0213a: c8 f7 brcc .-14 ; 0x212e <memcmp+0x6>213c: 88 1b sub r24, r24213e: 99 0b sbc r25, r252140: 08 95 ret00002142 <memcpy>:2142: fb 01 movw r30, r222144: dc 01 movw r26, r242146: 02 c0 rjmp .+4 ; 0x214c <memcpy+0xa>2148: 01 90 ld r0, Z+214a: 0d 92 st X+, r0214c: 41 50 subi r20, 0x01 ; 1214e: 50 40 sbci r21, 0x00 ; 02150: d8 f7 brcc .-10 ; 0x2148 <memcpy+0x6>2152: 08 95 ret00002154 <memset>:2154: dc 01 movw r26, r242156: 01 c0 rjmp .+2 ; 0x215a <memset+0x6>2158: 6d 93 st X+, r22215a: 41 50 subi r20, 0x01 ; 1215c: 50 40 sbci r21, 0x00 ; 0215e: e0 f7 brcc .-8 ; 0x2158 <memset+0x4>2160: 08 95 ret00002162 <strcpy>:2162: fb 01 movw r30, r222164: dc 01 movw r26, r242166: 01 90 ld r0, Z+2168: 0d 92 st X+, r0216a: 00 20 and r0, r0216c: e1 f7 brne .-8 ; 0x2166 <strcpy+0x4>216e: 08 95 ret00002170 <itoa>:2170: fb 01 movw r30, r222172: 9f 01 movw r18, r302174: e8 94 clt2176: 42 30 cpi r20, 0x02 ; 22178: c4 f0 brlt .+48 ; 0x21aa <itoa+0x3a>217a: 45 32 cpi r20, 0x25 ; 37217c: b4 f4 brge .+44 ; 0x21aa <itoa+0x3a>217e: 4a 30 cpi r20, 0x0A ; 102180: 29 f4 brne .+10 ; 0x218c <itoa+0x1c>2182: 97 fb bst r25, 72184: 1e f4 brtc .+6 ; 0x218c <itoa+0x1c>2186: 90 95 com r252188: 81 95 neg r24218a: 9f 4f sbci r25, 0xFF ; 255218c: 64 2f mov r22, r20218e: 77 27 eor r23, r232190: 0e 94 61 11 call 0x22c2 ; 0x22c2 <__udivmodhi4>2194: 80 5d subi r24, 0xD0 ; 2082196: 8a 33 cpi r24, 0x3A ; 582198: 0c f0 brlt .+2 ; 0x219c <itoa+0x2c>219a: 89 5d subi r24, 0xD9 ; 217219c: 81 93 st Z+, r24219e: cb 01 movw r24, r2221a0: 00 97 sbiw r24, 0x00 ; 021a2: a1 f7 brne .-24 ; 0x218c <itoa+0x1c>21a4: 16 f4 brtc .+4 ; 0x21aa <itoa+0x3a>21a6: 5d e2 ldi r21, 0x2D ; 4521a8: 51 93 st Z+, r2121aa: 10 82 st Z, r121ac: c9 01 movw r24, r1821ae: 0c 94 d9 10 jmp 0x21b2 ; 0x21b2 <strrev>000021b2 <strrev>:21b2: dc 01 movw r26, r2421b4: fc 01 movw r30, r2421b6: 67 2f mov r22, r2321b8: 71 91 ld r23, Z+21ba: 77 23 and r23, r2321bc: e1 f7 brne .-8 ; 0x21b6 <strrev+0x4>21be: 32 97 sbiw r30, 0x02 ; 221c0: 04 c0 rjmp .+8 ; 0x21ca <strrev+0x18>21c2: 7c 91 ld r23, X21c4: 6d 93 st X+, r2221c6: 70 83 st Z, r2321c8: 62 91 ld r22, -Z21ca: ae 17 cp r26, r3021cc: bf 07 cpc r27, r3121ce: c8 f3 brcs .-14 ; 0x21c2 <strrev+0x10>21d0: 08 95 ret000021d2 <__mulsi3>:21d2: 62 9f mul r22, r1821d4: d0 01 movw r26, r021d6: 73 9f mul r23, r1921d8: f0 01 movw r30, r021da: 82 9f mul r24, r1821dc: e0 0d add r30, r021de: f1 1d adc r31, r121e0: 64 9f mul r22, r2021e2: e0 0d add r30, r021e4: f1 1d adc r31, r121e6: 92 9f mul r25, r1821e8: f0 0d add r31, r021ea: 83 9f mul r24, r1921ec: f0 0d add r31, r021ee: 74 9f mul r23, r2021f0: f0 0d add r31, r021f2: 65 9f mul r22, r2121f4: f0 0d add r31, r021f6: 99 27 eor r25, r2521f8: 72 9f mul r23, r1821fa: b0 0d add r27, r021fc: e1 1d adc r30, r121fe: f9 1f adc r31, r252200: 63 9f mul r22, r192202: b0 0d add r27, r02204: e1 1d adc r30, r12206: f9 1f adc r31, r252208: bd 01 movw r22, r26220a: cf 01 movw r24, r30220c: 11 24 eor r1, r1220e: 08 95 ret00002210 <__udivmodsi4>:2210: a1 e2 ldi r26, 0x21 ; 332212: 1a 2e mov r1, r262214: aa 1b sub r26, r262216: bb 1b sub r27, r272218: fd 01 movw r30, r26221a: 0d c0 rjmp .+26 ; 0x2236 <__udivmodsi4_ep>0000221c <__udivmodsi4_loop>:221c: aa 1f adc r26, r26221e: bb 1f adc r27, r272220: ee 1f adc r30, r302222: ff 1f adc r31, r312224: a2 17 cp r26, r182226: b3 07 cpc r27, r192228: e4 07 cpc r30, r20222a: f5 07 cpc r31, r21222c: 20 f0 brcs .+8 ; 0x2236 <__udivmodsi4_ep>222e: a2 1b sub r26, r182230: b3 0b sbc r27, r192232: e4 0b sbc r30, r202234: f5 0b sbc r31, r2100002236 <__udivmodsi4_ep>:2236: 66 1f adc r22, r222238: 77 1f adc r23, r23223a: 88 1f adc r24, r24223c: 99 1f adc r25, r25223e: 1a 94 dec r12240: 69 f7 brne .-38 ; 0x221c <__udivmodsi4_loop>2242: 60 95 com r222244: 70 95 com r232246: 80 95 com r242248: 90 95 com r25224a: 9b 01 movw r18, r22224c: ac 01 movw r20, r24224e: bd 01 movw r22, r262250: cf 01 movw r24, r302252: 08 95 ret00002254 <__prologue_saves__>:2254: 2f 92 push r22256: 3f 92 push r32258: 4f 92 push r4225a: 5f 92 push r5225c: 6f 92 push r6225e: 7f 92 push r72260: 8f 92 push r82262: 9f 92 push r92264: af 92 push r102266: bf 92 push r112268: cf 92 push r12226a: df 92 push r13226c: ef 92 push r14226e: ff 92 push r152270: 0f 93 push r162272: 1f 93 push r172274: cf 93 push r282276: df 93 push r292278: cd b7 in r28, 0x3d ; 61227a: de b7 in r29, 0x3e ; 62227c: ca 1b sub r28, r26227e: db 0b sbc r29, r272280: 0f b6 in r0, 0x3f ; 632282: f8 94 cli2284: de bf out 0x3e, r29 ; 622286: 0f be out 0x3f, r0 ; 632288: cd bf out 0x3d, r28 ; 61228a: 09 94 ijmp0000228c <__epilogue_restores__>:228c: 2a 88 ldd r2, Y+18 ; 0x12228e: 39 88 ldd r3, Y+17 ; 0x112290: 48 88 ldd r4, Y+16 ; 0x102292: 5f 84 ldd r5, Y+15 ; 0x0f2294: 6e 84 ldd r6, Y+14 ; 0x0e2296: 7d 84 ldd r7, Y+13 ; 0x0d2298: 8c 84 ldd r8, Y+12 ; 0x0c229a: 9b 84 ldd r9, Y+11 ; 0x0b229c: aa 84 ldd r10, Y+10 ; 0x0a229e: b9 84 ldd r11, Y+9 ; 0x0922a0: c8 84 ldd r12, Y+8 ; 0x0822a2: df 80 ldd r13, Y+7 ; 0x0722a4: ee 80 ldd r14, Y+6 ; 0x0622a6: fd 80 ldd r15, Y+5 ; 0x0522a8: 0c 81 ldd r16, Y+4 ; 0x0422aa: 1b 81 ldd r17, Y+3 ; 0x0322ac: aa 81 ldd r26, Y+2 ; 0x0222ae: b9 81 ldd r27, Y+1 ; 0x0122b0: ce 0f add r28, r3022b2: d1 1d adc r29, r122b4: 0f b6 in r0, 0x3f ; 6322b6: f8 94 cli22b8: de bf out 0x3e, r29 ; 6222ba: 0f be out 0x3f, r0 ; 6322bc: cd bf out 0x3d, r28 ; 6122be: ed 01 movw r28, r2622c0: 08 95 ret000022c2 <__udivmodhi4>:22c2: aa 1b sub r26, r2622c4: bb 1b sub r27, r2722c6: 51 e1 ldi r21, 0x11 ; 1722c8: 07 c0 rjmp .+14 ; 0x22d8 <__udivmodhi4_ep>000022ca <__udivmodhi4_loop>:22ca: aa 1f adc r26, r2622cc: bb 1f adc r27, r2722ce: a6 17 cp r26, r2222d0: b7 07 cpc r27, r2322d2: 10 f0 brcs .+4 ; 0x22d8 <__udivmodhi4_ep>22d4: a6 1b sub r26, r2222d6: b7 0b sbc r27, r23000022d8 <__udivmodhi4_ep>:22d8: 88 1f adc r24, r2422da: 99 1f adc r25, r2522dc: 5a 95 dec r2122de: a9 f7 brne .-22 ; 0x22ca <__udivmodhi4_loop>22e0: 80 95 com r2422e2: 90 95 com r2522e4: bc 01 movw r22, r2422e6: cd 01 movw r24, r2622e8: 08 95 ret000022ea <_exit>:22ea: ff cf rjmp .-2 ; 0x22ea <_exit>