17

Is it possible to run a text-mode DOS program in an emulator under a Unix-like operating system (Linux/*BSD/macOS) such that DOS text-mode input and output is done on a Unix terminal instead of a separate GUI window?

The purpose would be to allow the DOS program to run in a terminal environment that is familiar to Unix users and integrates well with their usual workflow, including working copy/paste.

user3840170
  • 23,072
  • 4
  • 91
  • 150
Lassi
  • 273
  • 1
  • 6
  • 4
    "-noconsole (Windows Only)
    Start DOSBox without showing DOSBox Status Window (console). Output will be redirected to stdout.txt and stderr.txt"
    
    – Tomas By Sep 13 '20 at 11:57
  • Nice! The existence of -noconsole shows the DOSBox programmers have been thinking along these lines at least a little. – Lassi Sep 13 '20 at 12:02
  • 8
    Use dosemu -dumb or dosemu -t. Both work on a server I use with connectbot, ssh and screen. (I'm using dosemu2.) – ecm Sep 13 '20 at 13:21
  • 1
    Related, but not an answer to this question: https://github.com/jhallen/cpm is an emulator with tty output for CP/M. – occipita Sep 18 '20 at 23:07

2 Answers2

24

As ecm wrote, DOSEMU supports this, using -t or -dumb. This works with the original DOSEMU and DOSEMU2.

-dumb runs DOS programs in “dumb” terminal mode, where output goes to DOSEMU’s standard output and can thus be scrolled back in your terminal or redirected. -t uses S-Lang to provide an emulation of a PC text-mode screen inside the terminal, with colours, graphical characters, and mouse integration.

Here’s the Turbo C++ IDE running in DOSEMU in GNOME Terminal with full mouse support:

DOSEMU running Turbo C++ in GNOME Terminal

Stephen Kitt
  • 121,835
  • 17
  • 505
  • 462
  • 6
    Excellent suggestion. DOSEMU makes a quite good attempt at running DOS text applications, including full-screen TUI applications (DOS Edit, Turbo Vision stuff), in unix terminals. Read the documentation on how to enter keyboard combinations not directly supported by your terminal (like Alt-F9 or so). – Michael Karcher Sep 13 '20 at 23:27
  • 4
    I like the fact that all the things done back then to get as far away from serial port speed is now being captured to be able to go over a serial port :) (except that a modern computer can do ssh as fast as the network allows) – Thorbjørn Ravn Andersen Sep 14 '20 at 10:20
  • 4
    Another vote for DOSemu here. It's a sufficiently good emulation that in the past I've used it to drive a parallel-port-connected EPROM programmer from its (closed-source) DOS application. – Mark Morgan Lloyd Sep 14 '20 at 14:33
9

There's also ecm's fork of 8086tiny, ecm-pushbx/8086tiny: ecm's repository for 8086tiny: a tiny PC emulator/virtual machine. Unlike dosemu, it runs on an emulated (not virtual) processor so will run on more hosts. keaston/cp437: Emulates an old-style "code page 437" / "IBM-PC" character set terminal on a modern UTF-8 terminal emulator. is supposed to be a useful wrapper for it.

scruss
  • 21,585
  • 1
  • 45
  • 113
  • 1
    This also works with the original 8086tiny! – Stephen Kitt Sep 14 '20 at 06:30
  • 1
    Indeed it does. I suggested ecm's fork because this site tends to lean towards development and having the trace flag available is handy for debugging. – scruss Sep 14 '20 at 14:52
  • Yup, ecm’s fork is much more useful than the original; I only wanted to point out that this particular feature wasn’t specific to ecm’s fork. – Stephen Kitt Sep 14 '20 at 15:01