Do you receive the Programmer's Heaven newsletter? If not, why not subscribe?

View \MODEM.PAS

Full Source Code To Vision Bbs System

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


Unit Modem;

Interface

{ Modem Interface for FOSSIL.PAS, Fossil Drivers }
{ Compatible with X.00 and BNU! -- TESTED with   }
{ Written by: The Elemental dude }

Uses Fossil, Configrt;

Procedure SetParam (ComPort:Integer; BaudRate:LongInt; Parity:Boolean);
Procedure ClosePort;
Function NumChars:Integer;
Procedure DontAnswer;
Procedure DoAnswer;


 {* Variables will give the Address of the REAL Procedure }
 {* Having these to call it is SLOWER! }

Var SendChar   : Procedure (K:Char);
    GetChar    : Function:Char;
    Carrier    : Function:Boolean;
    Hangup     : Procedure;

Implementation

Procedure SetParam (ComPort:Integer; BaudRate:LongInt; Parity:Boolean);
Var K:Char;
Begin
  Case Parity of
   TRUE :K:='E';
   FALSE:K:='N';
  End;
  Set_FOSSIL (ComPort,BaudRate,8,K,1);
End;

Procedure ClosePort;
Begin
  Close_FOSSIL (Configset.UseCo);
End;

Function NumChars:Integer;
Begin
  NumChars:=Ord(FOSSIL_Chars);
End;

Procedure DontAnswer;
Begin
  FOSSIL_Dtr (ConfigSet.UseCo,False);
End;

Procedure DoAnswer;
Begin
  FOSSIL_Dtr (ConfigSet.UseCo,True);
End;

Begin
  SendChar:=FOSSIL.SendChar;
  GetChar:=FOSSIL.GetChar;
  Carrier:=FOSSIL.FOSSIL_Carrier;
  Hangup:=FOSSIL.Hangup;
End.
 
corner
© 1996-2008. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin.
bootstrapLabs Logo A bootstrapLabs project.