Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1655158
  • 博文数量: 230
  • 博客积分: 10045
  • 博客等级: 上将
  • 技术积分: 3357
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-30 20:40
文章分类

全部博文(230)

文章存档

2011年(7)

2010年(35)

2009年(62)

2008年(126)

我的朋友

分类: 嵌入式

2010-04-27 18:57:08

之前调试一直没搞明白,在网上搜了半天,才捣鼓出来,记一下。

I see. It looks like the card is formatted like a diskette (not uncommon amongst removable disks), which means there is no Master Boot Record.

Sector 0 is the Volume Boot Record, since there is only one partition.

As I see it (for your first sector):

00h - jump code (EB 3C) + NOP (90)
0Bh - bytes per sector (WORD) = 512
0Dh - sectors per cluster (BYTE) = 4
0Eh - reserved sectors (WORD) = 1
10h - copies of FAT (BYTE) = 2
11h - max Root Dir entries (WORD) = 512
13h - numbers of sectors for partition < 32 MB (WORD) = 62,560 (=32,030,720 bytes on card)
15h - media discriptor (BYTE) = F8 (hard disk)
16h - sectors per FAT (WORD) = 61
1Ch - hidden sectors in partition (DWORD) = 32
20h - numbers of sectors for partition >= 32 MB (DWORD) = 0
26h - Extedned Signature (BYTE) = 29h
2Bh - Volume Name (11 bytes) = NO NAME
36h - FAT name (8 bytes) = FAT16
1FEh - Executable Marker = 55AA

So reserved sectors + hidden sectors = 33, that means the first FAT should be at sector 33. After the 2 FATs you should find the first directory entry.




阅读(1912) | 评论(0) | 转发(0) |
0

上一篇:终端软件

下一篇:时区缩写

给主人留下些什么吧!~~