Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>com_setup()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
COM_SETUP()
   Sets up a COM port for use by a plotter.

   Syntax
         COM_SETUP(nCOMPort,nBaud,nParity,nDataBits,nStop)

   Arguments
         nCOMPort     COM port to use for output.
         nBaud        Baud rate. (300 to 9600 baud)
         nParity      Parity. (0 - none, 1 - odd, 2 - even)
         nDataBits    Data bits. (7 or 8)
         nStop        Stop bits. (1 or 2)

   Returns
         None

   Description
         COM_SETUP() sets up the RS-232 port to match plotter setup. The
         FLIPPER interface to the HP plotter is located in a Clipper file
         named HP_CLIP.PRG (the source code is on your disk). The functions
         in this file are used to send HPGL produced by FLIPPER to the
         plotter through the RS-232 serial port or to a file. These routines
         are in the library. However, they can be modified and replaced in
         the library with the Microsoft LIB program, or included as an OBJ
         file when linking.

         The Clipper RS-232 Serial Printer Routine (SET PRINTER TO COM) was
         used to send the HPGL instructions to the plotter.

         Clipper 5 specific:
            When the plotter's buffer gets full, it sends an error to the
            error handler and exits to DOS. I added an error block that trys
            over and over again.

         Summer 87 specific:
            When the plotter's buffer gets full, it sends a signal to stop the
            data from being sent. When this happens, the ERRORSYS.PRG file
            will print on the screen that the printer has stopped. I made a
            small modification to that file so that it will not notice when
            the plotter instructions are being sent. You will find the new
            version of ERRORSYS.PRG in your LIBRARY directory. It must be
            included on the link line at the time you link your application.
            ERRORSYS.PRG will not work if included in the library.

         An interrupt-driven communications driver has been added to allow you
         to return information from the plotter. The ICOM_XXX functions add
         slightly more overhead but give much more control over the plotter.
         If you use the ICOM_XXX functions, you do not need to call
         COM_SETUP().

See Also: ICOM_CLOSE() ICOM_OPEN()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson