之前调试一直没搞明白,在网上搜了半天,才捣鼓出来,记一下。
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.
阅读(1971) | 评论(0) | 转发(0) |