main.lst
来自「这个是一个完整的MP3项目」· LST 代码 · 共 259 行 · 第 1/2 页
LST
259 行
C51 COMPILER V7.20 MAIN 03/21/2007 13:34:34 PAGE 1
C51 COMPILER V7.20, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN main.OBJ
COMPILER INVOKED BY: C:\Program Files\keil\C51\BIN\C51.EXE main.c LARGE BROWSE DEBUG OBJECTEXTEND
line level source
1 /*
2 * Copyright (c) 2004,北京博创兴业科技有限公司
3 * All rights reserved.
4 *
5 * 文件名称:main.c
6 * 文件标识:main
7 * 摘 要:主函数
8 *
9 * 当前版本:2.0
10 * 作 者:Kent
11 * 完成日期:2004年5月20日
12 *
13 * 取代版本:1.1
14 * 原作者 :Frank
15 * 完成日期:2003年8月10日
16 */
17 #include <REGSND1.H>
18 #include "uart.h"
19 #include "flash.h"
20
21 unsigned char databuff[SectorLength];
22 unsigned char databuff1[128];
23
24 code unsigned char BPB_Data[512] = {
25 0xeb, 0x3c, 0x90,// Offset_U8_BS_jmpBoot 0
26 'H', 'e', 'y', ',', 'K', 'e', 'n', 't',// Offset_U8_BS_OEMName 3
27 0x00, 0x02,// Offset_short int_BPB_BytsPerSec 11 //Count of bytes per sector. This value may take on on
-ly the //
28 //512 //following values: 512, 1024, 2048 or 4096. If maximum //
29 //compatibility is desired, only the value 512 should be used.//
30 64,// Offset_U8_BPB_SecPerClus 13 //Number of sectors per allocation unit. This value must be a //
31 //power of 2 that is greater than 0. The legal values are 1, //
32 // 2, 4, 8, 16, 32, 64,and 128. //
33 0x1, 0x00,// Offset_short int_BPB_RsvdSecCnt 14 //Number of reserved sectors in the Reserved region of
-the //
34 //volume starting at the first sector of the volume.For FAT32 //
35 //volumes, this value is typically 32. //
36 0x02,// Offset_U8_BPB_NumFATs 16 //The count of FAT data structures on the volume. //
37 0xb0, 0x03,// Offset_short int_BPB_RootEntCnt 17 //Is only useful for FAT12 and FAT16 volumes.
- //
38 // //For FAT32 volumes,this field must be set to 0. //
39 //通过调整文件项为03b0,从而使数据扇区刚好从Block2Sector0开始,但
40 //文件分区表中根目录区并为标记为已占用。数据实际从Block4Sector0开始
41 0xea, 0x7f,// Offset_short int_BPB_TotSec16 19 //For FAT12 and FAT16 volumes, this field contains the
-sector //
42 //count, and BPB_TotSec32 is 0 if the total sector count fits //
43 //(is less than 0x10000). //
44 0xf8,// Offset_U8_BPB_Media 21 //0xF8 is the standard value for fixed(non-removable) media. //
45 //For removable media, 0xF0 is frequently used. //
46 0x02, 0x00,// Offset_short int_BPB_FATSz16 22 //This field is FAT12/FAT16 16bit count of sectors occup
-ied by//
47 // 1 FAT.On FAT32 volumes this field must be 0, and BPB_FATSz32//
48 //contains the FAT size count. //
49 0x00, 0x00,// Offset_short int_BPB_SecPerTrk 24 //Sectors per track for interrupt 0x13. This field is o
-nly //
C51 COMPILER V7.20 MAIN 03/21/2007 13:34:34 PAGE 2
50 //relevant for media that have a geometry (volume is broken //
51 //down into tracks by multiple heads and cylinders) and are //
52 //visible on interrupt 0x13.This field contains the //
53 //"sectors per track" geometry value. //
54 0x00, 0x00,// Offset_short int_BPB_NumHeads 26 //Number of heads for interrupt 0x13. This field is rel
-evant //
55 //as discussed earlier for BPB_SecPerTrk. //
56 0x01, 0x00, 0x00, 0x00,// Offset_U32_BPB_HiddSec 28 //Count of hidden sectors preceding the partition
-that //
57 //contains this FAT volume. //
58 0x00, 0x00, 0x00, 0x00,// Offset_U32_BPB_TotSec32 32 //This field is the new 32-bit total count of sec
-tors on the //
59 //volume. This count includes the count of all sectors in all //
60 //four regions of the volume. This field can be 0; if it is 0,//
61 //then BPB_TotSec16 must be non-zero. For FAT32 volumes, this //
62 //field must be non-zero. For FAT12/FAT16 volumes, this field //
63 //contains the sector count if BPB_TotSec16 is 0 (count is //
64 //greater than or equal to 0x10000).//
65 0x00,// Offset_U8_BS_DrvNum 36 //This field is the FAT32 32-bit count of sectors occupied by //
66 //根据该值得到FAT的大小// //ONE FAT. BPB_FATSz16 must be 0. //
67
68 0x00,// Offset_U8_BS_Reserved 37 // Bits 0-3 -- Zero-based number of active FAT.Only valid //
69 // if mirroring is disabled. //
70 // Bits 4-6 -- Reserved. //
71 // Bit 7 -- 0 means the FAT is mirrored at runtime into //
72 // all FATs. //
73 // -- 1 means only one FAT is active;it is the one//
74 // referenced in bits 0-3. //
75 // Bits 8-15 -- Reserved. //
76 0x29,// Offset_U8_BS_BootSig 38 //High byte is major revision number. //
77 //Low byte is minor revision number. //
78 'N', 'A', 'M', 'E',// Offset_U32_BS_VolID 39 //This is set to the cluster number of the first cluster
-of //
79 //根据该值得到ROOT的地址// //the root directory, usually 2 but not required to be 2. //
80
81 'N', 'O', ' ', 'N', 'A', 'M', 'E', ' ', ' ', ' ', ' ',// Offset_U2048_BS_VolLab 43 //Sector number of
-FSINFO structure in the reserved area of //
82 //the FAT32 volume.Usually 1. //
83 'F', 'A', 'T', '1', '6', ' ', ' ', ' ',// Offset_U256_BS_FilSysType 54 //If non-zero, indicates the sec
-tor number in the reserved //
84 //area of the volume of a copy of the boot record. //
85 //Executable Code
86 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-, 0, 0, 0, 0, 0, 0, 0,
87 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-, 0, 0, 0, 0, 0, 0, 0,
88 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-, 0, 0, 0, 0, 0, 0, 0,
89 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-, 0, 0, 0, 0, 0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