www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/19/21:04:50

From: Brian Zaugg <zauggb AT cs DOT byu DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Need help making standalone with PMODE/DJ--"Program too large to fit in memory"
Date: Sun, 19 Jan 1997 14:26:49 -0700
Organization: XMission Internet (801 539 0900)
Lines: 81
Message-ID: <32E29199.368D@cs.byu.edu>
Reply-To: zauggb AT cs DOT byu DOT edu
NNTP-Posting-Host: provo12.modem.xmission.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am having difficulty making a standalone executable with PMODE/DJ for
use on a machine with no DMPI.  Before you tell me I should just use
CWSDPMI, here is why I'm not: My program (for school) is being graded on
speed, and I read that PMODE is faster.  Also, my program will be run by
a script which copies it from a floppy to the hard drive, then runs it
on a series of test files.  The TA doesn't want to have to load CWSDPMI
special for me.

	Now, on with the problem.  I first compile and link my program:
>gcc -o who who.c

This creates a COFF image (who, size 78,205) and an executable (who.exe,
size 80,253).  

Then, following the instructions in the PMODE docs,:
>copy /B pmodstub.exe + who who.exe
overwrite who.exe?y
1 file copied 

This creates a new executable (who.exe, size 78,205).  Why is the new
executable the same size as the COFF image?  Didn't I just add a stub or
something?

Anyway, then I rename the cwsdpmi files that allowed me to run gcc so
that they won't be in the way, and run my program:
>who
Program too big to fit in memory.

This is a tiny program which just prints one line to the screen and
terminates.  How can it be too big to fit in memory?

So then I recompile to get my original who.exe back, hide CWSDPMI again,
and this time I load the PMODETSR.  Then I run my program and it runs
fine.  No memory problems.  What is going on here?  Can someone help? 
My program is due Wedneday!

Here is some background on my machine:
I am running a pentium 133 with 16 meg memory.  When I run go32-v2, it
tells me:
DPMI memory available: 15227k
DPMI swap space available: 130389k

I have DJGPP version 2.01 and PMODE/DJ version 1.1.

I am running MS-DOS version 6.22.  Here are my startup files:
config.sys:
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB
LASTDRIVE=E
FILES=40
BUFFERS=20
FCBS=4
STACKS=9,256

autoexec.bat:
PATH=C:\;C:\DOS;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DRIVERS\MOUSE;C:\C\DJGPP\BIN;C:
\C\DJGPP\INCLUDE
SET BLASTER=A220 I5 D1 H5 P330 T6
SET SOUND=C:\SB16
SET MIDI=SYNTH:1 MAP:E
SET TEMP=C:\DOS\TEMP
SET DJGPP=C:\C\DJGPP\DJGPP.ENV

I was loading quite a few other drivers, but I trimmed down to the above
configuration and I still get the problem.  Can anyone help?  Thanks.

--Brian







-- 
|||||||||||||||||||"Commandment #12592:|||||||||||||||||||
Oh ye who go about saying unto each:  "Hello Sailor":
Dost thou know the magnitude of thy sin before the gods?
... Surely thou shalt repent of thy cunning."
   -- Zork I: The Great Underground Empire

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019