Path: utzoo!attcan!uunet!aplcen!haven!adm!news From: CDCKAB%EMUVM1.BITNET@cunyvm.cuny.edu ( Karl Brendel) Newsgroups: comp.lang.pascal Subject: (R)Text Device Drivers in TP Message-ID: <24696@adm.BRL.MIL> Date: 5 Oct 90 12:50:31 GMT Sender: news@adm.BRL.MIL Lines: 42 In article <37915@ut-emx.uucp>, 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 have not used the routine and don't care to type it in and try it, but perhaps my remarks will not be without value: The unit in question is full of opportunities for mistyped instructions to compile fine but cause problems later: Other than checking for syntax, the compiler does nothing much to validate inline code, so first triple-check the code you typed against the source _and_ the read.me files (in the event of a manual error which was corrected there). Given the point at which the error occurs, tho, I'm inclined to suspect that the real problem is either that the com port has not been initialized or else there is a hardware conflict. Asynch communication was perhaps not a good choice for a TFDD example because of the additional issues raised. Note that the example program uses this unit to assign a TFDD to COM1 with specific parameters. If another device is already using COM1 (or the associated IRQ) or if COM1 is not set to the same parameters, you can expect some problem with this code. Try the example program on a port known to be free of conflicts, and use the DOS MODE command to initialize the port to the same parameters used in the example. If these remarks don't help, then I leave you to the advice of others, because we have nearly exhausted my knowledge of asynch programming. :) +-------------------------------------------------------------------------+ | Karl Brendel Centers for Disease Control | | CDCKAB@EMUVM1.BITNET Epidemiology Program Office | | InterLink/RIME: KARL BRENDEL Atlanta, GA, USA | | GEnie: K.BRENDEL phone 404/639-2709 | | fts 236-2709 | | Home of Epi Info 5.0 | +-------------------------------------------------------------------------+