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