MODE + Setting Device ModesSets the mode of operation for a printer or color graphics
display. In PC-DOS version 3.3, also controls code page switching
and additional communications devices.
VERSION
PC-DOS 2.0+ (revised from 1.0; revised again in 3.3)
MS-DOS equivalent: MODE (2.0+)
TYPE
External
SYNTAX ll Versions)
[d:][path] MODE LPT#[:][n][,[m][,P]]
or
[d:][path] MODE n
or
[d:][path] MODE [display],shift[,T]
or
[d:][path] MODE COM#[:]baud
[,[parity][,[databits][,[stopbits][,P]]]]
or
[d:][path] MODE LPT#[:] = COM#
SYNTAX (Version 3.3 Only)
[d:][path] MODE device CODEPAGE
PREPARE = ((cplist) [cd:][cpath]cfilename)
or
[d:][path] MODE device CODEPAGE SELECT = cp
or
[d:][path] MODE device CODEPAGE[/STATUS]
or
[d:][path] MODE device CODEPAGE REFRESH
OPTIONS
[d:][path] Specifies the drive letter and
path that contain the MODE
command file.
LPT# In LPT#, # is the printer
number (1, 2, or 3).
COM# In COM#, # is the asynchronous
communications adapter: 1 or 2
for all versions; 1, 2, 3, or
4 for PC-DOS version 3.3.
n 80 or 132 (characters per line
for printer).
display BW40, BW80, CO40, CO80, or
MONO (for color graphics
display).
m 6 or 8 (lines per inch of
vertical spacing for printer).
shift R or L (to shift display right
and left for color graphics
monitor).
P Performs continuous retry when
error detected.
T Displays test pattern.
baud 110, 150, 300, 600, 1200,
2400, 4800, or 9600 (all
versions); or 19,200 for PC-
DOS 3.3.
parity N (none), O (odd), or E (even-
-default).
databits 7 (default) or 8.
stopbits 1 or 2 (if baud rate is 110, 2
is default; if baud rate other
than 110, default is 1).
device CON, PRN, LPT1, LPT2, or LPT3.
cp Specifies one code page
number: 437, 850, 860, 863, or
865.
cplist Specifies one or more code
page numbers, which are
separated by commas, and the
list is enclosed in
parentheses. Must be selected
from the following values:
437, 850, 860, 863, or 865.
[cd:][cpath]cfilename Specifies the file that
contains the code pages.
Choose from the following
files:
4201.CPI IBM Proprinter
5202.CPI IBM Quietwriter III Printer
EGA.CPI EGA-type devices
LCD.CPI IBM Convertible LCD
MODE is used to change the way DOS communicates with
hardware using different protocols, such as printers, display
units, and modems. It is also used to specify different character
sets (code pages) for use with various keyboards and printers in
PC-DOS version 3.3.
EXAMPLES
MODE LPT1: 132,8,P
sets the IBM-compatible printer connected to LPT1 to 132
characters per line and 8 lines per inch (condensed). The P
specifies that DOS should continuously attempt to send data to
the port.
MODE CO80
switches from the monochrome to the color adapter and sets it to
80 characters across.
MODE 40
switches the color adapter to 40-column mode (you cannot use 40-
column mode on the monochrome adapter).
MODE MONO
switches to the monochrome adapter.
MODE 80,L,T
moves the color display left, and tests to see whether it is
centered by displaying a test pattern.
MODE COM1: 9600,N,8,1
sets the communications port COM1 to 9600 baud, no parity, 8 data
bits, and 1 stop bit.
MODE LPT1: = COM1
sends the output normally sent to LPT1 (the parallel port) to
COM1 (the serial port).
MESSAGES
Codepage not prepared
MODE failed during a SELECT operation either because the
indicated code page was never defined for the device or because
the code pages that have been prepared do not have the proper
font for the current video mode. Use MODE PREPARE to prepare the
device with the code page. If an error message still appears,
increase the number of fonts in the DEVICE = DISPLAY command in
CONFIG.SYS; then restart DOS.
Codepage operation not supported on this device
The device may be one that does not support code pages, or its
name may have been improperly entered or not defined. Verify the
spelling of the device on the command line and make sure that it
is not a file name. Check the CONFIG.SYS file to make sure it
contains the device name. If it does not, add the device name to
the DEVICE= command and restart DOS. Then reissue the MODE
command.
Codepages cannot be prepared
Either code pages are duplicated on the device or there are more
code pages specified than are allowable. Check the number of
allowable code pages by using the MODE/STATUS command; then
respecify the MODE command.
Current keyboard does not support this codepage
Alter the KEYB specification for the required code page and
reissue the MODE PREPARE command for that code page.
Device error during Status
Device error during Prepare
Device error during Select
Device error during write of font file to device
The device may not support code page switching, or it may have
been defined improperly. Check the CONFIG.SYS file to make sure
the device is named; then restart DOS, and reissue the MODE
command again.
Device or codepage missing from font file
During a PREPARE operation, DOS could not find a definition of
the indicated code page for the device. Reissue the MODE command,
using a code page that the device supports (check the printer
documentation). If this error occurs, you will need to prepare
all code pages again by using MODE PREPARE.
Device ddd not prepared
A device must be prepared by using the MODE PREPARE command
before a MODE SELECT operation can be performed. Use the MODE
PREPARE command to pass code page definitions to the specified
device.
Error during read of font file
There is an unrecoverable I/O error in that file. Restore the
file from a master copy, or direct MODE to an alternate device
and reissue the command to see if that device can access the
file.
Failure to access Codepage Font File
Verify the spelling of the file name and make sure it is
available; then reissue the MODE command.
Font file contents invalid
The font file is not in the proper format. Make sure that you
have entered the file name correctly. If so, copy the file again
from a master copy. If this error occurs, you will need to
prepare all code pages again by using MODE PREPARE.
Illegal device name
The specified printer must be LPT1, LPT2, or LPT3; the
asynchronous adapter must be COM1, COM2, COM3, or COM4.
Infinite retry not supported on network printer
Printer errors cannot be detected through a network interface; do
not use the P option with a network printer.
Invalid baud rate specified
The baud rate must be either 110, 150, 300, 600, 1200, 2400,
4800, 9600, or 19200. You need to enter only the first two digits
of the number.
Missing from the file is either the device ID
or the codepage
Enter the correct code page or prepare the code pages again.
No codepage has been SELECTED
Use MODE to select a code page from the list of code pages that
have been prepared.
Previously prepared codepage replaced
Use MODE/STATUS to check the list of code pages that have been
defined to make sure that it is correct. The replacement may have
been intentional. If not, use MODE PREPARE to correct the list.
Printer error
MODE could not set the printer mode either because an I/O error
occurred or because the printer is out of paper, is not ready, or
is off-line. Check the printer and try again.
NOTES
The different character sets available for version 3.3 of
PC-DOS are code pages 437 (U.S., the default), 850
(multilingual), 860 (Portuguese), 863 (Canadian French), and 865
(Norwegian and Danish). In order to use a code page, it must be
prepared for a specific device. Buffers should have been
previously created for prepared code pages with
DEVICE = DISPLAY.SYS
and
DEVICE = PRINTER.SYS
if applicable. Several code pages can be prepared at once by
using a code page list (cplist). For example,
MODE LPT1: CP PREPARE = ((850,860,863) 5202.CPI)
specifies the multilingual, Portuguese, and Canadian French
character sets (code pages 850, 860, and 863) for the printer
attached to LPT1 and specifes the character shapes for the IBM
Quietwriter III printer. After a code page and device have been
prepared, the code page may be activated by using the MODE SELECT
command. The command
MODE LPT1: CP SELECT = 860
activates code page 860 (Portuguese) from the list of prepared
code pages.
To determine the currently active code page, use the command
MODE LPT1: CP/STATUS
This command also returns a list of devices and code pages that
have been prepared.
In addition, a code page may sometimes need to be
reestablished (refreshed) if the printer has been turned off and
then turned back on again. For further information about code
pages and their uses, see the technical notes in the DOS
documentation. Code pages are also discussed in the CHCP, KEYB,
and NLSFUNC commands, and in Appendix B: The CONFIG.SYS file.
You can also use the following abbreviations:
þ CP for CODEPAGE
þ PREP for PREPARE
þ SEL for SELECT
þ REF for REFRESH
þ STA for STATUS
------------------------------------------------------------------
[For related topics, press R]
SEE ALSO
GRAFTABL Command
GRAPHICS Command
KEYB Command
KEYBxx Command
file: /Techref/DOS/command/mode.htm, 11KB, , updated: 1999/2/20 10:24, local time: 2024/11/22 04:11,
18.224.30.113:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/DOS/command/mode.htm"> DOS command mode</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.