home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / ATP-OS2 / DOCS / EMXRT.TXT < prev    next >
Text File  |  1996-12-03  |  40KB  |  1,134 lines

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