IMD 1.16: 26/05/2007 17:38:14 BYE510C.ASM .DOC .HIS (01 1200 BAUD KENMORE) BYE510C ASM BYE510C ASM !BYE510C ASM"#$%&'()*+,-./01BYE510C ASM23456789:;<=>?@ABYE510C ASMBCDEFGHIJKLMNOPQBYE510C ASMRSTUVWXYZ[\]^_`aBYE510C ASM@bcdefghiB5IM-1 DOC9jklmnopqBYE5 DOCrstuvwxyz{|}~BYE5 DOCBYE5 DOCLBYE5 HISBYE5 HISU- 010; updated to incorporate alterations documented in -bye510.fix ; BYE510 - REMOTE CONSOLE PROGRAM FOR CP/M AND MODEM - 08/04/86 ; ; For use with CP/M 2 or CP/M 3 ; ; ; NOTE: Read the BYE5.HIS in this .LBR to review ; update history and to see changes imple- ; mented by this version. ; ; ; BYE5 replaces all previous BYE2, BYE3, BYE4, BYE+, and MBYE series and ; also supports the latest available technology for RCP/M systems. BYE5 ; will work with KMD04 and XMODEM-116 or later revisions. ; ;======================================================================= ; ; 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 Copyright 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/call any suggestions or requests for help 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 ; ; = = = = = = = = ; ; If using M80, remove the ";" at the beginning of the ASEG line. ; ; ASEG ; Needed for M80, but RMAC can't handle it ; ; This program allows modem callers to use a CP/M system just as if they ; were seated at the system console. Special assembly-time options al- ; low limiting the caller's access by password and/or access to only a ; message-service program. A number of external inserts are available ; to adapt this program to various computers, clocks and modems. It ; may be assembled with ASM, LASM, MAC, RMAC, SLRMAC or M80. If the ; ZCPR3 equate is YES, a macro assembler such as MAC, M80 or SLRMAC ; will be required. If the program will not assemble correctly with ; M80, check the insert that was added, it likely is not configured ; properly. ; ; BYE5 will continue supporting what the Sysop's organizations have re- ; quested, not personal preferences. ; - Wayne Masters ; ;======================================================================= ; ; The following files are inside this library to assist you in installa- ; tion: ; ; BYE5.DOC For general installation and extended BDOS functions ; B5-CPM3.DOC Specific instructions for CP/M 3 installation ; BYE5.HIS BYE5 update history (read this to see latest features) ; BYE5-INS.INF Computer-specific inserts currently available (CP/M 2 & 3) ; B5-TIME.INF Clock inserts currently available (CP/M 2 & 3) ; B5IM-1.DOC Intelligent (smart) modem configuration information ; BYE5nnC.AQM Condensed version of BYE5 for small floppy based systems ; ;======================================================================= ; ; If the CPM3 equate is YES, BYE5 uses an RSX loader to attach itself to ; your operating system (see B5-CPM3.DOC). For CP/M-2 users, (CPM3 NO), ; BYE5 uses a special loader that is built into the program to automati- ; cally move itself below CCP. This does not require any alteration in ; the location of CP/M by using MOVECPM. All you need to do is: (1) ; choose the desired options, (2) patch in the insert for your computer ; in the special area near the start marked "+++ Install your I/O port ; insert here +++", (3) patch in the insert for your clock at label TIME ; (if CLOCK is YES), (4) then finish editing, assemble, load and use. ; ; Most users of this program will have a modem such as an Anchor, Hayes, ; ProModem, U.S.Robotics, or Racal Vadic Maxwell. All these types are ; "intelligent" modems. If using this type of modem, set the IMODEM ; and B5IM equates to 'YES'. Otherwise leave them set to 'NO' and BYE ; assumes you have a "dumb" auto-answer modem, (such as a Bell 212A). ; This readily adapts the program to a wide variety of modems and I/O ; serial types. ; ; NOTE: Two support libraries exist for BYE5... ; BYE5-INS.LBR contains all available computer-specific inserts ; B5-CLOCK.LBR contains all available clock inserts. ; ; Be sure to check Potpourri for the latest version of these inserts. ; Many have been corrected and/or updated by users of BYE5 and the one(s) ; you have may not be the latest version. ; ; The program does the following: ; ; If you type BYE E, BYE will load and execute as though it has ; a valid carrier or caller. Handy for debug, else it: ; ( The E option won't work on an Osborne 1) ; ; 1) Hangs up the phone ; 2) Awaits ring if B5IM is YES, (or carrier detect if B5IM is NO) ; allows exit to CP/M if local KEYB types CTL-C ; 3) Answers the phone and outputs carrier ; 4) Awaits incoming carrier. If none found in 30 seconds goes ; back to step 1 ; 5) Detects the speed of caller and sets local cpu to that speed ; 6) Asks number of nulls (0-9) (optional) ; 7) Sets the log-in time (if TIMEON is YES) ; 8) Types the "WELCOME" file from disk, (optional) allowing ; CTL-C to skip it ; 9) Asks for a password (optional), allowing 3 tries to get ; it right. When entered drops into CP/M ; 10) Caller can leave by hanging up, (any time carrier is ; lost, it waits then goes back to step 1) or the caller ; may type the program name (BYE). ; - Notes by Wayne Masters ; ;======================================================================= ; MAIN EQU 5 VERS EQU 10 MONTH EQU 08 DAY EQU 01 YEAR EQU 86 ; ; ; System equates ; NO EQU 0 YES EQU NOT NO ; For conditional assembly ; ; ; You will likely also want to change the password, located below at ; label 'PASSWD' (if you set PWRQD YES). If you are using a BBS .COM ; file then PWRQD is normally left NO. ; ;*********************************************************************** ; ; OPTION CONFIGURATION SECTION ; ;*********************************************************************** ; ;----------------------------------------------------------------------- ; BYE5 configuration ; ; LOCMD EQU 61 ; BYE's lowest extended BDOS call HICMD EQU LOCMD+27 ; BYE's highest extended BDOS call CCPL EQU 0 ; Number of sectors for CCP size (norm ; Is 8. Apples with Micrsoft CP/M ; V2.23+ use 9. Systems w/Trantor WL ; BIOS, set to 0 and set TRANWL YES. ; For older versions of Trantor BIOS ; Start with 24 and work down until it ; Stops working (typically 24 or 16). ; An updated Trantor (WL) BIOS is ad- ; Vised for RCP/M use if running a ; Large BBS program. CP/M-3 does not ; Use this or TRANWL equates. ; ;----------------------------------------------------------------------- ; Modem Type ; IMODEM EQU yes ; Yes, for intelligent modem, including ; Hayes B5IM EQU yes ; Yes, your modem uses AT protocol, like ; Hayes ; ; ; Set one (and only one) of the following HS equates to YES ; HS9600 EQU NO ; Yes, if modem's high speed is 9600 bps HS4800 EQU NO ; Yes, if modem's high speed is 4800 bps HS2400 EQU NO ; Yes, if modem's high speed is 2400 bps HS1200 EQU yes ; Yes, if modem's high speed is 1200 bps HS300 EQU NO ; Yes, if modem's high speed is 300 bps ; ; ; The next 7 equates are only used if B5IM is YES ; DOATZ EQU NO ; Yes to do ATZ between calls. If your ; Modem reverts to auto-answer after ; ATZ, set this NO. It speeds up the ; Turnaround between calls AND pre- ; Vents modem from answering while ; BYE5 is trying to reinitialize for ; The next call. Most modems (Hayes ; And clones) don't need it ECHO EQU yes ; Yes for Hayes, ProModem, Courier, RV- ; Maxwell, NO for all others (USR, ; Anchor, etc.) ANCHOR EQU NO ; Yes, if you have a Mark XII NODTR EQU NO ; Yes, modem or computer does not sup- ; Port DTR such as Anchor Mark XII or ; Some Osborne-1's. NOTE OS-1 users.. ; BYE5 can handle your NODTR problem, ; But will NOT work unless you install ; The hardware mod to fix the carrier ; Detect logic. The same mod also ; Fixes the DTR problem, so you should ; Install the whole mother board modi- ; Fication kit and set this NO NOATA EQU NO ; Yes, if you have an older Password, ; 212A or S-100 that will not execute ; The ATA command after ring is de- ; Tected. Newer firmware works. OFFHK EQU yes ; Yes, if you want BYE to put your phone ; Off-hook (ATH1) when running locally  ; (E) or exiting to CP/M (instead of ; Using ATS0=0) SHORTB EQU NO ; Yes, for modems that that can't accept ; A 30 character CMD string, like the ; MultiModem. ; ;----------------------------------------------------------------------- ; General Equates ; HARDLOG EQU NO ; Yes, echo remote input to printer PRINTER EQU NO ; Yes, if your bbs uses printer for er- ; Ror msgs. or if you use ^P remotely. ; QBBS users say YES if QENTER is set ; To print callers data ; NOTE, if you use your printer I/O drivers ; For your modem, then say YES to this COMFILE EQU yes ; Yes, chain to a .COM file on carrier ; Detect COMDRV EQU 'A' ; Drive to look for .COM file on COMUSR EQU 15 ; User# of .COM file to be called after ; Answer DISKLOG EQU NO ; Yes, echo remote input to disk file ; Warning..this code requires appx 1024 bytes ; Large BBS programs may not work on cp/m 2.2 ; if you use this. LOGUSR EQU 14 ; User number of SYS.LOG file LOGDRV EQU 'A' ; Drive for SYS.LOG file ; EXFILE EQU yes ; Yes, chain to a .COM file when BYE ; Logs off a caller (even when he ; Types BYE). Your exit.COM file must ; Preserve the stack and do a RETURN ; (not warmboot) to re-enter BYE cor- ; Rectly or use the EXRET method below ; CPM3 or PBBS users must say YES to this ; QBBS users must say NO, MBBS NO if CP/M 2 ; MBBS YES if using CPM3 EXRET EQU NO ; YES, if your exit file can't preserve the ; Stack and do a normal RETURN. MBASIC, ; "C", and some Pascal programs can't do ; The stack save-return easily. Simply ; POKE FCB+1 (5DH) with 'r' (small r) and ; Do a warmboot (SYSTEM) and BYE5 will ; Handle your exit file return correctly BYHANG EQU yes ; Yes, for BYE5 to say goodbye and hangup ; The phone BEFORE calling your EXIT file ; METAL, & OxGate users must say YES ; PBBS v2.n YES, PBBS 3.0 or > NO ; PBBS v2.n must change EXITFCB to BYE.COM ; Instead of PBYE.COM EXDRV EQU 'A' ; Drive to look for exit .COM file on EXUSR EQU 15 ; User # of .COM file to be called upon ; Exit MSGFIL EQU NO ; Yes, if your BBS system allows mes- ; Sages to be uploaded by KMD11 and ; Later with the RM option. KMD11 ; Sets a flag that will cause your ; MSG.COM file to be executed. The ; COM file must be on the same D/U ; As COMFILE. Your MSG.COM file can ; Append (then erase) the uploaded ; Message(s) to your message file.w ; Your MSG.COM file must preserve the ; Stack and do a RETURN (not warmboot) ; To renter BYE. You can select the ; Name of MSG.COM at label MSGFCB: ; (default name is MFMSG.COM) NO25TH EQU yes ; Yes, you wish to display LASTCALR data ; (^W). You may also print a header ; Above the LC data. Put your custom- ; Ized header at label LCHEAD: ; MBBS, PBBS, QBBS users must say YES NO25BF EQU 78 ; Size (bytes) of lc buffer needed by ; Your BBS. MBBS, QBBS = 65 ; METAL, PBBS, OXGATE =78 READLC EQU NO ; Yes, to have BYE read your LASTCALR ; File, No if your BBS pokes LASTCALR ; Into BYE. MBBS, PBBS, QBBS, METAL, ; And OxGate users say NO LCDRV EQU 'A' ; Drive to find LASTCALR or LASTCALR.DAT LCUSR EQU 15 ; User # of LASTCALR or LASTCALR.DAT file ; SKTERM EQU NO ; Yes, to skip the code that waits for the ; Caller to get his modem program into ; Terminal mode. Caution...The caller may ; Miss your opening welcome text if you set ; This equate yes. If your BBS program ; Has code built in to make sure the caller ; Is ready AND in terminal mode, set to yes WBDRIV EQU 'A'-41H ; Drive to log to on first warmboot to cp/m ; Some add-on hard disk systems want C ; WELFILE EQU NO ; Yes, to send a WELCOME file WELDRV EQU 'A' ; Drive to look for WELCOME??? file WELUSR EQU 14 ; User number of WELCOME??? file ; CLRSCR EQU NO ; Yes, to auto-clear local CRT screen ; Between calls. No, will still allow ; You to use ^Z to manually clear it. ; You are allowed a 6 byte sequence ; Below. The example is for an : ; If you use a ctrl-key (example, ^Z), ; Set CLRCH1 EQU 'Z'-40H. Set all ; Unused bytes 0. Leave this NO until ; Everything is working CLRCH1 EQU 1BH ; Set these for your clear screen sequence CLRCH2 EQU ':' ; 1B is escape and ESC : clears my screen CLRCH3 EQU 0 ; (Byte 3 if you need it). CLRCH4 EQU 0 ; Six bytes allowed for clear screen CLRCH5 EQU 0 ; Sequence and you can also clear your CLRCH6 EQU 0 ; 25th line if desired. ; PRGRSS EQU YES ; Yes, for helpful progress reports on ; CRT. Leave this YES until every- ; Thing is working PRNTGB EQU YES ; Yes, print "Goodbye..." message PRNTWB EQU NO ; Yes, print a string for each warm boot PWRQD EQU NO ; Yes, password needed for CP/M access RVIDEO EQU NO ; Yes, display local messages in reverse ; Video when caller is online. (Set your ; On/off sequence below). This also works ; With half intensity instead of reverse v. RVON1 EQU 1BH ; Set your reverse-on sequence in these 4 RVON2 EQU 'G' ; Bytes. Set unused bytes to nulls (0). RVON3 EQU '4' ; 1BH is escape, ESC G4 is reverse video RVON4 EQU 0 ; ON for the Televideo 925 terminal ; RVOFF1 EQU 1BH ; Now set the reverse-off sequence as above RVOFF2 EQU 'G' ; ESC G0 is reverse video OFF for the 925 RVOFF3 EQU '0' RVOFF4 EQU 0 ; Set unused bytes to 0 ; TOVALUE EQU 5 ; Minutes of no-activity allowed. 255 max. ; ;----------------------------------------------------------------------- ; System and Hardware dependent options ; CPM3 EQU no ; Yes, installing with CP/M 3.0, see ; B5-CPM3.DOC ; ; ; The next six equates are only for CPM3 users ; CCPPLUS EQU no ; Yes, CCP+ installed. ; HISTRSX EQU NO ; Yes, clear command line HISTory if ; HIST+ RSX is installed SDRV1 EQU 1 ; Set these 4 equates to the default SDRV2 EQU 0FFH ; Drive search chain. SDRV3 EQU 0FFH ; 0 = current, 0FFH = end of chain. SDRV4 EQU 0FFH ; 1 = A, 2 = B, etc. ; ; End of CPM3 only ; CLOSS EQU 1 ; If carrier dies, wait 1 second, then ; Hang up CTRLC EQU 'K'-'@' ; Map ^C to this character DOWNMIN EQU 2 ; Number of min after Sysop types ^O to ; Logout LOSER EQU NO ; Yes, warm boot overwrites part of the ; BIOS MHZ EQU 4 ; Processor clock in MHz MOTOR EQU NO ; Yes power up/down drives between calls TRANWL EQU yes ; Yes if running Trantor WL BIOS system ; ;----------------------------------------------------------------------- ; Filtered characters ; BYE5 filters incoming modem noise by ignoring those characters most ; frequently generated by noisy modems or marginal phone connections. ; Also, some incoming characters may cause your local terminal to do ; strange (and sometimes undocumented) things. The most common char- ; acters generated by noisy modem connections are the left brace ({), ; the delete character (07F) and nulls (00H). An example of problem ; characters for the TRS-80 is the backward slash (\). You may select ; any 4 characters below for BYE5 to filter from the incoming modem. ; Set any, or all, to nulls (00H) if you choose not to use the modem ; filter code. ; FILT1 EQU 7BH ; Left brace FILT2 EQU 7FH ; Delete character FILT3 EQU 60H ; Backward slash (TRS-80 problem) FILT4 EQU 00H ; Null ; ;----------------------------------------------------------------------- ; Function Keys ; LEADIN EQU NO ; Yes, to use lead-in character for ; F-keys instead of single CTL chars. ; IF LEADIN LEADKY EQU '\' ; Key to use for lead-in. Choose a sel- ; Dom used key. ENDIF ; LEADIN ; ; ; If LEADIN is YES, you must type the LEADKY first, then the character ; inside the ' ' below. If LEADIN is NO, the following characters are ; used as a single control key. Select only your character preference ; inside the ' ', and leave the -40H alone. Either option will accept ; upper and lower case. ; ANSKEY EQU 'A'-40H ; Key to force modem to answer the phone BLNKKEY EQU 'B'-40H ; Key to toggle remote terminal on/off LOGKEY EQU 'D'-40H ; Key to flip disk log file save. BELLKEY EQU 'G'-40H ; Key to toggle bells on console LCKEY EQU 'L'-40H ; Key to force return to local cp/m after ; Current caller logs off (& alert sysop) TWITKEY EQU 'N'-40H ; Keycode to hangup modem manually SYSDKEY EQU 'O'-40H ; Key to print "System going down in ; N min.." MSGKEY EQU 'Q'-40H ; Keycode to print "Message from SYSOP:" TIMEKEY EQU 'T'-40H ; Key for Sysop to display time (if ; TIMEON) ULTKEY EQU 'U'-40H ; Key to grant current caller unlimited ; Time. Also enables all the flag bits ; In LCPTR WHOKEY EQU 'W'-40H ; Key to display LASTCALR if NO25TH is ; YES XITKEY EQU 'X'-40H ; Key to exit from "Message from Sysop" ; Loop ZCREEN EQU 'Z'-40H ; Key to manually clear your screen ; ;----------------------------------------------------------------------- ; RBBS Type ; ; Set only one, or none of the following BBS equates to YES. If COMFILE ; YES and none of the below are selected you will have an undefined label ; COMFCB during assembly. ; METAL EQU yes ; Yes, running METAL BBS system. ; MBBS EQU NO ; Yes, running MBBS4n BBS system MBSDRV EQU 'A' ; Drive where you keep MBBS.COM MBSUSR EQU 0 ; User area for MBBS.COM ; LOGIN.COM and MFGMSG.COM must both be on ; COMDRV and COMUSR selected above ; MINICK EQU NO ; Yes, running MINICBBS..you must also create ; Your COMFCB label ; OXGATE EQU NO ; Yes, running OxGate BBS system PBBS EQU NO ; Yes, running PBBS system QBBS EQU NO ; Yes, running QBBS system RBBS EQU NO ; Yes, running RBBS, sets/resets ; 'WRTLOC' flag IOVAL EQU 0 ; Initial value for IOBYTE (if MINICK ; YES) LMBELL EQU NO ; Yes, your bbs uses a low-memory bell flag ; MBBS and RBBS users must say YES KILBEL EQU 03BH ; Byte for low memory bell toggle flag ; ; ; Some BBS systems require a flag to be reset to allow reentry to the ; BBS from CP/M (older versions of RBBS do). If you run a BBS that uses ; this technique, then set RTOK to YES, and define the byte to reset at ; RTOKFG. BYE5 will reset this byte to zero between calls. ; RTOK EQU NO ; Yes, to reset the following byte be- RTOKFG EQU 020H ; Tween calls. PBBS users should say ; Yes, and set RTOKFG EQU to your REENTR ; Byte, normally 20H. ; ;----------------------------------------------------------------------- ; Clock/Time Equates ; ; NOTE... Be sure to set the CLOCK and TIMEON equates the same way in ; both BYE5 and KMD. ; CLOCK EQU yes ; If YES, add your clock reader code at ; The start of label TIME: and store ; Binary values in CCHOUR and CCMIN ; PBBS and QBBS users must say YES BCD2BIN EQU yes ; Yes, your clock routine calls BCDBIN BIN2BCD EQU NO ; Yes, your clock routine calls BINBCD TIMEON EQU yes ; Yes, if you want BYE5 to keep track of ; Time-on-system and log off user ; After MAXMIN. This works without a ; Clock if you use KMD MAXMIN EQU 60 ; Minutes for maximum time allowed on ; System. Recommend 60 if CLOCK and ; TIMEON are YES, and 45 if CLOCK is ; NO and TIMEON YES. (255 minutes ; Maximum). 0= No restrictions. ; ; NOTE, the previous callers timeon is preserved for your exit or login ; program to access in BYE's fixed lookup table at label LCPTR. You may ; choose to store that data in low memory, or elsewhere by changing the ; LCTON equate to a new address. LCTON is found just after BYE's fixed ; lookup table. ; PRNTOS EQU NO ; Yes, print Time-left-on-system on warmboots ; If WHEEL is on or MXTIME=0, this will print ; Time-on-system rather than Time-left... RSPEED EQU NO ; Yes, restricting primetime to a min. ; Speed (a clock read routine is re- ; Quired if YES - see CLOCK) ; IF RSPEED ; 24 hour clock, 00=midnight, 23=11PM HOUR1 EQU 19 ; Start of prime-time (19=7:00 PM) HOUR2 EQU 23 ; End of prime-time (23=11:00 PM) SPEED EQU 5 ; Minimum speed accepted (5=1200 baud). ; Change OFFMSG to match your times, ; Baud rate and time zone. OFFMSG is ; A message at code end. ENDIF ; RSPEED ; ;----------------------------------------------------------------------- ; CCP Options ; ZCPR2 EQU yes ; Yes, if running ZCPR1/2, ZCMD1/2 or ; NZCPR1/2 ; Yes, if using CP/M 3 with wheel byte ZCPR3 EQU NO ; Yes, if running ZCPR3 ; ; ; NOTE: requires MAC.COM to assemble if ZCPR3 set YES ; IF ZCPR3 MACLIB Z3BASE ; Requires MAC to assemble...otherwise ; Enter constants directly..see label ; DOZ3 for required EQU's ENDIF ; ZCPR3 ; ; ; NZCPR/ZCMD/ZCPR all use bytes (at 3DH/3EH/3FH) to store the maximum ; drive, wheel status, and maximum user area. Some BBS systems poke ; these low memory bytes to reset these (for Sysop, etc.) Other BBS ; systems (like OxGate) poke the bytes in BYE that do the same thing. ; The equate USEZCPR allows you to select where you want to poke things. ; For OxGate, set it to NO, for RBBS, you probably want it set to YES. ; If you are NOT using NZCPR/ZCMD/ZCPR then set USEZCPR to NO. ; USEZCPR EQU NO ; Yes, if using ZCPR/NZCPR/ZCMD to set ; Bytes CHEKDU EQU yes ; Yes, if you want BYE to police MAXDRIV ; And MAXUSER. No, if your CCP can do ; That (saves a lot of code). In ; Either case, BYE keeps correct ; Values in these low memory bytes MAXDRIV EQU 003DH ; ZCPR lolcation of MAXDRIV byte WHEEL EQU 003EH ; Location of ZCPR's wheel flag MAXUSER EQU 003FH ; ZCPR location of MAXUSR byte MAXDRV EQU 'B'-'@' ; Highest drive supported MAXUSR EQU 9 ; Highest user area SYSDRV EQU 'O'-'@' ; Highest local drive supported SYSUSR EQU 15 ; Highest local user area (0-15) ; ; ; If CHGPATH is YES, BYE automagically will change the .COM path to suit ; which mode it is in. An example of this is: when remote, the path is ; $$:, A0: -- when local, MY path is $$:, A0:, A15: which allows keeping ; PIP and FORMAT and other nasties up in A15: -- See REMPATH and SYSPATH ; DB's at end of program for current paths. If the Sysop uses the ^B to ; blank the remote console, the Wheel byte is set and SYSPATH is setup ; for the Sysop. The wheel byte is reset and REMPATH setup when ^B is ; used the second time to turn the remote back on. ; CHGPATH EQU NO ; Yes, if changing ZCPR's external path EXTPATH EQU 0040H ; ZCPR external path default location ; ;----------------------------------------------------------------------- ; MSPEED values ; MSPEED EQU 03CH ; Baud rate pointer BP110 EQU 0 ; 110 baud - baud rate pntrs for MSPEED BP300 EQU 1 ; 300 baud BP450 EQU 2 ; 450 baud BP600 EQU 3 ; 600 baud BP710 EQU 4 ; 710 baud BP1200 EQU 5 ; 1200 baud BP2400 EQU 6 ; 2400 baud BP4800 EQU 7 ; 4800 baud BP9600 EQU 8 ; 9600 baud BP19200 EQU 9 ; 19200 baud ; ;----------------------------------------------------------------------- ; Motor controlled drives ; ; These values suit a Compupro/Viasyn Disk1A with YE-DATA 180 20cm ; drives. Alter to suit your needs if your disk controller supports ; motor control. ; IF MOTOR DISK EQU 0C3H ; Disk control port DISKON EQU 080H ; Motors on DISKOFF EQU 000H ; Motors off ENDIF ; MOTOR ; ;----------------------------------------------------------------------- ; if using LOSER ; ; There are some cases where warm boot overwrites the initial BIOS jump ; table. This problem was solved for the Superbrain 3.0 bios by find- ; ing a warmboot call to HIGH in the BIOS. This call is then patched by ; BYE. The form of the call is: WBCALL CALL WMSTRT ; IF LOSER WBCALL EQU 0E260H ; Check this in your BIOS ; ; ; The following location is called ; WMSTRT EQU 0E566H ; Check this in your BIOS ENDIF ; LOSER ; ;----------------------------------------------------------------------- ; ; END OF OPTION CONFIGURATION SECTION FOR BYE5 ; ;----------------------------------------------------------------------- ; IF NOT CPM3 ORG 100H ; ;-------------------- Special Loader Routine --------------------------- START: LXI SP,ISTACK MVI C,32 MVI E,241 CALL BDOS CPI 77 JNZ STARTA LHLD BDOS+1 INX H INX H INX H PCHL ENDIF STARTA: IF COMFILE AND (NOT CPM3) LXI H,COMFCB+1 LXI D,ENTMSG MVI B,8 STAR1: MOV A,M CPI ' ' JZ STAR2 STAX D INX D INX H DCR B JNZ STAR1 STAR2: XRA A STAX D ENDIF IF EXFILE AND (NOT CPM3) LXI H,EXITFCB+1 LXI D,EXTMSG MVI B,8 STAR3: MOV A,M CPI ' ' JZ STAR4 STAX D INX D INX H DCR B JNZ STAR3 STAR4: XRA A STAX D ENDIF IF MSGFIL AND (NOT CPM3) LXI H,MSGFCB+1 LXI D,MSGMSG MVI B,8 STAR5: MOV A,M CPI ' ' JZ STAR6 STAX D INX D INX H DCR B JNZ STAR5 STAR6: XRA A STAX D ENDIF IF LMBELL AND (NOT CPM3) LDA BELLON CMA STA KILBEL ENDIF IF NOT CPM3 LHLD BDOS+1 LXI D,-(CCPL*256)-8 DAD D LXI D,OBJEND-1 LXI B,OBJEND-BEGOBJ BLOCK: LDAX D MOV M,A MOV A,B ORA C JZ UPDATE DCX D DCX H DCX B JMP BLOCK UPDATE: XCHG CALL NEGHL DAD D SHLD OFFSET XCHG LXI H,ENDOBJ DAD D SHLD ENDRNG LXI H,BEGOBJ DAD D DCX H MODIFY: INX H DB LXID ENDRNG: DW 0 MOV A,E SUB L MOV A,D SBB H JC BEGIN MVI B,INST3E-INST3 LXI D,INST3 THRBYT: LDAX D CMP M JZ CHANGE INX D DCR B JNZ THRBYT MVI B,INST2E-INST2 LXI D,INST2 TWOBYT: LDAX D CMP M JZ SKIP DCR B INX D JNZ TWOBYT JMP MODIFY SKIP: INX H JMP MODIFY CHANGE: LXI D,OBJEND LXI B,BEGOBJ INX H MOV A,E SUB M INX H MOV A,D SBB M JC MODIFY DCX H MOV A,M SUB C INX H MOV A,M SBB B JC MODIFY DCX H DB LXID OFFSET: DW 0 MOV A,M ADD E MOV M,A INX H MOV A,M ADC D MOV M,A JMP MODIFY NEGHL: MOV A,H CMA MOV H,A MOV A,L CMA MOV L,A INX H RET BEGIN: LHLD BDOS+1 PUSH H LXI D,BEGOBJ LHLD OFFSET DAD D SHLD BDOS+1 ENDIF IF TRANWL AND (NOT CPM3) PUSH H CALL FNDWL POP D JC NOWL MOV M,E INX H MOV M,D NOWL: XCHG ENDIF IF NOT CPM3 INX H POP D MOV M,E INX H MOV M,D INX H PCHL ENDIF IF TRANWL AND (NOT CPM3) HHSIG EQU 12 HSSIG EQU 14 HHSHL EQU 16 HLSHL EQU 18 HBSHL EQU 36 HDRVR EQU 22 HPCT EQU 25 PCMGR EQU 4*2 WWHSIG EQU 'W' WWLSIG EQU 'H' SIGWBT EQU 'B' SIGUB EQU 'L' SIGSD EQU 'S' FNDWL: PUSH D LXI B,0FF06H ASHELL: LXI H,HHSIG DAD B MOV A,M CPI WWHSIG JNZ NSHELL INX H MOV A,M CPI WWLSIG JZ WWLINK NSHELL: DCR B LDA 7 DCR A CMP B JC ASHELL STC POP D RET WWLINK: LXI H,HSSIG DAD B MOV A,M CPI SIGWBT JZ WBFND LXI H,HHSHL DAD B MOV C,M INX H MOV B,M JMP WWLINK WBFND: LXI H,HBSHL DAD B ORA A WLEXIT: POP D RET ENDIF IF NOT CPM3 INST3: DB 001H,011H,021H,022H,02AH,031H,032H,03AH,0C2H DB 0C3H,0C4H,0CAH,0CCH,0CDH,0D2H,0D4H,0DAH,0DCH DB 0E2H,0E4H,0EAH,0ECH,0F2H,0F4H,0FAH,0FCH INST3E EQU $ INST2: DB 006H,00EH,016H,01EH,026H,02EH,036H,03EH,0C6H DB 0CEH,0D3H,0D6H,0DBH,0DEH,0E6H,0EEH,0F6H,0FEH INST2E EQU $ ENDIF IF CPM3 SERIAL: DB 0,0,0,0,0,0 STARTX: JMP FTEST NEXT: DB 0C3H DW 0 PREV: DW 0 R EMOV: DB 0FFH NONBNK: DB 0 RSXNAM: DB 'BYE5 ' LOADER: DB 0 DB 0,0 INIFLG: DB NOTINIT INIT EQU 00 NOTINIT EQU 0FFH FTEST: MOV A,C CPI 60 JNZ NEXT LDAX D ENDIF IF CPM3 AND CCPPLUS CPI 4 JZ TSTBYE ENDIF IF CPM3 CPI 7 JZ GMXUSR CPI 11 JZ DELRSX CPI 101 JZ RSXINT CPI 102 JZ RSXTRM JMP NEXT RSXINT: LDA INIFLG CPI NOTINIT JNZ RSXIN2 XRA A STA REMOV STA INIFLG ENDIF IF COMFILE AND CPM3 LXI H,COMFCB+1 LXI D,ENTMSG MVI B,8 STAR1: MOV A,M CPI ' ' JZ STAR2 STAX D INX D INX H DCR B JNZ STAR1 STAR2: XRA A STAX D ENDIF IF EXFILE AND CPM3 LXI H,EXITFCB+1 LXI D,EXTMSG MVI B,8 STAR3: MOV A,M CPI ' ' JZ STAR4 STAX D INX D INX H DCR B JNZ STAR3 STAR4: XRA A STAX D ENDIF IF MSGFIL AND CPM3 LXI H,MSGFCB+1 LXI D,MSGMSG MVI B,8 STAR5: MOV A,M CPI ' ' JZ STAR6 STAX D INX D INX H DCR B JNZ STAR5 STAR6: XRA A STAX D ENDIF IF LMBELL AND CPM3 LDA BELLON CMA STA KILBEL ENDIF IF CPM3  JMP BGOBJ2 RSXIN2: MVI A,0FFH RSXIN9: RET RSXTRM: CALL MDCARCK JNZ START0 CALL UNPATCH JMP BGOBJ2 RSXCLR: MVI A,0FFH STA INIFLG STA REMOV XRA A RET ENDIF IF CPM3 AND CCPPLUS TSTBYE: XRA A RET ENDIF IF CPM3 GMXUSR: LXI H,MXUSR RET ENDIF DELRSX: IF CPM3 AND HISTRSX MVI C,60 LXI D,RSXCL CALL NEXT ENDIF IF CPM3 LHLD PREV MVI L,0EH MVI C,59 LXI D,0 DELLP: MOV A,H ORA A JZ NEXT MVI M,0FFH DCR L MOV H,M INR L JMP DELLP ENDIF DS 40 ISTACK: DW 0 ; Top of stack ; ; ;----------------------------------------------------------------------- ; ; THE FOLLOWING CODE GETS MOVED ; TO HIGH RAM BY THE LOADER OR RSX ; PROGRAM, WHERE IT IS EXECUTED. ; ;----------------------------------------------------------------------- ; IF NOT CPM3 BEGOBJ: JMP 0 ; Filled by BEGIN ENDIF ; NOT CPM3 ; BGOBJ2: JMP START0 ; Hop over fixed vectors ; MCBOOT: JMP MBOOT ; Off to warm boot JMP PRNLOG ; Go print out items of interest  ;..... ; ; ; Variables follow in a predefined order that can be manipulated by a ; passworded or other program to give special users different capabili- ; ties. ; ;----------------------------------------------------------------------- ; ; Here is a quickie handy reference table to use so we do not get mixed ; up. Please do not change the order of it in any future changes. ; ; |mxusr|mxdrv|toval|nulls|ulcsw|lfeeds|wrtloc|hardon|lostflg|covect| ; |1 byt|1 byt|1 byt|1 byt|1 byt|1 byte|1 byte|1 byte|1 byte |2 byes| ; ; |BYE |bell |stat |lcbuf|mxtme|rtcbuf| ; |3 byt|1 byt|1 byt|2 byt|1 byt|2 byte| ;----------------------------------------------------------------------- ; MXUSR: DB MAXUSR ; Runtime maximum user area available MXDRV: DB MAXDRV ; Runtime maximum drive available TOVAL: DB TOVALUE ; Number of mins. to wait before timeout NULLS: DB 0 ; Number of nulls after ULCSW: DB 0 ; Upper case only switch (32=upper case) LFEEDS: DB 0 ; Line feed mask (0=don't mask) WRTLOC: DB 0 ; Location RBBS pokes so BYE won't hang HARDON: DB 0FFH ; If 0, hardlog is deactivated MDMOFF: DB 0 ; If 0FFH, do not output to modem COVECT: DW 0 ; Console output vector for XMODEM HDROFF EQU $-MCBOOT ; Offset to 'BYE' that follows DB 'BYE' ; Tells XMODEM that BYE is being used BELLON: DB 0FFH ; If 0FFH ok to send bell (Chat) to con- ; Sole, 00H=belloff. This only affects ; Your initial default choice LCPTR: JMP LCDATA ; First byte is user access restrictions ; And flags while user is logged on, ; Used for his total time-on after ; Logoff. LCDATA is address of buffer ; For NO25TH data, NO25BF in length MXTIME: JMP RTCBUF ; First bye holds maximum time allowed ; Next 2 bytes point to the real time ; Clock buffer ; ; ; end of BYE5's fixed lookup table ;----------------------------------------------------------------------- ; LCTON EQU LCPTR ; Byte to store last caller's time-on- ; System value (in binary). You may ; Equate this to a low-memory byte or ; Use this byte in the BYE fixed var- ; Iable table...can then be used by ; Your entry/exit program to determine ; How long the previous caller was on. ; ;----------------------------------------------------------------------- ; ; THIS IS THE OFFICIAL START OF THE BYE PROGRAM ; ;----------------------------------------------------------------------- ; ; ++++ Install your user defined subroutines here ++++ ; ; You may install a subroutine here that has the label SRUDEF ; that can be called from a transient program like your entry/ ; exit .com file. To access it, MVI C,84 CALL BDOS from your ; program. Make sure this subroutine has a RET at the end. ; The transient program making a BDOS 84 call may pass data to ; this subroutine in any register(s) except A and C. This routine ; can return data to the calling program in any register(s). ; ;............................................................................ ; ;title mfix.ins ;version  2.00 ;date 04/07/86 ;written by Kevin Murphy ; ; vers 2.00 - new release for METAL/Z-MSG vers 1.4xx or later ; and BYE503 or later. Needed to support the TIME CHECK ; feature in MEXIT. ;.............................................................................. ; >>> comments <<< ;.............................................................................. ; ; Find and DELETE the line in BYE503 or newer which reads: ; *----> SRUDEF: RET ; ; INSERT this file in it's place ; ; BCD2BIN equate must be set to YES in BYE5xx ;.............................................................................. ; >>> equates <<< ;.............................................................................. ; MAXCALS EQU 10 ;maximum number of calls per day if exceeded ;tell him why, and hang up ;set to zero for no maximum ;This is bypassed if the user has unlimited time ; ; ;metal buffer pointers UTIME EQU 69 ;pointer to time UDATE EQU 66 ;pointer to date UMINS EQU 79 ;mins on today, so far UD EQU 124 ;date of umins UM EQU 125 ;month of umins UTC EQU 126 ;times called on this day ; ;.............................................................................. ; >>> main routine <<< ;.............................................................................. ;enter with address of user record in DE ; SRUDEF: XCHG ;get user address in HL SHLD USER ;save it LHLD USER ;get it back, (incase we slip a routine in ) LXI B,UDATE+1 ;point to current day DAD B MOV A,M ;get day, and save it in A LHLD USER ;point to day of last umins update LXI B,UD ; DAD B ; MOV B,M ;get the minson day CMP B ;compare JNZ OKDAY ;no match, no problem, ; LHLD USER ;get base pointer LXI B,UDATE ;add date offset DAD B MOV A,M ;get month LHLD USER ;get pointer again LXI B,UM ;add offset DAD B MOV B,M ;get check month CMP B ;compare JNZ OKDAY ;no match, no problem, ; ;same day... ; LXI B,UTIME ; CALL GET ;convert it STA HOUR ;save it LXI B,UTIME+1 ; CALL GET ;convert it STA MIN ;save it ; LDA MXTIME ;check wheel CPI 0 ;is it a normal user ? JZ NOMAX ;no ; LHLD USER ;make sure we have not exceeded max calls LXI B,UTC ;point to times called today DAD B MOV B,M ;get it in B ; MVI A,MAXCALS ;get max times allowed CPI 0 ;is it zero JZ NOMAX ;then skip this stuff ; SUB B JZ KILLER ;if it was a match, say he's been on forever JC KILLER ; NOMAX: ; LHLD USER ;point to minutes on to day LXI B,UMINS ; DAD B MOV A,M ;get value CPI 0 ;if no update, no problem RZ ;return to metal ; MOV B,A ;do routine LDA MIN ;get login minutes in c CPI 0 ;did hour just turn ??? JZ DOHOUR ;yep, set up to previous hour + 60 mins MOV C,A ;do it ; SUBTR: ; DCR C ;dec JZ DOHOUR ;if zero, drop the hour count DCR B ;dec lop count JNZ SUBTR ;loop till done MOV A,C ;get new minute value STA MIN ;save it LDA HOUR ;reset log in time in bye MOV D,A LDA MIN MOV E,A CALL RMLTIM ;use a short cut to extended bdos RET ;get your butt back to metal ; ;............................... ; OKDAY: LHLD USER ;point to minutes on to day LXI B,UMINS ;zero time on today DAD B MVI M,0 RET ; ;................................ ; DOHOUR: ;increment hour, reset minutes LDA HOUR ;get binary hour DCR A ;dec STA HOUR ;save new count LOADMIN: MVI C,60 ;restart minutes at 60 JMP SUBTR ;go back to loop ; ;................................ ; GET: ;convert bcd byte pointed to by HL ;to binary byte in A LHLD USER ;get base address DAD B ;add in off set MOV A,M ;get 1st CALL BCDBIN ;convert BCD to binary RET ;return to sender, result in A ; ;................................ ; KILLER: ;exceeded maximum number of calls for the day LXI H,TOOMANY ;tell them they have called to many times CALL PRINTB ;print local and remote CALL PATCH ;patch up bye JMP LOGOFF ;logout, sign off, and all that ; ;.............................................................................. ; >>> db area <<< ;.............................................................................. ; USER: DW 00 HOUR: DB 0 MIN: DB 0 TOOMANY: DB 7,CR,LF,'[You''ve called too many times today !]',CR,LF,0 ; ;.............................................................................. ; >>> end of insert <<< ;.............................................................................. ; mfix2xx.ins ;.............................................................................. ; ;----------------------------------------------------------------------- ; ; ++++ Install your I/O port insert here ++++ ; or select one from the BYE5-INS.LBR ; ; B5OS-3.INS - Osborne OS-1 insert for BYE5 - 09/15/85 ; ; 6850 ACIA ; ; Note: This is an insert, not an overlay. If your OS-1 does not have ; have the hardware mod to support DTR, (shown below) then set ; the NODTR option in BYE5 to "YE S". Also set: ; ; IMODEM EQU YES ; NORING EQU YES ; ; = = = = = = = = = = = = = = = = = = ; ; 09/15/85 ; ; Program now supports 2400 bps for the new 2400 bps modems ; * Equate added for NUEVO 80 column add-on video board with ; optional baud rate generator. ; * Equate added for new Osborne 1.45 ROM for 2400 bps ; operation and hardware mods. ; * Re-edited hardware mods descriptions ; - Roy Robinson ; ; 08/07/85 ; ; * Program now runs properly with BYE5 program ; * Renamed several labels to more closely match BYE5 ; conventions ; * Changed MDOUTP routine with addition of PUSH PSW ; and POP PSW statements. MDOUTP routine for Osborne 1 ; clobbers accumulator register when called. ; * Changed MDQUIT routine, program now calls ; RTSNBL and IMQUIT if IMODEM equate is set true. ; * Changed MDINIT routine, program now calls ; IMINIT if IMODEM equate is set true. ; * Changed MDCARCK routine ; - Roy Robinson ; ; 07/17/85 Revised for use with BYE5 - Kevin Murphy ; (based on file from Roy Robinson) - Irv Hoff ; ; = = = = = = = = = = = = = = = = = = ; ; NOTE: ; IF YOU USE THE HARWARE MODIFICATION TO THE OZZIE 1. ; When the Sysop terminates the BYE program with a control C fol- ; lowed by any other key except 'E' or 'R' from the local console ; keyboard to go off-line, the Sysop must press the RESET button ; at the front of the Ozzie and reboot the computer before running ; the BYE5 program again. This is due to the nature of the 6821 ; PIA input, CB2, which is used for carrier detect in the hardware ; mod. Pushing the RESET button triggers the CB2 input for proper ; use with BYE5. This reboot should be a minor inconvenience as ; it is initiated only when the computer is off-line. ; ; - Roy Robinson ; ; ; = = = = = = = = = = = = = = = = = ; ; DOCUMENTATION FOR THIS BYE5 INSERT: ; ;------------------- ; ; If you intend to use this insert with none of the hardware modifica- ; tions to the main logic board described below, set the HARDMOD and BAUDMOD ; equates to NO. You will have the following baud rate values: 300 and 1200 ; bps. An unmodified Osborne 1 will not work if the HARDMOD and BAUDMOD ; equates are set to YES. ; ; The NUEVO equate concerns the use of a "piggy-back" 80 column video ; board made by NUEVO ELECTRONICS with an optional baud rate generator. ; NUEVO ELECTRONICS may be contacted at: (713) 341-6001. ; ; The BAUDMOD equate concerns the use of a new ROM monitor chip ; (ROM version 1.45) available from Osborne Computer or your local Osborne ; dealer. This ROM and the addition of five wire jumpers to your main logic ; board will give you 300/1200/2400 bps serial I/O for the new 2400 bps ; modems. ; ; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ; ; The NUEVO equate: ; ; If you have the NUEVO 80 column video board with the baud rate option ; installed, set the NUEVO equate to YES. You will then have the fol- ; lowing baud rates available: 300, 1200 2400, bps. ; ; If your NUEVO 80 column board does NOT have the optional baud rate ; generator, set the NEUVO equate to NO. Since the NUEVO baud rate ; generator is not installed, you will have the following baud rates ; available 300 and 1200 bps. ; ; Contact NUEVO ELECTRONICS if you wish to install the baud rate option ; on your NUEVO 80 column board. ; ; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ; ; The HARDMOD equate: ; ; If you decide to install the DTR and DCD modification to your Osborne 1 ; main logic board, set the HARDMOD equate to YES. ; This modification can be installed in an Osborne 1 with or without the ; Osborne or NUEVO 80 column video boards. ; The modification gives the Osborne 1 the ability to force the modem to hang ; up the phone by dropping the 6850 ACIA RTS line which is connected to the ; modem DTR input.  ; ; The data carrier detect modification gives the Osborne the ability to ; detect carrier loss within a very short time (usually within a couple of ; seconds) rather than depending on a time-out which can take up to 30 seconds ; or more. ; ; If you do use the DTR and DCD modification, you will need to configure a ; special RS-232 cable from your Osborne 1 serial port to your external ; modem. Your modem must support the DTR and DCD input signal lines and you ; must set the modem DTR and DCD switches or program the modem internal memory ; to monitor its DTR and DCD signal inputs. ; ; New RS-232 modem cable to be used with OCC-1 and external modem when ; using DTR control: ; ; ; OCC-1 MODEM ; ; 2 RXD 3 RXD ; 3 TXD 2 TXD ; 4 DCD (new function) 8 DCD ; 5 RTS (new function) 20 DTR ; 7 GND 7 GND ; ; DTR AND DCD SUPPORT MODIFICATION ; ; OSBORNE 1 MAIN LOGIC BOARD TRACE CUTS: ; The Osborne 1 main logic bo ard is organized into zones which are iden- ; tified on the COMPONENT side of the main logic board with LETTERS found ; along the left side of the board and NUMBERS found along the rear of ; the board (i.e., the 6850 ACIA device is located in zones C4, C5, and ; C6 and the MC1458 device is located in zone E3). If you are unsure ; how to count pin numbers on IC devices, find a friend who does, attend ; a user group meeting, or take your computer to a computer store/service ; center for further aid. ; ; -------------------------- ; Solder Side: ; ; 1. Cut the trace running from pin 5 to pin 6 on the inner row of pads ; used to mount the RS-232 female serial connector at the front of the ; main logic board. Pin 1 is the pad with a wide ground trace. ; ; Component side: ; ; 2. Cut the trace from pin 5 of the 6850 ACIA device in zone C4 to ; resistor R20 (10K ohm) located in zone D5. ; ; 3. Cut the trace that runs BETWEEN pins 3 and 4 of the 6850 device in ; zone C4. Note: pins 3 and 4 do not have visible traces running to ; them on the component side. ; ; PART ADDITIONS: ; -------------- ; Solder side: ; ; 5. Add a jumper wire from pin 1 of the MC1458 device in zone E3 to pin 5 ; on the inner row of the RS-232 serial port pads. ; Pin 1 is the pad with the wide ground trace. ; ; 6. Add a jumper wire from pin 3 of the MC1458 device in zone E3 to pin 5 ; of the same MC1458 device in zone E3. ; ; 7. Add a jumper wire from pin 5 of the 74LS08 device in zone C1 to pin 10 ; of the LM3400 device in zone D4. ; ; 8. Add a jumper wire from pin 4 of the 74LS08 device in zone C1 to pin 1 ; of the 74LS04 device in zone E20. ; ; 9. Add a jumper wire from pin 6 of the 74LS08 device in zone C1 to pin 5 ; of the 74LS04 device in zone A11. ; ; 10. Add a jumper wire from pin 19 of the 6821 device in zone C15 to pin 6 ; of the 74LS04 device in zone A11. ; ; ; Using the component side or solder side (whichever side you feel more ; comfortable for mounting the two - 1/4 watt resistors): ; ; 11. Mount a 10K ohm resistor from Vcc which is +5 volts (pin 14 of the ; 74LS02 device in zone D2 is a good solder point) to pin 2 of the ; MC1458 device in zone E3. ; ; 12. Mount a 220 ohm resistor from pin 5 of the 6850 ACIA device in zone ; C4 to pin 2 of the MC1458 device in zone E3. Pin 2 of the MC1458 ; device in zone E3 should now have two resistors attached to it. ; ; 13. Mount a 1K ohm resistor from pin 19 of the 6821 PIA device in zone ; C15 to Vcc which is +5 volts (pin 16 of the 74LS161 device in zone ; D18 is a good solder point). ; ; ; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ; ; The BAUDMOD equate: ; ; 300/1200/2400 BAUD SUPPORT MODIFICATION ; ; This modification now allows you to have 300/1200/2400 bps support ; under software control. The modification involves five jumper wires ; and the installation of a NEW MONITOR ROM - ROM VERSION 1.45. The ; code in the new ROM has modified the 6821 VIDEO PIA control byte value ; for register A. The CA2 Peripheral Control Line is now an output control ; line rather than an input status line. ; The input status line was used with the COMM-PAC/DATA-COMM modems. ; The new output control line will allow 600/2400 baud operation for the ; 6850 ACIA serial I/O chip with the following hardware modifications to ; the main logic board: ; ; On the main logic board - COMPONENT SIDE: ; ; 1. Remove Jumper J1 found in zone C4 located next to the ; 6821 ACIA chip. ; This will expose two pins which we will refer to as the ; Jumper J1 FRONT and REAR pins. ; ; The FRONT pin is the pin located toward the front edge of ; the main logic board. The front edge of the logic board has the ; printer connectors and video controls mounted at the edge. ; On the solder side of the main logic board, the FRONT pin ; has a trace leading to pin 7 of the 74LS161 chip at ; zone C3. ; The REAR pin has no trace on the solder side of the board ; and is located toward the rear edge of the main logic ; board. ; ; On the main logic board - SOLDER SIDE ; ; 2. Add a jumper wire from pin 4 of the 74LS08 chip in zone A5 ; to the REAR pin of J1. ; ; 3. Add a jumper wire from pin 5 of the 74LS08 chip in zone A5 ; to pin 39 of the 6821 chip in zone C15. ; ; 4. Add a jumper wire from pin 6 of the 74LS08 chip in zone A5 ; to pin 5 of the 74LS02 chip in zone D2. ; ; 5. Add a jumper wire from pin 5 of the 74LS02 chip in zone D2 ; to pin 6 of the 74LS02 in zone D2. Pin 5 now has two ; jumpers connected to it. ; ; 6. Add a jumper wire from pin 4 of the 74LS02 chip in zone D2 ; to the FRONT pin of Jumper J1. ; ; With this modification you will now be unable to use the Osborne COMM-PAC ; or CTS DATA-COMM modems. ; The CA2 line, originally a modem input status line, is now an output control ; line used to select one of two clock frequencies supplied to the ACIA TX ; and RX clock inputs. ; ; ; ; ;----------------------------------------------------------------------- ; ; WRKBAUD:DB 16H  ; [*] OCC1 ++ SSTAT: DB 0 ; RAM location serves as a secondary status ; register for the 6850 ACIA status register. ; This secondary RAM register is used because ; the 6850 ACIA clobbers its own status reg- ; ister (with regard to TBE and RDA status ; bits) when data is traveling in both direc- ; tions via the serial port. This status bit ; recognition problem was illustrated with data ; being output during a display listing to the ; remote user, and the remote user wished to ; suspend or abort the screen display by typing ; a ^S, ^C, or ^K. ; ;----------------------------------------------------------------------- ; ; HARDMOD EQU YES ; YES, if hardware mods have been installed in ; Osborne O-1 to support DTR and modified DCD. ; (see installation procedure above) ; ; NO, if the O-1 is standard (no mods). ; If NO, you must set the NODTR equate to YES in ; the main body of the BYE5 program. ; You must also use an intelligent modem (one that ; supports hayes or racal-vadic software command ; protocol) and set the IMODEM equate to YES in ; the main body of the BYE5 program. ; NUEVO EQU NO ; YES, if Nuevo 80 column upgrade WITH baud rate ; option has been installed. ; (see discussion above) ; BAUDMOD EQU no ; YES, if new Osborne ROM version 1.45 and baud ; rate jumper modification are installed. ; Do not set to YES if you have not installed ; new ROM and jumper modification ; (see discussion above) ; ;----------------------------------------------------------------------- ; ; STATM EQU 02A00H DATA EQU 02A01H CDATA EQU 02C02H CSTAT EQU 02C03H ; ; IF HARDMOD MDDCD EQU 40H ENDIF ; ; IF NOT HARDMOD MDDCD EQU 04H ENDIF ; RRDA EQU 0FEH MRDA EQU 1 RTBE EQU 0FDH MTBE EQU 2 ; ; ;----------------------------------------------------------------------- ; ; See if we still have a carrier - if not, return with the zero flag set ; MDCARCK: IF HARDMOD DI ; Disable interrupts OUT 0 LDA CSTAT ; Read video PIA status register OUT 1 EI ENDIF ; HARDMOD ; ; IF NOT HARDMOD CALL BNKINS ; Get modem status ENDIF ; NOT HARDMOD ; ; CMA ; Complement register, DCD bit set with LOSS of carrier ; This is opposite of most I/O devices. ANI MDDCD ; Mask out everything but carrier LOSS bit ; Z=1 Lost carrier ; Z=0 Carrier present RET ;...... ; ; ; Disconnect and wait for an incoming call ; MDINIT: CALL RTSDIS ; Clear RTS causing hangup CALL RTSNBL ; Turn on DTR so modem can answer phone CALL OFFTIM ; Wait 2 seconds ; IF IMODEM CALL IMINIT ; Initialize smartmodem ENDIF ; IMODEM ; IF HARDMOD CALL INITCAR ; Reset carrier detect input on 6821 video PIA ENDIF ; HARDMOD ; RET ;..... ; ; ; Input a character from the modem port ; MDINP: CALL BNKIND ; Input data from RS-232 serial port PUSH PSW ; Save the character LDA SSTAT ; Load secondary ACIA status register from RAM ANI RRDA ; Mask the RDA bit (reset RDA bit in secondary register) STA SSTAT ; Save our updated status register in RAM POP PSW ; Recover the character RET ; Return to sender ;..... ; ; ; Check the status to see if a character is available. If not, return ; with the zero flag set. If yes, use 0FFH to clear the flag. ; MDINST: PUSH B ; Save BC registers LDA SSTAT ; Load secondary ACIA status register ; (contains status of ACIA from last ACIA operation) MOV B,A ; Save it in register B CALL BNKINS ; Input current ACIA status register ORA B ; Perform an OR operation on both former ; as well as present ACIA register states. STA SSTAT ; Save updated ACIA register state in secondary ACIA ; register ANI MRDA ; Mask RDA bit POP B ; Recover former BC registers RZ ; Nothing? Return to sender with Z-flag set ORI 0FFH ; We got something.... RET ; Return to sender with Z-flag not set ;..... ; ; ; Send a character to the modem ; MDOUTP: PUSH PSW CALL BNKOUTD ; Output data to RS-232 serial port LDA SSTAT ; Load secondary ACIA register ANI RTBE ; Mask the TBE bit STA SSTAT ; Save secondary ACIA register (now updated) POP PSW RET ; Return to sender ;..... ; ; ; Check the status to see if ACIA can output a character. If not, return ; with the zero flag set. If yes, use 0FFH to clear the flag. ; MDOUTST:PUSH B ; Save BC registers CALL BNKINS ; Get present ACIA status register MOV B,A ; Move it to 'B' register LDA SSTAT ; Get secondary ACIA status register ORA B ; Perform an OR operation on present and former ; ACIA status register states STA SSTAT ; Save updated ACIA status register in secondary ; ACIA status register ANI MTBE ; Mask the TBE bit POP B ; Recover the former BC registers RZ ; Transmit buffer not empty so return ; to sender with Z-flag set ORI 0FFH ; If empty... RET ; Ready to send character ;..... ; ; ; Reinitialize the modem and hang up the phone by dropping RTS and ; leaving it inactive ; MDQUIT: CALL RTSDIS ; Disable RTS output which forces modem to hang-up ; IF IMODEM CALL RTSNBL ; Turn on RTS so modem can be programmed CALL IMQUIT ; If a smartmodem, tell it to shut down ENDIF ; IMODEM ; ; ; Called by the main program after caller types BYE ; MDSTOP: CALL RTSDIS ; Disable RTS causing modem hangup ; RET ;..... ; ; ; Initialize the 6850 ACIA and disable RTS line which serves as DTR ; control for the modem ; RTSDIS: ; MVI A,57H ; IRQ disabled ; RTS disabled (valid for modified/unmodified O-1) ; with HARDMOD on, modem forced to hang up ; with HARDMOD off, modem is commanded to hang up ; using IMODEM equate software ; 8 data bits, 1 stop bit, MRESET CALL BNKOUTS ; OFFTIM: PUSH B ;2 second delay after dropping the ACIA RTS line MVI B,20 ;(which is DTR to the modem) ; OFFTI: CALL DELAY DCR B JNZ OFFTI POP B RET ;..... ; ; ; Reset video 6820 PIA register for future detection of lost carrier ; INITCAR: DI OUT 0 LDA CDATA ; Read video pia data register to reset cb2 bit OUT 1 EI RET ;..... ; ; RTSNBL: LDA WRKBAUD ; ACIA reset, set RTS state, set data parameters CALL BNKOUTS RET ;..... ; ; BNKINS: DI ; Disable interrupts OUT 0 ; Switch banks to shadow memory bank LDA STATM ; Read ACIA status register (memory mapped) OUT 1 ; Switch banks back to program memory bank EI ; Re-enable interrupts RET ; Go home ;..... ; ; BNKIND: DI ; Disable interrupts OUT 0 ; Switch banks to shadow memory bank LDA DATA ; Read ACIA data register (memory mapped) OUT 1 ; Switch banks back to program memory bank EI ; Reenable interrupts RET ; Go home ;..... ; ; BNKOUTS:DI ; Disable interrupts OUT 0 ; Switch banks to shadow memory bank STA STATM ; Write data to ACIA control register (memory mapped) OUT 1 ; Switch banks to program memory bank EI ; Reenable interrupts RET ; Go home ;..... ; ; BNKOUTD:DI ; Disable interrupts OUT 0 ; Switch banks to shadow memory bank STA DATA ; Write data to ACIA data register (memory mapped) OUT 1 ; Switch banks to program memory bank EI ; Reenable interrupts RET ; Go home ;..... ; ; ; The following routines set the baudrate. BYE5 would like the maximum ; speed you have available for controlling your modem. ; ; the code below is for an osborne without the nuevo 80 column ; video board and without the 1.45 ROM ; IF NOT NUEVO AND NOT BAUDMOD AND NOT HARDMOD SET300: MVI A,56H ; IRQ disabled, RTS disabled (required for non-modified O-1) ; 8 data bits, 1 stop bit, 64X clock JMP SETBAUD ; SET1200: MVI A,55H ; IRQ disabled, RTS disabled (required for non-modified O-1) ; 8 data bits, 1 stop bit, 16X clock ENDIF ; NOT NUEVO AND NOT BAUDMOD AND NOT HARDMOD ; IF NOT NUEVO AND NOT BAUDMOD AND HARDMOD SET300: MVI A,16H ; IRQ disabled, RTS enabled (required for modified O-1) ; 8 data bits, 1 stop bit, 64X clock JMP SETBAUD ; SET1200: MVI A,15H ; IRQ disabled, RTS enabled (required for modified O-1) ; 8 data bits, 1 stop bit, 16X clock ENDIF ; NOT NUEVO AND NOT BAUDMOD AND HARMOD ; IF NOT NUEVO AND NOT BAUDMOD SETBAUD: STA WRKBAUD ; Save incoming baud rate and ACIA parameters CALL BNKOUTS XRA A ; Show baudrate was ok RET ; SET2400 EQU $ ; The unmodified OS-1 doesn't like 2400 ; SETINV: MVI A,0FFH ; Return bad ORA A ; Show baudrate was unacceptable RET ENDIF ; NOT NUEVO AND NOT BAUDMOD ;... ; ; the following code is for an osborne with the ROM 1.45 ; and baud rate mods ; IF BAUDMOD AND NOT NUEVO SET300: ENDIF ; BAUDMOD AND NOT NUEVO ; IF BAUDMOD AND NOT NUEVO AND HARDMOD MVI C,16H ; X64 clock, 8 DB 1 SB, RTS active ENDIF ; BAUDMOD AND NOT NUEVO AND HARDMOD ; IF BAUDMOD AND NOT NUEVO AND NOT HARDMOD MVI C,56H ; X64 clock, 8 DB 1 SB, RTS inactive ENDIF ; BAUDMOD AND NOT NUEVO AND NOT HARDMOD ; IF BAUDMOD AND NOT NUEVO MVI B,3FH ; Get low baud VIDEO PIA value JMP SETBAUD ; Load PIA and ACIA control bytes ; SET1200: ENDIF ; BAUDMOD AND NOT NUEVO ; IF BAUDMOD AND NOT NUEVO AND HARDMOD MVI C,15H ; X16 clock, 8 DB 1 SB, RTS active ENDIF ; BAUDMOD AND NOT NUEVO AND HARDMOD ; IF BAUDMOD AND NOT NUEVO AND NOT HARDMOD MVI C,55H ; X16 clock, 8 DB 1 SB, RTS inactive ENDIF ; BAUDMOD AND NOT NUEVO AND NOT HARDMOD ; IF BAUDMOD AND NOT NUEVO MVI B,3FH ; Get low baud VIDEO PIA value JMP SETBAUD ; Load PIA and ACIA control bytes ; SET2400: ENDIF ; BAUDMOD AND NOT NUEVO ; IF BAUDMOD AND NOT NUEVO AND HARDMOD MVI C,15H ; X16 clock, 8 DB 1 SB, RTS active ENDIF ; BAUDMOD AND NOT NUEVO AND HARDMOD ; IF BAUDMOD AND NOT NUEVO AND NOT HARDMOD MVI C,55H ; X16 clock, 8 DB 1 SB, RTS inactive ENDIF ; BAUDMOD AND NOT NUEVO AND NOT HARDMOD ; IF BAUDMOD AND NOT NUEVO MVI B,37H ; Get high baud VIDEO PIA value ; SETBAUD: MOV A,B ; Load Acc with PIA baud rate speed value DI OUT 0 ; Switch to alternate bank STA 2C01H ; Output data to VIDEO PIA control register A OUT 1 ; Switch to main bank EI ; MOV A,C ; Load Acc with ACIA control byte STA WRKBAUD ; Save incoming ACIA control byte CALL BNKOUTS XRA A ; Show baudrate was ok RET ENDIF ; BAUDMOD AND NOT NUEVO ;... ; ; the code below is for an osborne with nuevo 80 column video board installed ; IF NUEVO AND NOT BAUDMOD SET300: MVI A,05H ; 300 bps byte JMP SETBAUD1 ; SET1200: MVI A,07H ; 1200 bps byte JMP SETBAUD1 ; SET2400: MVI A,0AH ; 2400 bps byte ; SETBAUD1: OUT 06H ; Send to Nuevo baud rate generator port ENDIF ; NUEVO AND NOT BAUDMOD ; IF NUEVO AND NOT BAUDMOD AND NOT HARDMOD MVI A,55H ; IRQ disabled, RTS disabled (required for non-modified O-1) ; 8 data bits, 1 stop bit, 16X clock ENDIF ; NUEVO AND NOT BAUDMOD AND NOT HARDMOD ; IF NUEVO AND NOT BAUDMOD AND HARDMOD MVI A,15H ; IRQ disabled, RTS enabled (required for modified O-1) ; 8 data bits, 1 stop bit, 16X clock ENDIF ; NUEVO AND NOT BAUDMOD AND HARDMOD ; IF NUEVO AND NOT BAUDMOD SETBAUD: STA WRKBAUD ; Save incoming baud rate and ACIA parameters CALL BNKOUTS XRA A ; Show baudrate was ok RET ENDIF ; NUEVO AND NOT BAUDMOD ; ;----------------------------------------------------------------------- ;----------------------------------------------------------------------- ; ; ++++ Install your Modem dependent insert here ++++ ; (If B5IM is YES you don't need one) ; ;----------------------------------------------------------------------- ; ; ++++ Install your TIME routine here ++++ ; ; If you have a clock and wish to use TIMEON or RSPEED, please replace ; the following code with your clock read code. Use as many instruc- ; tions as you need but make sure you store binary, not BCD values in ; CCHOUR and CCMIN. Use RTCBUF to store BCD clock data, then use BCDBIN ; to convert it to binary for CCHOUR and CCMIN. See B5C-QXnn.INS as an ; example of handling a BCD clock, or B5C-SDS.INS for a BIOS interrupt- ; driven clock that runs in binary (hex). All registers are saved before ; TIME is called, so you don't have to save them. ; ; NOTE... Set BCD2BIN to YES if your clock routine calls BCDBIN ; Set BIN2BCD to YES if your clock routine calls BINBCD ; ; ; (Replace the following code with your own clock subroutine) ; IF CLOCK OR RSPEED ; ; B5C-KCT1.INS ; 07/17/85 A TIME insert for BYE500 and up ; Wayne Masters ; Potpourri, 408-378-7474 ; ; This insert is for the Z80 piggyback clock chip from: ; Kenmore Computer Technology ; 20 Londers Rd. ; Kenmore, N.Y. ; (716) 877-0617 ; ; If your computer uses a Z80 chip and does not have a clock ; then this is the clock for you. It installs in minutes. ; Just remove your Z80 chip, install this chip and reinstall ; your Z80 on top. Use an external program to initialize this ; clock prior to loading BYE. (See Z-TIMEn.LBR for this initialization ; program). ; ; ; RTCBUF will have HH, MM, SS, YY, YY, MM, DD as BCD values (see label) ; CCMIN is address for storing current minutes in binary ; CCHOUR is address for current hour in binary. ; ;*********************************************************************** ZPORT EQU 0E0H ; Board shipped with this as default address ; Change address if you change address jumpers CENTURY EQU 019H ; Change this in year 2000 ; TIME: IN ZPORT+2 ; Seconds STA RTCBUF+2 IN ZPORT+3 ; Get BCD value for minutes STA RTCBUF+1 CALL BCDBIN ; Convert BCD minutes to binary STA CCMIN ; Update the current minute IN ZPORT+4 ; Get BCD value for hour STA RTCBUF CALL BCDBIN ; Convert BCD hour to binary STA CCHOUR ; Update the current hour IN ZPORT+6 ; Day of month STA RTCBUF+6 IN ZPORT+7 ; Month of year STA RTCBUF+5 IN ZPORT+9 ; Year of century STA RTCBUF+4 MVI A,CENTURY ; Set to 19 now STA RTCBUF+3 RET ; Return ; ; End of TIME routine for BYE500 and up. ;------------------------------------------------------------------------ ; ENDIF ; CLOCK OR RSPEED ; ; ; end of clock routine ;----------------------------------------------------------------------- IF B5IM IMRING: CALL MDINST RZ CALL MDINP ANI 7FH ENDIF IF B5IM AND PRGRSS CALL RCDISP PUSH PSW LXI H,LFMSG CALL PRINTL POP PSW ENDIF IF B5IM CPI CR RZ CPI LF RZ CPI '2' JNZ REDOIT ENDIF IMRIN1: IF B5IM AND (NOT NOATA) MVI B,22 CALL DLP1 CALL EATALL IMRIN2: LXI H,B5ATA CALL IMSEND ENDIF IF B5IM LXI B,30000 MDR1: CALL MDINST JZ RCHEK CALL MDINP ANI 07FH ENDIF IF B5IM AND PRGRSS CALL RCDISP ENDIF IF B5IM CPI CR JZ MDR1 CPI LF JZ MDR1 CPI '2' JZ IMRIN1 CPI '3' JZ REDOIT CPI '4' JZ REDOIT CPI '1' JNZ MDR2 CALL CHECK1 ENDIF IF B5IM AND PRGRSS CALL RCDISP ENDIF IF B5IM CPI '0' JZ SET24 JMP SET3 MDR2: CPI '5' JZ SET12 CPI '6' JZ SET24 CPI '9' JZ SET24 ENDIF IF B5IM AND ANCHOR JMP SET3 ENDIF IF B5IM JMP MDR1 RCHEK: CALL KDELAY DCX B MOV A,C ORA B JNZ MDR1 REDOIT: POP H LXI H,VCNUM INR M ENDIF IF B5IM AND DISKLOG CALL OPENLOG LXI H,VOCMSG CALL WRTMSG MVI E,0 CALL TSTHRD ENDIF IF B5IM LXI H,LFMSG CALL PRINTL CALL MDSTOP JMP HANGUP1 ENDIF IF B5IM AND PRGRSS RCDISP: PUSH B PUSH H PUSH PSW STA RCSHOW LXI H,RCSHOW CALL PRINTL POP PSW PUSH PSW CPI CR JNZ RCDIS1 MVI A,LF STA RCSHOW LXI H,RCSHOW CALL PRINTL RCDIS1: POP PSW POP H POP B RET ENDIF IF B5IM CHECK1: LXI B,400 CHECK2: CALL KDELAY DCX B MOV A,B ORA C JZ CHECK3 CALL MDINST JZ CHECK2 CALL MDINP ANI 07FH RET CHECK3: MVI A,0FFH RET SET24: CALL DLP CALL SET2400 MVI A,BP2400 STA MSPEED JMP FINISH SET3: CALL DLP CALL SET300 MVI A,BP300 STA MSPEED JMP FINISH SET12: CALL DLP CALL SET1200 MVI A,BP1200 STA MSPEED FINISH: CALL MDCARCK JZ REDOIT POP H CALL PATCH MVI B,6 CALL DLP1 CALL EATALL JMP ANSW IMINIT: CALL DLP CALL EATALL ENDIF IF B5IM AND DOATZ LXI H,B5ATZ  CALL IMSEND CALL DLP CALL EATALL ENDIF IF B5IM LXI H,B5INIT CALL IMSEND ENDIF IF B5IM AND SHORTB CALL DLP CALL EATALL LXI H,B5INT1 CALL IMSEND ENDIF IF B5IM AND PRGRSS IMINT1: CALL CHECK1 CPI 0FFH JZ IMINT2 CPI '0' CZ RCDISP JZ IMINT3 CPI '4' CZ RCDISP JNZ IMINT1 IMINT2: LXI H,CMDERR CALL PRINTL JMP IMINIT ENDIF IF B5IM IMINT3: LXI H,LFMSG CALL PRINTL CALL DLP CALL EATALL RET DLP: MVI B,10 DLP1: CALL DELAY DCR B JNZ DLP1 RET EATALL: CALL CHECK1 CPI 0FFH JNZ EATALL RET IMQUIT: LXI H,LFMSG CALL PRINTL ENDIF IF B5IM AND DOATZ CALL DLP CALL EATALL LXI H,B5ATZ CALL IMSEND ENDIF IF B5IM CALL DLP CALL EATALL ENDIF IF B5IM AND (NOT OFFHK) LXI H,B5USR CALL IMSEND CALL EATALL ENDIF IF B5IM AND OFFHK LXI H,B5ATH1 CALL IMSEND ENDIF IF B5IM RET IMSEND: PUSH B SHLD ADDSTR IMSEN1: CALL MDOUTST JZ IMSEN1 MOV A,M PUSH PSW CALL MDOUTP POP PSW ENDIF IF B5IM AND PRGRSS CALL RCDISP ENDIF IF B5IM AND ECHO CALL CHECK1 CMP M JNZ NOECHO ENDIF IF B5IM INX H MOV A,M ORA A JNZ IMSEN1 POP B RET ENDIF NOECHO: IF B5IM AND ECHO AND PRGRSS LXI H,NOEMSG CALL PRINTL ENDIF IF B5IM AND ECHO CALL MDOUTST JZ NOECHO MVI A,CR CALL MDOUTP CALL DLP CALL EATALL LHLD ADDSTR JMP IMSEN1 ENDIF IF B5IM AND NODTR IMHANG: CALL EATALL MVI B,30 CALL DLP1 LXI H,B5ESC CALL IMSEND CALL EATALL MVI B,15 CALL DLP1 LXI H,B5ATH CALL IMSEND CALL DLP RET ENDIF IMDONE: CALL DELAY IF NOT NODTR CALL MDSTOP ENDIF CALL MDCARCK RZ IF B5IM AND NODTR CALL IMHANG ENDIF JMP IMDONE START0: IF TIMEON LDA TON STA LCTON ENDIF IF NOT CPM3 LHLD BDOS+1 SHLD BDADDR ENDIF IF CPM3 LHLD STARTX+1 ENDIF IF NOT CPM3 LHLD BEGOBJ+1 ENDIF MOV A,H LXI D,BYERSX CMP D JZ NORPTC SHLD REALBD+1 LXI H,BYERSX IF CPM3 SHLD STARTX+1 ENDIF IF NOT CPM3 SHLD BEGOBJ+1 ENDIF NORPTC: XRA A STA MDMOFF STA ULCSW STA LFEEDS STA WRTLOC STA OPTION IF TIMEON AND CLOCK AND (NOT EXFILE) CALL MDCARCK CNZ RMTOS ENDIF IF MINICK MVI A,IOVAL STA IOBYTE ENDIF IF MBBS LXI SP,STACK CALL MDCARCK JZ START1 LDA LCDATA CPI ' ' JZ GOODBY XRA A STA 0 MVI A,0FFH STA WRTLOC LDA FCB+1 CPI 'C' JZ MBBSC ENDIF IF MBBS AND PRNTGB LXI H,GBMSG CALL PRINTB ENDIF IF MBBS MBBS01: CALL IMDONE JMP MBBSNC MBBSC: STA OPTION LXI H,MBBS1 CALL PRINTB CALL LODCOM CALL MDCARCK JZ MBBSNC MVI A,0CDH STA 0 CALL 100H MBBSNC: LXI H,MBBS2 CALL PRINTL MVI A,0FFH STA MDMOFF MVI A,'E' STA OPTION CALL LODCOM CALL 100H ENDIF CALL MDCARCK JNZ GOODBY START1: IF COMFILE LDA FCB+1 STA OPTION MVI A,' ' STA FCB+1 ENDIF IF CPM3 MVI C,GTSCB LXI D,SCBPB CALL BDOS SHLD SCBBASE MVI L,SCBCOM MOV A,M STA MEMBASE MVI L,SCBBDOS MOV A,M STA BDOSBASE ENDIF CALL PATCH CALL UNPATCH LXI H,VMSG CALL PRINTL JMP HANGUP GOODBY: IF EXFILE JMP LOGOFF ENDIF IF PRNTGB AND (NOT EXFILE) LXI H,GBMSG CALL PRINTB ENDIF IF NOT EXFILE CALL IMDONE CALL UNPATCH ENDIF IF DISKLOG AND (NOT EXFILE) LXI H,DSCMSG CALL WRTMSG ENDIF HANGUP: LXI SP,STACK IF DISKLOG XRA A STA BDOSFL STA LOGTOG MOV E,A CALL TSTHRD ENDIF IF CPM3 CALL DELRSX LXI D,DEFPW MVI C,DEFPAS CALL REALBD ENDIF IF COMFILE LXI H,ENTMSG CALL PRINTL CALL LODCOM ENDIF HANGUP1:MVI A,WBDRIV STA 0004H IF CPM3 CALL SETDRIVE XRA A CALL SETUSER ENDIF XRA A STA MDMOFF STA WRTLOC STA TON STA MSFLAG IF RTOK STA RTOKFG ENDIF IF CPM3 LHLD SCBBASE MVI L,0D4H MOV M,A MVI L,0CAH MOV M,A INR L DCR A MOV M,A ENDIF IF CPM3 AND CCPPLUS MVI L,0A4H MOV A,M ORI 80H MOV M,A ENDIF IF CPM3 MOV D,H MVI E,0E8H LXI H,DRVSRC MVI B,4 CALL MOVE ENDIF IF NO25TH OR MBBS LXI H,LFMSG CALL PRINTL LXI H,LCDATA CALL PRINTL ENDIF IF NO25TH OR MBBS LXI H,LCDATA MVI B,NO25BF CALL ZEROM LXI H,LCFILL LXI D,LCDATA MVI B,15 CALL MOVE ENDIF IF TIMEON LXI H,TONMSG CALL PRINTL XRA A LXI H,TONMSD CALL DEC8 ENDIF IF TIMEON OR CLOCK MVI A,255 STA TCHKFG ENDIF CALL CALSUM IF B5IM AND HS9600 CALL SET9600 ENDIF IF B5IM AND HS4800 CALL SET4800 ENDIF IF B5IM AND HS2400 CALL SET2400 ENDIF IF B5IM AND HS1200 CALL SET1200 ENDIF IF B5IM AND HS300 CALL SET300 ENDIF CALL MDINIT MVI A,0C3H STA 0 LDA LCDFLG ORA A JNZ BEXCPM IF CLRSCR CALL CLEARIT ENDIF IF COMFILE LDA OPTION CPI 'E' JNZ MOTOFF ENDIF ERUN: IF COMFILE AND B5IM CALL IMQUIT ENDIF IF COMFILE AND (NOT B5IM) CALL MDQUIT ENDIF IF COMFILE MVI A,0FFH STA MDMOFF STA WRTLOC MVI A,'L'-30H STA MSPEED JMP ANSW ENDIF MOTOFF: IF MOTOR CALL DSKOFF ENDIF RINGWT: CALL CONSTAT ORA A JZ RINGW1 CALL VCONIN ANI 7FH CPI 'C'-40H CZ USRCHK CALL CKFUNC RINGW1: IF B5IM CALL IMRING JZ RINGWT ENDIF IF NOT B5IM CALL MDCARCK JZ RINGWT ENDIF ANSW: IF NOT CPM3 CALL BDCHEK ENDIF IF MOTOR CALL DSKON ENDIF IF (NOT USEZCPR) AND (ZCPR2 OR ZCPR3) MVI A,MAXUSR STA MXUSR INR A STA MAXUSER MVI A,MAXDRV STA MXDRV DCR A STA MAXDRIV ENDIF IF CHGPATH CALL REMPAT ENDIF XRA A STA LFEEDS STA CDOFF STA FKFLAG IF ZCPR2 OR ZCPR3 STA WHEEL ENDIF MVI A,TOVALUE STA TOVAL IF COMFILE LDA OPTION CPI 'E' JZ WELCOME ENDIF LXI H,CWCAR INR M IF B5IM JMP WELCOME ENDIF IF NOT B5IM ANSWA: CALL SET300 MVI A,BP300 STA MSPEED CALL MDINP CALL MDINP ANSWB: CALL PATCH ENDIF IF PRGRSS AND (NOT B5IM) LXI H,MSG30 CALL PRINTL ENDIF IF NOT B5IM CALL TSTBAUD JZ WELCOME ENDIF IF PRGRSS AND (NOT B5IM) AND (HS1200 OR HS2400) LXI H,MSG12 CALL PRINTL ENDIF IF (NOT B5IM) AND (HS1200 OR HS2400) CALL SET1200 JNZ ANS0 MVI A,BP1200 STA MSPEED CALL MDINP CALL TSTBAUD JZ WELCOME ENDIF ANS0: IF PRGRSS AND (NOT B5IM) AND HS2400 LXI H,MSG24 CALL PRINTL ENDIF IF (NOT B5IM) AND HS2400 CALL SET2400 JNZ BADDO MVI A,BP2400 STA MSPEED CALL MDINP CALL TSTBAUD JZ WELCOME ENDIF IF NOT B5IM BADDO: CALL UNPATCH JMP ANSWA ENDIF IF CPM3 DRVSRC: DB SDRV1,SDRV2,SDRV3,SDRV4 DEFPW: DB ' ' RSXCL: DB 56 ENDIF IF NOT CPM3 BDCHEK: PUSH H DB LXIH BDADDR: DW 0000H SHLD 6 POP H RET ENDIF CHECK: IF MINICK LDA IOBYTE ANI 80H RNZ ENDIF IF RBBS OR MBBS OR PBBS OR QBBS LDA WRTLOC ORA A RNZ ENDIF LDA MDMOFF ORA A RNZ CALL CARCK RNC LXI SP,STACK LXI H,CLMSG CALL PRINTL IF DISKLOG XRA A STA BDOSFL LXI H,CARMSG CALL WRTMSG JMP LOGOFF DROPIT: LXI SP,STACK XRA A STA BDOSFL LXI H,DRPMSG CALL WRTMSG ENDIF LOGOFF: LXI SP,STACK IF NOT CPM3 CALL BDCHEK ENDIF CALL PATCH IF TIMEON LDA TON STA LCTON ENDIF CALL MDCARCK JZ LOGOF1 IF NOT BYHANG JMP LOGOF2 ENDIF IF TIMEON AND CLOCK CALL RMTOS ENDIF IF PRNTGB LXI H,GBMSG CALL PRINTB ENDIF LOGOF1: MVI A,255 STA MDMOFF STA TCHKFG CALL IMDONE LOGOF2: IF MBBS XRA A STA FCB+1 STA 0 STA MXTIME LDA LCDATA CPI ' ' JNZ MBBS01 ENDIF IF EXFILE LXI H,EXTMSG CALL PRINTL MVI C,SETUSR MVI E,EXUSR CALL BDOS MVI C,SELDSK MVI E,EXDRV-'A' CALL BDOS CALL LODEX CALL 100H ENDIF IF EXFILE AND (NOT BYHANG) CALL MDCARCK JZ PREOFF ENDIF IF CLOCK AND TIMEON AND EXFILE AND (NOT BYHANG) CALL RMTOS ENDIF IF PRNTGB AND EXFILE AND (NOT BYHANG) LXI H,GBMSG CALL PRINTB ENDIF JMP PREOFF CKFUNC: IF LEADIN PUSH PSW CPI LEADKY JNZ FKEY1 MVI A,0FFH STA FKFLAG POP PSW MVI A,07FH RET FKEY1: LDA FKFLAG ORA A JZ FKEXIT XRA A STA FKFLAG POP PSW ANI 1FH ENDIF IF B5IM AND (NOT NOATA) MOV B,A PUSH B CALL MDCARCK POP B MOV A,B JNZ ANSKNO CPI ANSKEY CZ IMRIN2 ANSKNO: ENDIF IF NO25TH OR MBBS CPI WHOKEY JZ WHOSIT ENDIF IF TIMEON CPI TIMEKEY JZ DTIME ENDIF CPI ZCREEN JZ CLEARIT CPI BELLKEY JZ BELLTOG IF DISKLOG CPI LOGKEY JZ LOGFLP ENDIF MOV B,A PUSH B CALL MDCARCK POP B MOV A,B RZ CPI LCKEY JZ LCDOIT CPI ULTKEY JZ ULTIME CPI BLNKKEY JZ BLNKTOG CPI SYSDKEY JZ SYSDOWN CPI TWITKEY PUSH PSW CZ IMDONE POP PSW IF NOT DISKLOG JZ LOGOFF ENDIF IF DISKLOG JZ DROPIT ENDIF CPI MSGKEY RNZ LXI H,MFSMSG CALL PRINTB SYSML: CALL VCONIN CPI XITKEY JZ SYSMX MOV C,A PUSH PSW CALL MOUTPUT POP PSW CPI 'H'-'@' JZ SYSMBS CPI CR JZ SYSMCR JMP SYSML SYSMCR: MVI C,LF JMP SYSECH SYSMBS: MVI C,' ' CALL MOUTPUT MVI C,'H'-'@' SYSECH: CALL MOUTPUT JMP SYSML SYSMX: MVI C,CR CALL MOUTPUT MVI C,LF CALL MOUTPUT CALL MDINP CALL MDINP MVI A,CR RET SYSDOWN:LXI H,SGDMSG CALL PRINTB IF TIMEON CALL TCHECK LDA TON ADI DOWNMIN STA MXTIME ENDIF MVI A,CR RET LCDOIT: LXI H,LCDMSG CALL PRINTL MVI A,07FH STA LCDFLG RET BELLTOG:LDA BELLON ORA A MVI A,0FFH LXI H,BELMON JZ BELLT1 XRA A LXI H,BELMOFF BELLT1: STA BELLON IF LMBELL  ORA A JZ BELLT2 XRA A JMP BELLT3 BELLT2: MVI A,0FFH BELLT3: STA KILBEL ENDIF CALL PRINTL MVI A,07FH RET ULTIME: XRA A STA MXTIME MVI A,0FFH STA LCPTR LXI H,ULTMSG CALL PRINTL MVI A,CR RET BLNKTOG:LDA MDMOFF ORA A IF ZCPR2 OR ZCPR3 JZ DUSET CALL RETDU ENDIF IF (NOT ZCPR2) AND (NOT ZCPR3) MVI A,0FFH LXI H,SCRMOFF JZ BLNKT1 XRA A LXI H,SCRMON ENDIF BLNKT1: STA MDMOFF IF ZCPR2 OR ZCPR3 STA WHEEL ENDIF CALL PRINTL MVI A,CR RET DUSET: IF ZCPR2 OR ZCPR3 MVI A,SYSUSR+1 STA MAXUSER MVI A,SYSDRV-1 STA MAXDRIV LDA LCPTR STA CDOFF ENDIF IF CHGPATH CALL SYSPAT ENDIF IF ZCPR2 OR ZCPR3 MVI A,0FFH STA LCPTR LXI H,SCRMOFF JMP BLNKT1 RETDU: LDA MXUSR INR A STA MAXUSER LDA MXDRV DCR A STA MAXDRIV LDA CDOFF STA LCPTR ENDIF IF CHGPATH CALL REMPAT ENDIF IF ZCPR2 OR ZCPR3 XRA A LXI H,SCRMON RET ENDIF IF NO25TH OR MBBS WHOSIT: LXI H,CRMSG CALL PRINTL LXI H,LCHEAD CALL PRINTL LXI H,LCDATA  CALL PRINTL LXI H,CRMSG CALL PRINTL MVI A,07FH RET ENDIF IF TIMEON DTIME: CALL TCHECK LXI H,LFMSG CALL PRINTL LDA MXTIME ORA A JZ DTIME1 LXI H,TLNMSG ENDIF IF TIMEON AND (ZCPR2 OR ZCPR3) LDA WHEEL ORA A JNZ DTIME1 ENDIF IF TIMEON JMP DTIME2 DTIME1: LXI H,TONMSG DTIME2: CALL PRINTL LXI H,LFMSG CALL PRINTL MVI A,07FH RET ENDIF CLEARIT:LXI H,CLRSEQ CALL PRINTL MVI A,LF RET IF LEADIN FKEXIT: POP PSW RET ENDIF REALBD: JMP 0 BYERSX: IF DISKLOG MOV A,C CPI 15 JNZ NOT15B LDA LOGTOG ORA A JZ NOT15 PUSH D CALL LOGFLP POP D XRA A STA LOGTOG JMP NOT15A NOT15: LDA DSKLOG ORA A JZ NOT15A PUSH D CALL SETLUS LXI D,LOGFCB MVI C,16 CALL REALBD CALL CLRLUS POP D NOT15A: MVI C,15 NOT15B: CALL STBDOS LDA DSKLOG ORA A MOV A,C JZ NOLOGTEST ENDIF IF DISKLOG AND CPM3 CPI 98 JNZ NOT98 CALL SETLUS LXI D,LOGFCB MVI C,16 CALL REALBD CALL CLRLUS MVI C,98 JMP REALBD NOT98: CPI 13 JNZ NOT13 LXI D,80H MVI C,26 CALL REALBD MVI E,0 MVI C,14 CALL REALBD LXI D,0FFFFH MVI C,37 MOV A,C NOT13: CPI 37 JNZ NOT37 MOV A,E ANI 0FEH MOV E,A JMP REALBD NOT37: ENDIF IF DISKLOG AND (NOT CPM3) CPI 13 JNZ NOT13 CALL SETLUS LXI D,LOGFCB MVI C,16 CALL REALBD CALL CLRLUS MVI C,13 JMP REALBD NOT13: ENDIF IF DISKLOG CPI 1 JNZ NOT1 CALL REALBD JMP HARDWR NOT1: CPI 6 JNZ NOT6 MOV A,E INR A JNZ REALBD CALL REALBD ORA A RZ HARDWR: CALL STKNEW PUSH PSW ANI 7FH CALL WRBYTE CPI CR JNZ HARRET MVI A,LF CALL WRBYTE HARRET: POP PSW RET NOT6: CPI 10 JNZ NOLOGTEST PUSH D CALL REALBD POP H INX H MOV A,M ORA A RZ CALL STKNEW PUSH H CALL WRTTIM POP H MOV B,M INX H B10LOP: MOV A,M CALL WRBYTE INX H DCR B JNZ B10LOP JMP WRCRLF NOLOGTEST: ENDIF IF DISKLOG AND (NOT CPM3) CPI 26 JNZ NOTDMA XCHG SHLD OLDDMA XCHG JMP REALBD NOTDMA: ENDIF MOV A,C CPI 32 JZ TSTUSR  CPI LOCMD JC REALBD CPI HICMD+1 JNC REALBD SUI LOCMD PUSH D MOV E,A ADD A ADD E MOV E,A MVI D,0 LXI H,RSXTBL DAD D POP D MOV A,E PCHL RSXTBL: JMP MDINST JMP MDOUTST JMP MDOUTP JMP MDINP JMP MDCARCK JMP CONSTAT JMP CONIN JMP RCONOT JMP RMXDRV JMP RMXUSR JMP RMTOUT JMP RMNULL JMP RMULC JMP RMLFM JMP RMWRT JMP RMHDR JMP RMOFF JMP RMBELL JMP RMRTC JMP RMLCBF JMP RMMXT JMP RMLTIM JMP RMTOS JMP SRUDEF JMP RMXLCP JMP LOGSTAT JMP LOGPUT JMP IMDONE TSTUSR: MOV A,E CPI 241 JNZ REALBD MVI A,77 RET RCONOT: MOV C,E JMP VCONOUT RMXDRV: LXI H,MXDRV JMP SETGET1 RMXUSR: LXI H,MXUSR JMP SETGET1 RMNULL: LXI H,NULLS JMP SETGET1 RMTOUT: LXI H,TOVAL JMP SETGET1 RMULC: LXI H,ULCSW JMP SETGET1 RMLFM: LXI H,LFEEDS JMP SETGET2 RMHDR: LXI H,HARDON JMP SETGET2 RMWRT: LXI H,WRTLOC JMP SETGET2 RMOFF: LXI H,MDMOFF JMP SETGET2 RMBELL: LXI H,BELLON JMP SETGET2 RMRTC: IF TIMEON CALL TCHECK ENDIF IF CLOCK AND (NOT TIMEON) CALL TIME ENDIF LDA TON LXI H,RTCBUF RET RMXLCP: LXI H,LCPTR INR A JZ SGET1 MOV M,D RET RMLCBF: LXI H,LCDATA RET RMMXT: LXI H,MXTIME JMP SETGET1 RMLTIM: STA LMIN MOV A,D STA LHOUR RET RMTOS: IF TIMEON CALL TCHECK LDA MXTIME ORA A JZ RMTOS1 LXI H,TLNMSG ENDIF IF TIMEON AND (ZCPR2 OR ZCPR3) LDA WHEEL ORA A JNZ RMTOS1 ENDIF IF TIMEON JMP RMTOS2 RMTOS1: LXI H,TONMSG RMTOS2: CALL PRINTB ENDIF RET SETGET1:INR A JZ SGET1 DCR A MOV M,A RET SGET1: MOV A,M RET SETGET2:INR A JZ SGET1 DCR A JZ SGET2W MVI A,255 SGET2W: MOV M,A RET CONIN: PUSH B PUSH D PUSH H CALL VCONIN CALL CKFUNC POP H POP D POP B RET CONOUT: PUSH B PUSH D PUSH H MOV A,C ANI 07FH CNZ VCONOUT POP H POP D POP B RET CONSTAT:PUSH B PUSH D PUSH H CALL VCONSTAT POP H POP D POP B RET DELAY: PUSH B LXI B,4167*MHZ DELAY1: DCX B MOV A,B ORA C JNZ DELAY1 POP B RET KDELAY: PUSH B LXI B,42*MHZ JMP DELAY1 BEXCPM: LXI H,BELMSG CALL PRINTL EXCPM: IF B5IM CALL IMQUIT ENDIF IF NOT B5IM CALL MDQUIT ENDIF IF MOTOR CALL DSKON ENDIF IF DISKLOG MVI E,0 CALL TSTHRD ENDIF LHLD REALBD+1 IF CPM3 SHLD STARTX+1 ENDIF IF NOT CPM3 SHLD BDOS+1 ENDIF IF ZCPR2 OR ZCPR3 MVI A,0FFH STA WHEEL MVI A,SYSUSR+1 STA MAXUSER MVI A,SYSDRV-1 STA MAXDRIV ENDIF IF CHGPATH CALL SYSPAT ENDIF IF ZCPR3 CALL DOZ3 ENDIF IF CPM3 CALL RSXCLR ENDIF CALL UNPATCH MVI A,0C3H STA 000H JMP 0000H IF ZCPR3 DOZ3: LHLD Z3CL MVI M,0 LXI H,SHSTK CALL ZERO128 LXI H,Z3ENV+128 CALL ZERO128 LXI H,Z3MSG MVI B,80 CALL ZEROM RET ZERO128:MVI B,128 ENDIF ZEROM: MVI M,0 INX H DCR B JNZ ZEROM RET CARCK: IF LMBELL LDA KILBEL CMA STA BELLON ENDIF LDA MDMOFF ORA A JNZ CARCK2 CALL MDCARCK JNZ CARCK2 PUSH B MVI B,CLOSS*10 CARLP: CALL DELAY CALL MDCARCK MOV A,B POP B JNZ CARCK2 DCR A STC RZ PUSH B MOV B,A JMP CARLP CARCK2: IF USEZCPR AND (ZCPR2 OR ZCPR3) LDA MAXDRIV INR A STA MXDRV LDA MAXUSER DCR A STA MXUSR ENDIF IF (NOT USEZCPR) AND (ZCPR2 OR ZCPR3) LDA MXDRV DCR A STA MAXDRIV LDA MXUSR INR A STA MAXUSER ENDIF IF CHEKDU LDA 0004H ANI 0FH PUSH H LXI H,MXDRV CMP M JC CARCK3 LDA 0004H ANI 0F0H ORI WBDRIV STA 0004H ENDIF IF CPM3 AND CHEKDU MVI A,WBDRIV CALL SETDRIVE ENDIF IF CHEKDU LXI H,IDMSG CALL PRINTB JMP 0000H CARCK3: LDA 0004H ANI 0F0H RRC RRC RRC RRC LXI H,MXUSR CMP M JC CARCK4 JZ CARCK4 LDA 0004H ANI 0FH STA 0004H ENDIF IF CPM3 AND CHEKDU XRA A CALL SETUSER ENDIF IF CHEKDU LXI H,IUMSG CALL PRINTB JMP 0000H CARCK4: POP H ENDIF ORA A RET PRINTB: PUSH B PUSH PSW PRBL: MOV C,M CALL MOUTPUT INX H MOV A,M ORA A JNZ PRBL POP PSW POP B RET PRINTL: PUSH B PUSH PSW IF RVIDEO CALL MDCARCK JZ PRLL PUSH H LXI H,RVIDON CALL PRTREV POP H ENDIF PRLL: MOV C,M CALL CONOUT INX H MOV A,M ORA A JNZ PRLL IF RVIDEO CALL MDCARCK LXI H,RVIDOFF CNZ PRTREV ENDIF POP PSW POP B RET IF RVIDEO PRTREV: MOV C,M CALL CONOUT INX H MOV A,M ORA A RZ JMP PRTREV ENDIF LISTOUT:PUSH B PUSH D PUSH H PUSH PSW IF NOT CPM3 CALL BDCHEK ENDIF MOV C,A CALL VLISTOUT POP PSW POP H POP D POP B RET IF DISKLOG LOGFLP: LDA BDOSFL ORA A JZ LOGFLP1 STA LOGTOG MVI A,07FH RET LOGFLP1: CALL STKNEW LXI H,DSKLOG MOV A,M ORA A JZ OPENLOG XRA A JP CLSHRD OPENLOG: LXI H,DSKLOG OPNHRD: INR M DCR M MVI A,07FH RNZ ORI 0FFH MOV M,A CALL OPNLOG LXI H,OPNMSG CALL PRINTL MVI A,07FH RET TSTHRD: MOV A,E LXI H,DSKLOG ORA M RZ CALL STKNEW MOV A,E ORA A JNZ OPNHRD CLSHRD: MOV M,A CALL WRCRLF CALL CLSLOG LXI H,CLSMSG CALL PRINTL MVI A,07FH RET CLSLOG: MVI A,26 CALL WRBY CALL WRITE CALL SETLUS LXI D,LOGFCB MVI C,16 CALL REALBD JMP CLRLUS OPNLOG: CALL SETLUS XRA A STA WOFFSET LXI H,LOGFCB+12 LXI D,LOGFCB+13 MVI M,0 MVI B,23 CALL MOVE LXI D,LOGFCB MVI C,15 CALL REALBD INR A JNZ NOLOGMAKE LXI D,LOGFCB MVI C,22 CALL REALBD NOLOGMAKE: LXI D,LOGFCB MVI C,35 CALL REALBD LHLD LOGFCB+33 MOV A,H ORA L JZ CLRLUS DCX H SHLD LOGFCB+33 LXI D,LOGFCB MVI C,33 CALL REALBD LXI B,128 MVI A,26 LXI H,RECORD FINDEOF: CMP M JZ FOUNDEOF INX H INR B DCR C JNZ FINDEOF DCR B FOUNDEOF: LXI H,WOFFSET MOV M,B JMP CLRLUS ENDIF IF DISKLOG AND CPM3 SETLUS: LHLD SCBBASE MVI L,0E0H MOV A,M LXI D,OLDLUS STAX D MVI M,LOGUSR MVI L,0E6H INX D MOV A,M MVI M,1 STAX D MVI L,0D8H INX D MOV A,M STAX D INR L INX D MOV A,M STAX D LXI D,RECORD MVI C,26 JMP REALBD CLRLUS: LHLD SCBBASE MVI L,0E0H LXI D,OLDLUS LDAX D MOV M,A MVI L,0E6H INX D LDAX D MOV M,A INX D XCHG MOV E,M INX H MOV D,M MVI C,26 JMP REALBD ENDIF IF DISKLOG AND (NOT CPM3) SETLUS: MVI E,255 MVI C,32 CALL REALBD STA OLDLUS MVI E,LOGUSR MVI C,32 CALL REALBD LXI D,RECORD MVI C,26 JMP REALBD CLRLUS: LDA OLDLUS MOV E,A MVI C,32 CALL REALBD LHLD OLDDMA XCHG MVI C,26 JMP REALBD ENDIF IF DISKLOG ADDHLA: ADD L MOV L,A RNC INR H RET WRBYTE: PUSH H PUSH D PUSH B PUSH PSW CPI ' ' JNC WROK CPI CR JZ WROK CPI LF JZ WROK CPI 8 JZ WROK MVI A,'^' CALL WRBY POP PSW PUSH PSW ADI 40H WROK: CALL WRBY POP PSW POP B POP D POP H RET WRBY: PUSH PSW LDA WOFFSET LXI H,RECORD CALL ADDHLA POP PSW MOV M,A LXI H,WOFFSET MOV A,M INR A CM WRITE MOV M,A RET WRITE: LDA WOFFSET ORA A RZ PUSH H CALL SETLUS LXI D,LOGFCB MVI C,21 CALL REALBD CALL CLRLUS XRA A POP H RET WRCRLF: MVI A,CR CALL WRBYTE MVI A,LF JMP WRBYTE WRTMSG: LDA DSKLOG ORA A RZ PUSH H CALL WRTTIM POP H WRTMS1: MOV A,M ORA A JZ WRCRLF CALL WRBYTE INX H JMP WRTMS1 WRTTIM: ENDIF IF DISKLOG AND CLOCK CALL TIME ENDIF IF DISKLOG LXI H,RTCBUF CALL WRTA MVI A,':' CALL WRBYTE INX H CALL WRTA MVI A,' ' JMP WRBYTE WRTA: MOV A,M RAR RAR RAR RAR CALL WRTHEX MOV A,M WRTHEX: ANI 0FH ADI '0' JMP WRBYTE STBDOS: MVI A,0FFH STA BDOSFL POP H SHLD CALLIN+1 CALLIN: CALL 0 PUSH PSW XRA A STA BDOSFL POP PSW RET STKNEW: SHLD HLSAVE POP H SHLD USRCAL+1 LXI H,0 DAD SP SHLD OLDSP LXI SP,NEWSTK LHLD HLSAVE USRCAL: CALL 0 LXI SP,0 OLDSP EQU $-2 RET LOGSTAT: MOV A,E INR A JNZ TSTHRD LDA DSKLOG ORA A RZ ORI 0FFH RET LOGPUT: CALL STKNEW XCHG JMP WRTMSG ENDIF IF NOT DISKLOG LOGSTAT: LOGPUT: MVI A,77 RET ENDIF IF DISKLOG PUTSL: MVI A,'/' STAX D INX D RET DATEMSG: MOV A,M RAR RAR RAR RAR CALL PUTDATE MOV A,M INX H PUTDATE: ANI 0FH ADI '0' STAX D INX D RET ENDIF LODCOM: IF COMFILE MVI C,SELDSK MVI E,COMDRV-'A' CALL BDOS MVI C,SETUSR MVI E,COMUSR CALL BDOS ENDIF IF MSGFIL LDA 000H CPI 0C2H JNZ NOMSGF XRA A STA MSGFCB LXI H,MSGFCB SHLD CURRFCB LXI H,MSGFCB+12 MVI B,21 CALL ZEROM LXI D,MSGFCB JMP LODCM2 NOMSGF: ENDIF IF MBBS LDA OPTION CPI 'C' JNZ LODCM1 MVI C,SELDSK MVI E,MBSDRV-'A' CALL BDOS MVI C,SETUSR MVI E,MBSUSR CALL BDOS XRA A STA OPTION STA FCB+1 STA CM2FCB LXI H,CM2FCB SHLD CURRFCB LXI H,CM2FCB+12 MVI B,21 CALL ZEROM LXI D,CM2FCB JMP LODCM2 ENDIF IF COMFILE LODCM1: LXI H,COMFCB SHLD CURRFCB XRA A STA COMFCB LXI H,COMFCB+12 MVI B,21 CALL ZEROM LXI D,COMFCB LODCM2: CALL OPENFIL JZ ABORT JMP LOADFIL ENDIF LODEX: IF EXFILE LXI H,EXITFCB SHLD CURRFCB LXI H,EXITFCB+12 MVI B,21 CALL ZEROM LXI D,EXITFCB CALL OPENFIL JZ ABORT ENDIF IF COMFILE OR EXFILE LOADFIL:LHLD 6 LXI D,-80H DAD D PUSH H LXI D,80H LXI B,0 PUSH B PUSH D GLOOP: POP D LXI H,80H DAD D POP B POP D PUSH D MOV A,E SUB L MOV A,D SBB H JNC SIZEOK LXI H,PTSMSG JMP ERRXIT SIZEOK: INX B PUSH B PUSH H XCHG MVI C,STDMA CALL BDOS LHLD CURRFCB XCHG MVI C,READ CALL BDOS ORA A JZ GLOOP POP B POP B POP H MOV A,B ORA C JZ ABORT LXI D,80H MVI C,STDMA CALL BDOS LXI H,CFLMSG CALL PRINTL RET ABORT: LXI H,CNFMSG ERRXIT: CALL PRINTL MVI A,0CDH STA 000H JMP 000H ENDIF OPENFIL:IF CPM3 PUSH D LXI D,0080H MVI C,STDMA CALL BDOS POP D PUSH D MVI C,SEARCH CALL BDOS INR A POP D RZ PUSH D DCR A ADD A ADD A ADD A ADD A ADD A MOV E,A MVI D,0 LXI H,0080H DAD D POP D PUSH D INX H INX D MVI B,11 CALL MOVE POP D ENDIF MVI C,OPEN CALL BDOS INR A RET MBOOT: LDA OPTION CPI 0FFH JZ VWARMBT LXI SP,STACK IF EXRET LDA FCB+1 CPI 'r' JZ PREOFF ENDIF IF MSGFIL LDA 0 CPI 0C2H JNZ MBOOT1 LXI H,MSGMSG CALL PRINTL CALL LODCOM MVI A,0C3H STA 000H CALL 0100H LXI SP,STACK MBOOT1: ENDIF IF CPM3 MVI B,0B3H CALL GETSCB ANI 080H JNZ VWARMBT ENDIF IF (COMFILE OR EXFILE) AND (NOT PBBS) LDA OPTION CPI 'E' JNZ MBOOT2 MVI A,' ' STA FCB+1 STA OPTION CALL UNPATCH ENDIF IF EXFILE AND (NOT MBBS) AND (NOT PBBS) JMP LOGOFF ENDIF IF COMFILE AND (NOT PBBS) JMP START0 ENDIF MBOOT2: LDA 0 CPI 0C3H IF MBBS JNZ NORPTC ENDIF IF NOT MBBS JNZ LOGOFF ENDIF IF NOT CPM3 CALL BDCHEK ENDIF IF (NO25TH OR MBBS) AND READLC LDA LCDATA CPI ' ' JNZ NO25EX XRA A STA FCBRNO LXI H,LCNAME LXI D,FCB MVI B,13 CALL MOVE MVI C,0DH CALL BDOS MVI C,SELDSK MVI E,LCDRV-'A' CALL BDOS MVI C,SETUSR MVI E,LCUSR CALL BDOS LXI D,FCB CALL OPENFIL LXI H,LCMSG1 CZ PRINTL JZ NO25EX LXI D,FCB MVI C,READ CALL BDOS LXI H,LCMSG1 ORA A CNZ PRINTL LXI H,80H LXI D,LCDATA MVI B,NO25BF CALL MOVE MVI B,NO25BF LXI H,LCDATA NO25RD: MOV A,M CPI 'Z'-'@' JZ NO25ZD CPI ',' CZ NO25SP CPI ';' CZ NO25SP CPI CR CZ NO25SP CPI LF CZ NO25SP  DCR B JZ NO25ZD INX H JMP NO25RD NO25ZD: XRA A MOV M,A STA 04H ENDIF IF NO25TH OR MBBS NO25EX: CALL WHOSIT ENDIF IF PRNTWB LXI H,WBMSG CALL PRINTB ENDIF IF TIMEON AND CLOCK AND PRNTOS CALL RMTOS ENDIF JMP VWARMBT IF (NO25TH OR MBBS) AND READLC NO25SP: MVI A,' ' MOV M,A RET ENDIF MINPUT: IF NOT CPM3 CALL BDCHEK ENDIF XRA A STA MSFLAG MINP2: CALL MSTAT ORA A JZ MINP2 CALL CONSTAT ORA A JNZ CONIN MINP3: CALL MDINP ANI 7FH CPI FILT4 JZ MINP2 CPI FILT1 JZ MINP2 CPI FILT2 JZ MINP2 CPI FILT3 JZ MINP2 IF ZCPR2 OR ZCPR3 MOV B,A LDA WHEEL ORA A MOV A,B JNZ MINP4 ENDIF CPI 'P'-'@' JZ MINP2 MINP4: IF HARDLOG PUSH B MOV B,A LDA HARDON ORA A MOV A,B POP B JZ NOLOG CPI 20H JNC MINP5 CPI CR JNZ NOLOG MINP5: CALL LISTOUT CPI CR JNZ NOLOG MVI A,LF CALL LISTOUT MVI A,CR ENDIF NOLOG: IF DISKLOG MOV C,A LDA DSKLOG ORA A JZ NOHARD LDA BDOSFL ORA A JNZ NOHARD CALL STKNEW PUSH H PUSH B LDA TIMSFL ORA A CNZ WRTTIM POP B POP H MOV A,C CALL WRBYTE CPI CR MVI A,LF CZ WRBYTE MVI A,0 JNZ HRDL1 DCR A HRDL1: STA TIMSFL NOHARD: MOV A,C ENDIF CPI 'C'-'@' RNZ LDA 0 CPI 0C3H MVI A,3 RZ MVI A,CTRLC RET MOUTPUT:IF NOT CPM3 CALL BDCHEK ENDIF XRA A STA MSFLAG IF COMFILE AND TIMEON AND CLOCK LDA OPTION CPI 'E' JNZ MONOTE MOV A,C CPI LF CZ TCHECK MONOTE: ENDIF LDA MDMOFF ORA A PUSH PSW CNZ CONOUT POP PSW RNZ MOUTA: CALL CHECK CALL MDOUTST JZ MOUTA MOV A,C ANI 7FH RZ CPI 60H JC MOUTP2 CPI 7FH JZ MOUTP2 PUSH H LXI H,ULCSW SUB M POP H MOV C,A MOUTP2: CPI LF JNZ MOUTP3 IF TIMEON CALL TCHECK ENDIF LDA LFEEDS ORA A MVI A,0 JNZ MOUTP3 MVI A,LF MOUTP3: CALL MDOUTP PUSH PSW CPI 'G'-'@' JNZ NOTBEL LDA BELLON ORA A JZ ISBELL NOTBEL: CALL CONOUT ISBELL: POP PSW CPI LF RNZ LDA NULLS ORA A RZ PUSH B MOV B,A NULLP: CALL MDOUTST JZ NULLP XRA A CALL MDOUTP DCR B JNZ NULLP POP B RET MOVE: MOV A,M STAX D INX D INX H DCR B JNZ MOVE RET MSTAT: IF NOT CPM3 CALL BDCHEK ENDIF CALL CONSTAT ORA A JNZ MSTAT0 LDA MDMOFF ORA A MVI A,0 RNZ CALL CHECK CALL MDINST ORA A JZ MSTAT1 MSTAT0: PUSH PSW XRA A STA MSFLAG POP PSW RET MSTAT1: LDA MSFLAG ORA A MVI A,0FFH STA MSFLAG JNZ MSTAT3 LDA TOVAL MSTAT2: STA TOCNTM PUSH H LXI H,42000 SHLD TOCNT POP H MSTAT3: CALL KDELAY PUSH H LHLD TOCNT DCX H SHLD TOCNT MOV A,H ORA L POP H JZ MSTAT4 XRA A RET MSTAT4: MVI A,'G'-'@' CALL MDOUTP LDA TOCNTM DCR A JNZ MSTAT2 TMOUT: LXI H,ITOMSG LXI SP,STACK CALL PRINTB CALL PATCH IF DISKLOG XRA A STA BDOSFL LXI H,TMOMSG CALL WRTMSG ENDIF IF MBBS JMP NORPTC ENDIF IF NOT MBBS JMP LOGOFF ENDIF NEWJTBL:JMP MCBOOT JMP MBOOT JMP MSTAT JMP MINPUT JMP MOUTPUT IF (NOT HARDLOG) AND (NOT PRINTER) RET NOP NOP RET NOP NOP RET NOP NOP ENDIF IF MOTOR DSKON: PUSH PSW MVI A,DISKON OUT DISK PUSH H LXI H,0000 DSKLP: XTHL XTHL DCX H MOV A,H ORA L JNZ DSKLP POP H POP PSW RET DSKOFF: PUSH PSW MVI A,DISKOFF OUT DISK POP PSW RET ENDIF NWBCALL:IF LOSER CALL WMSTRT CALL PATCH ENDIF IF NOT CPM3 CALL BDCHEK ENDIF RET PATCH: LDA PTFLAG ORA A JNZ SKPTH CALL TBLADDR LXI D,VCOLDBT MVI B,24 CALL MOVE LHLD VCONOUT+1 SHLD COVECT SKPTH: CALL TBLADDR XCHG LXI H,NEWJTBL CALL MOVE MVI A,0FFH STA PTFLAG IF LOSER LXI H,NWBCALL SHLD WBCALL+1 ENDIF RET PRNLOG: LXI H,VMSG CALL PRINTL CALL CALSUM RET CALSUM: LDA CWCAR LXI H,ATMSN CALL DEC8 LXI H,ATMSG CALL PRINTL IF B5IM LDA VCNUM LXI H,VCMSN CALL DEC8 LXI H,VCMSG CALL PRINTL ENDIF IF PWRQD LDA NWPWD LXI H,NWMSD CALL DEC8 LXI H,NWMSG CALL PRINTL ENDIF LXI H,LFMSG CALL PRINTL RET IF WELFILE RDBYTE: MOV A,H ORA A JZ NORD LXI D,FCB MVI C,READ CALL BDOS ORA A MVI A,1AH  RNZ LXI H,80H NORD: MOV A,M INX H RET ENDIF TBLADDR:LHLD 1 DCX H DCX H DCX H IF HARDLOG OR PRINTER MVI B,15 ENDIF IF (NOT HARDLOG) AND (NOT PRINTER) MVI B,24 ENDIF RET IF NOT B5IM TSTBAUD:CALL MDCARCK JZ PREOFF LDA CDOFF INR A STA CDOFF CPI 60 JZ PREOFF MVI D,20 TSTB1: MVI B,1 PUSH D CALL DELAY CALL MDINST ORA A JZ TSTB2 CALL MDINP ANI 7FH POP D JMP TSTB3 TSTB2: POP D DCR D MOV A,D ORA A JNZ TSTB1 MVI A,0FFH TSTB3: CPI CR RZ CPI LF RZ CPI 'C'-40H RET ENDIF UNPATCH:CALL TBLADDR XCHG LXI H,VCOLDBT CALL MOVE IF LOSER LXI H,WMSTRT SHLD WBCALL+1 ENDIF RET USRCHK: CALL PRNLOG LXI H,RS1MSG CALL PRINTL PRNREL: CALL CONSTAT ORA A JZ PRNREL CALL VCONIN CPI 60H JC $+5 SBI 20H CPI 'E' JZ USRUN CPI 'J' JZ JMPCPM CPI 'R' JZ PRNRES LXI H,CRMSG CALL PRINTL JNZ EXCPM PRNRES: LXI H,RS2MSG CALL PRINTL IF CLRSCR CALL CLEARIT ENDIF RET USRUN: MVI A,'E' STA OPTION JMP ERUN JMPCPM: IF B5IM CALL IMQUIT ENDIF IF NOT B5IM CALL MDQUIT ENDIF CALL PATCH MVI A,0C3H STA 000H MVI A,0FFH STA MDMOFF STA OPTION STA WRTLOC IF ZCPR2 OR ZCPR3 STA WHEEL ENDIF JMP 000H WELCOME:IF CLOCK CALL TIME LDA CCHOUR STA LHOUR LDA CCMIN STA LMIN ENDIF IF DISKLOG CALL OPENLOG LXI H,RTCBUF+5 LXI D,CDAY CALL DATEMSG CALL PUTSL CALL DATEMSG CALL PUTSL LXI H,RTCBUF+4 CALL DATEMSG LDA MSPEED ADI '0' STA CONMS1 LXI H,CONMSG CALL WRTMSG ENDIF IF TIMEON OR CLOCK MVI A,MAXMIN STA MXTIME XRA A STA TCHKFG ENDIF IF COMFILE LDA OPTION CPI 'E' MVI A,0 STA NULLS JZ WELC1 ENDIF LDA MSPEED ADI 3 STA NULLS LXI H,TERMSG CALL PRINTB CALL MDINP CALL MDINP IF NOT SKTERM CALL MINPUT ENDIF WELC1: LXI H,CRMSG CALL PRINTB IF RSPEED LDA OPTION CPI 'E' JZ SPDOK XRA A LDA MSPEED SUI SPEED JNC SPDOK CALL TIME MVI A,HOUR1 SPD01: LXI H,CCHOUR CMP M JZ SPDOFF INR A CPI HOUR2 JZ SPDOK CPI 24 JNZ SPD01 XRA A JMP SPD01 SPDOFF: LXI H,OFFMSG CALL PRINTB JMP PREOFF ENDIF SPDOK: IF WELFILE LXI H,WELFILN LXI D,FCB MVI B,13 CALL MOVE LXI D,80H MVI C,STDMA CALL BDOS MVI C,SETUSR MVI E,WELUSR CALL BDOS MVI C,SELDSK MVI E,WELDRV-'A' CALL BDOS LXI D,FCB CALL OPENFIL JZ PASSINT XRA A STA FCBRNO LXI H,100H WELTYPE:CALL RDBYTE CPI 'Z'-'@' JZ PASSINT MOV C,A CALL MOUTPUT CALL MSTAT ORA A JZ WELTYPE CALL MINPUT CPI 'C'-'@' JZ PASSINT CPI 'K'-'@' JZ PASSINT CPI 'K' JZ PASSINT CPI 'k' JZ PASSINT CPI 'S'-'@' JNZ WELTYPE WAIT: CALL MSTAT ORA A JZ WAIT CALL MINPUT CPI 'C'-'@' JZ PASSINT CPI 'K'-'@' JZ PASSINT CPI 'K' JZ PASSINT CPI 'k' JNZ WELTYPE ENDIF PASSINT:IF PWRQD MVI D,3 PASSINP:LXI H,PWMSG CALL PRINTB LXI H,PASSWD MVI E,0 PWMLP: CALL MINPUT CPI 60H JC NOTLC ANI 5FH NOTLC: PUSH PSW CPI 20H JNC PWDIS MVI C,'^' CALL CONOUT POP PSW PUSH PSW ADI 40H PWDIS: MOV C,A CALL CONOUT POP PSW CPI 'U'-40H JZ PASSINP CMP M JZ PWMAT MVI E,1 CPI CR JNZ PWMLP PWNMAT: LXI H,WRGMSG CALL PRINTB DCR D JNZ PASSINP JMP PREOFF PWMAT: INX H CPI CR JNZ PWMLP MOV A,E ORA A JNZ PWNMAT LXI H,NWPWD INR M ENDIF IF COMFILE MVI C,SETUSR MVI E,COMUSR CALL BDOS MVI C,SELDSK MVI E,COMDRV-'A' CALL BDOS MVI A,' ' STA FCB+1 ENDIF IF ZCPR3 AND COMFILE CALL DOZ3 ENDIF IF COMFILE CALL PATCH CALL 100H ENDIF JMP 0000H PREOFF: LXI SP,STACK CALL IMDONE CALL UNPATCH XRA A STA OPTION IF DISKLOG LXI H,DSCMSG CALL WRTMSG ENDIF JMP HANGUP IF TIMEON OR CLOCK TCHECK: LDA TCHKFG INR A RZ PUSH B PUSH D PUSH H ENDIF IF TIMEON AND (NOT CLOCK) LDA TON JMP TCNCLK ENDIF IF TIMEON AND CLOCK CALL TIME LDA LHOUR CALL TCX60 LDA LMIN LXI D,0 MOV E,A DAD D PUSH H LDA CCHOUR LXI H,LHOUR SUB M JNC TCOK LDA CCHOUR ADI 24 STA CCHOUR TCOK: LDA CCHOUR CALL TCX60 LDA CCMIN LXI D,0 MOV E,A DAD D POP D CALL TCDIF MOV A,L STA TON ENDIF IF TIMEON TCNCLK: LXI H,TONMSD CALL DEC8 LDA TON MOV B,A LDA MXTIME SUB B LXI H,TLNMSD CALL DEC8 POP H POP D POP B ENDIF IF TIMEON AND (ZCPR2 OR ZCPR3) LDA WHEEL ORA A RNZ ENDIF IF TIMEON LDA MXTIME ORA A RZ PUSH B MOV B,A LDA TON SUB B POP B RC LXI SP,STACK MVI A,255 STA TCHKFG XRA A LXI H,TLNMSD CALL DEC8 LXI H,TIMEUP CALL PRINTB CALL PATCH ENDIF IF DISKLOG AND TIMEON XRA A STA BDOSFL LXI H,TLMMSG CALL WRTMSG ENDIF IF MBBS AND TIMEON XRA A STA MXTIME JMP NORPTC ENDIF IF TIMEON AND (NOT MBBS) JMP LOGOFF ENDIF IF CLOCK TCX60: LXI H,0 ORA A RZ LXI D,60 TCX61: DAD D DCR A JNZ TCX61 RET TCDIF: MOV A,L SUB E MOV L,A MOV A,H SBB D MOV H,A RET ENDIF IF BCD2BIN BCDBIN: PUSH D MOV E,A ANI 15 MOV D,A MOV A,E ANI 240 RRC MOV E,A RRC RRC ADD E ADD D POP D RET ENDIF IF BIN2BCD BINBCD: PUSH D MVI E,255 BLP: INR E SUI 10 JNC BLP ADI 10 MOV D,A MOV A,E RLC RLC RLC RLC ADD D POP D RET ENDIF DEC8: PUSH PSW PUSH H MVI A,' ' MOV M,A INX H MOV M,A INX H MOV M,A POP H POP PSW PUSH B PUSH D MVI E,0 MVI D,100 DEC81: MVI C,'0'-1 DEC82: INR C SUB D JNC DEC82 ADD D MOV B,A MOV A,C CPI '1' JNC DEC84 MOV A,E ORA A MOV A,C JZ DEC85 DEC84: MOV M,A INX H MVI E,0FFH DEC85: MOV A,D SUI 90 MOV D,A MOV A,B JNC DEC81 ADI '0' MOV M,A POP D POP B RET IF CHGPATH REMPAT: LXI H,REMPATH LXI D,EXTPATH MVI B,LREMP CALL MOVE RET SYSPAT: LXI H,SYSPATH LXI D,EXTPATH MVI B,LSYSP CALL MOVE RET ENDIF IF CPM3 SETSCB: LHLD SCBBASE MOV L,B MOV M,A RET GETSCB: LHLD SCBBASE MOV L,B MOV A,M RET SETUSER:MVI B,0B0H CALL SETSCB MVI B,0E0H JMP SETSCB SETDRIVE: MVI B,0AFH CALL SETSCB MVI B,0DAH JMP SETSCB ENDIF IF NOT CPM3 ENDOBJ EQU $ ENDIF IF B5IM AND DOATZ B5ATZ: DB 'ATZ',CR,0 ENDIF IF B5IM AND NODTR B5ESC: DB '+++',0 B5ATH: DB 'ATH',CR,0 ENDIF IF B5IM AND OFFHK B5ATH1: DB 'ATH1' ENDIF IF B5IM AND OFFHK AND (NOT ANCHOR) DB 'M0' ENDIF IF B5IM AND OFFHK DB CR,0 ENDIF IF B5IM B5ATA: DB 'ATA',CR,0 ADDSTR: DW 0 VCMSG: DB CR,LF,'Voice calls: ' VCMSN: DB ' ',0 VCNUM: DB 0 ENDIF IF B5IM AND PRGRSS RCSHOW: DB '_',0 NOEMSG: DB CR,LF,'Echo error',CR,LF,0 CMDERR: DB 'Modem error',CR,LF,0 ENDIF IF B5IM B5INIT: DB 'AT' ENDIF IF B5IM AND ECHO DB 'E1' ENDIF IF B5IM AND (NOT ECHO) DB 'E0' ENDIF IF B5IM DB 'Q0' DB 'V0' ENDIF IF B5IM AND (NOT NOATA) DB 'S0=0' ENDIF IF B5IM AND NOATA DB 'S0=1' ENDIF IF B5IM AND SHORTB DB CR,0 B5INT1: DB 'AT' ENDIF IF B5IM AND (NOT ANCHOR) DB 'M0' DB 'S10=25' ENDIF IF B5IM AND (NOT HS300) AND (NOT ANCHOR) DB 'X1' ENDIF IF B5IM DB 'H0' DB CR,0 ENDIF IF B5IM AND (NOT OFFHK) B5USR: DB 'ATS0=0',CR,0 ENDIF IF PRGRSS AND (NOT B5IM) MSG30: DB '300 baud test',CR,LF,0 MSG12: DB '1200 baud test',CR,LF,0 MSG24: DB '2400 baud test',CR,LF,0 ENDIF VMSG: DB CR,LF,'BYE',MAIN+'0' DB VERS/10+'0',VERS MOD 10+'0',' - ' DB MONTH/10+'0',MONTH MOD 10+'0','/' DB DAY/10+'0',DAY MOD 10+'0','/' DB YEAR/10+'0',YEAR MOD 10+'0',CR,LF,LF,0 CLRSEQ: DB CLRCH1,CLRCH2,CLRCH3,CLRCH4,CLRCH5,CLRCH6,0 IF RVIDEO RVIDON: DB RVON1,RVON2,RVON3,RVON4,0 RVIDOFF:DB RVOFF1,RVOFF2,RVOFF3,RVOFF4,0 ENDIF BELMSG: DB 7,7,0 CDOFF: DB 0 OPTION: DB 0 IF RSPEED OFFMSG: DB CR,LF,'Sorry! 1200 or 2400 baud only allowed 7PM-11PM' DB CR,LF,CR,LF,' Call back before/after 7-11PM Pacific' DB CR,LF,0 ENDIF IF TIMEON TIMEUP: DB 7,7,CR,LF,CR,LF DB ' Your time is up - wait 24 hours to call back',CR,LF,0 TONMSG: DB CR,LF,'Minutes on system: ' TONMSD: DB '0 ',CR,LF,0 TLNMSG: DB CR,LF,'Minutes left: ' TLNMSD: DB '0 ',CR,LF,0 ENDIF RTCBUF: DB 99H,99H,99H DB 19H,85H,02H,18H TON: DB 0,0 CCHOUR: DB 0 CCMIN: DB 0 LHOUR: DB 0 LMIN: DB 0 TCHKFG: DB 0 CRMSG: DB CR,LF,CR,LF,0 TERMSG: DB CR,LF,'BYE5', VERS/10+'0',VERS MOD 10+'0',' (c)' IF NOT SKTERM DB ' - any key to continue: ' ENDIF DB 0 FKFLAG: DB 0 PTFLAG: DB 0 IF PRNTGB GBMSG: DB CR,LF,' Goodbye, call again...',CR,LF,' ' DB CR,LF,0 ENDIF RS1MSG: IF COMFILE DB CR,LF,'xecute .COM file,' ENDIF DB CR,LF,'esume BYE,' DB CR,LF,'ump to CP/M with BYE5 attached,' DB CR,LF,' for normal unpatched CP/M: ',0 RS2MSG: DB ' Resuming...',CR,LF,0 ATMSG: DB CR,LF,'Modem calls: ' ATMSN: DB ' ',0 CWCAR: DB 0 IF PWRQD PASSWD: DB 'DDT' DB CR DB 0,0,0,0,0,0,0 PWMSG: DB CR,LF,'Enter Password: ',0 WRGMSG: DB 'Incorrect password',CR,LF,0 NWMSG: DB CR,LF,'Passwords: ' NWMSD: DB ' ',0 NWPWD: DB 0 ENDIF IF CHEKDU IDMSG: DB '> [Invalid drive]',0 IUMSG: DB '> [Invalid user#]',0 ENDIF CLMSG: DB CR,LF,LF,'[Carrier lost]',CR,LF,0 ITOMSG: DB CR,LF,LF,'[Input timed out]',7,CR,LF,0 LCDMSG: DB CR,LF,LF,'[Last call]',CR,LF,0 ULTMSG: DB CR,LF,'[Unlimited Time]',CR,LF,0 SCRMON: DB CR,LF,'[Remote on]',CR,LF,0 SCRMOFF:DB CR,LF,'[Remote off]',CR,LF,0 BELMON: DB CR,LF,'[Bell on]',CR,LF,LF,0 BELMOFF:DB CR,LF,'[Bell off]',CR,LF,LF,0 MFSMSG: DB CR,LF,'Message from Sysop: ',CR,LF,0 SGDMSG: DB CR,LF,'Going down in ',DOWNMIN+'0' DB ' min.',CR,LF,0 LFMSG: DB CR,LF,0 LCDFLG: DB 0 IF PRNTWB WBMSG: DB CR,LF,'Booting CP/M...',CR,LF DB 0 ENDIF IF CPM3 SCBPB: DB 03AH,0 ENDIF IF COMFILE OR EXFILE PTSMSG: DB '++ TPA too small ++',0 CNFMSG: DB '.COM ++ Not found-abort ++',CR,LF,0 ENTMSG: DB 'Entry ',0 CFLMSG: DB '.COM loaded',CR,LF,LF,0 ENDIF IF EXFILE EXTMSG: DB 'Exit ',0 ENDIF IF MSGFIL MSGFCB: DB 0,'MFMSG COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 MSGMSG: DB 'MSGNAME ',0 ENDIF IF WELFILE WELFILN:DB 0,'WELCOME ???' DB 0 ENDIF CM2FCB: IF MBBS DB 0,'MBBS COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF COMFILE AND RBBS COMFCB: DB 0,'RBBS COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF COMFILE AND OXGATE COMFCB: DB 0,'OXENTR COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF COMFILE AND METAL COMFCB: DB 0,'MENTR COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF COMFILE AND MBBS COMFCB: DB 0,'LOGIN COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF COMFILE AND PBBS COMFCB: DB 0,'PBBS COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF COMFILE AND QBBS COMFCB: DB 0,'QENTER COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF EXITFCB:IF EXFILE AND QBBS DB 0,'QEXIT COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF EXFILE AND OXGATE DB 0,'OXEXIT COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF EXFILE AND METAL DB 0,'MEXIT COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF IF EXFILE AND PBBS DB 0,'PBYE COM' DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 DB 0,0,0,0,0,0,0 ENDIF LCNAME: IF NO25TH OR MBBS DB 0,'LASTCALR???' DB 0 ENDIF LCDATA: IF NO25TH OR MBBS DB ' ',0 DS NO25BF-2 LCFILL: DB ' L/C data N/A',0 LCHEAD: DB CR,0 ENDIF IF (NO25TH OR MBBS) AND READLC LCMSG1: DB 'No L/C file',CR,LF,0 ENDIF IF MBBS MBBS1: DB CR,LF,'Loading for COMMENT before exiting...',CR,LF,LF,0 MBBS2: DB CR,LF,'[ Updating ]',CR,LF,0 ENDIF IF DISKLOG DSKLOG: DB 0 OPNMSG: DB CR,LF,'[Log on]',CR,LF,0 CLSMSG: DB CR,LF,'[Log off]',CR,LF,0 DSCMSG: DB '**DISCONNECT**',0 CONMSG: DB '**CONNECT ' CONMS1: DB ' on ' CDAY: DS 8 DB '**',0 ENDIF IF DISKLOG AND TIMEON TLMMSG: DB '**TIME LIMIT**',0 ENDIF IF DISKLOG CARMSG: DB '**CARRIER LOST**',0 TMOMSG: DB '**INPUT TIMEOUT**',0 DRPMSG: DB '**DROPPED**',0 VOCMSG: DB '**VOICE CALL**',0 LOGFCB: DB LOGDRV-40H,'SYS LOG' DS 24 WOFFSET:DB 0 OLDDMA: DW 80H BDOSFL: DB 0 TIMSFL: DB 0 LOGTOG: DB 0 OLDLUS: DS 4 RECORD: DS 128 HLSAVE: DS 2 DS 40 NEWSTK: DS 0 ENDIF IF CHGPATH SYSPATH:DB 1,0 DB 1,15  DB 0 LSYSP EQU $-SYSPATH REMPATH:DB 1,0 DB 0 LREMP EQU $-REMPATH ENDIF IF NOT CPM3 PEND EQU $ ENDIF IF COMFILE OR EXFILE CURRFCB:DS 2 ENDIF TOCNTM: DS 1 TOCNT: DS 2 MSFLAG: DS 1 VCOLDBT:DS 3 VWARMBT:DS 3 VCONSTAT: DS 3 VCONIN: DS 3 VCONOUT:DS 3 VLISTOUT: DS 3 VPUNCH: DS 3 VREADER:DS 3 IF CPM3 SCBBASE:DW 0 MEMBASE:DB 0 BDOSBASE: DB 0 ENDIF CR EQU 0DH LF EQU 0AH LXID EQU 11H LXIH EQU 21H IOBYTE EQU 0003H FCB EQU 005CH FCBRNO EQU FCB+32 IF CPM3 SCBDAT EQU 00F4H SCBTIM EQU 00F6H SCBCOM EQU 00FAH SCBBDOS EQU 0099H ENDIF IF CPM3 BDOS EQU NEXT ENDIF IF NOT CPM3 BDOS EQU 0005H ENDIF CI EQU 1 WRCON EQU 2 DRECTIO EQU 6 PRINTF EQU 9 CSTS EQU 11 SELDSK EQU 14 OPEN EQU 15 SEARCH EQU 17 READ EQU 20 STDMA EQU 26 SETUSR EQU 32 CHAINP EQU 47 GTSCB EQU 49 DEFPAS EQU 106 DS 40 STACK EQU $ IF NOT CPM3 OBJEND EQU $ ENDIF END ; ; B5IM-1.DOC - Adapts all modems using Hayes protocol to BYE5 ; 03/03/86 ; ; B5-IM ; by Wayne Masters ; ; For BYE500 (or higher) and intelligent modems like: ; ; Hayes Smartmodem (300 or 1200 or 2400) ; Racal-Vadic Maxwell 1200V or 2400V ; U.S. Robotics (300 or 1200 or 2400) ; Promodem, Anchor and others ; ; Send comments and updates to: ; Wayne Masters, Potpourri, (408) 378-7474 ; ;*********************************************************************** ; 03/03/86 Updated to reflect BYE504 and later equates ; 07/17/85 New release for BYE5 ; ;*********************************************************************** ; ; ; This file should work with any modem (300 or 1200 or 2400) that uses ; the "Hayes" compatible command and response codes. ; ; The code for this routine is resident in BYE5nn. To invoke it, set ; B5IM EQU YES in the BYE5 equate table and follow these instructions. ; ; Your computer-to-modem interface should be wired so that: ; - Carrier status from the modem is monitored from pin 8 ; - Your computer controls DTR to the modem on pin 20. ; (The USR S-100 does not require a wired interface. ; Install B5USR-n.INS as your Port I/O insert). ; ; Preinstallation instructions: ; ---------------------------- ; Anchor Mark XII ; The Mark XII will not support DTR. BYE5 will use the +++ATH ; sequence to hang up the phone. This sequence is repeated as ; long as a carrier is present. Older Mark XII firmware has a ; problem recognizing the +++ escape sequence if the caller is ; at 300 bps. Use your MDM7 or MEX program in terminal mode and ; issue ATI1 command. Jim Warner from Anchor Automation called ; me and said your checksum should be 129, 158, 221 or 222. If ; not, you need updated firmware. You may also notice that the ; callers with the new 2400 bps modems may not succeed in using ; your system due to the tighter frequency tolerences being used. ; The Anchor 212A frequency control is marginal. ; ; HAYES 1200 switches should be set as follows: ; UP - 1, 2, 4, 6, 7 ; DOWN- 3, 5, 8 ; ; HAYES 2400 No switches so you must use a program like MDM740 and ; set the software options to default as follows: ; AT&F&W c/r (sets non-volatile memory to factory specs) ; AT&C1&D2&W c/r ; (The &W writes this to non-volatile memory so ; when we send ATZ it initializes correctly) ; ; Mercury modems- See the file in this .LBR MERCURY.DOC for a detailed ; explanation of configuring Mercury modems for BYE5. ; ; ProModem 1200 switches should be set as follows: ; ON - 1, 2, 3, 7, 9 ; OFF - 4, 5, 6, 8, 10 ; These switch setting should work with both BYE5 and MDM7. ; You can set ECHO EQU YES with this switch configuration ; since the ProModem will echo correctly for all operations. ; Using ECHO will provide a more reliable initialization. ; ; RACAL-VADIC MAXWELL 1200V AND 2400V ; Works out of the box, no preinstallation required. ; ; USR 300/1200 Password, S-100 and 212A. ; Try assembling BYE5 with NOATA EQU NO. If your modem will ; not answer the phone when ATA is issued the set NOATA EQU YES. ; The only problem with this is if the computer is sick, your ; modem will still answer the phone. You can call USR and get a ; RMA number and have your modem firmware updated. ; ; Password ; Set all 4 switches up (off). ; ; S-100 ; Install B5USR-n.INS ; ; 212A Auto-Dial ; Set switch 2 down (off), 1,3,4 up (on). ; ; USR Courier 2400 Switch settings ; ON 2, 3, 5, 8, 9 ; OFF 1, 4, 6, 7, 10 ; Note: The Courier will work with ECHO like the Hayes and Vadic. Set ; switch 4 off and ECHO EQU YES. Gives more reliable operation. ; ; This routine: ; ------------ ; 1) Initializes the modem (and does echo verification, if ECHO is YES) ; 2) Detects phone ring ; 3) Answers the phone ; 4) Detects the speed of the remote caller ; 5) Sets the local computer port to that speed ; 6) Greets the user without him pounding on the RET key ; 7) Prevents modem from answering phone if local computer is sick ; 8) Deinitializes the modem when exiting BYE5 via CTL-C ; ; This file contains: ; ------------------ ; IMRING Main driver and dispatcher ; IMINIT Modem initialization routine ; IMQUIT Modem deinitialization routine ; IMHANG Uses +++ATH to hangup the phone (if NODTR is YES) ; ; Installation instructions: ; ------------------------- ; 1) Install your Port dependent insert in BYE5. Verify that your ; MDINIT routine does not CALL SETnnnn (delete it). BYE5 ; sets the speed based on HSnnnn equate. Verify that your ; MDINIT drops DTR for appx. 2 seconds, raises DTR then has: ; ; IF IMODEM ; CALL IMINIT ; ENDIF ; IMODEM ; ; RET ; ; ; 2) Set the following equates in BYE5 as indicated: ; ; IMODEM EQU YES ; For all intelligent modems ; B5IM EQU YES ; Invokes this routine ; HSnnnn EQU YES ; Set only one for your max modem speed ; ; 3) Set the following equates (in BYE5): ; ; DOATZ EQU NO ; Try NO first. Will speed up system considerably ; ECHO EQU YES ; for Hayes, ProModem or Racal Vadic Maxwell modems ; ; Also works with the USR Courier. NO for all others. ; ANCHOR EQU YES ; For the Mark-XII, No for others ; NOATA EQU YES ; For older USR modems, No for others ; NODTR EQU YES ; For Anchor Mark-XII or some Ozzie-1's, No otherwise ; OFFHK EQU YES ; YES will issue ATH1 (busy out your phone), NO will ; ; issue ATS0=0 (allows phone to ring but not answer) ; ; when you are using your computer locally. ; SHORTB EQU NO ; Yes if your modem has a short command storage buffer ; ; like the MultiModem. BYE5 will send two short ; ; command strings instead of one long string. Yes ; ; will also take a little longer to initialize modems. ; ; 4) Set the other equates in BYE5 as you normally do. ; (Set PRGRSS EQU YES, and B5IM will display the modem result codes and ; commands on your local terminal). Handy until you have it working. ; ; ; Result codes expected: ; --------------------- ; For any modem - HS300, HS1200 or HS2400 ; ; 0 OK - dumped in the bit bucket by IMRING ; 1 CONNECT - if HS300 or HS1200, calls SET300 - for HS2400 checks ; for 10 or 11 first ; 2 RING - causes IMRING to answer the phone ; 3 NO CARRIER - IMRING resets the modem and waits for next ring. Most ; modems wait 20-25 seconds for a carrier during which ; time you cannot do anything but wait for a result code ; 4 ERROR - modem could not execute previous command(s). B5IM (if ; PRGRSS is YES) informs the sysop of a modem error and trys ; again. You likely have a problem with your modem cable or ; computer insert if you see this message. ; ; For HS1200 or HS2400 modems ; ; 5 CONNECT 1200 - IMRING calls SET1200 ; ; For HS2400 modems ; ; 6 CONNECT 2400 - IMRING calls SET2400 (used by some clones) ; 7 (not applicable) ; 8 (not applicable) ; 9 CONNECT 2400 - IMRING calls SET2400 (used by some clones) ; 10 CONNECT 2400 - IMRING calls SET2400 (standard "Hayes" code) ; ;======================================================================= 0 or 11 first ; 2 RING - causes IMRING to answer the phone ; 3 NO CARRIER - IMRING resets the modem and waits for next ring. Most ; modems wait 20-25 seconds for a carrier during which ; time you cannot do anything but wait for a result code ; 4 ERROR - modem could not execute previous command(s). B5IM (if ; PRGRSS is YES) informs the sysop of a modem error and trys ; again. You likely have a problem with your modem cable or ; computer insert if you see this message. ; ; For HS1200 or HS2400 modems ; ; 5 CONNECT 1200 - IMRING calls SET1200 ; ; For HS2400 modems ; ; 6 CONNECT 2400 - IMRING calls SET2400 (used by some clones) ; 7 (not applicable) ; 8 (not applicable) ; 9 CONNECT 2400 - IMRING calls SET2400 (used by some clones) ; 10 CONNECT 2400 - IMRING calls SET2400 (standard "Hayes" code) ; ;======================= 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 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 st"ring (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. or 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 st BYE5 History thru BYE510 08/01/86 ;======================================================================= ; ; 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 ; ; = = = = = = = = ;--------------------------------------------------------------------------- ; 08/01/86 *Updated files in this .LBR include BYE5.DQC, BYE5.HQS, ; v510 B5-CPM3.AQM, B5-CPM3.DQC, B5-DRIV3.AQM, BYE509.AQM and ; BYE509C.AQM. This is a major update to BYE5. ; ; *Added BDOS call 88 which will cause BYE5 to hangup on the ; caller and return control to the calling program. This ; will be used in application programs, such as your EXIT file, ; to hangup on the caller and busy out the phone while offline ; maintenance is performed. ; *Per Stuart Rose's suggestion, moved the no-activity timer to ; the modem status routine. BBS programs like METAL will now ; work properly with the no-activity timer. At the same time, ; this change now prevents the timer from being used while the ; sysop is running in the local "E" mode. ; *Added reverse video option to allow messages sent to the local ; console (only when carrier is present) to be displayed in ; reverse video. ; *Moved the modem noise filters from inline code to equates that ; can be easily modified or eliminated by the sysop. ; *Added ability for sysop to ump to CP/M from BYE5 with BYE5 ; still patched and operating. This will allow local use of all ; BYE5 code for application software, as well as debug help. ; *TWITKEY now hangs up on the caller before running an exit file. ; *Added support for Larry Davis' new exit file in QBBS. ; *Corrected a ZCPR3 bug reported by David McCord. ; *Moved the "H0" to the end of the ATnnn string so the newer ; Hayes clones will work correctly. ; *Fixed BDOS call 86 to return 77 in the A register if the equate ; DISKLOG is NO. (Allows KMD and other application programs to ; test properly for DISKLOG availability). ; ; - Wayne Masters - ; ; *Added HISTRSX equate and code for CP/M 3 users that install ; the command line history RSX. The code added will clear the ; RSX, preventing a possible security breach. ; - George Peace - ; *Added to improve CP/M 3 operation. With this release CP/M 3 ; inserts no longer require either the cumbersome MDPREP/MDPOSP ; routines or a BIOS call capture routine. CP/M 3 inserts are ; now built the same as those for CP/M 2. ; - Jim Lopushinsky - ; *Shortened the CP/M 3 BDOS call path by calling the NEXT RSX in ; memory rather than the one most recently loaded. ; - Stuart Rose - ; *Added configurable disk file logging of all remote user input ; # into a file called SYS.LOG. All user input (with the exception ; of KMD transfers) will go into this file if DISKLOG is set YES ; and the DSKLOG flag is turned on. Numerous informative messages ; also go into the log file (carrier lost, input timeout, connect ; speed and date, voice calls, etc.). Each line of the log file ; is time stamped. Also included are 2 new extended BDOS function ; calls: 86 to interrogate/set log on/off state, 87 to write a ; string into the log file. The log file is normally off between ; calls, and is turned on after a connection is made (in the ; WELCOME routine), and turned off in the HANGUP routine. The ; sysop can use a function key at any time to flip the open state ; of the log file. - Jim Lopushinsky - ; *Added CP/M 3 modifications: Support for CCP+ is included. All ; initialize code is moved from B5-CPM3 to the HANGUP routine ; within BYE. See the comment in B5-CPM3.ASM for the reason. Also ; added init code for various other System control block values ; (^P mode, backspace mode, RUB/DEL mode, etc.). Added support ; for 3 additional RSX functions. See BYE510.ASM for details. ; - Jim Lopushinsky - ;--------------------------------------------------------------------------- ; v509 *Version 509 was used to beta-test all the features noted above. ; 07/01 to Several versions of these tests were being conducted at the ; 07/31/86 same time. BYE510 puts them all in the final release. ; - Wayne Masters - ;---------------------------------------------------------------------------- ; 06/08/86 *Updated files in this .LBR include BYE5.DQC, BYE5.HQS, B5-TIME, ; v508 BYE5-INS.IQF, BYE508.AQM and BYE508C.AQM ; *Added support for Larry Davis' QBBS system. ; *Added support for Russ Pencin's PBBS v3.0. ; *Automated the nulls routine so the user is not asked for nulls. ; Most all BBS programs now set the users nulls after he logs in, ; so BYE5 just uses default nulls until then. ; *Added the SKTERM equate and code which will make sure the remote ; caller is in terminal mode and is ready for your welcome or ; sign-on message. This is extremely important when a caller has ; his modem program continuously dialing a busy rcpm and, when he ; finally connects, his program beeps him until he types a key to ; enter terminal mode. If you don't mind the caller missing all, ; or part, of your welcome sequence, then set SKTERM YES. ; *Speeded up local execution of the BBS program when using the "E" ; option. ; *Removed the PRGRSS equate from the call summary data so the ; sysop will see the summary everytime a caller logs off. ; ; - Wayne Masters - ;---------------------------------------------------------------------------- ; 04/20/86 *Updated files in this .LBR include B5-CPM3.AQM, BYE5.DQC, and ; v507 BYE5.HQS. Added files -README and BYE507C.AQM, the condensed ; version of the fully commented BYE507.AQM. ; *Moved the CP/M+ drive search path and password initialization ; code from BYE5nn.ASM to B5-CPM3.ASM program. This fixed serious ; problems for CP/M3 sysops who used different search paths for ; local and RCPM access. CPM3 users must also install the new ; B5-CPM3.ASM file. - George Peace - ; *Per Russ Pencin's request, changed the instructions for BYHANG ; to say PBBS users must say YES. This was my fault and caused ; confusion to PBBS users. Also moved the MOTOR code to prevent ; unnecessary stop/start of disk motors when the sysop is running ; in the local "E" mode. ; *Corrected the EXFILE and TIMEON "IF" logic that was allowing ; "Minutes on system" to be reported twice when a caller typed ; BYE. This occurred on METAL/OxGate systems using exit files. ; *The BELLON default was changed to 0FFH from 00H, enabling the ; bell (and chat mode). Use your ^G function key to toggle it ; off, or if you prefer off as a default change the DB at label ; BELLON back to 00H. This confused several sysops who didn't ; realize the bell was disabled when they first loaded BYE. ; *Per Dennis Recla, Russ Pencin, Tim Gary and Gary Inman, BYE5 ; now correctly supports RBBS, PBBS, METAL, MBBS and OxGate. ; - Wayne Masters - ;----------------------------------------------------------------------------- ; 04/14/86 *Updated files in this .LBR include B5-CPM3.AQM, B5-CPM3.DQC, ; v506 BYE5-INS.LQT, B5-TIME.IQF, Z3&RCPM.FQX, BYE5.DQC and BYE5.HQS. ; *Added EXRET equate and code to allow EXIT file routines written ; in MBASIC, C, and Pascal to re-enter BYE5 without saving the ; stack and doing a RET. Very difficult for these programs to do ; this. Just have your EXIT file poke FCB+1 with 'r' (small r) ; and do a warmboot (SYSTEM etc). BYE5 $will trap the warmboot ; and reset the system properly. FCB+1 is 5DH. See .DOC file. ; *Thanks to Gary Inman for disassembling MBBS and finding how ; MBBS was destroying BYE's BELLON flag. That has been fixed in ; this version, allowing the LMBELL initialization to be moved ; to the loader and out of runtime code. No more double toggle. ; BYE5 now restores BELLON after MBBS pokes it. BYE5 now makes ; sure the BELLON flag is correct and that the low memory KILBEL ; is properly set. Be sure to set your choice of initial default ; for Bell on/off at label BELLON (00=Bell on, FF=Bell off). ; *Added code to correct problems with the ProModem and some USR ; Courrier modems that went back on hook after the ATH1 command. ; The problem occurred because DTR was dropped right after that ; command. BYE5 (if B5IM is YES) now leaves DTR high and sends ; either ATS0=0 or ATH1M0, depending on the OFFHK equate. ; *Added copyright notice. ; - Wayne Masters - ; ; *Removed B5-CPM3.ASM cleanup code sequences and merged them ; (properly) into BYEnnn.ASM. See the new B5-CPM3.AQM and new ; B5-CPM3.DQC in this .LBR. ; *Corrected EXFILE logic flow so CP/M 2.2 and Plus systems operate ; the same at carrier loss or disconnect time. ; *Streamlined system setup between calls to prevent unnecessary ; loads and unloads of the BYE5 RSX. ; *Expanded the RSX cleanup between calls to remove all RSX's ; loaded during the previous caller's session rather than only ; the LD generated RSX's. ; *Updated the CP/M Plus drive select logic to use the WBDRIV ; configuration parameter. ; - George Peace - ; ;----------------------------------------------------------------------------- ; 03/03/86 *Appreciation is extended to Irv Hoff, Russ Pencin, Gary Inman, ; v504 Dennis Recla, Les Archambault and the PRACSA sysops for ideas, ; suggestions and the beta-tests that contributed to this update. ; *NOTE... All clock inserts are now contained in a new .LBR. ; Look for B5-CLOCK.LBR to find your clock inserts. ; *So many sysops have asked for the ability to edit BYE5 on a ; small floppy system that a method of reducing the size of BYE5 ; was considered mandatory. You will notice that the squeezed ; BYE5 source is now appx. 44K and the unsqueezed source is appx. ; 66K. This will solve many problems for the smaller disk systems ; and allow faster assembly times for everyone, not to mention the ; time saved uploading and downloading these files. ; *Corrected a bug in the CP/M-2 loader that caused the first six ; bytes of the CCP to be destroyed on some systems. ; *Added PBBS equate and code to support Russ Pencin's new BBS ; software written in assembly language. Promises to be a new ; and welcome addition to public domain (free) bbs software. ; *Added the BYHANG equate to allow your EXIT file to be loaded ; and executed with/without BYE5 hanging up on the caller. Some ; EXIT routines want to display data to the caller before BYE5 ; hangs up the phone. PBBS uses this technique. ; *Added LCKEY function key to allow the sysop to reserve his ; system for local use as soon as the current caller finishes. ; The sysop can type ^L (BYE5 displays [Last call] on local crt) ; and leave the room. When the current caller logs off, BYE5 will ; exit back to cp/m (leaving the modem in a non-answer mode) and ; signal the sysop (bell) that his system is free for local use. ; *Expanded the code for ^U (ULTKEY) function key to allow the ; sysop to enable all the flag bits in LCPTR. This key will now ; grant unlimited time and enable all the flag bits for the current ; caller only. ; *Added equates to allow MBBS users to keep MBBS.COM on any d/u ; (normally A0). LOGIN.COM and MFMSG.COM can then be kept in an ; area (normally A14) not available to the caller. ; *Added LMBELL equate to allow any BBS system (formerly for MBBS ; only) to keep a low memory bell flag in addition to the internal ; BYE5 byte. This byte is toggled with the ^G bellkey. RBBS now ; uses this feature. ; *BYE5 now displays "Minutes left: nn" unless the Wheel byte is on ; or MXTIME = 0. In either of those two cases BYE5 displays ; "Minutes on system: nn". ; *Added code to allow the newer Hayes-cloned 2400 type modems to ; work at 2400 bps. Some send a 6 and some a 9 for "Connect 2400" ; rather than the "Hayes compatiable" 10. ; *Corrected error in saving previous callers Timeon when sysop is ; running in the local "E" mode. ; *The ^B (blank remote modem) now sets/resets the LCPTR flags to ; enable all functions when the remote is blanked, and restore ; them to original values when the remote modem %is turned back on. ; *BYE5 now sends a bell to the remote modem (not heard locally) ; every 1 minute of no-activity. This alerts the caller that BYE5 ; is waiting for him. The caller is still logged off if TOVALUE ; expires while BYE5 is waiting. ; ; - Wayne Masters - ; ;---------------------------------------------------------------------------- ; 02/14/86 *This is a major update to BYE5. Many thanks to the sysops' ; v503 organizations around the world for contributing suggestions and ; code for this update, and in particular to PRACSA, Tom Brady, ; Jack Brown, Kevin Murphy, George Peace, Don Appleby, and ; Irv Hoff (our "buffer" with the Compu-Serv sysops). ; Updated files in this .LBR include BYE5.DOC, B5IM-1.DOC, all ; the CP/M+ support files, BYE5-INS.INF and many new clock inserts. ; *Previous versions of BYE only ran an exit file (If EXFILE YES) ; when the carrier was lost. That has all changed in v503. Many ; sysops asked for the ability to run an exit file any time BYE ; hangs up on a caller. MBBS users and CP/M-3 users already did ; that in v501 and up. Now anyone can. There are, depending on ; your equate selections, 9 conditions that will cause BYE to ; hangup on a caller. If EXFILE is YES, these 6 conditions will ; now cause your exit file to be executed: ; 1) Caller types BYE, 2) Carrier loss, 3) Twit key, 4) Location ; 000H <> C3 on warmboot, 5) No activity timeout, 6) Time-on- ; system exceeded. Since a caller can't possibly be logged in for ; the following 3 conditions, BYE will hang up without running ; the exit file: 7) RSPEED primetime violation, 8) BYE5 password ; mismatch, and 9) "Nulls needed" question failed. The sysop is ; informed on his local console which .COM file (Entry or exit) is ; loaded. Again, MBBS and/or CP/M-3 users are not affected. The ; rules for your exit file to follow: Save the stack, do a RETURN, ; not a warmboot, to re-enter BYE. ; *The previous callers MXTIME and Time-on-system are now preserved ; in BYE's fixed lookup table for use by an exit file. The equate ; LCTON may be changed to a low memory byte to preserve lastcallers ; time-on-system to a location other than the fixed table. ; *Added BDOS call 84 which allows the installer to write his own ; unique subroutine and install it at label SRUDEF. His transient ; program(s) like ENTRY or EXIT can access that s/r with an 84 ; BDOS call. See the area marked ++++ Install SubRoutine U DEFine ; for more details. ; *Added BDOS call 85 to allow get/set functions for LCPTR. LCPTR ; contains a bit mapped status register when a user is logged in, ; and contains the previous callers Timeon when no user is logged ; in. To use the "get current value": MVI C,85 MVI E,255 ; CALL BDOS. The value of LCPTR is in A on return. ; To use the "Set value" : MVI C,85 MVI E,0 MVI D,0-255 (your SET ; data) CALL BDOS. ; *Most modems, Hayes, USR, Vadic, Anchor....don't need the "ATZ" ; command between calls. In fact, some of these modems revert to ; auto-answer when the "ATZ" command is executed, causing potential ; problems if BYE is trying to reset the modem and the phone rings. ; Set the new equate DOATZ to NO and that problem is fixed, PLUS, ; you will notice the system resets between calls 3 or 4 seconds ; faster. ; *Added OFFHK equate to allow BYE to make your modem/phone "busy" ; while you are using your computer locally. ; *Added MSGFIL equate to allow a new .COM file to be called when ; KMD11 (or later) and later versions of xmodem RM an uploaded ; file. The uploaded file is formatted with "To, From, Subject, ; etc", data and your .COM file should append this file to your ; existing message data file, erase the uploaded "RM" file, and ; RETURN to the BYE program. KMD11 alters location 00H to a C2 ; (instead of normal C3) and does a JMP 0 (warmboot) after the ; RM file has been uploaded. BYE traps the warmboot call and will ; load and CALL your .COM file to append the message(s) to your ; message file. This .COM file must be located on the same D/U ; as your BBS.COM file. Utility programs are available which will ; allow message files to be prepared (formatted) offline and then ; uploaded with the KMD "RM" command. MBBS uses this feature and ; other BBS systems can now take advantage of MSGFIL. ; *Added the ANSKEY function key to allow sysop to force BYE5 to ; answer the phone. This is handy if you are talking voice to ; your friend and decide to bring up BYE to exchange data. You ; can now bring up BYE while on voice, wait for your friend to get ; set, then type ^A, and be back online without having yo&ur friend ; hangup and pay for another phone call. ; *Modified the BLNKKEY code to set the sysops wheel byte and path ; when toggling remote caller off/on with ^B. Maxdriv and Maxuser ; bytes, PATH, and Wheel are set/reset with this function key, ; depending on your zcpr2, zcpr3 and chgpath equates. ; *Added WBDRIV equate to allow selection of a drive to log to on ; the first warmboot to cp/m. 99% will use 'A', but some hard ; disk systems need 'C' or non-A drives. ; *Added TRANWL equate to help those systems running the Trantor ; hard disk drivers. This will save 2K for your TPA. ; *Several other byte-saving features added to save run-time code ; that you will notice when configuring BYE for your system. ; ; - Wayne Masters - ; ;-------------------------------------------------------------------------- ; ; 10/26/85 *Added all the bug and fix reports from sysops using v501. ; v502 CPM3 now has its own OPENFIL routine so no need to alter ; the file extensions using ???. ; *Added code for full MBBS4n support, including KILBEL ; *Added ULTIME function key allowing sysop to grant unlimited ; time-on-system for the current caller, requested by Chuck Metz. ; *Added XITKEY equate to allow choice of ctrl characters to ; exit from the "Message from sysop" loop. Some systems bombed ; with a Ctrl-C when used while their BBS was loaded. ; *Added code to prevent remote user from inputting characters ; while you have the modem output blanked. ; *Added filter to reject incoming nulls, "{" and delete characters. ; You should see quite an improvement in the noisy modem and phone ; system. ; *The time check call is now made after each c/r going out the ; modem instead of after every character. This will help slow ; clocks like the Hayes, and was needed to keep from slowing the ; system when using 4800/9600 baud modems. ; *BYE5 now loads with the the bell (chat) flag OFF. If you want ; the bell on, use the ^G function key to change it, or assemble ; with label BELLON EQU 0FFH (instead of 000H). ; *Added PRNTOS equate to disable printing Time on system on each ; warmboot. CPM 3 users may want this NO. ; *Added RTOK and RTOKFG bbs equates to allow reentry reset for ; some bbs systems (like RBBS). (From Don Appleby) ; ; - Wayne Masters - ; ; ----------------------------------------------------------------------- ; 08/20/85 *Added HS4800 and HS9600 code to support the new generation of ; v501 300/1200/2400/4800/9600 bps modems that will start beta test ; soon on Potpourri. The old BYE3 series has chosen to regress ; and support old and outdated technology. ; *CP/M 3 support added < George Peace >. ; *As promised in BYE500, the extended BDOS calls for BYE5 have ; been debugged and are now in this version--replacing the JMP ; vector table. See the BYE5.DOC file for the new BDOS call ; structure and how to use them in writing a transient program ; to run under BYE. Thanks to Paul Traina for accepting requests ; from many sysops and defining the new extended BDOS structure. ; I reported to Paul all the bugs I found in his initial BYE337 ; release and have the corrected code in BYE501. KMD04 uses the ; new BDOS calls. BYE501 now supports XMDM-116 (and KMD04 will ; run under BYE33x if Paul Traina has fixed the bugs). ; *BYE501 and KMD04 now support TIMEON for the systems without ; a clock. Just set CLOCK to NO and TIMEON to YES in both KMD ; and BYE5 and the users time-on-system will be kept by KMD and ; BYE5. Suggest setting MXTIME to 45 if CLOCK is NO, to 60 if ; CLOCK is YES. This allows sysops to offer the KMD batch mode ; to all users and still maintain time-on restrictions. ; *MOTOR equate and code added < Bill Bolton >. ; *SHORTB equate added for modems that can't handle 30 char cmds ; like the MultiModem by MicroModem. BYE5 will send two short ; command strings instead of one long string. ; *Fixed major bug for some BBS's if carrier dropped in LUX. ; *Fixed bug that prevented EXFILE from working correctly. ; *Added some code-saving equates to cut down on the run-time size ; of BYE5. This should help sysops running large BBS programs. ; ; - Wayne Masters - ;--------------------------------------------------------------------------- ; 07/17/85 *Final features added to support 1K file transfer protocol in ; v500 the new KMD (KMODEM) program. A jump table has been added ; that points to all of BYE5's modem and console I/O routines ; that allows transient programs like KMD to copy for their use. ; NOTE-->> This technique may be altered in future releases by adding BYE's ; own BDOS calls so don't modify your programs to use this table. ; This version of BYE5 is downwa'rd compatiable with XMODEM but ; previous BYE3 versions are not upward compatiable with KMD. ; KMD is downward compatiable with MEX and MDM7 (it still handles ; 128 byte crc/checksum transfers) but to take advantage of the ; new 1K crc-only protocol requires a new originate program ; called IMP (Intelligent Modem Program). YAM will also work with ; KMD and maybe soon a new version of MEX. Since BYE5 now handles ; all the modem and console I/O for KMD there are no overlays or ; inserts required for installing KMD. This version of BYE5 needs ; a new computer insert from the BYE5-INS.LBR, or you can use the ; one you have running in BYE335 by deleting the instruction ; ANI 07H (or ANI 127) in MDINP and MDOUTP. This is required for ; BYE5 to handle 8 bit file transfer data. The current method of ; file transfer (128 bytes per record) is 76% effecient for 2400 ; bps and 85% at 1200. Switching to 1024 bytes per record increases  ; the file transfer efficiency to 96-97%--a significant improve- ; ment. You may want to name KMD as XMODEM.COM on your system ; until users are "educated" to the changes. ; *If CLOCK is YES, you now must have day/month/year and the current ; hour/minute values stored in RTCBUF (in BCD) by your TIME routine. ; This data is used by KMD for your KMD.LOG file. I added BINBCD ; routine for those bios clocks to convert binary values to BCD. ; *LHOUR and LMIN labels were moved inside BYE5 at the end of RTCBUF ; and TON. Transient programs can access LHOUR and LMIN via BYE5's ; pointer to RTCBUF. STATUS was deleted and replaced by MXTIME, ; which is accessable to transient (BBS) programs to poke dynamically ; for users allowed TIMEON (1-254 seconds). If poked to zero it ; allows unlimited TIMEON. These changes eliminated 3 bytes of low ; memory assignments that conflicted with some operating systems. ; *All of BYE5's function keys now work while KMD is running. That ; means you can see who's on, time on or even twit them off while ; the file transfer is underway. ; *Corrected the "carrier lost" exit for MBBS users. CHAT43 now ; supports BYE5's bell toggle, so KILBEL is not required (MBBS). ; *Fixed MINICK disk I/O in progress error (since BYE2 days). ; *Several modest changes suggested by other sysops to make BYE5 more ; "idiot" proof for the installer. ; ; - Wayne Masters - ;---------------------------------------------------------------------------- to RTCBUF. STATUS was deleted and replaced by MXTIME, ; which is accessable to transient (BBS) programs to poke dynamically ; for users allowed TIMEON (1-254 seconds). If poked to zero it ; allows unlimited TIMEON. These changes eliminated 3 bytes of low ; memory assignments that conflicted with some operating systems. ; *All of BYE5's function keys now wo