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
Text File  |  2000-06-30  |  42KB  |  988 lines

  1.  
  2. BYE5.DOC    - Thru BYE510 -
  3. 08/01/86   Written by Wayne Masters, Potpourri, 408-378-7474
  4.  
  5.  NOTE:  This program is copyrighted (c) 1986 by  Wayne Masters, Irv Hoff,
  6.      and George Peace.  All rights reserved.  Users are hereby granted
  7.      a limited license to copy this program for personal use only.
  8.      The program may be distributed unmodified to all interested
  9.      parties.  No fee or other consideration shall be accepted by
  10.      any party or parties.    In accordance with the copyright law
  11.      of 1978, form TX has been sent to the U.S. Government Copy-
  12.      right Office.
  13.  
  14.      =     =     =     =     =     =     =     =
  15.  
  16.      If you have changes that you would like to see in a forthcoming
  17.      general release, please forward them for consideration.  This
  18.      seems to be the only way to control the modifications that have
  19.      run rampant in previous versions of public domain programs.  It
  20.      has taken many hours to correct problems some of these changes
  21.      have caused, particularly when used with assemblers that have
  22.      characteristics different from the one being currently used or
  23.      if other equates are selected.
  24.  
  25.      Send any suggestions to:
  26.  
  27.     Wayne Masters            Irv Hoff, W6FFC     George Peace
  28.    (408) 378-3798 voice     (415) 948-2166 voice    (717) 657-0285 voice
  29.  
  30.         Potpourri RCPM        CP/M-3 George Peace
  31.         (408) 378-7474        (717) 657-8699
  32.  
  33.      =     =     =     =     =     =     =     =
  34.  
  35.   Please read the BYE5.HIS file to see the most recent update history.
  36. Also refer to B5-CPM3.DOC for additional instructions on installing BYE5
  37. in a CP/M 3 environment.
  38.  
  39.   BYE5 uses a special loader to relocate its run-time code under the CCP.
  40. The run-time code resides under the CCP forever, or until the sysop re-
  41. moves it with the CTRL-C option.  The size of the run-time code will vary
  42. according to the equates you choose.  Running a large BBS program may limit
  43. the number of "bell and whistle" equates that you the installer can choose,
  44. depending on the size of your TPA.  User selectable equates are discussed
  45. in order of occurance and if not mentioned are normally not modified.
  46.  
  47.   BYE5 uses an extended BDOS call convention that can be a powerful software
  48. tool for writing programs designed to run under BYE.  The extended BDOS
  49. calls are explained later in this file.
  50. -----------------------------------------------------------------------------
  51.  
  52. INSTALLING BYE5
  53. ---------------
  54.  
  55.   First, select the correct insert for your computer from the BYE5-INS.LBR.
  56. It may be necessary to customize or modify an existing insert to match your
  57. hardware environment.  If you have difficulty finding or writing an insert
  58. for your system feel free to call Irv Hoff, 415-948-2166 or myself at 408-
  59. 378-3798.  CPM3 users can contact George Peace at 717-657-0285.  We will
  60. work with you to develop the insert for your computer.
  61.   If your computer has a clock then select the B5C-n insert from the B5-CLOCK
  62. library.  Again, if you can't find one that matches your system feel free
  63. to call for help.
  64.  
  65.   You now need to use your favorite text editor to install the insert(s)
  66. and select your run-time equates.  Find the area near the beginning of BYE5
  67. marked ++++ Install your I/O port insert here ++++ and insert your computer
  68. I/O routine.  Next, if you have a clock find the area marked ++++ Install
  69. your TIME routine here ++++.  Delete the existing code (used as an example)
  70. from inside the IF CLOCK OR RSPEED to ENDIF statements and install your
  71. clock code in its place.
  72.  
  73.   You may also install a subroutine in BYE that does a specific job for your
  74. unique application.  Look for the area marked +++ Install SubRoutine U DEFine
  75. and insert your application subroutine.  You may access this subroutine from
  76. programs running under BYE5 with the BDOS 84 call described later in this file.
  77. -----------------------------------------------------------------------------
  78.  
  79. BYE5 OPTIONS
  80. ------------
  81.  
  82.   Using your editor, set the following equates to match your system and/or
  83. preference.  Comments are made to help you avoid creating a version of BYE
  84. too large for your run-time environment.  The equate and its original option
  85. are given first.  Equates not mentioned are normally left alone.
  86. -----------------------------------------------------------------------------
  87.  
  88. --------------------
  89. SYSTEM CONFIGURATION
  90. --------------------
  91.  
  92. CCPL EQU 8
  93.  
  94.   What is the length of your CCP and any special disk driver used under it?
  95. Normally it's 2K (8 x 256).  Some Apple configurations require 9, and others
  96. even more.  The Ozzie with Trantor hard disks may vary from 24 down, depend-
  97. ing on the version of Trantor software.  If BYE doesn't work with 8, try
  98. larger numbers until you have the minimum size that works.  Remember, the
  99. larger this number, the smaller your TPA.  If you are using Trantor's WL
  100. hard-disk bios then set CCPL to 0 and set TRANWL to YES and save 2K of TPA.
  101. CPM 3 does not use this equate.
  102. -----------------------------------------------------------------------------
  103.  
  104. -------------
  105. MODEM EQUATES
  106. -------------
  107.  
  108. IMODEM EQU NO
  109.  
  110.   If you have a dumb auto-answer modem, or if you can make your modem emulate
  111. a dumb auto-answer modem, then leave this equate NO.  If you have an intelli-
  112. gent modem such as Hayes, Anchor, Pro-Modem, USR or Maxwell, then set this
  113. equate YES.
  114.  
  115. B5IM EQU NO
  116.  
  117.   If IMODEM is YES, does your modem use the "AT" protocol (some call it Hayes
  118. protocol)?  If so, set this equate YES.  BYE5 has internal code installed to
  119. control these modems.  If you have an intelligent modem that does not support
  120. the "AT" protocol you must set this equate NO and install your own modem
  121. control code at the location marked ++++ Install your modem dependant code
  122. here ++++.  BYE5 does not support internal 300 baud modems unless they can
  123. be made to "act dumb".  The old PMMI modems can "act dumb" but are only
  124. supported at 300 baud.
  125.  
  126. HS9600 EQU NO
  127. HS4800 EQU NO
  128. HS2400 EQU NO
  129. HS1200 EQU NO
  130. HS300  EQU NO
  131.  
  132.   What is the highest speed of your modem?  You MUST set one, and only one,
  133. of these equates YES.
  134.  
  135. DOATZ EQU NO
  136.  
  137.   The "ATZ" command will cause some modems to revert to auto-answer and
  138. create problems if BYE5 is trying to reinitialize the modem between calls.
  139. Try your installation with this set NO.  If your modem absolutly must be
  140. reset with ATZ command between calls, then set this YES.  Much faster when
  141. set NO.
  142.  
  143. ECHO EQU NO
  144.  
  145.   If B5IM is YES, does your modem echo the commands correctly from the "AT"
  146. command set?  Be careful!  Some modems echo fine until the RING is detected,
  147. then won't echo the "ATA" command.  Modems known to echo correctly include
  148. Hayes, Promodem, Courier and Maxwell.  Be sure to set the switches on these
  149. modems to ECHO commands.  Set ECHO EQU YES for these modems and this will
  150. assure a reliable initialization between calls.
  151.  
  152.   Modems that are known not to echo after "RING" is detected include the
  153. Anchor and most USR Passwords and S-100's (the Courier works correctly).
  154. Leave ECHO EQU NO for these modems.
  155.  
  156. ANCHOR EQU NO
  157.  
  158.   If you have a Mark XII set this YES.  The Mark XII does not understand
  159. S2=128, M0, S10=25 and X1 commands.
  160.  
  161. NODTR EQU NO
  162.  
  163.   Set this YES if you have a Mark XII (which does not support DTR) or if
  164. your computer/modem interface is not wired for DTR.  Ozzie-1 owners should
  165. note that BYE5 can handle your lack of DTR but can't work without the
  166. hardware mod to sense carrier status from your modem.  You have to install
  167. the hardware mod for carrier-detect, so you may as well include the DTR
  168. fix as well (normally both problems are fixed with the hardware mod kit).
  169.  
  170. NOATA EQU NO
  171.  
  172.   (See ECHO).  Some modems, like the Anchor Mark XII, stop echoing commands
  173. after "RING" is detected but will still execute the ATA command.  Others,
  174. like the USR Password and S-100 stop echoing AND will NOT execute the ATA
  175. command.  Set this YES for the older USR Passwords and S-100's and NO for
  176. the Mark XII.
  177.  
  178. OFFHK EQU NO
  179.  
  180.   The question is "do you want your phone line made busy" when you are using
  181. your computer locally, or do you want it to RING, but not answer.  If you set
  182. this equate YES, BYE5 will send ATH1M0 to your modem when you exit to cp/m
  183. or use the "E" option.  Saying NO will send ATS0=0 (don't answer the phone).
  184. In either case, DTR is left ON to prevent some modems from reverting back to
  185. their default state.
  186.  
  187. SHORTB EQU NO
  188.  
  189.   BYE5 sends a 29 character command string to initialize the modem.  Some
  190. modems, such as the MULTIMODEM by MultiTech, have a short command buffer.
  191. Set this equate to YES, and BYE5 will send two short command strings
  192. instead of one long command string.
  193. -----------------------------------------------------------------------------
  194.  
  195. ---------------
  196. GENERAL EQUATES
  197. ---------------
  198.  
  199. HARDLOG EQU NO
  200.  
  201.   YES, if you want BYE5 to send everything the remote caller types to your
  202. list device.  Your BBS, or transient program can then toggle this on/off
  203. at will by poking HARDON dynamically.  (Poke 0FFH if you want printer on,
  204. 0H if you want if off.)
  205.  
  206. PRINTER EQU NO
  207.  
  208.   Set YES if your BBS sends error messages to your printer, or if you want
  209. to toggle printer on from your local console with ^P.  You can use this
  210. option with or without HARDLOG option.  If your modem I/O is done using
  211. printer I/O, then say YES to this equate.  This causes BYE5 to patch your
  212. jump table correctly for modem I/O.
  213.  
  214. COMFILE EQU NO
  215. COMDRV  EQU 'A'
  216. COMUSR  EQU 14
  217.  
  218.   Set COMFILE YES if you run a BBS program and want BYE to load and execute
  219. it after carrier detect.  (See RBBS equates).  COMDRV and COMUSR must be
  220. set to the drive and user area where you keep your BBS entry program.  If
  221. you run a RCP/M without a BBS then leave this NO.
  222.  
  223. DISKLOG EQU NO
  224. LOGUSR  EQU 14
  225. LOGDRV  EQU 'A'
  226.  
  227.   Set DISKLOG to YES if you want BYE5 to capture and write to a disk file
  228. all the remote callers activity.  The data is written to a LOG.SYS file
  229. located on the drive/user area specified in the equates above.  Extended
  230. BDOS calls 86 and 87 (described later in this file) can be used with this
  231. feature.  WARNING to sysops with small TPAs....this code will use about
  232. 1024 bytes of memory.  CP/M 3 users normally have enough TPA, and small
  233. BBS programs like PBBS running on CP/M 2.2 will work ok, but large BBS
  234. programs like MBBS will probably not work correctly (with cp/m 2.2).
  235.  
  236. EXFILE EQU NO
  237. EXDRV  EQU 'A'
  238. EXUSR  EQU 0
  239.  
  240.   Do you want BYE5 to load and execute a .COM file anytime a user is logged
  241. off?  If YES, BYE5 will execute your EXIT file whenever any of the following
  242. conditions occur:
  243. 1) User types BYE (to log-off)
  244. 2) Carrier is lost (from caller)
  245. 3) You type the TWIT key to log him off
  246. 4) Location 00H <>C3H (used by your BBS Goodbye option to log off a caller)
  247.    Note!  If MSGFIL is YES, location 00H is allowed to be altered to 0C2H
  248.    as a flag to load your Add-Message(s) file without calling EXFILE.
  249. 5) No-activity timeout (alias sleepy-caller expires).
  250. 6) Time-on-system exceeded.
  251.  
  252.   Since a user can't be logged in, the following conditions cause hangup and
  253.   reset WITHOUT calling your EXIT file:
  254.  
  255. 1) RSPEED PrimeTime violation
  256. 2) BYE5 PassWord mismatch
  257. 3) "Nulls if needed" question flunked.
  258. 4) Remote modem's speed not detected within 30 seconds of answering.
  259.  
  260.   Your EXIT file must preserve the stack and do a RETurn (not warmboot) to
  261. re-enter BYE5.  EXDRV and EXUSR must be set to the drive and user area where
  262. you keep your EXIT.COM file.  MBBS users have a special exit scheme and must
  263. say NO to this equate.  PBBS users must say YES.
  264.  
  265. EXRET  EQU NO
  266.  
  267.   An exception to the above EXIT file RET may be made if you set this equate
  268. YES.  Some higher order languages like MBASIC, C and Pascal make it difficult
  269. if not impossible, to save the callers stack, restore it later, then return.
  270. This equate allows you to select an easy way to leave your EXIT.COM file and
  271. return to the proper location in BYE5.  Simply store (or POKE) a small r, 'r'
  272. into location FCB+1 (5DH), then exit your EXIT routine with a warmboot or
  273. SYSTEM command.  BYE5 will trap the warmboot and reset the system for the next
  274. caller.
  275.  
  276. BYHANG EQU NO
  277.  
  278.   Do you want BYE5 to say goodbye and hangup on the caller before loading and
  279. executing your exit file?  OxGate and Metal users running an EXIT file 
  280. normally say YES.  PBBS v2.0 uses YES, PBBS v3.0 and up uses NO.
  281.  
  282. MSGFIL EQU NO
  283.  
  284.   KMD11 and later versions of XMODEM allow specially formatted message files
  285. to be uploaded with the "RM" command.  KMD will set location 00H to 0C2H 
  286. and Warmboot after an "RM" file has been uploaded.  BYE5 traps the Warmboot
  287. and will load and CALL your MSGFIL if this equate is YES.  Your MSGFIL must
  288. be located on the same d/u as COMFILE.  It should append the uploaded file
  289. to your existing message base, preserving the stack, and RETurn (not Warmboot)
  290. to re-enter BYE5.  You may choose the name of your MSGFIL.com at label MSGFCB:
  291. Default name is MFMSG.COM.  MBBS users normally say YES to this equate.
  292.  
  293. NO25TH EQU NO
  294.  
  295.   If your console does not have a 25th status line, you can set this equate
  296. YES and see who's on your system with your local function key (^W).  (See
  297. READLC).  BYE5 has a  character buffer that can store data poked by the
  298. RBBS program, or from the LASTCALR file.  If READLC is NO, the RBBS program
  299. must poke data into this buffer.  You may also print a customized "Header"
  300. above this data to show what various fields mean.  Install your customized
  301. header at label LCHEAD:
  302.  
  303. NO25BF EQU 78
  304.  
  305.   How large a buffer do you want for your "NO25TH" data?  METAL, OxGate and
  306. PBBS use 78 bytes.  MBBS and QBBS only use 65.
  307.  
  308. READLC EQU NO
  309. LCDRV  EQU 'A'
  310. LCUSR  EQU 14
  311.  
  312.   If your BBS program does not store lastcalr data directly into BYE5 you
  313. may set READLC EQU YES and BYE5 will read the contents of your LASTCALR
  314. file on the first warmboot to CP/M.  You can display who's on locally after
  315. that with ^W.  Some BBS programs (MBBS and later versions of OxGate) store
  316. this data themselves.  Run-time code is saved if this is NO.  Be sure to
  317. set LCDRV and LCUSR to indicate where your LASTCALR file is located.
  318.  
  319. SKTERM EQU NO
  320.  
  321.   BYE5 will wait for the remote caller to reach terminal mode before passing
  322. control to your BBS program.  This assures the sysop that their opening
  323. welcome or log-in message will be read by the caller.  If your BBS program
  324. has this feature built in, just set SKTERM to YES, and BYE5 will pass control
  325. to your BBS as soon as a carrier/speed has been detected.
  326.  
  327. WBDRIV EQU 'A'-41H
  328.  
  329.   What drive do you want to warmboot on the first entry to cp/m?  Most systems
  330. will leave this as A, other systems with add-on hard disk hardware may want
  331. C or your choice...(Some want to Warmboot to their NEW-FILES drive).
  332.  
  333. WELFILE EQU NO
  334. WELDRV  EQU 'A'
  335. WELUSR  EQU 14
  336.  
  337.   Do you want BYE to type a welcome file after carrier detect?  If you run
  338. a BBS you should set this to NO and delegate that job to your BBS.  This
  339. option creates larger run-time code and may interfere with large BBS programs.
  340. If you run a simple RCP/M without a BBS, set this YES and set WELDRV and
  341. WELUSR to the drive/area where you have your WELCOME file stored.
  342.  
  343. CLRSCR EQU NO
  344. CLRCH1 EQU 1BH
  345. CLRCH2 EQU ':'
  346. CLRCH3 EQU 0
  347. CLRCH4 EQU 0
  348. CLRCH5 EQU 0
  349. CLRCH6 EQU 0
  350.  
  351.   Do you want BYE to clear your screen between calls?  Set CLRSCR to YES,
  352. and BYE will.  Set this to NO and you can still use local function key (^Z)
  353. to clear your screen.  In any case, set the clear screen sequence for your
  354. system into the CLRCH1-CLRCNn bytes.  You can use up to 6 bytes (allowing
  355. 25th line clearing also).  Unused bytes must be zero.
  356.  
  357. PRGRSS EQU YES
  358.  
  359.   Please leave this YES until you are sure everthing works.  It will give you
  360. valuable information to troubleshoot problems, neat summaries, and diagnostic
  361. data.  If you run a large BBS program, this may be set NO to save run-time
  362. code after you have everything working.
  363.  
  364. PRNTGB EQU YES
  365.  
  366.   Do you want BYE5 to print "Goodby, call again..." when user is logged off?
  367.  
  368. PRNTWB EQU NO
  369.  
  370.   Do you want BYE5 to print "Booting CP/M..." message each time your system
  371. warmboots?  Tacky...unless you have an extremely slow system, leave this NO.
  372.  
  373. PWRQD EQU NO
  374.  
  375.   If you run a BBS, delegate asking for a password to your entry program.
  376. This option adds a lot of run-time code to BYE5 and should not be used
  377. except for RCP/M systems without a BBS.  Most private RCP/M systems will
  378. use WELFILE and PWRQD equates since they don't run a BBS.  If you set this
  379. to YES, choose the password needed at label PASSWD.
  380.  
  381. RVIDEO EQU NO
  382. RVON1  EQU 1BH
  383. RVON2  EQU 'G'
  384. RVON3  EQU '4'
  385. RVON4  EQU 0
  386. RVOFF1 EQU 1BH
  387. RVOFF2 EQU 'G'
  388. RVOFF3 EQU '0'
  389. RVOFF4 EQU 0
  390.  
  391.   If your terminal has reverse video, or half intensity capability, you may
  392. set RVIDEO to YES and when a carrier is present BYE5 will display all the
  393. local screen messages in reverse video.  These messages are normally what
  394. you see from typing one of your function keys, but will also include all
  395. messages not being sent out the modem (only you see then).  You have 4 bytes
  396. to specify the command sequence that's required to put your terminal into
  397. reverse video mode (or half intensity) and 4 bytes to command the terminal
  398. back to normal mode.
  399.  
  400. TOVALUE EQU 5
  401.  
  402.   How many minutes of no-activity will you allow?  I usually set this equate
  403. to 2, then allow my BBS program to poke TOVAL with different numbers, depend-
  404. ing on the users' status.  For private systems, set this to 255.  BYE5 sends
  405. a bell to the remote modem every 1 minute of no-activity to remind him that
  406. BYE5 is waiting for an input.  BYE5 will log the caller off if no input is
  407. recieved after TOVALUE expires.  This timer is restarted any time a character
  408. is recieved from the caller.
  409. -----------------------------------------------------------------------------
  410.  
  411. -------------------------------------
  412. SYSTEM AND HARDWARE DEPENDANT OPTIONS
  413. -------------------------------------
  414.  
  415. CPM3    EQU NO
  416. CCPPLUS EQU NO
  417. HISTRSX EQU NO
  418. SDRV1   EQU 1
  419. SDRV2   EQU 0FFH
  420. SDRV3   EQU 0FFH
  421. SDRV4   EQU 0FFH
  422.  
  423. CP/M 2 users should leave these six CP/M Plus equates alone!
  424.   CPM3 must be set to YES for CP/M 3 users.
  425.   CCPPLUS should be set to YES only if CCPnnn+ by Jim Lopushinsky has been
  426. installed to provide ZCPR-like operation.
  427.   SDRV1 thru SDRV4 are used to set the drive search path.  Drive 0=current,
  428. A=1, B=2,... 0FFH is the search path terminator.
  429.   HISTRSX is set YES if you are using the command line history feature of
  430. CCP+.
  431.  
  432. CLOSS EQU 1
  433.  
  434.   How long do you want BYE5 to wait after carrier loss before hanging up the
  435. phone and resetting the system?  You may set this to 2 or 3 seconds for "Call
  436. waiting" options, but normally if the carrier is lost for 1 second or more,
  437. the circuit is lost anyway.  Most systems leave this set to 1.
  438.  
  439. CTRLC EQU 'K'-'@'
  440.  
  441.   Most BBS software changes location 0000H to a CDH (rather than a C3H) to
  442. indicate a warmboot should not be allowed and tells BYE to map ^C to this
  443. character unless location 0000H is a C3 (JMP vs CALL).  If a warmboot occurs
  444. while location 000H is not a C3, BYE will disconnect the modem and reset for
  445. the next caller.  This is the trick you use to log off a user from your BBS
  446. program.  Just alter location 0000H from a C3 to a CD and do a warmboot,
  447. (JMP 0, or SYSTEM) and BYE will log off the user and reset for the next call.
  448.  
  449. DOWNMIN EQU 2
  450.  
  451.   If the sysop uses function key (^O), BYE prints "System going down, you
  452. have n minutes", where "n" is the equate DOWNMIN.  If TIMEON is YES, this
  453. value is added to TON and stored as his new MXTIME, causing auto-logoff
  454. after that time elapses.  This gives the caller time to finish and logoff.
  455.  
  456. LOSER EQU NO
  457.  
  458.   Does your operating system overwrite the BDOS jump table on every warmboot?
  459. The symptoms of this are loss of BYE on the first warmboot.  You must find
  460. the CALL to WARMBOOT in your BIOS and patch labels WBCALL and WMSTRT to the
  461. values for your operating system.  This is a rare occurance and should be
  462. left NO until you are sure you have a loser.  Call voice for further assist-
  463. ance on this equate (I happen to have a loser).
  464.  
  465. MHZ EQU 4
  466.  
  467.   What is the speed of your CPU?  This is very important, since BYE calculates
  468. all the delays on this equate.
  469.  
  470. MOTOR EQU NO
  471.  
  472.   Do you want to turn off/on your disk motors between calls?  If YES, you must
  473. set the equates DISK, DISKON and DISKOFF to match your command port and on/off
  474. commands.  Leave this NO, unless you're sure of what you're doing.  You will
  475. probably need to customize the code to match your disk system, and include the
  476. necessary delays needed for your drives to come "up to speed".
  477.  
  478. TRANWL EQU NO
  479.  
  480.   If you are using the new Trantor WL bios (hard-disk add-on), set this YES
  481. and set CCPL EQU 0.  This will save you 2K of TPA (needed for large BBS's).
  482. If you use Trantor hard disk add-on and you don't have the WL bios version,
  483. you should upgrade your system if you expect to have a decent TPA size.
  484.  
  485. -----------------------------------------------------------------------------
  486.  
  487. -------------
  488. FUNCTION KEYS
  489. -------------
  490.  
  491. LEADIN EQU NO
  492. LEADKY EQU '\'
  493.  
  494.   Do you want to use your function keys without using control characters?
  495. If using a single ctrl character is OK with you, leave these two equates
  496. alone.  The function key table below will work as a single ctrl-key sequence.
  497. If you use a word editor online with your caller and ctrl characters are needed
  498. for your editor, set LEADIN YES, and select a LEADKY that you seldom use.
  499. Your function keys now require the leadky then the character below, in order
  500. to work.  In either case, upper or lower case will be accepted for the keys
  501. selected next.
  502.  
  503. ANSKEY  EQU 'A'-40H
  504. BLNKKEY EQU 'B'-40H
  505. LOGKEY  EQU 'D'-40H
  506. BELLKEY EQU 'G'-40H
  507. LCKEY    EQU 'L'-40H
  508. TWITKEY EQU 'N'-40H
  509. SYSDKEY EQU 'O'-40H
  510. MSGKEY  EQU 'Q'-40H
  511. TIMEKEY EQU 'T'-40H
  512. ULTKEY  EQU 'U'-40H
  513. WHOKEY  EQU 'W'-40H
  514. XITKEY  EQU 'X'-40H
  515. ZCREEN  EQU 'Z'-40H
  516.   The use of these function keys are self explanatory.  Be sure to leave the
  517. "-40H" alone and only change the character inside the ' ' to suit your fancy.
  518. Both upper case and lower case characters will work from your keyboard, even
  519. if LEADIN is YES, but be sure to put only upper case characters inside the
  520. ' ' equates above.
  521. -----------------------------------------------------------------------------
  522.  
  523. ---------
  524. RBBS TYPE
  525. ---------
  526.  
  527. METAL  EQU NO
  528.  
  529. MBBS   EQU NO
  530. MBSDRV EQU 'A'
  531. MBSUSR EQU 0
  532.  
  533. MINICK EQU NO
  534. OXGATE EQU NO
  535. PBBS   EQU NO
  536. QBBS   EQU NO
  537. RBBS   EQU NO
  538. IOVAL  EQU 0
  539.  
  540.   You may select one (or none) of these equates as your BBS.  If you say YES
  541. to one, make sure to say YES to COMFILE and indicate where it is located.
  542. These equates allow certain COM files to be loaded for execution after carrier
  543. is detected.  If you run BBS software that's not included in this table, just
  544. say YES to COMFILE and name your BBS program RBBS.COM and put it on the d/u
  545. specified at the COMDRV/COMUSR equates, and set RBBS to YES.  MBBS users may
  546. select the d/u for MBBS.COM and keep LOGIN.COM and MFMSG.COM on the COMDRV
  547. and COMUSR selected above.
  548.  
  549. LMBELL EQU NO
  550. KILBEL EQU 03BH
  551.  
  552.   If LMBELL is YES, this byte is toggled to set the status of your bell-flag.
  553. Use BELLKEY to alter this status, which allows "CHAT" mode to function.  BYE5
  554. will toggle this byte twice on the first load to show the sysop which condition
  555. he has currently active, (shown twice so we wind up with what we started with).
  556. MBBS and RBBS users normally say YES to this equate.
  557.  
  558. RTOK EQU NO
  559. RTOKFG EQU 020H
  560.  
  561.   Do you need a low-memory byte reset to allow your users to re-enter your
  562. BBS from cp/m (keeps from asking name/password the second time if user is
  563. simply returning from cp/m back to your BBS)?  If you set RTOK EQU YES, BYE5
  564. will set the byte defined by RTOKFG to 00H between calls.  RBBS users normally
  565. say YES to this equate.  PBBS should say YES, and set RTOKFG to the value of
  566. their REENTR value, normally 20H.
  567.  
  568. -----------------------------------------------------------------------------
  569.  
  570. ------------------
  571. CLOCK/TIME EQUATES
  572. ------------------
  573.  
  574. CLOCK EQU NO
  575.  
  576.   If your computer has a clock and you have installed the correct insert for
  577. it in BYE5, set this equate YES.  You do not need a clock to take advantage
  578. of TIMEON if you run KMD04 or later with BYE5.  This feature was added to
  579. allow batch mode in KMD for all systems, with or without a clock.
  580.  
  581. BCD2BIN EQU NO
  582. BIN2BCD EQU NO
  583.  
  584.   These equates allow your clock routine (see CLOCK) to use internal sub-
  585. routines to convert BCD data to binary, or vice-versa.  Check your clock
  586. insert to see if it needs one or both of these (check for CALL BCDBIN or
  587. CALL BINBCD).
  588.  
  589. TIMEON EQU NO
  590. MAXMIN EQU 60
  591.  
  592.   Do you want BYE5 to keep track of how long a user has been on and log him
  593. off after MAXMIN?  This feature will work even if your system does not have
  594. a clock.  Be sure to set CLOCK and TIMEON the same way in KMD04 (or later)
  595. the same way you set them in BYE5.  Time-on-system will be reported to the
  596. local sysop with the function key (^T).  If CLOCK is also YES, the time-on-
  597. system data can also be displayed to the remote user on each warmboot.  Your
  598. RBBS software can dynamically change MAXMIN by poking new values into the
  599. label MXTIME.  Poking a zero gives the user unlimited time on.  If the wheel
  600. byte is set BYE5 also skips checking time on (as if MXTIME was 0).  KMD04
  601. will keep BYE5 updated with TIMEON data if CLOCK is NO and TIMEON is YES.
  602. Batch mode file transfer can now be offered to the general user population,
  603. since BYE5 can limit total time-on with or without a clock.  Suggest setting
  604. MAXMIN to 60 if CLOCK is YES, and to 45 if CLOCK is NO.
  605.  
  606. PRNTOS EQU NO
  607.  
  608.   If TIMEON and CLOCK are YES, do you want BYE5 to display "Minutes left: nn"
  609. each time a WarmBoot occurs?  A handy reminder if needed.  ZCMD2n users will
  610. normally set this NO, since ZCMD2n will display [nn] A0>   and the user knows
  611. he has nn minutes left (or nn minutes on if a special user).  If the Wheel
  612. byte is on or MXTIME =0, BYE5 displays "Minutes on system: nn", rather than
  613. "Minutes left: nn".
  614.  
  615. RSPEED EQU NO
  616. HOUR1  EQU 19
  617. HOUR2  EQU 23
  618. SPEED  EQU 5
  619.  
  620.   Do you want to restrict access to your system during certain hours to the
  621. slower modem callers?  You must have a clock (CLOCK EQU YES), then you can
  622. select the start (HOUR1) and stop (HOUR2) of your restricted time window,
  623. and indicate the slowest modem speed you will accept (5 = 1200).  See the
  624. BPnnn equates to match modem speeds to numbers 0-9.
  625.  
  626. -----------------------------------------------------------------------------
  627.  
  628. -----------
  629. CCP OPTIONS
  630. -----------
  631.  
  632. ZCPR2 EQU NO
  633.  
  634.   Set this to YES if you are running any ccp replacement program that uses
  635. WHEEL byte.  ZCPR1/2, ZCMD1/2, NZCPR1/2 all fit this description.  Others
  636. will also work.  This equate, when set YES, resets WHEEL to 0 for each new
  637. call.  It also allows checking of WHEEL byte for restrictions on time, and
  638. allows special treatment of the caller if WHEEL is on (0FFH).  CPM 3 users
  639. normally set this YES too.  Be sure to equate WHEEL, MAXDRIV and MAXUSER to
  640. low memory bytes that do not interfere with your operating system.  Also, be
  641. sure to use the same values in other programs like SD, KMD, FILE etc.
  642.  
  643. ZCPR3 EQU NO
  644.  
  645.   ZCPR3 is an overkill for a RCP/M system, but if you insist on running it
  646. say YES to this equate.  You must then assemble BYE5 with MAC or equivalant,
  647. and assemble using Z3BASE as MACLIB.
  648.  
  649. USEZCPR EQU NO
  650.  
  651.   If your BBS software pokes BYE with maxdriv and maxuser data set this NO.
  652. METAL and others do this.  If your BBS software stores maxdriv and maxuser
  653. in the low memory bytes equated as MAXDRIV and MAXUSER, then set this YES.
  654. Regardless of how this equate is set, if ZCPR2 or ZCPR3 is YES, BYE will
  655. make sure MAXDRIV and MAXUSER bytes contain the correct data.  You should
  656. always say YES to USEZCPR equates in the other programs used by your system,
  657. like KMD, SD, FILE, etc.
  658.  
  659. CHEKDU EQU NO
  660.  
  661.   Do you want BYE5 to police the drive/user areas or can your CCP do that?
  662. If YES, BYE5 will keep users from logging into drives/user-areas that are
  663. "out-of-bounds" for that user.  This also eats a lot of run-time code.  If
  664. you are using ZCMD or ZCPR, you may choose to have those programs police the
  665. max driv/user functions.  Set YES if you want BYE5 to do it.  A small doc
  666. file is included in this .LBR describing how ZCPR3 users can allocate the
  667. policing to ZCPR3.
  668.  
  669. MSPEED  EQU 003CH
  670. MAXDRIV EQU 003DH
  671. WHEEL   EQU 003EF
  672. MAXUSER EQU 003FH
  673.  
  674.   These bytes are equated to point at low memory bytes that can be set and
  675. tested by BYE, SD, KMD, FILE and other programs.  MSPEED is always set by
  676. BYE to indicate the speed of the modem.  The other 3 are only used if ZCPR2
  677. or ZCPR3 is YES.  It is very important to use the same equate values in ALL
  678. programs.  Select bytes (if you can't use these) that do not interfere with
  679. your operating system.
  680.  
  681. MAXDRV EQU 'B'-'@'
  682. MAXUSR EQU 9
  683.  
  684.   If USEZCPR is NO, these values will be used to restrict the caller for
  685. drive/user area access.  These values will be stored in MAXDRIV and MAXUSER
  686. bytes everytime BYE answers the phone and checks d/u specs.  New values may
  687. be poked into BYE by the BBS program AFTER the user logs in and BYE will
  688. store those new values in MAXDRIV and MAXUSER bytes.  The values used above
  689. is the "starting" values for each new caller.  If USEZCPR is YES, these
  690. equates are not used.  BYE5 will police the system if CHEKDU is YES, or let
  691. your CCP do that is CHEKDU is NO.
  692.  
  693. SYSDRV EQU 'E'-'@'
  694. SYSUSR EQU 15
  695.  
  696.   When you exit BYE with a ctrl-C, BYE will store these values into MAXDRIV
  697. and MAXUSER.  This allows the sysop to "activate" drives and user areas for
  698. his own use locally (like floppies) without having to type a password.
  699. WHEEL byte is also turned on.  ZCPR2 or ZCPR3 must be YES for this feature. 
  700. These values are also used when the ^B (blank remote modem) function key is
  701. typed by the sysop.  This enables Wheel and your local drive/user environment.
  702. Original values are restored when the sysop type ^B the second time to enable
  703. the remote modem.
  704.  
  705. CHGPATH EQU NO
  706. EXTPATH EQU 0040H
  707.  
  708.   ZCPR2 and ZCPR3 users can set the search path for .COM files with these
  709. equates.  ZCMD and NZCPR does not use this feature.  If WHEEL byte is on
  710. ZCPR2/3 will search thru the SYSPATH, if WHEEL byte is off, thru the REMPATH.
  711. Define your path(s) at labels SYSPATH and REMPATH.  Make sure your implemen-
  712. tation of ZCPR2/3 uses the memory buffer you select for EXTPATH.  Later ZCMD2n
  713. versions can also use this feature.  The ^B (blank the remote modem) function
  714. key will enable the SYSPATH, and the second ^B (enable the remote modem) will
  715. enable the REMPATH defined in your EXTPATH.
  716.  
  717. -----------------------------------------------------------------------------
  718.  
  719. --------------------------
  720. BYE5's EXTENDED BDOS CALLS
  721. --------------------------
  722.  
  723.   BYE5 uses an extended set of BDOS calls not used by CPM 2 or CPM 3.  These
  724. commands allow a powerful programming tool for programs designed to run while
  725. BYE5 is online.  It is the programmers responsibility to make sure BYE5 is
  726. indeed online before using the extended BDOS calls.  This test is made by
  727. using a standard set/get user call (function 32) with a unique value in E.
  728. If the A register returns with 77, then you may proceed with using the BDOS
  729. calls 61 thru 85.  Remember, command numbers are loaded in register C, and
  730. entry data is passed in register DE, and exit data is returned in HL or A,
  731. depending upon the particular BDOS call.
  732.  
  733.         32   BYE EXISTANCE TEST
  734.              This will test if BYE is there if register E = 241 (decimal).
  735.  
  736.         MVI     C,32    ; Sample call
  737.         MVI     E,241   ; Is BYE running?
  738.         CALL    BDOS
  739.         CPI     77      ; If BYE is there (A) will = 77
  740.         JNZ     NOBYE   ; BYE wasn't there
  741.         CALL    DOIT    ; Yes, BYE is there, do your thing
  742.                         ; You can now use BDOS calls 61 thru 85 described below
  743.  
  744.  
  745.    The label in the left margin corresponds to the BYE5 label affected by the
  746. BDOS call in the following descriptions:
  747.  
  748. MDINST  61   Get modem input status
  749.              Entry: n/a
  750.              Exit:  if not ready:          A=0 & zero flag set
  751.                     if ready:              A=255 & zero flag cleared
  752.  
  753. MDOUTST 62   Get modem output status
  754.              Entry: n/a
  755.              Exit:  if not ready:          A=0 & zero flag set
  756.                     if ready:              A=255 & zero flag cleared
  757.  
  758. MDOUTP  63   Output 8 bit character to modem
  759.              Call modem output status first, or you may overrun the modem.
  760.              Entry: E= 8 bit character
  761.              Exit:  n/a
  762.  
  763. MDINP   64   Input 8 bit character from modem
  764.              Call modem input status first, or you may input garbage.
  765.              Entry: n/a
  766.              Exit:  A= 8 bit character
  767.  
  768. MDCARCK 65   Get carrier status
  769.              Entry: n/a
  770.              Exit:  if carrier present:    A=255 & zero flag cleared
  771.                     if no carrier:         A=0 & zero flag set
  772.  
  773. CONSTAT 66   Get local console input status
  774.              Entry: n/a
  775.              Exit:  if not ready:          A=0 & zero flag set
  776.                     if ready:              A=255 & zero flag cleared
  777.  
  778.  
  779.  
  780. CONIN   67   Get 7 bit character from local console
  781.              (Use CONSTAT function 66 to see if character is ready)
  782.              Entry: n/a
  783.              Exit:  A= character
  784.  
  785. VCONOUT 68   Send 7 bit character to local console
  786.              (loop until console ready)
  787.              Entry: E= character to send
  788.              Exit:  n/a
  789.  
  790. MXDRV   69   Set/Get maximum drives allowed on system
  791.              Entry: E= drive (0=A:, 1=B:, etc)
  792.                     if E=255 then return current setting
  793.              Exit:  if E=255 then A= current maximum drive
  794.  
  795. MXUSR   70   Set/Get maximum user area allowed on system
  796.              Entry: E= user area (0=0, 1=1, etc)
  797.                     if E=255 then return current setting
  798.              Exit:  if E=255 then A= current maximum user area
  799.  
  800. TOVAL   71   Set/Get no-activity timeout (minutes)
  801.              Entry: E= number of minutes allowed (between 1 and 254)
  802.                     if E=255 then return current setting
  803.              Exit:  if E=255 then A= current setting
  804.  
  805. NULLS   72   Set/Get number of nulls
  806.              (after carriage return)
  807.              Entry: E= nulls (between 0 and 9 only! (or 255))
  808.                     if E=255 then return current setting
  809.              Exit:  if E=255 then A= current number of nulls
  810.  
  811. ULCSW   73   Set/Get upper/lower-case flag
  812.              Entry: if upper case only:         E=32
  813.                     if upper/lower case:        E=0
  814.                     if read current setting:    E=255
  815.              Exit:  if E=255 then A= current setting
  816.  
  817. LFEEDS  74   Set/Get line feed-masking
  818.              Entry: if ok to send line feeds:   E=0
  819.                     if not ok:                  E=1
  820.                     if read current setting:    E=255
  821.              Exit:  if E=255 then A= current setting
  822.  
  823. WRTLOC  75   Set/Get RBBS WRTLOC flag
  824.              Entry: To enable BYE to hangup     E=0
  825.                     To disable BYE hangup       E=1
  826.                     if read current setting:    E=255
  827.              Exit:  if E=255 then A= current setting
  828.  
  829. HARDON  76   Set/Get hardlog status flag
  830.              (will do nothing if HARDLOG=NO)
  831.              Entry: if disable hardlog:         E=0
  832.                     if enable hardlog:          E=1
  833.                     if read current setting:    E=255
  834.              Exit:  if E=255 then A= current setting
  835.  
  836. MDMOFF  77   Set/Get modem squelch flag
  837.              Entry: Set modem I/O on:           E=0
  838.                     Set modem I/O off:          E=1
  839.                     if read current setting:    E=255
  840.              Exit:  if E=255 then A= current setting
  841.  
  842. BELLON  78   Set/Get console bell enable
  843.              Entry: To disable console bell:    E=0
  844.                     To enable console bell:     E=1
  845.                     if read current setting:    E=255
  846.              Exit:  if E=255 then A= current setting
  847.  
  848. RTCBUF  79   Return address of RTC buffer
  849.              Entry:     n/a
  850.              Exit:      HL = address of RTC buffer
  851.                         (A)= current time on system - binary
  852.  
  853. Caution!!  This call forces BYE to call TCHECK (if TIMEON is YES) and will
  854. hangup on the  caller if his  time is up.  If you  are  using this call to
  855. collect exit data  for your  BBS or  Log files,  be sure  to use BDOS call
  856. 81 to get/save  his current MXTIME, the use 81 to set MXTIME to 0 (prevents
  857. BYE from  logging him off),  then use this  call to collect  your data, and
  858. finally use 81 to restore his original MXTIME (enables BYE to log him off if
  859. his MXTIME is exceeded).  If TIMEON is NO and CLOCK is YES, you may use this
  860. call without the 81 sequence.
  861.  
  862.              Format:    byte hours           BCD     read only <--HL
  863.                         byte minutes         BCD     read only <--HL+1
  864.                         byte seconds         BCD     read only (etc)
  865.                         byte century         BCD     read only
  866.                         byte year            BCD     read only
  867.                         byte month           BCD     read only
  868.                         byte day             BCD     read only
  869.                         byte time online     binary  read only
  870.                         byte <reserved>      binary  reserved
  871.                         byte current hour    binary  read only
  872.                         byte current minute  binary  read only
  873.                         byte login hour      binary  read/write
  874.                         byte login minute    binary  read/write
  875.  
  876.              Note: If you don't have the clock reader installed, the
  877.                    first byte of the buffer will be 099 HEX.  This way
  878.                    application programs can sense NO clock.
  879.  
  880. LCDATA  80   Return address of LASTCALR buffer (for whokey)
  881.              Entry: n/a
  882.              Exit:  HL = address of buffer
  883.  
  884.              The buffer has room for 78 ascii characters,  which will  be
  885.              displayed (^W or warmboot) to sysop only.  BBS programs can store
  886.              data into this buffer for the sysop, or if READLC is YES, BYE
  887.              will read your LASTCALR file on the first warmboot and store
  888.              the data.  NO25TH must be YES in either case to use this feature.
  889.  
  890.              Note: If  the first  byte of the LASTCALR buffer is a space,
  891.                    the  buffer has not been programed the BBS or by  BYE.
  892.  
  893. MXTIME  81   Set/get maximum time allowed on system
  894.              Entry: E = number of minutes allowed (1..254)
  895.                     if E = 0 then unlimited time allowed on system
  896.                     if E = 255 then return current setting
  897.              Exit:  if E = 255 then A= current time allowed on system
  898.  
  899.  
  900.  
  901. LHOUR   82   Set initial login time
  902. LMIN         Entry: D = hours (0..23)
  903.                     E = minutes (0..59)
  904.              Exit:  n/a
  905.  
  906. RMTOS   83   Print "Time on system nn minutes." message.
  907.              Entry: n/a
  908.              Exit:  n/a
  909.  
  910. This call also forces BYE to call TCHECK and will log the user off if his
  911. MXTIME is up (TIMEON EQU YES).
  912.  
  913. SRUDEF  84   Call a SubRoutine U DEFine in BYE5.  
  914.          Entry: Any value in any register except A and C
  915.          Exit:  Whatever you write in your subroutine
  916.  
  917. If you install your own application subroutine in BYE5 at area +++Install
  918. SubRoutine U DEFine +++   near the beginning of BYE5, you may access this
  919. subroutine with this call.  Your subroutine must be named SRUDEF and exit
  920. via a RET instruction.  You may pass data to your SRUDEF routine  in any
  921. register except A and C.  SRUDEF can return data to your  calling program
  922. in any/all register(s).
  923.  
  924. LCPTR  85    Set/get LCPTR value
  925.          Entry:  E = 255 to get current value ( D = n/a)
  926.              E = 0   to set a new value
  927.              D = 0-255 (new value to store if E = 0)
  928.  
  929.          EXIT:   A = current value if E = 255 on entry
  930.              n/a if E = 0 on entry
  931.  
  932. The byte LCPTR serves two purposes:  When a user is logged in it contains
  933. an 8-bit flag register (bit mapped) as follows:
  934.  
  935. BIT    Meaning                    Bit status
  936.  
  937. 0    Registration required?          0 = No, 1 = Yes
  938. 1    Allowed access to BBS?             0 = No, 1 = Yes
  939. 2    Allowed to Read messages on BBS?    0 = No, 1 = Yes
  940. 3    Allowed to Enter messages on BBS?    0 = No, 1 = Yes
  941. 4    Allowed cp/m access?            0 = No, 1 = Yes
  942. 5    Download allowed with KMD?        0 = No, 1 = Yes
  943. 6    Upload allowed with KMD?        0 = No, 1 = Yes
  944. 7    Privledged user?            0 = No, 1 = Yes
  945.  
  946. Your BBS software can use these bits at LCPTR for its own use, but if KMD11,
  947. or later, has RESUSR equated YES, it will examine bits 5 and 6 of LCPTR and
  948. respond accordingly.  A good way to prevent abuse of downloads and no uploads
  949. by your users.  If MSGFIL is YES in BYE5 and KMD and RESUSR is YES in KMD,
  950. then bit 3 is checked by KMD to allow/disallow the "RM" option.
  951.  
  952. When a user is NOT logged in....
  953. the LCPTR byte is  used to store the previous callers' Time-on-system
  954. data for use by your ENTRY/EXIT file.  You may use BDOS 85 Call for both
  955. purposes..ie your program(s) know if a user is logged on or not.
  956.  
  957. DISKLOG  86    Set/Get Disklog status
  958.  
  959.         Entry    E = 0FFh  Return status in A
  960.             E = 1     Turn disk log ON
  961.             E = 2      Turn disk log OFF
  962.  
  963.         Exit (if E = 0FFh on entry)
  964.             A = 77      DISKLOG not available
  965.             A = 00      DISKLOG available but now OFF
  966.             A = 0FFh  DISKLOG available and now ON
  967.  
  968. DISKLOG  87    Write ascii string to the disklog
  969.  
  970.         Entry  DE = Address of ascii string (terminated with 0)
  971.  
  972.         Exit n/a
  973.             Be sure to test for the status of DISKLOG with 
  974.             function 86 before using this function.
  975.  
  976. IMDONE   88    Hangup and leave the phone in a "no-answer or busy mode"
  977.         and return control to the calling program.
  978.  
  979.         Entry  E = n/a
  980.  
  981.         Exit  BYE5 has hung up on the caller and has left the phone
  982.         either busy or DTR low so it won't answer (depends on your
  983.         choice of other equates in BYE5).
  984.  
  985.  
  986.   End of extended BDOS calls.
  987.  
  988.