home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5375 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  2.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ames!sun-barr!west.West.Sun.COM!cronkite.Central.Sun.COM!texsun!exucom.exu.ericsson.se!news
  2. From: exuptr@exu.ericsson.se (exuptr@exu.ericsson.se)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: RS232 ports and Modems
  5. Message-ID: <exuptr.546.716425053@exu.ericsson.se>
  6. Date: 13 Sep 92 22:57:33 GMT
  7. References: <BuJ69H.9on@mentor.cc.purdue.edu>
  8. Sender: news@exu.ericsson.se
  9. Organization: Ericsson Network Systems, Inc.
  10. Lines: 34
  11. Nntp-Posting-Host: pc254167.exu.ericsson.se
  12.  
  13. In article <BuJ69H.9on@mentor.cc.purdue.edu> kilgore@sage.cc.purdue.edu (Michael Kilgore) writes:
  14. >From: kilgore@sage.cc.purdue.edu (Michael Kilgore)
  15. >Subject: RS232 ports and Modems
  16. >Date: 13 Sep 92 19:03:17 GMT
  17.  
  18. >Being that this maybe a FAQ, but since I haven't seen a FAQ for this newsgroup,
  19. >I am going to ask anyways.  I have written some functions that write, 
  20. >initialize, and get the status of RS232 ports or a modem using registers and 
  21. >calling the bios interrupt $14.  My problem is: I can't figure out how to read
  22. >from the port.  I tried using the same method as I did with the other functions,
  23. >Is there someway I can read from these ports or am I out of luck?  Also, is
  24. >there an easier way to read and write to these ports?
  25.  
  26. >Any help would be appreciated.
  27.  
  28. >PS:  BTW, I am using Microsoft's QuickPascal which I think is supposed to be
  29. >compatible with Turbo Pascal.
  30.  
  31.  
  32. TP accesses ports as an array port[<port number>].  You can do the following
  33. things:
  34.  
  35.   port[comm1] := $3e;
  36.   testval := port[comm1];
  37.   write(port[comm1]);  { silly thing to do, but... }
  38.  
  39. I don't know if this works in QuickPascal or not.
  40.  ----------------------------------------------------------------------------
  41.     "This must be Thursday.  I never could get the hang of Thursdays"
  42.                                                        - Douglas Adams
  43.   - Patrick Taylor                                       (Arthur Dent)
  44.     Ericsson Network Systems
  45.     exuptr@exu.ericsson.se                       "Don't let the .se fool you"
  46.     or exuptr@ZGNews.Lonestar.Org, exu.exuptr@memo.ericsson.se
  47.