5

how to run DOSBox using the default windows command line, (without opening it in a new window), editing the source code of DOSBox is a solution, but i want to know if there is no other solution before rebuilding DOSBox.

else

is there any other application that can run 16 bit command line application in CMD.

i tried DOSBox.exe -nonconsole but it is not what i am searching for. tried ScummVM and D-Box without results.

younes zeboudj
  • 233
  • 1
  • 4
  • 11
  • For an app to run 16-bit command line EXEs on x64 Windows *in cmd*, it would have to run the app, capture the output and redirect it somehow to cmd. I don't see the point. Use x86 Windows instead if it *has* to be run via cmd. – Karan Apr 18 '15 at 00:36
  • Does this answer your question? [Running DOSBox completely headless](https://superuser.com/questions/790519/running-dosbox-completely-headless) – Jean-François Fabre Feb 18 '21 at 16:55

3 Answers3

4

I don't know whether the answer will serve you. At least, I found it is possible to start DOSBox, execute commands, and exit it. This allows me to run automated tests on DOSBox via Travis CI. There will still be a window though, and it does not propagate an exit code to the caller.

The command would be as follows:

dosbox exit -c [your_command_here] >>log.txt" -noconsole -exit

For this to work, you have to have a file called exit in the current directory (because exit is run last, and expected to be an external command).

I use log.txt to get feedback from the Dos program.

To my knowledge, it is not possible to run DOSBox without a window. It would be nice if it returned the exit code of its command shell. This should be easy to implement, I think, but would require a source change.

I can't upvote yet but I do think this is a useful question, as DOSBox can be used for testing in a 16-bit environment. In that sense, the question would be suitable for StackOverlow, actually.

A.Robert
  • 141
  • 2
0

DOSEMU can do this in its so-called dumb mode, e.g.

dosemu -dumb DIR

Note that there is now also an unstable DOSEMU 2. It is not clear to me if this is a continuation or a fork.

Martin Cejp
  • 101
  • 1
  • More about DOSEMU history & how it fits with FreeDOS here: https://archive.fosdem.org/2018/schedule/event/dosemu_and_freedos_past_present_future/attachments/slides/2466/export/events/attachments/dosemu_and_freedos_past_present_future/slides/2466/dosemu_freedos.pdf – Martin Cejp Apr 04 '21 at 22:37
0

You can use NTVDMx64 for this http://www.columbia.edu/~em36/ntvdmx64.html

NTVDM is the NT Virtual DOS Machine subsystem which was part of 32-bit versions of Windows. It was able to run 16-bit MS-DOS programs using the V86 mode of the CPU. This mode however can't be used when the CPU is running in 64-bit mode. But luckily Microsoft had a version of NTVDM that used an emulator instead of V86 mode. This version was leaked and the above link has information on how to use it.

Sam
  • 111
  • 2