home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
comm
/
callwait.zip
/
CALLWAIT.BAS
next >
Wrap
BASIC Source File
|
1986-12-03
|
2KB
|
43 lines
10 'This short program may solve the problem of call waiting interrupting
20 'a communications session. Just run this before your communcations
30 'program. It remains in effect until you reset your Hayes compatible
40 'modem. If your communication program resets the modem as it starts,
50 'you may have to start your communication program first and then
60 'exit to DOS to run this program before dialing a number. You may
70 'be able to call the phone company to get a procedure to temporarily
80 'disable call waiting. This service is available in some areas.
90 '
100 ' Modified 12/3/86 by Mike Todd, SysOp, IBMSIG, The Source
110 '
120 CLS:LOCATE 8,15
130 PRINT CHR$(7);"Setting Hayes compatible modem for Call Waiting"
140 OUT 1020,4:GOSUB 220:OUT 1020,3:GOSUB 220
150 OPEN "COM1:1200,N,8,1,RS,CD,DS" AS #1:GOSUB 220
160 MSG$="ATS10=200"+CHR$(13):GOSUB 210:GOSUB 220
170 CLOSE
180 LOCATE 10,1:PRINT SPACE$(80)
190 LOCATE 10,22:PRINT CHR$(7);"Now to your communication program!"
200 SYSTEM
210 FOR X=1 TO LEN(MSG$):PRINT #1,MID$(MSG$,X,1);:NEXT
220 X!=TIMER:Y!=TIMER:WHILE Y!-X!<2:Y!=TIMER:WEND
230 RETURN
240 '
250 ' Line 35: Port 1020 (3FC) is the MCR (Modem Control Register). The
260 ' bits are described on page 6-9 of the Hayes Smartmodem
270 ' 1200 manual. First CW sends a 4, which enables the
280 ' interrupt line drivers, and allows the UART to interrupt
290 ' the controller. If there are any problems with the serial
300 ' port, this command should generate an error message.
310 ' OUT 1020,3 will reset the modem and is equivalent to
320 ' power off/power on. This must be held for at least 50 ms.
330 ' This is done using the timing loop at line 110 which will
340 ' wait at least an entire second before continuing.
350 '
360 ' Line 40: Open the COM1 port for 1200 baud, no parity and 8 bit words
370 ' using buffer #1.
380 '
390 ' Line 50: Sends a command to the modem. The AT is the ATtention code,
400 ' which must precede all modem commands. The S10=200 is
410 ' described on page 6-7 of the manual. It allows the carrier
420 ' signal to momentarily disappear adjustable in 1/10 second.