





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture handout is for System Programming course. It was provided by Prof. Indubhushan Vijayabhas at Ambedkar University, Delhi. It includes: Logical, Sector, Number, Slides, Sylinder, Head, Locount, Unsigned, Long, Include, Slide
Typology: Study notes
1 / 9
This page cannot be seen from the preview
Don't miss anything!






void main () { char st[15]; unsigned long int lbaindex; unsigned int cylinder, head , sector, temp; puts ("Enter the LBA address"); gets (st); lbaindex = atol(st); getdrvparam (0x80,&rb); cylinder = lbaindex / (rb.headsrb.sectors); temp = lbaindex % (rb.headsrb.sectors); head = temp / rb.sectors; sector = temp % rb.sectors + 1; printf ("Heads = %d sectors = %d c ylinders = %d" , head, sector, cylinder);**
}
LSN (Logical Sector Number)
For fixed disk Hidden Blocks = No. of Sec/Track
Example
Logical Drive
Logical Drive
LSN = 0 First Logical Sector
First Logical Block in drive LBA = 3F
LSN = 0
No LSN
Conclusion
Clusters
BPB (BIOS Parameter Block)
BPB (BIOS Parameter Block)
Reserved Sectors. The number of sectors from the Partition Boot Sector to the start of the first file allocation table, including the Partition Boot Sector. The minimum value is 1.
0x0E WORD
Sectors Per Cluster. The number of sectors in a cluster. The default cluster size for a volume depends on the disk size and the file system.
0x0D BYTE
Bytes per Sector. The size of a hardware sector. Usually 512.
0x0B WORD
Meaning Field Length
Byte Offset
Root Entries. The total number of file name entries that can be stored in the root folder of the volume.
0x11 WORD
Number of file allocation tables (FATs). The number of copies of the file allocation table on the volume. Typically, the value of this field is 2.
0x10 BYTE
Small Sectors. The number of sectors on the volume if the number fits in 16 bits (65535). For volumes larger than 65536 sectors, this field has a value of 0 and the Large Sectors field is used instead.
0x13 WORD
0x1A WORD Number of Heads.
0x18 WORD Sectors per Track.
Sectors per file allocation table (FAT). Number of sectors occupied by each of the file allocation tables on the volume.
0x16 WORD
Media Type. Provides information about the media being used. A value of 0xF indicates a hard disk.
0x15 BYTE
Large Sectors. If the Small Sectors field is zero, this field contains the total number of sectors in the volume. If Small Sectors is nonzero, this field contains zero..
0x20 DWORD
0x1C DWORD Hidden Sectors.