home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: OtherApp / OtherApp.zip / am4pmsrc.zip / amc / init.amc < prev    next >
Text File  |  1995-05-21  |  2KB  |  46 lines

  1. /*********************************************************************/
  2. /* INIT.AMC - Initialize the modem                                   */
  3. /*                                                                   */
  4. /* This program is called by AM4PM.EXE.                              */
  5. /*                                                                   */
  6. /* Input:  none                                                      */
  7. /*                                                                   */
  8. /* Output: 0  Normal.                                                */
  9. /*         1  Initialisation failed. Terminate AM4PM                 */
  10. /*                                                                   */
  11. /*********************************************************************/
  12. signal on syntax
  13. /* signal on failure */
  14.  
  15. CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  16. CALL SysLoadFuncs
  17.  
  18. CALL AMDPrint 'INIT.AMC() started'
  19.  
  20. CALL AMSendAT 'ATZ{OK}', 10000, 6
  21. CALL AMSendAT 'ATE0{OK}'
  22. CALL AMSendAT 'ATS39.6=1{OK}'
  23. /* AMSendW('ATS39.7=1') */ /* For ROM >= 6.10 */
  24. CALL AMSendAT 'AT+FCLASS=8{OK}'
  25. CALL AMSendAT 'AT+VIT=200{OK}'
  26.  
  27. Exit 0
  28.  
  29. syntax:
  30.    select
  31.    when rc=1 then
  32.       CALL AMLog 'Invalid parameters: INIT.AMC line 'sigl' rc='rc
  33.    when rc=2 then
  34.       do
  35.          CALL AMLog 'Function failure: INIT.AMC line 'sigl' rc='rc
  36.          CALL SysSleep(600)
  37.       end
  38.    otherwise
  39.       CALL AMLog 'Syntax err: INIT.AMC line 'sigl' rc='rc
  40.    end
  41.    return 1
  42.  
  43. failure:
  44.    CALL AMLog 'Failure: INIT.AMC line 'sigl
  45.    return 1
  46.