📄 temp.lst
字号:
357 0154 CDB7 in r28,__SP_L__
358 0156 DEB7 in r29,__SP_H__
359 0158 2197 sbiw r28,1
360 015a 0FB6 in __tmp_reg__,__SREG__
361 015c F894 cli
362 015e DEBF out __SP_H__,r29
363 0160 0FBE out __SREG__,__tmp_reg__
364 0162 CDBF out __SP_L__,r28
365 /* prologue end (size=10) */
103:temp.c **** uint8_t temp;
104:temp.c **** temp=0;
367 .LM35:
368 .LBB4:
369 0164 1982 std Y+1,__zero_reg__
105:temp.c **** FLASH_CS_L;
371 .LM36:
372 0166 8091 2300 lds r24,35
373 016a 8B7F andi r24,lo8(-5)
374 016c 8093 2300 sts 35,r24
106:temp.c ****
107:temp.c **** temp=write_SPI(0xd7);
376 .LM37:
377 0170 87ED ldi r24,lo8(-41)
378 0172 0E94 0000 call write_SPI
379 0176 8983 std Y+1,r24
108:temp.c **** temp=write_SPI(0x00);
381 .LM38:
382 0178 80E0 ldi r24,lo8(0)
383 017a 0E94 0000 call write_SPI
384 017e 8983 std Y+1,r24
109:temp.c ****
110:temp.c **** FLASH_CS_H;
386 .LM39:
387 0180 8091 2300 lds r24,35
388 0184 8460 ori r24,lo8(4)
389 0186 8093 2300 sts 35,r24
111:temp.c **** return temp;
391 .LM40:
392 018a 8981 ldd r24,Y+1
393 018c 9927 clr r25
112:temp.c **** }
395 .LM41:
396 .LBE4:
397 /* epilogue: frame size=1 */
398 018e 2196 adiw r28,1
399 0190 0FB6 in __tmp_reg__,__SREG__
400 0192 F894 cli
401 0194 DEBF out __SP_H__,r29
402 0196 0FBE out __SREG__,__tmp_reg__
403 0198 CDBF out __SP_L__,r28
404 019a DF91 pop r29
405 019c CF91 pop r28
406 019e 0895 ret
407 /* epilogue end (size=9) */
408 /* function DF_read_reg size 40 (21) */
413 .Lscope4:
416 .global DF_wait_busy
418 DF_wait_busy:
113:temp.c **** //检查状态寄存器最高位是否为忙,并等待空闲
114:temp.c **** void DF_wait_busy(void)
115:temp.c **** {
420 .LM42:
421 /* prologue: frame size=1 */
422 01a0 CF93 push r28
423 01a2 DF93 push r29
424 01a4 CDB7 in r28,__SP_L__
425 01a6 DEB7 in r29,__SP_H__
426 01a8 2197 sbiw r28,1
427 01aa 0FB6 in __tmp_reg__,__SREG__
428 01ac F894 cli
429 01ae DEBF out __SP_H__,r29
430 01b0 0FBE out __SREG__,__tmp_reg__
431 01b2 CDBF out __SP_L__,r28
432 /* prologue end (size=10) */
116:temp.c **** unsigned char state_reg=0x00;
434 .LM43:
435 .LBB5:
436 01b4 1982 std Y+1,__zero_reg__
117:temp.c **** DF_SELECT_1;
438 .LM44:
439 01b6 8091 2300 lds r24,35
440 01ba 8B7F andi r24,lo8(-5)
441 01bc 8093 2300 sts 35,r24
118:temp.c **** write_SPI(READ_STATE_REGISTER);
443 .LM45:
444 01c0 87ED ldi r24,lo8(-41)
445 01c2 0E94 0000 call write_SPI
119:temp.c **** write_SPI(0x00);
447 .LM46:
448 01c6 80E0 ldi r24,lo8(0)
449 01c8 0E94 0000 call write_SPI
120:temp.c **** write_SPI(0x00);
451 .LM47:
452 01cc 80E0 ldi r24,lo8(0)
453 01ce 0E94 0000 call write_SPI
121:temp.c **** write_SPI(0x00);
455 .LM48:
456 01d2 80E0 ldi r24,lo8(0)
457 01d4 0E94 0000 call write_SPI
122:temp.c **** while((state_reg&0x80) == 0)
459 .LM49:
460 .L21:
461 01d8 8981 ldd r24,Y+1
462 01da 8823 tst r24
463 01dc 0CF4 brge .L23
464 01de 05C0 rjmp .L22
465 .L23:
123:temp.c **** {
124:temp.c **** state_reg = write_SPI(0x00);
467 .LM50:
468 01e0 80E0 ldi r24,lo8(0)
469 01e2 0E94 0000 call write_SPI
470 01e6 8983 std Y+1,r24
471 01e8 F7CF rjmp .L21
472 .L22:
125:temp.c **** }
126:temp.c **** DF_DESELECT_1;
474 .LM51:
475 01ea 8091 2300 lds r24,35
476 01ee 8460 ori r24,lo8(4)
477 01f0 8093 2300 sts 35,r24
127:temp.c **** }
479 .LM52:
480 .LBE5:
481 /* epilogue: frame size=1 */
482 01f4 2196 adiw r28,1
483 01f6 0FB6 in __tmp_reg__,__SREG__
484 01f8 F894 cli
485 01fa DEBF out __SP_H__,r29
486 01fc 0FBE out __SREG__,__tmp_reg__
487 01fe CDBF out __SP_L__,r28
488 0200 DF91 pop r29
489 0202 CF91 pop r28
490 0204 0895 ret
491 /* epilogue end (size=9) */
492 /* function DF_wait_busy size 51 (32) */
497 .Lscope5:
500 .global DF_format
502 DF_format:
128:temp.c **** //格式化主存储器(以扇区<0A,0B,1……31>为单位删除所有页数据)
129:temp.c **** uint8_t DF_format(void)
130:temp.c **** {
504 .LM53:
505 /* prologue: frame size=1 */
506 0206 CF93 push r28
507 0208 DF93 push r29
508 020a CDB7 in r28,__SP_L__
509 020c DEB7 in r29,__SP_H__
510 020e 2197 sbiw r28,1
511 0210 0FB6 in __tmp_reg__,__SREG__
512 0212 F894 cli
513 0214 DEBF out __SP_H__,r29
514 0216 0FBE out __SREG__,__tmp_reg__
515 0218 CDBF out __SP_L__,r28
516 /* prologue end (size=10) */
131:temp.c **** unsigned char i;
132:temp.c **** DF_wait_busy();
518 .LM54:
519 .LBB6:
520 021a 0E94 0000 call DF_wait_busy
133:temp.c **** DF_SELECT_1;
522 .LM55:
523 021e 8091 2300 lds r24,35
524 0222 8B7F andi r24,lo8(-5)
525 0224 8093 2300 sts 35,r24
134:temp.c **** write_SPI(SECTOR_ERASE);
527 .LM56:
528 0228 8CE7 ldi r24,lo8(124)
529 022a 0E94 0000 call write_SPI
135:temp.c **** write_SPI(0x00);
531 .LM57:
532 022e 80E0 ldi r24,lo8(0)
533 0230 0E94 0000 call write_SPI
136:temp.c **** write_SPI(0x00);
535 .LM58:
536 0234 80E0 ldi r24,lo8(0)
537 0236 0E94 0000 call write_SPI
137:temp.c **** write_SPI(0x00);
539 .LM59:
540 023a 80E0 ldi r24,lo8(0)
541 023c 0E94 0000 call write_SPI
138:temp.c **** DF_DESELECT_1;
543 .LM60:
544 0240 8091 2300 lds r24,35
545 0244 8460 ori r24,lo8(4)
546 0246 8093 2300 sts 35,r24
139:temp.c ****
140:temp.c **** DF_wait_busy();
548 .LM61:
549 024a 0E94 0000 call DF_wait_busy
141:temp.c **** DF_SELECT_1;
551 .LM62:
552 024e 8091 2300 lds r24,35
553 0252 8B7F andi r24,lo8(-5)
554 0254 8093 2300 sts 35,r24
142:temp.c **** write_SPI(SECTOR_ERASE);
556 .LM63:
557 0258 8CE7 ldi r24,lo8(124)
558 025a 0E94 0000 call write_SPI
143:temp.c **** write_SPI(0x00);
560 .LM64:
561 025e 80E0 ldi r24,lo8(0)
562 0260 0E94 0000 call write_SPI
144:temp.c **** write_SPI(0x40);
564 .LM65:
565 0264 80E4 ldi r24,lo8(64)
566 0266 0E94 0000 call write_SPI
145:temp.c **** write_SPI(0x00);
568 .LM66:
569 026a 80E0 ldi r24,lo8(0)
570 026c 0E94 0000 call write_SPI
146:temp.c **** DF_DESELECT_1;
572 .LM67:
573 0270 8091 2300 lds r24,35
574 0274 8460 ori r24,lo8(4)
575 0276 8093 2300 sts 35,r24
147:temp.c ****
148:temp.c **** for (i=1;i<32;i++)
577 .LM68:
578 027a 81E0 ldi r24,lo8(1)
579 027c 8983 std Y+1,r24
580 .L25:
581 027e 8981 ldd r24,Y+1
582 0280 8032 cpi r24,lo8(32)
583 0282 08F0 brlo .L28
584 0284 1FC0 rjmp .L26
585 .L28:
149:temp.c **** {
150:temp.c **** DF_wait_busy();
587 .LM69:
588 0286 0E94 0000 call DF_wait_busy
151:temp.c **** DF_SELECT_1;
590 .LM70:
591 028a 8091 2300 lds r24,35
592 028e 8B7F andi r24,lo8(-5)
593 0290 8093 2300 sts 35,r24
152:temp.c **** write_SPI(SECTOR_ERASE);
595 .LM71:
596 0294 8CE7 ldi r24,lo8(124)
597 0296 0E94 0000 call write_SPI
153:temp.c **** write_SPI(i << 3);
599 .LM72:
600 029a 8981 ldd r24,Y+1
601 029c 880F lsl r24
602 029e 880F lsl r24
603 02a0 880F lsl r24
604 02a2 0E94 0000 call write_SPI
154:temp.c **** write_SPI(0x00);
606 .LM73:
607 02a6 80E0 ldi r24,lo8(0)
608 02a8 0E94 0000 call write_SPI
155:temp.c **** write_SPI(0x00);
610 .LM74:
611 02ac 80E0 ldi r24,lo8(0)
612 02ae 0E94 0000 call write_SPI
156:temp.c **** DF_DESELECT_1;
614 .LM75:
615 02b2 8091 2300 lds r24,35
616 02b6 8460 ori r24,lo8(4)
617 02b8 8093 2300 sts 35,r24
619 .LM76:
620 02bc 8981 ldd r24,Y+1
621 02be 8F5F subi r24,lo8(-(1))
622 02c0 8983 std Y+1,r24
623 02c2 DDCF rjmp .L25
624 .L26:
157:temp.c **** }
158:temp.c **** return 1;
626 .LM77:
627 02c4 81E0 ldi r24,lo8(1)
628 02c6 90E0 ldi r25,hi8(1)
159:temp.c **** }
630 .LM78:
631 .LBE6:
632 /* epilogue: frame size=1 */
633 02c8 2196 adiw r28,1
634 02ca 0FB6 in __tmp_reg__,__SREG__
635 02cc F894 cli
636 02ce DEBF out __SP_H__,r29
637 02d0 0FBE out __SREG__,__tmp_reg__
638 02d2 CDBF out __SP_L__,r28
639 02d4 DF91 pop r29
640 02d6 CF91 pop r28
641 02d8 0895 ret
642 /* epilogue end (size=9) */
643 /* function DF_format size 106 (87) */
648 .Lscope6:
655 .global DF_MM_read
657 DF_MM_read:
160:temp.c **** //以直接读取方式读取指定的主存储器数据(页范围0-8191,地址范围0-1055,长度范围1-1056)
161:temp.c **** uint8_t DF_MM_read(unsigned int page,uint16_t start_address,uint8_t DF_buffer[],unsigned int length
162:temp.c **** {
659 .LM79:
660 /* prologue: frame size=12 */
661 02da CF93 push r28
662 02dc DF93 push r29
663 02de CDB7 in r28,__SP_L__
664 02e0 DEB7 in r29,__SP_H__
665 02e2 2C97 sbiw r28,12
666 02e4 0FB6 in __tmp_reg__,__SREG__
667 02e6 F894 cli
668 02e8 DEBF out __SP_H__,r29
669 02ea 0FBE out __SREG__,__tmp_reg__
670 02ec CDBF out __SP_L__,r28
671 /* prologue end (size=10) */
672 02ee 8983 std Y+1,r24
673 02f0 9A83 std Y+2,r25
674 02f2 6B83 std Y+3,r22
675 02f4 7C83 std Y+4,r23
676 02f6 4D83 std Y+5,r20
677 02f8 5E83 std Y+6,r21
678 02fa 2F83 std Y+7,r18
679 02fc 3887 std Y+8,r19
163:temp.c **** unsigned int i;
164:temp.c **** if ((1056-start_address)>=length)
681 .LM80:
682 .LBB7:
683 02fe 20E2 ldi r18,lo8(1056)
684 0300 34E0 ldi r19,hi8(1056)
685 0302 8B81 ldd r24,Y+3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -