Table of Contents
Previous Go to Robert Ramey Software Development Home Page next

4. Using the 32 bit Extended Version

The postman's sort developer's kit for DOS includes the program file PSORT3.EXE . This is a version of the program compiled with a 32 bit DOS extender which will run on a an intel 80386 or better processor. This program will operates a 32 bit protected mode program with a linear address space of 4 Gigabytes. It will use all available extended memory plus all available conventional memory to minimize sorting time. Less than 30KB of available conventional memory is required.

Usage of PSORT3 is identical to that of PSORT in all respects except one. In PSORT3, input/output memory buffer sizes cannot exceed 31 KB and the segment length cannot exceed 63 KB. In PSORT3, input/output buffer size and segment length can be any values as long as there is sufficient memory available. Changing the default buffer sizes usually yields minimal improvement in sorting speed. In certain cases, increasing the default segment length may improve sorting speed significantly.

PSORT3 has been compiled using Watcom C/C++ 32 bit compiler with CauseWay memory extender. T.CH 2 "Hardware"

This program will operate on most 80386 and i486 equipped personal computers. The DOSX 386 extender included in PSORT3.EXE will operate on on IBM PS2 computers and all "AT class" 80386 computers. Hardware sensitive items include the enabling hardware for the A20 line and the 8259 interrupt controllers. The vast majority of 80386 equipped personal computers without the need for extended memory management software.

If the A20 enabling hardware is not IBM AT or IBM PS2 compatible, an XMS extended memory manager compatible with that computer may be required. In this case the program will exit with an error message:

Cannot enable the A20 line, XMS memory manager required. An extended memory manager is a program installed at boot time by inserting the appropriate line in the CONFIG.SYS file. If a suitable memory manager is available and can be installed, it should be possible to run PSORT3.

Extended memory is not required to run PSORT3. If extended memory is available, it will be added to the heap/stack space. This means that PSORT3 will run on 80386 computers that have no extended memory provided there is sufficient conventional memory available.

If PSORT3.EXE is executed on any processor other than an 80386 or i486 the program will exit with the following message:

Fatal error, 80386 in real mode required Software

4.1. Software

PSORT3 is compatible with IBM's VDISK.SYS, Microsoft's RAMDRIVE.SYS, SMARTDRIVE.SYS, HIMEM.SYS and other well behaved TSRs which may or may not use extended memory. Note that some extended memory managers such as HIMEM.SYS are not compatible with VDISK.SYS. Installing both of these programs simultaneously results in no extended memory available for other application programs, regardless of the amount of extended memory that is not actually being used. In this case use a different RAM disk program or exclude the extended memory manager. Here is a list of resident programs known to be compatible:

a) Microsoft HIMEM.SYS RAMDRIVE.SYS SMARTDRV.SYS Windows Version 3.0 and above

b) Qualitas 386^MAX version 5.0 and above. (not compatible with earlier versions)

c) IBM VDISK.SYS

PSORT3 is not compatible with some versions of TSRs which switch the processor to V86 mode and leave the processor in this state. These types of programs must either be VCPI compatible such as Qualitas 386^MAX version 5.0 and above or DPMI compatible such as Microsoft Windows 3.0 and above. If the startup code determines that the processor is in V86 mode and the software that switched it to that state is neither VCPI nor DPMI compatible it will exit with the message displayed on standard output:

Fatal error Previously installed software is neither VCPI nor DPMI compatible If output has been redirected to a file, the above message will not be displayed on the screen but written to the file. If less than 30KB of conventional memory is available, PSORT3 will fail with no error message.

It PSORT3 is executed in a DOS box under Windows/3.1 Enhanced Mode, be sure that the PSORT3 PIF file is set such that the amount of XMS memory allocated to PSORT3 is about 2MB less than the total memory on the PC. This will prevent windows from allocating virtual memory to PSORT3 which is disastrous for sorting performance. Disk Caching

4.2. Disk Caching

Disk caching programs will improve performance for all versions of PSORT by permitting i/o to occur in parallel with sorting program execution. However, memory allocated to the disk caching program is not available to extended memory versions of PSORT for sorting. Thus, assigning too much memory to the disk caching program will degrade performance instead of improving it. For fastest performance of extended memory versions, limit memory assigned to a disk caching program to 300K . This will leave the rest of extended memory available for sorting. Expanded Memory

4.3. Expanded Memory

Note that PSORT can use Extended Memory NOT Expanded Memory. Any memory assigned to expanded memory or LIM memory will not be available to PSORT. If this memory cannot be made part of extended memory, it may best be assigned to RAM disks and disk caching programs thereby contributing to the performance of PSORT.