Hi again,

> I was hoping a hint might spark some documentation on the
> FreeDOS filesystem API so others (like me) can do development. :-)
> 
> you might see an increase in freedos programs if your API was documented.
> who knows, maybe even commercial systems might be made or something.

That is not a FreeDOS API, it is simply Win9x / MS DOS 7 compatible
so you can get documentation by reading about Win9x / MS DOS 7 :-)

> I am hoping to implement some sort of fallback mechanism into the program
> so that if int 21h, 7303h fails, I have int 21h, 36h to fall back on.

As you can see in my example program, you indeed have to do that.
In particular, if the kernel does not support FAT32, for example
in WinNT / MS DOS 6 and older / FreeDOS "16" style kernels, then
you have to stick to int 21 function 36... By the way, of course
I do use both 21.36 and 21.7303 but maybe Assembly is not the
programming language that you like best :-)

> but I need to know exactly how to detect failure.  not every programmer
> writing  production code does that...  so I need documentation.
> like for instance, is the carry bit set or cleared or something?

That is also documented in my example program.

http://ericauer.cosmodata.virtuaserver.com.br/soft/specials/
free-disk-space-tester-freetest.zip

1. ax=7300h dl=0 cl=1 int 21h - if it returns ax unchanged,
then the kernel is not aware of the 21.73xx FAT32 functions.

2. if the kernel does support FAT32, you can set ax=7303h,
ds:dx = pointer to db "x:\",0 where X is the drive where
you want to know the free / used space, es:di = pointer to
30h byte buffer for results, cx=30h, int 21h - if it sets
carry or the bytes per sector is nonsense (buffer+8, dword)
then it failed, otherwise buffer+14h has a dword with the
number of free sectors.

3. if the kernel does not support FAT32, use good old 21.36

Enjoy :-)

Eric

PS: Depending on your memory model, you do not have to set
the ES or DS part of the pointers, only the offset. Easier.



------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to