rhl57.htm

来自「linux的初学电子书」· HTM 代码 · 共 2,354 行 · 第 1/4 页

HTM
2,354 行
字号
<P>The normal keyboard handlers should suffice for simpler DOS tasks, but will not handle more complicated keystrokes. Keyboard-intensive packages like WordPerfect that make heavy use of Alt and Ctrl keys need to be represented better. The rawkeyboard 
option offers a nearly complete representation of the PC keyboard by bypassing all key translations. This is known as raw mode. To use raw mode simply turn it on in the keyboard configuration. Raw mode is only possible when you are running DOSemu from a 
virtual console.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>If DOSemu unexpectedly exits while a keyboard is in raw mode, you may be stuck with a disabled keyboard. The only option may be to reboot your PC.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>If you are running xdos the keyboard mapping is controlled mainly by your ~/.Xmodmap file. Because the backspace and delete keys are typically reversed under X Window, the following Linux commands will restore the expected keystrokes:

<BR>

<PRE>

<FONT COLOR="#000080">xmodmap -e &quot;keycode 107 = 0xffff&quot;

xmodmap -e &quot;keycode 22 = 0xff08&quot;</FONT></PRE>

<P>Changing this mapping may cause the same problem with other X Window applications.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Sometimes keystrokes are echoed in duplicate. This phenomenon happens on consoles that have the istrip setting turned on. To turn istrip off, use stty.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E69E565"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Configuring Serial Ports</B></FONT></CENTER></H4>

<BR>

<P>To configure serial ports you simply need to make them known to DOSemu. The basic configuration looks like the following:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">serial { com1 device /dev/cua0 }</FONT></PRE>

<P>This example maps DOSemu's com1 to Linux's serial port 0 (which maps to COM1 under native DOS). You can specify additional parameters, such as the port address and IRQ. All of the serial port parameters except the Linux port apply only to ports 
configured under DOSemu. DOSemu accesses the real serial ports as Linux devices that are configured by the kernel. The IRQ, com port number, and port addresses are what you want DOSemu to simulate, and do not need to match the actual hardware. The same IRQ 
restrictions between COM 1/3 and COM 2/4 still exist under DOSemu. If you cannot use two ports simultaneously under Linux, you cannot do so under DOSemu.

<BR>

<P>The following example configures the hardware com1 as com3 with a different IRQ and base address:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">serial { com3 base 0x3e8 iq 5 device /dev/cua0 }</FONT></PRE>

<P>It is generally less confusing if you configure ports as they really exist.

<BR>

<BR>

<A NAME="E69E566"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Configuring Printers</B></FONT></CENTER></H4>

<BR>

<P>Printers under DOSemu can print to a device or file, or you can let a Linux program such as lpr handle the output. Each printer statement in dosemu.conf is assigned an LPT device number in the order in which it occurs in the file. Multiple printers can 
be declared to DOSemu; however, MS-DOS has a set limit of three LPT devices.

<BR>

<P>To configure a printer to save to a file or device, simply specify the file keyword and the name of the file or device. A time-out value will specify how long DOSemu waits in seconds after the last character is received before flushing data and closing 
the file or device. The following are some example printer configurations using a file and device designation:

<BR>

<PRE>

<FONT COLOR="#000080">printer { file &quot;/usr/tmp/dos-print-1&quot; timeout 10 }

printer { file &quot;/dev/lp1&quot; timeout 10 }</FONT></PRE>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Direct access to a printer using the device name can cause problems if other Linux tasks also access that device. Avoid this method if possible.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>To configure a printer to send data through an external program such as lpr, specify the command to use and any options to include on the print line. The option parameter must contain the string %s in the same place you would specify the filename if you 
were using this command under Linux (for example, lpr -p %s). An example of configuring the printer to print using lpr is as follows:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">printer { command &quot;lpr&quot; options &quot;-p %s&quot; timeout 10 }</FONT></PRE>

<P>DOSemu implements printing as a two-step process:

<BR>

<UL>

<LI>Save the file to temporary disk file.

<BR>

<BR>

<LI>Issue a command to print the file.

<BR>

<BR>

</UL>

<P>When the time-out expires, DOSemu closes the temporary file and issues the specified command. The directory /usr/tmp needs to exist to save the temporary files, and should have world access. Setting the sticky bit on this directory will help speed up 
printing. The sticky bit speeds up file access by maintaining the files in memory rather than only on disk.

<BR>

<BR>

<A NAME="E69E567"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Using Debug Parameters</B></FONT></CENTER></H4>

<BR>

<P>A large level of debugging information is available under DOSemu. This information is sent to stderr, but can be sent to a file using redirection; for example,

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">dos 2&gt; dbg.out</FONT></PRE>

<P>or through a DOS command-line option,

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">dos -p dbg.out</FONT></PRE>

<P>There are approximately 20 different debug message types that can be turned on. When you are configuring DOSemu, the most useful message type is the config parameter. This points out syntax problems in the configuration file. Turning on debug 
information is most helpful when DOSemu returns to the shell prompt without any error messages.

<BR>

<P>The following example debug configuration shows all the available debug parameters :

<BR>

<PRE>

<FONT COLOR="#000080">debug { config off disk off warning off hardware off

port off read off general off IPC off

video off write off xms off ems off

serial off keyb off dpmi off printer off

mouse off}</FONT></PRE>

<BR>

<A NAME="E69E568"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Other Configuration Parameters</B></FONT></CENTER></H4>

<BR>

<P>There are several miscellaneous parameters that can be adjusted for DOSemu. Table 57.2 shows the various parameters and their meanings.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 57.2. Other DOSemu configuration parameters.</B></FONT></CENTER>

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Parameter</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Possible Values</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Meaning</I></FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

dosbanner

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

on or off

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Turns on/off welcome banner when booting DOSemu.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

mathco

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

on or off

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Tells MS-DOS if a coprocessor is available. Because Linux already emulates a math coprocessor, set this to &quot;on&quot;.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

dpmi

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

on or off

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Turns on DPMI support. This is a bit unstable, so use with caution.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

FastFloppy

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

number

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Turns on higher speed floppy access. Use with caution.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

speaker

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

off native

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Turns on access to speaker by direct access, emulated or by a speaker emulation mode.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

EmuSYS

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

File extension

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Uses an alternative config.sys file with this file extension. A good value might be &quot;EMU&quot;. Alternative to DOS 6 boot menus.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

EmuBat

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

File extension

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Uses an alternative autoexec.bat file with this file extension. Similar to EmuSYS.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Cpu

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

80286, 80386

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

CPU type to emulate. Because you won't fool all programs, use what you really have.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

ipxsupport

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

on or off

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Allows IPX access through the Linux kernel.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

xms

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Size in kilobytes

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Amount of XMS memory to make available.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

ems

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Size in kilobytes

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Amount of EMS memory to make available.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Hogthreshold

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Number

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The higher the number, the longer DOS can &quot;hog&quot; the CPU waiting for a keystroke. An initial setting of 5000 is a good starting point. Set to 0 to turn off hog detection.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

bootB

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Specifies that DOS is to boot from the floppy configured as B.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

port{ }

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>



<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Allows DOSemu access to specific hardware ports. List the hex values of hardware ports desired.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

mouse

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Type of mouse

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Microsoft, Logitech, mmseries, you have Mouseman, Hitachi, busmouse, Mousesystems, and PS2 are supported.</FONT>

</TABLE><BR>

<A NAME="E68E440"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Runtime Options of DOSemu</B></FONT></CENTER></H3>

<BR>

<P>Table 57.3 shows command options supported on the DOSemu command line. Options specified here will override conflicting parameters specified in the dosemu.conf file. A few other options are available, but are either intended for development use or are 
not completely supported as of yet. Use the -? option to get a complete list of the command options.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 57.3. DOSemu command-line options.</B></FONT></CENTER>

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Option</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Meaning</I></FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-A

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?