NUBYE Extended BDOS Calls Documented NUBYE 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 NUBYE is online. It is the programmers responsibility to make sure NUBYE 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 NUBYE EXISTANCE TEST (if 241 is placed in reg E) MVI C,32 ; Sample call MVI E,241 ; Is NUBYE running? CALL BDOS CPI 77 ; If NUBYE is there (A) will = 77 JNZ NOBYE ; NUBYE wasn't there CALL DOIT ; Yes, NUBYE 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 NUBYE 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 NUBYE to hangup E=0 To disable NUBYE 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 NUBYE 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 NUBYE from logging him off), then use this call to collect your data, and finally use 81 to restore his original MXTIME (enables NUBYE 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, NUBYE 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 NUBYE. 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 NUBYE 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 NUBYE. 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 NUBYE at area +++Install SubRoutine U DEFine +++ near the beginning of NUBYE, 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 access flag register (bit mapped) as follows: BIT Meaning Bit status 0 System access? 0 = No, 1 = Yes 1 BBS access? 0 = No, 1 = Yes 2 Read messages? 0 = No, 1 = Yes 3 Write messages? 0 = No, 1 = Yes 4 CP/M access? 0 = No, 1 = Yes 5 Download access? 0 = No, 1 = Yes 6 Upload access? 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 you have RESUSR equated YES, NUKMD will examine bits 5, 6 and 7 of LCPTR and respond accordingly. A good way to prevent abuse of downloads and no uploads by your users. If MSGFIL is YES in NUBYE and NUKMD and RESUSR is YES in NUKMD, then bit 3 is checked by NUKMD to allow/disallow the "RM" option. If PUPOPT and RESUSR are YES in NUKMD, bit 7 is checked to allow "RW" uploads by only those designated as "privileged" (i.e. the Sysop and co-Sysops). A note to give credit where credit is due -- these access flags are currently available to MBBS systems as a result of Kim Levitt's never ending work, but future versions of non-MBBS systems may support them as well. When a user is NOT logged in (and NOT MBBS).... 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 (i.e. your program knows if a user is logged on or not). End of extended BDOS calls.