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
/
BYE5
/
BYE520.LBR
/
BYE5.DZC
/
BYE5.DOC
Wrap
Text File
|
2000-06-30
|
42KB
|
988 lines
BYE5.DOC - Thru BYE510 -
08/01/86 Written by Wayne Masters, Potpourri, 408-378-7474
NOTE: This program is copyrighted (c) 1986 by Wayne Masters, Irv Hoff,
and George Peace. All rights reserved. Users are hereby granted
a limited license to copy this program for personal use only.
The program may be distributed unmodified to all interested
parties. No fee or other consideration shall be accepted by
any party or parties. In accordance with the copyright law
of 1978, form TX has been sent to the U.S. Government Copy-
right Office.
= = = = = = = =
If you have changes that you would like to see in a forthcoming
general release, please forward them for consideration. This
seems to be the only way to control the modifications that have
run rampant in previous versions of public domain programs. It
has taken many hours to correct problems some of these changes
have caused, particularly when used with assemblers that have
characteristics different from the one being currently used or
if other equates are selected.
Send any suggestions to:
Wayne Masters Irv Hoff, W6FFC George Peace
(408) 378-3798 voice (415) 948-2166 voice (717) 657-0285 voice
Potpourri RCPM CP/M-3 George Peace
(408) 378-7474 (717) 657-8699
= = = = = = = =
Please read the BYE5.HIS file to see the most recent update history.
Also refer to B5-CPM3.DOC for additional instructions on installing BYE5
in a CP/M 3 environment.
BYE5 uses a special loader to relocate its run-time code under the CCP.
The run-time code resides under the CCP forever, or until the sysop re-
moves it with the CTRL-C option. The size of the run-time code will vary
according to the equates you choose. Running a large BBS program may limit
the number of "bell and whistle" equates that you the installer can choose,
depending on the size of your TPA. User selectable equates are discussed
in order of occurance and if not mentioned are normally not modified.
BYE5 uses an extended BDOS call convention that can be a powerful software
tool for writing programs designed to run under BYE. The extended BDOS
calls are explained later in this file.
-----------------------------------------------------------------------------
INSTALLING BYE5
---------------
First, select the correct insert for your computer from the BYE5-INS.LBR.
It may be necessary to customize or modify an existing insert to match your
hardware environment. If you have difficulty finding or writing an insert
for your system feel free to call Irv Hoff, 415-948-2166 or myself at 408-
378-3798. CPM3 users can contact George Peace at 717-657-0285. We will
work with you to develop the insert for your computer.
If your computer has a clock then select the B5C-n insert from the B5-CLOCK
library. Again, if you can't find one that matches your system feel free
to call for help.
You now need to use your favorite text editor to install the insert(s)
and select your run-time equates. Find the area near the beginning of BYE5
marked ++++ Install your I/O port insert here ++++ and insert your computer
I/O routine. Next, if you have a clock find the area marked ++++ Install
your TIME routine here ++++. Delete the existing code (used as an example)
from inside the IF CLOCK OR RSPEED to ENDIF statements and install your
clock code in its place.
You may also install a subroutine in BYE that does a specific job for your
unique application. Look for the area marked +++ Install SubRoutine U DEFine
and insert your application subroutine. You may access this subroutine from
programs running under BYE5 with the BDOS 84 call described later in this file.
-----------------------------------------------------------------------------
BYE5 OPTIONS
------------
Using your editor, set the following equates to match your system and/or
preference. Comments are made to help you avoid creating a version of BYE
too large for your run-time environment. The equate and its original option
are given first. Equates not mentioned are normally left alone.
-----------------------------------------------------------------------------
--------------------
SYSTEM CONFIGURATION
--------------------
CCPL EQU 8
What is the length of your CCP and any special disk driver used under it?
Normally it's 2K (8 x 256). Some Apple configurations require 9, and others
even more. The Ozzie with Trantor hard disks may vary from 24 down, depend-
ing on the version of Trantor software. If BYE doesn't work with 8, try
larger numbers until you have the minimum size that works. Remember, the
larger this number, the smaller your TPA. If you are using Trantor's WL
hard-disk bios then set CCPL to 0 and set TRANWL to YES and save 2K of TPA.
CPM 3 does not use this equate.
-----------------------------------------------------------------------------
-------------
MODEM EQUATES
-------------
IMODEM EQU NO
If you have a dumb auto-answer modem, or if you can make your modem emulate
a dumb auto-answer modem, then leave this equate NO. If you have an intelli-
gent modem such as Hayes, Anchor, Pro-Modem, USR or Maxwell, then set this
equate YES.
B5IM EQU NO
If IMODEM is YES, does your modem use the "AT" protocol (some call it Hayes
protocol)? If so, set this equate YES. BYE5 has internal code installed to
control these modems. If you have an intelligent modem that does not support
the "AT" protocol you must set this equate NO and install your own modem
control code at the location marked ++++ Install your modem dependant code
here ++++. BYE5 does not support internal 300 baud modems unless they can
be made to "act dumb". The old PMMI modems can "act dumb" but are only
supported at 300 baud.
HS9600 EQU NO
HS4800 EQU NO
HS2400 EQU NO
HS1200 EQU NO
HS300 EQU NO
What is the highest speed of your modem? You MUST set one, and only one,
of these equates YES.
DOATZ EQU NO
The "ATZ" command will cause some modems to revert to auto-answer and
create problems if BYE5 is trying to reinitialize the modem between calls.
Try your installation with this set NO. If your modem absolutly must be
reset with ATZ command between calls, then set this YES. Much faster when
set NO.
ECHO EQU NO
If B5IM is YES, does your modem echo the commands correctly from the "AT"
command set? Be careful! Some modems echo fine until the RING is detected,
then won't echo the "ATA" command. Modems known to echo correctly include
Hayes, Promodem, Courier and Maxwell. Be sure to set the switches on these
modems to ECHO commands. Set ECHO EQU YES for these modems and this will
assure a reliable initialization between calls.
Modems that are known not to echo after "RING" is detected include the
Anchor and most USR Passwords and S-100's (the Courier works correctly).
Leave ECHO EQU NO for these modems.
ANCHOR EQU NO
If you have a Mark XII set this YES. The Mark XII does not understand
S2=128, M0, S10=25 and X1 commands.
NODTR EQU NO
Set this YES if you have a Mark XII (which does not support DTR) or if
your computer/modem interface is not wired for DTR. Ozzie-1 owners should
note that BYE5 can handle your lack of DTR but can't work without the
hardware mod to sense carrier status from your modem. You have to install
the hardware mod for carrier-detect, so you may as well include the DTR
fix as well (normally both problems are fixed with the hardware mod kit).
NOATA EQU NO
(See ECHO). Some modems, like the Anchor Mark XII, stop echoing commands
after "RING" is detected but will still execute the ATA command. Others,
like the USR Password and S-100 stop echoing AND will NOT execute the ATA
command. Set this YES for the older USR Passwords and S-100's and NO for
the Mark XII.
OFFHK EQU NO
The question is "do you want your phone line made busy" when you are using
your computer locally, or do you want it to RING, but not answer. If you set
this equate YES, BYE5 will send ATH1M0 to your modem when you exit to cp/m
or use the "E" option. Saying NO will send ATS0=0 (don't answer the phone).
In either case, DTR is left ON to prevent some modems from reverting back to
their default state.
SHORTB EQU NO
BYE5 sends a 29 character command string to initialize the modem. Some
modems, such as the MULTIMODEM by MultiTech, have a short command buffer.
Set this equate to YES, and BYE5 will send two short command strings
instead of one long command string.
-----------------------------------------------------------------------------
---------------
GENERAL EQUATES
---------------
HARDLOG EQU NO
YES, if you want BYE5 to send everything the remote caller types to your
list device. Your BBS, or transient program can then toggle this on/off
at will by poking HARDON dynamically. (Poke 0FFH if you want printer on,
0H if you want if off.)
PRINTER EQU NO
Set YES if your BBS sends error messages to your printer, or if you want
to toggle printer on from your local console with ^P. You can use this
option with or without HARDLOG option. If your modem I/O is done using
printer I/O, then say YES to this equate. This causes BYE5 to patch your
jump table correctly for modem I/O.
COMFILE EQU NO
COMDRV EQU 'A'
COMUSR EQU 14
Set COMFILE YES if you run a BBS program and want BYE to load and execute
it after carrier detect. (See RBBS equates). COMDRV and COMUSR must be
set to the drive and user area where you keep your BBS entry program. If
you run a RCP/M without a BBS then leave this NO.
DISKLOG EQU NO
LOGUSR EQU 14
LOGDRV EQU 'A'
Set DISKLOG to YES if you want BYE5 to capture and write to a disk file
all the remote callers activity. The data is written to a LOG.SYS file
located on the drive/user area specified in the equates above. Extended
BDOS calls 86 and 87 (described later in this file) can be used with this
feature. WARNING to sysops with small TPAs....this code will use about
1024 bytes of memory. CP/M 3 users normally have enough TPA, and small
BBS programs like PBBS running on CP/M 2.2 will work ok, but large BBS
programs like MBBS will probably not work correctly (with cp/m 2.2).
EXFILE EQU NO
EXDRV EQU 'A'
EXUSR EQU 0
Do you want BYE5 to load and execute a .COM file anytime a user is logged
off? If YES, BYE5 will execute your EXIT file whenever any of the following
conditions occur:
1) User types BYE (to log-off)
2) Carrier is lost (from caller)
3) You type the TWIT key to log him off
4) Location 00H <>C3H (used by your BBS Goodbye option to log off a caller)
Note! If MSGFIL is YES, location 00H is allowed to be altered to 0C2H
as a flag to load your Add-Message(s) file without calling EXFILE.
5) No-activity timeout (alias sleepy-caller expires).
6) Time-on-system exceeded.
Since a user can't be logged in, the following conditions cause hangup and
reset WITHOUT calling your EXIT file:
1) RSPEED PrimeTime violation
2) BYE5 PassWord mismatch
3) "Nulls if needed" question flunked.
4) Remote modem's speed not detected within 30 seconds of answering.
Your EXIT file must preserve the stack and do a RETurn (not warmboot) to
re-enter BYE5. EXDRV and EXUSR must be set to the drive and user area where
you keep your EXIT.COM file. MBBS users have a special exit scheme and must
say NO to this equate. PBBS users must say YES.
EXRET EQU NO
An exception to the above EXIT file RET may be made if you set this equate
YES. Some higher order languages like MBASIC, C and Pascal make it difficult
if not impossible, to save the callers stack, restore it later, then return.
This equate allows you to select an easy way to leave your EXIT.COM file and
return to the proper location in BYE5. Simply store (or POKE) a small r, 'r'
into location FCB+1 (5DH), then exit your EXIT routine with a warmboot or
SYSTEM command. BYE5 will trap the warmboot and reset the system for the next
caller.
BYHANG EQU NO
Do you want BYE5 to say goodbye and hangup on the caller before loading and
executing your exit file? OxGate and Metal users running an EXIT file
normally say YES. PBBS v2.0 uses YES, PBBS v3.0 and up uses NO.
MSGFIL EQU NO
KMD11 and later versions of XMODEM allow specially formatted message files
to be uploaded with the "RM" command. KMD will set location 00H to 0C2H
and Warmboot after an "RM" file has been uploaded. BYE5 traps the Warmboot
and will load and CALL your MSGFIL if this equate is YES. Your MSGFIL must
be located on the same d/u as COMFILE. It should append the uploaded file
to your existing message base, preserving the stack, and RETurn (not Warmboot)
to re-enter BYE5. You may choose the name of your MSGFIL.com at label MSGFCB:
Default name is MFMSG.COM. MBBS users normally say YES to this equate.
NO25TH EQU NO
If your console does not have a 25th status line, you can set this equate
YES and see who's on your system with your local function key (^W). (See
READLC). BYE5 has a character buffer that can store data poked by the
RBBS program, or from the LASTCALR file. If READLC is NO, the RBBS program
must poke data into this buffer. You may also print a customized "Header"
above this data to show what various fields mean. Install your customized
header at label LCHEAD:
NO25BF EQU 78
How large a buffer do you want for your "NO25TH" data? METAL, OxGate and
PBBS use 78 bytes. MBBS and QBBS only use 65.
READLC EQU NO
LCDRV EQU 'A'
LCUSR EQU 14
If your BBS program does not store lastcalr data directly into BYE5 you
may set READLC EQU YES and BYE5 will read the contents of your LASTCALR
file on the first warmboot to CP/M. You can display who's on locally after
that with ^W. Some BBS programs (MBBS and later versions of OxGate) store
this data themselves. Run-time code is saved if this is NO. Be sure to
set LCDRV and LCUSR to indicate where your LASTCALR file is located.
SKTERM EQU NO
BYE5 will wait for the remote caller to reach terminal mode before passing
control to your BBS program. This assures the sysop that their opening
welcome or log-in message will be read by the caller. If your BBS program
has this feature built in, just set SKTERM to YES, and BYE5 will pass control
to your BBS as soon as a carrier/speed has been detected.
WBDRIV EQU 'A'-41H
What drive do you want to warmboot on the first entry to cp/m? Most systems
will leave this as A, other systems with add-on hard disk hardware may want
C or your choice...(Some want to Warmboot to their NEW-FILES drive).
WELFILE EQU NO
WELDRV EQU 'A'
WELUSR EQU 14
Do you want BYE to type a welcome file after carrier detect? If you run
a BBS you should set this to NO and delegate that job to your BBS. This
option creates larger run-time code and may interfere with large BBS programs.
If you run a simple RCP/M without a BBS, set this YES and set WELDRV and
WELUSR to the drive/area where you have your WELCOME file stored.
CLRSCR EQU NO
CLRCH1 EQU 1BH
CLRCH2 EQU ':'
CLRCH3 EQU 0
CLRCH4 EQU 0
CLRCH5 EQU 0
CLRCH6 EQU 0
Do you want BYE to clear your screen between calls? Set CLRSCR to YES,
and BYE will. Set this to NO and you can still use local function key (^Z)
to clear your screen. In any case, set the clear screen sequence for your
system into the CLRCH1-CLRCNn bytes. You can use up to 6 bytes (allowing
25th line clearing also). Unused bytes must be zero.
PRGRSS EQU YES
Please leave this YES until you are sure everthing works. It will give you
valuable information to troubleshoot problems, neat summaries, and diagnostic
data. If you run a large BBS program, this may be set NO to save run-time
code after you have everything working.
PRNTGB EQU YES
Do you want BYE5 to print "Goodby, call again..." when user is logged off?
PRNTWB EQU NO
Do you want BYE5 to print "Booting CP/M..." message each time your system
warmboots? Tacky...unless you have an extremely slow system, leave this NO.
PWRQD EQU NO
If you run a BBS, delegate asking for a password to your entry program.
This option adds a lot of run-time code to BYE5 and should not be used
except for RCP/M systems without a BBS. Most private RCP/M systems will
use WELFILE and PWRQD equates since they don't run a BBS. If you set this
to YES, choose the password needed at label PASSWD.
RVIDEO EQU NO
RVON1 EQU 1BH
RVON2 EQU 'G'
RVON3 EQU '4'
RVON4 EQU 0
RVOFF1 EQU 1BH
RVOFF2 EQU 'G'
RVOFF3 EQU '0'
RVOFF4 EQU 0
If your terminal has reverse video, or half intensity capability, you may
set RVIDEO to YES and when a carrier is present BYE5 will display all the
local screen messages in reverse video. These messages are normally what
you see from typing one of your function keys, but will also include all
messages not being sent out the modem (only you see then). You have 4 bytes
to specify the command sequence that's required to put your terminal into
reverse video mode (or half intensity) and 4 bytes to command the terminal
back to normal mode.
TOVALUE EQU 5
How many minutes of no-activity will you allow? I usually set this equate
to 2, then allow my BBS program to poke TOVAL with different numbers, depend-
ing on the users' status. For private systems, set this to 255. BYE5 sends
a bell to the remote modem every 1 minute of no-activity to remind him that
BYE5 is waiting for an input. BYE5 will log the caller off if no input is
recieved after TOVALUE expires. This timer is restarted any time a character
is recieved from the caller.
-----------------------------------------------------------------------------
-------------------------------------
SYSTEM AND HARDWARE DEPENDANT OPTIONS
-------------------------------------
CPM3 EQU NO
CCPPLUS EQU NO
HISTRSX EQU NO
SDRV1 EQU 1
SDRV2 EQU 0FFH
SDRV3 EQU 0FFH
SDRV4 EQU 0FFH
CP/M 2 users should leave these six CP/M Plus equates alone!
CPM3 must be set to YES for CP/M 3 users.
CCPPLUS should be set to YES only if CCPnnn+ by Jim Lopushinsky has been
installed to provide ZCPR-like operation.
SDRV1 thru SDRV4 are used to set the drive search path. Drive 0=current,
A=1, B=2,... 0FFH is the search path terminator.
HISTRSX is set YES if you are using the command line history feature of
CCP+.
CLOSS EQU 1
How long do you want BYE5 to wait after carrier loss before hanging up the
phone and resetting the system? You may set this to 2 or 3 seconds for "Call
waiting" options, but normally if the carrier is lost for 1 second or more,
the circuit is lost anyway. Most systems leave this set to 1.
CTRLC EQU 'K'-'@'
Most BBS software changes location 0000H to a CDH (rather than a C3H) to
indicate a warmboot should not be allowed and tells BYE to map ^C to this
character unless location 0000H is a C3 (JMP vs CALL). If a warmboot occurs
while location 000H is not a C3, BYE will disconnect the modem and reset for
the next caller. This is the trick you use to log off a user from your BBS
program. Just alter location 0000H from a C3 to a CD and do a warmboot,
(JMP 0, or SYSTEM) and BYE will log off the user and reset for the next call.
DOWNMIN EQU 2
If the sysop uses function key (^O), BYE prints "System going down, you
have n minutes", where "n" is the equate DOWNMIN. If TIMEON is YES, this
value is added to TON and stored as his new MXTIME, causing auto-logoff
after that time elapses. This gives the caller time to finish and logoff.
LOSER EQU NO
Does your operating system overwrite the BDOS jump table on every warmboot?
The symptoms of this are loss of BYE on the first warmboot. You must find
the CALL to WARMBOOT in your BIOS and patch labels WBCALL and WMSTRT to the
values for your operating system. This is a rare occurance and should be
left NO until you are sure you have a loser. Call voice for further assist-
ance on this equate (I happen to have a loser).
MHZ EQU 4
What is the speed of your CPU? This is very important, since BYE calculates
all the delays on this equate.
MOTOR EQU NO
Do you want to turn off/on your disk motors between calls? If YES, you must
set the equates DISK, DISKON and DISKOFF to match your command port and on/off
commands. Leave this NO, unless you're sure of what you're doing. You will
probably need to customize the code to match your disk system, and include the
necessary delays needed for your drives to come "up to speed".
TRANWL EQU NO
If you are using the new Trantor WL bios (hard-disk add-on), set this YES
and set CCPL EQU 0. This will save you 2K of TPA (needed for large BBS's).
If you use Trantor hard disk add-on and you don't have the WL bios version,
you should upgrade your system if you expect to have a decent TPA size.
-----------------------------------------------------------------------------
-------------
FUNCTION KEYS
-------------
LEADIN EQU NO
LEADKY EQU '\'
Do you want to use your function keys without using control characters?
If using a single ctrl character is OK with you, leave these two equates
alone. The function key table below will work as a single ctrl-key sequence.
If you use a word editor online with your caller and ctrl characters are needed
for your editor, set LEADIN YES, and select a LEADKY that you seldom use.
Your function keys now require the leadky then the character below, in order
to work. In either case, upper or lower case will be accepted for the keys
selected next.
ANSKEY EQU 'A'-40H
BLNKKEY EQU 'B'-40H
LOGKEY EQU 'D'-40H
BELLKEY EQU 'G'-40H
LCKEY EQU 'L'-40H
TWITKEY EQU 'N'-40H
SYSDKEY EQU 'O'-40H
MSGKEY EQU 'Q'-40H
TIMEKEY EQU 'T'-40H
ULTKEY EQU 'U'-40H
WHOKEY EQU 'W'-40H
XITKEY EQU 'X'-40H
ZCREEN EQU 'Z'-40H
The use of these function keys are self explanatory. Be sure to leave the
"-40H" alone and only change the character inside the ' ' to suit your fancy.
Both upper case and lower case characters will work from your keyboard, even
if LEADIN is YES, but be sure to put only upper case characters inside the
' ' equates above.
-----------------------------------------------------------------------------
---------
RBBS TYPE
---------
METAL EQU NO
MBBS EQU NO
MBSDRV EQU 'A'
MBSUSR EQU 0
MINICK EQU NO
OXGATE EQU NO
PBBS EQU NO
QBBS EQU NO
RBBS EQU NO
IOVAL EQU 0
You may select one (or none) of these equates as your BBS. If you say YES
to one, make sure to say YES to COMFILE and indicate where it is located.
These equates allow certain COM files to be loaded for execution after carrier
is detected. If you run BBS software that's not included in this table, just
say YES to COMFILE and name your BBS program RBBS.COM and put it on the d/u
specified at the COMDRV/COMUSR equates, and set RBBS to YES. MBBS users may
select the d/u for MBBS.COM and keep LOGIN.COM and MFMSG.COM on the COMDRV
and COMUSR selected above.
LMBELL EQU NO
KILBEL EQU 03BH
If LMBELL is YES, this byte is toggled to set the status of your bell-flag.
Use BELLKEY to alter this status, which allows "CHAT" mode to function. BYE5
will toggle this byte twice on the first load to show the sysop which condition
he has currently active, (shown twice so we wind up with what we started with).
MBBS and RBBS users normally say YES to this equate.
RTOK EQU NO
RTOKFG EQU 020H
Do you need a low-memory byte reset to allow your users to re-enter your
BBS from cp/m (keeps from asking name/password the second time if user is
simply returning from cp/m back to your BBS)? If you set RTOK EQU YES, BYE5
will set the byte defined by RTOKFG to 00H between calls. RBBS users normally
say YES to this equate. PBBS should say YES, and set RTOKFG to the value of
their REENTR value, normally 20H.
-----------------------------------------------------------------------------
------------------
CLOCK/TIME EQUATES
------------------
CLOCK EQU NO
If your computer has a clock and you have installed the correct insert for
it in BYE5, set this equate YES. You do not need a clock to take advantage
of TIMEON if you run KMD04 or later with BYE5. This feature was added to
allow batch mode in KMD for all systems, with or without a clock.
BCD2BIN EQU NO
BIN2BCD EQU NO
These equates allow your clock routine (see CLOCK) to use internal sub-
routines to convert BCD data to binary, or vice-versa. Check your clock
insert to see if it needs one or both of these (check for CALL BCDBIN or
CALL BINBCD).
TIMEON EQU NO
MAXMIN EQU 60
Do you want BYE5 to keep track of how long a user has been on and log him
off after MAXMIN? This feature will work even if your system does not have
a clock. Be sure to set CLOCK and TIMEON the same way in KMD04 (or later)
the same way you set them in BYE5. Time-on-system will be reported to the
local sysop with the function key (^T). If CLOCK is also YES, the time-on-
system data can also be displayed to the remote user on each warmboot. Your
RBBS software can dynamically change MAXMIN by poking new values into the
label MXTIME. Poking a zero gives the user unlimited time on. If the wheel
byte is set BYE5 also skips checking time on (as if MXTIME was 0). KMD04
will keep BYE5 updated with TIMEON data if CLOCK is NO and TIMEON is YES.
Batch mode file transfer can now be offered to the general user population,
since BYE5 can limit total time-on with or without a clock. Suggest setting
MAXMIN to 60 if CLOCK is YES, and to 45 if CLOCK is NO.
PRNTOS EQU NO
If TIMEON and CLOCK are YES, do you want BYE5 to display "Minutes left: nn"
each time a WarmBoot occurs? A handy reminder if needed. ZCMD2n users will
normally set this NO, since ZCMD2n will display [nn] A0> and the user knows
he has nn minutes left (or nn minutes on if a special user). If the Wheel
byte is on or MXTIME =0, BYE5 displays "Minutes on system: nn", rather than
"Minutes left: nn".
RSPEED EQU NO
HOUR1 EQU 19
HOUR2 EQU 23
SPEED EQU 5
Do you want to restrict access to your system during certain hours to the
slower modem callers? You must have a clock (CLOCK EQU YES), then you can
select the start (HOUR1) and stop (HOUR2) of your restricted time window,
and indicate the slowest modem speed you will accept (5 = 1200). See the
BPnnn equates to match modem speeds to numbers 0-9.
-----------------------------------------------------------------------------
-----------
CCP OPTIONS
-----------
ZCPR2 EQU NO
Set this to YES if you are running any ccp replacement program that uses
WHEEL byte. ZCPR1/2, ZCMD1/2, NZCPR1/2 all fit this description. Others
will also work. This equate, when set YES, resets WHEEL to 0 for each new
call. It also allows checking of WHEEL byte for restrictions on time, and
allows special treatment of the caller if WHEEL is on (0FFH). CPM 3 users
normally set this YES too. Be sure to equate WHEEL, MAXDRIV and MAXUSER to
low memory bytes that do not interfere with your operating system. Also, be
sure to use the same values in other programs like SD, KMD, FILE etc.
ZCPR3 EQU NO
ZCPR3 is an overkill for a RCP/M system, but if you insist on running it
say YES to this equate. You must then assemble BYE5 with MAC or equivalant,
and assemble using Z3BASE as MACLIB.
USEZCPR EQU NO
If your BBS software pokes BYE with maxdriv and maxuser data set this NO.
METAL and others do this. If your BBS software stores maxdriv and maxuser
in the low memory bytes equated as MAXDRIV and MAXUSER, then set this YES.
Regardless of how this equate is set, if ZCPR2 or ZCPR3 is YES, BYE will
make sure MAXDRIV and MAXUSER bytes contain the correct data. You should
always say YES to USEZCPR equates in the other programs used by your system,
like KMD, SD, FILE, etc.
CHEKDU EQU NO
Do you want BYE5 to police the drive/user areas or can your CCP do that?
If YES, BYE5 will keep users from logging into drives/user-areas that are
"out-of-bounds" for that user. This also eats a lot of run-time code. If
you are using ZCMD or ZCPR, you may choose to have those programs police the
max driv/user functions. Set YES if you want BYE5 to do it. A small doc
file is included in this .LBR describing how ZCPR3 users can allocate the
policing to ZCPR3.
MSPEED EQU 003CH
MAXDRIV EQU 003DH
WHEEL EQU 003EF
MAXUSER EQU 003FH
These bytes are equated to point at low memory bytes that can be set and
tested by BYE, SD, KMD, FILE and other programs. MSPEED is always set by
BYE to indicate the speed of the modem. The other 3 are only used if ZCPR2
or ZCPR3 is YES. It is very important to use the same equate values in ALL
programs. Select bytes (if you can't use these) that do not interfere with
your operating system.
MAXDRV EQU 'B'-'@'
MAXUSR EQU 9
If USEZCPR is NO, these values will be used to restrict the caller for
drive/user area access. These values will be stored in MAXDRIV and MAXUSER
bytes everytime BYE answers the phone and checks d/u specs. New values may
be poked into BYE by the BBS program AFTER the user logs in and BYE will
store those new values in MAXDRIV and MAXUSER bytes. The values used above
is the "starting" values for each new caller. If USEZCPR is YES, these
equates are not used. BYE5 will police the system if CHEKDU is YES, or let
your CCP do that is CHEKDU is NO.
SYSDRV EQU 'E'-'@'
SYSUSR EQU 15
When you exit BYE with a ctrl-C, BYE will store these values into MAXDRIV
and MAXUSER. This allows the sysop to "activate" drives and user areas for
his own use locally (like floppies) without having to type a password.
WHEEL byte is also turned on. ZCPR2 or ZCPR3 must be YES for this feature.
These values are also used when the ^B (blank remote modem) function key is
typed by the sysop. This enables Wheel and your local drive/user environment.
Original values are restored when the sysop type ^B the second time to enable
the remote modem.
CHGPATH EQU NO
EXTPATH EQU 0040H
ZCPR2 and ZCPR3 users can set the search path for .COM files with these
equates. ZCMD and NZCPR does not use this feature. If WHEEL byte is on
ZCPR2/3 will search thru the SYSPATH, if WHEEL byte is off, thru the REMPATH.
Define your path(s) at labels SYSPATH and REMPATH. Make sure your implemen-
tation of ZCPR2/3 uses the memory buffer you select for EXTPATH. Later ZCMD2n
versions can also use this feature. The ^B (blank the remote modem) function
key will enable the SYSPATH, and the second ^B (enable the remote modem) will
enable the REMPATH defined in your EXTPATH.
-----------------------------------------------------------------------------
--------------------------
BYE5's EXTENDED BDOS CALLS
--------------------------
BYE5 uses an extended set of BDOS calls not used by CPM 2 or CPM 3. These
commands allow a powerful programming tool for programs designed to run while
BYE5 is online. It is the programmers responsibility to make sure BYE5 is
indeed online before using the extended BDOS calls. This test is made by
using a standard set/get user call (function 32) with a unique value in E.
If the A register returns with 77, then you may proceed with using the BDOS
calls 61 thru 85. Remember, command numbers are loaded in register C, and
entry data is passed in register DE, and exit data is returned in HL or A,
depending upon the particular BDOS call.
32 BYE EXISTANCE TEST
This will test if BYE is there if register E = 241 (decimal).
MVI C,32 ; Sample call
MVI E,241 ; Is BYE running?
CALL BDOS
CPI 77 ; If BYE is there (A) will = 77
JNZ NOBYE ; BYE wasn't there
CALL DOIT ; Yes, BYE is there, do your thing
; You can now use BDOS calls 61 thru 85 described below
The label in the left margin corresponds to the BYE5 label affected by the
BDOS call in the following descriptions:
MDINST 61 Get modem input status
Entry: n/a
Exit: if not ready: A=0 & zero flag set
if ready: A=255 & zero flag cleared
MDOUTST 62 Get modem output status
Entry: n/a
Exit: if not ready: A=0 & zero flag set
if ready: A=255 & zero flag cleared
MDOUTP 63 Output 8 bit character to modem
Call modem output status first, or you may overrun the modem.
Entry: E= 8 bit character
Exit: n/a
MDINP 64 Input 8 bit character from modem
Call modem input status first, or you may input garbage.
Entry: n/a
Exit: A= 8 bit character
MDCARCK 65 Get carrier status
Entry: n/a
Exit: if carrier present: A=255 & zero flag cleared
if no carrier: A=0 & zero flag set
CONSTAT 66 Get local console input status
Entry: n/a
Exit: if not ready: A=0 & zero flag set
if ready: A=255 & zero flag cleared
CONIN 67 Get 7 bit character from local console
(Use CONSTAT function 66 to see if character is ready)
Entry: n/a
Exit: A= character
VCONOUT 68 Send 7 bit character to local console
(loop until console ready)
Entry: E= character to send
Exit: n/a
MXDRV 69 Set/Get maximum drives allowed on system
Entry: E= drive (0=A:, 1=B:, etc)
if E=255 then return current setting
Exit: if E=255 then A= current maximum drive
MXUSR 70 Set/Get maximum user area allowed on system
Entry: E= user area (0=0, 1=1, etc)
if E=255 then return current setting
Exit: if E=255 then A= current maximum user area
TOVAL 71 Set/Get no-activity timeout (minutes)
Entry: E= number of minutes allowed (between 1 and 254)
if E=255 then return current setting
Exit: if E=255 then A= current setting
NULLS 72 Set/Get number of nulls
(after carriage return)
Entry: E= nulls (between 0 and 9 only! (or 255))
if E=255 then return current setting
Exit: if E=255 then A= current number of nulls
ULCSW 73 Set/Get upper/lower-case flag
Entry: if upper case only: E=32
if upper/lower case: E=0
if read current setting: E=255
Exit: if E=255 then A= current setting
LFEEDS 74 Set/Get line feed-masking
Entry: if ok to send line feeds: E=0
if not ok: E=1
if read current setting: E=255
Exit: if E=255 then A= current setting
WRTLOC 75 Set/Get RBBS WRTLOC flag
Entry: To enable BYE to hangup E=0
To disable BYE hangup E=1
if read current setting: E=255
Exit: if E=255 then A= current setting
HARDON 76 Set/Get hardlog status flag
(will do nothing if HARDLOG=NO)
Entry: if disable hardlog: E=0
if enable hardlog: E=1
if read current setting: E=255
Exit: if E=255 then A= current setting
MDMOFF 77 Set/Get modem squelch flag
Entry: Set modem I/O on: E=0
Set modem I/O off: E=1
if read current setting: E=255
Exit: if E=255 then A= current setting
BELLON 78 Set/Get console bell enable
Entry: To disable console bell: E=0
To enable console bell: E=1
if read current setting: E=255
Exit: if E=255 then A= current setting
RTCBUF 79 Return address of RTC buffer
Entry: n/a
Exit: HL = address of RTC buffer
(A)= current time on system - binary
Caution!! This call forces BYE to call TCHECK (if TIMEON is YES) and will
hangup on the caller if his time is up. If you are using this call to
collect exit data for your BBS or Log files, be sure to use BDOS call
81 to get/save his current MXTIME, the use 81 to set MXTIME to 0 (prevents
BYE from logging him off), then use this call to collect your data, and
finally use 81 to restore his original MXTIME (enables BYE to log him off if
his MXTIME is exceeded). If TIMEON is NO and CLOCK is YES, you may use this
call without the 81 sequence.
Format: byte hours BCD read only <--HL
byte minutes BCD read only <--HL+1
byte seconds BCD read only (etc)
byte century BCD read only
byte year BCD read only
byte month BCD read only
byte day BCD read only
byte time online binary read only
byte <reserved> binary reserved
byte current hour binary read only
byte current minute binary read only
byte login hour binary read/write
byte login minute binary read/write
Note: If you don't have the clock reader installed, the
first byte of the buffer will be 099 HEX. This way
application programs can sense NO clock.
LCDATA 80 Return address of LASTCALR buffer (for whokey)
Entry: n/a
Exit: HL = address of buffer
The buffer has room for 78 ascii characters, which will be
displayed (^W or warmboot) to sysop only. BBS programs can store
data into this buffer for the sysop, or if READLC is YES, BYE
will read your LASTCALR file on the first warmboot and store
the data. NO25TH must be YES in either case to use this feature.
Note: If the first byte of the LASTCALR buffer is a space,
the buffer has not been programed the BBS or by BYE.
MXTIME 81 Set/get maximum time allowed on system
Entry: E = number of minutes allowed (1..254)
if E = 0 then unlimited time allowed on system
if E = 255 then return current setting
Exit: if E = 255 then A= current time allowed on system
LHOUR 82 Set initial login time
LMIN Entry: D = hours (0..23)
E = minutes (0..59)
Exit: n/a
RMTOS 83 Print "Time on system nn minutes." message.
Entry: n/a
Exit: n/a
This call also forces BYE to call TCHECK and will log the user off if his
MXTIME is up (TIMEON EQU YES).
SRUDEF 84 Call a SubRoutine U DEFine in BYE5.
Entry: Any value in any register except A and C
Exit: Whatever you write in your subroutine
If you install your own application subroutine in BYE5 at area +++Install
SubRoutine U DEFine +++ near the beginning of BYE5, you may access this
subroutine with this call. Your subroutine must be named SRUDEF and exit
via a RET instruction. You may pass data to your SRUDEF routine in any
register except A and C. SRUDEF can return data to your calling program
in any/all register(s).
LCPTR 85 Set/get LCPTR value
Entry: E = 255 to get current value ( D = n/a)
E = 0 to set a new value
D = 0-255 (new value to store if E = 0)
EXIT: A = current value if E = 255 on entry
n/a if E = 0 on entry
The byte LCPTR serves two purposes: When a user is logged in it contains
an 8-bit flag register (bit mapped) as follows:
BIT Meaning Bit status
0 Registration required? 0 = No, 1 = Yes
1 Allowed access to BBS? 0 = No, 1 = Yes
2 Allowed to Read messages on BBS? 0 = No, 1 = Yes
3 Allowed to Enter messages on BBS? 0 = No, 1 = Yes
4 Allowed cp/m access? 0 = No, 1 = Yes
5 Download allowed with KMD? 0 = No, 1 = Yes
6 Upload allowed with KMD? 0 = No, 1 = Yes
7 Privledged user? 0 = No, 1 = Yes
Your BBS software can use these bits at LCPTR for its own use, but if KMD11,
or later, has RESUSR equated YES, it will examine bits 5 and 6 of LCPTR and
respond accordingly. A good way to prevent abuse of downloads and no uploads
by your users. If MSGFIL is YES in BYE5 and KMD and RESUSR is YES in KMD,
then bit 3 is checked by KMD to allow/disallow the "RM" option.
When a user is NOT logged in....
the LCPTR byte is used to store the previous callers' Time-on-system
data for use by your ENTRY/EXIT file. You may use BDOS 85 Call for both
purposes..ie your program(s) know if a user is logged on or not.
DISKLOG 86 Set/Get Disklog status
Entry E = 0FFh Return status in A
E = 1 Turn disk log ON
E = 2 Turn disk log OFF
Exit (if E = 0FFh on entry)
A = 77 DISKLOG not available
A = 00 DISKLOG available but now OFF
A = 0FFh DISKLOG available and now ON
DISKLOG 87 Write ascii string to the disklog
Entry DE = Address of ascii string (terminated with 0)
Exit n/a
Be sure to test for the status of DISKLOG with
function 86 before using this function.
IMDONE 88 Hangup and leave the phone in a "no-answer or busy mode"
and return control to the calling program.
Entry E = n/a
Exit BYE5 has hung up on the caller and has left the phone
either busy or DTR low so it won't answer (depends on your
choice of other equates in BYE5).
End of extended BDOS calls.