home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / PARADIS1 / PORTS.PAS < prev    next >
Pascal/Delphi Source File  |  1991-01-27  |  1KB  |  46 lines

  1. (10106) Sat 25 Jan 92  9:30
  2. By: Kelly Small
  3. To: Keith Dombrowski
  4. Re: Baud rates
  5. St:
  6. ---------------------------------------------------------------------------
  7. @EID:6A0E 835A0000
  8. KD> I've got a question, how can you tell what the baud rate is on a currently
  9. KD> open and operating serial port? There must be a way, as door programs are
  10. KD> forced to work with a already open port.. Anybody have any ideas?
  11.  
  12. Well the door program simply uses a comm port as is, no need to
  13. reprogram the baudrate, so it doesn't care what it's set to.
  14. Also alot of the drop files that the bbs write before door
  15. operation have a line that states the baudrate in use.
  16. IF you want to poll the hardware directly you can do the
  17. following:
  18.  
  19. Const
  20.   PortAddress = $3F8; {com1 = $3F8 com2=$2F8}
  21. Var
  22.   divisor : Byte;
  23. Begin
  24. port[PortAddress+3] := port[PortAddress+3] or $80;
  25. divisor := port[PortAddress];
  26. port[PortAddress+3] := port[PortAddress+3] And $7F;
  27. case divisor of
  28.   $C  : writeln('9600');
  29.   $18 : writeln('4800');
  30.   $30 : writeln('2400');
  31.   $60 : writeln('1200');
  32.   $80 : writeln('300');
  33.   end;
  34. end.
  35.                                           l /
  36.                                           l< E L L Y
  37.                                           l \
  38.  
  39.  * JABBER v1.1B4 #b031 * If at first you don't succeed, then skydiving isn't fo
  40.  
  41.  
  42. --- WM v2.00/91-0113
  43.  * Origin: Exterminator BBS (1:114/33)
  44.  
  45. @PATH: 114/33 77 5 396/1 170/400 512/0 1007 
  46.