home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / modem / t3mstpat.lbr / T3MSTPAT.ZZ0 / T3MSTPAT.Z80
Encoding:
Text File  |  1993-06-08  |  2.1 KB  |  56 lines

  1. ;Patch:    T3MSTPAT
  2. ;Author:Bruce Morgen
  3. ;Date:    April 12, 1988
  4. ;Purpose:
  5. ; To improve the reliability of T3MASTER on its initial invocation of
  6. ; T3SERVER.  The original code spit the "T3SERVER<cr>" string onto the
  7. ; remote's command line too fast for some systems to digest.  This
  8. ; patch replaces three hard-coded calls to WAIT1MS with a loop that
  9. ; allows the user to set the number of WAIT1MS calls by putting byte
  10. ; values into a newly-liberated (by replacing the program's leading
  11. ; JP with a JR) data byte at 102H.  Slowest transmission of the string
  12. ; is when 102H is 0, 0FFH is a tince faster, then 0FEH, etc.  A value
  13. ; of 3 will result in the same rather risky behavior as the original
  14. ; T3MASTER code, a value of about 50H should do the trick on most
  15. ; systems, just tweak as required.  As data rates increase beyond 38.4
  16. ; Kbps, I suspect that higher values will become necessary -- the raw
  17. ; rate of input is likely to overwhelm the BDOS line editor's ability
  18. ; absorb characters, even with the most efficient BIOS imaginable!
  19.  
  20. FALSE    EQU    0
  21. TRUE    EQU    NOT FALSE
  22. T3MASTR1 EQU    TRUE        ; If smaller version of T3MASTER,
  23.                 ; TRUE, otherwise FALSE
  24.  
  25. TPA    EQU    100H        ; T3MASTER is a Type 1 tool
  26. START    EQU    10BH        ; Initial jump lands here
  27. DELAY    EQU    50H        ; Delay length, 0* is longest, 1 shortest
  28.  
  29.      IF    T3MASTR1    ; "small" version, 17K
  30. PATCH    EQU    287AH        ; Iffy code here is replaced
  31. PATCH2    EQU    288EH        ; Same here for final <cr>
  32. WAIT1MS    EQU    34EBH        ; Z3LIB routine address in T3MASTER.COM
  33.      ELSE            ; "bigger" version, 25K
  34. PATCH    EQU    2893H
  35. PATCH2    EQU    28A7H
  36. WAIT1MS    EQU    5028H
  37.      ENDIF
  38.  
  39.     ORG    TPA        ; Replace "JP START" with this:
  40.     JR    START
  41. DELAYB:    DB    DELAY
  42. ;
  43.     ORG    PATCH        ; Replace "CALL WAIT1MS" x 3 with this:
  44.     LD    A,(DELAYB)    ; Set counter for desired delay.
  45. LOOP:    CALL    WAIT1MS        ; Call Z3LIB code
  46.     DEC    A        ; Countdown
  47.     JR    NZ,LOOP        ; Do it until A = 0 (*again)
  48.  
  49.     ORG    PATCH2        ; Replace "CALL WAIT1MS" x 3 with this:
  50.     LD    A,(DELAYB)    ; Set counter for desired delay.
  51. LOOP2:    CALL    WAIT1MS        ; Call Z3LIB code
  52.     DEC    A        ; Countdown
  53.     JR    NZ,LOOP2    ; Do it until A = 0 (*again)
  54.  
  55.     END
  56.