MODE
Configures system devices.
Syntax for serial port:
MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [TO=ON | TO=OFF] [XON=ON | XON=OFF] [ODSR=ON | ODSR=OFF] [OCTS=ON | OCTS=OFF] [DTR=ON | DTR=OFF | DTR=HS] [RTS=ON | RTS=OFF | RTS=HS | RTS=TG] [IDSR=ON | IDSR=OFF]
Where:
COMm- Specifies the device you want to configure, wheremis the number associated with the device.BAUD=b- Specifies the baud (number), which is the transmission speed in bits per second. Some valid values forbare:11- 110 bauds.15- 150 bauds.30- 300 bauds.60- 600 bauds.12- 1200 bauds.24- 2400 bauds.48- 4800 bauds.96- 9600 bauds.19- 19200 bauds.
PARITY=p- Specifies how to use the parity bit for error detection. Valid values forpare:N- No parity bit (none).E- Even (default).O- Odd.M- Set to 1 (mark parity).S- Set to 0 (space parity).
DATA=d- Specifies the data bits in a character. Valid values fordare 5 through 8. The default is 7 (ASCII). Only some devices support values lower than 7.STOP=s- Specifies the stop bits of a character. Valid values forsare1,1.5, and2. The default value depends on the baud: if the baud is 110, then the default value is 2, otherwise it is 1.TO- Specifies that the indefinite timeout is set toONorOFF. If enabled, this option waits indefinitely for a response. By default, this option is disabled.XON- Specifies whether the XON/XOFF protocol is set toONorOFF.ODSR- Specifies that the output Data Set Ready (DSR) synchronization for handshaking is set toONorOFF.OCTS- Specifies that output CTS (Clear to Send) synchronization for handshaking is set toONorOFF.DTR- Specifies that the Data Terminal Ready (DTR) circuit is set toON,OFF, orHS. Enabling this option will return a continuous signal if the device is ready to exchange data.HSenables handshake signals.RTS- Specifies that the Request to Send (RTS) circuit is set toON,OFF,HS, orTG. Enabling this option will return a continuous signal if the device is ready to exchange data.HSenables the handshake signals.TGallows you to toggle the ready state.IDSR- Specifies that the input DSR sensitivity for handshaking is set toONorOFF.
Without specifying additional parameters, displays the status of the COMm device.
Examples:
1. Display the status of the device COM1:
mode com1:
2. Change the baud rate to 600, the data bit to 6, the stop bit to 2, enable the timeout and disable the DTR circuit of the COM1 device:
mode com1: baud=60 data=6 stop=2 to=on dtr=off
Syntax for device status:
MODE [device] [/STATUS]
Where:
device- Specifies the device./STATUS- Displays the status of the specified device (optional).
Even without the /STATUS parameter, it displays the status of the specified device.
Example: Display the status of the CON device:
mode con /status
or:
mode con
Syntax for print redirection:
MODE LPTn[:]=COMm[:]
Where:
LPTn- Specifies the LPT device (identified by annumber).COMm- Specifies the COM device (identified with anmnumber), that is, the printer device to which to redirect the parallel port.
Example: Redirect the LPT1 device to the COM1 device:
mode lpt1:=com1:
Syntax for code page selection (see CHCPCHCP):
MODE CON[:] CP SELECT=xxx
Where:
xxx- Specifies the code page to activate.
Example: Activate code table for Turkish:
mode con: cp select=857
Syntax for code page status:
MODE CON[:] CP [/STATUS]
Where:
/STATUS- Displays the status of the active code page.
Even without the /STATUS parameter, displays the status of the active code page.
Example: Display the status of the active code table:
mode con: cp /status
or:
mode con: cp
Syntax for view mode:
MODE CON[:] [COLS=c] [LINES=n]
Where:
- COLS=c - Specifies the number of columns (default: 80). Other standard values are 40 and 135.
- LINES=n - Specifies the number of rows (default: 25). Other standard value is 50.
Example: Change the width of the current command prompt to 50 rows and 40 columns:
mode con: cols=40 lines=50
Syntax for keyboard settings:
MODE CON[:] [RATE=r DELAY=d]
Where:
RATE=r- Specifies the character repetition rate (in number of characters per second) from 1 to 32. Default values are 20 or 21.DELAY=d- Specifies the delay of the repeat from the first to the second character (in quarters of a second) from 1 to 4. The default value is 2 (half a second).
Example: Change the repeat rate to 32 characters per second and the delay to 3 quarters of a second:
mode con: rate=32 delay=3
Comments