Hi, you do NOT have to write code to handle FAT filesystem.
You only have to EITHER convince the BIOS to access your CF disk
OR write some (relatively simple) code which can read and write
single sectors on the CF disk by accessing the IDE controller
directly.

The REST will be done by the FreeDOS kernel for you, and here is
how:

Look at the source code of a RAMDISK like TDSK. As you can see,
there is not much more than "write a sector", "read a sector",
"tell if disk changed" and "give boot sector information to DOS".
Implement that as a block device driver (just use TDSK source code
and replace the copy to/from XMS code by your direct IDE access
code) and you have a complete CF disk driver for DOS :-).

Bonus problem: If you have partitions on your CF disk, then you
should try by accessing only the first FAT partition. Just read the
partition table on the CF, store the offset of the first FAT
partition, and add that offset to the sector number of each read or
write request from DOS. In other words, tell DOS that your driver
is a generic driver for a single drive letter consisting of sectors.
DOS kernel does not have to know more details, and it does not have
to know about partition details.

Eric



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to