home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols200 / vol276 / zcpr3cmd.lbr / Z3HDR.LQB / Z3HDR.LIB
Text File  |  1986-06-11  |  19KB  |  563 lines

  1. ; z3hdr - minimum Configuration
  2. ; offset:  4100H
  3.  
  4. ;*************************************************************************
  5. ;*                                    *
  6. ;*  Z C P R 3 -- Z80-Based Command Processor Replacement, Version 3.0    *
  7. ;*                                    *
  8. ;*  Copyright (c) 1984 by Richard Conn                    *
  9. ;*  Copyright Pending, US Government                    *
  10. ;*  All Rights Reserved                            *
  11. ;*                                    *
  12. ;*  ZCPR3 was written by Richard Conn, who assumes no responsibility    *
  13. ;*  or liability for its use.  ZCPR3 is released to the CP/M user    *
  14. ;*  community for non-commercial use only.                *
  15. ;*                                    *
  16. ;*  All registered users of CP/M are encouraged to freely copy and use    *
  17. ;*  ZCPR3 and its associated utilities on their registered systems for    *
  18. ;*  non-commercial purposes.                        *
  19. ;*                                    *
  20. ;*  Any commercial use of ZCPR3 is prohibited unless approved by the    *
  21. ;*  author, Richard Conn, or his authorized agent, Echelon, Inc, in    *
  22. ;*  writing.                                *
  23. ;*                                    *
  24. ;*  This is the RELEASE VERSION of ZCPR3.                *
  25. ;*                                    *
  26. ;*************************************************************************
  27.  
  28. ;
  29. ;  module:  Z3HDR
  30. ;  author:  Richard Conn
  31. ;  module Used By:  ZCPR3 Version 3.x
  32. ;  note:  Z3HDR contains the key customization equates for ZCPR3.  These
  33. ;    equates allow the user to select various ZCPR3 options and do an
  34. ;    extensive amount of tailoring of ZCPR3 to the user's desires.
  35. ;
  36.  
  37. ;
  38. ;  1. basic system definitions
  39. ;
  40. ;    the following equates may be used to customize this CPR for the user's
  41. ; system and integration technique.  The following equate are provided:
  42. ;
  43. ;    rel - true if integration is to be done via MOVCPM
  44. ;        - false if integration is to be done via DDT and SYSGEN
  45. ;
  46. ;    cprloc - base Page Address of CPR; this value can be obtained by running
  47. ;          the CCPLOC program on your system, and if REL is FALSE, this
  48. ;          value is supplied through the Z3BASE.LIB CCP equate
  49. ;
  50. ;*************************************************************************
  51.  
  52. ROMVERS    EQU    TRUE    ;set false for testing, TRUE for running version *
  53.  
  54. ;*************************************************************************
  55.  
  56. REL    EQU    FALSE
  57.  
  58.     IF    REL
  59. CPRLOC    EQU    0
  60.     ELSE
  61. CPRLOC    EQU    CCP    ;value provided in z3base.lib
  62.     ENDIF
  63.  
  64. ;
  65. ;  2. default file types
  66. ;
  67. ;    the following macros define the file types of the command object files
  68. ; (com files under CP/M 2.2) to be loaded when a non-resident ZCPR3 command
  69. ; is given and of the indirect command files (SUB files under CP/M 2.2) to
  70. ; be used to extract commands from when the indirect command facility is
  71. ; invoked.
  72. ;
  73. COMTYP    MACRO
  74.     DB    'COM'
  75.     ENDM
  76.  
  77. SUBTYP    MACRO
  78.     DB    'SUB'
  79.     ENDM
  80.  
  81. ;
  82. ;  3. submit file processing
  83. ;
  84. ;    the following flag enables the ability of ZCPR3 to process
  85. ; submit files (command files of the form $$$.SUB).  If SUBON is TRUE, then
  86. ; zcpr3 will process such files like CP/M's CCP normally does; if SUBON is
  87. ; false, zcpr3 will not process such files (ignore them).  In such a case,
  88. ; only indirect command file facilities like ZEX will work.  Much code is
  89. ; saved inside of the ZCPR3 Command Processor if SUBON is set to FALSE,
  90. ; but this rather useful facility is lost.
  91. ;
  92. SUBON    EQU    TRUE 
  93.  
  94.  
  95. ;
  96. ;  4. command prefix
  97. ;
  98. ;    the following flag allows ZCPR3 to accept commands of the form
  99. ; "du:command params" or "dir:command params".  If DRVPREFIX is TRUE,
  100. ; this form is accepted; if FALSE, this form is not accepted.
  101. ;
  102. DRVPREFIX    equ    TRUE 
  103.  
  104.  
  105. ;
  106. ;  5. command attributes
  107. ;
  108. ;    the following equate allows the user to select the attributes of the
  109. ; com files which are selected for execution.  The ZCPR3 Command Processor
  110. ; can be made to execute only COM files with the System attribute set, with
  111. ; the Directory (non-System) attribute set, or with either attribute set.
  112. ; the following values are defined for this equate:
  113. ;
  114. ;          comatt    files Selected
  115. ;            0        system
  116. ;           80h        directory
  117. ;            1        both System and Directory
  118. ;
  119. COMATT    equ    01H
  120.  
  121.  
  122. ;
  123. ;  6. zcpr3 resident command activation and wheel facility
  124. ;
  125. ;leave these alone (include or delete from cmd.mac)
  126. DIRON    equ    TRUE    ;dir command
  127. LTON    equ    TRUE     ;list, type commands
  128. GOON    equ    TRUE     ;go command
  129. ERAON    equ    TRUE     ;era command
  130. SAVEON    equ    TRUE    ;save command
  131. RENON    equ    TRUE    ;ren command
  132. GETON    equ    TRUE    ;get command
  133. JUMPON    equ    TRUE    ;jump command
  134. NOTEON    equ    TRUE     ;note command
  135. HELPON    equ    TRUE    ;help command
  136.  
  137. ;
  138. ;  the Wheel equate table enables the WHEEL facility of ZCPR3.  With this
  139. ;  facility, a WHEEL BYTE, which exists somewhere in memory, is examined
  140. ;  before a set of installer-selected commands are executed.
  141. ;  if this byte is not zero, then the command proceeds.  If it is zero,
  142. ;  then the command is not allowed to proceed and is exited with an error
  143. ;  message.
  144. ;
  145. ;  the following set of equates make each of the indicated commands
  146. ;  selectable to respond to the Wheel Byte or not.  For instance, if
  147. ;  wera=true, then it responds to the Wheel Byte; if WERA=FALSE, it does not.
  148. ;
  149. ;    if    z3whl ne 0    ;if a wheel byte address is defined
  150. WDIR    equ    FALSE    ;make DIR a Wheel-Oriented Command
  151. WERA    equ    FALSE    ; "   era "   "          "          "
  152. WREN    equ    FALSE    ; "   ren "   "       "       "
  153. WLT    equ    FALSE    ; "   l/t "   "       "       "  (list/type)
  154. WGO    equ    FALSE    ; "   go  "   "       "       "
  155. WSAVE    equ    FALSE    ; "   save "  "       "       "
  156. WGET    equ    FALSE    ; "   get "   "       "       "
  157. WJUMP    equ    FALSE    ; "   jump "  "       "       "
  158. WDU    equ    FALSE    ; "   du: "   "       "       " (du/dir change)
  159. WHEEL    equ    WERA OR WREN OR WLT OR WGO OR WSAVE OR WGET OR WJUMP OR WDU
  160. ;    endif        ;z3whl
  161.  
  162. ;
  163. ;  7. zcpr3 resident command table
  164. ;
  165. ;    this table consists of the names of the various ZCPR3-resident
  166. ; commands and their addresses.  The NCHARS equate defines how many
  167. ; characters long each name may be, and all table entries must be exactly
  168. ; the indicated number of characters (trailing spaces are used to fill
  169. ; out shorter names).
  170. ;
  171. ;    each table entry is structured as follows:
  172. ;
  173. ;        db    'cmnd'    ;name of Command (NCHARS long)
  174. ;        db    cmndadr    ;address of Command within ZCPR3
  175. ;
  176. ;    the installer should only change the names of the commands as
  177. ; desired and should not, as a rule, touch the address definition since
  178. ; this is fixed within the body of ZCPR3.
  179. ;
  180. NCHARS    EQU    4        ;number of chars/command
  181.  
  182. ;table now in CMD.MAC
  183.  
  184. ;
  185. ;  8. controls on zcpr3 resident commands
  186. ;
  187. ;    the following sets of equates provide special controls and
  188. ; parameters on various ZCPR3-resident commands.
  189. ;
  190.  
  191. ;
  192. ;    the following equates set the width of the spacing between the
  193. ; file names for the DIR command and the character used to separate file
  194. ; names from one another on the same line.
  195. ;
  196. ;    assuming that FENCE is set to the character '|', If WIDE is TRUE,
  197. ; then the output will look like:
  198. ;
  199. ;        filename.typ__|__filename.typ ...
  200. ;
  201. ; while if WIDE is FALSE, the output will look like:
  202. ;
  203. ;        filename.typ_|_filename.typ ...
  204. ;
  205. ; (underscore represents a space)
  206. ;
  207. WIDE    EQU    TRUE 
  208. FENCE    EQU    '|'
  209.  
  210. ;
  211. ;    the following equates define two flags which are used in
  212. ; conjunction with the DIR command on the command line.  SYSFLG is
  213. ; the character used to indicate to DIR that all files, both System
  214. ; and Non-System, are to be displayed.  SOFLG is the character used
  215. ; to indicate to DIR that only the System files are to be displayed.
  216. ; by default, DIR displays non-System files.
  217. ;
  218. ;    for example, if SYSFLG is set to 'A' and SOFLG is set to
  219. ; 's', then:
  220. ;        dir *.COM A
  221. ;
  222. ; displays all COM files with both System and non-System attributes
  223. ; while:
  224. ;        dir *.COM S
  225. ;
  226. ; displays only COM files with the System attribute.  Naturally:
  227. ;
  228. ;        dir *.COM
  229. ;
  230. ; displays only COM files with the non-System attribute.
  231. ;
  232. SYSFLG    EQU    'A'
  233. SOFLG    EQU    'S'
  234.  
  235. ;
  236. ;    the following equate causes ERA to confirm the files to be erased
  237. ; before it goes ahead and erases them.  If ERAOK is TRUE, then the user
  238. ; will be prompted each time; if it is FALSE, then the user will not be
  239. ; prompted.
  240. ;
  241. ERAOK    equ    TRUE
  242.  
  243. ;
  244. ;    if ERAOK is TRUE, the following equate adds a Verify option to the
  245. ; era command which causes the user to be prompted only if the Verify
  246. ; option letter, defined by ERDFLG, is given after the file name.  If
  247. ; erav is TRUE, then the user will be asked to verify only when ERDFLG
  248. ; is contained in the command line; if ERAV is FALSE, the user will always
  249. ; be asked to verify.
  250. ;
  251. ;    for example, if ERAOK is TRUE, ERAV is TRUE, and ERDFLG is 'V',
  252. ; then the command:
  253. ;            era *.* V
  254. ; will result in the file names being displayed and the user being asked
  255. ; for verification.  If the V option were not given, the user would not
  256. ; be asked for verification.
  257. ;
  258. ERAV    equ    FALSE
  259. ERDFLG    equ    'V'
  260.  
  261. ;
  262. ;    the following equates set the paging parameters for the TYPE
  263. ; command.
  264. ;
  265. ;    pgdflt determines if TYPE pages by default.  If PGDFLT is TRUE,
  266. ; then:
  267. ;        type file.txt
  268. ;
  269. ; will be paged.  If PGDFLT is FALSE, the above command will not be paged.
  270. ;
  271. ;    pgdflg defines the option character in the TYPE command line which
  272. ; is used to toggle the default set by PGDFLT.  Assuming that PGDFLG is set
  273. ; to 'P', then:
  274. ;        type file.txt p
  275. ;
  276. ; will page the file listing if PGDFLT is FALSE and not page it if PGDFLT is
  277. ; true.
  278. ;
  279. PGDFLT    EQU    TRUE 
  280. PGDFLG    EQU    'P'
  281.  
  282. ;
  283. ;    the following equate defines the number of lines on the user's CRT
  284. ; screen for use by the TYPE command when it is paging.  This value is usually
  285. ; 24.
  286. ;
  287. NLINES    EQU    24
  288.  
  289. ;
  290. ;    the following equate defines the option letter used with the
  291. ; save command to indicate that the associated number is 128-byte sectors
  292. ; as opposed to 256-byte pages.  For example, if SECTFLG is set to 'S', then:
  293. ;
  294. ;        save 25 file.bin s
  295. ;
  296. ; save 25 128-byte sectors starting at location 100H into the file named
  297. ; file.bin.  if the S option was not present, SAVE would have saved 25
  298. ; 256-byte blocks starting at location 100H into the file named FILE.BIN.
  299. ;
  300. SECTFLG    EQU    'S'
  301.  
  302. ;
  303. ;  9. path definition
  304. ;
  305. ;    the following equate specifies the address of the PATH to be followed
  306. ; for the PATH command-search if the PATH is to be initialized by the BIOS
  307. ; and set by the user via a PATH.COM program.  The value of PATH should
  308. ; be the address of the PATH data area in memory.  If the internal PATH
  309. ; provided by ZCPR3 is to be used, then PATHBASE should be equated to 0,
  310. ; which selects the PATH located just after the MEMLOAD routine.  If the
  311. ; external PATH is to be used, then PATHBASE should be set to the address
  312. ; of the external path.
  313. ;
  314. ;    a path is a series of byte-pairs, terminated by a binary 0.  The first
  315. ; byte of each pair is the disk number (1-16 for disks A-P), and the second
  316. ; byte of each pair is the user number (0-31).  The special character '$'
  317. ; indicates the current user or current disk.  For example, the path
  318. ; from current disk/current user to current disk/user 0 to disk A/user 0
  319. ; is selected by the following sequence:
  320. ;
  321. ;        db    '$$'    ;current disk/user
  322. ;        db    '$',0    ;current disk/user 0
  323. ;        db    1,0    ;disk A/user 0
  324. ;        db    0    ;end of path
  325. ;
  326.     IF    EXPATH NE 0    ;external Path Selected
  327. ;
  328. ;  this equate defines the base address of the external path
  329. ;
  330. PATH    equ    EXPATH        ;external ZCPR3 PATH at CBIOS Buffer Area
  331.  
  332.     ELSE            ;internal Path Selected
  333. ;
  334. ;  the following macro defines the n-element internal path
  335. ;
  336. IPATH    MACRO
  337.     db    'A'-'@','$'    ;disk A, Current User
  338.     db    'A'-'@',0    ;disk A, User 0
  339.     db    0        ;end of Path -- MUST be here
  340.     ENDM
  341. ;
  342.     ENDIF
  343.  
  344. ;
  345. ;    the following flag enables ZCPR3 to perform an optimized path
  346. ; search when it is searching along a path for a file.  If this equate
  347. ; is TRUE, ZCPR3 will build a path in memory of absolute entries (A1, B7, etc)
  348. ; from the symbolic path (one containing '$') which is the path it would
  349. ; otherwise use.  This new path would contain no duplicate path elements,
  350. ; where a symbolic path analysis may.  For example, if the path is:
  351. ;
  352. ;        db    'A'-'@','$'    ;disk A, current user
  353. ;        db    'A'-'@',15    ;disk A, user 15
  354. ;        db    0
  355. ;
  356. ; then if the user is logged into A15, setting the below equate to TRUE
  357. ; would allow ZCPR3 to build the path:
  358. ;
  359. ;        db    'A'-'@',15    ;only one entry
  360. ;        db    0
  361. ;
  362. ; in the analysis of this symbolic path, while with this equate FALSE,
  363. ; zcpr3 may log into A15 as many as three times (once for the default
  364. ; and twice more for the symbolic path) in looking for a file which is
  365. ; not found before it gives up.  Using this minimum path facility costs
  366. ; some code in ZCPR3, but it speeds up processing noticably in some cases.
  367. ;
  368. ;    enable this equate if MINIMUM PATH SEARCH is to be employed.
  369. ;
  370. MINPATH    EQU    TRUE 
  371.  
  372. ;
  373. ;    in searching for a file along a path, ZCPR3 can be commanded
  374. ; to always look in the current logged-in directory before beginning
  375. ; the path search.  This equate controls this feature.  If SCANCUR
  376. ; is set to TRUE, the current directory need never be referenced in
  377. ; a symbolic path expression (DB '$','$') since SCANCUR insures that
  378. ; the current directory is scanned.
  379. ;
  380. ;    enable this equate if the current DU is always to be scanned.
  381. ;
  382. SCANCUR    EQU    TRUE 
  383.  
  384.  
  385. ;
  386. ; 10. du and dir controls
  387. ;
  388.  
  389. ;
  390. ;    the following equate enables the appearance of the current disk/user
  391. ; in the ZCPR3 prompt.  If set to FALSE, the prompt appears as '>' (assuming
  392. ; > is the current value of CPRMPT).  If set to TRUE, the prompt appears
  393. ; as 'd>' or 'dn>'.  (see INCLNDR below)
  394. ;
  395. INCLDU    equ    TRUE 
  396.  
  397. ;
  398. ;    the following equate allows ZCPR3 to accept the DU: prefix or
  399. ; login form for input.  Set this to TRUE if DU: prefix is to be allowed.
  400. ;
  401. ;    setting this equate to TRUE allows the following forms:
  402. ;
  403. ;        a>b1:
  404. ;        a>type b4:file.txt
  405. ;        a>b:
  406. ;        a>1:
  407. ;
  408. ACCPTDU    EQU    TRUE 
  409.  
  410. ;
  411. ;    this equate enables ZCPR3 to process DIR: forms internally
  412. ; through the memory-based named directory buffer.  This equate and
  413. ; the NDBASE address should be TRUE (non-zero) in order to enable
  414. ; zcpr3 to process named directories.
  415. ;
  416. ;    if NDINCP is TRUE, the following forms are allowed:
  417. ;
  418. ;        a>root:
  419. ;        a>type text:file.txt
  420. ;
  421. ; if the other associated equates (below) are set correctly.
  422. ;
  423. NDINCP    EQU    FALSE 
  424.  
  425. ;
  426. ;    the following equate will cause the name of the current directory
  427. ; to be displayed as part of the prompt along with the DU form if enabled.
  428. ; (see INCLDU above)
  429. ;
  430. ;    for example, if INCLNDR is TRUE, the prompt would look like:
  431. ;
  432. ;        b7:text>    -- if INCLDU is also TRUE
  433. ;        text>        -- if INCLDU is FALSE
  434. ;
  435. INCLNDR    EQU    FALSE 
  436.  
  437. ;
  438. ;    the following equate allows ZCPR3 to accept the DIR: prefix or
  439. ; login form for input.  Set this to TRUE if DIR: prefix is to be allowed.
  440. ;
  441. ;    setting this equate to TRUE allows the following forms:
  442. ;
  443. ;        a>root:
  444. ;        a>type text:file.txt
  445. ;
  446. ACCPTND    EQU    FALSE 
  447.  
  448. ;
  449. ;    the following equate determines the hierarchy of DU:/DIR: evaluation.
  450. ; set this to TRUE if DU: is to be tested for before DIR: or set this to
  451. ; false if DIR: is to be tested for before DU:.  If this is FALSE, named
  452. ; directories like C: (standing for C work area - NOT disk C) are permitted.
  453. ;
  454. ;    assuming that a directory for C programs, named 'C', and a root
  455. ; directory, named 'ROOT', exist, then if DUFIRST is set to FALSE:
  456. ;
  457. ;        a>c:    -- logs the user into the directory named 'C'
  458. ;        a>root:    -- logs the user into the directory named 'ROOT'
  459. ;
  460. ; while if DUFIRST is set to TRUE:
  461. ;
  462. ;        a>c:    -- logs the user into disk C: (dir C can't be accessed)
  463. ;        a>root:    -- logs the user into the directory named 'ROOT'
  464. ;
  465. DUFIRST    EQU    TRUE
  466.  
  467. ;
  468. ;    enable password check on named directory references.  If a named
  469. ; directory is referenced and has a password associated with it, ZCPR3
  470. ; will ask the user for this password and approve the reference only
  471. ; if he gives a valid response.  One and only one try is permitted.
  472. ; setting this equate to TRUE will enable the password check facility.
  473. ;
  474. PWCHECK    EQU    FALSE
  475.  
  476.  
  477. ;
  478. ; 11. command line buffer control
  479. ;
  480. ;    the MULTCMD equate enables the feature of having more than
  481. ; one command on the same line, separated by a separation char
  482. ; which is defined by the CMDSEP equate.  If this feature is
  483. ; enabled, the command line buffer and buffer pointers are
  484. ; moved outside of ZCPR3 at the indicated address of Z3CL.
  485. ;
  486. ;    multcmd indicates if the ability to have more than one command
  487. ; on a line is to be enabled, and CMDSEP is the character used to separate
  488. ; these commands.  For example, if CMDSEP is ';' and MULTCMD is TRUE, then
  489. ; commands like this are possible:
  490. ;
  491. ;        era *.BAK;dir
  492. ;
  493.     IF    Z3CL NE 0
  494. MULTCMD    equ    TRUE 
  495.     ELSE
  496. MULTCMD    equ    FALSE
  497.     ENDIF
  498. CMDSEP    equ    ';'
  499.  
  500.  
  501. ;
  502. ; 12. cmdrun -- zcpr3 extended command processing facility
  503. ;
  504. ;    this equate enables the ZCPR3 CMDRUN facility.  If CMDRUN is TRUE, then
  505. ; another stage of command processing is invoked should ZCPR3 fail to find
  506. ; a COM file when the user gives a command.  This stage involves invoking
  507. ; the COM file specified by CMDFCB and giving it the current command line
  508. ; as an argument.  In this way, if, say, M80 PROG2 fails as a command,
  509. ; a new command like LRUNZ M80 PROG2, SUB M80 PROG2, or ZEX M80 PROG2 may
  510. ; be processed.  If the new command fails, an appropriate error message is
  511. ; given.
  512. ;
  513. ;    the ROOTONLY option causes ZCPR3 to only look at the Root (bottom of
  514. ; path) for the Extended Command Processor if it is set to TRUE.  If it
  515. ; is set to FALSE, the path is searched for the Extended Command Processor.
  516. ; the tradeoff here is that ROOTONLY = TRUE is less flexible but somewhat
  517. ; faster than ROOTONLY = FALSE.
  518. ;
  519. CMDRUN    equ    FALSE        ; enable the Facility
  520.  
  521.     if    CMDRUN
  522. ROOTONLY    equ    TRUE     ; true if look at Root Only for Extended
  523.                 ; command Processor, FALSE if look along
  524.                 ; path
  525. CMDFCB    MACRO
  526.     db    0
  527.     db    'CMDRUN  '    ;name of Program
  528.     db    'COM'        ;file Type
  529.     ENDM
  530.     endif    ;cmdrun
  531.  
  532.  
  533. ;
  534. ; 13. flow command facility
  535. ;
  536. ;    this equate enables ZCPR3 to respond to IF processing.
  537. ; zcpr3 simply flushes commands if a FALSE IF is currently engaged.
  538. ; fcps must be enabled for IFON to work correctly.
  539. ;
  540. IFON    EQU    FALSE
  541.  
  542.  
  543. ;
  544. ; 14. miscellaneous equates
  545. ;
  546. MAXUSR    EQU    31         ;maximum user number accessable
  547. MAXDISK    EQU    4        ;maximum number of disks accessable
  548.  
  549. SUPRES    EQU    FALSE         ;supresses user # report for user 0
  550.  
  551. SPRMPT    EQU    '$'        ;cpr prompt indicating submit command
  552. CPRMPT    EQU    '>'        ;cpr prompt indicating user command
  553.  
  554. NUMBASE    EQU    'H'        ;char used to switch from default number base
  555.  
  556. CURIND    EQU    '$'        ;symbol for current disk or user
  557.  
  558. COMMENT    EQU    ';'        ;lines beginning with this char are comments
  559.  
  560. ;
  561. ; end of zcpr3 customization section
  562. ;
  563.