home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / mfil130a.zip / emxrt.doc < prev    next >
Text File  |  1995-07-11  |  38KB  |  1,101 lines

  1. ===============================================================================
  2. emxrt.doc    emx 0.9a FIX 06     USER'S GUIDE TO THE EMX RUNTIME    11-Jul-1995
  3. ===============================================================================
  4.                                      Copyright (c) 1990-1995 by Eberhard Mattes
  5.  
  6.  
  7. 1 Table of Contents
  8. ===================
  9.  
  10. 1     Table of Contents
  11. 2     Introduction to the User's Guide to the emx Runtime
  12. 2.1     Hardware requirements
  13. 2.2     Files included in the emx runtime package
  14. 3     License
  15. 4     Installing the emx runtime package under OS/2
  16. 4.1     Summary for impatient OS/2 users
  17. 4.2     Detailed instructions for OS/2 users
  18. 5     Installing the emx runtime package under DOS
  19. 5.1     Summary for impatient DOS users
  20. 5.2     Detailed instructions for DOS users
  21. 6     Environment variables (OS/2 and DOS)
  22. 6.1     Environment variables (DOS)
  23. 7     DOS Notes
  24. 7.1     General notes
  25. 7.2     Emergency exit
  26. 7.3     Using rsx instead of emx
  27. 8     emx options
  28. 8.1     emx options (OS/2)
  29. 8.2     emx options (DOS)
  30. 9     The emxstack tool
  31. 10    Troubleshooting
  32. 10.1    Warning message `WARNING: emx 0.9a or later required'
  33. 10.2    unzip.exe says `cannot create emx/dll/emx.dll'
  34. 10.3    emx.dll cannot be deleted, renamed or overwritten
  35. 10.4    Error message `SYS1804: The system cannot find the file EMX.'
  36. 10.5    Error message `rsx not found, DPMI not supported by emx'
  37. 10.6    Error message `emx.dll: Stack size too small...'
  38. 10.7    DOS message `Sector not found'
  39. 11    emx messages
  40. 11.1    emx messages (OS/2)
  41. 11.2    emx messages (DOS)
  42. 12    Obtaining the complete emx package
  43. 13    The author of emx
  44.  
  45.  
  46. 2 Introduction to the User's Guide to the emx Runtime
  47. =====================================================
  48.  
  49. This is the documentation for the emx runtime package.  The emx
  50. runtime is an environment for 32-bit programs under OS/2 2.x, OS/2 3.x
  51. (OS/2, in short), MS-DOS, and PC-DOS (DOS, in short) on machines with
  52. a 386 CPU (or one of its successors).
  53.  
  54. Under OS/2, you can view the .inf version of this document by typing
  55.  
  56.     view \emx\book\emxrt
  57.  
  58. If you add \emx\book to the BOOKSHELF environment variable, you can
  59. type
  60.  
  61.     view emxrt
  62.  
  63. to view that on-line book.
  64.  
  65.  
  66. 2.1 Hardware requirements
  67. -------------------------
  68.  
  69. emx requires an 80386 CPU (80386DX, 80386SX, i486, or later)
  70.  
  71.  
  72. 2.2 Files included in the emx runtime package
  73. ---------------------------------------------
  74.  
  75. The emx runtime package includes the following files:
  76.  
  77.   \emx\bin\emx.exe              emx runtime for DOS
  78.   \emx\bin\emxbind.exe          Tool for modifying emx programs (DOS and OS/2)
  79.   \emx\bin\emxfpemu             Emulator for numeric coprocessor (DOS)
  80.   \emx\bin\emxl.exe             emx loader (used by emxbind)
  81.   \emx\bin\emxload.exe          Server for keeping OS/2 programs in memory
  82.   \emx\bin\emxrev.cmd           Tool for displaying emx revisions (OS/2)
  83.   \emx\bin\emxstack.exe         Tool for fixing the stack size of old programs
  84.   \emx\book\emxrt.inf           The text you are looking at (VIEW version)
  85.   \emx\dll\emx.dll              emx runtime for OS/2
  86.   \emx\dll\emxio.dll            Hardware port I/O under OS/2
  87.   \emx\dll\emxlibc.dll          Forwarder DLL to emxlibcm.dll (OS/2)
  88.   \emx\dll\emxlibcm.dll         Multithread C library (OS/2)
  89.   \emx\dll\emxlibcs.dll         Single-thread C library (OS/2)
  90.   \emx\dll\emxwrap.dll          Interface to 16-bit OS/2 functions (OS/2)
  91.   \emx\doc\emxrt.doc            The text you are looking at (text version)
  92.   \emx\etc\termcap.dat          Terminal data base for termcap-based programs
  93.  
  94.  
  95. 3 License
  96. =========
  97.  
  98. emx is free software; you can redistribute it and/or modify it under
  99. the terms of the GNU General Public License as published by the Free
  100. Software Foundation; either version 2, or (at your option) any later
  101. version.
  102.  
  103. emx is distributed in the hope that it will be useful, but WITHOUT ANY
  104. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  105. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  106. for more details.
  107.  
  108. You should have received a copy of the GNU General Public License
  109. along with emx; see the file COPYING.  If not, write to the Free
  110. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  111.  
  112. See \emx\doc\COPYING.EMX and \emx\doc\COPYING for details.
  113.  
  114. Please note that source code for parts of the contents of emxrt.zip is
  115. contained in emxfix06.zip.
  116.  
  117.  
  118. 4 Installing the emx runtime package under OS/2
  119. ===============================================
  120.  
  121.  
  122. 4.1 Summary for impatient OS/2 users
  123. ------------------------------------
  124.  
  125. 1.  Add \emx\dll to LIBPATH (always use the latest copy of the .dll
  126.     files!)
  127.  
  128. 2.  Add \emx\bin to PATH
  129.  
  130. 3.  Reboot
  131.  
  132.  
  133. 4.2 Detailed instructions for OS/2 users
  134. ----------------------------------------
  135.  
  136. emx does not work with OS/2 1.x and in DOS mode of OS/2.
  137.  
  138. Before changing config.sys, make a backup copy of that file!
  139.  
  140. The emx runtime is implemented as a set of dynamic link libraries
  141. under OS/2:
  142.  
  143. emx.dll
  144.         emx run-time support for OS/2
  145.  
  146. emxio.dll
  147.         access to hardware ports for emx programs under OS/2
  148.  
  149. emxlibc.dll
  150.         forwarder DLL to emxlibcm.dll for existing applications that
  151.         use emxlibc.dll (which has been renamed to emxlibcm.dll)
  152.  
  153. emxlibcm.dll
  154.         multithread emx C library
  155.  
  156. emxlibcs.dll
  157.         single-thread emx C library
  158.  
  159. emxwrap.dll
  160.         32-bit wrappers for 16-bit OS/2 API functions
  161.  
  162. OS/2 looks for dynamic link libraries in the directories listed in the
  163. LIBPATH statement of your config.sys file.  Note that LIBPATH is not
  164. an environment variable!
  165.  
  166. At any time, at most one version of a dynamic link library is loaded.
  167. If there are different versions of a dynamic link library in the
  168. directories listed in the LIBPATH statement, the first one listed is
  169. loaded.  If you already have installed the emx dynamic link libraries,
  170. you should be careful to use the latest revision of those dynamic link
  171. libraries.  Newer emx dynamic link libraries work with older emx
  172. programs (however, you may have to apply emxstack), but newer emx
  173. programs don't work with older emx dynamic link libraries.  To find
  174. out about already installed emx dynamic link libraries, type
  175.  
  176.     cd \emx\bin
  177.     emxrev
  178.  
  179. If no emx dynamic link libraries are installed, no output is produced.
  180. If there are emx dynamic link libraries installed, the names and
  181. revision numbers are displayed, for instance
  182.  
  183.     EMX : revision = 30
  184.     EMXIO : revision = 30
  185.     EMXLIBC : revision = 30
  186.     EMXLIBCM : revision = 30
  187.     EMXLIBCS : revision = 30
  188.     EMXWRAP : revision = 30
  189.  
  190. Only directories listed in the LIBPATH statement are searched.  To
  191. find out the revision numbers of the dynamic link libraries of this
  192. package, type
  193.  
  194.     emxrev -d c:\emx\dll
  195.  
  196. if you have put the emx runtime package on drive C.  After running
  197. emxrev, you should quit the command processor by typing
  198.  
  199.     exit
  200.  
  201. to release the dynamic link libraries (they have been loaded by
  202. cmd.exe as emxrev is a REXX procedure).  Otherwise, you cannot rename,
  203. overwrite, or delete those files.  This also happens if one of the emx
  204. dynamic link libraries is currently used by a program.  If you get
  205. error message SYS0032, use
  206.  
  207.     pstat /L
  208.  
  209. to find out about the dynamic link libraries used by the programs
  210. currently running.  Terminate all the programs using emx.dll,
  211. emxio.dll, emxlibc.dll, emxlibcm.dll, emxlibcs.dll, or emxwrap.dll.
  212. The command
  213.  
  214.     emxload -qw
  215.  
  216. will unload programs kept in memory by emxload.exe.
  217.  
  218. Either copy the latest revisions of the emx dynamic link libraries
  219. (that is, those with the highest revision numbers) to a directory
  220. directory listed in the LIBPATH statement of config.sys or modify the
  221. LIBPATH statement to include the directory where the latest revisions
  222. of the emx dynamic link libraries can be found.
  223.  
  224. The directories of the LIBPATH statement are separated by semicolons.
  225. To add c:\emx\dll to the LIBPATH statement, append a semicolon -- if
  226. there is not yet a semicolon -- to the end of the line of config.sys
  227. that starts with
  228.  
  229.     LIBPATH=
  230.  
  231. Then, type the absolute name of the directory.  Example:
  232.  
  233.     LIBPATH=.;C:\OS2\DLL;C:\OS2\MDOS;C:\;C:\OS2\APPS\DLL;D:\EMX\DLL
  234.  
  235. Optionally, you can append a semicolon at the end.
  236.  
  237. Next, modify the line of config.sys starting with
  238.  
  239.     SET PATH=
  240.  
  241. to include the \emx\bin directory.  For instance, change
  242.  
  243.     SET PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;
  244.     C:\;C:\OS2\MDOS;C:\OS2\APPS
  245.  
  246. to
  247.  
  248.     SET PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;
  249.     C:\;C:\OS2\MDOS;C:\OS2\APPS;D:\EMX\BIN
  250.  
  251. As with LIBPATH, you have to put a semicolon between the path names
  252. and a trailing semicolon is optional.  Note that the last two examples
  253. are shown in two lines; in config.sys, however, the complete SET
  254. statement must be put into one line.
  255.  
  256. You might want to add \emx\book to the BOOKSHELF environment variable
  257. to simplify viewing the on-line documentation.  For instance, change
  258. the line
  259.  
  260.     SET BOOKSHELF=C:\OS2\BOOK;
  261.  
  262. of your config.sys file to
  263.  
  264.     SET BOOKSHELF=C:\OS2\BOOK;C:\EMX\BOOK
  265.  
  266. as with PATH, you have to put a semicolon between the path names and a
  267. trailing semicolon is optional.
  268.  
  269. Now, you should reboot to activate the changes to config.sys.  After
  270. booting, run
  271.  
  272.     emxrev
  273.  
  274. to verify that the latest revision of emx is now active.
  275.  
  276. If OS/2 says
  277.  
  278.     SYS1804: The system cannot find the file EMX.
  279.  
  280. when running an emx program, you have not correctly set the LIBPATH
  281. statement of config.sys.  See above for details.
  282.  
  283. When running an old program (which assumes that emx.dll creates a
  284. stack object if the stack size is too small), you will get an error
  285. message like
  286.  
  287.     emx.dll: Stack size too small.  Run
  288.       emxstack -f D:\BIN\PROGRAM.EXE
  289.     and try again.
  290.  
  291. Run emxstack as indicated by the error message to fix the stack size
  292. of the program.  If you can't (because you don't have write permission
  293. for the file), type
  294.  
  295.     set emxopt=-I
  296.  
  297. to make emx.dll ignore the problem.  However, the program will
  298. probably crash due to insufficient stack size.  Using the -I option is
  299. not recommended!
  300.  
  301.  
  302. 5 Installing the emx runtime package under DOS
  303. ==============================================
  304.  
  305.  
  306. 5.1 Summary for impatient DOS users
  307. -----------------------------------
  308.  
  309. 1.  Add \emx\bin to PATH or set EMX to point to \emx\bin\emx.exe
  310.  
  311. 2.  If you are using a memory manager which implements DPMI, enable
  312.     VCPI
  313.  
  314. 3.  Remove BREAK=ON from config.sys
  315.  
  316. 4.  Reboot
  317.  
  318.  
  319. 5.2 Detailed instructions for DOS users
  320. ---------------------------------------
  321.  
  322. emx programs for DOS come in two flavours: those which load emx.exe
  323. from a separate file and those which have the emx runtime emx.exe
  324. integrated in the executable file of the application program.
  325.  
  326. Before changing autoexec.bat and config.sys, make a backup copy of
  327. these files!
  328.  
  329. If you want to use a program which loads emx.exe, you have to put
  330. emx.exe into a directory which is listed in your PATH environment
  331. variable or you have to change the PATH environment variable (in
  332. autoexec.bat) to include the directory in which emx.exe can be found.
  333. For instance, if your autoexec.bat file contains the line
  334.  
  335.     path c:\dos;d:\bin
  336.  
  337. you have installed the emx runtime on drive D, you should modify that
  338. line to read
  339.  
  340.     path c:\dos;d:\bin;d:\emx\bin
  341.  
  342. You have to put a semicolon between the path names.
  343.  
  344. Alternatively, you can set an environment variable which directly
  345. points to the emx.exe executable.  If you use this method, your
  346. program can locate emx.exe more quickly.  If you have installed the
  347. emx runtime on drive D:, you should add the following line to your
  348. autoexec.bat file:
  349.  
  350.     set emx=d:\emx\bin\emx.exe
  351.  
  352. Note that a directory name is not sufficient -- you have to type the
  353. complete path name of the emx.exe file.
  354.  
  355. Programs of the second flavour, having emx.exe integrated, don't
  356. require \emx\bin added to the PATH environment variable or the EMX
  357. environment variable being set.  The program itself, however, may need
  358. changes to your autoexec.bat file.  See the documentation accompanying
  359. the program.  The following steps are required for both flavours of
  360. emx programs.
  361.  
  362. If you are using a memory manager (such as QEMM or EMM386 or 386max)
  363. which implements DPMI (DOS Protected Mode Interface), you have to
  364. change the invokation of that memory manager to enable VCPI as emx
  365. does not support DPMI.  See the documentation of your memory for
  366. details.  If your memory manager supports DPMI only (without VCPI),
  367. you have to remove or disable the memory manager.  Alternatively, you
  368. can use rsx, as indicated in section 7.3.  emx supports XMS and VCPI.
  369.  
  370. Examine your config.sys file: If there is a line
  371.  
  372.     BREAK=ON
  373.  
  374. in it, you should remove it as it causes trouble with emx and lots of
  375. other programs.
  376.  
  377. If and only if you are using an `Intel Inboard 386/PC' expansion board
  378. in your 8088-based PC, add the following line to autoexec.bat (it's
  379. very unlikely that you are using such an expansion board):
  380.  
  381.     set emxopt=-m3
  382.  
  383. If the swap file (used to swap memory pages to disk when running out
  384. of physical memory) should be in a specific directory or on a specific
  385. disk drive, set the EMXTMP environment variable in autoexec.bat.
  386. Example:
  387.  
  388.     set emxtmp=c:\tmp
  389.  
  390. Now, you should reboot to activate the changes to config.sys and
  391. autoexec.bat.
  392.  
  393.  
  394. 6 Environment variables (OS/2 and DOS)
  395. ======================================
  396.  
  397. The operation of emx and emx programs is controlled by several
  398. environment variables.  You might have to set one or more of the
  399. following environment variables:
  400.  
  401. INIT    used by termcap to find termcap.dat
  402.  
  403. TERM    used by termcap to define the terminal type
  404.  
  405. EMXETC  used by termcap to find termcap.dat
  406.  
  407. EMXOPT  emx options (see below)
  408.  
  409. EMXSHELL
  410.         overrides the COMSPEC environment variable.  You can use this
  411.         to run an alternate command processor (shell) from emx
  412.         programs
  413.  
  414. EMXPATH
  415.         search path for programs (usually not relevant)
  416.  
  417. PATH    search path for program (used if EMXPATH fails)
  418.  
  419. TERMCAP
  420.         used by termcap to find termcap.dat
  421.  
  422.  
  423. 6.1 Environment variables (DOS)
  424. -------------------------------
  425.  
  426. EMX     path name of emx.exe, used by programs which are bound with
  427.         emxl.exe (the emx loader) instead of emx.exe.  Set EMX to
  428.         speed up loading of emx.exe or to load a specific version of
  429.         emx.exe
  430.  
  431. EMXTMP  directory for the swap file
  432.  
  433. TMP     used if EMXTMP is not set
  434.  
  435.  
  436. 7 DOS Notes
  437. ===========
  438.  
  439.  
  440. 7.1 General notes
  441. -----------------
  442.  
  443. - emx requires DOS 3.0 or later
  444.  
  445. - emx does not support DPMI
  446.  
  447. - emx does not support DESQview without VCPI (use QEMM-386 with
  448.   DESQview)
  449.  
  450. - If emx doesn't work under DESQview (especially if it displays the
  451.   message
  452.  
  453.       Nonmaskable interrupt (NMI)
  454.  
  455.   either set the protection level to 0 or use the WATCHDOG=0 option of
  456.   QEMM-386.
  457.  
  458. - emx supports VCPI
  459.  
  460. - emx supports XMS.  Do not use emx with himem.sys 2.06 or earlier.
  461.  
  462. - emx checks for XMS version number 2.00 or later and for XMS driver
  463.   revision 2.06 or later, as older himem.sys drivers don't work
  464.   correctly.  You can override this check by using the -O emx option
  465.   (for drivers using a different revision numbering scheme), but emx
  466.   may not work with your XMS driver, anyway.  Actually, emx has not
  467.   been tested with himem.sys 2.05; 2.04 fails, 2.06 works.
  468.  
  469. - emx supports vdisk.sys 3.3 and later and most other RAM disk drivers
  470.  
  471. - emx uses (or tries to use) all available memory, whether
  472.   conventional, extended, or expanded memory.  If there isn't enough
  473.   memory, emx will swap to disk.  The swap file will be created in the
  474.   directory given by the EMXTMP environment variable.  If EMXTMP is
  475.   not set, TMP will be used.  If both variables are not set, the swap
  476.   file will be created in the root directory of the current drive.
  477.  
  478. - If a program uses floating point instructions and no numeric
  479.   coprocessor (387) is installed, emx tries to load the FPU (floating
  480.   point unit) emulator emxfpemu.  That file is first sought in the
  481.   directory from which emx.exe was loaded (this does not apply if
  482.   emx.exe is bound to the executable), then in the current working
  483.   directory and the directories listed in the EMXPATH and PATH
  484.   environment variables.  If emxfpemu cannot be found, the program
  485.   will be aborted by signal SIGFPE.
  486.  
  487.  
  488. 7.2 Emergency exit
  489. ------------------
  490.  
  491. If the computer freezes while running emx, try hitting Ctrl-Break five
  492. times in one scond.  That will terminate emx (and all emx processes
  493. run by that instance of emx) unless it is blocked in a DOS call.  If
  494. blocked in a DOS call, emx will terminate after return from that DOS
  495. call.
  496.  
  497.  
  498. 7.3 Using rsx instead of emx
  499. ----------------------------
  500.  
  501. rsx is a DPMI-compliant DOS extender which is more or less compatible
  502. to emx.  Moreover, rsx contains a floating point emulator.  rsx is
  503. free software and has been written by Rainer Schnittker.  As of this
  504. writing, rsx is assumed to be available for anonymous ftp as
  505.  
  506.     ftp.uni-bielefeld.de: /pub/systems/msdos/misc/dpmigcc5.zip
  507.     ftp.uni-stuttgart.de: /pub/systems/os2/emx-0.9a/contrib/dpmigcc5.zip
  508.     ftp.informatik.tu-muenchen.de:
  509.                           /pub/comp/os/os2/gnu/emx+gcc/contrib/dpmigcc5.zip
  510.  
  511. If the emx loader emxl.exe finds a DPMI server but no VCPI server, it
  512. tries to run rsx.exe instead of emx.exe.  The RSX environment variable
  513. will be used instead of the EMX environment variable for locating
  514. rsx.exe.
  515.  
  516. To load rsx.exe instead of emx.exe even if there is a DPMI server and
  517. a VCPI server (for instance if you need the floating point emulation
  518. of rsx), set the EMX environment variable to point to rsx.exe.  Note
  519. that rsx needs a DPMI server.
  520.  
  521.  
  522. 8 emx options
  523. =============
  524.  
  525. You can customize emx by setting the EMXOPT environment variable.
  526. This environment variable contains a list of options, similar to
  527. command line options.  The options must be separated by at least one
  528. blank.  Example:
  529.  
  530.     set emxopt=-c -h40
  531.  
  532.  
  533. 8.1 emx options (OS/2)
  534. ----------------------
  535.  
  536. -c      Disable core dumps caused by signals and exceptions
  537.  
  538. -h#     Set OS/2 file handle limit to #.  The number # must be between
  539.         10 and 255
  540.  
  541. -n      Suppress popups for exceptions.  As emx.dll displays an
  542.         appropriate error message and dumps core, popups are not
  543.         required
  544.  
  545. -q      All command line arguments passed to child processes will be
  546.         quoted unconditionally, that is, wildcard expansion and
  547.         response files won't work in child processes of processes for
  548.         which the -q option is in effect
  549.  
  550. -r*     Prepend drive letter * to absolute path names.  If a path name
  551.         starts with / but does not start with //, /dev/ or /pipe/, *
  552.         followed by a colon will be prepended.  If -rd has been given,
  553.         the file name \mydir\abc will be translated to d:\mydir\abc.
  554.         Note: this option can cause unexpected effects
  555.  
  556. -t      Truncate file names to 8.3
  557.  
  558. -x      Don't suppress wildcard expansion and response files if the
  559.         `MKS Korn shell' method of passing command line arguments is
  560.         used
  561.  
  562. -E      Run debuggee in same session (window) as debugger
  563.  
  564. -I      Don't complain about programs having too small a stack size.
  565.         Without the -I option, emx.dll displays an error message for
  566.         those programs, telling how to run emxstack to fix the stack
  567.         size.  With the -I option, the program is run despite of the
  568.         problem.  However, the program will probably crash due to
  569.         insufficient stack size.  Using the -I option is not
  570.         recommended!
  571.  
  572. -K      Don't use DosKillThread.  Due to bugs in OS/2, DosKillThread
  573.         may cause problems.  emx.dll automatically avoids using
  574.         DosKillThread for OS/2 2.1 and older.  For OS/2 2.11 and
  575.         later, you can use the -K option to disable usage of
  576.         DosKillThread.  Currently, DosKillThread is used only if
  577.         select() is applied to socket handles
  578.  
  579.  
  580. 8.2 emx options (DOS)
  581. ---------------------
  582.  
  583. -c      Disable core dumps caused by signals and exceptions
  584.  
  585. -d      Don't use extended memory
  586.  
  587. -e      Redirect the standard error handle (2) to standard output (1)
  588.  
  589. -h#     Set DOS file handle limit to #.  The number # must be between
  590.         10 and 255.  This option is ignored for DOS versions earlier
  591.         than 3.30.  This option does not change the emx limit for the
  592.         number of files per process -- that limit is always 40
  593.  
  594. -m1     Running on Fujitsu FMR70 (not implemented yet)
  595.  
  596. -m2     Running on NEC PC-98 (not implemented yet)
  597.  
  598. -m3     Running on Intel Inboard 386/PC
  599.  
  600. -o      Send the register dump of an exception to stdout.  Without -o,
  601.         the register dump is sent to the CON device.  You need -o for
  602.         redirecting the register dump to a file.
  603.  
  604.         emx now creates a core dump file (named `core') instead of a
  605.         register dump.  Please keep that file in case the author of
  606.         the program needs it for debugging.
  607.  
  608. -q      All command line arguments passed to child processes will be
  609.         quoted unconditionally, that is, wildcard expansion and
  610.         response files won't work in child processes of processes for
  611.         which the -q option is in effect
  612.  
  613. -r*     Prepend drive letter * to absolute path names.  If a path name
  614.         starts with / but does not start with //, /dev/ or /pipe/, *
  615.         followed by a colon will be prepended.  If -rd has been given,
  616.         the file name \mydir\abc will be translated to d:\mydir\abc.
  617.         Note: this option can cause unexpected effects
  618.  
  619. -t      Truncate file names to 8.3 format.  Each part of a pathname is
  620.         truncated to 8.3 format by taking the first 8 characters
  621.         before the dot and the first 3 characters after the dot.  This
  622.         is useful to compile programs on a FAT filesystem with minimal
  623.         changes
  624.  
  625. -E      Don't check for 387 coprocessor.  Assume no coprocessor is
  626.         present
  627.  
  628. -O      Override XMS version check.  By default, emx checks for XMS
  629.         version number 2.00 or later and for XMS driver revision 2.06
  630.         or later, as older himem.sys drivers don't work correctly.
  631.         You can override this check by giving the -O option (for
  632.         drivers using a different revision numbering scheme), but emx
  633.         may not work with your XMS driver, anyway.  Actually, emx has
  634.         not been tested with himem.sys 2.05; 2.04 fails, 2.06 works
  635.  
  636. -V      Display emx version.  On program start, the emx version will
  637.         be displayed
  638.  
  639. -X      Disable usage of XMS memory.  Usage of XMS memory with VCPI is
  640.         a new feature of emx.  If this happens to cause trouble, use
  641.         the -X option.
  642.  
  643.  
  644. 9 The emxstack tool
  645. ===================
  646.  
  647. The emxstack tool is used for displaying and fixing the stack size.
  648. Old programs assume that emx.dll allocates a stack object if the stack
  649. size is too small.  As emx.dll no longer does this, the stack size of
  650. the programs must be fixed.
  651.  
  652.     emxstack <command> [<options>] <file>...
  653.  
  654. The following commands are available:
  655.  
  656. -c
  657.  
  658.     Check whether the stack size should be fixed.  For each file, if
  659.     the stack size is too small, a message will be displayed.  If the
  660.     stack size is big enough, no message will be displayed.
  661.  
  662. -d
  663.  
  664.     Display the stack size.  For each file, the stack size in KByte
  665.     will be displayed.
  666.  
  667. -f
  668.  
  669.     Fix the stack size.  For each file, the stack size is fixed if it
  670.     is too small.
  671.  
  672. -s<size>
  673.  
  674.     Set the stack size.  For each file, the stack size is set to
  675.     <size> KByte.
  676.  
  677. -u<size>
  678.  
  679.     Update the stack size.  For each file, the stack size is set to
  680.     <size> KByte if it less than <size> KByte.  If the stack size is
  681.     not less than <size> KByte, the stack size won't be changed.
  682.  
  683. The following options are available:
  684.  
  685. -p
  686.  
  687.     Act on all files in the PATH.  The command is applied to each file
  688.     in a directory listed in the PATH environment variable.  No file
  689.     names must be given on the command line.
  690.  
  691. -q
  692.  
  693.     Be quiet.  No messages will be displayed.  However, error messages
  694.     won't be suppressed.
  695.  
  696. -v
  697.  
  698.     Be verbose.  Display additional messages.
  699.  
  700. Example:
  701.  
  702.     emxstack -f *.exe
  703.  
  704.  
  705. 10 Troubleshooting
  706. ==================
  707.  
  708. This section shows how to solve common problems involving the emx
  709. runtime.
  710.  
  711.  
  712. 10.1 Warning message `WARNING: emx 0.9a or later required'
  713. ----------------------------------------------------------
  714.  
  715. If this message appears, an out-of-date version of emx.dll is active.
  716. Make sure that the latest version of emx.dll is in a directory pointed
  717. to by the LIBPATH statement in your config.sys file.  Use
  718.  
  719.     emxrev -p c:\config.sys
  720.  
  721. to list all emx dynamic link libraries reachable by the LIBPATH
  722. statement of c:\config.sys (use the drive letter of your boot drive
  723. instead of c:).  To simplify things, you should keep only one version
  724. of each DLL.  Older programs work with newer emx DLLs, but not vice
  725. versa.
  726.  
  727.  
  728. 10.2 unzip.exe says `cannot create emx/dll/emx.dll'
  729. ---------------------------------------------------
  730.  
  731. This happens when you try to unpack emxrt.zip while a program is
  732. active which uses emx.dll.  Terminate all programs which use emx.dll
  733. and try again.  If you run emxrev, the command interpreter keeps
  734. emx.dll loaded until terminated.  Therefore, you should close all OS/2
  735. windows and full-screen sessions in which you have run emxrev.  All
  736. this also applies to emxlibcm.dll etc.
  737.  
  738.  
  739. 10.3 emx.dll cannot be deleted, renamed or overwritten
  740. ------------------------------------------------------
  741.  
  742. See the previous problem.
  743.  
  744.  
  745. 10.4 Error message `SYS1804: The system cannot find the file EMX.'
  746. ------------------------------------------------------------------
  747.  
  748. You have not correctly set the LIBPATH statement of config.sys,
  749. therefore emx.dll could not be found.
  750.  
  751.  
  752. 10.5 Error message `rsx not found, DPMI not supported by emx'
  753. -------------------------------------------------------------
  754.  
  755. The current version of emx cannot use DPMI.  Therefore, the loader
  756. tried to use rsx instead, but couldn't find rsx.  Remedy: install rsx
  757. or end the DPMI server (MS Windows).
  758.  
  759.  
  760. 10.6 Error message `emx.dll: Stack size too small...'
  761. -----------------------------------------------------
  762.  
  763. You tried to run an old program (which assumes that emx.dll creates a
  764. stack object if the stack size is too small).
  765.  
  766. Run emxstack as indicated by the error message to fix the stack size
  767. of the program.  If you can't (because you don't have write permission
  768. for the file), type
  769.  
  770.     set emxopt=-I
  771.  
  772. to make emx.dll ignore the problem.  However, the program will
  773. probably crash due to insufficient stack size.  Using the -I option is
  774. not recommended!
  775.  
  776.  
  777. 10.7 DOS message `Sector not found'
  778. -----------------------------------
  779.  
  780. DOS seems to display that message if a file is opened twice (perhaps
  781. one handle for reading, one for writing).  For instance, this happens
  782. when GCC runs out of temporary files.  Look for files named like
  783. cca00002, ccz00002 etc. (the digits may vary) in your temporary
  784. directory and delete them.
  785.  
  786.  
  787. 11 emx messages
  788. ===============
  789.  
  790.  
  791. 11.1 emx messages (OS/2)
  792. ------------------------
  793.  
  794. core dumped
  795.  
  796.     The program cannot continue due to a fatal error (exception).  An
  797.     image of the program's memory has been written to a file named
  798.     `core'.  Please keep that file in case the author of the program
  799.     needs it for debugging.
  800.  
  801. emx.dll: Stack size too small...
  802.  
  803.     You tried to run an old program (which assumes that emx.dll
  804.     creates a stack object if the stack size is too small).  You
  805.     should run emxstack to fix the stack size.
  806.  
  807. Invalid option in EMXOPT
  808.  
  809.     An option in the EMXOPT environement variable is not understood by
  810.     emx.
  811.  
  812. Invalid syscall function code
  813.  
  814.     The program run by emx has called an invalid system function.
  815.     Most likely, you're using an emx.dll which is out of date.
  816.  
  817. WARNING: emx 0.9a or later required
  818.  
  819.     The program requires emx.dll 0.9a or later.  However, an older
  820.     version of emx.dll is active.  Make sure that the latest version
  821.     of emx.dll is in a directory pointed to by the LIBPATH statement
  822.     in your config.sys file.  Use
  823.  
  824.         emxrev -p c:\config.sys
  825.  
  826.     to list all emx dynamic link libraries reachable by the LIBPATH
  827.     statement of c:\config.sys (use the drive letter of your boot
  828.     drive instead of c:).  To simplify things, you should keep only
  829.     one version of each DLL.  Older programs work with newer emx DLLs,
  830.     but not vice versa.
  831.  
  832.  
  833. 11.2 emx messages (DOS)
  834. -----------------------
  835.  
  836. Abnormal program termination
  837.  
  838.     The program received the SIGABRT signal.  The abort() function was
  839.     called or SIGABRT was raised.
  840.  
  841. Bad environment
  842.  
  843.     The program name could not be found in the environment segment or
  844.     the environment segment is longer than 32768 bytes.  This should
  845.     not happen in practice.
  846.  
  847. Cannot create swap file
  848.  
  849.     The swap file could not be created.  Remedy: make sure the swap
  850.     file can be created in the directory given by the EMXTMP (or TMP)
  851.     environment variable.  If EMXTMP and TMP are not set, emx will
  852.     create the swap file in the root directory of the current drive.
  853.  
  854. Cannot enable A20
  855.  
  856.     emx tried to enable address line A20 and failed.  Remedy: contact
  857.     the author.
  858.  
  859. Cannot enable A20 via XMS
  860.  
  861.     emx tried to enable address line A20 by calling the XMS driver.
  862.     Unfortunately, A20 couldn't be enabled.  Remedy: unknown.
  863.  
  864. Cannot open program file
  865.  
  866.     The program file given on the emx command line could not be found
  867.     or opened.  Remedy: type the correct file name.  (This should not
  868.     happen with bound programs.)
  869.  
  870. Cannot read program file
  871.  
  872.     An error occured while reading the program file.  Remedy: make
  873.     sure the program file given on the emx command line is valid (this
  874.     does not apply to bound programs).  Maybe some other program
  875.     accesses that file.
  876.  
  877. core dumped
  878.  
  879.     The program cannot continue due to a fatal error (exception).  An
  880.     image of the program's memory has been written to a file named
  881.     `core'.  Please keep that file in case the author of the program
  882.     needs it for debugging.
  883.  
  884. DPMI not supported
  885.  
  886.     The current version of emx cannot use DPMI.  Maybe some future
  887.     version will do.  Remedy: end the DPMI server (MS Windows) or use
  888.     rsx.
  889.  
  890. emx not found
  891.  
  892.     The emx loader (emxl.exe) failed to find emx.exe.  Make sure that
  893.     emx.exe is in a directory listed in the PATH environment variable.
  894.     Alternatively, you can set the EMX environment variable to the
  895.     complete path name of emx.exe.
  896.  
  897. Exception ...
  898.  
  899.     The program run by emx tried to do something which is considered
  900.     illegal by the processor or by emx.  Remedy: report to the
  901.     supplier of the program.
  902.  
  903. Illegal moucall function
  904.  
  905.     The program run by emx has called an invalid system function.
  906.     Remedy: report to the supplier of the program.
  907.  
  908. Illegal syscall function
  909.  
  910.     The program run by emx has called an invalid system function.
  911.     Remedy: report to the supplier of the program.
  912.  
  913. Illegal viocall function
  914.  
  915.     The program run by emx has called an invalid system function.
  916.     Remedy: report to the supplier of the program.
  917.  
  918. Invalid arguments for DOS function xx
  919.  
  920.     The program run by emx has used invalid arguments for a system
  921.     function.  Remedy: report to the supplier of the program.
  922.  
  923. Invalid emx option
  924.  
  925.     An option in EMXOPT or set by emxbind is not understood by emx.
  926.     Remedy: check EMXOPT.  Use emxbind -i to display the options set
  927.     by emxbind.
  928.  
  929. Invalid program file
  930.  
  931.     The program file given on the emx command line (or bound to emx)
  932.     is corrupt.  Remedy: reload the program from diskette.  If this
  933.     doesn't help you should contact the supplier of the program.
  934.  
  935. Invalid special function code: xx
  936.  
  937.     The program run by emx has called an invalid system function.
  938.     Remedy: report to the supplier of the program.
  939.  
  940. Linear address space exhausted
  941.  
  942.     The program run by emx uses far too much memory.  Remedy: complain
  943.     to the author.
  944.  
  945. Nonmaskable interrupt (NMI) at xxxx:yyyyyyyy
  946.  
  947.     A nonmaskable interrupt occured.  Maybe this is due to a memory
  948.     error.  Remedy: if you are using DESQview, either set the
  949.     protection level to 0 or use the WATCHDOG=0 option of QEMM-386.
  950.     Otherwise, run a program for testing memory.
  951.  
  952. Out of memory
  953.  
  954.     There isn't enough memory for running emx.  Remedy: remove some
  955.     drivers and/or resident programs.  Or add memory to your machine.
  956.  
  957. Out of stacks
  958.  
  959.     emx ran out of local stacks.  Remedy: complain to the author.
  960.  
  961. Out of memory or swap space
  962.  
  963.     emx cannot write to the swap file because the disk is full.
  964.     Remedy: make sure there is enough space on the drive used for the
  965.     swap file.  Use the EMXTMP (or TMP) environment variable to tell
  966.     emx where to create the swap file.  If neither EMXTMP nor TMP is
  967.     set, emx will create the swap file in the root directory of the
  968.     current drive.
  969.  
  970. Out of swap space
  971.  
  972.     emx cannot write to the swap file because the disk is full.
  973.     Remedy: make sure there is enough space on the drive used for the
  974.     swap file.  Use the EMXTMP (or TMP) environment variable to tell
  975.     emx where to create the swap file.  If neither EMXTMP nor TMP is
  976.     set, emx will create the swap file in the root directory of the
  977.     current drive.
  978.  
  979. Process terminated by SIGINT
  980.  
  981.     You have stopped the program by hitting Ctrl-C or Ctrl-Break.
  982.  
  983. Process terminated by SIG...
  984.  
  985.     The program has been stopped due to a signal or exception.
  986.     Usually, this indicates a fatal error in the program.
  987.  
  988. Program aborted
  989.  
  990.     You have aborted the program by answering `Abort' after a critical
  991.     error had occured.
  992.  
  993. rsx not found, DPMI not supported by emx
  994.  
  995.     The current version of emx cannot use DPMI.  Therefore, the loader
  996.     tried to use rsx instead, but couldn't find rsx.  Remedy: install
  997.     rsx or end the DPMI server (MS Windows).
  998.  
  999. Swap file I/O error
  1000.  
  1001.     emx couldn't read or write the swap file.
  1002.  
  1003. This program does not run in DOS mode of OS/2
  1004.  
  1005.     DOS emulation of OS/2 doesn't support emx.  Remedy: boot DOS or
  1006.     run the program in a OS/2 window
  1007.  
  1008. This program requires an 80386 CPU
  1009.  
  1010.     You need an 80386DX, 80386SX, i486 or later CPU for running emx.
  1011.     Remedy: get another computer.
  1012.  
  1013. This program requires DOS 3.0 or later
  1014.  
  1015.     If emx is bound with an application program into one executable,
  1016.     DOS 3.0 or later is required for execution.
  1017.  
  1018. Too many processes
  1019.  
  1020.     emx supports up to 4 processes.  You tried to start 5 or more
  1021.     processes.
  1022.  
  1023. Unexpected interrupt
  1024.  
  1025.     This cannot happen.  Remedy: report to the author.
  1026.  
  1027. Unsupported VDISK.SYS version
  1028.  
  1029.     emx doesn't support the vdisk.sys device driver you are using.
  1030.     Remedy: remove VDISK.SYS or use a different version.  emx should
  1031.     work with vdisk.sys 3.3 or later.
  1032.  
  1033. Unsupported XMS version
  1034.  
  1035.     emx requires himem.sys 2.06 or later (older versions are too
  1036.     buggy).  Remedy: get a newer himem.sys.  If you are not using
  1037.     himem.sys, use the -O option of emx and tell the author whether
  1038.     this works or not.
  1039.  
  1040. Unusable interrupt vector mappings set by VCPI server
  1041.  
  1042.     The configuration of the VCPI server (EMS driver) is illegal.
  1043.     Remedy: read the manual of the EMS driver.
  1044.  
  1045. Use emxbind
  1046.  
  1047.     You tried to run emxl.exe, which doesn't make sense.  emxl.exe is
  1048.     designed to be bound into an executable file by emxbind.
  1049.  
  1050. Virtual mode not supported without VCPI
  1051.  
  1052.     A VCPI server is required to run emx if the CPU is in virtual
  1053.     mode.  You will get this message if you're using an EMS driver
  1054.     (EMS emulator) which doesn't support VCPI or if you have disabled
  1055.     EMS.  Remedy: remove the EMS driver, use an EMS driver which
  1056.     supports VCPI or enable EMS if it has been disabled (for instance,
  1057.     remove the NOEMS keyword from the command line of the EMS driver).
  1058.  
  1059. Wrong emx version
  1060.  
  1061.     The version of emx.exe does not match the version the program was
  1062.     compiled for.  Remedy: use the copy of emx.exe that comes with the
  1063.     program.  If you are using different programs which need different
  1064.     versions of emx.exe, use the EMX environment variable to set the
  1065.     path name of the correct version of emx.exe before running a
  1066.     program which requires a version different from the default
  1067.     emx.exe.  You can also use emxbind -u to put the correct version
  1068.     of emx.exe into the executable files.
  1069.  
  1070.  
  1071. 12 Obtaining the complete emx package
  1072. =====================================
  1073.  
  1074. emx is available for anonymous ftp on
  1075.  
  1076.     ftp.uni-stuttgart.de [129.69.18.15]: /pub/systems/os2/emx-0.9a
  1077.     ftp-os2.cdrom.com:   [192.153.46.2]: /os2/32bit/unix/emx09a
  1078.     src.doc.ic.ac.uk      [146.169.2.1]: /pub/packages/os2/32bit/unix/emx09a
  1079.     ftp.informatik.tu-muenchen.de [131.159.0.198]:
  1080.                                          /pub/comp/os/os2/gnu/emx+gcc
  1081.  
  1082.  
  1083. 13 The author of emx
  1084. ====================
  1085.  
  1086. The author of emx is
  1087.  
  1088.     Eberhard Mattes
  1089.     Teckstrasse 81                                      (TeX: Teckstra\ss e)
  1090.     D-71696 Moeglingen                                  (TeX: M\"oglingen)
  1091.     Germany
  1092.  
  1093. Internet: mattes@azu.informatik.uni-stuttgart.de  (subject to change)
  1094.  
  1095. No telephone calls please!  It must be stressed that the author does
  1096. not reply to letters if you don't include return postage
  1097. (international postal reply coupon if you are outside Germany) and a
  1098. self-addressed envelope.
  1099.  
  1100. --------------------------- END OF EMXRT.DOC --------------------------------
  1101.