Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Accessing and/or creating files > 2 GB in DOS? (Users)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 01.07.2009, 10:56

> > Is there any way to access OR create a file > 2 GB in pure DOS? I think
> it
> > SHOULD be possible to create a file > 2 GB but less than 4 GB in size,
> but
>
> I think it's not limitation of filesystem but DOS and programs which works
> with files (in case of mplayer the libc functions for seeking and reading -
> what data types it use). There's a patch for windows 98 that allows work
> with 4GB files in standard way. I tried it only on FAT32 partition not on
> FAT16 and it works well. So I think it shouldn't be impossible under DOS
> too (AFAIK DJGPP use 32bit signed pointer for files so it would be needed
> to extend it to 64bit and also probably FreeDOS would need some patch).

The low-level MS-DOS interface always uses unsigned numbers. In theory, MS-DOS can use and access files up to 4 GiB (less 1 byte). Earlier MS-DOS versions however only supported partitions up to (almost) 2 GiB. MS-DOS 7.10 supports FAT32 and supposedly (= I never tested it) files larger than 2 GiB. RBIL says the file must be opened with Open/Create (Int21.6C, or Int21.716C) with a new bit set to allow access to the part above 2 GiB. HLL libraries often still use functions 21.3D (Old open) and 21.3C (Old create/truncate) which don't allow setting that bit anyway. And even if the library uses 21.6C, it must be patched to set the bit. (And of course, stupid conventions of signed seek positions or negative values as error code must be dropped.)

"The FreeDOS kernel" (DOS-C) is currently being fixed to support files up to 4 GiB.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22760 Postings in 2121 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum