| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Serial I/O {6 of 10} |
end;
Procedure Getline (Var D_bits : byte;
Var Parity : byte;
Var S_bits : byte;
Var brk : byte);
VAR
B_rec:array[1..4] of byte;
tptr:pointer;
status:byte;
retlength:longint;
BEGIN
tptr := {at}b_rec;
DosDevIOCtl(Fport,1,$62,tptr,
sizeof(b_rec),retlength,tptr,sizeof(b_rec),retlength);
D_bits := b_rec[1];
Parity := b_rec[2];
S_bits := b_rec[3];
brk := b_rec[4];
end;
Procedure GetDCB (Var dest:DCBREC);
VAR
tptr:pointer;
retlength:longint;
BEGIN
tptr := {at}dest;
DosDevIOCtl(Fport,1,$73,tptr,
sizeof(dest),retlength,tptr,sizeof(dest),retlength);
end;
Procedure SetDCB (Var Src:DCBREC);
VAR
tptr:pointer;
retlength:longint;
BEGIN
tptr := {at}Src;
DosDevIOCtl(Fport,1,$53,tptr,
sizeof(Src),retlength,tptr,sizeof(Src),retlength);
end;
Function GetEbaud(which:byte):longint;
{which 1 = current baud rate, 2 = minimum baud rate, 3 = maximum baud rate}
VAR
B_rec:ebrec;
tptr:pointer;
status:byte;
retlength:longint;
BEGIN
tptr := {at}b_rec;
DosDevIOCtl(Fport,1,$63,tptr,
sizeof(b_rec),retlength,tptr,sizeof(b_rec),retlength);
case which of
1:GetEbaud := b_rec.c_baud;
2:GetEbaud := b_rec.Mn_baud;
3:GetEbaud := b_rec.Mx_baud;
end;
end;
Function DTRActive : Boolean;
VAR
tptr:pointer;
status:byte;
retlength:longint;
BEGIN
tptr := nil;
DosDevIOCtl(Fport,1,$66,tptr,1,retlength,{at}status,1,retlength);
DTRActive := status and 1 = 1;
end;
Function RTSActive : Boolean;
VAR
tptr:pointer;
status:byte;
retlength:longint;
BEGIN
tptr := nil;
DosDevIOCtl(Fport,1,$66,tptr,1,retlength,{at}status,1,retlength);
RTSActive := status and 2 = 2;
end;
Function Pending: Boolean;
VAR
tptr:pointer;
status:byte;
retlength:longint;
BEGIN
rx_free;
tptr := nil;
DosDevIOCtl(Fport,1,$65,tptr,1,retlength,{at}status,1,retlength);
Pending := ((status and 8 = 8) or (BufferRec.Bytesin0));
end;
Procedure HandleChar(tchar:char);
BEGIN
write(tchar);
end;
___ Blue Wave/QWK v2.12
--- Renegade v10-05 Exp
* Origin: Scrawled From the Tomb..(416-255-2164) (1:250/346)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 515 628 704 713/888 800/1 7877/2809 @PATH: 250/346 426 702 3615/50 396/1 270/101 105/103 42 712/515 711/808 @PATH: 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.