📄 older_m88.lss
字号:
void com_match(void)
{
30e: 0f 93 push r16
310: 1f 93 push r17
312: cf 93 push r28
314: df 93 push r29
unsigned char i;
//tmp=strlen(com.rxbuf);
for (i=0;i<sizeof(instr_sheet)/sizeof(struct_instr_sheet);i++)
{
if (com.rxcnt<pgm_read_byte(&instr_sheet[i].len))
316: 00 91 4b 02 lds r16, 0x024B
31a: 60 e0 ldi r22, 0x00 ; 0
31c: 70 e0 ldi r23, 0x00 ; 0
31e: c9 e1 ldi r28, 0x19 ; 25
320: d0 e0 ldi r29, 0x00 ; 0
322: 6c 9f mul r22, r28
324: c0 01 movw r24, r0
326: 6d 9f mul r22, r29
328: 90 0d add r25, r0
32a: 7c 9f mul r23, r28
32c: 90 0d add r25, r0
32e: 11 24 eor r1, r1
330: fc 01 movw r30, r24
332: e8 5c subi r30, 0xC8 ; 200
334: ff 4f sbci r31, 0xFF ; 255
336: 14 91 lpm r17, Z+
338: 01 17 cp r16, r17
33a: 38 f1 brcs .+78 ; 0x38a <com_match+0x7c>
}
unsigned char pgm_str_compare(const unsigned char *c, unsigned char *p,
unsigned char size)
{
if (size == 0 || c == NULL || p == NULL)
33c: 11 23 and r17, r17
33e: 29 f1 breq .+74 ; 0x38a <com_match+0x7c>
if (com.rxcnt<pgm_read_byte(&instr_sheet[i].len))
{
continue;
}
if (pgm_str_compare(&instr_sheet[i].instr[0], &com.rxbuf[0],
340: ac 01 movw r20, r24
342: 4c 5c subi r20, 0xCC ; 204
344: 5f 4f sbci r21, 0xFF ; 255
346: ab e3 ldi r26, 0x3B ; 59
348: b2 e0 ldi r27, 0x02 ; 2
34a: 20 e0 ldi r18, 0x00 ; 0
34c: 30 e0 ldi r19, 0x00 ; 0
34e: 0a c0 rjmp .+20 ; 0x364 <com_match+0x56>
if (size == 0 || c == NULL || p == NULL)
return 0;
while (size--)
{
if (pgm_read_byte(c) != *p)
350: fa 01 movw r30, r20
352: e2 0f add r30, r18
354: f3 1f adc r31, r19
356: e4 91 lpm r30, Z+
358: 2f 5f subi r18, 0xFF ; 255
35a: 3f 4f sbci r19, 0xFF ; 255
35c: 8c 91 ld r24, X
35e: e8 17 cp r30, r24
360: a1 f4 brne .+40 ; 0x38a <com_match+0x7c>
return 0;
c++;
p++;
362: 11 96 adiw r26, 0x01 ; 1
unsigned char size)
{
if (size == 0 || c == NULL || p == NULL)
return 0;
while (size--)
364: 12 17 cp r17, r18
366: a1 f7 brne .-24 ; 0x350 <com_match+0x42>
if (pgm_str_compare(&instr_sheet[i].instr[0], &com.rxbuf[0],
pgm_read_byte(&instr_sheet[i].len)))
{
//instr_sheet[i].function();
//command execute...
(*((void(*)(void))pgm_read_word(&instr_sheet[i].function)))();
368: 89 e1 ldi r24, 0x19 ; 25
36a: 90 e0 ldi r25, 0x00 ; 0
36c: 68 9f mul r22, r24
36e: 90 01 movw r18, r0
370: 69 9f mul r22, r25
372: 30 0d add r19, r0
374: 78 9f mul r23, r24
376: 30 0d add r19, r0
378: 11 24 eor r1, r1
37a: 27 5c subi r18, 0xC7 ; 199
37c: 3f 4f sbci r19, 0xFF ; 255
37e: f9 01 movw r30, r18
380: 85 91 lpm r24, Z+
382: 94 91 lpm r25, Z+
384: fc 01 movw r30, r24
386: 09 95 icall
388: 09 c0 rjmp .+18 ; 0x39c <com_match+0x8e>
38a: 6f 5f subi r22, 0xFF ; 255
38c: 7f 4f sbci r23, 0xFF ; 255
void com_match(void)
{
unsigned char i;
//tmp=strlen(com.rxbuf);
for (i=0;i<sizeof(instr_sheet)/sizeof(struct_instr_sheet);i++)
38e: 61 31 cpi r22, 0x11 ; 17
390: 71 05 cpc r23, r1
392: 09 f0 breq .+2 ; 0x396 <com_match+0x88>
394: c6 cf rjmp .-116 ; 0x322 <com_match+0x14>
}
}
if (i>=sizeof(instr_sheet)/sizeof(struct_instr_sheet))
sendstr("Invalid instruction!");
396: 80 e5 ldi r24, 0x50 ; 80
398: 91 e0 ldi r25, 0x01 ; 1
39a: 0d d8 rcall .-4070 ; 0xfffff3b6 <__eeprom_end+0xff7ef3b6>
}
39c: df 91 pop r29
39e: cf 91 pop r28
3a0: 1f 91 pop r17
3a2: 0f 91 pop r16
3a4: 08 95 ret
000003a6 <exe_progeeprom>:
sei();
}
void exe_progeeprom(void)
{
3a6: cf 92 push r12
3a8: df 92 push r13
3aa: ff 92 push r15
3ac: 0f 93 push r16
3ae: 1f 93 push r17
3b0: cf 93 push r28
3b2: df 93 push r29
//pgm_sendstr(&instr_sheet[16].explain[0]);
unsigned char eeprom_size=1,tmp;
eeprom_busy_wait();
3b4: f9 99 sbic 0x1f, 1 ; 31
3b6: fe cf rjmp .-4 ; 0x3b4 <exe_progeeprom+0xe>
//unsigned int size_address_tmp=SIZE_ADDRESS+1+section*2;
tmp=eeprom_read_byte(SIZE_ADDRESS+1+section*2);
3b8: 80 91 57 02 lds r24, 0x0257
/** \ingroup avr_eeprom
Read one byte from EEPROM address \a __p.
*/
__ATTR_PURE__ static __inline__ uint8_t eeprom_read_byte (const uint8_t *__p)
{
do {} while (!eeprom_is_ready ());
3bc: f9 99 sbic 0x1f, 1 ; 31
3be: fe cf rjmp .-4 ; 0x3bc <exe_progeeprom+0x16>
#if E2END <= 0xFF
EEARL = (unsigned)__p;
#else
EEAR = (unsigned)__p;
3c0: 90 e0 ldi r25, 0x00 ; 0
3c2: 88 0f add r24, r24
3c4: 99 1f adc r25, r25
3c6: 8f 5b subi r24, 0xBF ; 191
3c8: 9f 4f sbci r25, 0xFF ; 255
3ca: 92 bd out 0x22, r25 ; 34
3cc: 81 bd out 0x21, r24 ; 33
#endif
EECR |= (1 << EERE);
3ce: f8 9a sbi 0x1f, 0 ; 31
return EEDR;
3d0: 80 b5 in r24, 0x20 ; 32
if (tmp==0x0a)eeprom_size=2;
3d2: 8a 30 cpi r24, 0x0A ; 10
3d4: 19 f4 brne .+6 ; 0x3dc <exe_progeeprom+0x36>
3d6: 32 e0 ldi r19, 0x02 ; 2
3d8: f3 2e mov r15, r19
3da: 0f c0 rjmp .+30 ; 0x3fa <exe_progeeprom+0x54>
3dc: ff 24 eor r15, r15
3de: f3 94 inc r15
3e0: 40 e0 ldi r20, 0x00 ; 0
else
for (unsigned char t1=0;t1<tmp+2;t1++)eeprom_size*=2;
3e2: 28 2f mov r18, r24
3e4: 30 e0 ldi r19, 0x00 ; 0
3e6: 2f 5f subi r18, 0xFF ; 255
3e8: 3f 4f sbci r19, 0xFF ; 255
3ea: 02 c0 rjmp .+4 ; 0x3f0 <exe_progeeprom+0x4a>
3ec: ff 0c add r15, r15
3ee: 4f 5f subi r20, 0xFF ; 255
3f0: 84 2f mov r24, r20
3f2: 90 e0 ldi r25, 0x00 ; 0
3f4: 28 17 cp r18, r24
3f6: 39 07 cpc r19, r25
3f8: cc f7 brge .-14 ; 0x3ec <exe_progeeprom+0x46>
keylock=1;
3fa: 81 e0 ldi r24, 0x01 ; 1
3fc: 80 93 50 02 sts 0x0250, r24
cli();
400: f8 94 cli
//erase_chip();
ispConnect();
402: 1e d3 rcall .+1596 ; 0xa40 <ispConnect>
if (ispEnterProgrammingMode())
404: 44 d3 rcall .+1672 ; 0xa8e <ispEnterProgrammingMode>
406: 88 23 and r24, r24
408: 39 f0 breq .+14 ; 0x418 <exe_progeeprom+0x72>
{
sendstr(msg_fail);
40a: 80 ee ldi r24, 0xE0 ; 224
40c: 91 e0 ldi r25, 0x01 ; 1
40e: d3 d7 rcall .+4006 ; 0x13b6 <sendstr>
error_flag=1;
410: 81 e0 ldi r24, 0x01 ; 1
412: 80 93 4f 02 sts 0x024F, r24
416: 44 c0 rjmp .+136 ; 0x4a0 <exe_progeeprom+0xfa>
//(*((void(*)(void))(0x0000UL)))();
}
else
{
LED_2_OFF();
418: 45 98 cbi 0x08, 5 ; 8
41a: 00 e0 ldi r16, 0x00 ; 0
41c: 10 e0 ldi r17, 0x00 ; 0
41e: 36 c0 rjmp .+108 ; 0x48c <exe_progeeprom+0xe6>
for (i=0;i<eeprom_size;i++)
{
static unsigned char led_flag=1;
DF_read_page(3840+section*8+i);
420: 80 91 57 02 lds r24, 0x0257
424: 90 e0 ldi r25, 0x00 ; 0
426: 80 52 subi r24, 0x20 ; 32
428: 9e 4f sbci r25, 0xFE ; 254
42a: 23 e0 ldi r18, 0x03 ; 3
42c: 88 0f add r24, r24
42e: 99 1f adc r25, r25
430: 2a 95 dec r18
432: e1 f7 brne .-8 ; 0x42c <exe_progeeprom+0x86>
434: 80 0f add r24, r16
436: 91 1f adc r25, r17
438: f1 d9 rcall .-3102 ; 0xfffff81c <__eeprom_end+0xff7ef81c>
43a: c0 e0 ldi r28, 0x00 ; 0
43c: d0 e0 ldi r29, 0x00 ; 0
else LED_1_OFF();
led_flag=!led_flag;
ispWriteEEPROM(j+i*256, buf[j]);
43e: d0 2e mov r13, r16
440: cc 24 eor r12, r12
//pro_page_1by1(0,i);
for (unsigned int j=0;j<256;j++)
{
if (led_flag&&j%32==0)
442: 80 91 ec 01 lds r24, 0x01EC
446: 88 23 and r24, r24
448: 49 f0 breq .+18 ; 0x45c <exe_progeeprom+0xb6>
44a: ce 01 movw r24, r28
44c: 8f 71 andi r24, 0x1F ; 31
44e: 90 70 andi r25, 0x00 ; 0
450: 89 2b or r24, r25
452: 21 f4 brne .+8 ; 0x45c <exe_progeeprom+0xb6>
{
LED_1_ON();
454: 44 9a sbi 0x08, 4 ; 8
usart_tsmt(0x2e);
456: 8e e2 ldi r24, 0x2E ; 46
458: 9b d7 rcall .+3894 ; 0x1390 <usart_tsmt>
45a: 01 c0 rjmp .+2 ; 0x45e <exe_progeeprom+0xb8>
}
else LED_1_OFF();
45c: 44 98 cbi 0x08, 4 ; 8
led_flag=!led_flag;
45e: 90 e0 ldi r25, 0x00 ; 0
460: 80 91 ec 01 lds r24, 0x01EC
464: 88 23 and r24, r24
466: 09 f4 brne .+2 ; 0x46a <exe_progeeprom+0xc4>
468: 91 e0 ldi r25, 0x01 ; 1
46a: 90 93 ec 01 sts 0x01EC, r25
ispWriteEEPROM(j+i*256, buf[j]);
46e: fe 01 movw r30, r28
470: e5 5a subi r30, 0xA5 ; 165
472: fd 4f sbci r31, 0xFD ; 253
474: 60 81 ld r22, Z
476: ce 01 movw r24, r28
478: 8c 0d add r24, r12
47a: 9d 1d adc r25, r13
47c: 9f d3 rcall .+1854 ; 0xbbc <ispWriteEEPROM>
DF_read_page(3840+section*8+i);
//pro_page_1by1(0,i);
for (unsigned int j=0;j<256;j++)
47e: 21 96 adiw r28, 0x01 ; 1
480: 81 e0 ldi r24, 0x01 ; 1
482: c0 30 cpi r28, 0x00 ; 0
484: d8 07 cpc r29, r24
486: e9 f6 brne .-70 ; 0x442 <exe_progeeprom+0x9c>
488: 0f 5f subi r16, 0xFF ; 255
48a: 1f 4f sbci r17, 0xFF ; 255
{
LED_2_OFF();
unsigned char i;
for (i=0;i<eeprom_size;i++)
48c: 0f 15 cp r16, r15
48e: 40 f2 brcs .-112 ; 0x420 <exe_progeeprom+0x7a>
led_flag=!led_flag;
ispWriteEEPROM(j+i*256, buf[j]);
}
}
ispDisconnect();
490: f0 d2 rcall .+1504 ; 0xa72 <ispDisconnect>
keylock=0;
492: 10 92 50 02 sts 0x0250, r1
error_flag=0;
496: 10 92 4f 02 sts 0x024F, r1
sendstr(msg_done);
49a: 86 ee ldi r24, 0xE6 ; 230
49c: 91 e0 ldi r25, 0x01 ; 1
49e: 8b d7 rcall .+3862 ; 0x13b6 <sendstr>
}
LED_1_OFF();
4a0: 44 98 cbi 0x08, 4 ; 8
LED_2_ON();
4a2: 45 9a sbi 0x08, 5 ; 8
sei();
4a4: 78 94 sei
}
4a6: df 91 pop r29
4a8: cf 91 pop r28
4aa: 1f 91 pop r17
4ac: 0f 91 pop r16
4ae: ff 90 pop r15
4b0: df 90 pop r13
4b2: cf 90 pop r12
4b4: 08 95 ret
000004b6 <exe_proglockbit>:
if (write_fuse(avr_fuse[0],avr_fuse[1],avr_fuse[2]))sendstr(msg_fail);
else sendstr(msg_done);
}
void exe_proglockbit(void)
{
4b6: f9 99 sbic 0x1f, 1 ; 31
4b8: fe cf rjmp .-4 ; 0x4b6 <exe_proglockbit>
//pgm_sendstr(&instr_sheet[14].explain[0]);
eeprom_busy_wait();
avr_lockbit=eeprom_read_byte(LOCKBIT_ADDRESS+section);
4ba: 80 91 57 02 lds r24, 0x0257
/** \ingroup avr_eeprom
Read one byte from EEPROM address \a __p.
*/
__ATTR_PURE__ static __inline__ uint8_t eeprom_read_byte (const uint8_t *__p)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -