home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / BBS / C128PICS.ARC / C1650.MDM < prev    next >
Text File  |  1991-08-11  |  2KB  |  55 lines

  1. { ROS.MDM - Remote Operating System Modem Dependent Routines }
  2.  
  3. { File:        C1650.MDM
  4.   Description: This driver is made to work with the C-128 using the 1650/1660
  5.                or (true) compatable. Note: Some modems have no RING detecter.
  6.                This driver WILL NOT WORK if not present. 450 baud is also
  7.                supported.
  8.   Date:        7/7/89
  9.   Author:      Peter B. Carter
  10. }
  11.  
  12. procedure mdhangup;
  13. { Hangup modem }
  14.   begin
  15.     ch_on
  16.   end;
  17.  
  18. procedure mdbusy;
  19. { Take modem off hook to present a busy signal to incoming callers }
  20.   begin
  21.     ch_off                                   { Off hook not available }
  22.   end;
  23.  
  24. function mdring: boolean;
  25. { Determine if the phone is ringing }
  26.   begin
  27.     mdring := ch_ring;
  28.   end;
  29.  
  30. procedure mdans;
  31. { Detect and set system to rate at which modem answered phone }
  32.   var
  33.     i: integer;
  34.   begin
  35.     i := 450;
  36.     repeat
  37.       if i = 300
  38.         then i := 450
  39.         else i := 300;
  40.       ch_set(i);
  41.       repeat
  42.       until (not ch_carck) or ch_inprdy
  43.     until (not ch_carck) or (chr(ch_inp) in [CR, LF, ETX]);
  44.     while ch_inprdy do                      { Clear any junk }
  45.       i := ch_inp
  46.   end;
  47.  
  48. procedure mdinit;
  49. { Ensure the modem is hung up, initialized, and ready to wait for a ring. }
  50.   begin
  51.     ch_init;                                { Initialize the remote channel }
  52.     ch_on
  53.   end;
  54.  
  55.