; ; version - 3.01 ; ; v3.01 - 08/23/84 Added user's file equates and storage for total ; time used on any given day. See EMX.312 for de- ; tails. The DB at label TOT must be set to 1 to ; activate this function plus BYEMX must be active ; on your system. - Simon Ewins ; ; All the necessary switches and equates.... ; ; NOTE:: ALL LABELS MUST BE FOLLOWED BY A DOUBLE COLON (::) SO THAT ; EMXSUBS.REL CAN FIND THEM.... THIS APPLIES TO ALL EMX FILES. ; ;----------------------------------------------------------------------- ; ; In addition, the following EQUates must be public ; ;----------------------------------------------------------------------- ; PUBLIC MCLBUF,SYSLEN ; ;----------------------------------------------------------------------- ; ; Externally defined symbols: ; ;----------------------------------------------------------------------- ; EXT PRINT,PRINTM,PRINTS,PRINTL EXT MATCH,INPUT,CPM,ERROR,ECHOC EXT ECHO,PDATE,PTIME,PB2ASC,CAPS EXT MLDL,MOVE,GETCH,INBUF,DATDIF EXT CTIME,CDATE,CNVRT0,ENDEMX,PVER EXT OPEN,CLOSE,GET,PUT,COPEN,BFCB EXT OPEN2,CLOSE2,GET2,PUT2,RRSZ2 EXT RRNO,RRSZ,FILLHL,SUBHL,RRNO2 ; ;----------------------------------------------------------------------- ; ; Constant equates ; ;----------------------------------------------------------------------- ; BDOS EQU 5 ; BDOS call location BEL EQU 7 ; ASCII bell BS EQU 8 ; Backspace TAB EQU 9 ; Tab character LF EQU 10 ; Linefeed CR EQU 13 ; Carriage return ESC EQU 27 ; Escape character ASCII EQU 30H ; ASCII offset READB EQU 14H ; Read next seguential SETDMA EQU 1AH ; Set DMA pointer LOGDRV EQU 0EH ; Set drive LOGUSR EQU 20H ; Set user area FCB EQU 5CH ; Default FCB DMA EQU 80H ; Default DMA buffer TBUFF EQU DMA ; Type buffer RET EQU 0C9H ; Return opcode EOF EQU 1AH ; CP/M end-of-file character ; ;----------------------------------------------------------------------- ; ; The following addresses and control bytes are tabled at the head of ; the signon file starting at 103h and may be patched as required. ; NOTE: If you don't want to use one of the following then enter: ; ; LABEL EQU JUNK ; as the address required... ; ; The label JUNK MUST be a 'DW 2' byte storage space since EMXSUBS uses ; it as a temporary storage area/ work space.... ; ------------------------------------------------------------------------ ; JUNK:: DW JUNK ; Address for unwanted options below ; MXUSR EQU 0E809H ; Bye's maximum user number address MXDRV EQU 0E80AH ; Bye's maximum drive address TOVAL EQU 0E80BH ; Bye's minutes to time-out on input address NULLS EQU 0E80CH ; Bye's number of nulls to send address WRTLOC EQU 0E80FH ; Bye's flag that disk is writing address HARDON EQU 0E810H ; Bye's flag that hard-copy is wanted MINON EQU 0E845H ; Minutes to log-off (max time allowed) BSPEED EQU 0003CH ; Address of baudrate indicator set by bye LOCK EQU 0E846H ; Address of lock (access) byte REENTR EQU 0E847H ; Signon re-entry flag address USREC EQU 0E848H ; User record # storage address ASCACC EQU 0FFFDH ; Access: in ASCII (access level same as lock) USRMAP EQU 0E84EH ; User area map (2 bytes) DRVMAP EQU 0E850H ; Drive map (2 bytes) MCLBUF EQU 0FF00H ; Address of external command buffer UPLOADS EQU 0E84AH ; Count of uploads DNLOADS EQU 0E84CH ; Count of downloads TCODE EQU 0E852H ; Terminal identifier code LOGSTR EQU 0E81CH ; Ascii logon-time string address NOROUT EQU 0E811H ; No remote out byte in bye WHEEL EQU JUNK ; ZCPR2 or ZCMD2 wheel byte, if used ; ;----------------------------------------------------------------------- ; ; NOTE:: From here on ALL labels must have a double colon (::) after ; them. This tells M80 that the label is 'public' and allows ; L80 to pass the address on to EMXSUBS. If you add anything ; new from here on please use the :: in case I add routines to ; EMXSUBS that use one of your added labels/functions..... any ; EQU statements need not be declared as public. ; ;----------------------------------------------------------------------- ; ; Access table byte order is: Max drive, max user, minutes online, days ; to deletion (0=no autodelete) ; ;----------------------------------------------------------------------- ; ; The days to deletion is also set into messages to a user so that ; messages to a deleted user can't exist longer than (delete days)-1. ; (Messages to all get 0 for deletion days which means that they will ; not be auto-deleted, the system operator will have to delete them ; with EMXMNT.) ; ; NOTE: Drive A: is 1 not 0 in this table. ; ACC2:: DB 4,5,30,5 ACC3:: DB 4,5,45,15 ACC4:: DB 4,5,60,30 ACC5:: DB 4,5,60,0 ACC6:: DB 4,6,60,0 ACC7:: DB 4,7,60,0 ACC8:: DB 4,8,90,0 ACC9:: DB 4,10,240,0 USMP2:: DW 0000000011111111B ; Initial user area map DRMP2:: DW 0000000011111111B ; Initial drive map USMP3:: DW 0000000011111111B ; Level 3 user area map DRMP3:: DW 0000000011111111B ; Level 3 drive map ; ;----------------------------------------------------------------------- ; ; General control bytes used as option switches and variable values any ; new features added should be switched so that others may or may not ; use the feature as they desire. Commonly used: 1=yes, 0=no ; ;----------------------------------------------------------------------- ; VERSION:: DB 1 ; 1=show version numbers, 0=no CREDITS:: DB 1 ; 1=show author's name, 0=no KNOWON:: DB 1 ; 1=ask cp/m knowledge question, 0=no WELON:: DB 0 ; 1=yes welcome to be typed, 0=no SPON:: DB 0 ; 1=yes run special user file on cp/m entry ALTON:: DB 0 ; 1=yes use alt file on mail exit EXTCL:: DB 1 ; 1=yes, using zcpr2 external command line TOT:: DB 1 ; 1=yes, want to activate total time per day ; ;----------------------------------------------------------------------- ; ; Drive/userarea where your files will be... EMX logs to this area as ; soon as it runs.... ; ;----------------------------------------------------------------------- ; SYSUSR:: DB 9 ; System file user area SYSDRV:: DB 0 ; System file drive (a:=0, b:=1, etc.) ; ;----------------------------------------------------------------------- ; ; Values used by EMX for counting and access-protected routines ; ;----------------------------------------------------------------------- ; TRIES:: DB 5 ; Number of tries at entry of name etc. + 1 ALLLV:: DB 4 ; Minimum access for leaving public messages USRS:: DW 150 ; Maximum number of users allowed ; ;----------------------------------------------------------------------- ; ; System filenames (each filename must end with a null) ; ;----------------------------------------------------------------------- ; LASTCAL:: DB 'LASTCALR. ',0 ; Spaces ok if no file type MSGINDEX::DB 'MSGINDEX.EMX',0 MESSAGES::DB 'MESSAGES.EMX',0 WELCOM:: DB 'WELCOME.EMX',0 ; NO imbedded spaces INDEX:: DB 'INDEX.EMX',0 USERS:: DB 'USERS.EMX',0 ; ;----------------------------------------------------------------------- ; ; The following are the names of external .COM files that are chained to ; when a JP to CPM is done by any EMX programs that use EMXSUBS.REL. The ; DE register pair is loaded with the address of one of these names and ; a chain then takes place.... is is very important that each of these ; be structured as the one at ENTRY:: is (10 bytes total each). ; ;----------------------------------------------------------------------- ; ; This is the name of a .COM file to run on entry to CP/M ONLY after ; signon.... (if re-entering for mail then a simple warm boot is done.) ; ENTRY:: DB 7,'ENTRCPM',0,0 ; For CP/M entry ; ^ ^ ^ ^ ; | | | +---------> MUST be padded to 10 bytes ; | | +-----------> terminating zero (must be there) ; | +------------------> file name 8 characters max. ; +-----------------------> number of bytes in file name ; ; ; This is run if the caller is a new user ; NENTRY:: DB 6,'NEWUSR',0,0,0 ; For CP/M entry if new user ; ; ; This file runs if the user is a 'special' user i.e., if INITAR<>0 ; SPENTRY:: DB 3,'DIR',0,0,0,0,0,0 ; For special users ; ; ; Alternate file for exit from mail when entered after signing on ; ALTFILE:: DB 3,'DIR',0,0,0,0,0,0 ; For mail exit ; ; ; This is the name of file to run in the event of error or to disconnect caller ; ERRFILE:: DB 3,'BYE',0,0,0,0,0,0 ; For error exit ; ; ; This is the file that BYEMX chains to and is your 'real' BYE program ; FBYE:: DB 6,'EMXBYE',0,0,0 ; File for BYE to chain to ; ;----------------------------------------------------------------------- ; ; System strings and such.... ; ;----------------------------------------------------------------------- ; SYSOP:: DB 'SIMON EWINS' ; Up to 30 bytes for sysop name ENDSYS EQU $ ; MUST be null padded DS 30-(ENDSYS-SYSOP) ; Pad space with 0 (m80 /m option) ; ALLMSG:: DB 'ALL',0,0,0,0,0,0,0 ; Up to 10 characters total ; This is the 'TO' name that is used ; For public messages NRDQUS:: DB CR,LF DB 'What is the CP/M utility to show free disk space called? ',0 ; This string MUST end with a null NRDANS:: DB 'STAT',0,0,0,0,0,0,0 ; Answer to cp/m knowledge question ; (10 characters + null) PW:: DB '1234567890',0 ; EMXMNT password ; (up to 10 characters + null(s)) LOCSTR:: DB 'EMX Toronto, ',0 ; String used by byemx on log-off ; Must end with a null ; ;----------------------------------------------------------------------- ; ; This is the random file buffer. Change the size only with extreme ; caution since future releases of EMX from the original author will ; definitely use the entire buffer for multi-file handling capabilities. ; ;----------------------------------------------------------------------- ; RNDBUF:: DS 512 ; Random record buffer length ; ;----------------------------------------------------------------------- ; ; The next value defines the maximum size in bytes of a message. Since ; each record is defined as being MSGLEN bytes long then the next value ; should be defined as MSGLEN * records.... hence a 1k maximum message ; size would be set out as MSGLEN * 16..... size MUST be a multiple of ; 64. ; ;----------------------------------------------------------------------- ; MSGBUF EQU MSGLEN * 24 ; 24 records with 64 bytes each = 1.5k ; ; max size ; ;----------------------------------------------------------------------- ; ; The next section defines the fields in the random file buffer for each ; of the records in each of the .EMX files..... Cchanges to this and the ; following sections could result in total incompatability with future ; releases of EMX.... Change with caution. This next section and the ; one following MUST match byte for byte and in sequence EXACTLY... ; ; NOTE: If you are messing around with the disk I/O or writing other ; programs that use the random file I/O in EMXSUBS.REL bear in ; mind that the maximum length for any single record in a file ; is 512 bytes. ; ;----------------------------------------------------------------------- ; ; Length of all records for all files except the messages file which is ; fixed at 64 bytes to allow easy equating to one line in a message. ; ;----------------------------------------------------------------------- ; SYSLEN EQU 100 ; Record length for each file ; ;----------------------------------------------------------------------- ; ACTBLEN EQU 4 ; Number of bytes per user level in access table ; ;----------------------------------------------------------------------- ; ; INDEX file fields ; ;----------------------------------------------------------------------- ; IDATEF EQU RNDBUF ; Current date IMRNMF EQU IDATEF+3 ; Next message record number IMNXTF EQU IMRNMF+2 ; Next message number field IMNDXF EQU IMNXTF+2 ; # entries in message index ICALLF EQU IMNDXF+2 ; # callers field IUSERF EQU ICALLF+2 ; # users IUSRCF EQU IUSERF+2 ; # records in users file (reaches USRS maximum) SPAREF EQU IUSRCF+2 ; Update interval HRDLGF EQU SPAREF+1 ; Hard-copy log switch MUSRDF EQU HRDLGF+1 ; Last date user file maintained MUSRTF EQU MUSRDF+3 ; Last time user file maintained MMSGDF EQU MUSRTF+3 ; Last date messages maintained MMSGTF EQU MMSGDF+3 ; Last time messages maintained NDXLEN EQU SYSLEN ; Length of index record ; ;----------------------------------------------------------------------- ; ; USERS file fields ; ;----------------------------------------------------------------------- ; UNAMEF EQU RNDBUF ; User's name field CITPRVF EQU UNAMEF+30 ; City and province/state PSWORDF EQU CITPRVF+20 ; Password TMESONF EQU PSWORDF+10 ; # times on LASTONF EQU TMESONF+2 ; Last date on ACCESSF EQU LASTONF+3 ; Access level MAILF EQU ACCESSF+1 ; Mail waiting flag INITARF EQU MAILF+1 ; Area to bump user to after signon NNULLF EQU INITARF+1 ; Number of nulls needed BDCDEF EQU NNULLF+1 ; Baudrate code (last signon) UPLDSF EQU BDCDEF+1 ; Upload count DNLDSF EQU UPLDSF+2 ; Download count USRMPF EQU DNLDSF+2 ; Userarea map DRVMPF EQU USRMPF+2 ; Drive map TRMCDEF EQU DRVMPF+2 ; Terminal identifier code TOTTMEF EQU TRMCDEF+1 ; Total time on-line on day basis USRLEN EQU SYSLEN ; Length of each user record ; ;----------------------------------------------------------------------- ; ; MSGINDEX file fields ; ;----------------------------------------------------------------------- ; MTOF EQU RNDBUF ; Message 'to' name field MNUMF EQU MTOF+30 ; Message number field MDATF EQU MNUMF+2 ; Date message left MBLKF EQU MDATF+3 ; Number of 250 byte blocks used MSTRF EQU MBLKF+1 ; Number of starting block MSUBF EQU MSTRF+2 ; Message subject MTABLEN EQU MSUBF+26-MNUMF ; Length of info for message table MNDXLEN EQU SYSLEN ; Length of each message index record ; ;----------------------------------------------------------------------- ; ; MESSAGES file field ; ;----------------------------------------------------------------------- ; MSGF EQU RNDBUF ; Message block MSGLEN EQU 64 ; Length of each record in messages must ; Equal length of line input in message entry ; ;----------------------------------------------------------------------- ; ; Last caller field ; ;----------------------------------------------------------------------- ; LSTCALF EQU RNDBUF ; Structured as: LSTLEN EQU SYSLEN ; Hh:mm:ss,mm/dd/yy,firstname,lastname, ; ; ; ;----------------------------------------------------------------------- ; ; The next section is the buffer areas that are used to make it easier ; to find info from one field instead of having to offset from the base ; of the disk buffer each time.... As with the above field info changing ; this area means the possibility of total file and program incompata- ; bility with future releases.... Change with care and caution. These ; areas MUST match exactly the fields defined above. ; ;----------------------------------------------------------------------- ; ; Last caller file storage area ; ;----------------------------------------------------------------------- ; LSTCLR:: DS SYSLEN ; Bytes for last caller info storage ; ;----------------------------------------------------------------------- ; ; User information for mail and system info: A user's record from ; USERS.EXM loads here ; ;----------------------------------------------------------------------- ; UNAME:: DS 30 ; User's first and last name CITPRV:: DS 20 ; Location PSWORD:: DS 10 ; Password TMESON:: DS 2 ; Times on system LASTON:: DS 3 ; Binary date last on ACCESS:: DS 1 ; Access level MFLAG:: DS 1 ; Mail wating flag INITAR:: DS 1 ; Area to bump user to after signon NNULL:: DS 1 ; Number of nulls needed BDCDE:: DS 1 ; Last baudrate used UPLDS:: DS 2 ; Upload count DNLDS:: DS 2 ; Download count USRMP:: DS 2 ; Userarea map DRVMP:: DS 2 ; Drive map TRMCDE:: DS 1 ; Terminal identifier code TOTTME:: DS 1 ; Total time on-line on day basis UXTRA:: DS SYSLEN-(TOTTME+1-UNAME) ; Extra storage for expansion ; ;----------------------------------------------------------------------- ; ; System index area: The INDEX.EMX file gets loaded here ; ;----------------------------------------------------------------------- ; IDATE:: DB 0,0,0 ; Can be updated by hardware clock IMRNM:: DB 0,0 ; Next message record IMNXT:: DB 0,0 ; Next message number IMNDX:: DB 0,0 ; # records in message index ICALL:: DB 0,0 ; # callers to system IUSER:: DB 0,0 ; # users of system IUSRC:: DB 0,0 ; # records in users file (reaches USRS max) SPARE:: DB 0 ; Spare byte for future HRDLOG:: DB 0 ; Hard-copy log switch MUSRD:: DB 0,0,0 ; Last date user file maintained MUSRT:: DB 0,0,0 ; Last time user file maintained MMSGD:: DB 0,0,0 ; Last date messages maintained MMSGT:: DB 0,0,0 ; Last time messages maintained IXTRA:: DS SYSLEN-(MMSGT+3-IDATE) ; Extra storage for expansion ; ;--------------------- end of header file ------------------------------