2. S T E P   1 :   S E L E C T I N G   t h e   F E A T U R E S 



2.1. Features of ZCPR3

    Th� installe� mus� firs� decid� wha� feature� th� ZCPR� �
Syste� i� t� include� an� hi� choice� ar�:

         1�� Standar� Overhea� -- I� th� ZCPR� Syste� t� includ� �
th� standar� 1� overhea� o� not��  I� not�� whic� part� o� th� �
Standard Overhead are to be included?

         2�� Flo�� Comman� Packag� -- I� th� Syste� t� includ� �
Flo� Command� o� not?

         3� Input/Outpu� Packag� -- I� th� Syste� t� includ� I/� �
Package� o� not?

         4� Residen� Comman� Packag� -- I� th� Syste� t� includ� �
Residen� Command� o� not?


    Beyon� thes� basi� decisions�� th� content� o� th� followin� �
configuratio� file� hav� t� b� determined:

         1) Z3BASE.LIB -- Base Addresses for the System

         2�� Z3HDR.LI  -- Configuratio� Option� fo� th� ZCPR� �
Command Processor

         3�� SYSFCP.LI  -- Configuratio� Option� fo� th� Flo� �
Command Packages (only if this feature is selected)

         4� SYSRCP.LI� -- Configuratio� Option� fo� th� Residen� �
Comman� Package� (onl� i� thi� featur� i� selected)


2.2. Standard Overhead

    Th� Standar� Overhead�� o� � ZCPR� Syste� consist� o� al� �
buffers above 0F400H in Fig 1-3.  These buffers contain:

         1) External Stack
         2) Command Line Buffer
         3) Memory-Based Named Directory
         4) External File Control Block
         5) Message Buffers
         6) Shell Stack
         7) Environment Descriptor

pa �
    Th� tradeof� analysi� o� whethe� t� includ� thes� buffer� o� �
no� follows�  A� � genera� recommendation� th� feature� supporte� �
b� thes� buffer� ar� fundamenta� t� b� basi� natur� o� ZCPR�� an� �
i� i� highl� recommende� tha� al� o� th� Standar� Overhea� b� �
included.  The cost of doing this is 1K bytes.


2.2.1. External Stack

    Th� Externa� Stack� occupie� 4� bytes�� an� it� purpos� i� �
two-fold��  (1�� t� fre� u� thi� spac� withi� th� ZCPR�� Comman� �
Processo� fo� othe� purpose� an� (2� t� provid� � commo� stac� �
whic� ca� b� easil� accesse� b� th� ZCPR� utilitie� t� restor� �
syste� integrit� whe� required.

    Initialization��  Th� externa� stac� nee� no� b� initialize� �
befor� use.


2.2.2. Command Line Buffer

    Th� Comman� Lin� Buffer� occupie� jus� ove� 20� bytes� an� i� �
i� instrumenta� t� man� function� o� th� ZCPR�� System��  It� �
purpos� i� t� stor� th� comman� lin� inpu� b� th� use� fro� hi� �
terminal� b� a� executin� SUBMI� file� o� b� � ZCPR� utilit� suc� �
a� ALIA� o� MENU�  I� thi� buffe� i� no� supporte� externall� (a� �
recommended)�� the� spac� wil� b� take� u� insid� o� th� ZCPR� �
Comman� Processo� fo� it��  I� mad� externa� t� th� ZCPR� comman� �
processor�� thi� buffe� provide� � mechanis� t� implemen� th� �
followin� capabilities:

         1) multiple commands on a single line, like:
              DIR;ERA *.BAK;DIR

         2) certain useful front-ends, such as MENU

         3) the ALIAS feature

    Initialization�  Th� Comman� Lin� Buffe� MUS� b� initialize� �
befor� i� i� used��  Th� firs� tim� thi� buffe� i� use� i� th� �
firs� tim� th� ZCPR� Comman� Processo� i� executed�� s� thi� �
initializatio� MUSԠ b� don� durin� (o� before�� i� som� rar� �
cases� th� col� boo� procedur� i� th� BIOS.


2.2.3. Memory-Based Named Directory

    Th� Memory-Base� Name� Directory� (25� bytes� contain� th� �
name-Dՠ assignment� fo� th� name� directorie� know� t� th� �
system��  25�� byte� i� th� recommende� size�� bu� thi� coul� b� �
extende� i� mor� name� ar� desired�  Eac� nam� require� 1� bytes� �
s� 1� name� ca� b� define� i� th� example��  Thi� feature�� whil� �
i� find� immediat� applicatio� o� � har� dis� system�� i� als� �
convenien� o� � floppy-base� system� an� i� cost� little. �
    Initialization���  I� i� generall�� recommende� tha� th� �
Memory-Base� Name� Director� buffe� b� initialize� durin� col� �
boot�� bu� thi� i� no� mandatory�  I� th� ZCPR� comman� processo� �
i� se� u� t� giv� precedenc� t� th� D� for� ove� th� DIҠ form� �
the� thi� director� buffe� ma� b� initialize� b� � STARTU� alia� �
(th� comman� "STARTUP� i� store� i� th� Comman� Lin� Buffe� a� � �
col� boo� command)�  STARTU� ma� the� ru� LDR� whic� wil� loa� a� �
ND� (Name� Directory� file��  A� wit� th� Comman� Lin� buffer� i� �
i� importan� t� remembe� tha� th� Memory-Base� Name� Director� �
buffer must be initialized before it is used.


2.2.4. External File Control Block

    Th� Externa� Fil� Contro� Block� occupie� onl� 3� byte� (4� �
byte� wer� reserve� fo� i� i� th� example)�� an� it� purpos� i� �
two-fold��  (1�� t� fre� u� spac� insid� o� th� ZCPR�� Comman� �
Processo� an� (2� t� provid� � mechanis� b� whic� � utilit�� ca� �
determin� th� nam� i� wa� invoke� by��  Th� ZCPR�� Comman� �
Processo� store� th� nam� o� th� comman� i� jus� parse� int� thi� �
buffe� s� tha� th� comman� ca� rea� i� an� us� it��  Shell� �
commonl� us� thi� featur� t� determin� th� nam� the� wer� invoke� �
under so they can set themselves up to be reexecuted.

    Initialization��  N� initializatio� i� require� fo� th� �
External File Control Block.


2.2.5. Message Buffers

    Th� Messag� Buffers� o� ZCPR� occup� onl� 8� bytes�� an� the� �
ar� ver�� importan� a� � mechanis� thr�� whic� th� followin� �
operation� ca� b� performed��  (1� ZCPR� ca� leav� message� abou� �
it� statu� whic� ca� b� rea� b� utilitie� execute� b�� it�� (2� �
program� ca� leav� message� t� ZCPR� t� giv� i� instruction� o� �
ho�� t� perfor� certai� operations�� suc� a� erro� handlin� an� �
shel� execution�� an� (3� on� progra� ca� leav� � messag� t� b� �
read and interpreted by another program which is executed later.

    I� canno� b� emphasize� enoug� tha� th� ZCPR�� Messag� �
Buffer� ar� MOS� importan� fo� th� operatio� o� th� syste� an� �
should be included as a feature.

    Initialization��  Lik� th� Comman� Lin� buffer�� th� Messag� �
Buffer� mus� b� initialize� befor� the� ar� used�� an� th� ZCPR� �
Comman� Processo� begin� usin� th� Messag� Buffer� immediatel� �
after cold boot.


pa �
2.2.6. Shell Stack

    Th� Shel� Stack� permit� th� shel� featur� o� ZCPR�� t� b� �
implemented�� cost� onl� 12� bytes�� an� als� permit� th� shel� �
featur� t� b� extende� t� includ� invocatio� o� on� shel� o� to� �
o� anothe� shell��  Shells� ar� front-en� processor� whic� ar� �
invoke� i� plac� o� th� ZCPR� Comman� Processo� inpu� routine� �
an� the� allo� comman� inpu� i� � variet� o� different�� perhap� �
mor� user-friendl� form� t� tak� place�  Th� MENU� SH� an� VFILE� �
utilitie� ar� invoke� a� shell� unde� ZCPR3��  Havin� � shel� �
stac� allow� on� shell�� lik� MENU�� t� ru� anothe� shell�� lik� �
VFILER��  Th� firs� shel� i� suspended�� th� secon� shel� run� a� �
lon� a� desired�� and� whe� th� secon� shel� i� exited� th� firs� �
shel� i� resumed.

    Initialization��  Th� Shel� Stac� mus� b� initialize� b� th� �
col� boo� routine��  Reason� ar� th� sam� a� fo� th� Comman� Lin� �
Buffer.


2.2.7. Environment Descriptor

    Th� Environmen� Descriptor� (25� bytes� contain� muc� detai� �
o� th� ZCPR� environment�� includin� informatio� o� wha� feature� �
ar� availabl� an� othe� dat� o� th� operatio� o� th� ZCPR� �
System��  Th� ZCPR�� TCA� entr� fo� th� user'� CRԠ termina� i� �
include� i� th� Environmen� Descriptor��  I� th� Environmen� �
Descripto� i� no� supporte� externall� (a� recommended)�� the� �
eac� ZCPR�� utilit� mus� b� assemble� t� includ� � cop�� o� th� �
ZCPR�� Environmen� Descripto� withi� it��  I� th� Environmen� �
Descripto� i� supporte� externally�� eac� ZCPR� utilit� contain� �
onl�� � pointe� (� bytes� t� th� descriptor��  Installatio� o� � �
utility amounts to only setting this pointer.

    Initialization��  Th� ZCPR� Environmen� Descripto� ma�� b� �
initialize� b� eithe� th� col� boo� routin� i� th� BIO� o� b� th� �
execution of LDR on an ENV file as a STARTUP command.


2.3. Flow Command Packages

    Th� Flo� Comman� Package� o� ZCPR� implement� th� basi� flo� �
construct� o� th� ZCPR� System��  Thes� ar� th� IF� ELSE� FI� an� �
XI� commands� and� wit� thi� featur� installed� comman� sequence� �
lik� th� followin� ar� possible:

         IF EXIST MYFILE.TXT
              TYPE MYFILE.TXT
         ELSE
              IF ERROR
                   ECHO MYFILE.TXT NOT FOUND
              FI
         FI
pa �     Initialization���  Th堠 Flo��� Comman� Packag堠 MUSԠ� b� �
initialize� b� th� col� boo� routine��  Reason� ar� th� sam� a� �
those for the Command Line Buffer.


2.4. Input/Output Packages

    Th� Input/Outpu� Package�� o� ZCPR� implement� � se� o� �
Input/Outpu� driver� whic� ca� b� loade� dynamicall� t� configur� �
and extend the input/output system of the user's computer.

    Initialization����  Th堠 Input/Outpu� Packag堠 MUSԠ� b� �
initialize� b� th� col� boo� routine��  Reason� ar� th� sam� a� �
thos� fo� th� Comman� Lin� Buffer.


2.5. Resident Command Packages

    Th� Residen� Comman� Package� o� ZCPR� implement� � se� o� �
command� whic� remai� i� memor� unti� th� packag� i� explicitl� �
reloade� b� th� LDR.CO� utility��  Thes� command� ca� b� use� t� �
exten� th� se� o� command� residen� withi� th� ZCPR�� Comman� �
Processor�� an� the�� ad� th� flexibilit� o� bein� abl� t� b� �
reloade� fro� tim� t� tim� wit� differen� commands.

    Initialization���  Th� Residen� Comman� Packag� MUSԠ b� �
initialize� b� th� col� boo� routine��  Reason� ar� th� sam� a� �
thos� fo� th� Comman� Lin� Buffer.


2.6. Other Buffers

2.6.1. External Path

    Th� Externa� Path�� (consistin� o� � fe� byt� pairs�� i� � �
buffe� whic� contain� th� symboli� expressio� o� th� Comman� �
Searc� Pat� t� b� followe� b� th� ZCPR� comman� processo� whe� �
searchin� fo� � CO� file.

    Initialization��  Th� Externa� Pat� MUS� b� initialize� b� �
the cold boot routine.

2.6.2. Wheel Byte

    Th� Whee� Byte�� (�� byte� i� � fla� rea� b�� som� ZCPR� �
utilitie� whic� define� th� use� t� b� privelege� o� not��  I� �
thi� byt� i� non-zero� th� use� i� declare� t� b� priveleged� an� �
certai� function� ar� enable� whic� ar� no� normall� availabl� t� �
him��  PWĠ (Prin� Workin� Directories)�� fo� example�� wil� als� �
displa� password� t� thes� directorie� i� th� use� i� privelege� �
and requests them.

    Initialization�  Th� Whee� Byt� shoul� b� initialize� befor� �
� utilit� whic� read� i� i� used.