.\" -*- nroff -*- (This is for Emacs) .TH DOS 1 "Feb 27, 1996" "Version ALPHA 0.63" "MS-DOS Emulation" .SH NAME dos, dosdebug, xdos \- run MS-DOS and MS-DOS programs under Linux and NetBSD .SH SYNOPSIS .B dos [ .B \-ABCbcdkVNXtsgKm234O ] [ .B \-F .I file ] [ .B \-D .I flags ] [ .B \-M .I size ] [ .B \-e .I size ] [ .B \-x .I size ] [ .B \-P .I file ] [ .B \-o .I file ] [ 2\> .I debugfile ] .sp .B dosdebug .sp .B xdos [ .B \-ABCbdNtsK234O ] [ .B \-F .I file ] [ .B \-D .I flags ] [ .B \-M .I size ] [ .B \-e .I size ] [ .B \-x .I size ] [ .B \-P .I file ] [ .B \-o .I file ] [ 2\> .I debugfile ] .SH DESCRIPTION .B dos invokes the Linux dos emulator, also known as .BR DOSEMU . .br .I debugfile is an optional file into which all debugging output will be redirected. .PP .B dosdebug is used to control or debug an already running .BR DOSEMU . .PP .B xdos starts .B DOSEMU in it's own X window. .PP Although this program is known as the DOS .I emulator, it is actually a virtual machine for MS-DOS, allowing DOS and programs written for DOS to operate in an environment similar to a standard IBM PC/AT or compatible with an Intel 80x86 processor in real mode. .B DOSEMU provides emulation of such services as BIOS video, disk, keyboard, serial, and printer; CMOS memory for configuration information; a real time clock; memory allocation through the XMS 3.0 specification, EMS 4.0 and DPMI 0.9. .PP Because .B DOSEMU is not really a DOS emulator, a copy of MS-DOS 3.3-6.22 is required. (Future versions of MS-DOS may run, but have of course not been verified. DR-DOS 6.0 has also been reported to work.) .PP See the files .I QuickStart, .I ChangeLog, .I doc/announce-0.60, and the .B Makefile contained in the source distribution for information on how to configure, compile, and boot .BR DOSEMU . .SH KERNEL REQUIREMENTS At present, you will need Linux 1.1.12 or above with the SYSV IPC option (System V InterProcess Communication facilities, see .BR ipc (2)) compiled. SYSV IPC is an option in the configuration setup during a Linux kernel compile. For kernels older than 1.1.12 a patch is required, which is no longer in the .B DOSEMU source tree, so please upgrade to (at least) the latest stable kernel release. If you use 1.0.x, please upgrade to the latest stable kernel. At the time of writing, it was Linux 1.2.13, available with anonymous ftp at ftp.funet.fi in the directory /pub/Linux/kernel/linux/v1.2/, or at various mirrors all over the world. .SH OPTIONS .TP .I -A boot from floppy disk A (does not need to be a real floppy disk, see below) .TP .I -B boot from floppy disk B (does not need to be a real floppy disk, see below) .TP .I -C boot from hard disk C (does not need to be a real hard disk or even a msdos filesystem, see below) .TP .I -c use direct Console video (must be at the console, requires that .B dos is suid root) .TP .I -d detach from current virtual console or tty and attach to the first free virtual console .TP .I -V use VGA specific video optimizations .TP .I -k use RAW console Keyboard (must be at the console) .TP .I -F Parse this config-file instead of /etc/dosemu.conf .TP .I -D specify which Debugging messages to allow/suppress .TP .I -M set base memory to SIZE Kilobytes .TP .I -m enable internal mouse-support .TP .I -P copy debugging output to FILE .TP .I -2,3,4 choose 286, 386, or 486 processor (BE CAREFUL! .B DOSEMU is not yet 32-bit clean, so if your program detects a 386 or 486 processor and uses 32-bit registers, it might be confused by BIOS functions. If you think this is happening, use -2 to force .B DOSEMU into 286-mode.) .PD 1 .SH HARD DISKS .B DOSEMU supports four methods of supplying DOS with hard disks: .IP 1. a virtual disk file residing on a Linux filesystem which emulates a hard drive. .IP 2. direct access to an MS-DOS partition through a raw disk device (i.e. /dev/hda, /dev/hdb, /dev/sdX). .IP 3. direct access to an MS-DOS partition through single partition access (i.e. /dev/hda1, /dev/hdb2, /dev/sdxx). You need to run the program .B mkpartition to enable .B DOSEMU to access your DOS-partitions with SPA. .IP 4. access to a Linux filesystem as a "network" drive using the driver emufs.sys supplied with .B DOSEMU in commands/emufs.sys. .PP This is explained more thoroughly in .B QuickStart. .PP Configuration of .B DOSEMU's hard disk resources is done by editing .B /etc/dosemu.conf before running .BR DOSEMU . You find an example in etc/config.dist .SH FLOPPY DISKS .B DOSEMU supports two methods of supplying DOS with floppy disks: .IP 1. a virtual disk file residing on a Linux filesystem which emulates a floppy drive .IP 2. direct access to a physical floppy through a raw disk device (i.e. /dev/fd0, /dev/fd1). .PP This is also explained more thoroughly in .B QuickStart. .PP Configuration of .B DOSEMU's floppy disk resources is done by editing the .B /etc/dosemu.conf before running .BR DOSEMU . .SH VIDEO .B 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 .B DOSEMU on the console may wish to investigate the .I \-c, .I \-k, and .I \-V switches, explained more thoroughly in .B QuickStart. There is also some brief documentation in the file etc/config.dist, which can be copied to /etc/dosemu.conf and edited for your needs. .PP 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. .SH KEYBOARD Those using .B DOSEMU on the Linux console may also wish to use the RAW keyboard support. This mode of operation, selected by the .I \-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. .SH PRINTING The BIOS printer services are emulated through standard UNIX file I/O to a set of files, .I dosemulpt1, .I dosemulpt2, and .I dosemulpt3, corresponding to the DOS printer devices LPT1, LPT2, and LPT3. All characters sent to LPTx will be redirected to the file dosemulptx in the current directory. .PP .B WARNING! .B DOSEMU does not keep the file buffers flushed; therefore, the state of these files is undefined until you actually exit the DOS emulator. Please excuse the inconvenience. .SH 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 .B DOSEMU in the examples subdirectory, for debugging options. At the command line, you may specify which classes of messages you wish .B dos to allow. The syntax of this is .B DOSEMU takes an option "-D FLAGS", where FLAGS is a string of letters which specify which options to print or suppress. .B DOSEMU parses this string from left to right. + turns the following options on (initial state) - turns the following options off a turns all the options on/off, depending on flag 0 turns all options off 1 turns all options on # where # is a letter from the valid class list, turns that option off/on depending on the +/- state. .I Message Classes: d disk v video R disk Reads k keyboard i port I/O W disk Writes s serial p printer h hardware w warnings g general x XMS I IPC X X11 Any debugging classes following a .I \+ character, up to a .I \- character, will be turned on (non-suppressed). Any after a .I \- character, up to a .I \+ character, will be suppressed. The character .I a acts like a string of all possible debugging classes, so .I \+a turns on all debugging messages, and .I \-a turns off all debugging messages. The characters .I 0 and .I 1 are also special: .I 0 turns off all debugging messages, and .I 1 turns on all debugging messages. There is an assumed .I \+ 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 .B /dev/null. 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 .I -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. .SH SPECIAL KEYS In RAW keyboard mode (see the .BR \-k option), .B DOSEMU responds to certain key sequences as control functions. .PP .PD 0 .IP ctrl-scrlock = show 0x32 int vectors .IP alt-scrlock = show the vm86 registers .IP rshift-scrlock = generate an int8 (timer) .IP lshift-scrlock = generate an int9 (keyboard) .IP ctrl-break = ctrl-break as under DOS. .IP ctrl-alt-pgup = reboot DOS. Don't trust this! .IP ctrl-alt-pgdn = exit the emulator .PD 1 .PP Use -- to switch to another virtual console. .SH MEMORY The XMS memory support in .B 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). .PP While I have implemented the UMB functions, they are extremely stupid and will almost always act suboptimally. The next release of .B DOSEMU should have saner UMB support. .PP .B DOSEMU 0.63 also supports EMS 4.0 and effort has started to implement DPMI 0.9. .SH LOGGING .B DOSEMU is able to log all use with email or .BR syslogd (8). The file .I /etc/dosemu.loglevel contains information about the logging facilities. Read .I doc/README.loglevel for more details. .SH AUTHOR .B DOSEMU (comprised of the files .B dos and .B libdosemu ) is based on version 0.4 of the original program written by Matthias Lautner (no current address that I know of). .PP Robert Sanders was maintaining and enhancing the incarnation of .B DOSEMU with which this man page was originally distributed. Now James B. MacLean is maintaining this funny software. .SH BUGS There are too many to count, much less list. .PP 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. .SH AVAILABILITY The most recent public version of .B DOSEMU can be ftp'ed from tsx-11.mit.edu in the /pub/linux/ALPHA/dosemu directory. If you want to keep up on private developer pre-releases, join the .B DOSEMU developer team - even just good detailed debug reports are all you need! .SH FILES .PD 0 .TP .I /usr/bin/dos The invoker program. .TP .I /usr/bin/xdos The X version. .TP .I /usr/lib/libdosemu The actual emulator code as a shared library (when .B DOSEMU is compiled as a.out). .TP .I /var/lib/dosemu/* Various files used by .B DOSEMU including diskimages and disk config files. .TP .I /etc/dosemu.conf Main configuration file for .BR DOSEMU . .TP .I /etc/dosemu.users Contains the usernames that are allowed to use .BR DOSEMU . .TP .I /etc/dosemu.loglevel Logging configuration file. .TP .I doc/DPR Dosemu development team: Who is doing which part of the .B DOSEMU project? .TP .I doc/DANG To help you hack .B DOSEMU code. .TP .I doc/README.* Various documentation. .TP .I QuickStart To set up .B DOSEMU quickly. .TP .I ChangeLog Changes in .B DOSEMU since the last release. .TP .I MSDOS mailing list For more information, mail to .IP linux-msdos@vger.rutgers.edu