he                      ZCPR2 Rationale Manual
fo                                                    Page #
                  Rationale Manual for ZCPR2


1.0  Introduction

    Thi� Rational� Manua� assume� tha� yo� hav� rea� th� Con�
cept� Manua� o� ZCPR� an� understan� it��  Havin� rea� th� In�
stallatio� Manua� an� th� User'� Guid� i� als� helpful��  I� yo� �
hav� no� rea� a� leas� th� Concept� Manua� yet�� � recommen� tha� �
yo� g� bac� an� rea� it.

    � gues� th� ver� firs� questio� t� answe� i� thi� manua� i� �
"Wh�� hav� � ZCP� o� ZCPR� i� th� firs� place?��  Rathe� tha� �
respon� wit� anothe� question�� lik� "Wh� not?"� let'� tak� ou� � �
littl� tim� t� loo� a� CP/M.

    CP/� wa� an� i� � goo� idea�  I� i� � smal� operatin� syste� �
whic� encapsulate� th� targe� microcompute� i� � virtua� machine�  �
Throug� thi� virtua� machine�� softwar� transportabilit� a� th� �
binar� level� i� realized��  A� � genera� rule� yo� ca� pic� u� a� �
objec� progra� (i� absolut� objec� form� whic� run� o� on� CP/� �
system�� transpor� i� t� anothe� CP/� syste� whic� i� runnin� �
differen� hardware�� an� execut� i� withou� modifyin� i� i� an� �
way�  Thi� i� significant!

    CP/� i� b� n� mean� � panacea� however�  � typica� operatin� �
syste� (i� th� conventiona� sense� manage� fou� resource� o� th� �
compute� system���  Thes� ar堠 Processes/Processors��� Memory� �
Devices�� an� Information��  CP/͠ doe� virtuall� n� proces� o� �
memor�� management�� an� n� protectio� i� afforde� th� use� t� �
spea� of�  Onc� � progra� i� allowe� t� execute� i� i� choose� t� �
eras� CP/� fro� memory� i� can�  I� i� choose� t� eras� th� disk� �
it can.  There is almost nothing to stop it.

    Th� CP/� virtua� machin� shine� i� th� performanc� o� th� �
function� o� devic� an� informatio� management���  Th� BIO� �
provide� � software-based�� machine-independen� interfac� t� th� �
physica� device� o� th� compute� system��  Th� BDOӠ provide� � �
software-based� machine-independen� interfac� t� th� file� o� th� �
compute� system�  A� application� progra� ca� us� thes� tw� part� �
o� CP/� t� communicat� directl� wit� th� hardware�� regardles� o� �
wha� th� hardwar� actuall� is�� an� t� manipulat� file� a� will�  �
Thes� interfaces�� generall� speaking� ar� th� sam� regardles� o� �
what machine the CP/M system is running on.

    Bu� CP/� i� divide� int� thre� parts�  Th� CC� i� th� third�  �
Thi� i� th� interactiv� interfac� t� th� CP/� user��  Throug� th� �
CCP� th� CP/� use� communicate� t� th� system�  Interpretatio� o� �
th� al� o� th� user'� commands�� executio� o� som� o� th� user'� �
commands�� interpretatio� an� executio� o� command� fro� disk-�
base� comman� files�� an� initiatio� o� processe� (runnin� CO� �
files�� i� th� CP/� environmen� ar� fou� o� th� majo� function� �
performe� b� th� CCP.


    ZCPҠ (o� ZCPR1� wa� originall� designe� t� replac� th� CC� �
i� a� attemp� t� improv� th� user'� interfac� t� th� CP/� system�  �
Th� BIO� an� BDO� wer� untouche� b� ZCPR1� s� th� virtua� machin� �
remaine� intac� and�� wit� it�� th� benefit� derive� fro� thi� �
virtua� machine��  Wit� ver� fe� exceptions�� an� CO� fil� whic� �
ra� unde� CP/� coul� als� ru� unde� � ZCPR1-base� syste� withou� �
modification.

    ZCPR�� change� th� user'� interfac� i� onl� � fe� ke�� ways�  �
First�� i� provide� � simpl� command-searc� hierarch� s� tha� � �
brie� searc� woul� b� performe� fo� � comman� onc� i� wa� issued�  �
I� thi� way� th� use� nee� n� longe� b� concerne� abou� wher� hi� �
CO� file� wer� located� an� h� coul� star� t� mak� mor� effectiv� �
us� o� USE� area� i� dividin� u� hi� project� an� such�  Duplica�
tio� o� CO͠ file� i� differen� use� area� o� duplicatio� o� �
director�� entrie� pointin� t� th� sam� CO� fil� wer� n� longe� �
necessary��  Second� th� ZCPR1-residen� command� wer� enhance� i� �
mino� way� t� improv� thei� utility��  ERA�� fo� instance�� no� �
printe� ou� th� name� o� th� file� i� erased�� an� command� lik� �
LISԠ (whic� TYPE� t� th� printer� an� G� (whic� reexecute� th� �
CO� imag� residin� i� memor� a� 100H� wer� added�  Alon� th� sam� �
lines�� th� promp� wa� change� s� tha� th� use� numbe� wa� in�
cluded� thereb� tellin� th� use� wha� use� are� h� wa� in.

    ZCPR� was�� i� effect�� � logica� extensio� t� th� CP/� CCP� �
an� i� cos� nothin� t� implemen� it��  ZCPR� wa� th� sam� siz� a� �
th� CP/� CCP� an� i� simpl� overlai� it�  It� sol� purpos� wa� t� �
improv� th� user'� interfac� t� th� system�� consequentl� improv�
in� hi� productivit� a� well��  Th� use� coul� structur� hi� wor� �
t� som� exten� an� concentrat� mor� o� th� proble� a� hand.

    No�� ZCPR�� i� comin� int� play��  Th� basi� reaso� fo� it� �
existenc� i� th� sam� a� fo� ZCPR� -- t� improv� th� user'� �
interfac� t� hi� CP/͠ system��  Unlik� ZCPR1�� however�� ZCPR� �
significantl�� extend� thi� interfac� an� i� mor� flexibl� i� �
allowin� th� use� (o� installer� t� tailo� th� syste� t� th� �
user'� needs��  Mor� huma� engineerin� principle� hav� bee� ap�
plie� unde� ZCPR2�  Directorie� ma� b� give� mnemoni� names� lik� �
JEF� o� TEXT� th� command-searc� pat� ma� b� specifie� an� chang�
e� b� th� use� dynamically�� facilitie� ar� availabl� whic� allo� �
th� use� t� emplo� al� 3� use� area� o� � disk�� menu� ma�� b� �
invoke� a� desire� t� simplif� th� use� interfac� eve� more�� � �
serie� o� command� ma� b� expresse� o� th� sam� lin� (allowin� �
th� use� t� g� of� an� d� somethin� els� whil� th� syste� i� bus� �
workin� fo� him)� an� I/� ca� b� redirecte� mnemonicall� (Consol� �
ca� b� define� a� MODE� rathe� tha� UC1).

    An� al� o� thi� i� don� wit� � minimu� o� overhead��  A� � �
rule�� ZCPR� i� th� sam� siz� a� th� CP/� CCP� an� � mino� growt� �
i� th� BIO� (usuall� o� th� orde� o� 1K� i� require� t� full� �
implemen� � ZCPR� System��  Unde� ZCPR2�� you� TP� ma� sta�� th� �
sam� siz� a� i� ha� alway� been�� or� a� mor� feature� ar� imple�
mented� i� ma� shrin� slightly� bu� usuall� n� mor� tha� 1K.

    Gettin� bac� t� th� origina� questio� o� "WHY?"� � gues� th� �
answe� i� t� attemp� t� improv� th� worl� o� th� user��  T� mak� �
th� machin� mor� subservien� t� th� wil� o� th� use� an� t� �
increas� th� productivit� o� th� use� ar� tw� ke� way� i� whic� �
ZCPR� attempt� t� improv� th� user'� world.


2.0  Comparison Between ZCPR2 and the CP/M 2.2 CCP

    Thi� sectio� o� th� Rational� outline� th� functiona� diff�
erence� betwee� ZCPR� an� th� CP/� 2.� CC� wit� � brie� explana�
tio� o� wh� thes� feature� wer� implemente� i� ZCPR�� i� thi� �
fashion.


2.1  The ZCPR2 Prompt

    First�� th� prompt�  A� � vie� th� purpos� o� th� prompt� i� �
serve� t� tel� yo� wher� yo� ar� locate� an� tha� ZCPR� i� read� �
t� accep� � comman� line��  Unde� CP/M'� CCP�� thi� promp� wa� �
simpl�� th� dis� lette� followe� b� � ">"��  Unde� ZCPR2�� thi� �
promp� ma� b� th� sam� o� i� ma� b� � D� form�� suc� a� "A12>� o� �
"B1>"� whic� tell� yo� exactl� wher� yo� are.

    I� designin� th� ZCPR� System�� however�� � foun� � nee� fo� �
th� promp� t� serv� � thir� function��  Thi� functio� i� t� tel� �
th� ZE� Monito� tha� i� ma� begi� supplyin� inpu� thr� th� BIO� �
again��  ZE� respond� t� � comman� whic� tell� th� ZE� Monito� t� �
sto� supplyin� character� thr� th� BIO� an� t� allo� th� use� t� �
inpu� hi� ow� text��  Thi� i� � nic� featur� o� ZE� sinc� comman� �
fil� processin� ma� no� b� interrupte� fo� use� input��  Th� use� �
ma�� inpu� a� optio� t� � command�� ma� ente� tex� an� ru� a� �
editor�� o� ma� perfor� othe� function� requirin� hi� attentio� �
whil� ZE� i� i� control��  � questio� o� ho� t� tel� ZE� tha� i� �
ma�� resum� contro� cam� up�� however��  Afte� � lo� o� delibera�
tion�� � decide� tha� � specia� characte� sen� t� th� consol� wa� �
th� bes� wa� an� tha� thi� characte� shoul� b� sen� b� ZCPR2.

    Thi� character�� however�� ha� t� b� unique�  I� shoul� b� � �
characte� whic� i� no� normall� sen� t� th� scree� sinc� ZE� �
woul� star� u� immediatel� whe� i� sa� thi� character��  I� i� �
als� preferre� tha� th� use� no� b� force� t� issu� thi� char�
acte� himsel� sinc� th� huma� interfac� i� incumbere� b�� thi� �
(th� huma� i� force� t� provid� a� arbitrar� inpu� t� hel� th� �
softwar� along)��  I� make� n� differenc� i� thi� characte� i� �
printabl� o� not�� s� lon� a� i� ca� b� picke� u� b� ZE� a� th� �
righ� tim� an� hopefull� a� n� othe� time.


    Again�� afte� som� thought�� � opte� t� us� th� ZCPR� promp� �
t� contai� thi� character��  Thi� choic� wa� mad� because� i� al� �
practica� case� � coul� envision�� th� nee� fo� use� inpu� woul� �
b� suc� tha� th� use� woul� inpu� hi� dat� i� orde� fo� � func�
tio� t� b� performe� an� the� contro� woul� retur� t� ZCPR2�  �
ZCPR�� woul� alway� b� ther� t� tur� ZE� bac� o� an� woul� b� th� �
onl� commo� denominato� � coul� coun� on��  � didn'� wan� t� ad� �
an�� unnecessar�� overhea� t� ZCPR� t� d� thi� either�� so�� i� �
seeme� reasonabl� t� mak� th� ">� characte� signfican� t� ZEX�  �
Ther� ar� man� case� wher� th� ">� characte� woul� b� type� b� �
th� use� i� mat� expression� an� th� like� s� � electe� t� defin� �
th� ">� wit� it� mos� signfican� bi� se� t� b� th� promp� charac�
ter��  Thi� i� rathe� unique�  I� al� case� � coul� envision� th� �
norma� us� o� ">� i� a� 7-bi� ASCI� wit� th� 8t� bi� turne� off.

    Th� onl�� problem� � coul� se� wit� thi� ar� wit� thos� �
terminal� wh� g� int� graphic� mod� whe� the� encounte� � charac�
te� wit� th� 8t� bi� se� an� thos� printer� wh� respon� t� suc� �
characters��  Th� printe� proble� rear� it� ugl� hea� whe� th� �
use� employ� ^� t� prin� consol� output��  A� answe� t� th� firs� �
proble� i� t� eithe� choos� � promp� characte� tha� doe� no� hav� �
thi� effec� o� t� ad� � 2n� byt� afte� th� ">� whic� i� � non-�
printing� non-graphi� character�  A� answe� t� th� secon� proble� �
i� no� t� us� th� ^� functio� t� direc� consol� outpu� t� th� CR� �
an� printe� i� parallel�� bu� t� us� � redirectabl� I/Ϡ drive� �
whic� drive� � consol� wit� CR� inpu� an� CRT/printe� output�  �
Thi� drive� coul� filte� th� MS� fro� al� character� sen� t� th� �
printer.


2.2  The ZCPR2 Resident Command Set

    Th� nex� ite� t� discus� i� th� ZCPR2-residen� comman� set�  �
ɠ vie� th� se� o� residen� command� unde� ZCPR� an� th� CP/� CC� �
t� b� necessar� fo� tw� reasons��  (1� t� quickl�� perfor� fre�
quently-neede� function� an� (2� t� provid� thes� function� with�
ou� consumin� dis� spac� fo� them��  Th� implementatio� o� th� �
residen� command� withi� th� CP/� CC� wa� good� bu� � didn'� fee� �
i� wa� complete��  Fo� instance� th� CP/� CC� DI� comman� di� no� �
allo� yo� t� vie� Syste� Files�� th� ER� comman� di� no� sho� yo� �
wha� i� wa� erasing�� th� TYP� comman� di� no� page�� th� SAV� �
comman� require� � decima� argumen� whil� DDԠ an� th� othe� �
debugger� gav� yo� hexadecima� value� t� wor� with�� an� al� o� �
th� command� refuse� t� directl� addres� differen� use� area� �
whil� allowin� yo� t� addres� differen� disks.


    T� provid� mor� flexibilit� an� consistenc� t� th� ZCPR� �
System� � abolishe� th� USE� comman� (not� tha� ther� neve� wa� � �
DISˠ command)�� an� incorporate� � Use� Numbe� int� th� Dis� �
references��  Thi� seeme� t� als� mak� th� entir� syste� mor� �
unifor� i� appearanc� t� th� user� particularl� whe� h� wante� t� �
divid� hi� wor� int� differen� use� areas�  T� ad� t� th� consis�
tency�� ɠ allowe� th� D� for� t� b� use� b�� an�� ZCPR2-residen� �
comman� o� an� ZCPR2-supplie� transien� comman� whereve� th� � �
for� wa� use� before��  No� w� ar� consisten� -- t� chang� disks� �
typ� "d:"�� t� chang� users�� typ� "u:"�� t� chang� both�� typ� �
"du:"��  T� extrac� � CO� fil� fro� � differen� directory� simpl� �
prefi�� i� wit� � "d:"�� � "u:"�� o� � "du:"��  Argument� t� th� �
command� lik� DI� an� ER� wer� als� allowe� t� b� D� forms.

    Onl�� on� proble� exist� wit� thi� ide� tha� ɠ coul� see� �
however��  An� "standard� CP/� transient� lik� Wor� Sta� o� DBAS� �
II�� woul� no� kno� abou� th� D� for� an� couldn'� dea� wit� it�  �
No� w� hav� a� inconsistenc� -- som� command� coul� handl� D� an� �
other� onl� D��  Thi� starte� m� o� th� ide� o� th� ZCPR� System�  �
Question��  whe� d� yo� nee� th� D� form��  Answer�  whe� yo� ar� �
crossin� directorie� -- whe� yo� ar� sittin� i� on� director� an� �
wan� t� acces� file� i� anothe� directory��  Afte� workin� wit� �
ZCPR�� an� ZCPR� fo� s� long�� � realize� that�� whe� i� come� t� �
th� commercia� softwar� packages� � typicall� di� no� wor� acros� �
director� boundaries�� or� i� � did� i� wa� alway� dow� t� dis� � �
i� th� curren� user��  Hence�� � neve� cam� t� us� � prefi� t� � �
fil� whe� � ra� a� edito� o� compiler��  � alway� use� "E� FILE� �
o� "C� FILE"��  I� wa� onl� whe� � wante� certai� director�� dis�
plays�� whe� � wante� t� vie� certai� files� an� whe� � wante� t� �
manipulat� file� (eras� them�� protec� them�� renam� them� tha� � �
use� � prefi� t� � fil� name.

    I� becam� clear�� then�� tha� th� D� for� wa� OK��  � woul� �
establis� � metho� o� operatio� i� whic� � woul� allocat� direc�
torie� fo� certai� functions�� an� mov� int� thes� directorie� �
whe� � wante� t� perfor� thes� functions��  � woul� creat� � W� �
director� t� wor� o� tex� files� a� AS� director� t� writ� assem�
bl� languag� programs�� etc��  I� suc� a� environment�� m�� huma� �
interfac� wa� goo� sinc� � agai� coul� concentrat� o� th� proble� �
a� hand�� th� syste� woul� fin� m� command� fo� me� an� th� file� �
ɠ a� concerne� wit� woul� b� th� onl� file� � se� whe� � displa� �
th� curren� directory��  � se� o� utilities�� however� wa� neede� �
t� cros� th� director� boundaries��  I� woul� als� b� nic� i� th� �
ZCPR2-residen� command� coul� cros� thes� boundarie� a� will.

    S� no� w� ar� bac� t� th� ZCPR2-residen� commands�  Wit� th� �
Dՠ for� accepte� b� al� o� them�� director� boundarie� becam� n� �
proble� a� all��  I� addition� � wa� no� designin� � se� o� ZCPR� �
utilitie� whic� woul� provid� � hos� o� additiona� capabilitie� �
whic� mad� i� eas�� t� perfor� function� acros� director� �
boundaries.


2.3  The ZCPR2 Residents Versus the CCP Residents

    Clearly� no� th� ZCPR� Residen� Command� ca� cros� director� �
boundarie� a� wil� whil� th� CC� Residen� Command� ca� not�  Thi� �
i� a� instrumenta� forwar� ste� i� th� huma� engineerin� o� �
ZCPR2��  Al� o� th� ZCPR� Residen� Command� hav� t� d� thi� i� � �
consistant�� simpl� way��  Thi� simpl� wa� i� th� Dՠ form��  Th� �
commands now line up like this:

             ZCPR2 Command            CCP Command
              DIR DU:afn               DIR D:afn
              ERA DU:afn               ERA D:afn
              REN DU:ufn1=ufn2         REN D:ufn1=ufn2
              TYPE DU:ufn              TYPE D:ufn
              SAVE n DU:ufn            SAVE n D:ufn
              D:                       D:
              U:                       USER u
              DU:                      --

    I� movin� t� Z80-specifi� code�� lot� o� spac� wa� save� �
withi� ZCPR� an� ZCPR2��  Jum� Relativ� instruction� contribute� �
th� mos� t� thi� savings�� a� wel� a� constan� restructurin� an� �
optimizin� fo� spac� b� combinin� function� int� on� routine�  �
Wit� suc� � spac� savings�� ther� wa� roo� t� elaborat� o� th� �
Residen� Commands.

    I� th� proces� o� firs� designin� ZCPR� an� late� ZCPR2�� i� �
wa� obviou� tha� th� CC� Residen� Command� wer� nic� t� have� bu� �
wer� incomplete��  I� ZCPR1�� � too� step� t� mak� the� mor� com�
plete�� an� i� ZCPR� � too� furthe� steps��  Th� followin� para�
graph� summariz� th� rational� behin� th� changes.

    Th� DI� comman� unde� CP/� woul� onl� displa� th� non-Syste� �
Files��  Thi� i� typicall� wha� yo� want�� bu� i� i� nic� t� se� �
th� Syste� File� als� fro� tim� t� time�  Unde� CP/M� yo� d� thi� �
b�� loadin� � CO� fil� designe� t� perfor� thi� function��  Unde� �
ZCPR2�� i� seeme� lik� � simpl� matte� t� giv� Z
CPR� itsel� thi� �
capability��  Fro� thi� cam� th� � optio� an� th� � option��  T� �
mak� th� interfac� a� simpl� a� possibl� an� requir� a� fe� �
keystroke� o� th� par� o� th� use� a� � could�� � opte� t� hav� �
thes� option� specifie� b� � spac� followe� b� th� optio� lette� �
afte� th� firs� "normal� par� o� th� command��  T� displa� Syste� �
Files�� then�� th� use� nee� onl� typ� "DI� DU:af� S"��  Th� onl� �
trad� of� wa� tha� i� n� af� o� D� for� wa� specified�� � fille� �
wa� require� i� th� optio� wa� desired��  Thi� fille� coul� b� �
easil� "*.*"�� bu� th� use� ha� t� remembe� that�  Otherwise� ho� �
woul� DI� kno� betwee� request� fo� "DI� A� t� se� i� fil� �� i� �
ther� o� "DI� *.� A� t� se� al� files�  Thi� seeme� reasonable.


    M�� mai� grip� wit� th� ER� comman� wa� tha� i� di� it� jo� �
silently��  � neve� wa� sur� o� wha� i� di� unles� � issue� � DI� �
comman� afterwards��  Hence� � adde� a� automati� DI� functio� t� �
ERA��  I� addition� a� ver� littl� cost� � Verif� optio� coul� b� �
adde� t� allo� th� use� t� approv� th� eras� befor� i� wa� done�  �
O� course� th� director� displa� woul� b� don� first.

    M�� onl�� complain� abou� RE� wa� tha� yo� coul� no� renam� �
over existing files.  I corrected this with ZCPR2.

    Th� complain� wit� TYP� i� obvious��  I� ha� t� page��  N� �
question��  ɠ reall� becam� tire� o� usin� ^� t� sto� outpu� an� �
sometime� no� b� quic� enoug� t� catc� everything��  Sometimes� �
tho�� � woul� no� wan� t� page�� bu� ski� through��  Havin� � TV� �
95� wa� nice�� sinc� � coul� us� smoot� scrollin� t� ski� slowly�  �
TYPE�� then�� wa� se� u� t� pag� b� default�� bu� a� optio� i� �
availabl� t� no� pag� whe� desired.

    LIS� wa� � nic� comman� t� hav� tha� cos� little� s� wh� no� �
have it?  Enough said.

    Th� bigges� complain� � ha� wit� SAV� wa� th� constan� he� �
t� decima� conversio� � wa� doin� t� tak� number� generate� b� �
DDԠ an� us� the� i� � SAVE��  S� � adde� � hexidecima� valu� �
optio� t� SAV� whil� stil� keepin� th� decima� optio� fo� compat�
ibilit� (human-wise).

    GϠ an� JUM� wer� adde� becaus� (1� the� wer� nic� t� have� �
(2� i� the� wer� no� t� affec� th� TPA�� the� HA� t� b� � par� o� �
ZCPR�� an� ZCPR2�� an� (3� the� cos� littl� sinc� al� th� hook� �
wer� alread�� there��  GE� wa� adde� b� reques� sinc� i� cos� �
littl� an� th� perso� requestin� i� jus� HA� t� hav� it��  � �
personall� neve� us� it.

    Th� followin� tabl� compare� th� Residen� Command� availabl� �
under ZCPR2 to those available under the CP/M 2.2 CCP:

ZCPR� Comman�       CC� Comman�  | ZCPR� Comman�      CC� Command
DIR DU:afn          DIR D:afn    | ERA DU:afn          ERA D:afn
DIR DU:afn S        No Equiv     | ERA DU:afn V        No Equiv
DIR DU:afn A        No Equiv     |
                                � RE� DU:ufn1=ufn�    RE� D:u=u2
TYPE DU:ufn P       TYPE D:ufn   | REN with Overwrite  No Equiv
TYPE DU:ufn (page)  No Equiv     |
                                | SAVE n DU:ufn       SAVE n D:u
LIST DU:ufn         No Equiv     | SAVE nH DU:ufn      No Equiv
                                | SAVE n DU:ufn S     No Equiv
GET adr DU:ufn      No Equiv     | SAVE nH DU:ufn S    No Equiv
                                |
GO params           No Equiv     | JUMP adr            No Equiv
                                |
D:                  D:           | U:                  USER n
DU:                 No Equiv     |

2.4  The Structure of ZCPR2

    Fo� thos� familia� wit� th� interna� structur� o� th� CP/� �
2.� CCP�� yo� wil� fin� th� interna� structur� o� ZCPR� radicall� �
different�  I� begin� wit� th� sam� tw� JM� instruction� tha� th� �
CP/� 2.� CC� begin� with�� an� i� may�� i� s� configured�� follo� �
thes� instruction� wit� � comman� lin� buffe� int� whic� ma�� b� �
store� � defaul� command� bu� th� similarit� end� there.

    ɠ fee� tha� th� openin� JMР instruction� ar� absolutel� �
necessar�� fo� compatabilit� purposes��  Th� followin� buffer� �
however�� i� not�� sinc� thi� i� a� undocumente� "feature� o� th� �
syste� i� th� firs� place�  Som� o� th� publi� domai� (an� other� �
softwar� us� thi� buffer�� an� th� use� ha� th� optio� t� instal� �
i� i� h� wishes�� bu� s� muc� mor� flexibilit� an� capabilit� ar� �
derive� fro� enablin� th� Multipl� Comman� Lin� Buffe� feature� �
tha� � thin� i� i� worthwhil� t� abando� th� program� whic� us� �
thi� buffe� i� th� ZCPR� environment�  O� th� program� � a� awar� �
of� th� ZCPR� Syste� provide� equivalent� anyway.

    � a� � stron� proponen� o� writin� maintainabl� software�  � �
believ� i� designin� softwar� i� th� firs� plac� i� suc� � wa� �
tha� goin� bac� t� i� a� � late� tim� an� modifyin� i� ca� b� �
don� wit� � minimu� o� difficulty�  Wit� ZCPR2� however� � fough� �
� battl� i� attemptin� t� writ� maintainabl� softwar� an� writin� �
space-optimize䠠 an䠠 time-optimize䠠 software���  T ensur� �
compatabilit� wit� CP/� 2.2�� ZCPR� coul� no� excee� 2� byte� i� �
size�� s� man� optimization� wer� performe� tha� save� o� spac� �
an䠠 reduce䠠 readability���  ɠ answere� thi� reductio i� �
readabilit��� b��� increasin� o� th堠 interna젠 documentatio� �
(comments)��  Also�� b�� � modula� construction�� � wa� abl� t� �
produc� mor� maintainabl� cod� whil� conservin� spac� i� som� �
cases.

    Th� openin� comment� i� th� sourc� cod� t� ZCPR� outlin� it� �
structure���  Thi� structur� i� discusse� i� th� followin� �
paragraphs.

    First�� th� buffers��  A� � go� int� th� desig� o� ZCPR2�� � �
foun� mor� an� mor� o� � nee� t� allocat� buffe� spac� thr�� th� �
BIOӠ i� orde� t� provid� globa� buffer� an� mor� extensiv� �
buffer� tha� weren'� affecte� b� war� boots�  Hence� som� buffer� �
remaine� i� ZCPR2�� an� man� wer� move� outside��  Option� wer� �
retained�� however�� t� allo�� th� installe� t� implemen� th� �
buffer� i� eithe� way��  I� th� buffer� wer� selecte� t� b� �
internal�� however�� somethin� else�� lik� � feature�� ha� t� b� �
give� up��  Th� onl� goo� reaso� � ca� se� fo� no� implementin� � �
modifie� BIOӠ an� placin� th� recommende� buffer� outsid� o� �
ZCPR�� itsel� i� becaus� th� installe� doe� no� hav� th� sourc� �
cod� t� hi� BIOS�  ZCPR� ca� b� implemente� withou� modifyin� th� �
BIOS� an� som� o� it� enhance� feature� wil� b� retaine� b� this� �
bu� i� wil� b� � shado� o� wha� i� coul� b� i� externa� buffer� �
were available.

    Second�� th� ZCPR� Startin� Modules��  Al� o� th� entr�� an� �
reentr� points� th� erro� recover� points� an� som� miscellaneou� �
entrie� ar� containe� here�  Thi� seeme� reasonable.

    Third�� th� general- an� special-purpos� utilities�  Sectio� �
� contain� general-purpos� utilities� suc� a� consol� output� an� �
Sectio� � contain� special-purpos� utilities�� suc� � SBLANˠ t� �
ski� blank� fo� parsin� purposes�  Th� comman� lin� parse� itsel� �
i� classe� a� � special-purpos� utility��  A� � rule� i� � wante� �
� functio� t� b� performe� mor� tha� onc� an� it� siz� exceede� �
thre� bytes� i� wa� mad� int� � subroutin� t� conserv� space�  I� �
th� siz� o� th� cod� require� t� perfor� th� functio� wa� thre� �
byte� o� less� the� i� wa� simpl� duplicate� wher� i� wa� needed�  �
I� considerin� design� lik� this�� � cam� u� wit� � simpl� �
formula set:

         Cost of Inline Function =
              (number of bytes required)
            * (number of times function was used)

         Cost of Subroutine Function =
              (number of bytes required + 1 [for RET instruction])
            +
              3 [number of bytes required for a subroutine CALL]
            * (number of times function was used)

    I� N=numbe� o� byte� require� fo� functio� an� T=numbe� o� �
times function was used, then the formulae are:

         Cil = NT
         Csb = (N + 1) + 3T

    Clearly, NT < (N+1) + 3T if T=1.  If T=2, then:

         N    Cil=NT    Csb=(N+1)+3T
         1       2         8
         2       4         9
         3       6        10
         4       8        11
         5      10        12
         6      12        13
         7      14        14

    Fo� N>� an� T=2�� Ci� cost� mor� tha� Csb��  I� T=3�� Ci� �
exceeds Csb more quickly:

         N    Cil=NT    Csb=(N+1)+3T
         1       3        11
         2       6        12
         3       9        13
         4      12        14
         5      15        15

    For N>5 and T=3, Cil costs more than Csb. �
    I� � nutshell�� thes� table� ar� sayin� tha� th� borderlin� �
cas� i� whe� th� numbe� o� time� th� routin� i� use� i� twice� �
an� i� th� routin� contain� mor� tha� � byte� (thin� o� thi� i� �
term� o� tw� subroutin� call� an� on� byte)�� the� w� ar� ahea� �
makin� thi� int� � subroutin� rathe� tha� placin� th� cod� �
inline.

    Hence�� th� reade� ca� no� se� th� reasonin� behin� placin� �
code inline or making it into a subroutine.

    Finally�� th� Residen� Command� tak� u� th� las� par� o� �
ZCPR2��  Thes� ar� divide� int� thei� ow� sections�� bu� som� �
overla� exists�  Th� routin� whic� display� fil� name� (DIRPR� i� �
use� b� DI� an� b� ERA�� fo� instance�  Likewise� MLOA� (loa� CO� �
file into memory) is used by COM and GET.

    T� simplif� th� installatio� procedur� an� t� furthe� modu�
lariz� th� desig� o� ZCPR2�� � create� � separat� heade� fil� �
(ZCPRHDR.LIB�� whic� contain� al� o� th� customizatio� informa�
tion��  It� purpos� i� two-fold�  (1� t� brin� ou� th� configura�
tio� informatio� i� � smal� fil� tha� i� eas� t� edi� an� (2� t� �
identif� an� provid� t� th� use� ever� ite� o� ZCPR� tha� h� ma� �
wis� t� chang� t� mee� hi� ow� desires��  Again� � a� sol� o� th� �
ide� o� bendin� th� syste� t� mee� you� desire� a� oppose� t� th� �
othe� wa� around.



2.5  The ZCPR2 Alternate Commands

    Ther� i� � subse� o� th� ZCPR2-supplie� transient� tha� � �
cal� th� ZCPR�� Alternat� Command� becaus� the�� duplicat� th� �
function� o� th� ZCPR�� Residen� Command� wit蠠 signfican� �
enhancement� i� capability��  Thes� command� an� th� resident� �
they duplicate are:

            ZCPR2 Alternate          ZCPR2 Resident
              XDIR3                    DIR
              ERASE                    ERA
              RENAME                   REN
              PAGE                     TYPE
              PRINT                    LIST



    DIҠ i� nice�� bu� i� yo� ar� lookin� a� � lo� o� files�� � �
"random�� listin� o� name� doesn'� hel� much��  XDIR�� sort� th� �
fil� listin� b� nam� an� typ� o� typ� an� nam� (sometime� � wan� �
i� on� wa� t� se� commonly-name� file� an� sometime� ɠ wan� i� �
th� othe� wa�� t� se� commonly-type� files�� an� ɠ prefe� th� �
latte� mos� o� th� time)��  I� als� display� th� siz� o� eac� �
file�� th� tota� spac� take� u� b� th� file� displayed�� an� th� �
amoun� o� spac� remainin� o� disk��  I� provide� � hos� o� othe� �
nice�� extende� function� a� well��  On� ke� thin� � wante� XDIR� �
t� d� tha� n� othe� publi� domai� director� displa� progra� di� �
wa� t� cros� director� boundarie� wit� th� D� for� an� th� DI� �
for� a� well�  XDIR� doe� this� an� add� t� th� continuit� o� th� �
ZCPR�� Syste� a� such��  Finally�� XDIR� als� ha� fil� scannin� �
capabilit�� buil� i� s� tha� configuratio� change� ca� b� mor� �
easil� detected.

    Alon� th� line� o� DIR�� ER� serve� � purpose�� bu� ERAS� �
enhance� this��  ERASŠ wil� onl� "see� non-Syste� File� unles� �
tol� t� loo� a� Syste� File� also�� an� i� ha� th� abilit�� t� �
eras� Read/Onl� file� an� t� allo� th� use� t� inspec� eac� fil� �
befor� th� eras� i� performed.

    RENAMŠ i� t� RE� a� ERAS� i� t� ERA��  RENAM� allow� wil� �
cards�� inspection�� an� othe� option� a� well��  Lik� al� o� th� �
Alternat� commands� bot� th� D� an� DI� form� ar� supported.

    PAGŠ an� PRIN� ar� th� alternate� t� TYP� an� LIST��  PAG� �
provide� option� fo� spee� contro� e� al�� an� PRINԠ support� �
paging� tim� an� dat� stamping� headers� pag� and/o� lin� number�
ing� an� othe� features.

    On� featur� � fee� i� signfican� i� tha� o� permittin� list� �
o� ambiguou� fil� name� a� argument� fo� ERASE�� RENAME� PROTECT� �
PAGE� PRINT� an� man� othe� ZCPR2-supplie� utilities�  Thi� give� �
th� use� th� flexibilit� o� performin� man� simila� function� i� �
on� comman� a� oppose� t� reissuin� th� comman� o� usin� GO.


    A� tim� wen� along�� � foun� i� mor� an� mor� usefu� t� �
includ� onlin� documentatio� buil� int� th� command� themselve� �
s� tha� thi� informatio� coul� b� quickl� accessed��  � ha� al�
read� adopte� th� conventio� i� whic� comman� line� whic� consis�
te� o� � comman� an� option� onl� woul� prefi� th� optio� lis� �
wit� � slas� t� distinguis� th� option� fro� � fil� name��  This� �
o� course� prohibite� usin� th� slas� a� th� firs� characte� o� � �
fil� name�� bu� � didn'� thin� tha� thi� wa� to� restrictive�  A� �
� logica� extensio� t� this�� th� command� wer� designe� t� prin� �
� hel� messag� i� an� invali� optio� wa� encountered�� an� �� i� �
neve� permitte� t� b� a� option�� s� mos� command� consistentl� �
prin� ou� � hel� messag� whe� � comman� o� th� for� "CMN� //� i� �
issued��  Thi� i� i� additio� t� th� onlin� documentatio� avail�
abl� vi� th� HEL� command.

2.6  Abandoning ^P

    This�� o� course�� i� � recommendation�� bu� i� i� mad� wit� �
th� vie� o� th� ZCPR� Syste� i� mind��  Unde� CP/� 2.2� � di� no� �
lik� th� ^� functio� becaus� � considere� i� t� b� unreliable�  �
I� on� case�� i� yo� issue� ^� jus� befor� givin� � command�� th� �
comman� woul� ru� a� desired�� but�� whe� th� promp� appeared� �
dependin� o� th� command�� sometime� th� ^� woul� stil� b� i� �
effec� an� othertime� i� woul� not�  I� anothe� case� i� � loade� �
transien� (lik� DU�� whic� i� wh� D� ha� � � command� use� direc� �
BIO� call� fo� I/O�� the� th� ^� woul� b� ignore� an� th� desire� �
effec� no� obtained.

    On� fina� poin� agains� ^� i� tha� ZCPR� occasionall�� send� �
character� wit� th� mos� significan� bi� se� t� th� screen��  Th� �
promp� i� on� example�� an� i� doe� thi� fo� ZEؠ compatability�  �
I� ^� i� use� an� you� printe� respond� t� command� whic� involv� �
byte� wit� th� mos� significan� bi� set� the� th� printe� wil� d� �
strang� thing� fro� tim� t� tim� unde� ^� control.

    Whe� lookin� a� ZCPR� a� � System�� man� ZCPR� utilitie� us� �
direc� BIO� call� an� woul� no� b� affecte� b� ^P��  SYSLI  2.� �
als� support� I/� vi� direc� BIO� call� extensively�� s� program� �
usin� SYSLI� ma� o� ma� no� respon� t� ^P.

    Ho� i� � functio� lik� ^� obtained� then�  Unde� ZCPR� i� i� �
simpl� -- redirectabl� I/O��  Simpl� se� u� � redirectabl� I/� �
drive� tha� ca� b� assigne� t� th� consol� whic� consist� o� CR� �
Inpu� an� CRT/Printe� Output�� an� hav� tha� drive� mas� ou� th� �
mos� significan� bi� o� al� character� sen� t� th� printer�  Thi� �
solve� th� printe� proble� an� als� provide� � reliable�� prin� �
contro� facility��  I� i� invoke� onl� whe� th� indicate� consol� �
assignmen� (vi� DEVICE� i� made�� an� i� i� disengage� onl�� whe� �
anothe� assignmen� i� made��  Yo� ca� eve� ti� i� th� RECOR� �
facilit�� t� contro� thi� i� desired�� allowin� th� routine� en�
gage� b� RECOR� t� tur� o� an� of� printe� output.


3.0  The ZCPR2 System

    Afte� th� initia� desig� o� ZCPR� an� som� o� it� utilities� �
i� becam� appearan� tha� ZCPR� wa� no� � stand-alon� entit�� lik� �
ZCPR� was�  Instead� ZCPR� wa� th� hu� o� a� integrate� syste� o� �
program� tha� communicate� wit� eac� othe� throug� ZCPR�� itsel� �
an� th� buffer� associate� wit� ZCPR2.


3.1  Implementing the Named Directories

    Whe� th� ide� o� name� directorie� firs� cam� up�� ɠ wa� �
toyin� wit� th� ide� o� � CHDI� comman� t� lo� int� � director� �
b� name��  Thi� comman� wa� neve� release� wit� ZCPR2�� bu� idea� �
fro� i� wer� incorporate� int� th� CD�� MKDIR�� an� PW� commands�  �
I� orde� t� dea� wit� � mnemoni� nam� whic� stoo� fo� � disk/use� �
area�� a� asso
ciatio� tabl� ha� t� b� create� whic� paire� name� �
t� thei� directories�  Sinc� CHDI� wa� th� onl� progra� involved� �
i� wa� eas� t� plac� thi� tabl� int� CHDIR.

    A� tim� wen� along�� however�� th� ide� t� allo� � numbe� o� �
command� referenc� directorie� b� nam� developed��  Th� ol� tech�
niqu� o� continuin� t� stor� th� name� a� par� o� CHDIR.CO͠ wa� �
rule� ou� fo� severa� reasons:

         (1�� unles� step� wer� taken�� a� CHDIҠ changed�� th� �
positio� o� th� nam� tabl� ma�� chang� a� wel� (CHDIҠ wa� �
originally written in BDS C)

         (2�� fo� on� reaso� o� anothe� (suc� a� security)�� th� �
nam� o� CHDIR.CO� ma� no� alway� b� CHDI� -- i� coul� b� CĠ o� �
some other shorter name

         (3� CHDI� wa� larg� (du� t� th� overhea� o� BD� C)� an� �
ɠ wa� discoverin� (thr� experimentation� tha� utilitie� writte� �
wit� SYSLI� coul� b� a� muc� a� 1/� th� siz� o� simila� utiltie� �
written with BDS C

    �� reasonabl� ste� fro� thi� poin� wa� t� establis� � �
structur� fo� � director� fil� whic� containe� th� mnemoni� an� �
user/dis� associatio� information�  Alon� wit� thi� cam� MKDI� t� �
creat� an� edi� suc� � fil� an� C� t� replac� CHDIR�  Afte� � lo� �
o� us� wit� thi� typ� o� environment�� however�� ɠ foun� tha� �
constantl��� accessin� th� dis� t� determin� th� name� o� �
directorie� require� quit� � bi� mor� tim� t� perfor� eve� th� �
basi� functions�  Sinc� � wa� alread� placin� som� ZCPR2-specifi� �
buffer� i� memor� (suc� a� th� multipl� comman� lin� buffer)�� � �
electe� t� incorporat� a� optio� i� whic� � name� director� �
buffe� ma�� b� loade� fro� dis� an� searche� firs� b�� th� �
utilitie� whe� resolutio� o� � nam� wa� required���  Thi� �
significantl�� speede� thing� u� an� adde� th� fixed�� globa� �
director�� concep� t� th� system�


    NAMES.DIҠ no� becam� � loca� director� concep� an� coul� b� �
use� t� implemen� differen� loca� director� environ� a� th� use� �
move� fro� on� director� o� comman� searc� pat� t� another.

    No�� w� hav� th� flexibilit� o� bot� loca� an� globa� name� �
directorie� unde� ZCPR2��  Th� SYSLI� routine� whic� performe� �
director� searche� fo� m� wer� altere� t� utilitiz� thi� feature� �
and� onc� SYSLI� wa� altered� al� utilitie� wer� altere� a� well�  �
The algorithm now employed in SYSLIB is:

         (1� Chec� t� se� i� th� director� spe� i� � D� for� an� �
use it if so

         (2� Assum� i� t� b� � DI� for� i� no� DU�� an� sca� th� �
memory-base� name� director� buffe� fo� � matc� i� ther� i� one� �
if one is found, go with it

         (3�� I� ther� i� n� memory-base� name� director� buffe� �
o� ther� i� n� matc� i� it�� sca� alon� th� comman� searc� pat� �
(o� whateve� pat� wa� specifie� t� th� library� fo� th� NAMES.DI� �
file�� i� found�� loa� an� sca� i� fo� th� specifie� nam� an� g� �
with it if found

         (4) If 1, 2, and 3 fail, return with an error code

    ɠ a� please� wit� thi� desig� fo� it� flexibilit�� an� it� �
abilit�� t� rapidl� chang� th� user'� visibl� director�� environ�
men� a� h� move� fro� on� director� t� another.



3.2  Common ZCPR2 Transient Structures and GENINS

    SYSLI  wa� alread� use� extensivel� i� th� desig� o� th� �
ZCPR�� utilit� program� whe� � decide� t� adop� � standar� buffe� �
structur� a� th� beginnin� o� th� utilities��  Thi� standar� �
structur� wa� � goo� ide� fo� severa� reasons:

         (1�� a� installatio� progra� (GENINS� coul� b� designe� �
whic� coul� b� use� t� customiz� al� th� utilitie� withou� th� �
nee� fo� reassembly

         (2�� certai� basi� informatio� wa� neede� b� al� pro�
grams�� an� th� utilitie� coul� b� configure� t� individuall� �
contai� thi� informatio� i� � unifor� wa� o� t� poin� t� buffer� �
containin� thi� information�� suc� informatio� include� th� add�
res� o� th� multipl� comman� lin� buffer�� th� addres� o� a� �
externa� path�� an� th� addres� o� � name� director� buffe� i� �
ther� wa� one


         (3�� � SYSLI� routin� coul� b� establishe� tha� woul� �
uniforml�� initializ� al� necessar� SYSLI� buffer� withou� m� �
havin� t� worr� abou� correctl� initializin� eac� buffe� eac� �
tim� ɠ designe� � ne� utility�� thi� SYSLI� routin� i� ZGPIN� �
(General-Purpos� Installation� an� nee� onl� b� calle� onc� a� �
th� beginnin� o� eac� utility

    Th� commo� buffe� structur� wa� extende� t� includ� � commo� �
utilit� structur� later� an� th� fil� TEMPLATE.MA� i� provide� t� �
allow the programmer to program ZCPR2 utilities more easily.


3.3  Multiple Command Line Buffer

    Fro� th� beginning� � simpl� envisione� th� Multipl� Comman� �
Lin� Buffe� fo� it� origina� purpos� -- t� provid� � goo� plac� �
t� stor� � comman� lin� s� multipl� command� coul� b� executed�  �
Thi� i� wel� an� good�� an� th� multipl� comman� featur� i� quit� �
nice.  I use it all the time myself.

    Wha� wa� funn� abou� thi� particula� featur� o� th� ZCPR� �
Syste� i� tha� th� abilit� t� us� thi� buffe� t� chai� t� � �
serie� o� program� rapidl� becam� mor� important�� fro� m�� poin� �
o� view�� tha� it� origina� purpose��  I� � utilit�� kne�� th� �
locatio� o� thi� buffer�� i� coul� stor� � comman� lin� i� i� �
(containin� multipl� command� i� desired)�� se� � pointe� t� th� �
firs� characte� o� th� firs� command� an� ru� thi� comman� strea� �
b�� simpl� returnin� t� ZCPR2��  Ver� clea� an� efficien� wa�� t� �
chain�� an� i� mad� th� desig� an� implementatio� o� th� MEN� �
system very simple.

    Wit� MENU�� i� i� desire� t� ru� � comman� an� alway� retur� �
t� th� MENU��  Bein� abl� t� chai� t� � comman� strea� mad� thi� �
simpl� -- allo� MEN� t� buil� � comman� lin� consistin� o� th� �
desire� comman� followe� b� th� comman� "MENՠ options"�� wher� �
option� woul� b� use� t� reente� MEN� a� th� correc� point�  Thi� �
wa� simplicit� itself�� an� � alread� ha� designe� � simpl� men� �
syste� i� ZMCPҠ (whic� wa� � menu-base� ZCPҠ tha� wa� neve� �
released)�  � buil� upo� ZMCP� concept� an� cam� u� wit� th� MEN� �
program with MCHECK in a very short time.


3.4  SYSLIB

    On� brie� mentio� her� abou� SYSLI� 2.4��  A� ɠ go� int� �
designin� ZCPR� utilitie� mor� an� more�� th� valu� o� SYSLI� wa� �
prove� ove� an� ove� again��  � kne� SYSLI� intimately�� wit� a� �
understandin� o� ho� th� routine� fi� together�� and�� onc� � �
decide� upo� � functio� � wante� t� perform�� i� too� ver� littl� �
tim� t� desig� i� wit� SYSLIB�  B� th� en� o� th� desig� phas� o� �
th� ZCPR� System�� � spen� a� averag� o� � hour� t� desig� � ne� �
utilit��� fro� scratch��� an� thi� wa� withou� th� us堠 o� �
TEMPLATE.MAC�� whic� wa� on� o� th� las� thing� � designe� fo� �
ZCPR2. �
    I� seeme� reasonabl� t� ti� SYSLI� int� th� ZCPR�� Syste� �
mor� closel� t� mak� th� developmen� proces� eve� mor� efficient�  �
I� thi� light�� � designe� tw� SYSLI� module� whic� interfac� t� �
the ZCPR2 System and provide ZCPR2-specific functions.

    ZGPIN� i� th� installatio� routin� whic� initialize� al� o� �
th� interna� dat� area� o� thes� tw� ZCPR2-specifi� modules�  Th� �
fron� o� eac� o� th� ZCPR� utilitie� i� unifor� betwee� al� o� �
th� standar� utilities�� an� th� positio� o� th� buffe� dat� her� �
i� th� sam� betwee� al� o� th� utilities�  ZGPIN� know� abou� th� �
structur� an� read� dat� fro� it� feedin� thi� dat� t� th� SYSLI� �
modules.  This data falls into eight functional areas:

         1�  Path� -- i� a� externa� pat� available� and� i� so� �
wher� i� i� located��  � requirement� fla� i� presen� whic� tell� �
ZGPIN� i� pat� informatio� i� use� b� th� particula� utility��  � �
par� o� th� standar� buffe� configuratio� include� a� interna� �
pat� whic� ma� b� use� i� plac� o� o� t� supplemen� th� externa� �
path��  Naturally� eac� utilit� ca� hav� it� own� uniqu� interna� �
path��  Onl�� th� HEL� utilit� use� bot� externa� an� interna� �
paths�� wher� i� � searc� alon� th� externa� pat� fails�� i� �
switche� t� searchin� alon� th� interna� pat� befor� givin� up�  �
The other utilities search along only one path or the other.

         2��  Multipl� Comman� Lin� Buffe� -- i� thi� buffe� �
available�� and�� i� so� wher� i� i� located�  Again� a� wit� al� �
o� thes� majo� functiona� sections�� � requirement� fla� i� �
availabl� t� indicat� i� thi� dat� i� use� b� th� program��  I� �
so�� ZGPIN� initialize� th� SYSLI� buffer� accordingly��  I� not� �
it does not touch the SYSLIB buffers.

         3��  Maximu� Use� an� Dis� -- wha� ar� th� maximu� �
numbe� o� disk� availabl� an� th� maximu� use� are� accessable�  �
Tw� byte� ar� allocate� t� provid� thi� information�� an� � thir� �
requirement� byt� tell� ZGPINӠ i� th� utilit�� need� thi� �
information.

         4��  Allo�� Dis� o� Use� Chang� -- i� th� use� t� b� �
permitte� t� referenc� � differen� use� are� o� t� referenc� � �
differen� disk��  Again�� � requirement� byt� i� als� available�  �
Utilitie� whic� pa� attentio� t� thes� buffer� ca� b� se� u� t� �
allo� th� use� t� referenc� an� use� are� o� th� curren� dis� bu� �
no� an� othe� dis� o� t� referenc� th� curren� use� are� o� an� �
dis� bu� no� th� curren� disk�  I� name� directorie� ar� enabled� �
� DI� for� i� permitte� regardless� bu� element� o� � D� for� ma� �
b� disabled��  Hence�� i� JEFƠ i� know� t� th� use� fro� hi� �
curren� directory�� h� ca� referenc� thi� director� b� th� nam� �
JEF� bu� no� b� it� D� form�  � di� thi� t� allo� flexibilit� an� �
security at the same time.

         5��  Bas� o� Privilege� Use� Area� an� Passwor� -- wha� �
i� th� firs� privilege� use� are� (thi� are� an� al� use� number� �
greate� tha� thi� becom� privileged� an� wha� i� th� passwor� �
required to enter or reference it? �
         6�  Curren� User/Dis� Indicato� an� DM� Addres� -- thi� �
permit� non-standar� value� fo� thes� item� t� b� selecte� fo� � �
particula� utility��  Th� DM� Addres� i� o� specia� concer� sinc� �
th� SYSLI� module� assum� 80� unles� tol� otherwise�� and� i� th� �
programme� change� thi� i� th� cours� o� th� utility�� h� MUS� �
infor� SYSLI� o� th� ne� DM� addres� s� tha� i� ca� continu� t� �
function.

         7��  Name� Director�� Buffe� an� Fil� Dat� -- thes� �
buffer� provid� th� addres� o� th� memory-base� name� director� �
buffe� (o� �� i� non� i� available)�� th� maximu� numbe� o� �
director� entrie� permitte� i� � name� director� buffe� o� file� �
an� th� nam� o� th� disk-base� name� director� fil� t� searc� fo� �
i� necessar� (NAMES.DI� i� assumed)��  Again� � requirement� fla� �
indicate� i� thi� i� necessar� fo� th� utility��  GENIN� install� �
thi� dat� an� prompt� th� use� fo� thi� dat� base� o� th� �
settings of these requirements flags.

         8�  Clas� o� Utilit� -- thi� i� � one-byt� buffe� whic� �
i� use� b� GENIN� t� determin� i� specia� installatio� operation� �
ar� t� b� performed��  I� so�� thi� buffe� i� followe� (ove� 1� �
byte� later�� b�� th� specia� buffer� specifi� t� tha� utilit� �
which are to be installed.

    Finally�� SYSLIB�� a� mentione� before�� provide� � grou� o� �
routine� i� it� tw� module� whic� provid堠 ZCPR2-specifi� �
functions��  Thes� includ� resolutio� o� DIҠ form� an� othe� �
usefu� functions��  Th� reade� i� invite� t� stud� th� SYSLI� 2.� �
manual� an� t� examin� th� sourc� cod� o� th� utilitie� t� se� �
ho�� thes� routine� com� int� play��  The� reall� sav� � lo� o� �
programmin� overhea� an� fi� i� nicel� togethe� a� a� integrate� �
set of utility routines.




3.5  Redirectable I/O

    Redirectabl堠 I/Ϡ a� implemente� unde� ZCPR�� viᠠ th� �
IOLOADER�� DEVICE�� an� SYSI� programs/module� meet� � numbe� o� �
need� i� th� ZCPR� environment��  Th� requirement� satisfie� b� �
this redirectable I/O system include:

         (1��� th� abilit�� t� dynamicall�� chang堠 th堠 I/� �
environment�  Specialize� devic� driver� ca� b� adde� a� wil� an� �
change� wheneve� desired�� an� th� I/� syste� ca� b� mad� a� �
comple�� a� desire� withou� regar� t� th� amoun� o� memor�� take� �
u� sinc� � variet� o� driver� ca� b� implemente� a� disk-base� �
packages which are loaded only when needed.

         (2�� th� abilit�� t� refe� t� th� I/Ϡ driver� b�� � �
mnemoni� nam� an� t� b� abl� t� easil� determin� wha� driver� ar� �
currentl�� availabl� an� wha� the� do��  Th� DEVICŠ progra� wa� �
designed explicitly for this purpose. �
         (3�� th� abilit� t� implemen� a� comple� � se� o� I/� �
driver� a� desire� withou� bein� concerne� abou� th� spac� �
limitation� o� th� syste� tracks�  Th� mai� O� ca� b� loade� fro� �
th� syste� track� wit� � minimu� o� I/� suppor� (say�� consol� �
only)�� an� th� defaul� I/� driver� ca� b� immediatel�� overlai� �
(by an IOLOADER command in a STARTUP.COM file).



3.6  ZCPR2 Utility Overview

    ɠ thin� tha� thi� topi� ha� bee� beate� t� deat� i� th� �
Concept� Manua� an� th� User'� Guide� bu� tw� point� t� emphasiz� �
her� ar� tha� (1� th� ZCPR� utilit� program� ar� clearl� divide� �
int� classes�� eac� meetin� need� i� specifi� functiona� areas� �
an� (2� th� ke� issue� ar� syste� flexibility�� mutability�� an� �
susceptabilit� t� th� user'� whims�  ZCPR� i� intende� t� b� use� �
a� � too� whic� increase� th� user'� productivity�� and� a� such� �
it can be bent to meet the user's demands.

    The major classification areas of the utilities are:

         o I/O                    o Command Files
         o Directories            o Named Directories
         o Disk Utilities         o ZCPR2 Residents and Alts
         o Library Utilities      o Help (Online Documentation)
         o Menu Preprocessor      o File Comparison Utilities
         o File Copy Utility      o Misc

    I� th� are� o� I/O�� � redirectabl� I/� syste� i� outlined� �
allowin� th� use� t� se� u� a� man� I/� drive� package� a� h� �
wishes��  Th� syste� i� base� o� name� devices�� an� th� use� ca� �
no�� redirec� I/Ϡ b�� name�� rathe� tha� havin� t� remembe� �
arbitrary mnemonics for implementation-specific devices.

    Th� XDIR� utilit� allow� th� use� t� displa� th� content� o� �
on� o� mor� directorie� i� � numbe� o� formats�� dependin� o� hi� �
tast� an� need� a� th� time�  I� als� provide� fo� � fil� scanne� �
which can be used to keep track of files for him.

    DU� i� � hand� too� t� hav� around��  I� allow� th� use� t� �
manipulat� dis� lik� DD� allow� hi� t� manipulat� memory�� an� �
accidentia� fil� erasure� an� th� lik� ca� b� correcte� withou� �
any damage being done.

    Th� L� utilit� wa� � goo� idea�� an� LRUN� an� LDIR� exten� �
thi� ide� t� b� mor� practica� i� th� ZCPR� environment�  Partic�
ularly� thes� provid� th� bas� fo� a� extende� comman� processor�  �
Th� us� o� path� make� LRUN� stan� ou� fro� it� predecessor� �
LRUN.


    Th� men�� syste� stand� ou� a� � nic� wa� t� simplif�� th� �
user'� interface��  � lik� th� idea� o� havin� multipl� menu� an� �
no� bein� locke� int� an� on� men� a� bein� tw� o� th� stron� �
point� o� thi� idea�  I� particular� yo� ca� mov� fro� on� direc�
tor�� t� th� next�� automaticall� movin� int� an� ou� o� menu� a� �
yo� go.

    Th� fil� compar� utilitie� ar� convenience� i� th� ZCPR� �
environment��  The� shin� i� bein� abl� t� cros� director�� boun�
daries��  CR� provide� name� directories�� fil� lists�� an� othe� �
nic� function� no� foun� i� CRCK� it� conceptua� (bu� no� design� �
predecessor.

    MCOP٠ i� instrumenta� i� openin� u� directorie� beyon� use� �
15��  Wit� it�� yo� ca� cop� b� D� o� DI� for� int� virtuall� an� �
director� fro� an� directory.  MCOPY is also used for backup.

    Comman� fil� processin� i� extende� b� SUB� an� ZEX�� wit� �
mor� an� mor� emphasi� bein� place� o� ZEX�  Th� spee� an� flexi�
bilit� o� ZE� see� t� greatl� outweig� th� los� o� TP� a� advan�
tages.

    Name� directorie� pu� � whol� ne� ligh� o� th� system� �
makin� i� muc� mor� use� friendl� an� offerin� level� o� securit� �
no� foun� before.

    Th� ZCPR� Resident
� an� Alternate� nicel� exten� basi� capa�
bilitie� frequentl� neede� b� th� user��  Ther� i� stil� roo� fo� �
improvement�� however�  Bein� abl� t� handl� name� directorie� b� �
th� residen� command� woul� b� nice�� an� bein� abl� t� us� � DI� �
for� whereve� � D� for� applie� woul� b� ver�� nice��  PATȠ i� �
instrumenta� i� establishin� an� changin� comman� an� file-searc� �
environs� an� GENIN� make� th� installatio� proces� muc� simpler.

    Onlin� documentatio� a� provide� b� HELP� i� ver� nice� but� �
unfortunately�� � luxur� permitte� onl� t� thos� wh� hav� � sig�
nifican� amoun� o� dis� spac� i� whic� t� work��  Th� syste� �
reall�� shine� whe� yo� ca� cal� u� hel� whe� yo� ar� i� develop�
ment�� an� changin� disk� (a� woul� b� necessar� o� � smalle� �
system� t� fin� th� appropriat� hel� file� reduce� th� utilit� o� �
th� system.

    On� ite� t� not� i� closin� i� tha� � hav� attempte� t� �
desig� man�� o� thes� utilitie� t� b� immun� t� change� i� th� �
dis� environmen� whil� the� ar� running�  MCOPY� fo� instance� i� �
th� Multipl� Cop� Mod� (� option� allow� th� use� t� chang� disk� �
withou� havin� t� war� boo� betwee� eac� grou� o� file� copied.


4.0 What Next?

    Goo� question�  Well� firs� o� all� � woul� lik� t� emphasi� �
two points:

         (1�� th� ZCPR� Syste� i� probabl� no� perfect��  Ther� �
ar� boun� t� b� error� whic� sho� themselve� i� th� cod� fro� �
tim� t� time��  An� softwar� o� suc� complexit� i� boun� t� hav� �
the� b� it� ver� comple� nature.

         (2� th� ZCPR� Syste� i� likel� t� mutat� again�  I� wa� �
designe� from�� amon� othe� things�� � lac� o� satisfactio� wit� �
CP/� an� ZCPR1�� and�� a� ZCPR� i� use� mor� an� more�� ne� idea� �
ar� boun� t� com� u� a� t� ho� t� d� thing� bette� o� ho�� t� �
refin� curren� idea� t� mak� th� use� environmen� mor� produc�
tive.

    I� th� wa� o� fixe� t� th� ZCPR� System�� periodi� update� �
ar� t� b� expected��  Hopefully�� tho�� notation� o� th� error� �
encountere� wil� b� accumulate� an� th� syste� wil� b� update� �
onl�� o� occasio� i� respons� t� � numbe� o� errors��  Thi� i� a� �
oppose� t� updatin� th� syste� ever� tim� someon� find� a� erro� �
o� decide� h� want� t� mak� � chang� t� it��  Additionally�� con�
figuratio� managemen� control� should� i� m� opinion� b� applied� �
wit� forma� procedure� establishe� fo� erro� analysis�� duplica�
tion� correction� chang� proposa� submission� an� redistribution�  �
Thi� wil� probabl� no� happen�� simpl� becaus� o� th� amoun� o� �
effor� involved�� bu� fro� m� professiona� experiences�� ɠ fee� �
tha� thi� i� � ke� wa� t� satisfactoril�� maintai� th� ZCPR� �
System.

    A� fo� mutation�� i� i� good�� a� � rule�  Natura� Selectio� �
allow� th� stronges� trait� t� flouris� whil� th� weake� trait� �
di� out�� an� � fee� tha� th� sam� shoul� b� tru� o� software�  �
Th� goo� idea� shoul� b� nurture� an� elaborate� o� whil� th� ba� �
idea� shoul� b� noted�� learne� from�� an� discarded�  Th� resul� �
i� � bette� an� bette� productiv� environmen� a� tim� goe� along�

    On� thin� abou� th� Publi� Domai� tha� � a� reall� sol� o� �
i� th� learnin� environmen� tha� i� fosters�  Peopl� ca� tak� th� �
sourc� cod� t� program� an� lear� ho� the� function��  The�� ca� �
the� us� thi� knowledg� t� mak� th� program� "better�� ("better"� �
o� course�� i� � subjectiv� concept)��  Th� poin� i� tha� peopl� �
lear� an� gro� fro� this��  Tha� i� good��  A� th� reade� ha� �
probabl�� alread�� noted�� th� entir� sourc� cod� t� th� ZCPR� �
Syste� an� SYSLI  i� availabl� fo� peopl� t� stud�� an� lear� �
from��  Thi� cod� ma� no� b� th� best�� bu� i� i� good�� an� i� �
provide� � good�� fairl� well-documente� bas� fro� whic� t� star� �
th� learnin� process.

    Enjoy!

                                       Richard Conn