Getting doscmd to run DOS commands

Getting doscmd to run DOS commands

Post by Michael Abbot » Tue, 07 May 2002 06:27:06



How much preparation is required to get doscmd to run simple DOS programs
on a fresh FreeBSD 4.5 installation?

At present I have copied the DOS program I wish to run into my home
directory, and created a .doscmdrc file with just two lines:

        assign C: /home/michael
        PATH=C:\

However I try to run doscmd I get the response "command not found", eg:


        DERIVE: command not found


        DERIVE.EXE

        assign C: /home/michael
        PATH=C:\

        /home/michael

(and, yes, I've tried all the various combinations of case and including or
not including the file extension, etc;  I haven't found anything that makes
any difference.)

Can someone point me to a guide for getting started?  The only
documentation I've found is man 1 doscmd.  This contains detailed
instructions on installing a DOS pseudo hard disk, but I'm presuming I
don't need to do this to run a single simple DOS program?

cc to michael.g.abbott (at) ntlworld.com if you care to; thanks.

 
 
 

Getting doscmd to run DOS commands

Post by annel.. » Tue, 07 May 2002 19:37:38



> How much preparation is required to get doscmd to run simple DOS programs
> on a fresh FreeBSD 4.5 installation?
> At present I have copied the DOS program I wish to run into my home
> directory, and created a .doscmdrc file with just two lines:
>            assign C: /home/michael
>            PATH=C:\
> However I try to run doscmd I get the response "command not found", eg:

>            DERIVE: command not found


>            DERIVE.EXE

>            assign C: /home/michael
>            PATH=C:\

>            /home/michael

> (and, yes, I've tried all the various combinations of case and including or
> not including the file extension, etc;  I haven't found anything that makes
> any difference.)
> Can someone point me to a guide for getting started?  The only
> documentation I've found is man 1 doscmd.  This contains detailed
> instructions on installing a DOS pseudo hard disk, but I'm presuming I
> don't need to do this to run a single simple DOS program?
> cc to michael.g.abbott (at) ntlworld.com if you care to; thanks.

I always hoped I could run a dos command from the installed Windows
partition if I set it up right; this has never worked.  There was an
article somewhere on this recently in the last few months....it all
remained a puzzle to me.

        Annelise
--
Annelise Anderson
Author of:               FreeBSD: An Open-Source Operating System for Your PC
Available from:  BSDmall.com and amazon.com
Book Website:    http://www.bittreepress.com/FreeBSD/introbook/      

 
 
 

Getting doscmd to run DOS commands

Post by Michael Abbot » Tue, 07 May 2002 23:52:59





>> How much preparation is required to get doscmd to run simple DOS
>> programs on a fresh FreeBSD 4.5 installation?

 ... (doesn't work; see grand-parent) ...

Quote:> I always hoped I could run a dos command from the installed Windows
> partition if I set it up right; this has never worked.  There was an
> article somewhere on this recently in the last few months....it all
> remained a puzzle to me.

Yes, there doesn't seem to be any good documentation around (that's
findable with the usual searches), and I've not found any good questions
about it either yet.

It's rather odd: I'd have expected something like doscmd to work "out of
the box" on simple BIOS based programs, but there's evidently something
non-obvious that needs to be done first.

 
 
 

Getting doscmd to run DOS commands

Post by Jamie Jone » Fri, 10 May 2002 23:25:58


On Sun, 05 May 2002 21:27:06 GMT,
         Michael Abbott <>
         wrote in newsgroup comp.unix.bsd.freebsd.misc:

> However I try to run doscmd I get the response "command not found", eg:


>            DERIVE: command not found


>            DERIVE.EXE

>            assign C: /home/michael
>            PATH=C:\

>            /home/michael

> (and, yes, I've tried all the various combinations of case and including or
> not including the file extension, etc;  I haven't found anything that makes
> any difference.)

I had similar problems, so did a ktrace, and discovered that doscmd converts
the filename to lower case. Although you've tried typing various combinations
of case, rename "DERIVE.EXE" to "derive.exe" then run it.

That should be able to find the program, however in my experience, I've
not got any further due to it requiring an x-window...

ho hum

Jamie
--

--- 230 days to Christmas!       Word of the day: "seismochronograph"
---- "I'm not big, and I'm not clever. And I'm definitely not funny."
----------- The reply address on this posting expires in 7 days time.

 
 
 

Getting doscmd to run DOS commands

Post by Michael Abbot » Sat, 11 May 2002 03:12:29




Quote:> I had similar problems, so did a ktrace, and discovered that doscmd
> converts the filename to lower case. Although you've tried typing
> various combinations of case, rename "DERIVE.EXE" to "derive.exe" then
> run it.

Yes, I also discovered this!  However, I'm not familiar with ktrace:
instead I did it by inserting fprintf statements into the code.  

I think I must have mis-read a line in the documentation which refers to
the BSD->DOS translation as upper-casing all file names; I really don't
know why I didn't try derive.exe!

ktrace looks rather handy: do you know if there's any documentation of what
the output from kdump actually means?

Quote:> That should be able to find the program, however in my experience,
> I've not got any further due to it requiring an x-window...

Well, curiously the version of doscmd installed by default seems to have X
support compiled out; however, when I took my own copy (for the hacking
above) and compiled it, my version works with doscmd -x.  Perhaps after I
do a make world it will all work by magic: it seems that the make file
checks whether the X sources are installed before deciding whether to
compile in X support.

Unfortunately, there seem to be some bugs...

Here we go, trying to use MS (Lotus Manuscript, an old DOS word processor).

Running
    ./doscmd -x ms/ms

During startup on the master console:
   Unknown interrupt 21 function 66

1.  Warning: CONFIG.SYS may have too few FILES specified

2.  Trying to create a new file:
        ERROR
            Out of system memory

3.  Or else (seems to vary) brings up the editor, but when trying to write
the file to disk:
        File write error or disk full

Unpredictably, I also got the following message once:
    Unknown interrupt 10 function 1c subfunction 00

The final message when an application has closed:
        END OF PROGRAM(PRESS <CTRL-ALT> ANY MOUSE BUTTON TO exit)
is also rather annoying; I hope I can turn it off (I can't see a documented
option for this, though).

Int 21 fn 66 seems to be trying to set the code page; this may not matter
too much.  Unfortunately, my documentation doesn't tell me what 10:1c:00 is
supposed to do, however all the int 10 functions seem to be display
oriented.

 
 
 

Getting doscmd to run DOS commands

Post by Michael Abbot » Sat, 11 May 2002 02:52:30




Quote:> I had similar problems, so did a ktrace, and discovered that doscmd
> converts the filename to lower case. Although you've tried typing
> various combinations of case, rename "DERIVE.EXE" to "derive.exe" then
> run it.

Yes, I also discovered this!  However, I'm not familiar with ktrace:
instead I did it by inserting fprintf statements into the code.

Quote:> That should be able to find the program, however in my experience,
> I've not got any further due to it requiring an x-window...

Well, curiously the version of doscmd installed by default seems to have X
support compiled out; however, when I took my own copy (for the hacking
above) and compiled it, my version works with doscmd -x.

Unfortunately, there seem to be some bugs...

Here we go, trying to use MS (Lotus Manuscript, an old DOS word processor).

Running
    ./doscmd -x ms/ms

During startup on the master console:
   Unknown interrupt 21 function 66

1.  Warning: CONFIG.SYS may have too few FILES specified

2.  Trying to create a new file:
        ERROR
            Out of system memory

3.  Or else (seems to vary) brings up the editor, but when trying to write
the file to disk:
        File write error or disk full

Unpredictably, I also get the message:
    Unknown interrupt 10 function 1c subfunction 00

The final message when an application has closed:
        END OF PROGRAM(PRESS <CTRL-ALT> ANY MOUSE BUTTON TO exit)
is also rather annoying; I hope I can turn it off (there doesn't seem to be
an option for this, though, alas).

 
 
 

Getting doscmd to run DOS commands

Post by Michael Abbot » Sat, 11 May 2002 20:32:04




Quote:> ...

Blast it: ignore this one; posting trouble with my ISP!
 
 
 

Getting doscmd to run DOS commands

Post by Tim Ju » Sun, 12 May 2002 12:19:16



> How much preparation is required to get doscmd to run simple DOS programs
> on a fresh FreeBSD 4.5 installation?

[snip]

And where, do tell, did you find doscmd?  I'm looking for what would be
that program, but simple searches online and the ports collection
doesn't contain a doscmd port..  

Details, please?

 
 
 

Getting doscmd to run DOS commands

Post by Erik Nygre » Sun, 12 May 2002 12:53:39




>> How much preparation is required to get doscmd to run simple DOS programs
>> on a fresh FreeBSD 4.5 installation?
> [snip]

> And where, do tell, did you find doscmd?  I'm looking for what would be
> that program, but simple searches online and the ports collection
> doesn't contain a doscmd port..  

> Details, please?

doscmd(1) is part of FreeBSD, no need to install it.

--
Erik Nygren
e r i k { a t } s w i p { d o t } n e t

 
 
 

Getting doscmd to run DOS commands

Post by Michael Abbot » Tue, 14 May 2002 02:06:01




Quote:> doscmd(1) is part of FreeBSD, no need to install it.

To be precise:

$ whereis doscmd
doscmd: /usr/bin/doscmd /usr/share/man/man1/doscmd.1.gz
/usr/src/usr.bin/doscmd
$ locate doscmd
/usr/src/usr.bin/doscmd/...  (lots of files like this!)
...
$