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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fat32.lst

?? fat32文件C語言的實現(xiàn)13
?? LST
?? 第 1 頁 / 共 5 頁
字號:
C51 COMPILER V6.20c  FAT32                                                                 10/19/2004 12:22:16 PAGE 1   


C51 COMPILER V6.20c, COMPILATION OF MODULE FAT32
OBJECT MODULE PLACED IN fat32.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE modules\file\fat32.c OPTIMIZE(7,SPEED) BROWSE INCDIR(.\modules\system;.\;.\
                    -;.\lib_demob) DEFINE(KEIL,CONF_HDD_CDR) DEBUG OBJECTEXTEND PRINT(.\fat32.lst) OBJECT(fat32.obj) 

stmt level    source

   1          /*C**************************************************************************
   2          * NAME:         fat32.c
   3          *----------------------------------------------------------------------------
   4          * Copyright (c) 2002 Atmel.
   5          *----------------------------------------------------------------------------
   6          * RELEASE:      snd1c-demo-ide-2_0_0      
   7          * REVISION:     1.4     
   8          *----------------------------------------------------------------------------
   9          * PURPOSE:
  10          * FAT32 file-system basics functions
  11          * 
  12          * NOTES:
  13          * Supports only the first partition
  14          * Supports only 512 bytes sector size
  15          * Supports only file fragmentation < MAX_FILE_FRAGMENT_NUMBER
  16          * Supports only one file openned at a time
  17          *
  18          * Global Variables:
  19          *   - gl_buffer: array of bytes in pdata space
  20          *****************************************************************************/
  21          
  22          /*_____ I N C L U D E S ____________________________________________________*/
  23          
  24          #include "config.h"                         /* system configuration */
  25          #include "..\mem\hard.h"                    /* low level function definition */
  26          #include "file.h"                           /* file function definition */
  27          #include "fat32.h"                          /* fat32 file-system definition */
  28          
  29          
  30          /*_____ M A C R O S ________________________________________________________*/
  31          
  32          
  33          /*_____ D E F I N I T I O N ________________________________________________*/
  34          
  35          extern  pdata Byte    gl_buffer[];
  36          
  37          extern char    pdata *lfn_name;                 /* long filename limited to MAX_FILENAME_LEN chars */
  38          
  39          extern xdata Byte fat_buf_sector[];         /* 512 bytes buffer */
  40          
  41          /* disk management */
  42          extern  data  Uint32  fat_ptr_fats;         /* address of the first byte of FAT */
  43          extern  data  Uint32  fat_ptr_data;         /* address of the first byte of data */
  44          extern  data  Byte    fat_cluster_size;     /* cluster size (sector count) */
  45          extern  idata Byte    fat_cluster_mask;     /* mask for end of cluster test */
  46          
  47          extern  bdata bit     dir_is_root;          /* TRUE: point the root directory  */
  48          extern  bdata bit     fat_is_fat16;         /* TRUE: FAT16 - FALSE: FAT12 */
  49          extern  bdata bit     fat_is_fat32;         /* TRUE: FAT32 - FALSE: FAT12/FAT16 */
  50          extern  bdata bit     fat_open_mode;        /* READ or WRITE */
  51          extern  bdata bit     fat_2_is_present;     /* TRUE: 2 FATs - FALSE: 1 FAT */
  52          extern  bdata bit     flag_end_disk_file;
  53          
  54          extern  xdata Uint32  fat_count_of_clusters;/* number of cluster - 2 */
C51 COMPILER V6.20c  FAT32                                                                 10/19/2004 12:22:16 PAGE 2   

  55          extern  xdata Union32 fat_file_size;
  56          extern  xdata Uint32  fat_fat_size;         /* FAT size in sector count */
  57          
  58          
  59          /* directory management */
  60          extern  xdata fat_st_clust_chain dclusters[MAX_DIR_FRAGMENT_NUMBER];
  61                                                      /* cluster chain for the current directory */
  62          extern  idata Uint16  fat_dclust_byte_count;/* byte counter in directory sector */
  63          
  64          extern  idata Uint16  fat_dchain_index;     /* the number of the fragment of the dir, in fact
  65                                                         the index of the table in the cluster chain */
  66          extern  idata Byte    fat_dchain_nb_clust;  /* the offset of the cluster from the first cluster
  67                                                         of the dir fragment */
  68          extern  xdata Byte    fat_last_dclust_index;/* index of the last cluster in directory chain */
  69          
  70          extern  xdata Uint16  fat_dir_list_index;   /* index of current entry in dir list */
  71          extern  xdata Uint16  fat_dir_list_last;    /* index of last entry in dir list */
  72          extern  xdata Uint32  fat_dir_start_sect;   /* start sector of dir list */
  73          extern  idata Uint32  fat_dir_current_sect; /* sector of selected entry in dir list */
  74          extern  xdata Uint32  fat_dir_current_offs; /* entry offset from fat_dir_current_sect */
  75          
  76          extern  xdata fat_st_cache   fat_cache;     /* The cache structure, see the .h for more info */
  77          extern  xdata char  ext[3];                 /* file extension (limited to 3 characters) */
  78          
  79          
  80          /* file management */
  81          extern  xdata fat_st_clust_chain fclusters[MAX_FILE_FRAGMENT_NUMBER];
  82                                                      /* cluster chain for the current file */
  83          extern  idata  Byte    fat_last_clust_index; /* index of the last cluster in file chain */
  84          
  85          extern  data  Uint16   fat_fclust_byte_count;/* byte counter in file cluster */
  86          
  87          extern  idata  Byte    fat_fchain_index;     /* the number of the fragment of the file, in fact
  88                                                         the index of the table in the cluster chain */
  89                        
  90          extern  idata  Uint16  fat_fchain_nb_clust;  /* the offset of the cluster from the first cluster
  91                                                         of the file fragment */
  92          
  93          extern xdata  Uint32  fat_current_file_size;
  94          extern xdata  Uint32  fat_rootclus_fat32;                  /* root cluster address */
  95          extern bdata bit fat_last_dir_cluster_full;
  96          extern bdata bit fat_no_entries_free;
  97          extern xdata Uint16 fat_total_clusters;
  98          extern xdata Uint32 last_free_cluster;
  99          
 100          /* Mode repeat A/B variables */
 101          extern xdata  Byte    fat_fchain_index_save;         
 102          extern xdata  Byte    fat_fchain_nb_clust_save;
 103          extern xdata  Uint16  fat_fclust_byte_count_save;
 104          
 105          extern xdata Byte current_ext;
 106          
 107          extern idata Uint16 fat_current_end_entry_position;
 108          extern idata Uint16 fat_current_start_entry_position;
 109          extern xdata Uint16 fat_nb_deleted_entries;
 110          extern xdata Uint16 fat_nb_total_entries;
 111          
 112          
 113          /*_____ D E C L A R A T I O N ______________________________________________*/
 114          
 115          static  void    fat_get_dir_entry (fat_st_dir_entry xdata *);
 116          static  void    fat_get_dir_file_list (Byte);
C51 COMPILER V6.20c  FAT32                                                                 10/19/2004 12:22:16 PAGE 3   

 117          static  bit     fat_get_clusters (fat_st_clust_chain xdata *, Byte);
 118          static  bit     fat_get_free_clusters (bit);
 119          static  bit     fat_dseek (Int16);
 120          static  Byte    fat_dgetc (void);
 121          
 122          
 123          /*F**************************************************************************
 124          * NAME: fat_install
 125          *----------------------------------------------------------------------------
 126          * PARAMS:
 127          *
 128          * return:
 129          *   - OK: intallation succeeded
 130          *   - KO: - partition 1 not active
 131          *         - FAT type is not FAT16
 132          *         - sector size is not 512 bytes
 133          *         - MBR or PBR signatures are not correct
 134          *         - low level read open failure
 135          *----------------------------------------------------------------------------
 136          * PURPOSE:
 137          *   Install the fat system, read mbr, bootrecords...
 138          *----------------------------------------------------------------------------
 139          * EXAMPLE:
 140          *----------------------------------------------------------------------------
 141          * NOTE:
 142          *   if MBR not found, try to mount unpartitionned FAT
 143          *   sector size is fixed to 512 bytes to simplify low level drivers
 144          *   fat_ptr_fats = partition offset + nb_reserved_sector
 145          *----------------------------------------------------------------------------
 146          * REQUIREMENTS:
 147          *****************************************************************************/
 148          bit fat_install (void)
 149          {          
 150   1      Byte i;
 151   1      Uint32 tot_sect;
 152   1      Uint32 fat_nb_sector;
 153   1      Uint16 bpb_rsvd_sec_cnt;
 154   1      Byte bpb_num_fat;
 155   1      Uint16 bpb_root_ent_count;
 156   1      
 157   1        /* read and check usefull MBR info */
 158   1        /* go to the first partition field */
 159   1        Hard_read_open(MBR_ADDRESS);
 160   1        Hard_load_sector();
 161   1        Hard_read_close();
 162   1      
 163   1        fat_ptr_fats = 0x01;
 164   1        if ((fat_buf_sector[0] == 0xEB) && (fat_buf_sector[2] == 0x90)) /* Jump instruction to boot code */
 165   1        {
 166   2          if ((fat_buf_sector[21] & 0xF0) == 0xF0)  /* Media byte */
 167   2          {
 168   3            if ((fat_buf_sector[510] == 0x55) && (fat_buf_sector[511] == 0xAA)) /* signature */
 169   3            {
 170   4              fat_ptr_fats = 0x00000000;            /* disk may not be partitionned : first sector */
 171   4            }                                       /* is PBR */
 172   3            else
 173   3            {
 174   4              return KO;  /* no signature -> low level error */
 175   4            }
 176   3          }
 177   2        }
 178   1      
C51 COMPILER V6.20c  FAT32                                                                 10/19/2004 12:22:16 PAGE 4   

 179   1        if (fat_ptr_fats)                     /* if first sector is not a PBR */
 180   1        {
 181   2          if (Hard_read_open(MBR_ADDRESS) == OK) 
 182   2          {
 183   3            for (i = 446/2; i != 0; i--)
 184   3            {
 185   4              Hard_read_byte();                     /* go to first partition entry */
 186   4              Hard_read_byte();
 187   4            }
 188   3            Hard_read_byte();
 189   3            Hard_read_byte();                       /* dummy reads */
 190   3            Hard_read_byte();
 191   3            Hard_read_byte();
 192   3            Hard_read_byte();
 193   3            Hard_read_byte();
 194   3            Hard_read_byte();
 195   3            Hard_read_byte();
 196   3            /* read partition offset (in sectors) at offset 8 */
 197   3            ((Byte*)&fat_ptr_fats)[3] = Hard_read_byte();
 198   3            ((Byte*)&fat_ptr_fats)[2] = Hard_read_byte();
 199   3            ((Byte*)&fat_ptr_fats)[1] = Hard_read_byte();
 200   3            ((Byte*)&fat_ptr_fats)[0] = Hard_read_byte();
 201   3            /* go to the MBR signature field */
 202   3            for (i = 52; i != 0; i--)
 203   3            {
 204   4              Hard_read_byte();                   /* dummy reads */
 205   4            }
 206   3            /* check MBR signature */
 207   3            if ((Hard_read_byte() != LOW(BR_SIGNATURE)) &&
 208   3                (Hard_read_byte() != HIGH(BR_SIGNATURE)))
 209   3            {
 210   4              fat_ptr_fats = 0x00000000;          /* disk may not be partitionned */
 211   4            }
 212   3            Hard_read_close();                    /* close physical read */
 213   3          }
 214   2          else
 215   2          { /* low level error */
 216   3            return KO;
 217   3          }
 218   2        }
 219   1      
 220   1      
 221   1        /* read and check usefull PBR info */
 222   1        if (Hard_read_open(fat_ptr_fats) == OK) 
 223   1        {
 224   2          /* go to sector size field */
 225   2          for (i = 11; i != 0; i--)
 226   2          {
 227   3            Hard_read_byte();                     /* dummy reads */
 228   3          }
 229   2          /* read sector size (in bytes) */
 230   2          if ((Hard_read_byte() != LOW(SECTOR_SIZE)) ||
 231   2              (Hard_read_byte() != HIGH(SECTOR_SIZE)))
 232   2          {
 233   3            Hard_read_close();                    /* close physical read */
 234   3            return KO;
 235   3          }
 236   2          /* read cluster size (in sector) */
 237   2          fat_cluster_size = Hard_read_byte();
 238   2          fat_cluster_mask = HIGH((Uint16)fat_cluster_size * SECTOR_SIZE) - 1;
 239   2          /* reserved sector number */
 240   2          ((Byte*)&bpb_rsvd_sec_cnt)[1] = Hard_read_byte();
C51 COMPILER V6.20c  FAT32                                                                 10/19/2004 12:22:16 PAGE 5   

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产综合91精品麻豆| 亚洲女女做受ⅹxx高潮| 经典三级一区二区| 911精品产国品一二三产区| 亚洲影院理伦片| 欧美在线免费观看亚洲| 一区二区三区欧美日韩| 色诱视频网站一区| 亚洲男同性视频| 日本高清不卡aⅴ免费网站| 亚洲欧美日韩精品久久久久| av网站免费线看精品| 国产精品久久久久aaaa| 91一区二区在线| 亚洲精品视频在线观看网站| 色噜噜夜夜夜综合网| 亚洲一区视频在线| 欧美日韩一区二区在线观看| 视频一区二区三区在线| 日韩欧美综合一区| 国产在线麻豆精品观看| 久久精品人人做人人爽97| 福利电影一区二区三区| 中文字幕一区二区三区色视频 | 美女视频黄免费的久久| 精品久久人人做人人爽| 国产高清久久久久| 中文成人综合网| 色综合久久中文综合久久97| 一区二区三区在线高清| 制服视频三区第一页精品| av一本久道久久综合久久鬼色| 最新国产精品久久精品| 在线视频欧美区| 日本不卡一区二区三区 | 91精品国产综合久久久久久久久久 | 欧美色精品在线视频| 蜜臀久久99精品久久久久久9| www国产精品av| 91视频免费看| 日韩成人免费电影| 久久老女人爱爱| 色综合中文综合网| 美女一区二区久久| 欧美韩国日本一区| 91福利在线观看| 久久国产精品免费| 国产精品成人网| 欧美精品在线观看播放| 国产在线视频一区二区| 亚洲女子a中天字幕| 日韩精品一区二区三区在线| 成人小视频免费在线观看| 亚洲激情在线播放| 精品日产卡一卡二卡麻豆| av在线播放不卡| 日韩影院精彩在线| 中文字幕不卡的av| 4438x亚洲最大成人网| 成人精品免费网站| 日韩高清中文字幕一区| 欧美国产丝袜视频| 91精品国产综合久久香蕉的特点| 国产69精品久久久久777| 亚洲国产人成综合网站| 国产欧美日韩不卡免费| 精品污污网站免费看| 国产成人aaa| 日韩av电影一区| 亚洲欧洲无码一区二区三区| 欧美一区二区性放荡片| av中文字幕一区| 乱一区二区av| 一区二区三区电影在线播| 国产肉丝袜一区二区| 欧美精品精品一区| 99re免费视频精品全部| 久久99九九99精品| 亚洲一区影音先锋| 国产精品美女久久久久久久久 | 五月天国产精品| 国产精品久久久久久久浪潮网站| 91精选在线观看| 91丨九色丨黑人外教| 国产精品一区一区三区| 日韩中文字幕不卡| 亚洲欧美日韩久久精品| 国产欧美日韩视频一区二区| 日韩一区二区精品葵司在线| 在线免费不卡电影| 日韩精品专区在线影院观看| 在线观看91视频| 成人亚洲一区二区一| 另类中文字幕网| 亚洲国产精品视频| 国产精品福利一区二区三区| 精品国产欧美一区二区| 91精品一区二区三区久久久久久 | 欧美日韩一二三区| 91麻豆福利精品推荐| 成人美女视频在线看| 国产精品一区二区在线播放| 青青草国产成人av片免费| 亚洲成人av资源| 亚洲激情图片小说视频| 国产精品乱码人人做人人爱| 久久久亚洲午夜电影| 精品区一区二区| 欧美一区二区三区免费大片| 在线观看一区二区精品视频| 91视频在线观看免费| www.欧美日韩国产在线| 国产91在线|亚洲| 国产精品一区二区三区网站| 久草中文综合在线| 另类小说视频一区二区| 免费人成在线不卡| 奇米综合一区二区三区精品视频| 亚洲国产视频一区| 亚洲成人av资源| 亚洲va国产va欧美va观看| 亚洲一区二区在线免费看| 一区二区三区资源| 亚洲免费色视频| 一区二区视频在线| 亚洲综合免费观看高清完整版在线 | 久久综合精品国产一区二区三区| 欧美成人欧美edvon| 日韩欧美一级二级三级| 欧美一级欧美三级在线观看| 日韩一区二区三区免费观看| 日韩一区二区免费视频| 精品少妇一区二区三区在线播放| 日韩欧美专区在线| 久久综合资源网| 久久久久亚洲蜜桃| 国产精品少妇自拍| 亚洲视频在线一区二区| 亚洲免费av网站| 亚洲福利视频一区二区| 五月天精品一区二区三区| 琪琪一区二区三区| 韩国女主播成人在线| 国产91清纯白嫩初高中在线观看| 成人性色生活片| 色天天综合色天天久久| 欧美午夜不卡视频| 日韩网站在线看片你懂的| 久久尤物电影视频在线观看| 国产亚洲成aⅴ人片在线观看| 中文字幕的久久| 一区二区三区在线高清| 日韩高清电影一区| 国产综合色视频| 成年人国产精品| 在线日韩一区二区| 91麻豆精品国产无毒不卡在线观看| 欧美电影免费观看高清完整版在线观看| 久久综合九色综合欧美98| 国产精品久久久久久久久久免费看| 亚洲免费电影在线| 日韩综合小视频| 国产麻豆成人精品| 91免费看`日韩一区二区| 欧美日韩在线免费视频| 日韩欧美一二三| 日本一二三不卡| 亚洲一区二区三区中文字幕| 日本一区中文字幕| 国产不卡在线视频| 在线精品视频免费播放| 欧美成人福利视频| 中文字幕亚洲综合久久菠萝蜜| 亚洲国产乱码最新视频 | 日本不卡高清视频| 成人网页在线观看| 欧美在线观看你懂的| 精品欧美久久久| 亚洲精品国产精华液| 美女一区二区在线观看| 99久久免费国产| 一二三区精品视频| 视频一区视频二区中文| 成人午夜视频免费看| 欧美制服丝袜第一页| 久久久久久久综合狠狠综合| 亚洲柠檬福利资源导航| 极品少妇xxxx精品少妇| 一本大道av一区二区在线播放| 日韩午夜激情电影| 亚洲卡通欧美制服中文| 国产自产v一区二区三区c| 色偷偷88欧美精品久久久| 日韩欧美中文一区二区| 亚洲人成精品久久久久久| 毛片av一区二区三区| 91精彩视频在线| 国产亚洲成av人在线观看导航| 亚洲综合一二区| 国产成人精品三级|