⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.txt

📁 mp3量不要让站长把时间都花费在为您修正说明上。压缩包解压时不能有密码。系统会自动删除debug和release目录
💻 TXT
📖 第 1 页 / 共 5 页
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 934] for uVision
; commandline ArmCC [--debug -c --asm --interleave -omain.o --depend=main.d --device=DARMP --apcs=interwork -O3 -IC:\Keil\ARM\INC\Philips --omf_browse=main.crf main.c]
                          ARM

                          AREA ||.text||, CODE, READONLY, ALIGN=2

                  ClearTrackInfo PROC
000000  e59f2418          LDR      r2,|L1.1056|
000004  e3a00000          MOV      r0,#0
000008  e1a01000          MOV      r1,r0
                  |L1.12|
00000c  e7c21000          STRB     r1,[r2,r0]
000010  e2800001          ADD      r0,r0,#1
000014  e20000ff          AND      r0,r0,#0xff
000018  e3500080          CMP      r0,#0x80
00001c  3afffffa          BCC      |L1.12|
000020  e12fff1e          BX       lr
                          ENDP

                  SetTrack PROC
;;;252    	uint8 bit_offset;
;;;253    	songs--;
000024  e2401001          SUB      r1,r0,#1
;;;254    	byte_offset = songs/8;
;;;255    	bit_offset = songs%8;
;;;256    	if(track[byte_offset] & (1<<bit_offset))return 1;
000028  e59f33f0          LDR      r3,|L1.1056|
00002c  e1a00a81          LSL      r0,r1,#21             ;254
000030  e1a00c20          LSR      r0,r0,#24             ;254
000034  e2012007          AND      r2,r1,#7              ;255
000038  e7d31000          LDRB     r1,[r3,r0]
00003c  e3a0c001          MOV      r12,#1
000040  e1a0221c          LSL      r2,r12,r2
000044  e1110002          TST      r1,r2
;;;257    	else
;;;258    	{
;;;259    		track[byte_offset] |= 1<<bit_offset;
000048  01811002          ORREQ    r1,r1,r2
00004c  07c31000          STRBEQ   r1,[r3,r0]
;;;260    		return 0;
000050  03a00000          MOVEQ    r0,#0
000054  13a00001          MOVNE    r0,#1                 ;256
;;;261    	}
;;;262    }
000058  e12fff1e          BX       lr
;;;263    
                          ENDP

                  Delay PROC
00005c  e1b01000          MOVS     r1,r0                 ;0
000060  e2400001          SUB      r0,r0,#1              ;0
000064  e1a00800          LSL      r0,r0,#16             ;0
000068  e1a00820          LSR      r0,r0,#16             ;0
00006c  1afffffa          BNE      Delay
000070  e12fff1e          BX       lr                    ;0
                          ENDP

                  Timer0_Exception PROC
;;;278    void  __irq  Timer0_Exception(void)
;;;279    {
000074  e92d500f          PUSH     {r0-r3,r12,lr}
;;;280        
;;;281    	if(FLGG==0 ) {  IO0SET=LED;	FLGG=1;}
000078  e59f03a4          LDR      r0,|L1.1060|
00007c  e59fc3a4          LDR      r12,|L1.1064|
000080  e5d0e002          LDRB     lr,[r0,#2]  ; FLGG
000084  e3a02602          MOV      r2,#0x200000
000088  e3a03001          MOV      r3,#1
00008c  e35e0000          CMP      lr,#0
000090  e3a01000          MOV      r1,#0
;;;282    
;;;283    	else  {IO0CLR=LED;   FLGG=0;	 }
000094  158c200c          STRNE    r2,[r12,#0xc]
000098  15c01002          STRBNE   r1,[r0,#2]  ; FLGG
00009c  058c2004          STREQ    r2,[r12,#4]           ;281
0000a0  05c03002          STRBEQ   r3,[r0,#2]            ;281  ; FLGG
;;;284    
;;;285    	T0IR = 0x01;
0000a4  e59f0380          LDR      r0,|L1.1068|
0000a8  e5803000          STR      r3,[r0,#0]
;;;286    
;;;287        VICVectAddr = 0;  
0000ac  e5011fd0          STR      r1,[r1,#-0xfd0]
;;;288    }
0000b0  e8bd500f          POP      {r0-r3,r12,lr}
0000b4  e25ef004          SUBS     pc,lr,#4
;;;289    #endif 
                          ENDP

                  Time0Init PROC
;;;293    {
;;;294    	T0PR=0;
0000b8  e59f036c          LDR      r0,|L1.1068|
0000bc  e3a01000          MOV      r1,#0
0000c0  e580100c          STR      r1,[r0,#0xc]
;;;295    	
;;;296        T0MCR = 0x03;
0000c4  e3a02003          MOV      r2,#3
0000c8  e5802014          STR      r2,[r0,#0x14]
;;;297    
;;;298        T0MR0 = 0xffffffff;    
0000cc  e3e03000          MVN      r3,#0
0000d0  e5803018          STR      r3,[r0,#0x18]
;;;299     
;;;300        T0TCR = 0x03;
0000d4  e5802004          STR      r2,[r0,#4]
;;;301    
;;;302    	T0TCR = 0x01;
0000d8  e3a02001          MOV      r2,#1
0000dc  e5802004          STR      r2,[r0,#4]
;;;303    
;;;304        //VICIntEnClr = 0xffffffff;
;;;305    
;;;306    
;;;307    	VICIntSelect = 0x00;
0000e0  e5011ff4          STR      r1,[r1,#-0xff4]
;;;308        
;;;309         
;;;310    	VICVectCntl0 = (0x20 | 0x04);
0000e4  e3a00024          MOV      r0,#0x24
0000e8  e5010e00          STR      r0,[r1,#-0xe00]
;;;311    
;;;312    	//VICVectAddr0 = (uint32) Timer0_Exception;
;;;313    
;;;314        //VICIntEnable =( 0x0ff <<1); //04
;;;315     }
0000ec  e12fff1e          BX       lr
;;;316    #endif
                          ENDP

                  strcomp PROC
;;;320    uint8 strcomp(uint8 * src, uint8 * dst) /* String compare */
;;;321    {
0000f0  ea000004          B        |L1.264|
                  |L1.244|
;;;322    	while(*src)
;;;323    	{
;;;324    		if(*src++ != *dst++)return 0;
0000f4  e4d13001          LDRB     r3,[r1],#1
0000f8  e2800001          ADD      r0,r0,#1
0000fc  e1520003          CMP      r2,r3
000100  13a00000          MOVNE    r0,#0
;;;325    	}
;;;326    	return 1;
;;;327    }
000104  112fff1e          BXNE     lr
                  |L1.264|
000108  e5d02000          LDRB     r2,[r0,#0]            ;322
00010c  e3520000          CMP      r2,#0                 ;322
000110  1afffff7          BNE      |L1.244|
000114  e3a00001          MOV      r0,#1                 ;326
000118  e12fff1e          BX       lr
;;;328    
                          ENDP

                  strcomp_noncase PROC
;;;329    uint8 strcomp_noncase(uint8 * src, uint8 * dst)/*we should make sure the src is upcase*/
;;;330    {
00011c  ea000008          B        |L1.324|
                  |L1.288|
;;;331    	uint8 * p1 = src, * p2 = dst;
;;;332    	while(*p1)
;;;333    	{
;;;334    		if((*p1 == *p2) || ((*p1<*p2)&&((*p2-*p1) == 0x20 )) )
000120  e5d13000          LDRB     r3,[r1,#0]
000124  e1520003          CMP      r2,r3
000128  0a000003          BEQ      |L1.316|
00012c  2a000009          BCS      |L1.344|
000130  e0432002          SUB      r2,r3,r2
000134  e3520020          CMP      r2,#0x20
000138  1a000006          BNE      |L1.344|
                  |L1.316|
;;;335    		{
;;;336    			p1 ++;
00013c  e2800001          ADD      r0,r0,#1
;;;337    			p2 ++;
000140  e2811001          ADD      r1,r1,#1
                  |L1.324|
000144  e5d02000          LDRB     r2,[r0,#0]            ;332
000148  e3520000          CMP      r2,#0                 ;332
00014c  1afffff3          BNE      |L1.288|
;;;338    		}
;;;339    		else return 0;
;;;340    	}
;;;341    	return 1;
000150  e3a00001          MOV      r0,#1
;;;342    }
000154  e12fff1e          BX       lr
                  |L1.344|
000158  e3a00000          MOV      r0,#0                 ;339
00015c  e12fff1e          BX       lr
;;;343    
                          ENDP

                  LrcProc PROC
;;;349    #endif
;;;350    {
000160  e92d4ff0          PUSH     {r4-r11,lr}
;;;351    #if 1
;;;352    	/* lyric time tag struct pointer for process*/
;;;353    	struct LrcStruct_s * LrcStruct_p;
;;;354    	struct LrcStruct_s * LrcStruct_p_up, * LrcStruct_p_temp,* LrcStruct_p_down;
;;;355    	struct LrcStruct_s * LrcStruct_p_header;
;;;356    		
;;;357    	uint16 lrcaddr;		/* The address to store each lyric */
;;;358    	uint8 part;			/* the sector number of one cluster */
;;;359    	uint16 i;				/* loop variable for gerneral perpus */
;;;360    	uint16 j;
;;;361    	uint8 temp;			/* temp variable */
;;;362    	uint8 * buffer;		/* buffer pointer, later will use malloc to get the data area for it*/
;;;363    	uint16 min,sec,ms;	/* temp variable for time tag process, minter, second, and milisecond */
;;;364    	uint8 sector;			/* sector number to record current sector, with variable j to determine wether the file is ended*/
;;;365    	uint8 totalsect;		/* total sectors the file contains */
;;;366    	uint16 leftbytes;		/* how many data contained in the last sector */
;;;367    	uint32 p;			/* cluster number of file, next ,etc */
;;;368    	uint8 mscnt;			/* counter for ms, you konw 2.3 means 2300ms not 2003ms, so need this variable to determin this*/
;;;369           
;;;370    	LrcStructHead.header = (struct LrcStruct_s *)lrcbuffer;	/* set lrc info struct 's header to the buffer */
000164  e59f22c4          LDR      r2,|L1.1072|
000168  e24dd024          SUB      sp,sp,#0x24           ;350
00016c  e2425038          SUB      r5,r2,#0x38
;;;371    
;;;372    #if FIX_DIRECTORY
;;;373    	if(SearchLrc(LRC_PATH,LongNameBuffer,&LrcInfo)==0)	/* search the path specified, and if found lyric file it will return 0*/
;;;374    #else
;;;375    	if(SearchLrc(LRC_PATH,LongNameBuffer,&LrcInfo,music_record_addr)==0)	/* search the path specified, and if found lyric file it will return 0*/
000170  e1a03001          MOV      r3,r1
000174  e1a01000          MOV      r1,r0
000178  e5852000          STR      r2,[r5,#0]  ; LrcStructHead
00017c  e2452020          SUB      r2,r5,#0x20
000180  e28f0fab          ADR      r0,|L1.1076|
000184  ebfffffe          BL       SearchLrc
000188  e59f6294          LDR      r6,|L1.1060|
00018c  e3500000          CMP      r0,#0
000190  e3a04000          MOV      r4,#0
;;;376    #endif
;;;377    	{ 
;;;378    		printf_P(("\r\n*****************************************************\r\n"));
;;;379    		printf_P(("Found LRC file!\r\n"));
;;;380    		printf_P(("\r\nAnalyzing LRC file ...........\r\n"));
;;;381    	   
;;;382    		lrc = 1;								/* Set the flag */
;;;383    		lrcaddr = 0;							/* Clear the address */
;;;384    	   
;;;385    		LrcStruct_p = LrcStructHead.header;		/* intialize the sigle direction node */
;;;386    		for(i=0;i<MAXITEM-1;i++)
;;;387    		{
;;;388    			LrcStruct_p->next = LrcStruct_p + 1;
;;;389    			LrcStruct_p = LrcStruct_p->next;
;;;390    		}
;;;391    		LrcStruct_p->next = 0;
;;;392    		LrcStruct_p = LrcStructHead.header;
;;;393    								  
;;;394    		LrcStructHead.offset = 0;				/* clear the lyc info struct */
;;;395    		LrcStructHead.title[0] = '\0';
;;;396    		LrcStructHead.artist[0] = '\0';
;;;397    	   
;;;398    		buffer = malloc(520);					/* allocate memory for read the lyric file */
;;;399    		if(buffer==0)
;;;400    		{
;;;401    			#if DEBUG
;;;402    			printf_P(("ERROR: No enough memory!\r\n"));
;;;403    			#endif
;;;404    			return 1;
;;;405    		}
;;;406    
;;;407    		p = get16_little(LrcInfo.deStartCluster)+(((DWORD)get16_little(LrcInfo.deHighClust))<<16);	/* Calculate the first cluster of the lyric file */
;;;408    		totalsect = get32_little(LrcInfo.deFileSize)/512; /*计算扇区数			//calculate the total sectors */
;;;409    		leftbytes = get32_little(LrcInfo.deFileSize)%512; /*计算剩余的字节数	//calculate the left bytes */	
;;;410    		sector=0;				/* clear the sector counter */
;;;411    
;;;412    /*  here to start analyze the lyric file */    
;;;413    		while(1)
;;;414    		{
;;;415    			for(part=0;part<SectorsPerClust;part++)	/* first loop for read a sector of a culster */
;;;416    			{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -