Memory limitations
MS-DOS 4 and 5 include the HIMEM.SYS XMS 2.x driver which will not allow the OS itself to address more than 16 MB of system memory. This is the case when those operating systems came out. If the HIMEM.SYS XMS 3.x is used from MS-DOS 6 through MS-DOS 6.22, then the system memory ceiling would be raised from 16 MB to 64 MB.
MS-DOS 6 through 6.22 include the HIMEM.SYS XMS 3.x driver which raises the system memory ceiling from 16 MB to 64 MB. 64 MB or 65,536 KB is very common, because MS-DOS 6.x used a unsigned 16-bit value to store the physical amount of memory in kilobytes. If more than 64 MB of system memory is reported to MS-DOs 6.x, then only 64 MB will be usable.
The system memory limit ceiling was raised to 4 GB in MS-DOS 7, MS-DOs 7.1 and MS-DOS 8. However, up to around 3.6 GB of system memory will be usuable to the OS.
Hard disk size limitations in MS-DOS 2.x to MS-DOS 6.22
FDISK from MS-DOS 2.x only had FAT12 support with support for single hard disks up to 16 MB at 4,096 bytes per cluster. In MS-DOS 3.0 to MS-DOS 3.2, the limit was raised to 32 MB when FAT16 support was introduced.
FDISK from MS-DOS 3.3 allowed partition sizes of up to 32 MB (or 65,535 sectors at 512 bytes per sector) and recognises hard disks of up to 504 MB (1,024 cylinders, 16 heads and 64 sectors per track). For this instance, drive C as the primary partition and drives D through R would need to be created - 15 32 MB partitions and a 24 MB logical partition on drive R.
However, in November 1987 Compaq shipped Compaq MS-DOs 3.31 with support for hard disks up to 504 MB. Partitions over 32 MB used the partition type (0x06) which later became present in MS-DOs 4.0 and later.
FDISK from MS-DOS 4 and MS-DOS 4.01 is limited to a partition size of up to 4,095 MB per hard disk split to a 2,047 MB primary partition (drive C) and a 2,039 MB logical partition (drive D).
MS-DOS 4.0x had a serious bug where as if the size of the hard disk is greater than 4,095 MB, the OS would refuse to boot...even from a floppy disk. This bug was due to Microsoft programmers using 32-bit unsigned numbers to store hard disk drive capacity detection in FDISK which would cause the value (in megabytes) to wrap back to zero, meaning that a hard disk larger than 4 GB in capacity will be reported significantly less. IBM's PC-DOS 4.0 only supported partitions of up to 1,024 MB with up to four partitions.
The 4,095 MB bug was fixed in MS-DOS 5.0 and later where as the capacity limit was raised to 1,024 cylinders, 255 heads and 63 sectors per track for a total of 16,450,560 sectors. At 512 bytes per sector, this totals 8,422,686,720 bytes or more commonly - 8,032.5 MB (7.84 GB).
The hard disk with the maximum capacity of 7.8 GB must be split into four partitions, the 2,047 MB primary partition on drive C would first be created and a Extended DOS partition of 5,977 MB, consisting of two 2,047 MB logical partitions on drive D and E and one 1,883 MB partition on drive F.
If a hard disk has a capacity of 8,032 MB or more, then only 8,032 MB will be usable under MS-DOS 5 and 6.
Also, when it says "Do you wish to use the maximum available size for a Primary DOS partition?", if you try to select the whole hard disk if the size of the drive is more than 2,047 MB then only the first 2,047 MB will be used and the remaining 5,977 MB will be reserved for a Extended DOS partition.
Hard disk size limitations in MS-DOS 7, MS-DOS 7.1 and MS-DOS 8
In MS-DOS 7 (Windows 95 and 95A) FDISK, the 7.8 GB partition size limit was removed, however only FAT16 partition sizes of up to 2 GB could be created. MS-DOS 7 FDISK also cannot correctly display the size of large drives as the value is limited to 9,999 MB. If the size of the drive is over 10,000 MB, the last digit will be dropped. For example, a Quantum 12 GB with a partition size of 11,497 MB would be displayed as "1149".
Let me warn you that in MS-DOS 7 FDISK, there is a rather annoying bug where if you try to partition FDISK on a hard disk larger than 32,767 MB, FDISK will NOT report the correct size of the drive as the total disk space will end up showing negative numbers! MS-DOS 7 FDISK used signed 16-bit values internally to calculate the size of the drive in megabytes. And some of these variables will overflow when the size of the drive itself is equal to or larger than 32 GB.
For example, if the size of the physical drive is 48 GB in size, FDISK will use the first 2,047 MB for the primary partition and 47,104 MB for the Extended DOS Partition. However, FDISK will end up reporting the drive as being a -18,431 MB drive when a Extended DOS partition is created! A series of logical drives, drives D all the way to drive Z would need to be created and formatted. However, after partitioning logical drive R, FDISK under MS-DOS 7.0 will stop responding (hang) when attempting to partition logical drive S!
The solution when using MS-DOS 7 FDISK is use a hard disk smaller than 32 GB in size and create 2 GB partitions or use MS-DOS 7.1 which added FAT32 support and support for hard disks up to 2 TB.
In MS-DOS 7.1 when used with Windows 95 OSR2.x or Windows 98, there is a bug where FDISK will not recognise the full size of the hard disk larger than 64 GB: http://support.microsoft.com/kb/263044
The fix that I pointed out only applies to MS-DOS 7.1 when used with Windows 98 and Windows 98 Second Edition, because MS-DOS 7.1's FDISK uses unsigned 16-bit values internally to calculate the size of the drive in megabytes. However, even if the fix is applied, MS-DOS 7.1 when used with Windows 98 and MS-DOS 8.0 cannot correctly display the size of large drives as the value is limited to 99,999 MB. If the size of the drive is over 100,000 MB, the last digit will be dropped.
Also, FDISK when used with MS-DOS 7.1 will be unable to properly create a hard disk larger than 512 GB. For example when you attempt to set up a 640 GB hard disk with MS-DOS 7.1, you will not be able to use a partition of 610,352 MB, instead it will only end up as a partition size of 86,063 MB.
Such a issue will occur, because MS-DOS 7.1 FDISK uses signed 20-bit values to calculate partition creation sizes which limits the size of the partition to 512 GB. To work around this solution, you will either have to use the MS-DOS 8.0 FDISK (from the Windows Millennium boot disk), use the FreeDOS FDISK or use a third-party partition to create a FAT32 formatted hard disk of up to 2 TB.
Lastly, in FreeDOS, the size of the drive is limited to a six-digit value of 999,999 MB. If FreeDOS is used to partition a 1.5 TB or 2 TB hard drive then the last digit will be dropped.
Testing MS-DOS limitations
Okay, I create three 8,036 MB hard disk images for use in MS-DOS 6.22 under VMware Player. I allocated 64 MB of system memory and 4 MB of video RAM. Since the CD-ROM is present on the secondary master channel, MS-DOS FDISK will report three IDE hard drives as 8,025 MB each. The drives are partitioned as the following:
DISK 1
Quote
F: 2,047 MB (logical)
G: 2,047 MB (logical)
H: 1,833 MB (logical)
DISK 2
Quote
I: 2,047 MB (logical)
J: 2,047 MB (logical)
K: 1,833 MB (logical)
DISK 3
Quote
L: 2,047 MB (logical)
M: 2,047 MB (logical)
N: 1,833 MB (logical)
In short, when running MS-DOS under VMware, QEMU, Bochs, VirtualBox or Virtual PC:
1. If a CD-ROM is present, MS-DOS will use up to three IDE hard disks with a total of up to 24,075 MB of total disk space.
2. When a CD-ROM not present, MS-DOS will use up to four IDE hard disks with a total of up to 32,100 MB of total disk space.
3. If MS-DOS is set up on a SCSI virtual disk, MS-DOS will use up to 8 SCSI hard drives or up to 6 SCSI hard drives with a capacity of 8,032 MB each with the highest possible total of 48,192 MB of disk space (or up to 46,304 MB of disk space with a virtual CD-ROM). The absolute highest limitation maybe less if removable media is present.
Has anyone experienced testing hard disk and memory limits before in MS-DOS? If so, please share your experience.
Update: I tested running MS-DOS 6.22 with 80 MB of system memory allocated to the VM and with the following example output:
C:\>mem Memory Type Total = Used + Free ---------------- ------- ------- ------- Conventional 640K 24K 616K Upper 115K 96K 19K Reserved 0K 0K 0K Extended (XMS) 65,985K 450K 65,535K ---------------- ------- ------- ------- Total memory 66,739K 569K 66,170K Total under 1 MB 755K 120K 635K Largest executable program size 616K (630,288 bytes) Largest free upper memory block 9K (9,696 bytes) MS-DOS is resident in the high memory area. C:\>
As described above, MS-DOS will report the total amount of memory up to a little more than 1 MB over 65,535 KB leaving the maximum amount of XMS that MS-DOS can use to no more than 65,535 KB and with 640 KB of base memory and up to 128 KB of upper memory, that works out to a absolute maximum of 66,303 KB of total memory available to DOS!
This post has been edited by ppgrainbow: 16 December 2012 - 10:09 PM



Help


Back to top










