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

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

?? fat32.lst

?? fat32文件C語言的實現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   

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国产成人在线| 色哟哟在线观看一区二区三区| 一区二区三区日韩精品| 亚洲成在线观看| 青青草国产成人99久久| 国产成人自拍高清视频在线免费播放| 国产成人啪免费观看软件| 91视频精品在这里| 欧美一区二区免费视频| 欧美国产一区二区在线观看 | 精品美女在线观看| 亚洲日本电影在线| 日韩avvvv在线播放| 暴力调教一区二区三区| 日韩欧美一级二级三级久久久| 国产精品美女一区二区在线观看| 亚洲一区二区在线播放相泽| 国产精品一区二区黑丝| 欧美日韩色一区| 中文字幕日韩欧美一区二区三区| 蜜臀av性久久久久av蜜臀妖精| 99国产精品视频免费观看| 久久先锋影音av鲁色资源| 亚洲第一成人在线| 豆国产96在线|亚洲| 日韩一区和二区| 欧美激情一区二区三区四区| 亚洲国产综合在线| 91福利视频网站| 一区二区在线免费观看| 97精品视频在线观看自产线路二| 亚洲精品在线观看网站| 亚洲综合精品久久| 欧美日韩在线一区二区| 亚洲不卡一区二区三区| 欧美日韩精品三区| 青青草国产成人99久久| 日韩欧美色电影| 国产伦精一区二区三区| 久久久国产综合精品女国产盗摄| 狠狠狠色丁香婷婷综合久久五月| 精品少妇一区二区三区在线视频| 久久99国产精品久久| 亚洲国产精品国自产拍av| 日本午夜精品一区二区三区电影| 日韩视频在线你懂得| 国产久卡久卡久卡久卡视频精品| 欧美国产激情二区三区| 一本到不卡免费一区二区| 日韩va欧美va亚洲va久久| 久久久亚洲精品石原莉奈 | 欧美日韩和欧美的一区二区| 午夜精品久久久久| 日韩精品中文字幕在线不卡尤物 | 久久99精品国产.久久久久久 | 亚洲高清免费视频| 欧美变态口味重另类| 久久精品噜噜噜成人av农村| 欧美理论在线播放| 精品一区二区三区视频在线观看| 亚洲精品在线免费观看视频| 国产99久久久久| 亚洲乱码中文字幕| 欧美一区欧美二区| 日韩一区欧美二区| 中文成人av在线| 欧美日韩精品福利| 国产美女一区二区| 亚洲国产精品久久不卡毛片| 欧美一区二区观看视频| 一本久道久久综合中文字幕| 高清av一区二区| 久久99久久久欧美国产| 日本一区二区三区在线不卡| 欧美久久久久久久久久| 91丨porny丨最新| 国产精品中文有码| 亚洲国产va精品久久久不卡综合| 国产婷婷一区二区| 欧美日韩激情一区| aaa亚洲精品一二三区| 午夜精品久久久久影视| 亚洲人成亚洲人成在线观看图片| 日韩亚洲欧美综合| 91国在线观看| 9久草视频在线视频精品| 成人亚洲一区二区一| 国内久久婷婷综合| 免费成人在线观看| 调教+趴+乳夹+国产+精品| 亚洲一区二区四区蜜桃| 中文字幕综合网| 国产精品黄色在线观看| 久久久久99精品一区| 国产片一区二区三区| 久久久三级国产网站| 国产偷国产偷亚洲高清人白洁| 久久久国产午夜精品| 国产精品天美传媒| 一区二区视频在线看| 一卡二卡三卡日韩欧美| 亚洲国产精品久久久男人的天堂| 日韩精品成人一区二区在线| 亚洲成人av福利| 日韩av网站在线观看| 国产激情偷乱视频一区二区三区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 国产精品一级片| 欧洲av在线精品| 精品裸体舞一区二区三区| 国产精品久久精品日日| 亚洲成人黄色影院| 亚洲超碰97人人做人人爱| 884aa四虎影成人精品一区| 久久久美女艺术照精彩视频福利播放| 2020国产精品自拍| 亚洲va欧美va天堂v国产综合| 日日夜夜精品视频天天综合网| 国产+成+人+亚洲欧洲自线| 亚洲视频你懂的| 成人精品小蝌蚪| 欧美日韩一区国产| 中文字幕一区二区三区四区不卡| 色噜噜狠狠成人网p站| 91.麻豆视频| 欧美另类z0zxhd电影| 色综合一区二区三区| 日本韩国精品在线| 国产露脸91国语对白| 97se亚洲国产综合自在线| 青青草97国产精品免费观看| 在线播放中文一区| 久久五月婷婷丁香社区| 国产精品久久久久久久久果冻传媒 | 欧美性大战久久久久久久| 日韩欧美精品三级| 国产日韩欧美a| 国产视频一区二区三区在线观看| 亚洲一二三四在线观看| 欧美日韩视频在线观看一区二区三区 | 久久免费午夜影院| 亚洲综合小说图片| 亚洲久草在线视频| 国产精品美女www爽爽爽| 欧美性猛交xxxx乱大交退制版| 夜夜嗨av一区二区三区中文字幕| 蜜桃久久久久久久| 日韩欧美不卡在线观看视频| 久久久久亚洲综合| 国产精品护士白丝一区av| 伊人婷婷欧美激情| 国产精品拍天天在线| 色综合天天综合网国产成人综合天| 在线观看av一区| 91精品国产麻豆国产自产在线 | 日本一区中文字幕| 99热精品一区二区| 欧美日韩国产高清一区二区三区| 亚洲精品久久久蜜桃| 国产精品久久看| 欧美伊人久久久久久久久影院| 综合中文字幕亚洲| 在线播放欧美女士性生活| 午夜精品久久久久影视| 亚洲精品视频免费看| 日韩av一区二区在线影视| 亚洲三级视频在线观看| 日韩国产在线观看| 五月天欧美精品| 五月天中文字幕一区二区| 国产精品乱码久久久久久| 久久先锋影音av鲁色资源| 久久久久国色av免费看影院| 日韩欧美高清dvd碟片| 91蜜桃传媒精品久久久一区二区| 国内外精品视频| 天天综合网天天综合色| 一区二区国产盗摄色噜噜| 亚洲动漫第一页| 天涯成人国产亚洲精品一区av| 美腿丝袜在线亚洲一区| 精品一区二区三区免费视频| 久久国产精品72免费观看| 日本女人一区二区三区| 久久精品国产亚洲5555| 国v精品久久久网| 在线观看亚洲成人| 亚洲精品一区二区在线观看| 国产精品二三区| 日韩精品乱码av一区二区| 久久99精品久久久久婷婷| 成人丝袜视频网| 欧美一区永久视频免费观看| 久久免费美女视频| 夜夜精品浪潮av一区二区三区| 久久成人免费电影| 色94色欧美sute亚洲线路二| 久久久久久一级片| 亚洲曰韩产成在线| 国产精品99久久久久久有的能看|