Cwsdpmi
Cwsdpmi
edu)
1206 Braelinn, Sugar Land, TX 77479
* CWSDPMI.EXE or CWSDPR0.EXE are not modified in any way except via CWSPARAM.
* CWSDSTUB.EXE internal contents are not modified in any way except via
CWSPARAM or STUBEDIT. It may have a COFF image plus data appended to it.
* Notice to users that they have the right to receive the source code and/or
binary updates for CWSDPMI. Distributors should indicate a site for the
source in their documentation.
-------------------------------------------------------------------------------
CWSDSTUB.EXE is a stub loader image for DJGPP which includes CWSDPMI. This
allows single executable image distributions. You can use the EXE2COFF
program and COPY /B CWSDSTUB.EXE+yourimage yourimage.exe to create a
standalone executable image.
If you want to use CWSDPMI with DJGPP, you expand the distribution into the
DJGPP directory tree. CWSDPMI.EXE will be put in the BIN directory with your
DJGPP images and it will automatically be loaded when they run.
Directions for use (server can be used in either of two different ways):
2) "cwsdpmi -p" will terminate and stay resident until you remove it.
It can be loaded into UMBs with LH. "cwsdpmi -u" will unload the TSR.
4) The default swap file name is c:\cwsdpmi.swp, but this can be changed
with the CWSPARAM image, as can some other parameters.
5) You can disable the DPMI 1.0 extensions by starting the image with the
"cwsdpmi -x" syntax. This feature allows you to run programs developed
under other DPMI providers which do not behave properly with these
extensions enabled (typically use of NULL pointers).
I would like to give special thanks to DJ Delorie who wrote the original
GO32 code on which CWSDPMI is based. Morten Welinder also provided and
improved much of the code in this program.
-------------------------------------------------------------------------------
This section contains a list of the error messages you might see out of
CWSDPMI and some details on what they mean.
Exceptions are only handled by CWSDPMI if the application does not establish
an exception handler, exceptions nest 5 deep, or the error is particularly bad:
"Page fault" -
1) an illegal page fault happens in a RMCB or HW interrupt, (lock all pages!)
2) all available pages have been locked,
3) the application is using non-committed pages for null pointer protection.
"Double Fault" - multiple exceptions occurred
"Invalid TSS" - typically due to RMCB or HW interrupt being called after the
selectors/memory have been deallocated (remember to reset the mouse)
"General Protection Fault" - bad parameter sent to a DPMI call
"80386 required."
Since 80286 and lesser processors don't have the hardware necessary to
run CWSDPMI. No workaround, upgrade.
"DOS 3 required."
A few interrupts are used which need DOS 3.0 or higher. I don't expect to
ever see this message, since 80386 machines were introduced after DOS 3.0
and that check is made first.
Maybe you are out of file handles, or the swap file name is incorrectly
specified in the image (change the name with cwsparam).
This message means you tried to use more paging file than CWSDPMI was
configured to handle. Since this is protected against in the memory
allocation code, you should never see this message.
This means the paging file could not be expanded when trying to page
memory out to disk. This would normally not be seen, unless you are
writing output to the same disk which holds the paging file. Decrease
the amount of memory your DPMI application is using or free up disk space.
"Interrupt 0x??"
This message might be seen if you have your memory manager in AUTO mode. The
only workaround in this case is to stop using AUTO mode.
CWSDPMI is a 32-bit only DPMI server. Ideally, on the request to enter DPMI's
PM with a 16-bit request, we would just fail the call setting the carry bit
like the DPMI specification describes. Some buggy 16-bit compiler tools don't
check the return status and will hang the machine in this case. So, I issue
an error message and exit the image instead.
"Descriptors exhausted."
An attempt to nest a DPMI client failed in the setup phase due to insufficient
free selectors in the LDT.