Hi,

On Fri, Nov 3, 2023 at 12:31 PM Ralf Quint via Freedos-user
<freedos-user@lists.sourceforge.net> wrote:
>
> In which way is "FreeDOS" limited to 2GB sized files? (Sorry, never
> bothered wit such large files on DOS (any DOS)? The file size entry in
> the FAT32 directory entry is a 4 byte integer. As a filesize can't be
> negative, this should be a UINT_32/unsigned long and thus allow for
> files up to 4GB.

I'm not exactly sure, but I think 4 GB files were somewhat uncommon
(in DOS programs). And I'm not entirely sure NT (Win XP etc.) ever
supported such a thing atop FAT32 either (via DOS calls).

DJGPP 2.04 "beta" (and 2.05 "current") apps *should* work, but I don't
know for sure (ask Martin Stromberg). I do know that DJGPP's *nix file
utilities like "df" and "du" only use the corresponding FAT32 calls if
the DOS major version is reported as 7.

> If the FAT32 enabled file functions of INT 21h do
> handle this properly with a unsigned long, any program that does the
> same and the programmer of an application didn't get lazy and just
> assumes "signed long is big enough for everyone", then this should be a
> problem of that application, not FreeDOS.

I believe it's something weird like int 21h, 716Ch is needed to create
the file. (Maybe ecm can chime in, I think we've had this conversation
before.)

> If the respective routines in
> the FreeDOS kernel do in fact handle the FAT32 file size entry as a
> signed long, than this is a bug that needs to be fixed IMHO...

Yes, that's precisely the problem (according to Eric Auer, years ago).

> > FAT32 is free, but IIRC there a patents problems with other newer formats
> FAT32 itself was never patented, it was the long file name format and
> handling that was covered by patents, which by now have expired.

As of 2017, yes, supposedly the LFN patents are expired. The main
problem with LFNs (besides the fact that you don't *need* them half
the time) is that the DOS drivers (e.g. DOSLFN) are super slow.

> exFAT is  not really an extension like FAT12->FAT16->FAT32 where and doesn't
> have such limitations, just doesn't have all that journal stuff that is
> included in NTFS, which has become the standard file system ever since
> Windows 2000 (and Microsoft intentionally limits the use/format of FAT32
> partitions larger than 32GB).

Not sure I'd even want exFAT support in FreeDOS, personally. I'd
prefer HPFS or ext2 instead.

> Disk size limit should be 8TB, just like with any other FAT32 implementation.

I still occasionally use a 128 GB USB jump drive with (only) FreeDOS
(FAT32) installed on my old (2010) Dell laptop without any obvious
problems. Granted, that's an older install (older 2041 kernel, older
stable shell 0.84-pre2 XMS_Swap).

In recent months I was writing a lot of Pascal code (ISO 7185 but 99%
TP compatible so that a simple script will let it compile either way).
But none of that needed large files at all. (I also typically test
atop a 200 MB FAT16 RAM disk.)


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to