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 / CPM / BBSING / MBBS / AVATEXSM.TQT / AVATEXSM.TXT
Text File  |  2000-06-30  |  4KB  |  140 lines

  1.  
  2.  
  3. The routine below is a modification for MBYE33 to allow using the
  4. AVATEX 300/1200 modem without needing remote input to set baud
  5. rate and begin the program. This is presented as a guideline only,
  6. as my MBYE33 has been heavily modified (including multiple users
  7. and wordwrap chat), but should work with any BYE. The AVATEX should
  8. be set to the "1200" mode of response codes. The rest is automatic.
  9. MBYE should be set to "NO" for all modem options, and S300 and
  10. S1200 should be "YES"
  11.  
  12. RINGWT:
  13. ;
  14.     CALL    VCONSTAT    ;check if console key ready
  15.     ORA    A
  16.     JZ    RNGWT1        ;nope, check for ring/carrier
  17.     CALL    VCONIN        ;yep, get console key
  18.     ANI    7FH        ;strip parity bit
  19. ;
  20.      IF    FKEYS
  21.     CPI    BELKEY        ;bell key?
  22.     CZ    TOGBEL        ;if so, toggle console bell on/off
  23.     CPI    CLRKEY        ;clear screen char?
  24.     CZ    CLRSCRN        ;if so clear the screen
  25.         CPI     27        ;IF ESC, CHECK FOR EXIT
  26.     JZ    USRCHK
  27.      ENDIF
  28. ;
  29. C40:    CPI    'C'-40H        ;CTL-C?
  30.     JZ    USRCHK        ;check for exit
  31. ;
  32. RNGWT1:
  33. ;
  34.     CALL    MDINST        ;See if a character is waiting
  35.     JZ    RINGWT        ;Nope, go check other things
  36.     JMP    GCHA        ;ok! get it!
  37. ANOT:    CALL    MDINST        ;check for another 
  38.     JNZ    GCHA        ;go get it
  39.     CALL    MDCARCK        ;check for a carrier-if present,check buffer
  40.     JZ    ANOT        ;no carrier, loop
  41.     LDA    TCHAR        ;load the buffer
  42.     CPI    'T'        ;is it a "T"? last thing from a 300 connect
  43.     JZ    ANT3        ;then go answer as 300
  44.     CPI    '0'        ;is it a "0"? Connect 1200
  45.     JZ    ANT12        ;jump to 1200 connect
  46.     CALL    MDCARCK        ;if a carrier,
  47.     JNZ    ANSWERA        ;we missed - go do dumbmodem logon
  48. UNK:    XRA    A        ;else clear the buffer
  49.     STA    TCHAR        ;
  50.     JMP    RINGWT        ;go wait again
  51. GCHA:    CALL    MDINP        ;get the chaacter
  52.     CPI    '0'        ;store it if a '0'
  53.     JZ    NGC        ;
  54.     CPI    'T'        ;store it if a "T"
  55.     JZ    NGC        ;
  56.     CPI    'R'        ;R means NO CARRIER or ERROR
  57.     JZ    UNK        ;so go wait again
  58.     JMP    NGR        ;none of above, so clear
  59. NGC:    STA    TCHAR        ;store it in TCHAR buffer
  60. NGR:    XRA    A        ;clear A
  61.     JMP    ANOT        ;try for another
  62. ANT3:    CALL    SET300        ;set port to 300
  63.     MVI    A,BP300        ;store the baud pointer
  64.     STA    MSPEED
  65.     XRA    A        ;clear A
  66.     JMP    ANSWER        ;go load welcome, etc.
  67. ANT12:    CALL    SET1200        ;set port to 1200
  68.     MVI    A,BP1200
  69.     STA    MSPEED
  70.     XRA    A
  71.     JMP    ANSWER        ;go load welcome
  72. ;
  73. ;
  74. ;
  75. ;
  76.  
  77. The following mods go in "ANSWER" right before ANSWERA - which is now
  78. set to perform only the answering after an error has occurred. This
  79. routine bypasses ANSWERA, which is not necessary if the above worked!
  80.  
  81. ;
  82. ;
  83.      IF    NOT (SMODEM OR SM1200)
  84.  
  85. ;
  86.     MVI    B,10
  87.     CALL    DELAY
  88.     CALL    FRSTCR        ;check for initial carrier
  89.     JC    HANGUP2        ;no carrier, forget it...
  90.     JMP    WELCOME
  91. ;
  92. ;
  93. ANSWERA:
  94. ;
  95.     CALL    SET300        ;set speed initially at 300
  96.     CALL    MDINP        ;clear garbage characters
  97.     CALL    MDINP
  98.     CALL    FRSTCR        ;check for carrier the first time
  99.     JC    HANGUP2        ;wasn't a voice call
  100.      ENDIF
  101. ;
  102. ;
  103.  
  104.  
  105. OTHER CHANGES:
  106.  
  107.  
  108. Add (in flag/msg areas near end of pgm)
  109.  
  110. TCHAR:    DS    1    ;Space for the character buffer 
  111.  
  112.  
  113. Add in HANGUP2 (above RINGWT)
  114.  
  115.     XRA    A    
  116.     STA    TCHAR
  117.     CALL    SET1200    
  118.  
  119.  
  120.  
  121. That's it! Should work in any BYE if placed in the proper loop of FKEYS
  122. and Modem response checking.
  123.  
  124. Should also work with any 3/1200 modem that issues different responses
  125. for 300 and 1200 connect. Unfortunately, the VOLKS doesn't issue 
  126. dependable responses for 300 connect, but since it locks up every 10th
  127. call anyway, doubt if that's much of a problem!
  128.  
  129. The above is being used on two of the AMY<>BBS systems, THE APARTMENT
  130. (904-737-6654) and HOTEL SORDID (904-777-3311), both running on TRS
  131. Model 4's with CP/M. 
  132.  
  133.     Charles McHan
  134.     AMY  <>  BBS 
  135.     MULTI-SYSTEM
  136.    (904) 725-7461 
  137.    (904) 725-1226
  138.  
  139.  
  140.