home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / bye5 / bye5call.bak < prev    next >
Encoding:
Internet Message Format  |  1985-09-28  |  3.1 KB

  1. From: Mike DeWeese                    Date: 09/26/85
  2.       7841 Maria st.
  3.       Westminster, Co.
  4.       (303) 428-0917
  5.  
  6.     I propose the fllowing changes to BYE501 to be considered as an
  7.     update and version change.
  8.  
  9. (1) Found that Prometheus modems had an echo error on set-up after ATZ
  10.     command.  Changed loop time at CHECK1: to 450 ms instead of 400ms.
  11.  
  12. (2)    Added call back routine using the smart capabilities and sub-routines
  13.     already in BYE501. 
  14.        This routine is activated after first ring is detected.    Then will loop
  15.     for 5.1 seconds looking at MDISNT for characters or time out.  If a ring
  16.     is detected (voice call) it will fall to a 45 second loop, as not to return
  17.     and setup modem while phone is ringing.  After 5.1 second time out, it then
  18.     falls to a 30 second loop to look for a ring (computer call) or time out.
  19.     When a ring is detected, we return and answer the phone.  If a time out
  20.     occures we return, update call counters, and setup modem.
  21.  
  22.     a) Equated as follows under General Options section.
  23.  
  24. CALLBAK EQU    YES             ; Call back routine for those of us that only
  25. ;                ; have one phone line.
  26. ;                ; B5IM must be true also.
  27.  
  28.  
  29.     b) Added CALL at end of IMRING: label and just before MRIN1: label, as 
  30.        follows.
  31. ;
  32.      IF    CALLBAK AND B5IM
  33.     CALL    CALBAK
  34.      ENDIF
  35. ;
  36.      IF    B5IM AND (NOT NOATA)
  37. MRIN1:    MVI    B,22        ; Must let the phone quit ringing first
  38.  
  39.  
  40.  
  41.     c) Added the following subroutine below the comment ";END OF B5IM CODE".
  42.        and before the IMDONE: label.
  43.  
  44. ;------------------------------------------------------------------------
  45. ; Call Back subroutine
  46.  
  47.      IF    CALLBAK AND B5IM
  48. CALBAK:    LXI    H,CALMSG1
  49.     CALL    PRINTL        ; Notify where we are
  50.  
  51.     LXI    B,5100        ; Look for 5.1 seconds for voice call
  52. CBK:    CALL    MDINST        ; Any chars available
  53.     JZ      CBK1        ; No, go count down
  54.     CALL    MDINP        ; Get char
  55.     ANI    7FH        ; Strip parity
  56.     CALL       RCDISP         ; Show code on screen
  57.     CPI    '2'        ; 
  58.     JZ    CBKA          ; Had ring, must be a voice call
  59.     JMP    CBK        ; Had invalid char, go try again
  60.     
  61. CBKA:    LXI    H,CALMSG3
  62.     CALL    PRINTL 
  63.         LXI    B,450        ; Come here on a voice call and time out,
  64. CBKB:    CALL    DELAY        ; some people let the phone ring a long time.
  65.     DCX    B        ; best to not set up the modem while phone
  66.     MOV    A,B        ; ringing.  Delay 45 seconds and return
  67.     ORA    C
  68.     JNZ    CBKB
  69.     JMP    REDOIT
  70.  
  71. CBK1:    CALL    KDELAY
  72.     DCX    B
  73.     MOV    A,C
  74.     ORA    B
  75.     JNZ    CBK        ; No time out, go count some more
  76.  
  77. CBK2:    LXI    H,CALMSG2
  78.     CALL    PRINTL
  79.  
  80.     LXI    B,30000     ; Wait up to 30 secs for call back
  81. CBK3:    CALL    MDINST        ; Any chars ready?
  82.     JZ      CBK4          ; No, go count down
  83.     CALL    MDINP        ; Go fetch char 
  84.     ANI    7FH        ; Strip parity
  85.     CALL    RCDISP        ; Display char 
  86.       CPI    '2'         ; Ring, go answer
  87.     CZ      IMINT3        ; Print lf and clear register
  88.         RZ
  89.     JMP    REDOIT        ; Got somthing other than a 2, go start over
  90.  
  91. CBK4:      CALL    KDELAY
  92.     DCX    B
  93.     MOV    A,C
  94.     ORA    B
  95.     JNZ    CBK3  
  96.     JMP    REDOIT        ; Had no call in 30 sec time limit-go setup
  97.  
  98. CALMSG1:DB    'Now checking for Voice or Computer call...',CR,LF
  99.     DB    0
  100. CALMSG2:DB    'Waiting 30 seconds for Computer call...',CR,LF        
  101.     DB    0
  102. CALMSG3:DB    CR,LF,'Timming out from voice call...',CR,LF
  103.     DB    0
  104.      ENDIF            ; Call back
  105.  
  106. ;  END CALL BACK CODE
  107. ;
  108. ;--------------------------------------------------------------------------
  109.  
  110.  
  111.  
  112.