Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FreeDOS, cannot open swap file cwsdpmi.swp

1,339 views
Skip to first unread message

jimm

unread,
Oct 26, 2011, 8:25:39 PM10/26/11
to
I am making bootable floppies and a bootable cd-rom.
I want to completely eliminate the possibility of CWSDPMI using swap.
how do I compile/link/code/whatever my programs so that this is so?
I can't expect any hard disks to have a partition on it. c: may be
actually an eltorito cdrom, so It may not necessarily be writable. I
want to completely rely on RAM, there's plenty of it to go around!



gpp -Wall -W -Wextra -v -save-temps -O -s -oa.exe @_TMPSRCQ.LST
if not exist a.exe goto skipgp
if exist %outfile% del %outfile%
if exist a.exe %djpth%\bin\exe2coff a.exe
if not exist a goto noagp
if not exist %djpth%\bin\cwsdstub.exe goto oopsgp
if exist a copy /B %djpth%\bin\cwsdstub.exe+a a2.exe
if exist a2.exe move /y a2.exe %outfile%
if exist a del a
if exist a.exe del a.exe
if exist a2.exe del a2.exe
:skipgp
goto endgp

:oopsgp
echo ERROR: %djpth%\bin\CWSDSTUB.EXE does not exist. must have this
file to build monolithic executables.
echo NOTE: I recently discovered that with CWSDSTUB.EXE you don't need
CWSDPMI.EXE.
@del a.exe
goto endgp

:noagp
echo ERROR: the file a is missing. this is required in order to merge
cwsdstub.exe and make a monolithic executable.
@del a.exe
goto endgp


Rugxulo

unread,
Oct 27, 2011, 12:13:11 AM10/27/11
to
Hi,

On Oct 26, 7:25 pm, jimm <jmich...@yahoo.com> wrote:
>
> I am making bootable floppies and a bootable cd-rom.
> I want to completely eliminate the possibility of CWSDPMI using swap.
> how do I compile/link/code/whatever my programs so that this is so?
> I can't expect any hard disks to have a partition on it.  c: may be
> actually an eltorito cdrom, so It may not necessarily be writable.  I
> want to completely rely on RAM, there's plenty of it to go around!

Since apparently you're using CWSDSTUB.EXE, you'll have to use
CWSPARAM.EXE (or similar) to change the default path "c:\cwsdpmi.swp"
to something invalid, e.g. "" (nothing), which (IIRC) by default will
just put a '\0' in the drive byte of the path.

Otherwise, you can disable at runtime, e.g. "lh cwsdpmi -p -s-" or
similar.

jimm

unread,
Oct 27, 2011, 3:24:46 AM10/27/11
to
how *exactly* do I do that with cwsparam? do I use this instead of
cwsdstum or in addition to, or what's going on here? help me out.
the manual doesn't work.

Rugxulo

unread,
Oct 27, 2011, 8:53:24 AM10/27/11
to
Hi again,

On Oct 27, 2:24 am, jimm <jmich...@yahoo.com> wrote:
> On Oct 26, 9:13 pm, Rugxulo <rugx...@gmail.com> wrote:
>
> > On Oct 26, 7:25 pm, jimm <jmich...@yahoo.com> wrote:
>
> > > I want to completely eliminate the possibility of CWSDPMI using swap.
>
> > Since apparently you're using CWSDSTUB.EXE, you'll have to use
> > CWSPARAM.EXE (or similar) to change the default path "c:\cwsdpmi.swp"
> > to something invalid, e.g. "" (nothing), which (IIRC) by default will
> > just put a '\0' in the drive byte of the path.
>
> how *exactly* do I do that with cwsparam?  do I use this instead of
> cwsdstum or in addition to, or what's going on here?  help me out.
> the manual doesn't work.

================
F:\>copy /b cwsdstub.exe *.bak

cwsdstub.exe => cwsdstub.bak

F:\>cwsparam cwsdstub.exe

Full name of paging file ("" to disable) ? [c:\cwsdpmi.swp] ""

Number of page tables to initially allocate (0=auto) ? [0]

Minimum application memory desired before 640K paging ? [512Kb]

Paragraphs of DOS memory to reserve when 640K paging ? [3840]

Paragraphs of memory for extra CWSDPMI internal heap ? [256]

Maximum size of swap file ? [128Mb]

Value of run option flags ? [0]

F:\>cwsparam -v cwsdstub.exe

-value- -field description-

*Disabled* Full name of paging file ("" to disable)

0 Number of page tables to initially allocate
(0=auto)

512Kb Minimum application memory desired before 640K
paging

3840 Paragraphs of DOS memory to reserve when 640K
paging

256 Paragraphs of memory for extra CWSDPMI internal
heap

128Mb Maximum size of swap file

0 Value of run option flags

F:\>fc cwsdstub.bak cwsdstub.exe

Comparing F:\cwsdstub.bak and F:\CWSDSTUB.EXE

0000538E: 63 c 00

F:\>scrndump jim.txt

================

Basically I just typed verbatim "" (two double quotes) for null path.
Then I just kept hitting enter for default values in []. As you can
see, all it does it patch one byte to make it invalid.

Rod Pemberton

unread,
Oct 27, 2011, 1:36:36 PM10/27/11
to
"Rugxulo" <rug...@gmail.com> wrote in message
news:b73cdb6a-950b-47c5...@y36g2000yqm.googlegroups.com...
> On Oct 27, 2:24 am, jimm <jmich...@yahoo.com> wrote:
> > On Oct 26, 9:13 pm, Rugxulo <rugx...@gmail.com> wrote:
> > > On Oct 26, 7:25 pm, jimm <jmich...@yahoo.com> wrote:
>
> > > I want to completely eliminate the possibility of CWSDPMI using swap.
>
> > > Since apparently you're using CWSDSTUB.EXE, you'll have to use
> > > CWSPARAM.EXE (or similar) to change the default path "c:\cwsdpmi.swp"
> > > to something invalid, e.g. "" (nothing), which (IIRC) by default will
> > > just put a '\0' in the drive byte of the path.
>
> > how *exactly* do I do that with cwsparam? do I use this instead of
> > cwsdstum or in addition to, or what's going on here? help me out.
> > the manual doesn't work.
>
> ================
> F:\>copy /b cwsdstub.exe *.bak
>
> cwsdstub.exe => cwsdstub.bak
>
> F:\>cwsparam cwsdstub.exe
>
> Full name of paging file ("" to disable) ? [c:\cwsdpmi.swp] ""
>
> Number of page tables to initially allocate (0=auto) ? [0]
>
> Minimum application memory desired before 640K paging ? [512Kb]
>
> Paragraphs of DOS memory to reserve when 640K paging ? [3840]
>
> Paragraphs of memory for extra CWSDPMI internal heap ? [256]
>
> Maximum size of swap file ? [128Mb]
>
> Value of run option flags ? [0]
>
> F:\>cwsparam -v cwsdstub.exe

Does PMODETSR.EXE use swap? I.e., If not, then I would change the DPMI host
for it using STUBEDIT.EXE. E.g.,

STUBEDIT my_exe.exe

It has five options, just hit enter for the first four. Change the last one
to PMODETSR.EXE. You'll have to copy PMODETSR.EXE instead
of CWSDPMI.EXE to your floppy.

Mimimum amount of stack space (bytes/K/M) ? [0x80000 (512k)]
Size of real-memory transfer buffer (bytes/K/M)? [0x4000 (16k)]
Base name of ilfe to actually run (max 8 chars, ""=self) ? [""]
Value to pass as file component of argv[0] (max 16 chars, ""=default) ? [""]
Program to load to provide DPMI services (if needed) ? [CWSDPMI.EXE]


Rod Pemberton


0 new messages