home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
simtel
/
sigm
/
vols200
/
vol276
/
zcpr3cmd.lbr
/
Z3HDR.LQB
/
Z3HDR.LIB
Wrap
Text File
|
1986-06-11
|
19KB
|
563 lines
; z3hdr - minimum Configuration
; offset: 4100H
;*************************************************************************
;* *
;* Z C P R 3 -- Z80-Based Command Processor Replacement, Version 3.0 *
;* *
;* Copyright (c) 1984 by Richard Conn *
;* Copyright Pending, US Government *
;* All Rights Reserved *
;* *
;* ZCPR3 was written by Richard Conn, who assumes no responsibility *
;* or liability for its use. ZCPR3 is released to the CP/M user *
;* community for non-commercial use only. *
;* *
;* All registered users of CP/M are encouraged to freely copy and use *
;* ZCPR3 and its associated utilities on their registered systems for *
;* non-commercial purposes. *
;* *
;* Any commercial use of ZCPR3 is prohibited unless approved by the *
;* author, Richard Conn, or his authorized agent, Echelon, Inc, in *
;* writing. *
;* *
;* This is the RELEASE VERSION of ZCPR3. *
;* *
;*************************************************************************
;
; module: Z3HDR
; author: Richard Conn
; module Used By: ZCPR3 Version 3.x
; note: Z3HDR contains the key customization equates for ZCPR3. These
; equates allow the user to select various ZCPR3 options and do an
; extensive amount of tailoring of ZCPR3 to the user's desires.
;
;
; 1. basic system definitions
;
; the following equates may be used to customize this CPR for the user's
; system and integration technique. The following equate are provided:
;
; rel - true if integration is to be done via MOVCPM
; - false if integration is to be done via DDT and SYSGEN
;
; cprloc - base Page Address of CPR; this value can be obtained by running
; the CCPLOC program on your system, and if REL is FALSE, this
; value is supplied through the Z3BASE.LIB CCP equate
;
;*************************************************************************
ROMVERS EQU TRUE ;set false for testing, TRUE for running version *
;*************************************************************************
REL EQU FALSE
IF REL
CPRLOC EQU 0
ELSE
CPRLOC EQU CCP ;value provided in z3base.lib
ENDIF
;
; 2. default file types
;
; the following macros define the file types of the command object files
; (com files under CP/M 2.2) to be loaded when a non-resident ZCPR3 command
; is given and of the indirect command files (SUB files under CP/M 2.2) to
; be used to extract commands from when the indirect command facility is
; invoked.
;
COMTYP MACRO
DB 'COM'
ENDM
SUBTYP MACRO
DB 'SUB'
ENDM
;
; 3. submit file processing
;
; the following flag enables the ability of ZCPR3 to process
; submit files (command files of the form $$$.SUB). If SUBON is TRUE, then
; zcpr3 will process such files like CP/M's CCP normally does; if SUBON is
; false, zcpr3 will not process such files (ignore them). In such a case,
; only indirect command file facilities like ZEX will work. Much code is
; saved inside of the ZCPR3 Command Processor if SUBON is set to FALSE,
; but this rather useful facility is lost.
;
SUBON EQU TRUE
;
; 4. command prefix
;
; the following flag allows ZCPR3 to accept commands of the form
; "du:command params" or "dir:command params". If DRVPREFIX is TRUE,
; this form is accepted; if FALSE, this form is not accepted.
;
DRVPREFIX equ TRUE
;
; 5. command attributes
;
; the following equate allows the user to select the attributes of the
; com files which are selected for execution. The ZCPR3 Command Processor
; can be made to execute only COM files with the System attribute set, with
; the Directory (non-System) attribute set, or with either attribute set.
; the following values are defined for this equate:
;
; comatt files Selected
; 0 system
; 80h directory
; 1 both System and Directory
;
COMATT equ 01H
;
; 6. zcpr3 resident command activation and wheel facility
;
;leave these alone (include or delete from cmd.mac)
DIRON equ TRUE ;dir command
LTON equ TRUE ;list, type commands
GOON equ TRUE ;go command
ERAON equ TRUE ;era command
SAVEON equ TRUE ;save command
RENON equ TRUE ;ren command
GETON equ TRUE ;get command
JUMPON equ TRUE ;jump command
NOTEON equ TRUE ;note command
HELPON equ TRUE ;help command
;
; the Wheel equate table enables the WHEEL facility of ZCPR3. With this
; facility, a WHEEL BYTE, which exists somewhere in memory, is examined
; before a set of installer-selected commands are executed.
; if this byte is not zero, then the command proceeds. If it is zero,
; then the command is not allowed to proceed and is exited with an error
; message.
;
; the following set of equates make each of the indicated commands
; selectable to respond to the Wheel Byte or not. For instance, if
; wera=true, then it responds to the Wheel Byte; if WERA=FALSE, it does not.
;
; if z3whl ne 0 ;if a wheel byte address is defined
WDIR equ FALSE ;make DIR a Wheel-Oriented Command
WERA equ FALSE ; " era " " " "
WREN equ FALSE ; " ren " " " "
WLT equ FALSE ; " l/t " " " " (list/type)
WGO equ FALSE ; " go " " " "
WSAVE equ FALSE ; " save " " " "
WGET equ FALSE ; " get " " " "
WJUMP equ FALSE ; " jump " " " "
WDU equ FALSE ; " du: " " " " (du/dir change)
WHEEL equ WERA OR WREN OR WLT OR WGO OR WSAVE OR WGET OR WJUMP OR WDU
; endif ;z3whl
;
; 7. zcpr3 resident command table
;
; this table consists of the names of the various ZCPR3-resident
; commands and their addresses. The NCHARS equate defines how many
; characters long each name may be, and all table entries must be exactly
; the indicated number of characters (trailing spaces are used to fill
; out shorter names).
;
; each table entry is structured as follows:
;
; db 'cmnd' ;name of Command (NCHARS long)
; db cmndadr ;address of Command within ZCPR3
;
; the installer should only change the names of the commands as
; desired and should not, as a rule, touch the address definition since
; this is fixed within the body of ZCPR3.
;
NCHARS EQU 4 ;number of chars/command
;table now in CMD.MAC
;
; 8. controls on zcpr3 resident commands
;
; the following sets of equates provide special controls and
; parameters on various ZCPR3-resident commands.
;
;
; the following equates set the width of the spacing between the
; file names for the DIR command and the character used to separate file
; names from one another on the same line.
;
; assuming that FENCE is set to the character '|', If WIDE is TRUE,
; then the output will look like:
;
; filename.typ__|__filename.typ ...
;
; while if WIDE is FALSE, the output will look like:
;
; filename.typ_|_filename.typ ...
;
; (underscore represents a space)
;
WIDE EQU TRUE
FENCE EQU '|'
;
; the following equates define two flags which are used in
; conjunction with the DIR command on the command line. SYSFLG is
; the character used to indicate to DIR that all files, both System
; and Non-System, are to be displayed. SOFLG is the character used
; to indicate to DIR that only the System files are to be displayed.
; by default, DIR displays non-System files.
;
; for example, if SYSFLG is set to 'A' and SOFLG is set to
; 's', then:
; dir *.COM A
;
; displays all COM files with both System and non-System attributes
; while:
; dir *.COM S
;
; displays only COM files with the System attribute. Naturally:
;
; dir *.COM
;
; displays only COM files with the non-System attribute.
;
SYSFLG EQU 'A'
SOFLG EQU 'S'
;
; the following equate causes ERA to confirm the files to be erased
; before it goes ahead and erases them. If ERAOK is TRUE, then the user
; will be prompted each time; if it is FALSE, then the user will not be
; prompted.
;
ERAOK equ TRUE
;
; if ERAOK is TRUE, the following equate adds a Verify option to the
; era command which causes the user to be prompted only if the Verify
; option letter, defined by ERDFLG, is given after the file name. If
; erav is TRUE, then the user will be asked to verify only when ERDFLG
; is contained in the command line; if ERAV is FALSE, the user will always
; be asked to verify.
;
; for example, if ERAOK is TRUE, ERAV is TRUE, and ERDFLG is 'V',
; then the command:
; era *.* V
; will result in the file names being displayed and the user being asked
; for verification. If the V option were not given, the user would not
; be asked for verification.
;
ERAV equ FALSE
ERDFLG equ 'V'
;
; the following equates set the paging parameters for the TYPE
; command.
;
; pgdflt determines if TYPE pages by default. If PGDFLT is TRUE,
; then:
; type file.txt
;
; will be paged. If PGDFLT is FALSE, the above command will not be paged.
;
; pgdflg defines the option character in the TYPE command line which
; is used to toggle the default set by PGDFLT. Assuming that PGDFLG is set
; to 'P', then:
; type file.txt p
;
; will page the file listing if PGDFLT is FALSE and not page it if PGDFLT is
; true.
;
PGDFLT EQU TRUE
PGDFLG EQU 'P'
;
; the following equate defines the number of lines on the user's CRT
; screen for use by the TYPE command when it is paging. This value is usually
; 24.
;
NLINES EQU 24
;
; the following equate defines the option letter used with the
; save command to indicate that the associated number is 128-byte sectors
; as opposed to 256-byte pages. For example, if SECTFLG is set to 'S', then:
;
; save 25 file.bin s
;
; save 25 128-byte sectors starting at location 100H into the file named
; file.bin. if the S option was not present, SAVE would have saved 25
; 256-byte blocks starting at location 100H into the file named FILE.BIN.
;
SECTFLG EQU 'S'
;
; 9. path definition
;
; the following equate specifies the address of the PATH to be followed
; for the PATH command-search if the PATH is to be initialized by the BIOS
; and set by the user via a PATH.COM program. The value of PATH should
; be the address of the PATH data area in memory. If the internal PATH
; provided by ZCPR3 is to be used, then PATHBASE should be equated to 0,
; which selects the PATH located just after the MEMLOAD routine. If the
; external PATH is to be used, then PATHBASE should be set to the address
; of the external path.
;
; a path is a series of byte-pairs, terminated by a binary 0. The first
; byte of each pair is the disk number (1-16 for disks A-P), and the second
; byte of each pair is the user number (0-31). The special character '$'
; indicates the current user or current disk. For example, the path
; from current disk/current user to current disk/user 0 to disk A/user 0
; is selected by the following sequence:
;
; db '$$' ;current disk/user
; db '$',0 ;current disk/user 0
; db 1,0 ;disk A/user 0
; db 0 ;end of path
;
IF EXPATH NE 0 ;external Path Selected
;
; this equate defines the base address of the external path
;
PATH equ EXPATH ;external ZCPR3 PATH at CBIOS Buffer Area
ELSE ;internal Path Selected
;
; the following macro defines the n-element internal path
;
IPATH MACRO
db 'A'-'@','$' ;disk A, Current User
db 'A'-'@',0 ;disk A, User 0
db 0 ;end of Path -- MUST be here
ENDM
;
ENDIF
;
; the following flag enables ZCPR3 to perform an optimized path
; search when it is searching along a path for a file. If this equate
; is TRUE, ZCPR3 will build a path in memory of absolute entries (A1, B7, etc)
; from the symbolic path (one containing '$') which is the path it would
; otherwise use. This new path would contain no duplicate path elements,
; where a symbolic path analysis may. For example, if the path is:
;
; db 'A'-'@','$' ;disk A, current user
; db 'A'-'@',15 ;disk A, user 15
; db 0
;
; then if the user is logged into A15, setting the below equate to TRUE
; would allow ZCPR3 to build the path:
;
; db 'A'-'@',15 ;only one entry
; db 0
;
; in the analysis of this symbolic path, while with this equate FALSE,
; zcpr3 may log into A15 as many as three times (once for the default
; and twice more for the symbolic path) in looking for a file which is
; not found before it gives up. Using this minimum path facility costs
; some code in ZCPR3, but it speeds up processing noticably in some cases.
;
; enable this equate if MINIMUM PATH SEARCH is to be employed.
;
MINPATH EQU TRUE
;
; in searching for a file along a path, ZCPR3 can be commanded
; to always look in the current logged-in directory before beginning
; the path search. This equate controls this feature. If SCANCUR
; is set to TRUE, the current directory need never be referenced in
; a symbolic path expression (DB '$','$') since SCANCUR insures that
; the current directory is scanned.
;
; enable this equate if the current DU is always to be scanned.
;
SCANCUR EQU TRUE
;
; 10. du and dir controls
;
;
; the following equate enables the appearance of the current disk/user
; in the ZCPR3 prompt. If set to FALSE, the prompt appears as '>' (assuming
; > is the current value of CPRMPT). If set to TRUE, the prompt appears
; as 'd>' or 'dn>'. (see INCLNDR below)
;
INCLDU equ TRUE
;
; the following equate allows ZCPR3 to accept the DU: prefix or
; login form for input. Set this to TRUE if DU: prefix is to be allowed.
;
; setting this equate to TRUE allows the following forms:
;
; a>b1:
; a>type b4:file.txt
; a>b:
; a>1:
;
ACCPTDU EQU TRUE
;
; this equate enables ZCPR3 to process DIR: forms internally
; through the memory-based named directory buffer. This equate and
; the NDBASE address should be TRUE (non-zero) in order to enable
; zcpr3 to process named directories.
;
; if NDINCP is TRUE, the following forms are allowed:
;
; a>root:
; a>type text:file.txt
;
; if the other associated equates (below) are set correctly.
;
NDINCP EQU FALSE
;
; the following equate will cause the name of the current directory
; to be displayed as part of the prompt along with the DU form if enabled.
; (see INCLDU above)
;
; for example, if INCLNDR is TRUE, the prompt would look like:
;
; b7:text> -- if INCLDU is also TRUE
; text> -- if INCLDU is FALSE
;
INCLNDR EQU FALSE
;
; the following equate allows ZCPR3 to accept the DIR: prefix or
; login form for input. Set this to TRUE if DIR: prefix is to be allowed.
;
; setting this equate to TRUE allows the following forms:
;
; a>root:
; a>type text:file.txt
;
ACCPTND EQU FALSE
;
; the following equate determines the hierarchy of DU:/DIR: evaluation.
; set this to TRUE if DU: is to be tested for before DIR: or set this to
; false if DIR: is to be tested for before DU:. If this is FALSE, named
; directories like C: (standing for C work area - NOT disk C) are permitted.
;
; assuming that a directory for C programs, named 'C', and a root
; directory, named 'ROOT', exist, then if DUFIRST is set to FALSE:
;
; a>c: -- logs the user into the directory named 'C'
; a>root: -- logs the user into the directory named 'ROOT'
;
; while if DUFIRST is set to TRUE:
;
; a>c: -- logs the user into disk C: (dir C can't be accessed)
; a>root: -- logs the user into the directory named 'ROOT'
;
DUFIRST EQU TRUE
;
; enable password check on named directory references. If a named
; directory is referenced and has a password associated with it, ZCPR3
; will ask the user for this password and approve the reference only
; if he gives a valid response. One and only one try is permitted.
; setting this equate to TRUE will enable the password check facility.
;
PWCHECK EQU FALSE
;
; 11. command line buffer control
;
; the MULTCMD equate enables the feature of having more than
; one command on the same line, separated by a separation char
; which is defined by the CMDSEP equate. If this feature is
; enabled, the command line buffer and buffer pointers are
; moved outside of ZCPR3 at the indicated address of Z3CL.
;
; multcmd indicates if the ability to have more than one command
; on a line is to be enabled, and CMDSEP is the character used to separate
; these commands. For example, if CMDSEP is ';' and MULTCMD is TRUE, then
; commands like this are possible:
;
; era *.BAK;dir
;
IF Z3CL NE 0
MULTCMD equ TRUE
ELSE
MULTCMD equ FALSE
ENDIF
CMDSEP equ ';'
;
; 12. cmdrun -- zcpr3 extended command processing facility
;
; this equate enables the ZCPR3 CMDRUN facility. If CMDRUN is TRUE, then
; another stage of command processing is invoked should ZCPR3 fail to find
; a COM file when the user gives a command. This stage involves invoking
; the COM file specified by CMDFCB and giving it the current command line
; as an argument. In this way, if, say, M80 PROG2 fails as a command,
; a new command like LRUNZ M80 PROG2, SUB M80 PROG2, or ZEX M80 PROG2 may
; be processed. If the new command fails, an appropriate error message is
; given.
;
; the ROOTONLY option causes ZCPR3 to only look at the Root (bottom of
; path) for the Extended Command Processor if it is set to TRUE. If it
; is set to FALSE, the path is searched for the Extended Command Processor.
; the tradeoff here is that ROOTONLY = TRUE is less flexible but somewhat
; faster than ROOTONLY = FALSE.
;
CMDRUN equ FALSE ; enable the Facility
if CMDRUN
ROOTONLY equ TRUE ; true if look at Root Only for Extended
; command Processor, FALSE if look along
; path
CMDFCB MACRO
db 0
db 'CMDRUN ' ;name of Program
db 'COM' ;file Type
ENDM
endif ;cmdrun
;
; 13. flow command facility
;
; this equate enables ZCPR3 to respond to IF processing.
; zcpr3 simply flushes commands if a FALSE IF is currently engaged.
; fcps must be enabled for IFON to work correctly.
;
IFON EQU FALSE
;
; 14. miscellaneous equates
;
MAXUSR EQU 31 ;maximum user number accessable
MAXDISK EQU 4 ;maximum number of disks accessable
SUPRES EQU FALSE ;supresses user # report for user 0
SPRMPT EQU '$' ;cpr prompt indicating submit command
CPRMPT EQU '>' ;cpr prompt indicating user command
NUMBASE EQU 'H' ;char used to switch from default number base
CURIND EQU '$' ;symbol for current disk or user
COMMENT EQU ';' ;lines beginning with this char are comments
;
; end of zcpr3 customization section
;