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