









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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Reading a physical Block, Writing a physical Block, Limitation of biosdisk, Extended BIOS functions, Highest biosdisk capacity, Highest IDE capacity, LBA Translation Method are the main points in this lecture.
Typology: Slides
1 / 17
This page cannot be seen from the preview
Don't miss anything!
#include <bios.h> #include <dos.h> FILE *fp; unsigned char buf[512]; unsigned char st[60]; unsigned char headno[10]; unsigned char secno[10]; unsigned char trackno[10]; void main (void) { int i ; for (i=0;i<512;i++) buf[i]=0;
gets(st); fp=fopen(st,"wb"); printf("Head "); gets(headno); puts (headno); printf("\nsector "); gets(secno); puts(secno); printf("\ntrack "); gets(trackno); puts(trackno);
BIOS IDE Limit
Max Sec 63 255 63
Max heads
256 16 16
Max Capacity
1024 65536 1024
Cylinder head sec 0 0 1 = 0 0 0 2 = 1 0 0 3 = 2 …. …. … …. 0 0 63 = 62 0 1 1 = 63 0 1 2 = 64 …. …. … …. 0 2 1 = 126
temp = LBA % (heads_per_cylinder * sectors_per_track)
head = temp / sectors_per_track sector = temp % sectors_per_track + 1
Offset Size Description 0 Byte Size, Should not be less than 16
1 Byte Reserved 2 Byte No. of blocks to transfer, Max value no greater than 7FH 3 Byte Reserved 4 Double Word
Far address of buffer
8 Quad word
LBA address