亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fat.lst

?? 讀寫U盤C代碼,基于CH375FAT芯片,實用的一個代碼
?? LST
?? 第 1 頁 / 共 5 頁
字號:
C51 COMPILER V7.06   FAT                                                                   11/22/2004 22:08:31 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE FAT
OBJECT MODULE PLACED IN FAT.OBJ
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE FAT.C DEBUG OBJECTEXTEND CODE

stmt level    source

   1          #include "common.h"
   2          
   3          ////////////////////////////////////////
   4          extern XXGFLAGS bdata bXXGFlags;
   5          extern SYS_INFO_BLOCK xdata DeviceInfo;
   6          extern FILE_INFO xdata ThisFile;
   7          extern unsigned char xdata DBUF[BUFFER_LENGTH];
   8          unsigned char xdata FATBUF[512];
   9          unsigned char xdata CurFatSector[512];
  10          FREE_FAT_INFO xdata FreeFat;
  11          ////////////////////////////////////////
  12          unsigned long FirstSectorofCluster(unsigned int clusterNum)
  13          {
  14   1              unsigned long temp;
  15   1              temp=clusterNum-2;
  16   1              temp=temp*DeviceInfo.BPB_SecPerClus;
  17   1              temp=temp+DeviceInfo.FirstDataSector;
  18   1              return temp;
  19   1      }
  20          
  21          unsigned int ThisFatSecNum(unsigned int clusterNum)
  22          {
  23   1         unsigned int temp;
  24   1         temp=clusterNum*2;
  25   1         temp=temp/DeviceInfo.BPB_BytesPerSec;
  26   1         temp=temp+DeviceInfo.FatStartSector;
  27   1         return temp;
  28   1      }
  29          
  30          unsigned int ThisFatEntOffset(unsigned int clusterNum)
  31          {
  32   1              unsigned int temp1,temp2;
  33   1              temp1=2*clusterNum;
  34   1              temp2=temp1/DeviceInfo.BPB_BytesPerSec;
  35   1              temp1=temp1-temp2*DeviceInfo.BPB_BytesPerSec;
  36   1              return temp1;
  37   1      }
  38          
  39          unsigned int GetNextClusterNum(unsigned int clusterNum)
  40          {
  41   1              unsigned int xxgFatSecNum,xxgFatEntOffset;
  42   1              
  43   1              xxgFatSecNum=ThisFatSecNum(clusterNum);
  44   1              xxgFatEntOffset=ThisFatEntOffset(clusterNum);
  45   1              //ThisFile.FatSectorPointer=xxgFatSecNum;
  46   1              if(ThisFile.FatSectorPointer!=xxgFatSecNum)
  47   1              {       
  48   2                      
  49   2                      if(!RBC_Read(xxgFatSecNum,1,FATBUF))
  50   2                              return 0xFFFF;
  51   2                      ThisFile.FatSectorPointer=xxgFatSecNum;
  52   2              }
  53   1              
  54   1              ///////////////////////////////////////////////////
  55   1              clusterNum=FATBUF[xxgFatEntOffset+1];
C51 COMPILER V7.06   FAT                                                                   11/22/2004 22:08:31 PAGE 2   

  56   1              clusterNum=clusterNum<<8;
  57   1              clusterNum+=FATBUF[xxgFatEntOffset];    
  58   1              return clusterNum;
  59   1      }
  60          
  61          unsigned char DeleteClusterLink(unsigned int clusterNum)
  62          {
  63   1              //unsigned int nextClusterNum;
  64   1              unsigned int xxgFatSecNum,xxgFatEntOffset;
  65   1              //nextClusterNum=GetNextClusterNum(clusterNum);
  66   1              ////////////////////////////////////////////
  67   1              //nextClusterNum=clusterNum;
  68   1              while((clusterNum>1)&&(clusterNum<0xfff0))
  69   1              {
  70   2              xxgFatSecNum=ThisFatSecNum(clusterNum);
  71   2              xxgFatEntOffset=ThisFatEntOffset(clusterNum);
  72   2              if(RBC_Read(xxgFatSecNum,1,DBUF))
  73   2                      {
  74   3                      clusterNum=DBUF[xxgFatEntOffset+1];
  75   3                      clusterNum=clusterNum<<8;
  76   3                      clusterNum+=DBUF[xxgFatEntOffset];      
  77   3                      //return clusterNum;
  78   3                      }
  79   2              else
  80   2                      return FALSE;
  81   2              DBUF[xxgFatEntOffset]=0x00;
  82   2              DBUF[xxgFatEntOffset+1]=0x00;   
  83   2              //DelayMs(5);
  84   2              if(!RBC_Write(xxgFatSecNum,1,DBUF))
  85   2                      return FALSE;
  86   2              //DelayMs(5);
  87   2              if(!RBC_Write(xxgFatSecNum+DeviceInfo.BPB_FATSz16,1,DBUF))
  88   2                      return FALSE;
  89   2              ////////////////////////////////////////////
  90   2              }
  91   1              return TRUE;
  92   1      }
  93          
  94          /*
  95          unsigned int GetClusterNumFromSectorNum(unsigned long sectorNum)
  96          {
  97                  unsigned long temp;
  98                  temp=sectorNum-DeviceInfo.FirstDataSector;
  99                  temp=temp/DeviceInfo.BPB_SecPerClus;
 100                  temp=temp+2;
 101                  return (unsigned int)temp;
 102          }
 103          */
 104          
 105          /*
 106          unsigned long GetSecNumFromPointer(void)
 107          {
 108                  unsigned int clusterNum,clusterSize;
 109                  unsigned long temp,pointer;
 110                  pointer=ThisFile.FilePointer;
 111                  clusterSize=DeviceInfo.BPB_SecPerClus*DeviceInfo.BPB_BytesPerSec;
 112                  clusterNum=ThisFile.StartCluster;
 113                  while(pointer>clusterSize)
 114                  {
 115                          pointer-=clusterSize;   
 116                          clusterNum=GetNextClusterNum(clusterNum);
 117                  }
C51 COMPILER V7.06   FAT                                                                   11/22/2004 22:08:31 PAGE 3   

 118                  temp=FirstSectorofCluster(clusterNum)+pointer/DeviceInfo.BPB_BytesPerSec;
 119                  return temp;
 120          }
 121          */
 122          unsigned char GoToPointer(unsigned long pointer)
 123          {
 124   1              //unsigned char temp;
 125   1              unsigned int clusterSize;
 126   1              //unsigned long temp;
 127   1              //pointer=ThisFile.FilePointer;
 128   1              clusterSize=DeviceInfo.BPB_SecPerClus*DeviceInfo.BPB_BytesPerSec;
 129   1              ThisFile.ClusterPointer=ThisFile.StartCluster;
 130   1              while(pointer>clusterSize)
 131   1              {
 132   2                      pointer-=clusterSize;   
 133   2                      ThisFile.ClusterPointer=GetNextClusterNum(ThisFile.ClusterPointer);
 134   2                      if(ThisFile.ClusterPointer==0xffff)
 135   2                      {
 136   3                      return FALSE;
 137   3                      }
 138   2              }
 139   1              ThisFile.SectorofCluster=pointer/DeviceInfo.BPB_BytesPerSec;
 140   1              ThisFile.SectorPointer=FirstSectorofCluster(ThisFile.ClusterPointer)+ThisFile.SectorofCluster;
 141   1              ThisFile.OffsetofSector=pointer-ThisFile.SectorofCluster*DeviceInfo.BPB_BytesPerSec;
 142   1              ThisFile.FatSectorPointer=0;
 143   1              return TRUE;
 144   1              
 145   1      }
 146          
 147          unsigned int GetFreeCusterNum(void)
 148          {
 149   1              unsigned int clusterNum,i;
 150   1              unsigned long sectorNum;
 151   1              clusterNum=0;
 152   1              sectorNum=DeviceInfo.FatStartSector;
 153   1              while(sectorNum<DeviceInfo.BPB_FATSz16+DeviceInfo.FatStartSector)
 154   1              {
 155   2                      
 156   2                      if(!RBC_Read(sectorNum,1,DBUF))
 157   2                              return 0x0;
 158   2                      for(i=0;i<DeviceInfo.BPB_BytesPerSec;i=i+2)
 159   2                              {
 160   3                               //clusterNum++;        
 161   3                               
 162   3                               if((DBUF[i]==0)&&(DBUF[i+1]==0))
 163   3                                      {       
 164   4                                      DBUF[i]=0xff;
 165   4                                      DBUF[i+1]=0xff;
 166   4                                      //DelayMs(10);
 167   4                                      if(!RBC_Write(sectorNum,1,DBUF))
 168   4                                              return 0x00;
 169   4                                      //DelayMs(10);
 170   4                                      if(!RBC_Write(sectorNum+DeviceInfo.BPB_FATSz16,1,DBUF))
 171   4                                              return 0x00;
 172   4                                      
 173   4                                      return  clusterNum; 
 174   4                                      }
 175   3                               clusterNum++;
 176   3                              }       
 177   2                                      
 178   2                      sectorNum=2*clusterNum/DeviceInfo.BPB_BytesPerSec+DeviceInfo.FatStartSector;    
 179   2                      //clusterNum+=DeviceInfo.BPB_BytesPerSec;
C51 COMPILER V7.06   FAT                                                                   11/22/2004 22:08:31 PAGE 4   

 180   2                      //DelayMs(10);
 181   2              }
 182   1              
 183   1              return 0x0;
 184   1      }
 185          
 186          unsigned int CreateClusterLink(unsigned int currentCluster)
 187          {
 188   1              unsigned char bFound;
 189   1              unsigned int clusterNum;
 190   1              unsigned int xxgFatSecNum,xxgFatEntOffset;
 191   1              unsigned long temp;
 192   1              bFound=0;
 193   1              //////////////////////////////////////////////
 194   1              //第一次讀FAT
 195   1              if((FreeFat.SectorNum==DeviceInfo.FatStartSector)&&(FreeFat.OffsetofSector<3))
 196   1                      {       
 197   2                      if(!RBC_Read(FreeFat.SectorNum,1,CurFatSector))
 198   2                              return 0x0;     
 199   2                      }
 200   1              //////////////////////////////
 201   1              temp=FreeFat.SectorNum-DeviceInfo.FatStartSector;
 202   1              temp=temp*DeviceInfo.BPB_BytesPerSec;
 203   1              temp=temp/2;
 204   1              clusterNum=temp+FreeFat.OffsetofSector/2;
 205   1                      
 206   1              while(FreeFat.SectorNum<DeviceInfo.BPB_FATSz16+DeviceInfo.FatStartSector)
 207   1              {
 208   2                      
 209   2                      while(FreeFat.OffsetofSector<DeviceInfo.BPB_BytesPerSec)
 210   2                              {
 211   3                              
 212   3                               ///////////////////////////////////////////////
 213   3                               if((CurFatSector[FreeFat.OffsetofSector]==0)&&(CurFatSector[FreeFat.OffsetofSector+1]==0))
 214   3                                      {       
 215   4                                      CurFatSector[FreeFat.OffsetofSector]=0xff;
 216   4                                      CurFatSector[FreeFat.OffsetofSector+1]=0xff;
 217   4                                      
 218   4                                      FreeFat.OffsetofSector=FreeFat.OffsetofSector+2;
 219   4                                      //return        clusterNum; 
 220   4                                      bXXGFlags.bits.bFatChanged=1;
 221   4                                      bFound=1;
 222   4                                      break;
 223   4                                      }
 224   3                               FreeFat.OffsetofSector=FreeFat.OffsetofSector+2;
 225   3                               clusterNum++;
 226   3                              }       
 227   2                      if(bFound==1)
 228   2                              break;  
 229   2                      //FreeFat.SectorNum=2*clusterNum/DeviceInfo.BPB_BytesPerSec+DeviceInfo.FatStartSector;  
 230   2                      //FreeFat.OldSectorNum=FreeFat.SectorNum;
 231   2                      //FreeFat.SectorNum++;
 232   2                      //FreeFat.OffsetofSector=0;
 233   2                      UpdateFat(FreeFat.SectorNum);
 234   2                      
 235   2                      FreeFat.SectorNum++;
 236   2                      FreeFat.OffsetofSector=0;
 237   2                      
 238   2                      if(!RBC_Read(FreeFat.SectorNum,1,CurFatSector))
 239   2                              return 0x0;     
 240   2                      
 241   2                      
C51 COMPILER V7.06   FAT                                                                   11/22/2004 22:08:31 PAGE 5   

 242   2                      //clusterNum+=DeviceInfo.BPB_BytesPerSec;
 243   2                      //DelayMs(10);
 244   2              }
 245   1              //////////////////////////////////////////////
 246   1              if(bFound==0)
 247   1                      return 0x00;
 248   1              
 249   1              /////////////////////////////////////////////////////////////////////   
 250   1              xxgFatSecNum=ThisFatSecNum(currentCluster);
 251   1              xxgFatEntOffset=ThisFatEntOffset(currentCluster);
 252   1              
 253   1              if(xxgFatSecNum!=FreeFat.SectorNum)
 254   1                {
 255   2                      RBC_Read(xxgFatSecNum,1,DBUF);
 256   2              
 257   2              //FreeFat.OffsetofSector=FreeFat.OffsetofSector+2;
 258   2              
 259   2                      DBUF[xxgFatEntOffset]=clusterNum;
 260   2                      DBUF[xxgFatEntOffset+1]=clusterNum>>8;
 261   2                      //DelayMs(5);
 262   2                      if(!RBC_Write(xxgFatSecNum,1,DBUF))
 263   2                              return 0x00;
 264   2                      //DelayMs(10);
 265   2                      if(!RBC_Write(xxgFatSecNum+DeviceInfo.BPB_FATSz16,1,DBUF))
 266   2                              return 0x00;
 267   2                 }
 268   1               else
 269   1                 {
 270   2                      CurFatSector[xxgFatEntOffset]=clusterNum;
 271   2                      CurFatSector[xxgFatEntOffset+1]=clusterNum>>8;
 272   2                      

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区四区高清| 色婷婷久久综合| 亚洲成av人片一区二区梦乃| 亚洲欧美在线aaa| 国产精品入口麻豆九色| 亚洲国产成人一区二区三区| 久久久一区二区三区捆绑**| 久久久五月婷婷| 国产欧美一区二区精品性| 国产女同互慰高潮91漫画| 欧美国产日韩亚洲一区| 国产精品网站在线播放| 中文字幕一区二区三区精华液| 亚洲欧洲综合另类在线| 亚洲www啪成人一区二区麻豆| 日日夜夜免费精品视频| 精品写真视频在线观看| 国产成人免费xxxxxxxx| 色综合久久久久久久久| 欧美精品第1页| 国产午夜精品福利| 亚洲女性喷水在线观看一区| 午夜一区二区三区视频| 国产一区二区三区日韩| 99久久精品免费观看| 精品视频免费在线| 久久综合狠狠综合| 亚洲狼人国产精品| 日本aⅴ亚洲精品中文乱码| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美午夜一区二区| 日韩精品一区二区在线| 中文字幕国产一区二区| 亚洲免费av在线| 国产一区二区免费视频| 色婷婷综合久久久久中文| 日韩午夜中文字幕| 亚洲三级电影网站| 久久精品国产第一区二区三区| 国产精品一区二区你懂的| 91麻豆国产福利在线观看| 日韩精品一区在线观看| 亚洲黄网站在线观看| 国产一区二区在线观看视频| 色哦色哦哦色天天综合| 久久亚洲一级片| 午夜伊人狠狠久久| 91日韩在线专区| 久久久久国色av免费看影院| 天堂在线一区二区| 成人av动漫网站| 欧美r级电影在线观看| 亚洲国产中文字幕| 91网页版在线| 国产拍欧美日韩视频二区| 蜜桃91丨九色丨蝌蚪91桃色| 欧美影视一区在线| 亚洲色图视频网| 成人毛片视频在线观看| 精品动漫一区二区三区在线观看| 亚洲va欧美va人人爽午夜| 91麻豆产精品久久久久久| 国产日产精品1区| 国产在线精品国自产拍免费| 欧美精品第1页| 视频在线观看国产精品| 欧美午夜理伦三级在线观看| 一区二区三区国产| 日本乱人伦aⅴ精品| 中文字幕一区二区三| 国产91露脸合集magnet| 久久久精品免费观看| 国产一区二区伦理| 精品日韩在线观看| 黄色成人免费在线| 久久久久久一二三区| 国产一区二区主播在线| 精品国产精品网麻豆系列| 蜜桃视频在线一区| 精品国产乱码久久| 国产一区不卡精品| 国产精品毛片久久久久久| 成人激情图片网| 中文字幕一区在线观看视频| 91蝌蚪porny成人天涯| 亚洲精品五月天| 欧美日韩亚洲综合在线| 丝袜亚洲另类欧美综合| 日韩欧美成人一区二区| 国产精品99精品久久免费| 国产精品拍天天在线| 色综合久久综合网欧美综合网| 亚洲黄色av一区| 91精品国产欧美一区二区成人| 久久国产精品无码网站| 国产精品人成在线观看免费| 在线观看日韩精品| 激情综合五月天| 日韩伦理免费电影| 欧美日本一区二区在线观看| 久久99精品久久久久久久久久久久 | 91精品国产综合久久久久久| 蜜桃免费网站一区二区三区| 久久久精品一品道一区| 97se亚洲国产综合自在线不卡| 亚洲一区二区四区蜜桃| 精品欧美一区二区三区精品久久 | 亚洲免费在线观看| 欧美久久婷婷综合色| 国产成人在线色| 亚洲国产视频一区二区| 国产亚洲精品7777| 欧美久久久久免费| 不卡一区二区在线| 久久精品理论片| 一区二区三区在线观看网站| 精品久久久久99| 色婷婷国产精品| 国产剧情一区二区| 视频一区视频二区在线观看| 国产精品精品国产色婷婷| 日韩欧美不卡在线观看视频| 色婷婷狠狠综合| 成人黄色网址在线观看| 麻豆91小视频| 亚洲国产欧美另类丝袜| 国产精品久久夜| 久久精品一区二区三区不卡牛牛 | 欧美精品日韩一区| 99re这里只有精品6| 国产精品亚洲成人| 日本视频中文字幕一区二区三区| 综合久久久久久久| 国产精品久久久一区麻豆最新章节| 日韩视频免费观看高清完整版在线观看 | 日韩理论片在线| 久久久久久久av麻豆果冻| 欧美一区二区三区播放老司机| 972aa.com艺术欧美| 国产不卡免费视频| 国产专区欧美精品| 免费高清在线一区| 日韩精品免费视频人成| 亚洲国产精品久久久久秋霞影院| 国产精品伦一区二区三级视频| 久久精品综合网| 久久亚洲精华国产精华液| 精品免费国产一区二区三区四区| 欧美日韩一卡二卡| 911精品国产一区二区在线| 欧美亚洲国产一区二区三区va| 色偷偷久久人人79超碰人人澡| jiyouzz国产精品久久| 成人精品视频一区| 99国产精品久久久久| 成人av网址在线| 99vv1com这只有精品| 色噜噜狠狠色综合中国| 欧美综合视频在线观看| 色婷婷综合视频在线观看| 91在线精品一区二区三区| 99国产精品国产精品久久| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩三级伦理片妻子的秘密按摩| 91精品国产色综合久久ai换脸 | 国产尤物一区二区| 国产精品77777竹菊影视小说| 国产91丝袜在线播放| 成人免费高清在线| 日本高清免费不卡视频| 欧美日韩不卡视频| 欧美tickling网站挠脚心| 欧美激情一区二区三区不卡| 亚洲视频一区二区在线观看| 亚洲国产精品影院| 韩国理伦片一区二区三区在线播放| 国产成人免费9x9x人网站视频| 日本伦理一区二区| 精品1区2区在线观看| 国产精品二区一区二区aⅴ污介绍| 亚洲制服欧美中文字幕中文字幕| 麻豆精品一区二区三区| 高清不卡一区二区在线| 欧美亚洲免费在线一区| 久久综合色一综合色88| 亚洲人成网站影音先锋播放| 日日夜夜精品视频天天综合网| 国产乱码精品一区二区三区五月婷 | 成人精品视频一区二区三区 | av成人免费在线观看| 欧美中文字幕一区二区三区亚洲| 日韩小视频在线观看专区| 国产精品美女视频| 日本一道高清亚洲日美韩| av在线不卡网| 91精品啪在线观看国产60岁| 中文字幕亚洲在| 久久不见久久见免费视频7| 91原创在线视频| 欧美精品一区二区三区一线天视频|