📄 temp.lst
字号:
686 0304 9C81 ldd r25,Y+4
687 0306 281B sub r18,r24
688 0308 390B sbc r19,r25
689 030a 8F81 ldd r24,Y+7
690 030c 9885 ldd r25,Y+8
691 030e 2817 cp r18,r24
692 0310 3907 cpc r19,r25
693 0312 08F4 brsh .+2
694 0314 57C0 rjmp .L30
165:temp.c **** {
166:temp.c **** DF_wait_busy();
696 .LM81:
697 0316 0E94 0000 call DF_wait_busy
167:temp.c **** DF_SELECT_1;
699 .LM82:
700 031a 8091 2300 lds r24,35
701 031e 8B7F andi r24,lo8(-5)
702 0320 8093 2300 sts 35,r24
168:temp.c **** write_SPI(MAIN_MEMORY_PAGE_READ);
704 .LM83:
705 0324 82ED ldi r24,lo8(-46)
706 0326 0E94 0000 call write_SPI
169:temp.c **** write_SPI((unsigned char)(page >> 5));
708 .LM84:
709 032a 8981 ldd r24,Y+1
710 032c 9A81 ldd r25,Y+2
711 032e 9695 lsr r25
712 0330 8795 ror r24
713 0332 9295 swap r25
714 0334 8295 swap r24
715 0336 8F70 andi r24,0x0f
716 0338 8927 eor r24,r25
717 033a 9F70 andi r25,0x0f
718 033c 8927 eor r24,r25
719 033e 0E94 0000 call write_SPI
170:temp.c **** write_SPI((unsigned char)((page << 3)|(start_address>>8)));
721 .LM85:
722 0342 8981 ldd r24,Y+1
723 0344 282F mov r18,r24
724 0346 220F lsl r18
725 0348 220F lsl r18
726 034a 220F lsl r18
727 034c 8B81 ldd r24,Y+3
728 034e 9C81 ldd r25,Y+4
729 0350 892F mov r24,r25
730 0352 9927 clr r25
731 0354 822B or r24,r18
732 0356 0E94 0000 call write_SPI
171:temp.c **** write_SPI((unsigned char)start_address);
734 .LM86:
735 035a 8B81 ldd r24,Y+3
736 035c 0E94 0000 call write_SPI
172:temp.c **** write_SPI(0x00);
738 .LM87:
739 0360 80E0 ldi r24,lo8(0)
740 0362 0E94 0000 call write_SPI
173:temp.c **** write_SPI(0x00);
742 .LM88:
743 0366 80E0 ldi r24,lo8(0)
744 0368 0E94 0000 call write_SPI
174:temp.c **** write_SPI(0x00);
746 .LM89:
747 036c 80E0 ldi r24,lo8(0)
748 036e 0E94 0000 call write_SPI
175:temp.c **** write_SPI(0x00);
750 .LM90:
751 0372 80E0 ldi r24,lo8(0)
752 0374 0E94 0000 call write_SPI
176:temp.c **** for (i=0;i<length;i++)
754 .LM91:
755 0378 1986 std Y+9,__zero_reg__
756 037a 1A86 std Y+10,__zero_reg__
757 .L31:
758 037c 2985 ldd r18,Y+9
759 037e 3A85 ldd r19,Y+10
760 0380 8F81 ldd r24,Y+7
761 0382 9885 ldd r25,Y+8
762 0384 2817 cp r18,r24
763 0386 3907 cpc r19,r25
764 0388 08F0 brlo .L34
765 038a 12C0 rjmp .L32
766 .L34:
177:temp.c **** {
178:temp.c **** DF_buffer[i] = write_SPI(0xFF);
768 .LM92:
769 038c 8FEF ldi r24,lo8(-1)
770 038e 0E94 0000 call write_SPI
771 0392 482F mov r20,r24
772 0394 2D81 ldd r18,Y+5
773 0396 3E81 ldd r19,Y+6
774 0398 8985 ldd r24,Y+9
775 039a 9A85 ldd r25,Y+10
776 039c F901 movw r30,r18
777 039e E80F add r30,r24
778 03a0 F91F adc r31,r25
779 03a2 4083 st Z,r20
781 .LM93:
782 03a4 8985 ldd r24,Y+9
783 03a6 9A85 ldd r25,Y+10
784 03a8 0196 adiw r24,1
785 03aa 8987 std Y+9,r24
786 03ac 9A87 std Y+10,r25
787 03ae E6CF rjmp .L31
788 .L32:
179:temp.c **** }
180:temp.c **** DF_DESELECT_1;
790 .LM94:
791 03b0 8091 2300 lds r24,35
792 03b4 8460 ori r24,lo8(4)
793 03b6 8093 2300 sts 35,r24
181:temp.c **** return 1;
795 .LM95:
796 03ba 81E0 ldi r24,lo8(1)
797 03bc 90E0 ldi r25,hi8(1)
798 03be 8B87 std Y+11,r24
799 03c0 9C87 std Y+12,r25
800 03c2 02C0 rjmp .L29
801 .L30:
182:temp.c **** }
183:temp.c **** else
184:temp.c **** return 0;
803 .LM96:
804 03c4 1B86 std Y+11,__zero_reg__
805 03c6 1C86 std Y+12,__zero_reg__
185:temp.c **** }
807 .LM97:
808 .L29:
809 .LBE7:
810 03c8 8B85 ldd r24,Y+11
811 03ca 9C85 ldd r25,Y+12
812 /* epilogue: frame size=12 */
813 03cc 2C96 adiw r28,12
814 03ce 0FB6 in __tmp_reg__,__SREG__
815 03d0 F894 cli
816 03d2 DEBF out __SP_H__,r29
817 03d4 0FBE out __SREG__,__tmp_reg__
818 03d6 CDBF out __SP_L__,r28
819 03d8 DF91 pop r29
820 03da CF91 pop r28
821 03dc 0895 ret
822 /* epilogue end (size=9) */
823 /* function DF_MM_read size 130 (111) */
828 .Lscope7:
835 .global DF_write_buf
837 DF_write_buf:
186:temp.c **** //将DF_buffer[]数组中指定长度的数据写入指定缓冲区
187:temp.c **** unsigned char DF_write_buf(unsigned char buffer,unsigned int start_address,uint8_t DF_buffer[],unsi
188:temp.c **** {
839 .LM98:
840 /* prologue: frame size=11 */
841 03de CF93 push r28
842 03e0 DF93 push r29
843 03e2 CDB7 in r28,__SP_L__
844 03e4 DEB7 in r29,__SP_H__
845 03e6 2B97 sbiw r28,11
846 03e8 0FB6 in __tmp_reg__,__SREG__
847 03ea F894 cli
848 03ec DEBF out __SP_H__,r29
849 03ee 0FBE out __SREG__,__tmp_reg__
850 03f0 CDBF out __SP_L__,r28
851 /* prologue end (size=10) */
852 03f2 8983 std Y+1,r24
853 03f4 6A83 std Y+2,r22
854 03f6 7B83 std Y+3,r23
855 03f8 4C83 std Y+4,r20
856 03fa 5D83 std Y+5,r21
857 03fc 2E83 std Y+6,r18
858 03fe 3F83 std Y+7,r19
189:temp.c **** unsigned int i;
190:temp.c **** if ((1056-start_address)>=length)
860 .LM99:
861 .LBB8:
862 0400 20E2 ldi r18,lo8(1056)
863 0402 34E0 ldi r19,hi8(1056)
864 0404 8A81 ldd r24,Y+2
865 0406 9B81 ldd r25,Y+3
866 0408 281B sub r18,r24
867 040a 390B sbc r19,r25
868 040c 8E81 ldd r24,Y+6
869 040e 9F81 ldd r25,Y+7
870 0410 2817 cp r18,r24
871 0412 3907 cpc r19,r25
872 0414 08F4 brsh .+2
873 0416 41C0 rjmp .L37
191:temp.c **** {
192:temp.c **** DF_wait_busy();
875 .LM100:
876 0418 0E94 0000 call DF_wait_busy
193:temp.c **** DF_SELECT_1;
878 .LM101:
879 041c 8091 2300 lds r24,35
880 0420 8B7F andi r24,lo8(-5)
881 0422 8093 2300 sts 35,r24
194:temp.c **** if (buffer==1)
883 .LM102:
884 0426 8981 ldd r24,Y+1
885 0428 8130 cpi r24,lo8(1)
886 042a 21F4 brne .L38
195:temp.c **** write_SPI(BUFFER_1_WRITE);
888 .LM103:
889 042c 84E8 ldi r24,lo8(-124)
890 042e 0E94 0000 call write_SPI
891 0432 03C0 rjmp .L39
892 .L38:
196:temp.c **** else
197:temp.c **** write_SPI(BUFFER_2_WRITE);
894 .LM104:
895 0434 87E8 ldi r24,lo8(-121)
896 0436 0E94 0000 call write_SPI
897 .L39:
198:temp.c **** write_SPI(0x00);
899 .LM105:
900 043a 80E0 ldi r24,lo8(0)
901 043c 0E94 0000 call write_SPI
199:temp.c **** write_SPI((unsigned char)(start_address >> 8));
903 .LM106:
904 0440 8A81 ldd r24,Y+2
905 0442 9B81 ldd r25,Y+3
906 0444 892F mov r24,r25
907 0446 9927 clr r25
908 0448 0E94 0000 call write_SPI
200:temp.c **** write_SPI((unsigned char)start_address);
910 .LM107:
911 044c 8A81 ldd r24,Y+2
912 044e 0E94 0000 call write_SPI
201:temp.c **** for (i=0;i<length;i++)
914 .LM108:
915 0452 1886 std Y+8,__zero_reg__
916 0454 1986 std Y+9,__zero_reg__
917 .L40:
918 0456 2885 ldd r18,Y+8
919 0458 3985 ldd r19,Y+9
920 045a 8E81 ldd r24,Y+6
921 045c 9F81 ldd r25,Y+7
922 045e 2817 cp r18,r24
923 0460 3907 cpc r19,r25
924 0462 08F0 brlo .L43
925 0464 10C0 rjmp .L41
926 .L43:
202:temp.c **** write_SPI(DF_buffer[i]);
928 .LM109:
929 0466 2C81 ldd r18,Y+4
930 0468 3D81 ldd r19,Y+5
931 046a 8885 ldd r24,Y+8
932 046c 9985 ldd r25,Y+9
933 046e F901 movw r30,r18
934 0470 E80F add r30,r24
935 0472 F91F adc r31,r25
936 0474 8081 ld r24,Z
937 0476 0E94 0000 call write_SPI
939 .LM110:
940 047a 8885 ldd r24,Y+8
941 047c 9985 ldd r25,Y+9
942 047e 0196 adiw r24,1
943 0480 8887 std Y+8,r24
944 0482 9987 std Y+9,r25
945 0484 E8CF rjmp .L40
946 .L41:
203:temp.c **** DF_DESELECT_1;
948 .LM111:
949 0486 8091 2300 lds r24,35
950 048a 8460 ori r24,lo8(4)
951 048c 8093 2300 sts 35,r24
204:temp.c **** return 1;
953 .LM112:
954 0490 81E0 ldi r24,lo8(1)
955 0492 90E0 ldi r25,hi8(1)
956 0494 8A87 std Y+10,r24
957 0496 9B87 std Y+11,r25
958 0498 02C0 rjmp .L36
959 .L37:
205:temp.c **** }
206:temp.c **** else
207:temp.c **** return 0;
961 .LM113:
962 049a 1A86 std Y+10,__zero_reg__
963 049c 1B86 std Y+11,__zero_reg__
208:temp.c **** }
965 .LM114:
966 .L36:
967 .LBE8:
968 049e 8A85 ldd r24,Y+10
969 04a0 9B85 ldd r25,Y+11
970 /* epilogue: frame size=11 */
971 04a2 2B96 adiw r28,11
972 04a4 0FB6 in __tmp_reg__,__SREG__
973 04a6 F894 cli
974 04a8 DEBF out __SP_H__,r29
975 04aa 0FBE out __SREG__,__tmp_reg__
976 04ac CDBF out __SP_L__,r28
977 04ae DF91 pop r29
978 04b0 CF91 pop r28
979 04b2 0895 ret
980 /* epilogue end (size=9) */
981 /* function DF_write_buf size 107 (88) */
986 .Lscope8:
991 .global DF_buf_to_mm
993 DF_buf_to_mm:
209:temp.c **** //将指定缓冲区中的数据写入主存储区的指定页
210:temp.c **** void DF_buf_to_mm(unsigned char buffer,unsigned int page)
211:temp.c **** {
995 .LM115:
996 /* prologue: frame size=3 */
997 04b4 CF93 push r28
998 04b6 DF93 push r29
999 04b8 CDB7 in r28,__SP_L__
1000 04ba DEB7 in r29,__SP_H__
1001 04bc 2397 sbiw r28,3
1002 04be 0FB6 in __tmp_reg__,__SREG__
1003 04c0 F894 cli
1004 04c2 DEBF out __SP_H__,r29
1005 04c4 0FBE out __SREG__,__tmp_reg__
1006 04c6 CDBF out __SP_L__,r28
1007 /* prologue end (size=10) */
1008 04c8 8983 std Y+1,r24
1009 04ca 6A83 std Y+2,r22
1010 04cc 7B83 std Y+3,r23
212:temp.c **** DF_wait_busy();
1012 .LM116:
1013 04ce 0E94 0000 call DF_wait_busy
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -