Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought


     MODE(DOS)         UNIX System V          MODE(DOS)



     Name
          mode - sets operation modes for devices


     Syntax
          Parallel printer mode:

               mode LPTn[:][chars][,[lines][,P]]

          Asynchronous communications mode:

          mode COMm[:] baud [,parity [,databits [,stopbits [,P]]]]

          Redirecting parallel printer output:

          mode -LPTn[:]=COMm[:]

          Display modes:

          mode display

          mode [display],shift[,T]


     Description
          For parallel printer mode:

          n     Specifies the printer number: 1, 2, or 3.

          chars Specifies characters per line: 80 or 132.

          lines Specifies vertical spacing, lines per inch: 6 or 8.

          P     Specifies that mode tries continuously to send  output
                to the printer if a time-out error occurs.

                This option causes part of mode to remain resident in
                memory.

          The default settings are LPT1, 80 characters per line, and 6
          lines per inch.

          You  can  break  out  of  a  time-out   loop   by   pressing
          <CTL><Break>.

          For asynchronous communications modes:

          m       Specifies the asynchronous communications (COM) port
                  number: 1 or 2.

          baud    Specifies the transmission rate: 110, 150, 300, 600,
                  1200,  2400,  4800, or 9600.  You need to specify at
                  least the first two digits of each number.

          parity  Specifies the  parity:  N  (none),  O  (odd),  or  E
                  (even).

          databits
                  Specifies the number of databits: 7 or 8.

          stopbits
                  Specifies the number of stop bits: 1 or 2.

          P       Specifies that mode is using  the  COM  port  for  a
                  serial printer and continuously retrying if time-out
                  errors occur.

                  This option causes part of mode to remain resident
                  in memory.

          The default settings are COM1, even parity, and 7 databits.

          If baud is 110, then the default number of stop bits  is  2;
          otherwise, the default is 1 stop bit.

          For redirecting parallel printer output (to an  asynchronous
          communications port):

          n       Specifies the parallel printer port number: 1, 2, or
                  3.

          m       Specifies  the  asynchronous   communications   port
                  number: 1 or 2.

          Redirection causes  part  of  the  mode  program  to  remain
          resident in memory.

          You must use mode to specify the asynchronous communications
          mode before you can redirect parallel printer output to it.

          For setting display modes:

          display Specifies one of the following values: 40, 80, BW40,
                  BW80, CO40, CO80, or MONO.

                  40 indicates 40 characters per line.

                  80 indicates 80 characters per line.

                  BW and CO refer to a color graphics monitor  adapter
                  with color disabled (BW) or enabled (CO).

                  MONO specifies a monochrome display adapter  with  a
                  constant display width of 80 characters per line.

          shift   Specifies the direction that you want to  shift  the
                  display: R (right) or L (left).

                  This option causes part of mode to  remain  resident
                  in memory.

          T       Specifies a test pattern for aligning  the  display.
                  If you specify T, mode asks if the screen is aligned
                  properly. If you type n, mode repeats the shift  and
                  asks  if the screen is aligned properly. The command
                  ends when you type y.


     Examples
          If you want your computer to send its printer  output  to  a
          serial  printer, you need to use mode twice. The first mode
          command specifies the asynchronous communications modes, and
          the  second  mode  command redirects the computer's parallel
          printer  output  to  the  asynchronous  communications  port
          specified in the first mode command.

          For example, if your serial printer operates  at  4800  baud
          with  even  parity,  and if it is connected to the COM1 port
          (the first serial connection on your  computer),  you  would
          enter the following:

               mode com1:48,e,,,p
               mode lpt1:=com1:

          If you redirect parallel printer output from LPT1  to  COM1,
          and  then  decide  that you want to print a file using LPT1,
          you can simply enter the following command:

               mode lpt1:

          This disables any redirection of LPT1.

          Suppose you want  your  computer  to  print  on  a  parallel
          printer that is connected to your computer's second parallel
          printer  port  (LPT2).   If  you  want  to  print  with   80
          characters  per  line  and  8 characters per inch, you would
          enter one of the following commands:

               mode lpt2: 80,8

          or

               mode lpt2:,8

          If you want your computer to keep trying  to  print  a  file
          until  your  printer  is  ready to print it, enter this next
          command:

               mode lpt2:80,8,P

          To stop retrying to print, you  can  press  <CTL><Break>  or
          enter mode without the P option.


     Notes
          If you print files every time you start MS-DOS, you may want
          to  include  mode  commands  in your autoexec.bat file.  See
          Chapter 4, ``Batch Processing,'' for more information on the
          autoexec.bat file.

          mode is an external command.


     MODE(DOS)            (printed 8/16/89)             MODE(DOS)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026