Last updated: 09/27/85 ZBye: A RBBS host program by Jay Denebeim Copyright (C) 1985, Jay Denebeim This documentation and the program it pertains to is copyrighted. The author gives permission to freely distribute the program and documentation under the following conditions. 1. The copyright notice must be preserved. 2. No fee can be charged except a small copying fee not to exceed $8.00 including media. .pn 1 Introduction I was one of the lucky ones. The company I worked for decided it would be good advertisement to have a BBS. They supplied the hardware and I set one up. Unfortunately Ovation went out of the computer business, I was hooked on SysOpping by that time, so there was nothing to do, but put it on my own machine. The only problem with it was this: I use my computer a lot, it takes about 5 rings to exit a program and re-enter BYE, usually by this time the caller had hung up. This got old real fast. BYE had another problem too. Its been so popular for so long that it has about a zillion conditional assembly options, and its very patchy at this point. Some of the options didn't work with some of the other ones, no one has tried every combination so that's not surprising. It also doesn't take advantage of ZCPR. That got me to thinking about what I'd do if I was writing a host program. What is a host program anyway? At the minimum, it allows a modem to take the place of the console. This wouldn't even require a program, if your CBIOS supports the IO byte, all it takes is the STAT command, if not, just swap the plug to the terminal and the modem when you want to use it remotely. Of course that really isn't enough. A way to switch baud rates is important. Also, some security is a good idea. These functions do require a program, so as long as there is some codeing what else would be nice? BYE provides several other features, typing a file upon logon, password protection for the system, running a program after the password was entered. These were all good ideas. There were also a few bells and whistles provided, user area protection, counting the number of logins, timeouts, handling carrier loss gracefully, a way to type to the caller, a way to force the caller off the system. This in essence are the functions of BYE. I decided to keep most of these, and add a few more. The system I envisioned would run under ZCPR. That made the file typing, paswording, and program executing simple, instead of making BYE do all the work, just fill the multiple command line buffer. Since it was so simple to do that, why not do it several places? My primary concern was to answer the phone while using the computer, so of course it should do that. I felt the function keys from BYE were a good idea, but they didn't go far enough. How about a chat mode? Why not set the wheel without disabling the caller? This got me all fired up, so I decided to write it. ZBYE is the result. Installing ZBYE The first step of course is to get ZCPR3 installed. I won't go into it here, but it must be the real thing, not Z3-dot-com. ZBYE is an RCP, so at least that, the environment descripter, and the multiple command line buffer must be supported. The Z3BASE.LIB file must be available when you run M80. Next, you install the overlay, this contains the machine specific routines for your system. ZBYE works with MBYE overlays, with a few changes. Since we're using M80 instead of MAC, you've got to remove the :s before the EQU psudops, just use a word processor to hack them out. I've done a couple which are included in the distribution library. They're all I had, if you want me to do it for you, I'll be happy to, just send me the overlay and I'll convert it. All overlays I collect will be included in the next release of the library. BYE overlays should work too, but they'll require a few more changes. If you get stuck, don't hesitate to call me. After completion of the overlay insert it after the .8080 psudo-op with your word processor. At this point all we have to do is set up the equates. I'll describe each one. Select the options desired for your system, if you want it on enter a yes, if you don't enter a no at each equate. Unless you have an unusually large RCP area, you won't be able to turn them all on. MHZ - This equate is used in the timing loops. Enter the clock speed of your machine * 10. I.E. for a 4 mhz machine enter 40. CLOSS - Sometimes when a person drops carrier, it will come back in a short period of time. For instance someone with call waiting. Enter the number of seconds to wait after the carrier is lost before hanging up the phone. CLROU - This location will be jumped to when the caller times out, or drops carrier. It allows programs such as LUX to abort gracefully. I suggest one of the restart areas in page 0 of the machine. ZBYE comes shipped with it set to restart 6. While the system is initializing a jump to the carrier lost routine is inserted at the location in memory denoted by CLROU. When writing a program that replaces this jump, don't forget to put it back the way it was, and then jump to the routine originally pointed to. JUMP & TMINS - These are internal equates, don't change them. OBYE - ZBYE has an area that corresponds to the information area of BYE. Not all of BYE'S information is in there though. Its mostly just DS. If you want this area included, answer the question yes. DUMB - If you have a non-DC Hayes modem, answer this yes. Also, the dumb routines are smaller than the smart routines, so if you're cramped for space answer it yes. If ZBYE is operating in dumb mode, the caller has to hit carriage return several times to sync the speed. When in local answer mode, this puts you at the mercy of the caller. LSTDEV - Normally the program routes all output directed at the printer to the modem. This equate enables the printer port when the wheel is set. KILCALR - When turned on, the current call will be dropped if the byte at 0 changes from C3 to anything else. It allows programs to force termination of a call. Personally I feel its cleaner to just call the CLOSS restart, but some non-public domain BBS programs want it done this way. TIMEOUT - Setting this equate causes the caller to be dropped if they go for over TOMINS without typing. TOMINS - This is the number of minutes before a caller is dropped if TIMEOUT is set. STATLN - This equate controls the display of status messages. I think its important to have these on, but they do take up a lot of space in the program. If you're cramped turn this on. CHATF - This equate causes the chat function to be included. It will save about 30 bytes or so to leave it out. LCLANS - Cause the modem to be answered while in local mode. This also takes a lot of code, but try to keep it in if at all possible. CDRIVE - Enter the caller's maximum drive. Whenever the wheel is set, the original drive is restored. CUSER - Enter the callers maximum user area. Command lines are run under several circumstances. They are generated by macros so that they're all in one place. BYECL - Programs to be run during ZBYE's initialization. GBCL - Programs to be run before the caller hangs up. Such as a program that asks if you want to leave a message to the sysop. NCCL - Programs ran after disconnection and before the next caller. Use them to keep track of the number of up/downloads per person, or to keep track of who disconnected how. NMCL - This command line will be executed when a caller connects. CLCL - Programs to run if the caller drops carrier. TOCL - Programs to run if the caller times out. KCCL - Programs ran if a higher process kills the call. I.E. changes the byte at position 0. The terminal control codes are fairly straight forward. I would like to make a few comments about them though. If you don't have push and pop cursor, I'd suggest using nothing for push and clear screen for pop. The enable 25th line on my machine is a little strange. It doesn't make the 25th line appear and disappear like normal terminals. What it does is enables the cursor to be moved into the 25th line, it also causes it to scroll when the rest of the screen scrolls. ZBYE was written for this type of enable/disable 25th line. What I suggest for a normal one is to use the enable, but make the disable blank. Be sure the +(80h and last) follows the last byte in every cursor control sequence. That's all it takes, ZBYE is ready to be assembled now. To assemble it use the following commands: M80 =ZBYExxx L80 ZBYExxx,BYE/E/N ERA ZBYExxx.REL (Where xxx is the version number) Try to run BYE now, when the lights stop flashing on the modem and the screen clears, BYE is functional. If something is wrong, generally BYE locks up trying to initialize the modem. Exit this state with a reset. The first 40 columns of the status line are free for whatever programs want to use them. I've made my BBS put the caller's name there. ZBYE will clear this area when the next caller arrives, but other than that does nothing with it. The max drive/user area is in the ZCPR environment area, not in BYE's header. It follows ZCPR conventions which are off by 1 from BYE's conventions. Don't forget to set your support programs (xmodem, lux, etc) up to take this into account. Using ZBYE When waiting for a call, the screen will be clear with the cursor turned off. Information about the last caller (if any) will be on the bottom line. After a caller arrives, there are several function keys available. ^L - Toggle Local only IO. This toggles the modem IO on and off. ^O - Toggle Open access. This switches the wheel, maxdrive, and maxuser bytes of ZCPR3. ^N - Nerd key. Hang up on the bozo. ^Q - Query the user. Enter local chat mode. To exit this mode type ^C. Between calls, type ^C to enter local mode. If a caller arrives, ZBYE will tell him that you're using the computer, and it will then ask you if you want to let the caller on. If you do, type a Y, ANYTHING else will cause the modem to hang up, so be careful. Exit the program then type in BYE to answer the call. From local mode, type in OFF to turn off bye and give yourself complete control of the system. That's about it, I hope you enjoy using ZBYE! Jay Denebeim SysOp - ZBoard (a ZNode) 1800 Williamsburg Rd Apt 13-E Durham, NC 27707 919-489-6737 Data 919-489-1785 Voice