Microsoft KB Archive/24404

Function of p Switch in the DOS MODE Command

PSS ID Number: Q24404 Article last modified on 11-02-1994

1.x 2.x 3.x 4.00 5.00

MS-DOS

Question:

What does the p switch do in the following DOS MODE command:

MODE Com1:9600,n,8,1,p

Response:

The DOS MODE command establishes how you can talk to the COM port. When you communicate to a serial printer in Word, you use the BIOS serial interface calls. However, you must do your own timeouts.

The “p” specifies that when using this COM port, continuous retrying should be used if timeout errors occur. This option also causes the mode to remain resident in memory.

The following is a brief definition of the properties defined in the above MODE command:

Baud rate: 9600 : The character per second (cps) sent/received

Parity : n : The error checking used

Databits : 8 : The number of electrical signals that equal one character

Stopbits : 1 : The number of electrical signals that mark the end of a character

Perpetual Retry : p : The switch that tells DOS to continue trying to establish communication with a device

In OS/2’s protected mode, the parameter “to=on” is used to set perpetual retry instead of “p”, as in the following example:

MODE com1:96,n,8,1,to=on

See your DOS or OS/2 reference manual for more information on the MODE command.

KBCategory: kbother KBSubcategory: Additional reference words: 5.00

=
================================================================ Copyright Microsoft Corporation 1994.