5. S T E P   7 :   S Y S T E M   S E G M E N T S 

    Th� selectio� o� th� configuratio� option� fo� th� variou� �
System Segments of ZCPR3 is described here in some detail.


5.1. Resident Command Packages

    Th� followin� i� � reformatte� duplicat� o� th� bod� o� � �
SYSRCP.LI  file��  I� i� provide� her� t� presen� additiona� �
informatio� o� ho� t� se� th� equates��  I� ma� b� usefu� t� th� �
installe� t� hav� thi� installatio� manua� ope� t� thes� page� �
whil� h� i� editin� thi� file.

    Eac蠠 entr�� fo� th� residen� command� mention� thei� �
transien� progra� counterparts��  Thes� utilitie� usuall� provid� �
capabilitie� whic� excee� thos� o� th� program� i� th� Residen� �
Comman� Package� bu� th� tradeof� i� tha� eac� utilit� progra� i� �
� separat� fil� o� dis� whic� usuall� occupie� mor� dis� spac� �
tha� a� entir� RCP��  I� essence� th� RC� command� provid� quick� �
convenien� capabilitie� t� th� user�� an� th� transien� utilitie� �
provid� muc� greate� flexibilit� an� utilit� t� th� user��  I� �
mos� reasonabl� ZCPR� Systems� bot� facilitie� ar� available.



SYSTEM SEGMENT:  SYS1.RCP
SYSTEM:  ZCPR3
WRITTEN BY:  RICHARD CONN


PROGRAM HEADER:  SYSRCP.LIB
AUTHOR:  RICHARD CONN

    Thi� progra� heade� select� th� command� t� b� incorporate� �
int� SYS.RCP�  I� als� allow� selectio� o� som� option� fo� thes� �
commands.


IDENTIFICATION

    Th� followin� I� i� � singl� character�� displaye� a� � par� �
o� th� RC� ID� whic� distinguishe� thi� RC� fro� other� mad� fro� �
th� sam� bas� fil� (SYSRCP.ASM).

RCPID   EQU     'A'

    Wit� th� potentia� o� severa� RCP� bein� generate� fro� thi� �
on� file�� RCPI� i� usefu� i� identifyin� whic� RC� i� currentl� �
loade� t� th� user��  Th� � command� buil� int� ever� RCP� print� �
ou� th� versio� numbe� o� th� RCP� includin� th� RCPI� character� �
as well as the names of the commands contained within the RCP.

pa �
5.1.1. CP Command
    TRANSIENT COUNTERPART: MCOPY

    Th� followin� equat� determine� i� th� C� comman� i� mad� �
available�  Settin� thi� equat� t� TRU� enable� th� C� command.

    Th� CР comman� copie� on� fil� fro� on� D� t� anothe� o� �
int� th� sam� D� unde� � differen� name�  Th� synta� is:

               CP dir:ufn=dir:ufn

    Examples:
               CP f1.txt=f2.txt
               CP a15:=f1.txt
               CP a15:f2.txt=c5:f1.txt

CPON            EQU     TRUE


5.1.2. DIR Command
    TRANSIENT COUNTERPART: DIR, XD, XDIR

    Th� followin� equat� determine� i� th� DI� comman� i� mad� �
available�  Settin� thi� equat� t� TRU� enable� th� DI� command.

    Th堠 DIҠ comman� display� th� director�� o� file� i� �
alphabetica� orde� acros� th� line� t� th� user�  Th� synta� is:

               DIR dir:afn

    Examples:
               DIR b7:
               DIR root:*.com

DIRON           EQU     FALSE


    Th� DI� comman� allow� tw� options��  On� i� � fla� t� tel� �
i� t� loo� a� bot� Syste� an� Non-Syste� files�� an� th� othe� i� �
� fla� t� tel� i� t� loo� onl� a� Syste� files��  B� default� DI� �
look� a� Non-Syste� files.

    SYSFL� define� th� characte� use� t� instruc� DI� t� loo� a� �
bot� Syste� an� Non-Syste� files��  Th� recommende� valu� i� 'A� �
fo� All.

    SOFL� define� th� characte� use� t� instruc� DI� t� loo� a� �
onl� Syste� files�  Th� recommende� valu� i� 'S� fo� System.

SYSFLG          EQU     'A'
SOFLG           EQU     'S'

pa �
    Th� followin� equat� determine� i� th� director�� display� �
ar� sorte� b� filenam� an� filetyp� o� b� filetyp� an� filename�  �
Se� SORTNԠ t� TRU� t� sor� b� nam� an� type�� FALS� t� sor� b� �
typ� an� name.

SORTNT          EQU     TRUE


    Th� followin� equate� defin� som� feature� o� th� director� �
display��  I� WIDŠ i� TRUE�� th� fil� name� ar� space� farthe� �
abort�� i� WID� i� FALSE�� the� ar� close� togethe� (fo� � 64-�
colum� display)��  FENC� define� th� characte� use� t� separat� �
th� fil� nam� entrie� i� th� display.

WIDE            EQU     TRUE
FENCE           EQU     '|'


5.1.3. ERA Command
    TRANSIENT COUNTERPART: ERASE

    Th� followin� equat� determine� i� th� ER� comman� i� mad� �
available�  Settin� thi� equat� t� TRU� enable� th� ER� command.

    The ERA command erases files.  The syntax is:

               ERA dir:afn
or:
               ERA dir:afn I   -- Inspect

    Examples:
               ERA b7:*.bak
               ERA text:*.tmp i

ERAON           EQU     TRUE

pa �
5.1.4. LIST and TYPE Commands
    TRANSIENT COUNTERPART: PRINT and PAGE

    Th� followin� equat� determine� i� th� LISԠ an� TYP� �
command� ar� mad� available�  Settin� thi� equat� t� TRU� enable� �
thes� commands.

    Th� LISTOΠ equat� ca� disabl� th� LISԠ comman� withou� �
affectin� th� TYP� command.

    Th� TYP� comman� display� � grou� o� file� o� th� CR� whil� �
th� LIS� comman� print� � grou� o� file� o� th� Printer��  Th� �
synta� is:

               TYPE dir:afn  -or-  LIST dir:afn

    Examples:
               TYPE b7:*.asm
               LIST text:*.txt

LTON            EQU     TRUE
LISTON          EQU     TRUE


    TYP� ca� b� mad� t� pag� o� no� pag� b� default��  I� PGDFL� �
i� TRUE�� TYPРpage� b� defaul� an� doe� no� pag� i� th� PGFL� �
characte� (recommende� t� b� 'P'� i� used��  I� PGDFL� i� FALSE� �
TYPŠ page� onl� whe� th� PGDFL� characte� i� see� i� th� comman� �
line.

PGDFLT          EQU     TRUE
PGDFLG          EQU     'P'


    NLINE� define� th� numbe� o� line� o� th� user'� CR� screen�  �
Thi� i� usuall� 24.

NLINES          EQU     24


pa �
5.1.5. PEEK and POKE Commands
    TRANSIENT COUNTERPART: None (Subset of DDT)

    Th� followin� equate� determin� i� th� PEEˠ an� POK� �
command� ar� mad� available��  Settin� thes� equate� t� TRU� �
enable� thes� commands.

    Th� PEEˠ comman� allow� th� use� t� examin� � chun� o� �
memory��  I� th� use� simpl� type� "P� wit� n� address�� th� nex� �
25�� byte� o� memor�� ar� displayed��  I� th� use� type� "� �
address"�� 25� byte� o� memor� startin� a� th� indicate� addres� �
ar� displayed�  I� th� use� type� "� addr� addr2"� memor� i� thi� �
addres� rang� i� displayed�  Th� syntax:

               P
or:
               P address
or:
               P addr1 addr2

    Th� POK� comman� allow� th� use� t� chang� th� conten� o� �
memory��  Th� use� mus� specif� a� addres� t� POKE� an� tw� basi� �
form� ar� allowed:

               POKE address val1 val2 ... valn
and:
               POKE address "character string
Th� tw� form� ma�� b� intermixe� wit� leadin� value� an� � �
trailin� characte� string:
               POKE address val1 val2 ... valn "character string

    Examples:
               P
               P f400
               P f400 f425
               POKE f400 0 1 2
               POKE f400 "this is a test
               POKE f400 1 2 3 "hello, world

PEEKON          EQU     TRUE
POKEON          EQU     TRUE

pa �
5.1.6. PROT Command
    TRANSIENT COUNTERPART: PROTECT

    Th� followin� equat� determine� i� th� PRO� comman� i� mad� �
available�  Settin� thi� equat� t� TRU� enable� th� PRO� command.

    Th� PRO� comman� set� th� fil� protectio� attribute� fo� � �
grou� o� files��  Th� R/� an� Syste� attribute� ma� b� se� wit� �
th� � an� � options�� resp�� give� i� an� orde� a� "RS� o� "SR"�  �
Omissio� o� on� o� thes� option� toggle� th� opposit� (ie� �
omissio� o� � make� th� file� R/W)�  Th� syntax:

               PROT dir:afn
or:
               PROT dir:afn R
or:
               PROT dir:afn S
or:
               PROT dir:afn RS  -or-  PROT dir:afn SR

    Examples:
               PROT b7:*.com rs
               PROT text:*.txt

PROTON          EQU     TRUE


5.1.7. REN Command
    TRANSIENT COUNTERPART: RENAME

    Th� followin� equat� determine� i� th� RE� comman� i� mad� �
available�  Settin� thi� equat� t� TRU� enable� th� RE� command.

    Th� REΠ comman� change� th� nam� o� on� fil� t� another�  �
Th� syntax:

               REN dir:ufn1=ufn2

    Examples:
               REN newfile.txt=oldfile.txt
               REN root:sys.rcp=sys1.rcp

RENON           EQU     TRUE

pa �
5.1.8. REG Command
    TRANSIENT COUNTERPART: REG

    Th� followin� equat� determine� i� th� RE� comman� i� mad� �
available�  Settin� thi� equat� t� TRU� enable� th� RE� command.

       The REG command forms are:
               REG D or REG    = display values of all registers
               REG Mreg        = subtract 1 from register (Minus)
               REG Preg        = add 1 to register (Plus)
               REG Sreg value  = set value of indicated register

    � registe� i� � ZCPR� registe� buffer�� indicate� b� � digi� �
fro� � t� 9.

    Examples:
               REG S0 4        -- reg 0 = 4
               REG S5          -- reg 5 = 0
               REG P           -- reg 0 = reg 0 + 1
               REG P5          -- reg 5 = reg 5 + 1
               REG M9          -- reg 9 = reg 9 - 1
               REG D           -- show values
               REG             -- show values

REGON           EQU     FALSE



5.1.9. WHL Command
    TRANSIENT COUNTERPART: WHEEL

    Th� followin� equat� determine� i� th� WH� comman� i� mad� �
available�  Settin� thi� equat� t� TRU� enable� th� WH� command.

    Th� WH� comman� i� use� t� tur� of� th� Whee� Byt� (mak� th� �
use� non-priveleged� o� t� tur� o� th� Whee� Byt� (mak� th� use� �
priveleged)�  Th� synta� is:

               WHL             -- make user non-priveleged
or:
               WHL password    -- make user priveleged

    Also�� thi� equat� enable� th� WHL� command�� whic� display� �
th� stat� o� th� Whee� Byte�  Th� synta� is:

               WHLQ

    Examples:
               WHL
               WHL mypass
               WHLQ

WHLON           EQU     FALSE

    Th� followin� equat� define� th� passwor� t� b� use� b� th� �
WH̠ command��  I� mus� alway� b� � byte� lon� (trailin� space� �
allowed� an� mus� b� upper-case.

WPASS   MACRO
       DB      'SYSTEM  '      ;8 characters
       ENDM


    Th� Whee� equat� tabl� enable� th� WHEE� facilit� o� ZCPR3�  �
Wit� thi� facility�� � WHEE� BYTE�� whic� exist� somewher� i� �
memory�� i� examine� befor� � se� o� installer-selecte� command� �
ar� executed��  I� thi� byt� i� no� zero�� the� th� comman� �
proceeds��  I� i� i� zero�� the� th� comman� i� no� allowe� t� �
procee� an� i� exite� wit� a� erro� message.

    Th� followin� se� o� equate� mak� eac� o� th� indicate� �
command� selectabl� t� respon� t� th� Whee� Byt� o� not��  Fo� �
instance�� i� WERA=TRUE�� the� i� respond� t� th� Whee� Byte�� i� �
WERA=FALSE� i� doe� not.

    Thes� option� wil� onl� b� effectiv� i� � Whee� Byt� i� �
Define� (Z3WH� N� 0)

WCP     equ     FALSE   ;Make CP   a Wheel-Oriented Command
WDIR    equ     FALSE   ; "   DIR  "  "       "       "
WERA    equ     FALSE   ; "   ERA  "  "       "       "
WLIST   equ     FALSE   ; "   LIST "  "       "       "
WPEEK   equ     FALSE   ; "   PEEK "  "       "       "
WPOKE   equ     FALSE   ; "   POKE "  "       "       "
WPROT   equ     FALSE   ; "   PROT "  "       "       "
WREG    equ     FALSE   ; "   REG  "  "       "       "
WREN    equ     FALSE   ; "   REN  "  "       "       "
WTYPE   equ     FALSE   ; "   TYPE "  "       "       "

WHEEL   set     WCP OR WDIR OR WERA OR WLIST OR WPEEK OR WPOKE
WHEEL   set     WHEEL OR WPROT OR WREG OR WREN OR WTYPE


pa �
5.1.10. NOTE Command
    TRANSIENT COUNTERPART: NOTE

    NOTŠ i� simpl� � NO� (d� nothing� comman� whic� ca� b� use� �
t� plac� comment� int� multipl� comman� lines��  Fo� instance� i� �
th� followin� line:

               dir *.com;note this is a dir display;era *.bak

th� DI� an� ER� command� perfor� normally�� an� NOT� simpl�� doe� �
nothin� ver� efficiently.

    Settin� th� followin� equat� t� TRUŠ enable� th� NOT� �
Command.

NOTEON  EQU     TRUE

    Th� NOTŠ comman� i� ver� convenien� i� th� creatio� o� �
commente䠠 display� an� comman� files���  I� i� generall� �
recommende� t� implemen� thi� comman� a� � residen� comman� �
withi� th� ZCPR� Comman� Processo� itsel� rathe� tha� withi� a� �
RCР sinc� th� ZCPR� Comman� Processor� ten� t� hav� mor� roo� t� �
spar� tha� RCP� an� i� i� frequentl� desirabl� t� sav� a� muc� �
space within an RCP as possible.


5.1.11. ECHO Command
    TRANSIENT COUNTERPART: ECHO

    The following equate enables the ECHO command.

    ECHϠ i� usefu� i� issuin� bot� message� (t� th� user�� sa� �
withi� � comman� fil� durin� execution� an� escap� sequences�  �
ECHϠ ca� sen� it� outpu� t� th� consol� (b� default� o� t� th� �
printe� (i� th� firs� non-blan� characte� i� � dolla� sign)��  I� �
use� BIO� calls�� s� al� contro� character� ar� passe� exactly�  �
Hence�� console-leve� programmin� o� suc� device� (CRT� an� �
Printers� i� possible.

    Th� ECHOLS� equat� determine� i� ECH� i� allowe� t� direc� �
it� outpu� t� th� printer��  I� ECHOLS� i� TRUE�� ECH� ma� direc� �
it� outpu� t� th� printe� vi� th� � prefi� characte� i� th� text.

ECHOON  EQU     TRUE
ECHOLST EQU     TRUE


    Th� ECH� transien� i� no� ver� large�� an� i� i� frequentl� �
mor� convenien� t� hav� ECH� implemente� i� a� RCP��  However� �
sinc� spac� withi� RCP� i� frequentl� a� � premium�� i� ma�� b� �
necessar� t� emplo� th� ECH� transient.

pa �
5.2. Flow Command Packages

    Th� followin� i� � reformatte� duplicat� o� th� bod� o� � �
SYSFCP.LI  file��  I� i� provide� her� t� presen� additiona� �
informatio� o� ho� t� se� th� equates��  I� ma� b� usefu� t� th� �
installe� t� hav� thi� installatio� manua� ope� t� thes� page� �
whil� h� i� editin� thi� file.

    � ke� decisio� t� b� mad� i� th� creatio� o� FCP� i� whethe� �
t� implemen� th� I� comman� a� � CO� fil� o� withi� th� FC� �
itself.  The following tradeoff should be considered:

         1�� A� � CO� file�� th� I� comman� offer� man�� mor� �
option� an� flexibilit� fo� conditio� processin� tha� a� FCP-�
resident IF.

         2�� A� � CO� file�� th� I� comman� add� overhea� b� �
having to be located and loaded from disk and then executed.

    I� th� followin� text�� section� 5.2.� t� 5.2.1�� describ� �
option� fo� a� FCP-residen� I� command��  IF.CO� contain� al� o� �
thes� option� an� more��  Refe� t� th� associate� HL� fil� fo� �
mor� detail.


SYSTEM SEGMENT:  SYS1.FCP
SYSTEM:  ZCPR3
CUSTOMIZED BY:  RICHARD CONN

PROGRAM HEADER:  SYSFCP.LIB
AUTHOR:  RICHARD CONN


    Thi� progra� heade� define� th� I� Condition� t� b� place� �
int th堠 targe� SYS.FCР fil� (generate䠠 b��� assemblin� �
SYSFCP.ASM).



5.2.1. IF Negation

    Th� followin� equat� determine� i� leadin� negatio� i� t� b� �
allowed��  I� thi� equat� i� TRUE�� the� form� lik� th� followin� �
ar� permitted:
               IF ~EXIST filename.typ

meanin� t� complemen� th� meanin� o� th� tes� (th� abov� return� �
TRU� i� filename.ty� doe� NO� exist).

IFONEG          EQU     TRUE

pa �
    Assumin� IFONE� t� b� TRUE� th� followin� equat� define� th� �
characte� t� b� place� i� fron� o� th� I� optio� t� indicat� tha� �
negatio� i� t� b� performed��  I� th� abov� example�� thi� �
characte� wa� tild� (~).

NEGCHAR         EQU     '~'


5.2.2. IF:  T (True) or F (False)

    Settin� th� followin� equat� t� TRU� enable� th� simpl� � �
an� � option� t� IF�  Th� forma� o� thi� optio� is:

               IF T or IF F

and it always returns TRUE or FALSE, resp.

IFOTRUE         EQU     FALSE



5.2.3. IF:  EM (Empty)

    Settin� th� followin� equat� t� TRU� enable� I� t� tes� t� �
se� i� th� indicate� fil� i� empt� o� not��  Th� forma� o� thi� �
optio� is:
               IF EM dir:filename.typ

an� i� return� TRU� i� th� indicate� fil� doe� no� exis� o� i� �
empty.

IFOEMPTY        EQU     FALSE



5.2.4. IF:  ER (Error)

    Settin� th� followin� equat� t� TRU� enable� I� t� tes� th� �
erro� cod� byt� (progra� erro� cod� byte)�  I� thi� byt� i� � (n� �
error)�� i� return� TRUE�� els� i� return� FALSE��  Th� forma� o� �
thi� optio� is:
               IF ER

IFOERROR        EQU     TRUE


pa �
5.2.5. IF:  EX (Exist)

    Settin� th� followin� equat� t� TRU� enable� I� t� tes� fo� �
th� existenc� o� � file�  Th� forma� o� thi� optio� is:

               IF EX dir:filename.typ

and it returns TRUE if the indicated file exists.

IFOEXIST        EQU     TRUE


5.2.6. IF:  IN (Input)

    Settin� th� followin� equat� t� TRU� enable� use� inpu� o� �
th� characte� Ԡ (o� an�� othe� characte� fo� FALSE)��  ZE� �
processin� i� suspende� fo� thi� single-characte� input��  Th� �
forma� o� thi� optio� is:

               IF IN

and the IF FCP command responds with:

               IF True?

t� whic� th� use� type� T�� Y� SPACE� o� C� t� se� th� I� t� TRU� �
an� anythin� els� t� se� th� I� t� FALSE.

IFOINPUT        EQU     TRUE



5.2.7. IF:  NU (Null)

    Settin� th� followin� equat� t� TRU� enable� I� t� tes� t� �
se� i� th� secon� argumen� whic� follow� i� NUL� (no� specified� �
o� not��  Thi� tes� i� particularl�
usefu� i� comman� fil� �
processin� t� se� if�� fo� example�� argumen� $� exist� an� t� �
includ� i� i� i� does�  Th� forma� o� thi� optio� is:

               IF NU
or:
               IF NU arg

    I� th� firs� forma� i� encountered�� I� N� return� TRUE�� I� �
N� return� FALS� wit� th� secon� format.

IFONULL         EQU     TRUE


pa �
5.2.8. IF:  n (Register Value)

    Settin� th� followin� equat� t� TRU� enable� I� t� tes� t� �
se� i� th� indicate� registe� contain� th� indicate� value��  I� �
thi� i� preceede� b� th� NEGCHA� an� IFONE� i� TRUE�� the� thi� �
test� t� se� i� th� indicate� registe� doe� no� contai� th� �
indicate� value��  Register� ar� one-byt� memor� buffers� an� ar� �
identifie� b� th� digit� � t� 9�  Th� forma� o� thi� optio� is:

               IF n val

    Example:
               IF 0            -- if Reg 0 = 0
               IF 0 5          -- if Reg 0 = 5
               IF 5 2          -- if Reg 5 = 2
               IF ~0           -- if Reg 0 <> 0
               IF ~9 2         -- if Reg 9 <> 2

IFOREG          EQU     TRUE


    Th� RE� comman� (implemente� eithe� withi� a� RC� o� a� � �
CO͠ file� i� use� t� plac� value� int� thes� registe� an� modif� �
an� displa� thes� values.



5.2.9. IF:  WH (Wheel)

    Settin� th� followin� equat� t� TRU� enable� I� t� tes� t� �
se� i� th� Whee� Byt� i� se� o� not�  I� so� I� WHEE� i� TRUE.

IFOWHEEL        EQU     FALSE



5.2.10. IF:  TC (TCAP)

    Settin� th� followin� equat� t� TRU� enable� I� t� tes� t� �
se� i� th� ZCPR� TCA� contain� � termina� definitio� o� not�  �
Thi� tes� i� particularl�� usefu� i� comman� fil� o� alia� �
processin� t� se� if�� fo� example� � Z3TCA� entr� i� define� an� �
t� invok� screen-oriente� routine� i� i� is��  Th� forma� o� thi� �
optio� is:

               IF TC

IFOTCAP         EQU     FALSE


pa �
5.2.11. IF:  fcb1=fcb2

    Settin� thi� equat� t� TRU� wil� enabl� I� t� evaluat� th� �
equalit� condition�� checkin� t� se� i� th� tw� FCB� contai� th� �
sam� values�  I� so� th� I� i� TRUE� i� not� th� I� i� FALSE.

    Enablin� thi� equat� eliminate� th� nee� fo� th� NUL� test� �
sinc� � NUL� tes� ca� b� performe� b� usin� th� syntax:

               IF fcb1=

IFOEQ           EQU     TRUE



5.2.12. COMIF - Run IF.COM

    Settin� thi� equat� t� TRU� wil� caus� a� I� execute� durin� �
a� I� TRU� o� N� I� stat� t� loo� i� th� ROO� director� (bas� o� �
pat� startin� i� curren� directory� fo� th� fil� IF.COM�� and� i� �
found�� loa� IF.CO� an� transfe� contro� t� it�  I� IF.CO� i� no� �
found�� the� I� � i� raised��  Usin� IF.CO� provide� muc� mor� �
powe� an� flexibilit� bu� als� require� IF.CO� t� b� presen� an� �
take� u� dis� space.

COMIF           EQU     FALSE



5.2.13. NOISE - Have FCP Print IF Status Messages

    Settin� thi� equat� t� TRU� wil� caus� an� chang� i� th� I� �
statu� t� b� printe� t� th� user��  Thi� i� usefu� fo� debuggin� �
purposes�� bu� i� norma� runs�� particularl� wher� ALIASe� ar� �
concerned�� i� i� usuall� desirabl� t� reduc� th� "noise� a� muc� �
a� possibl� an� hav� thi� equat� se� t� FALSE.

NOISE           EQU     FALSE


pa �
5.3. Input/Output Packages

    Input/Outpu� Package� ar� ver� machine-specific�� but�� lik� �
al� packages� the� provid� � machine-independen� interfac� t� th� �
ZCPR� Syste� i� thei� visibl� sections�  Th� hidde� par� perform� �
th� actua� implementatio� o� th� routines�  Lik� th� structur� o� �
th� BIOS� th� visibl� sectio� o� a� I/� Packag� consist� o� � JM� �
table.

    Th堠 installe� wh i� intereste䠠 i incorporatin� �
Input/Outpu� Package� int� th� syste� h� i� installin� i� �
referre� t� th� sourc� cod� fil� SYSIOP.ASM��  SYSIOP.AS� ca� b� �
use� a� � templat� throug� whic� t� creat� othe� I/Ϡ Packages�  �
I� i� fille� wit� comment� outlinin� th� function� bein� �
performed� an� � fee� tha� thi� shoul� b� adequate.



5.4. Named Directory Files

    Th� followin� i� � reformatte� duplicat� o� th� bod�� o� � �
SYSNDR.LI  file��  I� i� provide� her� t� presen� additiona� �
informatio� o� ho� t� se� th� equates��  I� ma� b� usefu� t� th� �
installe� t� hav� thi� installatio� manua� ope� t� thes� page� �
whil� h� i� editin� thi� file.


DATA FILE:  SYSNDR.LIB
AUTHOR:  Richard Conn
VERSION:  1.0
DATE:  24 Feb 84


    SYSNDR.LI  define� th� structur� o� th� memory-base� name� �
directory�  I� als� define� � fe� element� fo� i� an� i� suitabl� �
fo� enclosur� i� a� ND� file.

    The general structure is:

               DB      Disk,User       ; A=1
               DB      'NDIRNAME'      ; 8 chars
               DB      'PASSWORD'      ; 8 chars
               ...                     ; other entries
               DB      0               ; End of NDR

defdu   macro   ?disk,?user
       db      ?disk-'@'               ; Convert Disk
       db      ?user                   ; User is OK
       endm

                   FIG 5-1: Named Directory Structure
pa �
    Th� entir� fil� i� implemente� a� on� macr� (whic� follows)�  �
The SYSNDR.ASM file simply refers to this macro and expands it.

    Th� name� directorie� show� belo� ar� recommende� standards�  �
I� time�� ther� wil� b� utilitie� whic� bas� � par� o� thei� �
operations on these names.


sysndr  macro

    Th� BASŠ director� i� � workin� scratc� are� o� th� firs� �
disk.

       defdu   'A',0
       db      'BASE    '
       db      '        '


    Th� ROO� director� i� th� las� director� reference� i� th� �
Comman� Searc� Path��  Thi� i� wher� al� o� th� general-purpos� �
COM files are located.

       defdu   'A',15
       db      'ROOT    '
       db      '        '


    Th� HEL� director� i� wher� th� onlin� documentatio� file� �
are stored.

       defdu   'A',16
       db      'HELP    '
       db      '        '


    Th� BACKUР director�� i� wher� file� ar� copie� t� (b� �
default) for backup purposes.

       defdu   'C',0
       db      'BACKUP  '
       db      '        '

       db      0               ;End of List
       endm


pa �
5.5. TCAP Files

    Th� program� TCSELECԠ an� TCMAK� ar� use� t� creat� th� �
*.Z3� file� whic� ar� loade� b� th� LDR.CO� utility��  Th� loade� �
fil� establishe� th� characteristic� o� th� user'� CRԠ terminal� �
an� thi� informatio� i� use� b� screen-oriente� utilities�� suc� �
as SHOW, to perform their functions.


5.6. Environment Descriptor

    Th� followin� i� � reformatte� duplicat� o� th� bod�� o� � �
SYSENV.LI  file��  I� i� provide� her� t� presen� additiona� �
informatio� o� ho� t� se� th� equates��  I� ma� b� usefu� t� th� �
installe� t� hav� thi� installatio� manua� ope� t� thes� page� �
whil� h� i� editin� thi� file.


    Th� entir� fil� i� on� macr� whic� i� reference� b� �
SYSENV.ASM��  SYSEN� insert� � JM� � instructio� i� fron� o� thi� �
macro to complete the structure of the SYS.ENV file.



LIBRARY:  SYSENV.LIB
AUTHOR:  Richard Conn
Version:  1.0
Date:  18 May 84
Previous Versions:  None


    SYSENV is the definition for my ZCPR3 environment.


sysenv  macro
;
;  Environment Descriptor
;       If inline, there is a leading JMP just before this
;
envorg1:
       db      'Z3ENV'         ; Environment ID
       db      1               ; class 1 environment (external)

    �� Clas� � environmen� i� externa� t� th� utilit� usin� it�  �
Thi� typ� o� Environmen� Descripto� i� locate� a� � buffe� �
somewher� i� memory�� an� th� ZCPR� utilitie� simpl� contai� � 2-�
byt� pointe� whic� contain� it� address��  � Clas� � environmen� �
i� interna� t� th� utilit� usin� it��  Thi� typ� o� Environmen� �
Descripto� i� locate� withi� th� utilit� itself�� takin� u� 25� �
bytes��  I� i� recommende� tha� th� ZCPR� Syste� b� configure� �
usin� a� externa� Environmen� Descriptor.

pa �
    Th� followin� addresse� an� value� ar� extracte� fro� �
Z3BASE.LIB.

       dw      expath          ; external path address
       db      expaths         ; number of 2-byte elements in path

       dw      rcp             ; RCP address
       db      rcps            ; number of 128-byte blocks in RCP

       dw      iop             ; IOP address
       db      iops            ; number of 128-byte blocks in IOP

       dw      fcp             ; FCP address
       db      fcps            ; number of 128-byte blocks in FCP

       dw      z3ndir          ; NDR address
       db      z3ndirs         ; number of 18-byte entries in NDR

       dw      z3cl            ; ZCPR3 Command Line
       db      z3cls           ; number of bytes in Command Line

       dw      z3env           ; ZCPR3 Environment Descriptor
       db      z3envs          ; number of 128-byte blocks

       dw      shstk           ; Shell Stack address
       db      shstks          ; number of shsize-byte entires
       db      shsize          ; size of a Shell Stack entry

       dw      z3msg           ; ZCPR3 Message buffer

       dw      extfcb          ; ZCPR3 External FCB

       dw      extstk          ; ZCPR3 External Stack


    Th� followin� fla� i� use� b� som� ZCPR� Syste� utilitie� t� �
determin� ho�� verbos� the�� ar� i� providin� message� an� �
informatio� t� th� user��  Th� QUIET.CO� utilit� ca� b� use� t� �
change this flag dynamically.

       db      0               ; quiet flag (1=quiet, 0=not quiet)

       dw      z3whl           ; address of Wheel Byte

    This data value is used by the timing routines.

       db      4               ; Processor Speed in MHz

    Th� followin� value� shoul� correspon� t� thos� selecte� i� �
the Z3HDR.LIB file.

       db      'D'-'@'         ; maximum disk
       db      31              ; maximum user
pa �
    Th� followin� valu� i� use� t� instruc� th� utilitie� a� t� �
whethe� the� shoul� accep� th� D� for� o� not��  I� disable� (se� �
t� 0)�� th� onl� wa� t� referenc� � director� i� wit� th� DI� �
(named�� form�� an� passwor� protectio� i� directl�� provide� b� �
this.

       db      1               ; 1=OK to accept DU, 0=not OK


    Som� ZCPR�� utilities��� suc� a� PRINԠ an� PAGE��� dra� �
informatio fro� thes� buffer� t� determin� severa젠 ke� �
attribute� o� th� device� the� ar� dealin� with��  Th� CPSE� �
utilit�� ca� b� use� t� dynamicall� chang� th� CRԠ an� Printe� �
selections.

       db      0               ; CRT selection (0=CRT 0, 1=CRT 1)
       db      0               ; Printer selection (n=Printer n)

       db      80              ; width of CRT 0
       db      24              ; number of lines on CRT 0
       db      22              ; number of lines of text on CRT 0

       db      132             ; width of CRT 1
       db      24              ; number of lines on CRT 1
       db      22              ; number of lines of text on CRT 1

       db      80              ; width of Printer 0
       db      66              ; number of lines on Printer 0
       db      58              ; number of lines of text on Printer 0
       db      1               ; form feed flag (0=can't formfeed, 1=can)

       db      102             ; width of Printer 1
       db      66              ; number of lines on Printer 1
       db      58              ; number of lines of text on Printer 1
       db      1               ; form feed flag (0=can't formfeed, 1=can)

       db      80              ; width of Printer 2
       db      66              ; number of lines on Printer 2
       db      58              ; number of lines of text on Printer 2
       db      0               ; form feed flag (0=can't formfeed, 1=can)

       db      102             ; width of Printer 3
       db      66              ; number of lines on Printer 3
       db      58              ; number of lines of text on Printer 3
       db      0               ; form feed flag (0=can't formfeed, 1=can)

pa �
    Th� ZCPR� shel� name� S� ca� dea� wit� symbol� (variables� �
whic� ar� assigne� tex� string� a� values��  Thi� buffe� define� �
th� nam� o� th� fil� whic� program� lik� S� refe� t� i� orde� t� �
resolv� variabl� references��  A� man� shel� variabl� file� a� �
desired may be available in this fashion.

       db      'SH      '      ; shell variable filename
       db      'VAR'           ; shell variable filetype


    Thes� buffer� ar� availabl� t� stor� fil� name� an� othe� �
dat� whic� ar� passe� fro� on� utilit� t� anothe� whic� i� �
execute� later�  I� general� entrie� � an� � ar� availabl� t� th� �
ZCPR� utilit� programme� a� general-purpos� buffers��  Entrie� � �
and 2 are used by some ZCPR3 System utilities at this time.

       db      '        '      ; filename 1
       db      '   '           ; filetype 1

       db      '        '      ; filename 2
       db      '   '           ; filetype 2

       db      '        '      ; filename 3
       db      '   '           ; filetype 3

       db      '        '      ; filename 4
       db      '   '           ; filetype 4

       ds      80H-($-envorg1+3)       ; make exactly 80H bytes long
                                       ; (+3 compensates for leading JMP)
pa �
    Th� followin� i� th� TCA� entr� fo� th� TV� 950�  I� LDR.CO� �
load� � *.Z3Ԡ file�� thi� buffe� wil� b� overlai� (i� th� �
Environment Descriptor is External).

;
; Terminal Capabilities Data
;
envorg2:
       DB      'TVI 950         '      ;Name of Terminal
       DB      'K'-'@'                 ;Cursor UP
       DB      'V'-'@'                 ;Cursor DOWN
       DB      'L'-'@'                 ;Cursor RIGHT
       DB      'H'-'@'                 ;Cursor LEFT
       DB      00                      ;CL Delay
       DB      00                      ;CM Delay
       DB      00                      ;CE Delay
       DB      1bh,'*',0               ;CL String
       DB      1bh,'=%+ %+ ',0         ;CM String
       DB      1bh,'t',0               ;CE String
       DB      1bh,')',0               ;SO String
       DB      1bh,'(',0               ;SE String
       DB      0                       ;TI String
       DB      0                       ;TE String

       ds      80H-($-envorg2)         ; make exactly 80H bytes long

;
;  End of Environment Descriptor
;
       endm