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

📄 fat16.lst

📁 at91sam7x256 FREERTOS sd卡的读写程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   0000019A   7802               LSL         R0,R7,#+9
   \   0000019C   2218               ADD         R2,R4,R0
   \   0000019E   391C               MOV         R1,R7
   \   000001A0   0020               MOV         R0,#+0
   \   000001A2   ........           _BLF        mmc_write_page,??mmc_write_page??rT
   \   000001A6   0028               CMP         R0,#+0
   \   000001A8   06D1               BNE         ??fat_format_19
    129              	    {
    130              	    	AT91F_DBGU_Printk("\nFormat Nand-flash failed!");
   \   000001AA   1348               LDR         R0,??fat_format_0+0x30  ;; `?<Constant "-LiTai- ">` + 68
   \   000001AC   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    131              	    	return 0;
    132              	    }
    133                   } 
    134                  AT91F_DBGU_Printk("\nFormat Nand-flash Successfully!\n");
    135                   return 1;
    136               }
    137          	return 0;
   \                     ??fat_format_2:
   \   000001B0   0020               MOV         R0,#+0
   \                     ??fat_format_20:
   \   000001B2   04B0               ADD         SP,#+16
   \   000001B4   ........           BL          ?Subroutine35
   \                     ??fat_format_19:
   \   000001B8   7F1C               ADD         R7,R7,#+1
   \   000001BA   202F               CMP         R7,#+32
   \   000001BC   EDDB               BLT         ??fat_format_18
   \   000001BE   0F48               LDR         R0,??fat_format_0+0x34  ;; `?<Constant "-LiTai- ">` + 96
   \   000001C0   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
   \   000001C4   0120               MOV         R0,#+1
   \   000001C6   F4E7               B           ??fat_format_20
   \                     ??fat_format_0:
   \   000001C8   ........           DC32        `?<Constant "-LiTai- ">`
   \   000001CC   ........           DC32        `?<Constant "-LiTai- ">` + 12
   \   000001D0   ........           DC32        `?<Constant "-LiTai- ">` + 24
   \   000001D4   ........           DC32        `?<Constant "-LiTai- ">` + 36
   \   000001D8   03400000           DC32        0x4003
   \   000001DC   FE410000           DC32        0x41fe
   \   000001E0   0B400000           DC32        0x400b
   \   000001E4   2B400000           DC32        0x402b
   \   000001E8   28400000           DC32        0x4028
   \   000001EC   46143388           DC32        0x88331446
   \   000001F0   2C400000           DC32        0x402c
   \   000001F4   37400000           DC32        0x4037
   \   000001F8   ........           DC32        `?<Constant "-LiTai- ">` + 68
   \   000001FC   ........           DC32        `?<Constant "-LiTai- ">` + 96
    138          }

   \                                 In segment CODE, align 4, keep-with-next
   \                     ?Subroutine35:
   \   00000000   F0BC               POP         {R4-R7}
   \   00000002   02BC               POP         {R1}
   \   00000004   0847               BX          R1                 ;; return
    139          
    140           //PARTRECORD PartInfo;

   \                                 In segment DATA_Z, align 1, align-sorted
    141           unsigned char Fat32Enabled;
   \                     Fat32Enabled:
   \   00000000                      DS8 1
    142           unsigned int  FirstDataSector;
    143           unsigned int  BytesPerSector;
    144           unsigned int  FATsectors;
    145           unsigned int  SectorsPerCluster;
    146           unsigned int  FirstFATSector;
    147           unsigned int  FirstDirSector;
    148           unsigned int  FileSize;
    149           unsigned int  FatInCache = 0; 
    150           DWORD RootDirSectors;	// Numbers of sectors occupied by Root Directory.
    151           DWORD RootDirCount;
    152          
    153          //--------------该函数主要用于从已有的存储介质中获得文件系统信息------------------//

   \                                 In segment CODE, align 4, keep-with-next
    154           unsigned char fatInit(void)
    155           {
   \                     fatInit:
   \   00000000   F1B5               PUSH        {R0,R4-R7,LR}
   \   00000002   ....               LDR         R0,??DataTable7    ;; ClusterBuffer + 16384
   \   00000004   0090               STR         R0,[SP, #+0]
   \   00000006   021C               MOV         R2,R0
   \   00000008   0021               MOV         R1,#+0
   \   0000000A   0020               MOV         R0,#+0
    156               BOOTSECTOR50 *bootsector; 
    157          	 BPB50 *bpb;
    158          	 EXTBOOT *ext;	 
    159          	 int i,j;
    160          	 
    161               //for(j=0;j<255;j++);
    162               mmc_read_page(0,0,SectorBuffer);
   \   0000000C   ........           _BLF        mmc_read_page,??mmc_read_page??rT
    163               bootsector = (BOOTSECTOR50 *)SectorBuffer;
    164          	 bpb = (BPB50 *)(bootsector->bsBPB);
    165          	 ext = (EXTBOOT *)(bootsector->bsExt);
    166               // setup global disk constants
    167               FirstDataSector = 0;//PartInfo.prStartLBA;
    168               if(bpb->bpbFATsecs)
   \   00000010   3E4D               LDR         R5,??fatInit_0     ;; ClusterBuffer + 16395
   \   00000012   ....               LDR         R4,??DataTable27   ;; fat_get
   \   00000014   E869               LDR         R0,[R5, #+28]
   \   00000016   0028               CMP         R0,#+0
   \   00000018   05D0               BEQ         ??fatInit_1
    169               {
    170                   // bpbFATsecs is non-zero and is therefore valid
    171                   FirstDirSector = bpb->bpbResSectors + bpb->bpbFATs * bpb->bpbFATsecs;
   \   0000001A   A868               LDR         R0,[R5, #+8]
   \   0000001C   297B               LDRB        R1,[R5, #+12]
   \   0000001E   EA69               LDR         R2,[R5, #+28]
   \   00000020   5143               MUL         R1,R2
   \   00000022   4018               ADD         R0,R0,R1
   \   00000024   2063               STR         R0,[R4, #+48]
    172                                     //FAT12,16 =1         =2(2份FAT,其中1份为备份)×每一份FAT所占用的sector数               
    173               }
    174               
    175               SectorsPerCluster   = bpb->bpbSecPerClust;//每cluster的sector数目
   \                     ??fatInit_1:
   \   00000026   2879               LDRB        R0,[R5, #+4]
   \   00000028   A062               STR         R0,[R4, #+40]
    176               BytesPerSector      = bpb->bpbBytesPerSec;//每sector的字节数
   \   0000002A   2868               LDR         R0,[R5, #+0]
   \   0000002C   2062               STR         R0,[R4, #+32]
    177               FirstFATSector      = bpb->bpbResSectors + 0;//PartInfo.prStartLBA;//FAT区的起始地址
   \   0000002E   A868               LDR         R0,[R5, #+8]
   \   00000030   E062               STR         R0,[R4, #+44]
    178               FATsectors          = bpb->bpbFATsecs;
   \   00000032   E869               LDR         R0,[R5, #+28]
   \   00000034   6062               STR         R0,[R4, #+36]
    179               FirstDataSector  = FirstDirSector+((bpb->bpbRootDirEnts)>>4);
   \   00000036   206B               LDR         R0,[R4, #+48]
   \   00000038   2969               LDR         R1,[R5, #+16]
   \   0000003A   0909               LSR         R1,R1,#+4
   \   0000003C   4018               ADD         R0,R0,R1
   \   0000003E   E061               STR         R0,[R4, #+28]
    180               RootDirCount = bpb->bpbRootDirEnts;
   \   00000040   2869               LDR         R0,[R5, #+16]
   \   00000042   A063               STR         R0,[R4, #+56]
    181               RootDirSectors = (RootDirCount*32)>>9;
   \   00000044   4001               LSL         R0,R0,#+5
   \   00000046   400A               LSR         R0,R0,#+9
   \   00000048   6063               STR         R0,[R4, #+52]
    182                     
    183           #ifdef DEBUG_FAT
    184          
    185               AT91F_DBGU_Printk("\nOEM name        : %s",(char *)(bootsector->bsOemName));
                      ^
Warning[Pe223]: function "AT91F_DBGU_Printk" declared implicitly
   \   0000004A   314E               LDR         R6,??fatInit_0+0x4  ;; `?<Constant "\\nNumber of Fats  : %4d">`
   \   0000004C   3149               LDR         R1,??fatInit_0+0x8  ;; ClusterBuffer + 16387
   \   0000004E   301C               MOV         R0,R6
   \   00000050   9430               ADD         R0,#+148
   \   00000052   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    186               
    187               //Uart_Printf("\nFirst sector    : %4x",PartInfo.prStartLBA);    
    188               //Uart_Printf("\nSize            : %4x",PartInfo.prSize);        
    189               AT91F_DBGU_Printk("\nbytes per sector    : %4d",bpb->bpbBytesPerSec);    
   \   00000056   2968               LDR         R1,[R5, #+0]
   \   00000058   301C               MOV         R0,R6
   \   0000005A   7830               ADD         R0,#+120
   \   0000005C   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    190               AT91F_DBGU_Printk("\nsectors per cluster : %4d",bpb->bpbSecPerClust);    
   \   00000060   2979               LDRB        R1,[R5, #+4]
   \   00000062   301C               MOV         R0,R6
   \   00000064   AC30               ADD         R0,#+172
   \   00000066   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    191               AT91F_DBGU_Printk("\nreserved sectors: %4d",bpb->bpbResSectors);     
   \   0000006A   A968               LDR         R1,[R5, #+8]
   \   0000006C   301C               MOV         R0,R6
   \   0000006E   C830               ADD         R0,#+200
   \   00000070   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    192               AT91F_DBGU_Printk("\nRootDir Entrys  : %4d",bpb->bpbRootDirEnts);
   \   00000074   2969               LDR         R1,[R5, #+16]
   \   00000076   301C               MOV         R0,R6
   \   00000078   E030               ADD         R0,#+224
   \   0000007A   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    193               AT91F_DBGU_Printk("\nTolSectors      : %4d",bpb->bpbSectors);
   \   0000007E   6969               LDR         R1,[R5, #+20]
   \   00000080   301C               MOV         R0,R6
   \   00000082   F830               ADD         R0,#+248
   \   00000084   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    194               AT91F_DBGU_Printk("\nFatSectors      : %4d",bpb->bpbFATsecs);        
   \   00000088   E969               LDR         R1,[R5, #+28]
   \   0000008A   8820               MOV         R0,#+136
   \   0000008C   4000               LSL         R0,R0,#+1          ;; #+272
   \   0000008E   3018               ADD         R0,R6,R0
   \   00000090   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    195               //Uart_Printf("\nBigFatSectors   : %4x",bpb->bpbBigFATsecs);     
    196               AT91F_DBGU_Printk("\nNumber of Fats  : %4d",bpb->bpbFATs);           
   \   00000094   297B               LDRB        R1,[R5, #+12]
   \   00000096   301C               MOV         R0,R6
   \   00000098   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    197               AT91F_DBGU_Printk("\nFirst Fat Sector: %4d",FirstFATSector); 
   \   0000009C   E16A               LDR         R1,[R4, #+44]
   \   0000009E   301C               MOV         R0,R6
   \   000000A0   1830               ADD         R0,#+24
   \   000000A2   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    198               AT91F_DBGU_Printk("\nFirst Dir sector: %4d",FirstDirSector);        
   \   000000A6   216B               LDR         R1,[R4, #+48]
   \   000000A8   301C               MOV         R0,R6
   \   000000AA   3030               ADD         R0,#+48
   \   000000AC   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    199               AT91F_DBGU_Printk("\nFirst Data Sect : %4d",FirstDataSector);        
   \   000000B0   E169               LDR         R1,[R4, #+28]
   \   000000B2   301C               MOV         R0,R6
   \   000000B4   4830               ADD         R0,#+72
   \   000000B6   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
    200               //Uart_Printf("\nVolNumber       : %x",(unsigned int)(ext->exVolumeID)); 
    201               AT91F_DBGU_Printk("\nVolumeLabel    : %s\n",(char *)(ext->exVolumeLabel));        
   \   000000BA   1749               LDR         R1,??fatInit_0+0xC  ;; ClusterBuffer + 16428
   \   000000BC   6036               ADD         R6,#+96
   \   000000BE   301C               MOV         R0,R6
   \   000000C0   ........           _BLF        AT91F_DBGU_Printk,??AT91F_DBGU_Printk??rT
   \   000000C4   0025               MOV         R5,#+0
   \   000000C6   ....               LDR         R7,??DataTable33   ;; FatCache
   \   000000C8   1AE0               B           ??fatInit_2
    202           #endif
    203               for(i=0;i<FATsectors;i++)
    204               {

⌨️ 快捷键说明

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