home *** CD-ROM | disk | FTP | other *** search
- {********** io.inc **********}
-
-
- procedure Modem_Out_Line(Line: data2); forward;
-
- Procedure Init_Modem;
- {Initialize modem port}
- begin
- ch_init;
- mdinit;
- {set default values}
- duplex:= true;
- hiBaud:= true;
- capture:= false;
- filter:= true;
- delay_set:= true;
- command_file:= false;
- do_command:= false;
- log_on:= true;
- autolog:= false;
- slowbaud:= false;
- host_mode:= false;
- phone_buffer:= '';
- wait:= 3;
- end; {Init_Modem}
-
- Function Carrier : boolean;
- {Return TRUE if carrier present}
- begin
- Carrier:= ch_carck;
- end; {Carrier}
-
- Function Modem_In_Ready : boolean;
- {Return TRUE if modem character ready}
- begin
- Modem_In_Ready:= ch_inprdy;
- end; {Modem_In_Status}
-
- Function GetMod : char;
- {Read the modem input port, assume char ready}
- begin
- GetMod:= chr(ch_inp);
- end; {GetMod}
-
- Function Modem_In : char;
- {Read the modem input port}
- begin
- repeat until modem_in_ready;
- Modem_In:= GetMod;
- end; {Modem_In}
-
- Procedure Modem_Out(ch: char);
- {Output a character to the modem}
-
- begin
- ch_out(ord(ch));
- end; {Modem_Out}
-
- procedure sinp(var ch: char);
- {direct I/O from keyboard}
- {may use keypressed for status}
- begin
- ch:= chr(bdos(6,$FF));
- end; {sinp}
-
- procedure resetCRT;
- {clear screen and reset CRT}
- begin
- write(ESC, 'z'); {for Heath H-19}
- { attention; }
- delay(100);
- end; {resetCRT}
-
- Procedure Set_LoBaud; {300 baud}
- begin
- if HiBaud then begin
- HiBaud:= false;
- ch_set(300);
- end;
- end; {Set_LoBaud}
-
- Procedure Set_HiBaud; {1200 baud}
- begin
- if not HiBaud then begin
- HiBaud:= true;
- slowbaud:= false;
- ch_set(1200);
- end;
- end; {Set_HiBaud}
-
- procedure timeout;
- {turn off disk drive motor}
- begin
- port[$34]:= 0;
- end; {timeout}
-
- procedure timein;
- {turn disk drive motor back on}
- begin
- port[$34]:= $21;
- end; {timein}
-
-
- procedure attention; {previously referenced}
- {let the modem catch its breath}
- begin
- ch_out(ord(CR));
- end; {attention}
-
- Procedure Go_Onhook;
- begin
- mdhangup;
- end; {Go_Onhook}
-
- Procedure go_Dial(line: data);
- begin
- Modem_Out_Line('ATDP '+ line);
- end; {go_Dial}