




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: Extended, Read, Service, Entry, Exit, Drive, Error, Code, Verify, Success, Error, Disk, Address
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Reading a LBA block
**#include <dos.h> #include <bios.h> struct DAP { unsigned char size; unsigned char reserved1; unsigned char blocks; unsigned char reserved2; unsigned char far buffer; unsigned long int lbalod; unsigned long int lbahid; } dap; char st[80]; unsigned char buf[512]; FILE fptr;
*void main (void) { puts ("enter the lba low double word: "); gets (st); dap.lbalod=atol(st); puts ("enter the lba high double word: "); gets (st); dap.lbahid=atol(st); dap.size=16; dap.reserved1=0; dap.blocks=1; dap.reserved2=0; dap.buffer = (unsigned char far )MK_FP(_DS,buf);
Structure of Partitioning Table
boot block of active partition and is executed at
Boot Time.
table signature.
File System for Each O.S.
systems and hence 4 different O.S.
disk.
bytes chunk within the Data Part of Partition
Table.
Structure of Data Part of P.T.
02 Bytes Signature
16 Bytes Partition into of 4th^ partition.
16 Bytes Partition into of 3rd^ partition.
16 Bytes Partition into of 2nd^ partition.
16 Bytes Partition into of 1st^ partition.
Size Description
The data part can contain information about four different partitions for different
Operating systems. Each partition information chunk is 16 bytes long and the last two
bytes at the end of the partition table data part is the partition table signature whose value
should be AA55 indicating that the code part contains valid executable code.
The structure of the information stored in each 16 byte for partition is shown in the slides
below
Byte File System ID
Low 8-bits of cylinder # for last block within the partition..
Byte
0 – 5 bits are sector # for first block within the partition and bits 6 -7 are higher bits of cylinder #
Byte
Byte Head # for first block in the partition
Byte 80H if Bootable, 0 if Not
Size Description
0F Extended partitions LBA Mapped
0E Win 95 FAT 16 LBA Mapped
0B Win 95 FAT 32
0C Win 95 FAT 32 LBA Mapped
0A OS/2 Boot Manager
09 AIX Data partitions
08 AIX Boot partitions
OS/2, 1FS = Installable file system Advanced Unix Windows NT NTFS
06 MS-DOS 16-bits FAT >= 32MB
Primary Partition
Record) are primary partition.
about its respective O.S.
extended partitions.
Extended Partitions MBR
Primary Extended Partition Partition
However if a single operating system is to be kept for instance, then the disk can be
divided into primary and extended partitions. Information about primary and extended
partition is kept in the first physical block. The extended partition may again be divided
into a number of partitions, information about further partitions will be kept in extended
partition table which will be the first physical block within extended partition (i.e. it will
not the first block of primary partition.). Moreover there can be extended partitions
within extended partitions and such that in then end there are number of logical partitions
this can go on till the last drive number in DOS.