Thread overview
Re: Using DMC from DOS
Jul 02, 2002
Nic Tiger
Jul 02, 2002
Nic Tiger
Jul 02, 2002
Roland
Dec 28, 2005
Harito
July 02, 2002
Hi everybody,

Have you ever wanted to run DMC compiler tools from DOS?

Then this guide is for you.

First, a little of theory:
1) We run some Win32 executables (not all, only console mode with limited
API functions used) from DOS
2) To run them from DOS we use WDOSX 0.96
3) Original WDOSX 0.96 package doesn't work with DMC executables (and also
doesn't work with Win32 exe's produced by DMC), so I patched some of
companion WDLs in order to make it work with DMC.
4) If you have WinXP (what a misfortune! ;-), and are planning ever run
WDOSX stubed executables under it, you should use patch for WDOSX.

ATTENTION. If you are not going to change DOS configuration (I mean config.sys and autoexec.bat), you should check the requirements at the end of article. If they don't suit you, you should not waste your time and try steps described here. If you can change DOS configuration (as for me, I am not afraid of it), you may look through requirements later, they will help you to tune your system to optimal performance.

Now, practice:
1) Download WDOSX 0.96 binary archive from
http://michael.tippach.bie.t-online.de/wdosx/
2) If you have WinXP you may also download fix for it from
http://michael.tippach.bie.t-online.de/wdosx/
3) Unzip WDOSX 0.96 into some folder (I suggest D:\wdosx)
4) Unzip the attachment somewhere
5) Copy files KERNEL32.WDL, ADVAPI32.WDL, USER32.WDL to WDOSX/BIN folder and
overwrite existing ones
6) Now its time to find out what kind of DMC you have
    a) if you have Digital Mars CD
        than your bat-file is DM_CD.BAT
    b) if you have free DMC compiler
        than your bat-file is DM_COMP.BAT
7) Look through your bat-file in order to assure it is safe and doesn't
contain "format c:"  ;-)
8) Run your bat-file with following syntax:
        DM_CD.BAT  d:\dm d:\wdosx\bin
    or
        DM_COMP.BAT d:\dm d:\wdosx\bin
    where d:\dm is the root dir of your DMC and d:\wdosx\bin is the BIN dir
of your WDOSX
9) If you have done everything right, you should get BinDOS dir in your DM
dir where new (dos) executables are stored
10) Now go to dm/bindos and edit file "sc.ini"
PATH=%PATH%;"%@P%\..\bin"   to PATH=%PATH%;"%@P%\..\bindos"
BIN="%@P%\..\bin"  to BIN="%@P%\..\bindos"
11) Change your PATH in autoexec.bat to point to dm/bindos (not dm/bin which
is for Win32 executables)
12) Look through the following sections regarding requirement and
limitations

Requirements:
1) I've tested WDOSX executables and DMC dos-version under following
circumstance:
    - clean DOS, no himem, no emm386
    - himem
    - himem, emm386
    - himem, emm386 noems
    - himem, emm386 noems novcpi
    - qemm 97
    - Win2000

2) However, don't be fooled, not all environments are good. I found that
only these work really good with DMC compiler:
    - himem
    - himem, emm386 noems novcpi
    - Win2000
    Other environments sometimes make DMC compiler to abort due to XMS
corrupted. I don't think its problem of environment because not all EXEs
behave similarly. The most probable reason is that some of API functions DMC
uses are not implemented well, so they produce these results. I'll try to
look them through more thoroughly.

3) Here is performance table for different environments (lib of sources:
972K + headers: 233K)
    clean DOS, no himem, no emm386            not tested as smartrv.exe
could not be loaded
    himem                                                        14.17 s
    himem, emm386                                         13.35 s, random
crashes
    himem, emm386 noems                              13.19 s, random crashes
    himem, emm386 noems novcpi                   14.55 s
    qemm 97                                                      n/a, but
approx. 30 s, crashes always after 3-5 files compiled
    Win2000                                                      7.07
(using Win32 executables)

Limitations:
1) DOS version could work wrong when using precompiled headers. I'm
investigating problem. Try to avoid using precompiled headers meanwhile.
2) Ctrl-Break and Ctrl-C handling is not implemented for DOS, so
    in SC.EXE, DMC.EXE - you have to press key until all screens are printed
    in LIB.EXE - you cannot interrupt it with Ctrl-C, but can with Ctrl-Z.
    in SCPPN.EXE - compiling is not interruptible
3) Modern SC.EXE and DMC.EXE don't care about command line length, that is
they don't pass response file to SCPPN.EX when command line is too long. So
    a) avoid using big command lines
    b) if using big command lines is inevitable, do the following
        - get SC.EXE version 7.2B4 or maybe from DMC 7.6
        - copy SCPPN.EXE into names: SCPPX.EXE, SCCX.EXE (old SC.EXE will
want these files when used under DOS)

That's all.

If you have any questions or bug report, please feel free to ask.

Sincerely yours,
Nic Tiger.



July 02, 2002
Oops!

I wrote wrong link to WDOSX

Here is right one: http://michael.tippach.bei.t-online.de/wdosx/

Nic Tiger.


July 02, 2002
Very interesting, many thanks
I'm going to test that .. one day

roland


Nic Tiger a écrit :

> Hi everybody,
>
> Have you ever wanted to run DMC compiler tools from DOS?
>
> Then this guide is for you.
>
> First, a little of theory:
> 1) We run some Win32 executables (not all, only console mode with limited
> API functions used) from DOS
> 2) To run them from DOS we use WDOSX 0.96
> 3) Original WDOSX 0.96 package doesn't work with DMC executables (and also
> doesn't work with Win32 exe's produced by DMC), so I patched some of
> companion WDLs in order to make it work with DMC.
> 4) If you have WinXP (what a misfortune! ;-), and are planning ever run
> WDOSX stubed executables under it, you should use patch for WDOSX.
>
> ATTENTION. If you are not going to change DOS configuration (I mean config.sys and autoexec.bat), you should check the requirements at the end of article. If they don't suit you, you should not waste your time and try steps described here. If you can change DOS configuration (as for me, I am not afraid of it), you may look through requirements later, they will help you to tune your system to optimal performance.
>
> Now, practice:
> 1) Download WDOSX 0.96 binary archive from
> http://michael.tippach.bie.t-online.de/wdosx/
> 2) If you have WinXP you may also download fix for it from
> http://michael.tippach.bie.t-online.de/wdosx/
> 3) Unzip WDOSX 0.96 into some folder (I suggest D:\wdosx)
> 4) Unzip the attachment somewhere
> 5) Copy files KERNEL32.WDL, ADVAPI32.WDL, USER32.WDL to WDOSX/BIN folder and
> overwrite existing ones
> 6) Now its time to find out what kind of DMC you have
>     a) if you have Digital Mars CD
>         than your bat-file is DM_CD.BAT
>     b) if you have free DMC compiler
>         than your bat-file is DM_COMP.BAT
> 7) Look through your bat-file in order to assure it is safe and doesn't
> contain "format c:"  ;-)
> 8) Run your bat-file with following syntax:
>         DM_CD.BAT  d:\dm d:\wdosx\bin
>     or
>         DM_COMP.BAT d:\dm d:\wdosx\bin
>     where d:\dm is the root dir of your DMC and d:\wdosx\bin is the BIN dir
> of your WDOSX
> 9) If you have done everything right, you should get BinDOS dir in your DM
> dir where new (dos) executables are stored
> 10) Now go to dm/bindos and edit file "sc.ini"
> PATH=%PATH%;"%@P%\..\bin"   to PATH=%PATH%;"%@P%\..\bindos"
> BIN="%@P%\..\bin"  to BIN="%@P%\..\bindos"
> 11) Change your PATH in autoexec.bat to point to dm/bindos (not dm/bin which
> is for Win32 executables)
> 12) Look through the following sections regarding requirement and
> limitations
>
> Requirements:
> 1) I've tested WDOSX executables and DMC dos-version under following
> circumstance:
>     - clean DOS, no himem, no emm386
>     - himem
>     - himem, emm386
>     - himem, emm386 noems
>     - himem, emm386 noems novcpi
>     - qemm 97
>     - Win2000
>
> 2) However, don't be fooled, not all environments are good. I found that
> only these work really good with DMC compiler:
>     - himem
>     - himem, emm386 noems novcpi
>     - Win2000
>     Other environments sometimes make DMC compiler to abort due to XMS
> corrupted. I don't think its problem of environment because not all EXEs
> behave similarly. The most probable reason is that some of API functions DMC
> uses are not implemented well, so they produce these results. I'll try to
> look them through more thoroughly.
>
> 3) Here is performance table for different environments (lib of sources:
> 972K + headers: 233K)
>     clean DOS, no himem, no emm386            not tested as smartrv.exe
> could not be loaded
>     himem                                                        14.17 s
>     himem, emm386                                         13.35 s, random
> crashes
>     himem, emm386 noems                              13.19 s, random crashes
>     himem, emm386 noems novcpi                   14.55 s
>     qemm 97                                                      n/a, but
> approx. 30 s, crashes always after 3-5 files compiled
>     Win2000                                                      7.07
> (using Win32 executables)
>
> Limitations:
> 1) DOS version could work wrong when using precompiled headers. I'm
> investigating problem. Try to avoid using precompiled headers meanwhile.
> 2) Ctrl-Break and Ctrl-C handling is not implemented for DOS, so
>     in SC.EXE, DMC.EXE - you have to press key until all screens are printed
>     in LIB.EXE - you cannot interrupt it with Ctrl-C, but can with Ctrl-Z.
>     in SCPPN.EXE - compiling is not interruptible
> 3) Modern SC.EXE and DMC.EXE don't care about command line length, that is
> they don't pass response file to SCPPN.EX when command line is too long. So
>     a) avoid using big command lines
>     b) if using big command lines is inevitable, do the following
>         - get SC.EXE version 7.2B4 or maybe from DMC 7.6
>         - copy SCPPN.EXE into names: SCPPX.EXE, SCCX.EXE (old SC.EXE will
> want these files when used under DOS)
>
> That's all.
>
> If you have any questions or bug report, please feel free to ask.
>
> Sincerely yours,
> Nic Tiger.
>
>                   Name: DMC_DOS.ZIP
>    DMC_DOS.ZIP    Type: Zip Compressed Data (application/x-zip-compressed)
>               Encoding: x-uuencode

December 28, 2005
In article <afrksl$17ei$1@digitaldaemon.com>, Nic Tiger says...

All the information that you gave is really interesting but:

These links are broken:

>1) Download WDOSX 0.96 binary archive from
>http://michael.tippach.bie.t-online.de/wdosx/
>2) If you have WinXP you may also download fix for it from
>http://michael.tippach.bie.t-online.de/wdosx/

And i couldn't download this file:
>begin 666 DMC_DOS.ZIP