16.109 bytes

Service Hints & Tips

Document ID: DJON-3G7TFV

Aptiva - The MODE Command

Applicable to: United States

The MODE command is entered from the DOS command prompt and may also be included in the AUTOEXEC.BAT file. The MODE command sets the operation of various devices on your computer.

Typical uses are:

1.) Setting the modes for printers, color/graphics monitors and asynchronous communications adapters.

2.) Selecting keyboard typematic rates, lines per screen, print parameters and asynchronous communications parameters.

3.) Setting up and controlling code page switching.

The syntax to use the MODE command is as follows:

MODE parameter

For example, if you had a black & white display, DOS is on the C drive, and you wanted to change your display mode to color with a width of 80 characters per line, you would use the following command from the DOS prompt:

MODE CO80

The parameters for configuring the different system devices follows:

Printer Port - MODE LPTn[:] [COLS=c] [LINES=l] [RETRY=r]
LPTn specifies the parallel port to which the device is attached. Valid values for n are 1
through 3.
COLS=c specifies the number of characters (columns) per line. Valid values are 80 or 132
(80 is default).
LINES=l specifies the vertical spacing and the number of lines per inch. Valid values are 6
or 8 (6 is default).
RETRY=r specifies the retry action to take if a timeout occurs when the MODE program
attempts to send output to a parallel printer. This parameter causes part of the MODE
program to remain resident in memory. r can have the following values:
e Return an error from status check of a busy port.
b Return "busy" from a status check of a busy port.
p Continue retrying until printer accepts output.
r Return "ready" from a status check of a busy port.
n Take no retry action (default).
If you are on a network, do not use any of the retry values.

Serial Port - MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r]
COMm specifies the number of the asynchronous communications port. Valid values are 1
through 4.
BAUD=b specifies the first two digits of the transmission rate in bits per second. The
following is a list of valid rates:
11 110 baud
15 150 baud
30 300 baud
60 600 baud
12 1200 baud
24 2400 baud
48 4800 baud
96 9600 baud
19 192000 baud
PARITY=p specifies how the system uses the parity bit to check for transmission errors.
Valid values are: n (none), e (even), o (odd), m (mark), or s (space). e is the default.
DATA=d specifies the number of data bits in a character. Valid values for d are 5 though
8. The default value is 7.
STOP=s specifies the number of stop bits that define the end of a character. Valid values
are 1, 1.5, and 2. 2 is the default.
RETRY=r specifies the retry action to take if a timeout occurs when the MODE program
attempts to send output to an asynchronous port. This parameter causes part of the MODE
program to remain resident in memory. r can have the following values:
e Return an error from status check of a busy port.
b Return "busy" from a status check of a busy port.
p Continue retrying until printer accepts output.
r Return "ready" from a status check of a busy port.
n Take no retry action (default).
If you are on a network, do not use any of the retry values.

Device Status - MODE device /status
status requests the status of any redirected parallel printers. The MODE command, when
used without this switch, displays the status of all installed devices, except redirected
parallel printers.

Redirect Printing - MODE LPTn=COMn
LPTn specifies the parallel port. Valid values for n are 1 through 3.
COMm specifies the serial port. Valid values for m are 1 through 4.

Code Page - MODE device codepage prepare=yyy
MODE device codepage select=yyy
MODE device codepage refresh
MODE device codepage /status
codepage prepare prepares the code pages for the device specified. You must prepare a
code page for a device before you can use the code page with that device.
codepage select specifies (selects) the code page to use with the specified device.
yyy specifies the number of the code page to prepare or select. Please see a DOS
manual for a list of valid code pages.
codepage refresh reinstates the prepared code pages if they are lost as the result of a
hardware problem or other error.
codepage displays the numbers of the code pages, if any, that are prepared or selected
for the specified device.
/status displays the numbers of the code pages, if any, that are prepared or selected
for the specified device.

Display - MODE [display-adapter] [shift] [t]
MODE CON[:] [COLS=c] [LINES=n]
display-adapter specifies a setting category. Valid values are:
40= Sets the display width to 40 characters per line for the color/graphics monitor adapter.
80 = Sets the display width to 80 characters per line for the color/graphics monitor adapter.
BW40 = Switches the active display adapter to the color/graphics monitor adapter, and sets
the display mode to black and white (disables color) with 40 characters per line.
BW80 = Same as above, but 80 characters per line.
CO40 = Switches the active display adapter to the color/graphics monitor adapter, enables
color, and sets the width to 40 characters per line.
CO80 = Same as above, but 80 characters per line.
MONO = Switches the active display adapter to the monochrome display adapter (which
always has a width of 80 characters per line).
shift specifies whether to shift CGA screen right or left. Valid values are l for left and r for right.
t enables you to align the screen by using a test pattern. DOS prompts you to indicate whether
the screen is aligned correctly.
CON refers to monitor.
COLS=c specifies the number of characters (columns) per line. Valid values are 40 and 80.
LINES=n specifies the number of lines that can be displayed on the screen. Valid values are
25, 43, and 50.

Typematic Rate - MODE CON[:] [RATE=r DELAY=d]
CON refers to the keyboard.
RATE=r specifies the rate at which a character is repeated on the screen when you
hold down a key. Valid values are 1 to 32. These values are equal to approximately 2
to 30 characters per second, respectively. The defaul value is either 20 or 21,
depending on keyboard type.
DELAY=d specifies the amount of time that must elaspe - after you press and hold
down a key before DOS starts to repeat this character. Valid values are 1, 2, 3, and 4.
These values represent .25, .5, .75, and 1 second respectivley. The default value is 2.
If you set the delay, you must also set the rate.

/? Displays abbreviated online help.

Search Keywords

DOS

Hint Category

DOS/Windows 3.x

Date Created

16-04-97

Last Updated

22-01-99

Revision Date

28-05-99

Brand

IBM Aptiva

Product Family

Aptiva, PS/1

Machine Type

2011, 2134, 2144, 2159, 2161, 2162, 2168, 2176, 2121, 2123, 2133, 2155

Model

C8E; C8H; C8X; C9E; C9S; C9X; 21R; 22R; 24R; 25R; 6R6; C21; C31; C32; 6R9; C31; F31; C6D; 8R6; 8R9; 9R4; 6R8; 7R1; 7R3; 7R6; 7R7; 7R9; 7RO; 8R1; 8R8; 9R2; 9R3; C23; C33; C35; C55; C56; C65; C66; C67; C6V; C6Y; C6Z; C73; C76; C77; F23; F33; F35; F67; 5R5; M91; 2R5; 2R7; 2R8; M30; M35; M50; 2R6; 4R7; 4R8; M40; M54; M58; 3R0; 3R8; M60; M70; 3R4; 3R6; 4R1; 4R9; M31; M51; M52; M63; 2R9; 3R1; 3R3; 3R5; 3R7; 3R9; 4R0; 4R2; 4R3; M41; M53; M55; M56; M57; M61; M62; M71; M72; 5R1; 6R3; A10; A12; A14; 5R2; 5R3; 5R6; 5R8; 5R9; 6R0; 6R4; 6R5; A15; A40; A44; A45; A50; A51; A52; A90; A92; A94; 1R2; 66P; 67P; 86P; OR8; 1R1; 1R3; 1R5; 22P; 24P; 25P; 27P; 29P; 63P; 67P; 82P; 83P; OR6; OR7; OR9; 1R0; 1R1; 26P; 62P; 2R0; P30; C01; C34; M01; NEA; T35; U35; A62; A82; A94; B82; C42; C92; G42; M82; S92; 081; 087; 131; 137; K37; N31; N81; 11E; 13T; 14C; 16E; 17A; 18A; 18T; 19C; 21C; 23C; 28A; 46M; 51D; D50; G11; G13; G43; G46; G46; G49; G49; G50; G53; M40; M40; M46; M46; P11; P13; P43; P50; P53; R04; R05; R06; R09; R38; R42; R43; R44; R84; R86; R87; RO3; S11; S13; S43; S45; S45; S47; S47; S48; S48; S50; S53; W11; W13; W42; W42; W43; W45; W45; W50; W53; 20E; 22T; 24C; 24M; 28V; 39E; 41T; 43C; 45V; 48E; 50T; 52C; 55V; 72E; 74T; 76C; 78C; 79C; 81A; 82E; 84T; 86C; 87C; CC1; D53; G14; G44; G52; G54; G72; G76; G78; G82; NM1; P14; P44; P57; P71; P74; P76; P78; P84; R14; R15; R16; R17; R18; R51; R52; R57; R58; R62; R63; R67; R71; R89; R93; R96; R97; S14; S44; S50; S54; S70; S75; S76; S78; S80; W14; W44; W48; W54; W67; W76; W77; W78; Z33; 28V; 31E; 33T; 37C; 38C; 51E; 54T; 56C; 57C; 88V; BB1; G57; G87; OR1; OR3; OR4; OR5; P89; R28; R29; R31; R74; R78; R82; R98; S55; S85; SR1; US1; W52; W82; S64; S66; S74; S7H; S78; 13R; 14R; 15R; 16R; 19R; 20R; S8C; S8H; S9H; S9C; 28R; 29R; 31R; S80; S90; 17R; 18R; 2R3; S15

TypeModel

2011C01

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes