os source?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
bubach
Member
Member
Posts: 1224
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

os source?

Post by bubach »

does someone have some os source code (fat12) for commands like dir, cd.. etc.?
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Robert Lee

RE:os source?

Post 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
User avatar
bubach
Member
Member
Posts: 1224
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

RE:os source?

Post 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
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
CodeSlasher

RE:os source?

Post 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
Post Reply