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 / MODEMS / ZMODEM / RZMP13.LBR / BYEMODS.DZC / BYEMODS.DOC
Text File  |  2000-06-30  |  6KB  |  147 lines

  1.             Modifications to BYE for Zmodem
  2.  
  3.     BYE will require some modifications if a program running Zmodem
  4. protocol does its modem I/O through it, as RZMP (like KMD) does. Basically,
  5. there are two problems, both occurring when BYE is transmitting files to
  6. a remote user:
  7.  
  8. 1) If the remote system is capable of doing simultaneous modem I/O and disk
  9.    I/O (unlike ZMP), the whole file may be sent without requiring any
  10.    response from the receiver. This may cause the inactivity timer to
  11.    disconnect the user if it times out before the file has been sent.
  12.  
  13. 2) BYE also sends a bell signal to the user after one minute's inactivity.
  14.    Thus if more than one minute's worth of data is sent before a response
  15.    is required from the receiver (which usually happens), an extra character
  16.    or two will appear in the data stream. This will cause errors and require
  17.    the packet to be re-sent. This will happen again after the next minute,
  18.    and so on.
  19.  
  20.     The first problem is easily overcome by using BYE's extended BDOS
  21. call 71 to first get the current value of the inactivity timer, then using
  22. the same call to set it to a high value (say 254 minutes). After the Zmodem
  23. transfer the timer can be re-set to its original value.
  24.     The second problem is more difficult. In RZMP, a decision was made to
  25. add an extra BYE extended BDOS call (89) to disable the beeps. Thus if BYE is
  26. running, calling BDOS with 89 in register C and 1 in E will disable the beeps,
  27. and 0 in E will enable them. A value of 255 in E will return the current value.
  28. Code to do this in BYE 510 is as follows (added/changed lines are marked with
  29. *** at the end of the line):
  30.  
  31.  
  32. 1. Change the reference table and add the new flag:
  33.  
  34. ;-----------------------------------------------------------------------
  35. ;
  36. ; Here is a quickie handy reference table to use so we do not get mixed
  37. ; up.  Please do not change the order of it in any future changes.
  38. ;
  39. ; |mxusr|mxdrv|toval|nulls|ulcsw|lfeeds|wrtloc|hardon|lostflg|covect|
  40. ; |1 byt|1 byt|1 byt|1 byt|1 byt|1 byte|1 byte|1 byte|1 byte |2 byes|
  41. ;
  42. ; |BYE    |bell |stat |lcbuf|mxtme|rtcbuf|beeps|                ***
  43. ; |3 byt|1 byt|1 byt|2 byt|1 byt|2 byte|1 byt|                ***
  44. ;-----------------------------------------------------------------------
  45. ;
  46. MXUSR:    DB    MAXUSR        ; Runtime maximum user area available
  47. MXDRV:    DB    MAXDRV        ; Runtime maximum drive available
  48. TOVAL:    DB    TOVALUE        ; Number of mins. to wait before timeout
  49. NULLS:    DB    0        ; Number of nulls after <cr>
  50. ULCSW:    DB    0        ; Upper case only switch (32=upper case)
  51. LFEEDS:    DB    0        ; Line feed mask (0=don't mask)
  52. WRTLOC:    DB    0        ; Location RBBS pokes so BYE won't hang
  53. HARDON:    DB    0FFH        ; If 0, hardlog is deactivated
  54. MDMOFF:    DB    0        ; If 0FFH, do not output to modem
  55. COVECT:    DW    0        ; Console output vector for XMODEM
  56. HDROFF    EQU    $-MCBOOT    ; Offset to 'BYE' that follows
  57.     DB    'BYE'        ; Tells XMODEM that BYE is being used
  58. BELLON:    DB    0FFH        ; If 0FFH ok to send bell (Chat) to con-
  59.                 ; Sole, 00H=belloff.  This only affects
  60.                 ; Your initial default choice
  61. LCPTR:    JMP    LCDATA        ; First byte is user access restrictions
  62.                 ; And flags while user is logged on,
  63.                 ; Used for his total time-on after
  64.                 ; Logoff.  LCDATA is address of buffer
  65.                 ; For NO25TH data, NO25BF in length
  66. MXTIME:    JMP    RTCBUF        ; First bye holds maximum time allowed
  67.                 ; Next 2 bytes point to the real time
  68.                 ; Clock buffer
  69. BEEPFL:    DB    0        ; Flag to enable/disable inactivity beeps ***
  70.                 ; so we don't affect Zmodem transfers      ***
  71.                 ; 0 = beeps enabled, 0FFH = beeps off      ***
  72. ;
  73. ;        end of BYE5's fixed lookup table
  74. ;-----------------------------------------------------------------------
  75.  
  76. 2. Add the extra entry to the jump table:
  77.  
  78. RSXTBL:    JMP    MDINST        ; Get modem input status         61
  79.     JMP    MDOUTST        ; Get modem output status         62
  80.     JMP    MDOUTP        ; Output character to modem         63
  81.     JMP    MDINP        ; Input character from modem         64
  82.     JMP    MDCARCK        ; Get modem carrier status         65
  83.     JMP    CONSTAT        ; Get console input status         66
  84.     JMP    CONIN        ; Get console input character         67
  85.     JMP    RCONOT        ; Send character to console         68
  86.     JMP    RMXDRV        ; Set/get maximum drive          69
  87.     JMP    RMXUSR        ; Set/get maximum user area         70
  88.     JMP    RMTOUT        ; Set/get timeout value          71
  89.     JMP    RMNULL        ; Set/get nulls              72
  90.     JMP    RMULC        ; Set upper/lower case flag         73
  91.     JMP    RMLFM        ; Set line feed mask             74
  92.     JMP    RMWRT        ; Set/get wrtloc flag             75
  93.     JMP    RMHDR        ; Set/get hardon flag             76
  94.     JMP    RMOFF        ; Set/get mdmoff flag             77
  95.     JMP    RMBELL        ; Set/get console bell flag         78
  96.     JMP    RMRTC        ; Call TCHECK & return TON & RTC address 79
  97.     JMP    RMLCBF        ; Return LC buffer address         80
  98.     JMP    RMMXT        ; Set/get maximum time on system     81
  99.     JMP    RMLTIM        ; Set login time             82
  100.     JMP    RMTOS        ; Print TOS message to caller/Sysop     83
  101.     JMP    SRUDEF        ; SubRoutine U, the user DEFines     84
  102.     JMP    RMXLCP        ; Set/get LCPTR.  When a user is logged  85
  103.                 ; In, LCPTR is a bit mapped status
  104.                 ; Register.  If no user is logged in,
  105.                 ; LCPTR contains previous callers Timeon
  106.     JMP    LOGSTAT        ; Set/get log open status         86
  107.     JMP    LOGPUT        ; Write a string into log file         87
  108.     JMP    IMDONE        ; Hangup phone and return to calling pgm 88
  109.     JMP    BEEPTOG        ; Enable/disable inactivity beep flag     89 ***
  110.  
  111.  
  112. 3. Add the code to get/set the flag:
  113. ;
  114. RMBELL:    LXI    H,BELLON    ; Set/get console-bell flag
  115.     JMP    SETGET2
  116. ;
  117. BEEPTOG:                                ***
  118.     LXI    H,BEEPFL    ; Enable/disable inactivity beep flag    ***
  119.     JMP    SETGET2        ; for ZMODEM download    <6lj/rjm>    ***
  120. ;
  121.  
  122. 4. Add the code to disable the beeps:
  123.  
  124. MSTAT4:
  125.     LDA    BEEPFL        ; If beeps allowed,            ***
  126.     ORA    A        ;                    ***
  127.     JNZ    MSTAT5        ;                    ***
  128.     MVI    A,'G'-'@'    ; Beep the user
  129.     CALL    MDOUTP
  130. MSTAT5:                ;                    ***
  131.     LDA    TOCNTM        ; Bump down minutes counter
  132.  
  133.  
  134. 5. Set the new max. command number in BYE's configuration header:
  135.  
  136. ;
  137. LOCMD    EQU    61        ; BYE's  lowest extended BDOS call
  138. HICMD    EQU    LOCMD+28    ; BYE's highest extended BDOS call    ***
  139. CCPL    EQU    8        ; Number of sectors for CCP size (norm
  140.                 ;   is 8).  Apples with Microsoft CP/M
  141.  
  142.     The above should allow BYE to work with RZMP. Something of the sort
  143. would also be necessary to run any Zmodem program through BYE.
  144.  
  145.                 -- Ron Murray
  146.                    27/9/88
  147.