Page 1 of 1
os source?
Posted: Mon Sep 29, 2003 11:00 pm
by bubach
does someone have some os source code (fat12) for commands like dir, cd.. etc.?
RE:os source?
Posted: Tue Sep 30, 2003 11:00 pm
by Robert Lee
CD has nothing to do with the FS layer.
DIR: On a 1.44MB floppy, read the 20th (1-based) logical sector. Its the start of the root directory. Every 32 bytes in this sector is one file/folder. The structure of these entries is trivial to locate. HDs and non-1.44MB floppies are different. Read the BPB for actual structure locations and properties.
-Robert
RE:os source?
Posted: Fri Oct 03, 2003 11:00 pm
by bubach
ok..
some sample code anyone? somebody must have done this before me, right?
the way i learn something is to see working code..
thanks
/Christoffer
RE:os source?
Posted: Sat Oct 04, 2003 11:00 pm
by CodeSlasher
Thats a bad way cause you wouldn't know the reasons for certain manipulations carried out in the code. So when you actually write yours, you will really be spitting out what you read and not what you've learned. Get the docs and study them, then when you see sample code you'll understand it better.
The fat pdf file from microsoft and others has all the info needed to write and fat floppy handling code ie structure and reasons for the FAT are given. seach fat pdf in google