RDM/2 The Russian Electronic Developer Magazine  
RDM/2 ¤     
äï ¡ ï RU/2

¤   EMX runtime

  

ä       emx runtime  09d fix 3. ¡     ,       ,      emx,      . ¡      . ä   http://emx.nm.ru.

ô

  1. þ     emx Runtime
  2. ì 
  3. ÷  emx runtime  OS/2
  4. ÷  emx runtime  DOS
  5. ¡  (OS/2  DOS)
  6.   DOS
  7. ï emx
  8. ÷ emxstack
  9. ÷ emxupd
  10. ¤ 
  11. ô emx
  12. ¡   emx
  13. á emx

þ     emx Runtime

ð    emx runtime. emx runtime -    32-   OS/2 2.x, OS/2 3.x (OS/2,  ), MS-DOS,  PC-DOS (DOS,  )     386 (   ).

¡ OS/2,    .inf   , 

    view \emx\book\emxrt
å   \emx\book    BOOKSHELF,    
    view emxrt
    .

á 

emx   80386 (80386DX, 80386SX, i486,   )

æ,     emx runtime

¡ emx runtime   :

  \emx\bin\emx.exe              emx runtime  DOS
  \emx\bin\emxbind.exe          ÷   emx  (DOS  OS/2)
  \emx\bin\emxfpemu             ð   (DOS)
  \emx\bin\emxl.exe              emx ( emxbind)
  \emx\bin\emxload.exe          ô    OS/2  
  \emx\bin\emxrev.cmd           ÷    emx (OS/2)
  \emx\bin\emxstack.exe         ÷       
  \emx\bin\emxupd.exe           ÷   DLL    
  \emx\bin\emxuzdll.cmd         ¤ DLL      emxupd.exe
  \emx\book\emxrt.inf           .inf  emxrt.doc
  \emx\dll\emx.dll              emx runtime  OS/2
  \emx\dll\emxio.dll            ï /     OS/2
  \emx\dll\emxlibc.dll          æ  emxlibcm.dll (OS/2)
  \emx\dll\emxlibcm.dll         í (Multithread)  C (OS/2)
  \emx\dll\emxlibcs.dll         ï (Single-thread)  C (OS/2)
  \emx\dll\emxwrap.dll          é  16-  OS/2 (OS/2)
  \emx\doc\COPYING              ì GNU General Public License
  \emx\doc\COPYING.EMX          ì  emx  ,  
  \emx\doc\emxrt.doc            ¤    emx runtime
  \emx\etc\termcap.dat          â    termcap-based 
  \emx\etc\emclibcm.map         Map-  emxlibcm.dll
  \emx\etc\emclibcm.tdf         Trace definition file for emxlibm.dll
  \emx\etc\emclibcs.map         Map-  emxlibcs.dll
  \emx\etc\emclibcs.tdf         Trace definition file  emxlibs.dll
  \emx\etc\trc00f8.tff          Trace format file  emxlibcs.dll
  \emx\etc\trc00f9.tff          Trace format file  emxlibcm.dll
æ .map, .tdf,  .tff   . ï   emxrt.zip     DLL.

ì 

emx is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

emx is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with emx; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

ô. \emx\doc\COPYING.EMX  \emx\doc\COPYING   .

,       emxrt.zip   emxfix03.zip.

ô. 
\emx\doc\COPYING.rus    \emx\doc\COPYING
\emx\doc\COPYING.EMX.rus    \emx\doc\COPYING.EMX

÷  emx runtime  OS/2

ë    OS/2

  1. å   ScreenSaver Siegfried' Hanisch',      2.6   ScreenSaver
  2. ä \emx\dll  LIBPATH (   .dll !)
  3. ä \emx\bin  PATH
  4. ¡

¡    OS/2

emx    OS/2 1.x   DOS  OS/2.

¡  config.sys,     !

é emx 0.9c         ScreenSaver Siegfried Hanisch'. î    2.6   ScreenSaver   emx 0.9c  . é    .

emx runtime      OS/2:

OS/2     ,   LIBPATH   config.sys . ¡: LIBPATH   !

å  LIBPATH       ,    . å      emx, ,      . î       emx (,     emxstack),    emx       emx. ä ,    ,   emx   

    cd \emx\bin
    emxrev

å     emx,    . å   emx ,      DLL. î:

    EMX :  = 30
    EMXIO :  = 30
    EMXLIBC :  = 30
    EMXLIBCM :  = 30
    EMXLIBCS :  = 30
    EMXWRAP :  = 30

¡       LIBPATH. ä      , 

    
    emxrev -d c:\emx\dll
  emx runtime    C. ¡  emxrev,       
    exit
      (    cmd.exe .. emxrev   REXX). é    ,     . ð  ,         - . å      SYS0032  
    error:  cannot create emx/dll/emx.dll
    (:    emx/dll/emx.dll)
 unzip   emxrt.zip,  
    pstat /L
  ,       emx. ï  ,   emx.dll, emxio.dll, emxlibc.dll, emxlibcm.dll, emxlibcs.dll  emxwrap.dll. ë
    emxload -qw
 ,       emxload.exe.

å   ,   emxuzdll   emx DLL: ô     emxuzdll.cmd  ,    emxfix03.zip  emxrt.zip     emx DLL   :

        mkdir \emxtmp
        chdir \emxtmp
        emxuzdll a:\emxfix03.zip c:\emx\dll
        chdir ..
        rmdir emxtmp
ð  DLL  c:\emx\dll  DLL  emxfix03.zip,    DLL  . î  DLL      ,  ,      . §,      emxuzdll,   ,          DLL. (î  ,     . ì   DLL    )

¤      emx (  ,     )  ,   LIBPATH   config.sys ,  ,   LIBPATH ,    ,       emx.

ë   LIBPATH    . ä  c:\emx\dll  LIBPATH,     --     --    config.sys   

    LIBPATH=
,     . î:
    LIBPATH=.;C:\OS2\DLL;C:\OS2\MDOS;C:\;C:\OS2\APPS\DLL;D:\EMX\DLL
ï,         .

ä,     config.sys  

    SET PATH=
   \emx\bin directory. î, 
    SET PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;
    C:\;C:\OS2\MDOS;C:\OS2\APPS

    SET PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;
    C:\;C:\OS2\MDOS;C:\OS2\APPS;D:\EMX\BIN

ë   LIBPATH,       ,     . ,        . þ  config.sys  SET     .

þ    \emx\book    BOOKSHELF    on-line . î,  

    SET BOOKSHELF=C:\OS2\BOOK;
  config.sys 
    SET BOOKSHELF=C:\OS2\BOOK;C:\EMX\BOOK
   PATH,       .      .

§       config.sys. ¡  

    emxrev
     emx    .

å OS/2 

    SYS1804: The system cannot find the file EMX.
    (SYS1804: ô     EMX.)
    emx,     LIBPATH  config.sys. ô.   .

¡    ( ,  emx.dll   ,     ),       

    emx.dll: Stack size too small. Run
      emxstack -f D:\BIN\PROGRAM.EXE
    and try again.
   (emx.dll: ¤   . 
      emxstack -f D:\BIN\PROGRAM.EXE
      .)

 emxstack           . å    (,       ), 

    set emxopt=-I
 ,  emx.dll  . ï,   "" -   . é  -I  !

÷  emx runtime  DOS

ë    DOS

  1. ä \emx\bin  PATH    EMX  \emx\bin\emx.exe
  2. å       DPMI,  VCPI
  3. ÷ BREAK=ON  config.sys
  4. ¡

¡    DOS

¡ emx  DOS    :   emx.exe   ,   emx.exe     .

¡  autoexec.bat  config.sys     !

å    ,   emx.exe,   emx.exe  ,      PATH     emx.exe    PATH (  autoexec.bat). î,   autoexec.bat  

    path c:\dos;d:\bin
   emx   D,      , , 
    path c:\dos;d:\bin;d:\emx\bin

î      .

þ  ,     ,       emx,     emx.exe  . î:

    set emx=d:\emx\bin\emx.exe

,     ,      emx.exe.

¡  ,   emx.exe,     \emx\bin    PATH     EMX. ï       autoexec.bat. ô       . ô        emx.

å     (  QEMM, EMM386  386max)    DPMI (DOS Protected Mode Interface),       VCPI, .. emx   DPMI. ô        . å      DPMI ( VCPI),     . þ      rsx     6.3. emx  XMS  VCPI.

¡   config.sys:    

    BREAK=ON
    , ..        emx    .

þ     `Intel Inboard 386/PC'     8088,      autoexec.bat ( ,      ):

    set emxopt=-m3

å   (        ,     )         ,     EMXTMP. î:

    set emxtmp=c:\tmp

§     ,    config.sys  autoexec.bat   .

¡  (OS/2  DOS)

æ emx   emx    . þ         :

÷   TZ

¡  TZ   Coordinated Universal Time (UTC aka GMT)   . (,   Unix TZ       UTC, .. UTC    . þ OS/2  DOS      .)

 TZ   :

    <TZ1>[<OFF>,[<TZ2>[,<SM>,<SW>,<SD>,<ST>,<EM>,<EW>,<ED>,<ET>,<SHIFT>]]]

<TZ1> -     .

<OFF> -   Coordinated Universal Time;       ,       . ô     ,     ,   . ,     . å <OFF>  ,     0 (     ).

<TZ2> -      (daylight saving time). å <TZ2>  ,     . å <TZ2> ,   ; ï   TZ            . ô <SM>  <ST> ,    ,        ,  <EM>  <ET> ,    ,        . (þ       .) <SHIFT>      .

<SM>    ( 1  12). <SW>   ;    ,  <SD>    ( 1  31). å <SW>  ( 1  4),      <SD> <SW>-  (0=þ, 1=¡  ..)  . ¡       . å <SW>  ( -1  -4),      <SD> -<SW>-  (0=þ, 1=¡  ..)      (.. -1 -    ). ¡       . <ST>     . ,  <ST>   ,  <ET> - .

¡:

    CET-1CED,3,-1,0,7200,10,-1,0,10800,3600
þ       CET,      CED. ¡      2:00   ,     --  3:00   . ¡    .

å  <TZ2>   ,    `,4,1,0,3600,10,-1,0,7200,3600': ¡      1:00   ,    --  2:00   . ¡    .

¡  (DOS)

  DOS

ï 

á 

å      emx,   Ctrl-Break    . ð   emx (   emx     emx),         DOS. å     DOS, emx       DOS.

é rsx  emx

rsx -  DPMI-  DOS       emx. ë , rsx    . rsx -  ,  Rainer' Schnittker'. rsx       ftp :

 ftp.uni-bielefeld.de: /pub/systems/msdos/misc/rsx510.zip
 ftp.leo.org:          /pub/comp/os/os2/leo/gnu/emx+gcc/contrib/rsx510.zip

å  emx, emxl.exe,   DPMI,     VCPI,     rsx.exe  emx.exe. þ      RSX   rsx.exe    EMX.

ä  rsx.exe  emx.exe,    DPMI   VCPI (,       rsx),    EMX,    rsx.exe. ,   rsx   DPMI.

ï emx

þ   emx    EMXOPT. ð     ,     . ï       . î:

    set emxopt=-c -h40

ï emx (OS/2)

-c ï      
-h# ÷  file handle OS/2  #.  #     10-65536
-n    (     OS/2)  . §.. emx.dll         ,    .
-q þ   ,   ,    . §..          ,     -q.
-r* ä   *    . å     /,    //, /dev/  /pipe/,   *  . å  ,    \mydir\abc    d:\mydir\abc. ,        .
-t*

÷     8.3. ë      8.3,   8         . ð        FAT   .

â , -t         UNC.

ï -t    ,    ,     . ô  '/'      UNC . î:  `-tc/' ,       C  UNC .

å   -t -  `-',       UNC . ð   . å     `-',      ,  . î,   `-t -t-d' UNC       ,    D,  .

-x î     ,    `MKS Korn shell'    .
-E Run debuggee in same session (window) as debugger
-I î   ,    . â   emx.dll       ,    emxstack    . ô  -I      . ï,   "" -  . é  -I  !
-K î  DosKillThread. é-   OS/2,  DosKillThread    . emx.dll    DosKillThread  OS/2 2.1   . ä OS/2 2.11  ,    option -K    DosKillThread. þ   DosKillThread   emx.dll       .

ï emx (DOS)

-c ï      
-d î  extended 
-e ¡    (2)    (1)
-h# Set DOS file handle limit to #. The number # must be between 10 and 65536. This option is ignored for DOS versions earlier than 3.30. This option does not change the emx limit for the number of files per process -- that limit is always 40
-m1 ¡   Fujitsu FMR70 (  )
-m2 ¡   NEC PC-98 (  )
-m3 ¡   Intel Inboard 386/PC
-o

ï        (stdout). â -o      (CON). þ   -o      .

ô emx     (    , ..    ) (  'core')   . ¡,   , ..      .

-q þ   ,   ,    . §..          ,     -q.
-r* ä   *    . å     /,    //, /dev/  /pipe/,   *  . å  ,    \mydir\abc    d:\mydir\abc. ,        .
-t*

÷     8.3. ë      8.3,   8         . ð        FAT   .

â , -t         UNC.

ï -t    ,    ,     . ô  '/'      UNC . î:  `-tc/' ,       C  UNC .

å   -t -  `-',       UNC . ð   . å     `-',      ,  . î,   `-t -t-d' UNC       ,    D,  .

-E î   387- . ¡,   .
-O î   XMS. ¡ , emx  XMS  ,     2.0  ,    XMS   2.06  , ..    himem.sys  . þ       -O (     ),  emx         XMS. emx    himem.sys  2.05. þ 2.04   ,   2.06  .
-V ¡  emx. ¡  ,    emx
-X î  XMS . é XMS   VCPI -   emx. ¡     -X.

÷ emxstack

÷ emxstack       . ô  ,  emx.dll    ,     . §.. emx.dll    ,     .

    emxstack <> [<>] <>...

¡  :

-c ¡    . ä  ,     ,   . å    ,    .
-d ¡  . ä       .
-f é  . ä      ,    .
-s<> ÷  . ä        <> .
-u<> ï  . ä       <> ,    <> . å    <> ,    .

¡  :
-p ¡          PATH. ë        ,      PATH. é        .
-q â . ô   . ï,      .
-v â . ¡  .

î:
    emxstack -f *.exe

÷ emxupd

÷ emxupd   ( ) DLL,   . (§     EXE-.) ô  DLL         ,     ,  DLL. ¡     DLL. ¡      DLL.

 DLL

ä  DLL, 

    emxupd  

ä       . î:

    emxupd c:\tmp\emx.dll c:\emx\dll

ä   c:\tmp\emx.dll  c:\emx\dll\emx.dll.

    emxupd abc.dll d:\dll\new.dll
ä   abc.dll  d:\dll\new.dll.

÷ DLL

ä  DLL, 

    emxupd -d <_>
 <_>    DLL  .

¤ DLL  ZIP       emxupd

ä   DLL  ZIP-        emxupd, :

    emxuzdll <zip_file> <dll_dir>

    <zip_file> -    ZIP-  ; 
    <dll_dir> - ,   DLL.
emxuzdll      ,      DLL.

¤ 

ð         emx runtime.

¡ `WARNING: emx 0.9d or later required'

å   ,     emx.dll. ¡,    emx.dll    ,   LIBPATH   config.sys. þ

    emxrev -p c:\config.sys
     emx   LIBPATH  c:\config.sys ( c:    ). ä      DLL. ô     DLL emx,   .

unzip.exe  `cannot create emx/dll/emx.dll'

ð     emxrt.zip,  emx.dll  - .   ,   emx.dll   . å   emxrev,     emx.dll ,   . §..         OS/2,     emxrev. þ     emxlibcm.dll  .

emx.dll    ,   

ô.  .

ô   `SYS1804: The system cannot find the file EMX.'

þ,  ,   LIBPATH  config.sys,    emx.dll    .

ô   `rsx not found, DPMI not supported by emx'

§  emx    DPMI. þ     rsx  emx,     rsx. ¤:  rsx   DPMI  (MS Windows).

ô   `emx.dll: Stack size too small... (emx.dll: ¤   ...)'

þ     ( ,  emx.dll    (stack object),     ).

 emxstack            . å   (        ),  

    set emxopt=-I
 ,  emx.dll  . ï,   "" (crash) -  . é  -I  !

ô DOS `Sector not found (ô  )'

DOS    ,     (       ). î,  ,  GCC ,      . î  cca00002, ccz00002  .. (   )       .

ô emx

ô emx (OS/2)

core dumped
(ä  )
¡     -   (). ¡      ( )     `core'. ¡,   , ..      .
emx.dll: Stack size too small...
(emx.dll: ¤   ...)
þ     ( ,  emx.dll   ,     ). þ   emxstack    .
Invalid option in EMXOPT
(î    EMXOPT)
ï,     EMXOPT   emx.
Invalid syscall function code
(î   )
¡  emx    . î ,      emx.dll.
WARNING: emx 0.9d or later required
(þîéíáîéå!  emx 0.9d  )
å   ,     emx.dll. ¡,    emx.dll    ,   LIBPATH   config.sys. þ
        emxrev -p c:\config.sys
     emx   LIBPATH  c:\config.sys ( c:    ). ä      DLL. ô     DLL emx,   .

ô emx (DOS)

Abnormal program termination
(î  )
¡   SIGABRT. â   abort()    SIGABRT.
Bad environment
(î )
é             32768 . î     .
Cannot create swap file
(î   )
æ     . ¤: ,             EMXTMP ( TMP). å EMXTMP  TMP  ,  emx         .
Cannot enable A20
emx  enable address line A20   :). ¤:   .
Cannot enable A20 via XMS
emx  enable address line A20   XMS   :). þ,   A20    . ¤: .
Cannot open program file
(î   )
æ ,     emx      . ¤: þ   . (ð      .)
Cannot read program file
(î   )
¡      . ¤: ,        emx  (       emx). þ,      .
core dumped
(ä  )
¡     -   (). ¡      ( )     `core'. ¡,   , ..      .
DPMI not supported
(DPMI  )
§  emx   DPMI. í    emx   . ¤:   DPMI (MS Windows)   rsx.
emx not found
(î  emx)
 emx (emxl.exe)    emx.exe. ¡,  ,  emx.exe     PATH. þ  ,      EMX,        emx.exe.
Exception ...
(é ...)
¡,  emx,   -,     emx . ¤: ô  .
Illegal moucall function
(î  moucall)
 emx     . ¤:   .
Illegal syscall function
(î  syscall)
 emx     . ¤:   .
Illegal viocall function
(î  viocall)
 emx     . ¤:   .
Invalid arguments for DOS function xx
(î    DOS xx)
 emx        . ¤:   .
Invalid emx option
(î  emx)
ï  EMXOPT     emxbind  emx. ¤:  EMXOPT. é emxbind -i       emxbind.
Invalid program file
¡ ,     emx ( bound to emx), . ¤:    . å   ,       .
Invalid special function code: xx
 emx     . ¤:   .
Linear address space exhausted
¡,  emx,    . ¤:  .
Nonmaskable interrupt (NMI) at xxxx:yyyyyyyy
(î  (NMI)   xxxx:yyyyyyyy)
¡  . þ     . ¤:    DESQview,      0    QEMM-386 WATCHDOG=0. þ      .
Out of memory
(í )
í    emx. ¤:    /  . é     .
Out of stacks
(í )
emx     . ¤:  .
Out of memory or swap space
(í        )
emx       , ..     . ¤: ÷           . é   EMXTMP ( TMP)  ,     . å  EMXTMP,  TMP  ,  emx         .
Out of swap space
(í      )
emx       , ..     . ¤: ÷           . é   EMXTMP ( TMP)  ,     . å  EMXTMP,  TMP  ,  emx         .
Process terminated by SIGINT
(¡    SIGINT)
þ    Ctrl-C  Ctrl-Break.
Process terminated by SIG...
(¡    SIG...)
¡      . ï      .
Program aborted
(¡ )
þ     `Abort' (¡)    .
rsx not found, DPMI not supported by emx
(rsx  , DPMI   emx)
§  emx    DPMI. þ,    rsx  emx,     . ¤:  rsx    DPMI (MS Windows).
Swap file I/O error
(ï /     )
emx       .
This program does not run in DOS mode of OS/2
(ð     DOS  OS/2)
ð DOS  OS/2   emx. ¤:  DOS      OS/2.
This program requires an 80386 CPU
(ð   80386 )
ä    80386DX, 80386SX, i486   . ¤:    .
This program requires DOS 3.0 or later
(ð   DOS 3.0  )
å emx       ,     DOS  3.0  .
Too many processes
(ô  )
emx   4 . þ   5   .
Unexpected interrupt
(î )
ð   . ¤:  .
Unsupported VDISK.SYS version
(î  VDISK.SYS)
emx       vdisk.sys. ¤:  VDISK.SYS    . emx    vdisk.sys 3.3  .
Unsupported XMS version
(î  XMS)
emx  himem.sys 2.06   (     ). ¤:     himem.sys. å    himem.sys,    emx -O   ,    .
Unusable interrupt vector mappings set by VCPI server
î  VCPI ( EMS) . ¤:     EMS.
Use emxbind
(é emxbind)
þ   emxl.exe,     . emxl.exe         emxbind.
Virtual mode not supported without VCPI
(þ     VCPI)
å     ,    emx   VCPI. þ        EMS ( EMS)    VCPI     EMS. ¤:   EMS    EMS   VCPI   EMS     (,   NOEMS     EMX).
Wrong emx version
(î  emx)
þ emx.exe       . ¤:   emx.exe,    . å    ,     emx,        EMX       emx.exe. þ    emxbind -u     emx.exe   .

¡   emx

emx    ftp-  :
    ftp.leo.org:          /pub/comp/os/os2/leo/gnu/emx+gcc/
    ftp-os2.cdrom.com:    /pub/os2/emx09d/
    ftp-os2.nmsu.edu:     /pub/os2/dev/emx/v0.9d/

á emx

á emx:
    Eberhard Mattes
    Teckstrasse 81                                      (TeX: Teckstra\ss e)
    D-71696 Moeglingen                                  (TeX: M\"oglingen)
    Germany

Internet:
    mattes@azu.informatik.uni-stuttgart.de  ( )
    mattes@windhager.de

î  ! ¡      ,       (  international postal reply coupon,     ç)     .

¡ \emx\doc\faq.doc     .

à ¡
E-Mail: prokushev@freemail.ru
NetMail: 2:5000/106.9

---
ë  : 0 | ä 
---
¤: ä â
ï: å ë