COM (Serial) Port Access in Borland Pascal 
Author Message
 COM (Serial) Port Access in Borland Pascal

I can not seem to find in any of the documentation how to
access com ports in Pascal.  If someone could point me to
a reference in the Borland Pascal 7 manuals, or in
Mastering Turbo Pascal 6 by Swan, I would very much
appreciate it.

P.S. I am attempting to write a DOS program for accessing
     Alpha-numeric pagers.  If successful I will be posting
     the program as shareware.  

Thanks for any help!



Wed, 18 Jun 1902 08:00:00 GMT  
 COM (Serial) Port Access in Borland Pascal

Quote:

>I can not seem to find in any of the documentation how to
>access com ports in Pascal.  If someone could point me to
>a reference in the Borland Pascal 7 manuals, or in
>Mastering Turbo Pascal 6 by Swan, I would very much
>appreciate it.
>P.S. I am attempting to write a DOS program for accessing
>     Alpha-numeric pagers.  If successful I will be posting
>     the program as shareware.  
>Thanks for any help!

There is nothing about it in the Borland manual and probably nothing
in the Swan book either. The Comm ports are hardware devices and the
language does not include support for them.

You can use the IN and OUT statements to access the port registers and
can either install an interrupt handler to do asynchronous
communications with the port or you can read and write the registers
directly from your program. Note that I am assuming that you are
writing this as a DOS program and not a Windows program (where things
are very different.)

To describe all of the ins and outs of serial port programming in a
message here is too much. Look around the net and  you will find
support code for almost anything you want to do. Check SimTel and
others for what you want. There are also commercial packages.

I can't send you any of the code that I've done (or modified) since I
don't own it. Sorry about that.

Dick M.



Wed, 18 Jun 1902 08:00:00 GMT  
 COM (Serial) Port Access in Borland Pascal

Quote:


>Subject: COM (Serial) Port Access in Borland Pascal
>Date: 19 Aug 1995 05:45:38 GMT
>I can not seem to find in any of the documentation how to
>access com ports in Pascal.  If someone could point me to
>a reference in the Borland Pascal 7 manuals, or in
>Mastering Turbo Pascal 6 by Swan, I would very much
>appreciate it.
>P.S. I am attempting to write a DOS program for accessing
>     Alpha-numeric pagers.  If successful I will be posting
>     the program as shareware.  
>Thanks for any help!

See item 6 in Timo Salmi's FAQ.  Willem van Schaik's unit gave me all I needed.

Hope this helps,
                           John.



Wed, 18 Jun 1902 08:00:00 GMT  
 COM (Serial) Port Access in Borland Pascal

Quote:

>I can not seem to find in any of the documentation how to
>access com ports in Pascal.  If someone could point me to
>a reference in the Borland Pascal 7 manuals, or in
>Mastering Turbo Pascal 6 by Swan, I would very much
>appreciate it.

If what you want to send to the serial port is simple (I assume
it's all dialing commands for your modem), you can set up and
use a COM port very simply. Just assign it as a normal text file,
like this:

Assign(F, COM1);

then Rewrite it, and writeln whatever command you want to
send to the modem. You'll have a lot of fun figuring out
when the phone is answered and the pager beeps, by the
way. Another method might be better for this particular
application. In general, though, for low speed communications
which don't require a large asynchonous buffer, treating the
COM port as a file works well.

Alan


ASM International
Materials Park, OH  44073
My opinions, not ASM's.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. serial com in borland pascal (windows DLL)

2. Simplying serial com port selection

3. How can I disable all serial ports (COM[s])

4. FW: How can I disable all serial ports (COM[s])

5. CW serial port access - HELP!

6. Access to COM-Port

7. Accessing COM ports under Win NT with BP 7.0

8. Accessing com-port

9. Com Port Access

10. Accessing COM port

11. COM port access

12. Com Port Access

 

 
Powered by phpBB® Forum Software