DOSEMU.BIN(1)
π NAME π
okay so welcome to the DOSEMU.BIN(1) manual page β the DOS Emulation corner of Unix, bestie. This is all about dosemu.bin and dosdebug: they run DOS and DOS programs under Linux. periodt. π
β¨ SYNOPSIS β¨
dosemu.bin [ -234ABCcdKkmNnOpSstVwX ] [ -h level ] [ -F file ] [
--Fusers file ] [ --Flibdir directory ] [ --Fimagedir directory ] [ -f
file ] [ -L dexefile ] [ -u confvar ] [ -D flags ] [ -M size ] [ -e size
] [ -x size ] [ -P file ] [ -o file ] [ 2> debugfile ] [ -I config-
options ] [ -i[bootdir] ] [ -U inpipe[:outpipe] ] [ [-E] dos-command ]
dosdebug
π DESCRIPTION π
dosemu.bin is the actual binary, and it gets wrapped by the dosemu (1) script β that script is the one that invokes the Linux DOS emulator, also known as DOSEMU. π«Ά
debugfile is like an optional little side file: all debugging output gets redirected into it.
dosdebug is the tool you use to control or debug an already running DOSEMU. iykyk π§
Even though this program is known as the DOS emulator, it is actually a virtual machine for DOS. It lets DOS and programs written for DOS operate in an environment similar to a standard IBM PC/AT or compatible with an Intel 80x86 processor in real mode. iconic behaviour, honestly. β¨
DOSEMU provides emulation of services like BIOS video, disk, keyboard, serial, and printer; CMOS memory for configuration information; a real time clock; and memory allocation through the XMS 3.0 specification, EMS 4.0, and DPMI 0.9. π₯
Because DOSEMU is not really a DOS emulator, a copy of FreeDos is required β and it now comes pre-configured and is part of the official DOSEMU binary distribution. In addition, any currently available proprietary DOS (such as MS-DOS, PC-DOS, DR-DOS) can be booted when properly configured. slay, but configure it properly fr fr. π
π§ KERNEL REQUIREMENTS π§
At present, you will need Linux 2.0.28 or above with the SYSV IPC option compiled β that's System V Inter-Process Communication facilities, see ipc(2). SYSV IPC is an option in the configuration setup during a Linux kernel compile. π
π OPTIONS π
-2,3,4,5β choose 286, 386, 486 or 586 processor to simulate.-Aβ boot from floppy disk A (does not need to be a real floppy disk, see below).-Bβ boot from floppy disk B (does not need to be a real floppy disk, see below).-Cβ boot from hard disk C (does not need to be a real hard disk or even an msdos filesystem, see below).-cβ use direct Console video (must be at the console, requires special privileges, and-s).-dβ detach from current virtual console or tty and attach to the first free virtual console.[-E] dos-commandβ Run DOS command when starting DOSEMU, and, if-Eis not given, exit DOSEMU after running the command. The command can also be given with a Linux path (for example/home/joeuser/dosemu/freedos/bin/xcopy.exe). Note: this only works if yourautoexec.batcontains a"unix -e"command. the way that path is doing the most, honestly.-kβ use RAW console Keyboard (must be at the console).-Fβ Parse this config-script instead of the built-inglobal.conffile (you need to run as root on suid DOSEMU for this).--Fusersβ Bypassdosemu.usersand take this file instead (only accepted whendosemu.binis not suid-root).--Flibdirβ Bypass the defaultDOSEMU_LIB_DIR(as maybe defined indosemu.users) and use this directory instead.--Fimagedirβ Bypass the default directory forbootdirectoryandhdimages(DOSEMU_HDIMAGE_DIR) and use this directory instead.-fβ Parse this config-file instead of.dosemurc.-nβ Bypass (don't use)dosemu.usersanddosemu.conf(only accepted whendosemu.binis not suid-root).-uβ set a user configuration variable. Anu_is prefixed to the name to avoid name clashes. This variable then can be checked indosemu.conforglobal.confto do some special configuration.-Lβ Load and start a DEXE file (special preconfigured bootable hdimage containing just one DOS application).-Iβ Parse the string behind-Iwith the same syntax asglobal.confor.dosemurc, such as:
dos ... -I 'video { mda }'
This is useful if you just want to override a given configuration parameter temporary. You also may have a generic configuration by executing a script such as:
dos ... -I "`myconf.sh`"
where myconf.sh is a script writing the configuration to stdout. If you have an alternate configuration file besides .dosrc,
dos ... -I "`cat myother.conf`"
will do the job. Note however, that you have to quote the parameter behind -I because it is expected to be one argument. quote it or catch hands, bestie. π
-i[bootdir]β launched as part of a systemwide installation, this option (re-)installs a DOS that is used in DOSEMU (this can be the DOSEMU distributed FreeDOS or any proprietary DOS, which is bootable via fatfs).bootdiris the base name of a directory. The symbolic link~/.dosemu/drives/cwill be changed to point to this directory. Re-installing is only rarely necessary, since in practise the symbolic link(s) will automatically point to updated files.-Dβ specify which Debugging messages to allow/suppress.-hβ dump configuration tostderrand exit (implicit sets-D+c). This is useful for debugging configuration files, you should use-Otoo to direct the+ctype messages tostderr.levelcan be0,1or2and controls the amount of configuration parser debug output: No parser debug (0), parser loop debug (1),if_else_endifdebug (2).-Hβ specify thedosdebugsupport flags, currently only1is reasonable. with-H1you force dosemu to wait until the dosdebug terminal has connected. Hence to debug a DOS session from the very beginning you first start dosemu with-H1and then startdosdebug. DOSEMU will then lock before jumping into the loaded bootsector waiting for dosdebug to connect. Once connected you are instoppedstate and can set breakpoints or single-step through the bootstrap code. that's main character debugging energy. π₯-Mβ set base memory to SIZE Kilobytes.-mβ toggle internal mouse-support.-Oβ usestderrfor output of Debugging messages.-oβ use this file for output of Debugging messages.-Pβ copy debugging output to FILE.-pβ stop for prompting if a non-fatal configuration problem is detected.-Sβ run using SDL.-sβ super-user/full feature mode: enable direct hardware access. Use this switch if you wish to use graphics on the console, need direct port access, hardware interrupts or raw network access. Implies-Vand-kby default.
WARNING: THIS SWITCH NEEDS ROOT, SUID-ROOT, OR SUDO. GIVING DIRECT HARDWARE ACCESS TO DOS PROGRAMS MAY GIVE THESE THE ABILITY TO LOCK YOUR COMPUTER, OR (IN RARE CASES) EVEN DAMAGE HARDWARE. ONLY TRUSTED LOCAL USERS SHOULD BE GIVEN THIS TYPE OF ACCESS. like, do not hand this to just anyone, bestie. π
-tβ terminal mode: run using the S-Lang library.-Uβ defineinpipeandoutpipefor asynchronous control of DOSEMU from another process. The format is (without whitespace in between):
inpipe:outpipe
where :outpipe can be omitted. In the latter case no feedback from DOSEMU can be expected.
For security reasons DOSEMU does not create the named pipes itself, so the user is responsible to set the permissions of the pipes correctly. Note that when using this options, the foreign process can control your DOSEMU session (such as entering keystrokes). This option should therefor only used by frontends (such as kdos), which first create the proper named pipes and then launch DOSEMU. A special control command ( ack on ) can be used to force DOSEMU returning handshake tags via outpipe such that the frontend knows when the control command has started or finished and whether it was successful. The format of this tagging is:
SYN: <commandname>
<any output from the command>
ACK: code=n
where n is 0 for success. A tiny control terminal, which can serve as example, is the supplied dosctrl program. It takes just the two pipes as arguments and you may then enter control commands, which of them help is the most important one;-) Note that dosctrl does not launch DOSEMU, you have to do it yourself. no cap, the help command is carrying the whole operation. π«Ά
-Vβ use direct console video with VGA graphics and use the native graphics card's BIOS (must be at the console, requires special privileges, and-s).-wβ toggle windowed/fullscreen mode in X.-Xβ run in an X Window.
π«Ά quick vibe check: the SYNOPSIS also shows-K,-N,-e size, and-x size. The OPTIONS list on this page doesn't give them their own descriptions, so I'm not inventing lore. They're still 100% in the synopsis above, periodt.
π₯ HARD DISKS π₯
DOSEMU supports four methods of supplying DOS with hard disks:
- a virtual disk file residing on a Linux filesystem which emulates a hard drive.
- direct access to a DOS partition through a raw disk device (i.e.
/dev/hda,/dev/hdb,/dev/sdX). - direct access to an DOS partition through single partition access (i.e.
/dev/hda1,/dev/hdb2,/dev/sdxx). - access to a Linux filesystem as a
"network"drive using the driveremufs.syssupplied with DOSEMU incommands/emufs.sysorlredir.exe.
Configuration of DOSEMU's hard disk resources is done by editing dosemu.conf or .dosemurc before running DOSEMU. Look at /usr/share/doc/packages/dosemu/README.txt. go read the README, bestie, it's giving lore. πΈ
πΈ FLOPPY DISKS πΈ
DOSEMU supports two methods of supplying DOS with floppy disks:
- a virtual disk file residing on a Linux filesystem which emulates a floppy drive.
- direct access to a physical floppy through a raw disk device (i.e.
/dev/fd0,/dev/fd1).
This is also explained more thoroughly in README.txt.
Configuration of DOSEMU's floppy disk resources is done by editing the dosemu.conf before running DOSEMU. π
π VIDEO π
DOSEMU may be run on any tty device. However, increased performance and functionality may be had by taking advantage of special features of the Linux console. Those running DOSEMU on the console may wish to investigate the -c, -k, and -V switches, explained more thoroughly in README.txt. There is also some very brief documentation in the file dosemu.conf, which can be edited for your needs. very demure, very console. β¨
In brief, proper use of the console device and the corresponding switches allows the user to view a DOS program in its original color and font, with none of the periodic screen update problems with the generic tty output code. the way that just makes sense. π¦
πΉ KEYBOARD πΉ
Those using DOSEMU on the Linux console may also wish to use the RAW keyboard support. This mode of operation, selected by the -k switch, provides the user with access to the entire keyboard accessible under DOS. Any combination of ALT, CTRL, and SHIFT keys may be used to generate the odd keycodes expected by many DOS programs. odd keycodes? iconic. no notes. π
π¨οΈ PRINTING β¨
Okay so printing, bestie: the BIOS printer services are emulated through standard UNIX file I/O via temporary files, and those temp files get periodically spooled by LPR or a different print client β whatever $_printer_commands in dosemu.conf says. π
π¬ DEBUG MESSAGES
Debug messages can be controlled either at the command line or in the configuration file. Take a look at the documentation inside the config.dist file included with DOSEMU in the examples subdirectory, for debugging options. At the command line, you may specify which classes of messages you wish dos to allow. The syntax of this is DOSEMU takes an option -D FLAGS, where FLAGS is a string of letters which specify which options to print or suppress. DOSEMU parses this string from left to right.
+β turns the following options on (initial state)-β turns the following options offaβ turns all the options on/off, depending on flag0β turns all options off1-9β sets the debug level, the higher, the more output#β where#is a letter from the valid class list, turns that option off/on depending on the+/-state.
π Message Classes
Here's the class list, literally copied so you don't have to squint:
d disk R disk read W disk write
D int 21h C cdrom v video
X X support k keyboard i port I/O
s serial m mouse # default ints
p printer g general c configuration
w warning h hardware I IPC
E EMS x XMS M DPMI
n IPX network P Pkt-driver S SOUND
r PIC T IO-tracing Z PCI-BIOS
A ASPI driver Q mapping driver
Any debugging classes following a + character, up to a - character, will be turned on (non-suppressed). Any after a - character, up to a + character, will be suppressed. The character a acts like a string of all possible debugging classes, so +a turns on all debugging messages, and -a turns off all debugging messages. The characters 0 and 1-9 are also special: 0 turns off all debugging messages, and 1-9 turns on all debugging messages, but set the debug level too.
There is an assumed + at the beginning of the FLAGS string. Some classes, such as error, can not be turned off. In case you didn't redirect stderr, nearly all output to stderr goes to /dev/null β so don't be confused when you see nothing. π
Some examples:
"-D+a-v" or "-D1-v" : all messages but video
"-D+kd" : default + keyboard and disk
"-D0+RW" : only disk READ and WRITE
Any option letter can occur in any place. Even pointless combinations, such as -D01-a-1+0, will be parsed without error, so be careful. Some options are set by default, some are clear. This is subject to my whim, and will probably change between releases. You can ensure which are set by always explicitly specifying them. π«Ά
πΉ SPECIAL KEYS β¨
In RAW keyboard mode (see the -k option), DOSEMU responds to certain key sequences as control functions.
ctrl-scrlock= show0x32int vectorsalt-scrlock= show the vm86 registersrshift-scrlock= generate anint8(timer)lshift-scrlock= generate anint9(keyboard)ctrl-break= ctrl-break as under DOS.ctrl-alt-pgup= reboot DOS. Don't trust this!ctrl-alt-pgdn= exit the emulator
Use <LEFT CTRL>-<LEFT ALT>-<Function key> to switch to another virtual console. π¦
π§ MEMORY β¨
The XMS memory support in DOSEMU conforms to Lotus/Intel/Microsoft/AST extended memory specification 3.0. I have implemented all XMS functions except function 0x12 (Reallocate Upper Memory Block). π
DOSEMU also supports EMS 4.0 and implements DPMI 0.9 (1.0 partially). Literally so much memory lore, iykyk. π
π AUTHOR
DOSEMU β comprised of the files dosemu.bin and dosemu β is based on version 0.4 of the original program written by Matthias Lautner (no current address that I know of).
Robert Sanders <gt8134b@prism.gatech.edu> was maintaining and enhancing the incarnation of DOSEMU with which this man page was originally distributed. During about 4 years James B. MacLean <macleajb@ednet.ns.ca> was the restless leader of the dosemu team; implementation of DPMI (which made Windows-3.1, dos4gw, djgpp, etc. running) happened during his 'governement' and brought the project near to Beta-state. Hans Lermen <lermen@fgan.de> took over and released the first 1.0 version. Now Bart Oldeman <bart@dosemu.org> is maintaining this funny software. π
π BUGS
There are too many to count, much less list. π
Please report bugs to the author. I'd also like to hear about which programs DO work. Just send me a note detailing what program (and what version) you are using, what works and what doesn't, etc. π
π AVAILABILITY
The most recent public version of DOSEMU can be obtained from www.dosemu.org; a fast mirror is at ibiblio.unc.edu:/pub/Linux/system/emulators/dosemu/. If you want to keep up on private developer pre-releases, join the DOSEMU developer team β even just good detailed debug reports are all you need! β¨
π FILES
/usr/bin/dosemu.binβ the binary. πΎ/usr/bin/dosemuβ the wrapper script, it is recommended not to invokedosemu.bindirectly./usr/bin/xdosemuβ same, but invoking DOS in an X window.$HOME/.dosemuβ per user DOSEMU local directory. This will be created silently, if not existing.$HOME/.dosemu/tmpβ all temporary file creation happens here, we do not use/tmpanymore./var/run/dosemu.*or$HOME/.dosemu/runβ various files used by DOSEMU including debugger pipes.$HOME/dosemu/freedosβ bootdirectory containing the FreeDos part./etc/dosemu/dosemu.confor (only if/etc/dosemu.usersexists)/etc/dosemu.confβ main configuration file for DOSEMU, which is included byglobal.conf(global.confis included indosemu.binby default).$HOME/.dosemurcβ per-user configuration file./etc/dosemu.usersor/etc/dosemu/dosemu.usersβ for suid-root or sudo running binaries: defines the access rights to DOSEMU on a per user basis and sets some vital configuration. This is the only fix-location configuration file, DOSEMU first looks for/etc/dosemu.usersand, if this is not found, for/etc/dosemu/dosemu.users. Via the keyworddefault_lib_dir=in dosemu.users the systemwideDOSEMU_LIB_DIRdirectory may be moved elsewhere. For more information see/usr/share/doc/packages/dosemu/README.txt./etc/dosemu/dos.iniβ IPX configuration file.doc/DANG.txtβ to help you hack DOSEMU code./usr/share/doc/packages/dosemu/README.*β various documentation.QuickStart,READMEandINSTALLβ to set up DOSEMU quickly.ChangeLogβ changes in DOSEMU since the last release./usr/share/doc/packages/dosemu/README.bindistβ information on how to use the DOSEMU/FreeDos ready-to-use binary distribution.MSDOS mailing listβ for more information, mail tolinux-msdos@vger.kernel.org.
π SEE ALSO
π That's the whole vibe, bestie β this page is DOSEMU.BIN(1), Version 1.4.0.1, dated 2008-03-27. Stay iconic. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: dosemu 1.4.0.1.r2065-bp160.1.11 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms