home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / tel / dial.ba < prev    next >
Text File  |  2006-10-19  |  2KB  |  48 lines

  1. 0 REM Dial.100 Automatic Phone Dialer
  2. 100 CLEAR500:   REM Clear string space
  3. 110 DEFINTA-Z:  REM Default to integers
  4. 120 DIM ML(3):  REM Holds M/L code
  5. 130 CLS:PRINT"Phone Dialer":PRINT"Written by Dick Cassidy & larry gensch"
  6. 135 PRINT"All commercial rights reserved":PRINT
  7. 140 PM$="7I1E"+CHR$(0):REM RS-232 Parameters
  8. 145 PRINT"RS-232 Setting: M"PM$:PRINT
  9. 150 LINEINPUT"Enter Phone Number: ";PH$
  10. 155 IF LEN(PH$)=0 THEN MENU
  11. 160 PH$=PH$+CHR$(0):REM Delimit phone #
  12. 165 V=VARPTR(PM$):REM   Point to UART Setting
  13. 170 AD!=PEEK(V+1)+PEEK(V+2)*256
  14. 180 CALL 6118,0,AD!:REM Set UART Parms
  15. 190 FOR N=0 TO -1 STEP -1:REM Loop to load M/L Routine
  16. 200 READ A,B:REM Get 2 bytes of routine
  17. 210 A!=A+B*256:REM Convert to LSB,MSB
  18. 220 ML(X)=A!+65536*(A!>32767):X=X+1
  19. 230 N=(B=0):NEXT:REM Loop till routine loaded
  20. 240 V=VARPTR(PH$):REM   Point to Phone # string
  21. 250 AD!=PEEK(V+1)+PEEK(V+2)*256:REM AD! Points to phone #
  22. 255 PRINT:PRINT"Dialing...";
  23. 256 CALL 21200:REM Disconnect line
  24. 260 CALL 21293,0,AD!:REM Dial phone
  25. 270 CALL 21172:REM      Keep off hook
  26. 300 X=0:CD=0:  REM Init carrier status
  27. 310 FOR N=1 TO 1000:REM Suitable delay
  28. 320 V=VARPTR(ML(0)):REM Point to M/L routine
  29. 325 Y=VARPTR(X):REM Point to X
  30. 330 CALL V,0,Y:REM  Get carrier status
  31. 340 CD=(X=0):REM    Set CD flag
  32. 350 IF CD THEN N=1000:REM Exit early if carrier
  33. 360 NEXT:REM Loop till carrier or time out
  34. 370 PRINT:IF CD THEN 460:REM Skip if carrier
  35. 380 PRINT"No carrier":REM Display msg
  36. 390 CALL 21179:REM Disconnect
  37. 400 PRINT"Try again? ";
  38. 410 A=INSTR("YyNn",INPUT$(1)):REM Get input
  39. 420 ON A+1 GOTO 430,440,440,450,450
  40. 430 BEEP:GOTO410:REM Bad input
  41. 440 PRINT"Y":RUN:       REM "Y" Entered
  42. 450 PRINT"N":MENU:      REM "N" Entered
  43. 460 REM --- Connected ---
  44. 470 PRINT"Connected":PRINT
  45. 480 PRINT"Entering TERMINAL Mode..."
  46. 490 CALL 21589: REM Enter TERM Pgm
  47. 500 DATA 205,239,110,119,201,0:REM M/L ?Routine
  48.