[comp.lang.pascal] Text Device Drivers in TP

abcscnuk@Twg-S5.uucp (Naoto Kimura (ACM)) (10/08/90)

In article <5977@vice.ICO.TEK.COM> bobb@vice.ICO.TEK.COM (Bob Beauchaine) writes:
]In article <37915@ut-emx.uucp> seiler@walt.cc.utexas.edu (Carl Seiler) writes:
]>Has anyone had any luck with the Turbo Pascal unit which is listed on
]>page 225 in the 5.0 Reference guide and 365 of the 4.0 book, and
]>probably included in 5.5 somewhere as well.  It is an example of a
]>text file device driver for the IBM PC.  When run with the short
]>program which follows, my system stops.  
]>
]  I know the version listed in the Turbo 4.0 documentation had errors.
]  Look into your documentation for 4.0 (the disk readme files, etc.) for
]  a corrected version.  I don't know if the problems were corrected in
]  version 5.0, but the program as entered on page 365 of the 4.0 book
]  will not work; I also tried it. 
]
]
]  Bob Beauchaine
]  bobb@vice.ICO.TEK.COM

There is a BIG problem associated with the program as listed.  Mainly
it is because it uses the BIOS.

If you don't connect the handshake lines in a certain way (you have to
connect certain pins to each other -- I don't recall how), the computer
will wait forever for the lines to change in the way that it wants.

Second of all, you don't want to use the serial ports in polling mode --
which is the only way the BIOS handles the serial ports.  You'll lose
too many characters that way at higher baud rates.

If you want an example of a text file device driver, there is one in
the NKTOOLS.ZIP file on simtel20.  The file LOGGER.PAS file is the
source to a text file device driver that allows you to log all
I/O going throught the standard input and output files to a file.

                //-n-\\			 Naoto Kimura
        _____---=======---_____		 (abcscnuk@csuna.csun.edu)
    ====____\   /.. ..\   /____====
  //         ---\__O__/---         \\	Enterprise... Surrender or we'll
  \_\                             /_/	send back your *&^$% tribbles !!