www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/18/13:22:08

Xref: news-dnh.mv.net comp.os.msdos.djgpp:3318
Path: news-dnh.mv.net!mv!news.sprintlink.net!hookup!gatech2!swrinde!newsfeed.internetmci.com!in1.uu.net!EU.net!sun4nl!cs.ruu.nl!usenet
From: piet AT morisot DOT cs DOT ruu DOT nl (Piet van Oostrum)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Pros and cons of djgpp vs. emx
Date: 17 Nov 1995 17:33:01 +0100
Organization: Universiteit Utrecht, Dept. of Computer Science
Lines: 175
Sender: piet AT morisot DOT cs DOT ruu DOT nl
References: <48b8im$cpf AT fu-berlin DOT de>
Nntp-Posting-Host: morisot.cs.ruu.nl
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

This is my review of a couple of months ago. The version 2.0 of djgpp may
change this.


First a brief introduction to these systems.
------------------------------------------------------------------------------
DJGPP is a 32-bit C/C++/Objective C development system for Intel 80386 (and
higher) PCs running DOS.  It includes ports of many GNU development
utilities.  It was ported by DJ Delorie <dj AT delorie DOT mv DOT com> and friends.
It generates 32-bit programs that need a DOS-extender (go32) to run.

It can be found at the simtel mirrors:
Oakland Univ:   oak.oakland.edu	      /SimTel/msdos/djgpp
St. Louis, MO:  wuarchive.wustl.edu   /systems/msdos/simtel/djgpp
Corvalis, OR:   archive.orst.edu      /pub/mirrors/simtel/msdos/djgpp
Australia:      archie.au             /micros/pc/oak/djgpp
England:        src.doc.ic.ac.uk      /pub/packages/simtel/djgpp
Finland:        ftp.funet.fi          /pub/msdos/SimTel/djgpp
France:         ftp.ibp.fr            /pub/pc/SimTel/msdos/djgpp
Germany:        ftp.uni-paderborn.de  /SimTel/msdos/djgpp
Hong Kong:      ftp.cs.cuhk.hk        /pub/simtel/msdos/djgpp
Israel:         ftp.technion.ac.il    /pub/unsupported/dos/simtel/djgpp
Poland:         ftp.cyf-kr.edu.pl     /pub/mirror/msdos/djgpp
Sweden:         ftp.sunet.se          /pub/pc/mirror/SimTel/msdos/djgpp
Switzerland:    ftp.switch.ch         /mirror/msdos/djgpp
Taiwan:         nctuccca.edu.tw       /PC/simtel/djgpp
Thailand:       ftp.nectec.or.th      /pub/mirrors/SimTel/msdos/djgpp
------------------------------------------------------------------------------
EMX is a port of the same for OS/2 but it also runs on MS-DOS. It also
generates 32-bit programs, and these need a DLL for OS/2 and an extender
for DOS. It can also be used to compile OS/2 PM (Presentation Manager)
programs. It was ported by Eberhard Mattes
<mattes AT azu DOT informatik DOT uni-stuttgart DOT de> and can be found at:

    ftp.informatik.tu-muenchen.de(131.159.0.198) in
            /pub/comp/os/os2/devtools/emx+gcc
    ftp.uni-stuttgart.de(129.69.1.12) in /pub/systems/os2/
    src.doc.ic.ac.uk(146.169.2.1) in /pub/packages/os2/2_x/unix/gnu/
For USA sites:
    ftp-os2.cdrom.com:	/pub/os2/32bit/unix/emx09a/
    ftp-os2.nmsu.edu:	/pub/os2/32bit/unix/emx09a/
	(Read README.DOC and INSTALL.DOC first.  Needs emxfix02.zip also.)

emx-0.9a is the latest version.

EMX compiled programs can only run under MS-Windows (or any other DPMI
system) by using RSX (see next item)
------------------------------------------------------------------------------
RSX is another DOS-extender written by Rainer Schnitker
<rainer AT mathematik DOT uni-bielefeld DOT de>. It can also run djgpp compiled
programs and it replaces go32 then. It is said to be faster than go32 under
DPMI. It also does floating point emulation if you don't have a FPU.
RSX supports a couple more system calls than emx and djgpp.

RSXWIN is an emulator to run EMX text programs in an MS-Windows window
rather than a DOS box. RSXWIN only works with normal printf() -- not direct
or Bios video output. 

RSXWDK is a kit for building 32 bit MS-Windows Apps with EMX+GCC and
DJGPP. It  includes the windows extender RSXW32. For djgpp you will need
the sources also (this is NOT mentioned in the help file). You also need
DJGPP 1.11m12 or later.

RSX can be obtained from ftp.uni-bielefeld.de:/pub/systems/msdos/misc.
dpmigcc5 is the basic RSX system.

What is missing is a windows.h file. The doc says that you should obtain
this from a commercial compiler. I found a windows.h in the WINE projects
but I don't know it this can be used. Please let someone try this.
See http://www.ifi.uio.no/~dash/wine/wine-dist/include/windows.h

Or ftp the whole package from:
sunsite.unc.edu:/pub/Linux/ALPHA/wine/Wine-950302.tar.gz 
aris.com:/pub/linux/ALPHA/Wine/development/Wine-950302.tar.gz 
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-950302.tar.gz 
ftp.funet.fi:/pub/OS/Linux/ALPHA/Wine/Wine-950302.tar.gz 
ftp.wonderland.org:/Wine/Wine-950302.tar.gz 


------------------------------------------------------------------------------
OK now come my questions and a summary of the answers for each one. If you
want to receive all the replies that I got, please email me and I will send
it to you.

PvO> 1. If I read the EMX doc correctly I cannot spawn (exec) a
PvO>    "normal" MSDOS program from an EMX program. Is that correct? If
PvO>    so, is the same true for djgpp?

djgpp can spawn any program that can run under dos.  It spawns other
djgpp programs directly to allow for long command lines, but will use
the system to spawn any other program.

You can spawn a normal MS-DOS program from an EMX program if you use
the -p option (emxbind -a prog -p).

PvO> 2. If you spawn a djgpp program from another one, 130KB of low memory is
PvO>    used, thereby limiting the number of instances to 5. Is the same true
PvO>    for emx?

Currently (with version 1.1x) everytime a djgpp program is
called, the go32 extender will take up 130k of memory. So, ideally, you can
spawn 5 djgpp programs (the number may be less than 5 if one of the
programs allocated some DOS memory.)

djgpp V2 will reduce this overhead to a very low amount - about 17K -
allowing many nestings.  V2 is in alpha development.

If you run an EMX program from an EMX program, no additional low
memory is used.  However, the number of processes is currently limited
to 6; this can be changed by modifying the MAX_PROCESES constant in
\emx\src\dos\process.inc and rebuilding emx.exe.

PvO> 3. EMX cannot run under DPMI, except when you use the RSX extender. DJGPP
PvO>    programs can, but they can also run under RSX. Any [dis]advantages?
PvO>    RSXWIN can run EMX programs in a normal MSWindows window. Can this also
PvO>    be done with djgpp programs?

Most djgpp program can run under Window (through the DPMI interface.) The
other program(s) might not run correctly because of:
  1. They use code that assumes DOS memory is mapped to 0xe0000000 area.
  2. They use code that attempts to manipulate the stack directly 
     (such that the profile feature in ladybug 1.00)
  3. They try to emulate the 387 by a go32-style exception handler.

PvO> 4. RSXWDK can be used to develop MSWindows programs with EMX. IS there a
PvO>    similar thing for DJGPP?

Yes. RSXWDK2 allows one to use djgpp to create windows programs. I
just used the test files, and they worked. (don't just get the binary,
get the source also. you need both).
unzip the rsxwdk2s.zip (source code). Otherwise the
lib patch script did not work (No it does not tell you if it
fails). Just get the source and redo the lib patch. 

PvO> 5. How about mixing the two? Is there any problem with using djgpp programs
PvO>    in an EMX environment or v.v.?

No problem. E.g. you can run the DJGPP version of GNU make regardless of
	what compiler you are using (DJGPP, EMX, tcc ...)

PvO> 6. Are some programs easier to port with one or the other?

Interestingly both say that there system is better for Unix support

djgpp was designed specifically to port unix programs; mostly the GNU
ones.  It may be easier to port with djgpp if you have a unix program
to port.  X and X/Motif programs should port easily with djgpp and
DESQview/X.

The POSIX.1 and Unix support of emx used to be better; for instance,
DJGPP didn't have termio/termios and signals.  This might have changed
in the meantime.

DJGPP has DOS things like <conio.h> and ScreenPutCh().
EMX is somewhat cleaner in making the DOS, OS/2, UNIX, ANSI
distinctions apparent.

Example: both DJGPP and EMX support command-line globbing, but
- DJGPP does the globbing before main() so that argv[] is expanded
  as if passed from the shell, unless noglob is specified in the
  GO32 environment variable.
- EMX requires that you explicitly request
  "_wildcard (&argc, &argv);" at the beginning of main().

emx/rsx has signals, fork, pipe etc which are missing from the current
DJGPP (but will be added in the next version). I think if you use
djgpp with rsx you will get signals, fork. 

PvO> 7. More?

E.g.: djgpp's graphics support (VCPI) is much better than emx/gcc's.

-- 
Piet van Oostrum <piet AT cs DOT ruu DOT nl>
http://www.cs.ruu.nl/~piet

- Raw text -


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