he    ZCPR2 -- An Enhanced Z80-Based Replacement for the CP/M CCP
fo Concepts Manual                                    Page #


                   Concepts Manual for ZCPR2

1.0  Introduction

    Th堠 Z80-base� Comman� Processo� Replacemen� Versio� 2� �
(ZCPR2�� i� � replacemen� fo� th� CP/� Consol� Comman� Processor� �
(CCP�� whic� create� a� extremel� capabl� an� flexibl� environ�
ment�� placin� � totall� ne� interfac� o� th� user'� CP/� system�  �
Th� primar�� purpos� o� ZCPR� i� t� improv� th� user'� product�
ivit� b� givin� hi� a� environmen� whic� i� muc� mor� responsiv� �
t� hi� need� an� configurabl� t� hi� specifi� desire� tha� CP/� �
2.� whil� stil� remainin� CP/� 2.� compatabl� an� allowin� hi� t� �
ru� most�� i� no� all�� o� hi� CP/� softwar� wit� littl� o� n� �
modification.

    T� giv� yo� � firs� pictur� o� ZCPR2�� let'� tak� � compara�
tiv� loo� a� � runnin� CP/� syste� an� � runnin� ZCPR� system.


-- Diagram 1 --

Address        CP/M System              ZCPR2 System

High Memory -> ---------------------    -------------------------
              | BIOS              |    | Modified BIOS         |
BDOS+0E00H  -> ---------------------    -------------------------
              | CP/M 2.2 BDOS     |    | CP/M 2.2 BDOS         |
CCP +0800H  -> --------------------- -- -------------------------
              | CP/M 2.2 CCP      | T  | ZCPR2                 |
CCP Base    -> --------------------- P  -------------------------
              | Scratch Area      | A* | Scratch Area          |
100H        -> --------------------- -- -------------------------
              | CP/M Buffers et al|    | ZCPR2 Buffers et al   |
 0H        -> ---------------------    -------------------------


*TP� � Transien� Progra� Area�� whic� cover� th� Scratc� Are� an� �
the CCP or ZCPR2

             CP/M and ZCPR2-Based Executing Images


    A� th� reade� ca� see�� � ZCPR2-base� syste� i� structure� �
lik� � CP/M-base� system��  Fo� al� intent� an� purposes�� ZCPR� �
look� lik� CP/� t� � progra� designe� t� ru� unde� CP/M��  Th� �
differenc� i� mainl� i� th� wa� ZCPR� look� t� th� user.



1.1  Another Look at CP/M 2.2

    CP/͠ (� wil� refe� t� CP/� 2.� a� CP/� fro� her� on� i� a� �
Operatin� System�� whic� i� � compute� progra� whos� functio� i� �
t� manag� th� resource� o� th� computer�  Al� computer� hav� fou� �
basi� resource� t� b� manage� b� th� operatin� system:

         o Memory
         o Processors and Processes (Process = running Program)
         o Devices
         o Information

    I� th� wa� o� Memor� Management� CP/� doe� ver� little�  Th� �
basi� memor� structur� i� define� a� i� th� previou� diagram� an� �
tha� i� th� exten� o� th� memor� managemen� performe� b� CP/M.

    Likewise�� i� th� wa� o� Proces� Management� CP/� agai� doe� �
ver�� little��  Sinc� ther� i� onl� on� processo� involved�� n� �
processo� managemen� i� don� a� all��  Wit� onl�� on� proces� �
involve� (typically)�� CP/͠ simpl� start� th� proces� an� the� �
relinquishe� al� control��  Onc� th� proces� ha� control�� i� ha� �
complet� contro� ove� th� entir� microcomputer�� an� CP/͠ doe� �
nothin� t� sto� i� fro� doin� anythin� i� wishe� t� do.

    Th� beaut� o� CP/� i� th� wa� i� doe� devic� an� informatio� �
management��  Devic� Management� i� performe� b� th� Basi� Input-�
Outpu� System� (BIOS� o� CP/M��  Th� BIO� provide� � standardized� �
hardware-independen� interfac� t� th� device� o� th� microcom�
pute� regardles� o� wha� th� actua� device� are��  Thes� device� �
ar� interface� t� b� wa� o� � tabl� o� jum� instruction� locate� �
a� th� beginnin� o� th� BIOS�� an� th� parameter� passe� t� thes� �
routines�� th� parameter� passe� fro� thes� routines�� an� th� �
function� o� thes� routine� ar� precisel� defined��  Th� softwar� �
an� programme� d� no� nee� t� kno� HO� th� routine� perfor� thei� �
functions� th� softwar� an� programme� onl� nee� t� kno� wha� th� �
routine� d� an� ho� t� communicat� wit� them��  Thi� i� � proces� �
box� o� blac� box� concept:


-- Diagram 2 --               |
                             |  Input Parameters
                             |  are precisely known
                             |
                             V                The Process Box is
                   ---------------------      a "Black Box", and
      Process Box: | Function is       |  <-- it is not needed
                   � Precisel� Know�   �      to know what is in
                   ---------------------      the box to use it
                             |
                             |  Output Parameters
    The Process Box          |  are precisely known
    Concept for CP/M         |
                             V

    Fo� example�� th� fourt� entr� i� th� BIO� Jum� Tabl� i� th� �
Consol� Inpu� Routine�� an� i� orde� fo� � progra� t� obtai� � �
characte� fro� th� user'� console�� regardles� o� wha� typ� o� �
devic� th� consol� ma� b� (suc� a� � CR� o� printin� terminal)� �
al� th� softwar� ha� t� d� i� mak� � subroutin� cal� t� th� �
routin� startin� a� BIO� � � (eac� Jum� Tabl� Entr�� i� thre� �
byte� long)� an� th� BIO� wil� retur� th� nex� characte� fro� th� �
consol� i� th� � register�  T� outpu� � characte� t� th� console� �
th� softwar� nee� onl� plac� tha� characte� int� th� à registe� �
an� mak� � cal� t� th� subroutin� startin� a� BIO� � 12.

    Th� BIOӠ perform� al� o� th� devic� contro� function� ne�
cessar� fo� CP/� an� th� program� whic� ru� unde� CP/� t� d� mos� �
o� wha� the� nee� t� do��  Surprisingly� ther� ar� onl� seventee� �
general-purpos� function� require� t� provid� th� hardwar� inter�
face� necessar� t� perfor� al� characte� an� dis� I/� unde� CP/M�  �
Thes� function� ar� reall� quit� simpl� whe� yo� com� dow� t� �
loo� a� them�  The� are:

         1) Initialization Functions
              � Col� Boo� Initializatio� (whe� th� syste� i�
                 firs� turne� on)
              o Warm Boot Initialization (performed periodically
                 after the system is turned on)

         2) Character Input/Output Functions
              o Console Status (check for availability of a
                 character at the console)
              o Console Input
              o Console Output
              o List Status (check to see if List Device is
                 ready to output the next character)
              o List (Printer) Output
              o Punch Output
              o Reader Input

         3) Disk Input/Output Functions
              o Home Disk (move head to Track 0)
              o Select Disk (which disk to use)
              o Select Track
              o Select Sector
              o Select Memory Address to Read Into or Write
                 From
              o Read Block (at selected Track and Sector) into
                 Memory (at selected Memory Address)
              o Write Block (to selected Track and Sector) from
                 Memory (at selected Memory Address)
              o Logical-to-Physical Sector Translation (for
                 efficiency of disk use)



    Th� BIOS�� then� create� � Virtua� Machine� whic� i� � hypo�
thetica� compute� tha� al� CP/� softwar� run� under��  I� al� �
cases�� thank� t� th� BIO� design�� thi� hypothetica� compute� i� �
th� sam� compute� regardles� o� wha� th� actua� hardwar� o� th� �
microcompute� is��  I� make� n� differenc� i� � 1/4� flopp� disk� �
a� 100� bytes/disk�� 8� flopp� disk� a� 600� bytes/disk�� o� 8� �
Wincheste� har� disk� a� 5� bytes/dis� ar� used��  Th� softwar� �
talk� t� al� o� thes� device� i� th� sam� way�� an� thi� make� �
suc� softwar� transportabl� A� TH� BINAR� LEVE� betwee� an�� tw� �
microcomputer� runnin� CP/M�

    Th� fourt� an� fina� functio� o� a� operatin� syste� i� �
Informatio� Management�� whic� boil� dow� t� th� contro� o� file� �
o� disk��  CP/� shine� her� too�� extendin� th� virtua� machin� �
concep� a� applie� t� hardwar� b� th� BIO� t� file� o� disk�  Th� �
Basi� Dis� Operatin� System� (BDOS� portio� o� CP/� create� thi� �
file-oriente� virtua� machine�  T� illustrat� m� point� som� (an� �
b� n� mean� ALL� o� th� function� provide� b� th� BDO� are:

         o Reset Disk System
         o Select Disk
         o Create File (actually, create a directory entry for
            a file)
         o Open File (make a file ready for reading or writing)
         o Close File (terminate the read/write process)
         o Delete File
         o Rename File
         o Set Memory Address to Read Into or Write From
         o Read Next Block from File
         o Write Next Block into File

    Not� th� similarit� betwee� thes� BDO� function� an� th� �
BIOӠ dis� functions��  Thes� BDO� function� ar� accesse� i� � �
differen� wa�� fro� th� BIOS�� bu� th� proces� bo�� concep� i� �
maintained��  Al� tha� on� need� t� kno� i� wha� th� inpu� para�
meter� are� wha� th� outpu� parameter� are� an� wha� th� functio� �
performe� is��  Onc� more�� transportabilit� i� realize� AԠ TH� �
BINAR� LEVEL� bu� thi� tim� i� i� wit� respec� t� th� informatio� �
manipulate� b� th� computer��  Thi� virtua� machin� greatl� sup�
port� th� exchang� an� sal� o� software�  I� effect� th� creatio� �
o� CP/͠ spawne� a� industr� base� o� somethin� no� conceive� �
before��  th� exchang� o� softwar� regardless�� b� an� large�� o� �
th� actua� compute� hardwar� involve� an� independen� o� an� on� �
compute� hardwar� manufacturer��  Al� o� thi� i� cause� b�� th� �
CP/� Virtua� Machine.


1.2  Where ZCPR2 Fits In

    Let'� revie� Diagra� 1�� whic� compare� CP/� 2.� t� � ZCPR2-�
base� system:


-- Diagram 1 --

Address        CP/M System              ZCPR2 System

High Memory -> ---------------------    -------------------------
              | BIOS              |    | Modified BIOS         |
BDOS+0E00H  -> ---------------------    -------------------------
              | CP/M 2.2 BDOS     |    | CP/M 2.2 BDOS         |
CCP +0800H  -> --------------------- -- -------------------------
              | CP/M 2.2 CCP      | T  | ZCPR2                 |
CCP Base    -> --------------------- P  -------------------------
              | Scratch Area      | A* | Scratch Area          |
100H        -> --------------------- -- -------------------------
              | CP/M Buffers et al|    | ZCPR2 Buffers et al   |
 0H        -> ---------------------    -------------------------


*TP� � Transien� Progra� Area�� whic� cover� th� Scratc� Are� an� �
the CCP or ZCPR2

             CP/M and ZCPR2-Based Executing Images


    A� th� reade� ca� see�� th� Virtua� Machin� o� CP/� i� lef� �
more-or-les� intac� i� th� ZCPR� environment��  Th� BDO� i� lef� �
unchanged�� an� th� BIO� i� modifie� (bu� thi� i� onl� i� mino� �
way� an� th� interface� ar� lef� unaffected)��  Hence�� unde� �
ZCPR2� w� ar� dealin� wit� th� sam� Virtua� Machine� an� th� sam� �
softwar� whic� ra� unde� CP/� 2.� wil� als� ru� unde� ZCPR2� �
excep� i� thos� fe� case� wher� th� softwar� use� th� CCР t� �
perfor� som� function� (i� whic� case� ZCPR� ma�� o� ma�� no� �
work).

    ZCPR�� provide� � ver� versatil� interfac� betwee� th� use� �
an� hi� microcompute� wit� it� software��  Th� windo�� throug� �
whic� th� use� see� hi� syste� i� change� radicall�� b�� ZCPR2� �
and�� i� m� opinion� th� microcompute� syste� become� � muc� mor� �
usefu� an� versatil� too� an� th� user'� productivit�� increase� �
significantl�� becaus� o� ZCPR2��  Thi� documen� i� intende� t� �
cove� th� basi� concept� o� ZCPR2� emphasizin� ho� ZCPR� enhance� �
th� user'� capabilitie� an� improve� hi� productivity�  Th� read�
e� i� invite� t� rea� th� Rational� Manua� i� h� want� t� dis�
cove� wh� ZCPR� an� ZCPR� wer� create� i� th� firs� plac� an� wh� �
th� thing� abou� t� b� describe� wer� don� th� wa�� the�� were�  �
Thi� Concept� Manua� jus� covers�� b� an� large� wha� ZCPR� does� �
an� onl� occasionall� explain� wh� i� wa� don� thi� way.


2.0  ZCPR2 Overview

    ZCPR� provide� a� interactiv� interfac� t� th� user'� micro�
compute� whic� i� significantl� extende� ove� tha� interfac� �
provide� b� th� CP/� 2.� CCP��  Th� use� i� invite� t� refe� t� �
th� Rational� Manua� fo� � detaile� compariso� betwee� th� CP/� �
2.�� CC� an� ZCPR2��  � workin� knowledg� o� CP/� 2.� i� assume� �
fo� th� followin� discussion��  Also�� th� followin� discussio� �
pertain� t� ZCPR� system� whic� ar� configure� i� th� recommende� �
wa� (se� th� Installatio� Manual)�  Ther� ar� ove� 4,000,00� way� �
(conceivably�� tha� on� ma� configur� � ZCPR� syste� fo� hi� ow� �
uses� and� a� � genera� rule� th� feature� describe� belo� ma� b� �
turne� o� o� of� a� th� syste� manage� desires.

2.1  Directories under ZCPR2

    I� general�� ZCPR� i� abl� t� addres� u� t� sixtee� logica� �
disks� eac� containin� u� t� thirty-tw� directories�  � directory� �
unde� ZCPR� i� � use� are� o� � disk� an� i� i� identifie� b� th� �
combinatio� o� th� dis� lette� an� th� numbe� o� th� use� are� �
(lik� A1� o� B7� o� b� � mnemoni� nam� (lik� JEF� o� ROOT)��  Th� �
director� i� � logica� concept�� an� physically�� i� keepin� wit� �
CP/� 2.� compatability� ther� i� onl� on� physica� fil� director� �
(whic� keep� trac� o� al� th� files� o� eac� logica� disk��  � �
use� numbe� i� � par� o� eac� entr� i� th� fil� directory�� an� �
thi� use� numbe� associate� th� fil� wit� th� use� are� o� dis� �
(directory� whic� tha� fil� reside� in.

    Th� disk/use� wa� o� identifyin� � director� (calle� th� DU� �
for� fro� her� on� i� standar� t� th� ZCPR2-residen� command� an� �
th� ZCPR2-specifi� utilities��  I� al� cases� thes� command� wil� �
permi� us� o� th� DU�� for� whereve� th� simple� D� for� wa� use� �
unde� CP/� 2.2� an� eithe� th� � o� th� � par� o� th� DU� for� i� �
optional.

    Hence�� th� use� ca� "sit� i� an� director� o� an� dis� an� �
readil�� wor� wit� file� i� an� othe� director�� o� an�� disk�  �
Likewise�� wher� th� use� use� t� b� abl� t� prefi� � CO͠ fil� �
wit� � dis� lette� i� orde� t� temporaril� lo� int� anothe� dis� �
an� extrac� tha� fil� fro� it�� th� ZCPR� use� ca� prefi� � CO� �
fil� wit� � D� form.

    Finally�� th� thir� logica� extensio� o� thi� D� for� i� t� �
allo�� th� use� t� emplo� i� t� "lo� into� � directory�� lik� h� �
use� th� D�� for� befor� t� simpl� chang� disk� an� th� "USE� n� �
comman� t� chang� use� areas.

    Th� ZCPR�� promp� change� s� tha� i� wil� alway� tel� th� �
use� wha� director� h� i� logge� into��  ZCPR� ca� b� configure� �
t� displa� "d>� o� "d0>� whe� th� use� i� logge� int� use� are� � �
o� � particula� dis� (not� "A>� an� "C>� i� th� example)��  A� � �
sid� note�� becaus� o� th� flexibilit� o� th� D� form�� th� USE� �
comman� i� n� longe� necessar� an� i� no� availabl� unde� ZCPR� �
unles� � programme� implement� i� a� � transient. �
    ZCPR� i� � replacemen� fo� th� CP/� 2.� CCP�� bu� i� i� onl� �
� par� o� th� ZCPR� SYSTEM��  Th� ZCPR� System� i� � collectio� o� �
program� consistin� o� ZCPR� itsel� an� � serie� o� utilitie� �
designe� t� augmen� th� capabilitie� o� ZCPR2��  Al� o� thes� �
utilitie� respon� t� th� ZCPR� D� form�� jus� lik� th� ZCPR2-�
residen� commands�� whil� th� conventiona� CP/� utilitie� d� not�

    Thes� ZCPR� utilities�� however�� suppor� � secon� for� o� �
director�� specificatio� a� wel� a� th� D� form��  Thi� i� th� �
name� director� specification�� calle� th� DI� for� fro� no�� on�  �
Th� DI� for� i� � logica� associatio� betwee� � mnemoni� nam� an� �
� disk/use� area�  Fo� example� th� director� nam� o� ROO� ma� b� �
assigne� t� mea� A0�� JEF� t� mea� C4�� BACKU� t� mea� C0�� etc�  �
Al� o� th� ZCPR� utilitie� (b� an� large� recogniz� thi� for� a� �
well.

    Som� o� th� ne� ZCPR� utilitie� ar� designe� t� specificall� �
dea� wit� name� directories��  Thes� utilitie� an� thei� basi� �
function� are:

         o CD -- Log Into a Named Directory (like the simple DU:

      command, but far more is done)

         o PWD -- Print Working Directory; this command simply
                   lists the names of the directories accessible
                   to the user

         � MKDI� -- Mak� � Directory� creat� � ne� name�
                     directory or modify an existing one

         o LD -- Load a Named Directory into the Named
                  Directory Buffer in Memory

    Wit� th� name� director� environmen� full� implemented�� th� �
user'� ZCPR� syste� ca� b� configure� i� � numbe� o� differen� �
way� beyon� eve� th� 4,000,000� basi� way� ZCPR� ca� b� config�
ured��  I� particular�� � director� tre� structur� ca� b� se� up� �
simila� t� th� UNI� concept�� o� � director� mes� structur� i� �
als� possible��  Fo� example�� th� followin� environmen� i� on� �
suc� workin� environmen� whic� ca� b� create� unde� ZCPR2:


-- Diagram 2 --

      ----------------- ROOT -----------------------
      |                /    \                      |
    ROBERT         JEFF      LINDA               BOSS
      |           / |  \    / | | \              | ||
   HARDWORK      JA CB JC  LA CB LC LD      WATCHJ |WATCHL
                /          |        |           WATCHR
               GAMES      SCHOOL   GAMES


            Sample ZCPR2 Named Directory Structure


    Notes:
         ROOT is the base of the system
         CB and GAMES under JEFF are the same directories as
              CB and GAMES under LINDA
         Depending on how the Named Directory files were set
              up, it would be possible to readily move from
              any directory to any other directory, or the
              user could be forced to move along a tree
              (i.e., you could go to JEFF directly from SCHOOL
              or be forced to follow the path SCHOOL -> LA ->
              LINDA -> ROOT -> JEFF in order to get there --
              it is up to the person who sets up the Named
              Directory system)


    Th� topi� o� Name� Directorie� i� quit� involved�� an� � �
whol� sectio� i� devote� t� thi� later�  Thi� i� jus� a� overvie� �
t� whe� you� appetite�� s� I'l� mov� o� t� th� othe� feature� no� �
an� g� int� mor� detai� later.


2.2  ZCPR2 Resident Commands

    Lik� th� CP/� 2.� CCP�� ZCPR� contain� som� command� withi� �
itself��  I� contain� al� o� th� CC� command� (excep� USER� whic� �
isn'� neede� anymore� an� � fe� more�� bu� al� o� th� ZCPR� resi�
den� command� ar� differen� wit� logica� extension� t� th� CC� �
commands��  W� hav� alread� see� th� D� form�� whic� ca� b� use� �
wit� an�� ZCPR� residen� command��  Not� tha� th� D� for� i� � �
logica� extensio� o� th� D� prefi� unde� CP/� 2.2.

    Again�� wit� al� o� th� possibl� ZCPR� configurations�� th� �
followin� discussio� applie� t� th� recommende� configuration.

    Th� followin� i� � compariso� o� th� variou� residen� com�
man� form� unde� th� CP/� 2.� CC� an� ZCPR2:



             Comparison of ZCPR2 and CP/M 2.2 CCP


Functio�                      ZCPR� Comman�       CC� Command
Display $DIR File Names       DIR DU:afn          DIR D:afn
Display $SYS File Names       DIR DU:afn S        No Equivalent
Display All File Names        DIR DU:afn A        No Equivalent

Erase Specified Files         ERA DU:afn          ERA D:afn
Erase with Verify             ERA DU:afn V        No Equivalent

Renam� Fil�                   RE� DU:ufn=ufn�     RE� DU:ufn=ufn2
Rename Over Existing File     REN DU:ufn=ufn2     No Equivalent

Print File on Console         TYPE DU:ufn P       TYPE D:ufn
 Without Paging
Print File on Console         TYPE DU:ufn         No Equivalent
 With Paging
Print File on Printer         LIST DU:ufn         No Equivalent

Save Memory into File         SAVE n DU:ufn       SAVE n D:ufn
Save Memory into File         SAVE n DU:ufn       No Equivalent
 With Overwrite Warning
Save Memory into File         SAVE nH DU:ufn      No Equivalent
 and Specify Size in Hex
Save Memory into File         SAVE n DU:ufn S     No Equivalent
 and Specify Number of        or
 Blocks                      SAVE nH DU:ufn S

Load File Anywhere Into       GET adr DU:ufn      No Equivalent
 Memory

Reexecute Last Transient      GO params           No Equivalent
 Without Reloading It

Call Subroutine Anywhere in   JUMP adr            No Equivalent
 Memory

Change Disk                   D:                  D:
Change User                   U:                  USER n
Change Disk and User at       DU:                 No Equivalent
 Same Time


2.3  ZCPR2 Standard Transient Commands

    Al� o� th� CP/M-supplie� transien� command� wil� wor� wit� �
ZCPR2� an� ZCPR� supplie� severa� additiona� ZCPR2-specifi� tran�
sients� a� indicate� i� th� followin� tables:


           Standard CP/M 2.2 Transients under ZCPR2

Program   Function                           Functional Changes
ASM       Intel 8080 Assembler               No Change
DDT       Debugger                           No Change
DUMP      File Dump                          No Change
ED        Character-Oriented Text Editor     No Change
LOAD      HEX-to-COM File Converter          No Change
MOVCP�    Reconfigur� CP/� fo� Differen�     Wil� Onl� Affec�
           Memory Size                        BDOS -- ZCPR2
                                              Mus� B�
                                              Reassembled
PIP       File and Peripheral Transfer       No Change
STAT      Statistics display, etc            No Change
SUBMIT    Batch Command Processor            No Change
SYSGEN    Get/Put System Image on Disk       No Change


                   Standard ZCPR2 Transients

Program   Function
CD        Log Into Named Directory with Extended Preprocessing
COMPARE   Utility to Compare Two Files
CRC       Cyclic Redundancy Check Utility
DIFF      Utility to List File Differences
DU2       Disk Utility, based on DU
ECHO      Utility to Echo Its Command Line
ERASE     File Erase Utility
FINDBAD   Bad Block Scanner, based on FINDBD
GENINS    Utility to Install Itself and Other Utilities
HELP      Online Documentation System
LD        Load Named Directory Buffer
LU/LRUNZ  Command Library Utility and Extended Command Processor
MCHECK    Menu File Syntax Checker
MCOPY     File Copy Utility which can replace PIP in many cases
MENU      Extended Command PreProcessor designed to create menus
MKDIR     Create Named Directory File
PATH      Define/Display ZCPR2 Paths
PROTECT   Utility to Set File Attributes
PWD       Print Current Named Directory Environment
RENAME    File Rename Utility
STARTUP   Initial Command Line Generator
SUB2      Extended SUBMIT Indirect Command File Facility
XDIR      Directory Display and Scan Utility
ZEX       Memory-Based Indirect Command File Facility and Monitor

              Extended I/O Configuration Programs

Program   Function
CONFIG    TVI-950 CRT Configurator Program
DEVICE    Mnemonic-based I/O Redirection Utility
IOLOADER  Extended I/O System Loader
TINIT     TVI-950 CRT Programmer


    Al� o� th� ZCPR2-specifi� command� ar� describe� i� detai� �
i� th� User'� Guide� a� wel� a� th� ZCPR2-residen� commands.


2.4  Multiple Command Lines

    On� majo� featur� o� ZCPR� whic� � wil� mentio� her� briefl� �
i� th� Multipl� Comman� Line��  Unlik� CP/� 2.2� ZCPR� wil� allo� �
yo� t� specif� � sequenc� o� command� t� b� execute� o� on� line�  �
Unde� th� recommende� configuration� eac� comman� i� separate� b� �
� semicolon�  Fo� example:

         A>B:;DIR A7:*.TXT;DIR C22:*.COM A;C7:;ERA *.COM;DIR

i� � vali� comman� lin� t� ZCPR2�  Wit� th� Multipl� Comman� Lin� �
featur� enabled�� no� onl� ca� th� use� issu� mor� tha� on� com�
man� o� � line�� bu� program� ca� us� thi� facilit�� t� issu� �
command� a� well� thereb� chainin� t� eac� othe� vi� ZCPR2.


2.5  Paths

    Command processing under CP/M 2.2 is really quite simple:
         1) Inpu� an� Pars� Comman� Lin� fro� Use� o� File
         2) Determin� i� i� i� � CCP-residen� comman� an� ru� i� �
�������������i� so
         3) Determin� i� ther� i� � CO� fil� i� th� curren� dis� �
�������������an� use� are� an� loa� i� an� ru� i� i� so
         4) Print error message if 2 and 3 fail

    Command processing under ZCPR2, however, is quite different:
         1) Input and Parse Command Line from User or File
         2) Determin� i� i� i� � ZCPR2-residen� comman� an� ru� �
�������������i� i� so
         3) Searc� alon� th� comman� searc� path�� loggin� int� �
�������������th� disk� an� use� area� indicate� i� th� pat� unti� �
�������������eithe� th� botto� o� th� pat� i� reache� o� th� �
�������������desire� CO� fil� i� found� ru� progra� i� found
         4) Invok� a� Extende� Comman� Processor�� passin� th� �
�������������Comman� Lin� t� it
         5) Print error message if 2, 3, and 4 fail


    A� th� reade� ca� see�� th� concep� o� � pat� i� fundamenta� �
t� ZCPR2��  I� th� ZCPR� vernacular�� � Path� i� � sequenc� o� �
directorie� t� b� searche� fo� � file��  Th� specificatio� o� � �
pat� i� a� � sequenc� o� D� form� whic� ar� extende� b�� th� �
introductio� o� th� "$� characte� t� indicat� � curren� dis� o� �
curren� use� area�  Example� o� path� are:

         1) $�� $� A� A� -- Pat� Fro� Curren� Dis� an� Curren� �
�������������Use� t� Curren� Dis� an� Use� � t� Dis� � an� Cur�
�������������ren� Use� t� Dis� � an� Use� � (Curren� Dis� an� �
�������������Use� i� th� dis� an� use� are� tha� th� use� i� �
�������������logge� into)

         2) $� A� A2� A1� B2� C1� C� B� $� A� -- � thin� yo� ca� �
�������������follo� thi� path�� thi� i� t� illustrat� tha� � pat� �
�������������lengt� i� indefinit� (usuall� u� t� 1�� directories� �
�������������whic� i� quit� reasonable� an� ca� exten� int� use� �
�������������area� beyon� 15� whic� can'� b� logge� into

    Whe� ZCPR� searche� fo� � file� i� follow� suc� � path�  Tw� �
extremel� flexibl� feature� abou� th� ZCPR� desig� are:

         1) th� comman� searc� pat� ma� b� redefine� dynamicall� �
�������������b� th� user
         2) severa� ZCPR� transient� us� path� also�� an� thes� �
�������������path� ma� b� th� sam� pat� use� b� comman� searc� o� �
�������������the� ma� b� uniqu� t� eac� transient


2.6  Overview and Putting the Basic Concepts Together

    As a practical example, let's consider the following case:

         1) I am logged into B1
         2) ɠ a� workin� o� M8� assemble� languag� program� i� �
�������������B1�� an� al� o� m� M8� CO� file� (M80.COM�� L80.COM� �
�������������ar� i� A1�� a� wel� a� � comman� fil� t� d� assembl� �
�������������unde� M8�� whic� i� writte� fo� processin� b�� ZE� �
�������������(fil� i� M80.ZEX)
         3) Al� o� m� genera� utilities� suc� a� XDI� an� ERASE� �
�������������ar� i� A0
         4) My path is $$ $0 A$ A0

    Stud� th� followin� termina� session��  Comment� ar� denote� �
ou� t� th� sid� wit� "<--"�� an� thi� sessio� ha� bee� edite� fo� �
clarity and to remove extraneous details.


B1>xdir a:     <-- Directory of all files on A1 (working base)

XDIR III, Version 1.3    Vertical Listing by File Type and Name
Disk: A  User:   1, File Attributes:  Non-System

Filename.Typ Size K   Filename.Typ Size K   Filename.Typ Size K
-------- --- ------   -------- --- ------   -------- --- ------
ASM     .CFG      4   SYSLIB2 .HLP      4   WM      .HLP      4
ASM2    .COM      8   SYSLIB3 .HLP      8   SYSLIB  .REL     16
L80     .COM     12   SYSLIB4 .HLP      8   ASM2    .SUB      4
L80OLD  .COM     12   SYSLIB5 .HLP      8   M80     .SUB      4
LIB     .COM      8   SYSLIB6 .HLP      4   M80-2   .SUB      4
LOAD    .COM      4   SYSLIB7 .HLP      8   MAC     .SUB      4
M80     .COM     20   SYSLIB8 .HLP      8   RELS    .UTL      4
M80OLD  .COM     20   SYSLIB9 .HLP      8   ASM2    .ZEX      4
MAC     .COM     12   SYSLIBA .HLP      8   M80     .ZEX      4
FNAMES  .DIR      4   SYSLIBB .HLP      8   M80-2   .ZEX      4
SYSLIB  .HLP     16   SYSLIBC .HLP     12   MAC     .ZEX      4
SYSLIB1 .HLP     16
  34 Files Occupying   276K,   241 Files on Disk and  2148K Free

B1>xdir a0:*.com aa      <-- dir of all COM files on A0, the root

XDIR III, Version 1.3    Vertical Listing by File Type and Name
Disk: A  User:   0, File Attributes:  Non-System System

Filename.Typ Size K   Filename.Typ Size K   Filename.Typ Size K
-------- --- ------   -------- --- ------   -------- --- ------
BAD     .COM     28   DISPLAY .COM      4   LRUNZ   .COM      4
BANNER  .COM      4   DUTIL   .COM     12   LU      .COM     20
BOOTHD  .COM      4   ECHO    .COM      4   MBASIC  .COM     24
CALC    .COM      4   ED      .COM      8   MCHECK  .COM      8
CALENDAR.COM     16   ERASE   .COM      8   MCOPY   .COM     12
CCPLOC  .COM      4   FINDBAD .COM      4   MEMTEST .COM      4
CD      .COM      4   FORMAT2 .COM      4   MENU    .COM      4
CHDIR   .COM     16   FORMATHD.COM      8   NAMEDISK.COM      4
COMPARE .COM      8   GENINS  .COM     12   PATH    .COM     12
CONFIG  .COM     20   GETSYS  .COM     12   PIP     .COM      8
CRC     .COM      8   HDSYSGEN.COM      4   PRINT   .COM      8
DASM    .COM     12   HELP    .COM      4   PROTECT .COM      8
DDT     .COM      8   INUSE   .COM      4   PWD     .COM      8
DEVICE  .COM     12   IOLOADER.COM      4   REGEN   .COM      4
DIFF    .COM      8   LD      .COM      8   RENAME  .COM      8
Screen Break -- Type any character to continue

XDIR III, Version 1.3    Vertical Listing by File Type and Name
Disk: A  User:   0, File Attributes:  Non-System System

Filename.Typ Size K   Filename.Typ Size K   Filename.Typ Size K
-------- --- ------   -------- --- ------   -------- --- ------
SCRAMBLE.COM      4   TERM    .COM     24   WM      .COM     12
SD      .COM      4   TIME    .COM      8   XDIR    .COM     12
SGEN    .COM      4   TINIT   .COM      8   ZDT     .COM      8
SQ      .COM     16   TYPESQ  .COM     12   ZEX     .COM      8
STARTUP .COM      8   UNLOAD  .COM      4   ZRUN    .COM      4
STAT    .COM      8   USQ     .COM     12   ZSID    .COM     12
SUB     .COM      4
  64 Files Occupying   564K,   241 Files on Disk and  2148K Free

    <-- Note�  M� Pat� i� $� $� A� A0� or� specifically� B1� B0�
         A1, A0

B1>ed demo.mac      <-- Use ED to create simple program
                   <-- For this to run, ZCPR2 searched B1, B0,
                   <-- A1, and A0 for ED.COM, finding it on A0
                   <-- and ED placed DEMO.MAC on B1
NEW FILE
    : *i
   1:          ext     padc    ;print A as decimal chars
   2:          ext     print   ;print string at return adr
   3:
   4:          mvi     b,10    ;set loop counter
   5:          mvi     c,0     ;set display value
   6:  loop:
   7:          inr     c       ;add 1
   8:          call    print
   9:          db      0dh,0ah,'This is line ',0
  10:          mov     a,c     ;get line number
  11:          call    padc    ;print as decimal
  12:          dcr     b       ;count down
  13:          jnz     loop
  14:          ret             ;return to OS
  15:
  16:          end
  17:
    : *e

B1>dir    <-- Display Local Files
DEMO    .BAK  |  DEMO    .MAC
B1>dir a:*.zex      <-- Display ZEX Command Files on A1
M80     .ZEX  |  ASM2    .ZEX  |  M80-2   .ZEX  |  MAC     .ZEX


B1>type a:m80.zex   <-- Look at my M80 Command File
;  M80.SUB -- MACRO-80 Assembler and Linker
M80 =$1
;  Please Type $^C if Error(s) Exist - ^?
ERA $1.BAK
ERA $1.COM
L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E
ERA $1.REL
;  Assembly Complete

B1>time;zex m80 demo;time     <-- Run Command File with Timing
                             <-- Data; Note Multiple Commands
TIME  Version 1.1    2:03:26 AM on Sunday December 19, 1982
                             <-- TIME was found on A0
ZEX, Version 1.1              <-- ZEX was found on A0, but then
(ZEX Active)
              <-- ZEX searched the path and
                             <-- found M80.ZEX on A1 and
                             <-- processed it
B1>;  M80.SUB -- MACRO-80 Assembler and Linker
B1>M80 =DEMO

No Fatal error(s)

(ZEX Active)
B1>;  Please Type ^C if Error(s) Exist -

B1>ERA DEMO.BAK
DEMO    .BAK
B1>ERA DEMO.COM
No File
B1>L80 /P:100,DEMO,A:SYSLIB/S,DEMO/N,/U,/E

Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft
Data    0100    0210    <  272>

35838 Bytes Free

Data    0100    0210    <  272>

35838 Bytes Free
[0000   0210        2]

(ZEX Active)
B1>ERA DEMO.REL
DEMO    .REL
B1>;  Assembly Complete
B1>TIME
TIME  Version 1.1    2:04:25 AM on Sunday December 19, 1982
B1>
(ZEX Completed)

By Your Command >demo    <-- Now I run my program

This is line   1
This is line   2
This is line   3
This is line   4
This is line   5
This is line   6
This is line   7
This is line   8
This is line   9
This is line  10
B1>


3.0  ZCPR2 Directories and Files

    A� mentione� earlier�� � directory�� i� th� vernacula� o� �
ZCPR2�� i� � logica� are� o� � dis� whic� i� designate� b� � D� �
form��  � dis� ma� hav� u� t� 3� directories�� numbere� � t� 31� �
but�� i� orde� t� maintai� CP/� 2.� compatability�� th� use� ma� �
lo� int� onl� 1� o� the� (� t� 15)�  Th� othe� 1� directorie� (1� �
t� 31� ma� b� use� t� onl� stor� files�  Se� th� Rational� manua� �
fo� a� explanatio� a� t� wh� � di� no� choos� t� chang� thi� an� �
allo� th� use� t� lo� int� al� 3� directories.

    Whe� � use� i� "logge� into� � directory� hi� environmen� i� �
configure� (unde� ZCPR� an� th� BDOS� s� tha� wheneve� h� create� �
� ne� fil� (assumin� h� doesn'� specif� � directory)�� i� wil� b� �
place� i� th� director� h� i� currentl� logge� into��  Suc� a� �
environmen� allow� th� use� t� kee� th� file� h� i� intereste� i� �
a� th� particula� tim� i� � director� separat� fro� th� othe� �
file� o� th� disk��  I� thi� way�� th� use� nee� no� alway� b� �
workin� aroun� al� th� othe� file� o� hi� disk.

    Eac� fil� i� � director� ha� tw� basi� attribute� associate� �
wit� it��  it� SYSTE� attribut� an� it� READ/ONL� attribute��  I� �
th� SYSTE� attribut� i� Se� (i.e.�� i� i� declare� t� b� � $SY� �
file)�� the� i� become� hidde� fro� norma� viewin� b� th� user�  �
Th� DI� command�� fo� instance�� wil� no� displa� i� unles� th� � �
(SYSTEM� o� � (ALL� option� ar� specified��  I� th� SYSTE� attri�
but� i� Clea� (i.e.�� i� i� declare� t� be � $DI� file)�� the� i� �
i� normall� alway� displaye� t� th� use� withou� hi� specifyin� �
an� option� t� th� commands.

    Th� READ/ONL٠ attribut� declare� th� fil� t� b� protecte� �
fro� bein� writte� ove� o� delete� i� thi� attribut� i� Set�  Yo� �
ma� onl� rea� fro� suc� � fil� i� thi� attribut� i� Set�  Severa� �
o� th� ZCPR� utilities�� specificall� ERASE�� hav� option� t� g� �
ahea� an� perfor� thei� function� o� Read/Onl� file� i� spit� o� �
thei� attribut� settings.

    Th� PROTEC� utilit� i� use� t� se� th� SYSTE� an� READ/ONL� �
attribute� o� files��� a� wel� a� severa� others��  W� ar� �
maintainin� ful� CP/� 2.� compatabilit� here� an� u� t� eigh� TA� �
bits and an ARCHIVE bit may be set also.

    � hav� discusse� th� D� for� t� som� exten� earlie� an� wil� �
no� g� int� a� extende� discussio� o� i� here��  I� i� reall� �
rathe� straight-forward��  Eac� director� i� indicate� b� � dis� �
an� use� area�� s� th� D� for� give� exactl� thi� specification�  �
The ZCPR2-resident commands support this form extensively:

         A>DIR C7:
         A>ERA B22:MYFILE.TXT V
         A>TYPE A31:TEMP.TXT
         A>REN C12:FILE.TXT=FILE1.TXT
         A>LIST A31:TEMP.TXT
         A>DIR B4: A �
    I� addition� yo� ma� us� th� D� for� t� lo� int� � differen� �
dis� an� sta� i� th� sam� use� area�� � differen� use� are� an� �
sta�� o� th� sam� disk�� o� � differen� use� are� o� � differen� �
disk:

         A>B7:
         B7>12:
         B12>A:
         A12>B15:
         B15>B0:
         B>A:
         A>

    I� shoul� als� b� note� tha� mos� o� th� ZCPR2-supplie� �
utilities have been programmed to recognize the DU form as well:

         A>XDIR B7:
         A>ERASE B4:*.TXT,C2:*.*
         A>CRC 4:*.*,5:*.*
         A>PROTECT B:*.* RS

    I� additio� t� th� D� form�� mos� o� th� ZCPR2-supplie� �
utilitie� ca� dea� wit� � director� specificatio� i� whic� � �
mnemoni� nam� ha� bee� define� fo� � directory�  Suc� � director� �
for� i� calle� th� DI� for� o� th� Name� Directory� for� i� th� �
ZCPR�� vernacular��  Name� directorie� ar� no� know� b�� ZCPR� �
itsel� bu� onl� b� ZCPR� utilitie� i� th� ZCPR�� System��  Ther� �
ar� fou� utilitie� specificall� designe� t� dea� wit� name� �
directories:

         MKDIR -- Create and Edit Named Directories

         LD    -- Load a Named Directory File into a Named
                  Directory Memory Buffer

         CD    -- Change Directory into a Named Directory
                  (like the DU: command, but more extensive)

         PWD   -- Print Working Directory

    Name� Directorie� ar� define� i� � fil� calle� NAMES.DIR�  �
Whe� � utility�� suc� a� XDIR�� i� give� � comman� involvin� � �
Name� Directory�� i� perform� � searc� alon� th� comman� searc� �
pat� fo� � fil� name� NAMES.DIR��  A� soo� a� on� i� found� i� i� �
loade� an� scanne� fo� � match��  I� � matchin� entr� i� found� �
th� associate� informatio� i� extracte� (D� informatio� i� no� �
available)�� an� th� utilit� work� wit� th� D� informatio� fro� �
the� on.


    Th� NAMES.DI� fil� i� structure� a� � fil� containin� 6� 11-�
byt� records� eac� recor� containin� th� followin� information:

         Byte 0:  Disk Letter (A-P)
         Byte 1:  User Number
         Bytes 2-10:  Directory Name (up to 8 chars terminated
                      by a binary zero)

    Th� empt� entr� i� on� whos� Byt� � i� � binar� � (n� name)�  �
Empt�� entrie� ma� b� intersperse� wit� non-empt�� entries�� s� �
don'� assum� tha� th� en� o� th� director� i� reache� whe� th� �
firs� empt� entr� i� found.

    Th� stor� give� abov� fo� wha� happen� i� no� exactl�� tru� �
i� al� ZCPR� systems�  I� th� interes� o� spee� an� efficiency� � �
Name� Director� Buffe� ma� b� define� t� th� utilitie� employin� �
th� capabilitie� o� dealin� wit� Name� Directories��  Whe� thi� �
buffe� facilit� i� enabled�� th� utilit� perform� th� followin� �
operation� whe� � Director� Nam� i� give� t� it:

 o Chec� t� se� i� i� i� � D� for� (dis� lette� i� th� �
����rang� o� � t� d�� wher� � i� define� t� th� utility� �
����followe� b� � use� numbe� i� th� rang� o� � t� u�� wher� �
����� i� als� define� t� th� utility)�  I� thi� i� th� case� �
����assum� th� for� t� b� D� an� g� wit� it.

 o I� w� ar� no� dealin� wit� � D� form� assum� i� i� � DI� �
����form��  I� thi� case� sca� th� memory-base� Name� Direc�
����tor� Buffe� fo� � match�  I� on� i� found� g� wit� it.

 o�I� ther� i� n� memory-base� Name� Director� Buffe� o� �
����ther� wa� n� matc� i� sai� buffer� the� searc� alon� th� �
����comman� searc� pat� fo� th� NAMES.DI� file��  I� found� �
����loa� i� an� sca� i� fo� th� indicate� name��  I� on� i� �
����found� g� wit� it.

 o I� th� NAMES.DI� fil� i� no� foun� o� i� i� i� foun� an� �
����ther� i� n� matc� amon� it� entries�� issu� a� appro�
����priat� erro� messag� an� abort.

    Th� LĠ comman� i� use� t� Loa� � Director� fil� int� th� �
Name� Director� buffer��  I� i� i� thi� wa� tha� th� content� o� �
th� Name� Director� buffe� ar� defined��  MKDI� i� use� t� creat� �
� fil� definin� � grou� o� name� directories�� an� L� i� use� t� �
loa� thi� fil� int� memory��  Th� onl� operatin� syste� suppor� �
require� fo� thi� featur� i� fo� th� BIO� t� initializ� th� Name� �
Director� Buffe� o� Col� Boot��  Th� BIO� doe� thi� b� storin� a� �
entr�� coun� a� th� firs� byt� o� th� buffe� (thi� entr�� coun� �
tell� L� ho� man� entrie� ma� b� store� i� th� buffer)�� an� the� �
fou� zeroe� a� th� nex� fou� byte� o� thi� buffer��  Th� firs� �
zer� indicate� tha� ther� ar� n� entrie� presen� i� th� buffer� �
an� th� nex� thre� zeroe� defin� a� empt� entr� a� th� firs� �
entry���  Th� Name� Director�� Buffe� i� structure� slightl� �
differently than the NAMES.DIR file: �
       Header Bytes --
         Byte 0:  Number of Entries Allowed in the Named
                  Directories Buffer
         Byte 1:  Number of Entries Currently Stored in the
                  Named Directories Buffer

       Entry Bytes --
         Byte 0:  Disk Number (0 to 15, Disk A = 0)
         Byte 1:  User Number (0 to 31)
         Bytes 2-9:  Directory Name (8 bytes, Byte 2=0 if none)

    Thi� interna� structura� informatio� i� give� mainl�� fo� �
you� reference�� an� yo� d� no� nee� t� kno� thi� detai� i� orde� �
t� mak� us� o� th� system��  Essentially� onc� th� syste� an� it� �
utilitie� ar� properl� installed�� th� procedur� fo� usin� th� �
Named Directory facilities is:

         (1� us� L� t� loa� th� Name� Director� Buffer
         (2� us� MKDI� t� creat� Name� Director� Files
         (3) use the utilities and Named Directories at will

    Tw� mor� commands�� beside� MKDI� an� LD�� ar� availabl� t� �
hel� th� use� dea� wit� name� directorie� specifically�  The� ar� �
PW� (Prin� Workin� Directory� an� C� (Chang� Directory).

    Th� PW� comman� i� use� t� prin� ou� th� name� o� th� dir�
ectorie� base� o� hi� comman� searc� path��  I� wil� firs� prin� �
ou� th� content� o� th� Name� Director� Buffe� i� on� exists� an� �
i� wil� the� prin� ou� th� content� o� th� firs� NAMES.DIҠ fil� �
i� encounter� alon� th� user'� comman� searc� path.

    C� i� use� t� lo� int� � Name� Directory�� i� lie� o� th� D� �
form�  Wha� C� buy� th� use� i� tw� things:

         (1� I� � secur� environment� th� D� for� ma� b� disabl�
e� an� onl� C� mad� availabl� t� th� user��  Th� use� MUS� us� C� �
t� lo� int� � differen� directory�� and�� eac� tim� C� i� run� i� �
check� t� se� i� th� director� th� use� i� tryin� t� lo� int� i� �
� "Syste� Directory� an� ask� th� use� fo� � passwor� i� i� is.

         (2� Whe� C� log� � use� int� � directory�� i� look� fo� �
� fil� name� ST.COM��  I� i� find� one� i� chain� t� it�  S� i� � �
versio� o� th� STARTU� comman� whic� i� configure� t� perfor� on� �
o� mor� initia� command� onc� � director� i� entere� b�� CD�  �
Thes� command� can�� amon� othe� things�� completel� reconfigur� �
th� user'� environment�� givin� hi� � totall� differen� environ�
men� fro� th� on� h� jus� left��  Candidate� fo� command� t� b� �
execute� b� C� include:

              o IOLOADER -- load a new I/O system
              o MENU -- enter a menu system
              o PATH -- define a new command search path
              o ZEX  -- run a command file

    Secur� environment� wil� b� discusse� i� thei� ow� sectio� �
later�� bu� on� additiona� featur� t� mentio� her� i� tha� PW� i� �
awar� o� Syste� Directories�� and� wheneve� i� runs� i� check� t� �
se� i� i� i� runnin� fro� � Syste� Directory��  I� i� is�� i� �
display� al� know� directorie� t� th� user��  I� i� i� not�� i� �
display� onl� th� non-Syste� directorie� t� th� user.

    � Syste� Directory� i� th� ZCPR� vernacula� i� on� whos� use� �
numbe� i� abov� 1� (defaul� recommende� value)�  An� suc� direct�
or�� i� declare� t� b� � Syste� Directory�� an� � passwor� i� �
require� t� ente� i� whe� th� C� comman� i� used��  A� wit� an� �
Name� Directory�� Syste� Directorie� ar� no� know� t� ZCPR�� it�
self� s� i� th� D� for� o� ZCPR� i� enabled� i� wil� ignor� thes� �
restriction� an� mov� th� use� righ� int� � Syste� Director� �
withou� qualms.

    ɠ thin� i� i� tim� fo� anothe� termina� sessio� t� illus�
trat� th� point� covere� s� far�  Hence� pleas� stud� th� follow�
ing terminal session:

B1>;
B1>;  When my ZCPR2 system cold boots, it always runs the command
B1>;  STARTUP -- notice what STARTUP does:
B1>startup s
STARTUP, Version 1.1
STARTUP Setup Command (?=Help)? ?
 Setup Mode Commands are --
       A -- Define Address of Multiple Command Buffer
       C -- Define STARTUP Multiple Command Line
       D -- Display STARTUP Values
       S -- Define Size of Multiple Command Buffer
       X -- Exit and Optionally Rewrite STARTUP
STARTUP Setup Command (?=Help)? D

**** STARTUP Settings ****
       Multiple Command Buffer Address -- FF00H
       Size of Multiple Command Buffer -- 200 Bytes
       Multiple Command Line --
       --->ioloader;ld ld;tinit;echo welcome to zcpr ii
**** STARTUP Settings ****

STARTUP Setup Command (?=Help)? X
       Do you wish to update STARTUP (Y/N/<CR>=Y)? N
B1>;
B1>;  As the reader can see, it uses the ZCPR2 Multiple Command
B1>;  Line Buffer facility to store an initial command line which
B1>;  runs the following commands:
B1>;    IOLOADER -- loads I/O system
B1>;    LD LD    -- loads the named directory LD.DIR into the
B1>;                    memory-based Named Directory Buffer
B1>;    TINIT    -- programs my TVI 950 CRT terminal (function
B1>;                    keys, status line, etc)
B1>;    ECHO     -- prints the message "WELCOME ..." on my CRT
B1>; �B1>;
B1>;  Before proceeding, let's look at my command search path
B1>;
B1>path
PATH Version 2.2
Current Symbolic Path --
       $$: --> $0: --> A$: --> A0:
Current Absolute Path --
       B1: --> B0: --> A1: --> A0:
Current Named Path --
       ASM: --> DEV-ROOT: --> R-ASM: --> ROOT:
B1>
B1>;
B1>;  This is the path along which CD, PWD, LD, and many other
B1>;  utilities search for the NAMES.DIR file.  As I am
B1>;  currently set up, I have only one NAMES.DIR file, and
B1>;  it is located at A0.
B1>;
B1>
B1>;
B1>;  Now let's see what directories are available to us:
B1>;
B1>pwd
PWD, Version 1.0

** Directory Display **

       ** Named Directory Memory-Based Definitions **
12 Directory Entries Total (  2 Directories Hidden) --
A --
  0: ROOT
B --
  0: BROOT      1: ASM        2: BDSC       3: PAS
  5: BASIC      7: WS         8: CAT        9: DBASE
C --
  0: BACKUP

Strike Any Key to Continue -

       ** Named Directory  Disk-Based  Definitions **
20 Directory Entries Total (  2 Directories Hidden) --
A --
  0: ROOT       1: R-ASM      2: R-BDSC     3: R-PAS
  5: R-BASIC    7: R-WS       8: R-CAT      9: R-DBASE
B --
  0: DEV-ROOT   1: ASM        2: BDSC       3: PAS
  4: SCRATCH    5: BASIC      7: WS         8: CAT
  9: DBASE
C --
  0: BACKUP

** Current Directory **
       B 1: ASM

B1>;
B1>;  As the reader can see, I have several more directories
B1>;  defined in NAMES.DIR than in the memory buffer.  I have
B1>;  chosen to define only my more frequently used directories
B1>;  in the memory buffer.
B1>;  Also note that two directories are hidden in each case.
B1>;  These are System Directories.
B1>;
B1>;  Let's move around a little via CD to show you how it works:
B1>;
B1>cd root
CD, Version 2.1
A>;
A>;  Since Root was found in memory, CD ran slightly faster
A>;  than if it had to do a NAMES.DIR search:
A>;
A>cd r-asm:
CD, Version 2.2
A1>cd ws:
CD, Version 2.2
B7>cd zcpr
CD, Version 2.2
Access Password?
** Access Granted **
A11>;
A11>;  Note that in this last example, I moved into a System
A11>;  Directory which was hidden in the previous PWD display.
A11>;  Now it is not:
A11>;
A11>pwd
PWD, Version 1.0

** Directory Display **

       ** Named Directory Memory-Based Definitions **
12 Directory Entries Total (  0 Directories Hidden) --
A --
  0: ROOT      10: SYS       11: ZCPR
B --
  0: BROOT      1: ASM        2: BDSC       3: PAS
  5: BASIC      7: WS         8: CAT        9: DBASE
C --
  0: BACKUP

Strike Any Key to Continue -


       ** Named Directory  Disk-Based  Definitions **
20 Directory Entries Total (  0 Directories Hidden) --
A --
  0: ROOT       1: R-ASM      2: R-BDSC     3: R-PAS
  5: R-BASIC    7: R-WS       8:
R-CAT      9: R-DBASE
 10: SYS       11: ZCPR
B --
  0: DEV-ROOT   1: ASM        2: BDSC       3: PAS
  4: SCRATCH    5: BASIC      7: WS         8: CAT
  9: DBASE
C --
  0: BACKUP

** Current Directory **
       A11: ZCPR
A11>cd root:
CD, Version 2.2
A>;
A>;  End of Demo
A>;


    Tree� ar� implemente� relativel� easil� i� thi� environment�  �
Sinc� th� NAMES.DI� whic� i� use� t� defin� th� environmen� i� �
th� firs� NAMES.DI� encountere� alon� th� comman� searc� path� �
the� thi� NAMES.DI� becomes�� effectively�� th� roo� o� � ne� �
subtree��  Commonly-know� node� ca� b� store� i� th� memory-base� �
Name� Director� Buffer�� an� thes� wil� alway� b� scanne� first�  �
I� thi� sca� fails�� th� curren� root�� whic� i� th� firs� �
NAMES.DI� fil� foun� alon� th� comman� searc� path�� wil� provid� �
th� director� name� i� any.

    Whol� ne�� workin� environment� o� th� sam� dis� ca� b� �
create� rathe� easil� unde� th� ZCPR�� environment�� especiall� �
whe� CĠ i� use� t� mov� aroun� betwee� directories��  Thi� i� �
primaril� becaus� C� alway� look� fo� th� ST.CO� fil� i� th� ne� �
director�� i� i� movin� int� an� chain� t� i� i� on� i� there�  �
The new ST.COM, then, can set up the new environment.


    Fo� example�� imagin� tha� yo� wan� t� se� u� � whol� ne� �
workin� environmen� calle� ROBERT��  ROBER� wil� b� th� bas� o� � �
subtre� whic� wil� hav� th� directorie� o� GAMES�� SCHOOL�� an� �
OTHER under it:

                        ROOT
                       /    \
                   others    ROBERT
                            /  |   \
                      SCHOOL GAMES  OTHER

    Let'� arbitraril� assig� ROBERT=C7� SCHOOL=C8� GAMES=C9� an� �
OTHER=C10��  I� orde� t� implemen� this�� w� woul� creat� � �
NAMES.DI� fil� wit� thes� entrie� i� i� an� plac� thi� NAMES.DI� �
i� ROBER� (C7)�  Hence� thi� NAMES.DI� become� th� bas� director� �
fo� ou� subtree��  Th� Memory-Base� Name� Director� wil� contai� �
th� Globa� Name� only� fo� thi� example� s� let'� sa� i� contain� �
only one entry, and that entry is ROOT=A0.

    W� hav� no� define� ou� directorie� tha� w� wan� t� b� abl� �
t� ge� t� a� NAMES.DI� unde� ROBERT��  W� no� wan� t� se� u� th� �
S� interna� comman� lin� whic� wil� b� execute� whe� w� lo� int� �
ROBERT.  The following command line is all you need:

         PATH $$ C7 A$ A0

and ST.COM can be created by running the "STARTUP S" command.

    T� illustrat� th� flexibilit� o� ZCPR� eve� further�� whe� �
Rober� want� t� lo� int� hi� GAME� directory�� h� ofte� want� t� �
ru� th� sam� game� ove� an� over��  T� kee� lif� simpl� fo� him� �
let'� se� u� anothe� ST.CO� fil� i� hi� GAMEӠ director�� whic� �
runs MENU when this directory is logged into.

    Th� followin� termina� sessio� illustrate� thi� example�


B4>;
B4>;  First, I will set up the Named Directory Environments
B4>;  LD will load the Global Directory, LD.DIR
B4>;  NAMES.DIR will reside in ROBERT to define the subtree
B4>;
B4>mkdir
MKDIR, Version 1.0
MKDIR Command (? for Help)? ?
MKDIR Command Summary
       A -- Set Address of ZCPR2 External Path
       D -- Display Currently-Defined Directory Names
       F -- Set Name of Directory File
       I -- Initialize MKDIR
       N -- Create a New Directory Name
       Q -- Quit without Changing Program on Disk
       R -- Read in Directory File from Disk
       S -- Sort Directory by Disk and User Number
       W -- Write Directory File to Disk
       X -- Exit and Update Program on Disk
MKDIR Command (? for Help)? a
External Path Undefined
New Path Address (Hex)? 40.....

MKDIR Command (? for Help)? f
New Directory File? ld.dir......

MKDIR Command (? for Help)? n
System User Areas start at 10
       Disk Letter and User (RETURN=Done or A-P 0-31, like A10)? a0
       Directory Name (RETURN = Delete Old Name)? root....

       Disk Letter and User (RETURN=Done or A-P 0-31, like A10)?

MKDIR Command (? for Help)? d
Directory File is ld.dir
External Path Address is 40 Hex
Defined Directory Names --
A --
 A 0: ROOT
1 Directory Names Displayed
1 Directory Names Defined, Space Left for 63 More Names

Current Directory -- Not Defined by Name

MKDIR Command (? for Help)? w
Writing Directory File ld.dir to Disk ... Done
MKDIR Command (? for Help)? i   Verify Initialization (Y/N)? y
All Directory Names Cleared
MKDIR Command (? for Help)? f
New Directory File? names.dir...


MKDIR Command (? for Help)? n
System User Areas start at 10
       Disk Letter and User (RETURN=Done or A-P 0-31, like A10)? c7
       Directory Name (RETURN = Delete Old Name)? robert..

       Disk Letter and User (RETURN=Done or A-P 0-31, like A10)? c8
       Directory Name (RETURN = Delete Old Name)? school..

       Disk Letter and User (RETURN=Done or A-P 0-31, like A10)? c9
       Directory Name (RETURN = Delete Old Name)? games...

       Disk Letter and User (RETURN=Done or A-P 0-31, like A10)? c10
       Directory Name (RETURN = Delete Old Name)? other...

       Disk Letter and User (RETURN=Done or A-P 0-31, like A10)?

MKDIR Command (? for Help)? d
Directory File is names.dir
External Path Address is 40 Hex
Defined Directory Names --
C --
 C 7: ROBERT      C 8: SCHOOL      C 9: GAMES       C10: OTHER
4 Directory Names Displayed
4 Directory Names Defined, Space Left for 60 More Names

Current Directory -- Not Defined by Name

MKDIR Command (? for Help)? w
Writing Directory File names.dir to Disk ... Done
MKDIR Command (? for Help)? q   Verify Abort (Y/N)? y
B4>;
B4>;  We now have the Global and Subtree Directories Defined:
B4>;
B4>dir
LD      .DIR  |  NAMES   .DIR
B4>mcopy c7:=names.dir
MCOPY  Version 2.2
       Copy B  4: NAMES   .DIR to C  7:
No Original File NAMES   .DIR on Destination
!

   Copy Complete,  Verify Phase --

   Verify Complete
**** MCOPY Complete ****
           1 Files Copied
           0 Copy Errors
B4>;
B4>;  The Subtree Directory is now in its root at C7
B4>;


B4>ld ld
LD  Version 1.0
Load Complete
B4>;
B4>;  Global Directory is Now Loaded
B4>;
B4>cd robert
CD, Version 2.2
C7>;
C7>;  I will now define the new path to be set up when logged
C7>;  into ROBERT
C7>;
C7>startup s
STARTUP, Version 1.1
STARTUP Setup Command (?=Help)? C
       Current Multiple Command Buffer Contents is --
ioloader;ld ld;tinit;echo welcome to zcpr ii, version 2.0
       New Line? path $$ c7 a$ a0

**** STARTUP Settings ****
       Multiple Command Buffer Address -- FF00H
       Size of Multiple Command Buffer -- 200 Bytes
       Multiple Command Line --
       --->path $$ c7 a$ a0
**** STARTUP Settings ****

STARTUP Setup Command (?=Help)? X
       Do you wish to update STARTUP (Y/N/<CR>=Y)? Y
       STARTUP will write file to current disk/user
       STARTUP File is STARTUP .COM
       Enter New File Name or <CR> if OK: st.com
       STARTUP File is ST      .COM
       Enter New File Name or <CR> if OK:
       Writing File ST      .COM to Disk ... Done
C7>dir
NAMES   .DIR  |  ST      .COM
C7>;
C7>;  We now have ST available to define the new environ
C7>;
C7>
C7>;
C7>;  I will set up the MENU File for the GAMES directory
C7>;
C7>cd games
CD, Version 2.2


C9>;
C9>;  I will create an ST.COM in GAMES to run MENU
C9>;
C9>startup s
STARTUP, Version 1.1
STARTUP Setup Command (?=Help)? C
       Current Multiple Command Buffer Contents is --
ioloader;ld ld;tinit;echo welcome to zcpr ii, version 2.0
       New Line? menu

**** STARTUP Settings ****
       Multiple Command Buffer Address -- FF00H
       Size of Multiple Command Buffer -- 200 Bytes
       Multiple Command Line --
       --->menu
**** STARTUP Settings ****

STARTUP Setup Command (?=Help)? X
       Do you wish to update STARTUP (Y/N/<CR>=Y)? Y
       STARTUP will write file to current disk/user
       STARTUP File is STARTUP .COM
       Enter New File Name or <CR> if OK: st.com
       STARTUP File is ST      .COM
       Enter New File Name or <CR> if OK:
       Writing File ST      .COM to Disk ... Done
C9>;
C9>;  I'll set up a MENU.CPR file to
C9>;  illustrate what can be done
C9>;
C9>ed menu.cpr

NEW FILE
    : *i
   1:  -dx
   2:  #
   3:  This is a sample Menu -- I set the Global Menu
   4:  options to display menu and allow exit to ZCPR2
   5:
   6:  Menu Commands --
   7:          X -- Display Directory (XDIR)
   8:          Z -- Run Any Command Line
   9:          Q -- Jump Out to ROBERT
  10:  #
  11:  x!xdir "Input Options --
  12:  z!"Input Command Line --
  13:  qcd robert
  14:  ##
  15:
    : *e

C9>dir
ST      .COM  |  MENU    .BAK  |  MENU    .CPR
C9>era *.bak
MENU    .BAK �C9>;
C9>;  I will now run MCHECK to perform a syntax check on the
C9>;  MENU.CPR file
C9>;
C9>mcheck menu
MCHECK  Version 1.0

Line Comment/Error Message
---- ---------------------
   1 ** Global Options Detected **
   2 ** Menu Number   0
  14 ** End of Menu Check **
       No Errors Detected
C9>;
C9>;  We are now ready for a full demo --
C9>;  Let's play like we are Robert, and he has just come up
C9>;  (I will start at B4 since the NAMES.DIR defining ROBERT
C9>;  is there, but he would start at A0)
C9>;
C9>b4:
B4>dir
LD      .DIR  |  NAMES   .DIR
B4>;
B4>;  On powerup, STARTUP would run LD LD, among others
B4>;
B4>ld ld
LD  Version 1.0
Load Complete
B4>;
B4>;  Robert would now log into his directory
B4>;
B4>cd robert
CD, Version 2.2

PATH Version 2.2
Current Symbolic Path --
       $$: --> C7: --> A$: --> A0:
Current Absolute Path --
       C7: --> C7: --> A7: --> A0:
Current Named Path --
       ROBERT: --> ROBERT: --> Noname: --> Noname:
C7>dir
NAMES   .DIR  |  ST      .COM
C7>;
C7>;  We are now in ROBERT, and can access his world:
C7>;


C7>pwd
PWD, Version 1.0

** Directory Display **

       ** Named Directory Memory-Based Definitions **
 1 Directory Entries Total (  0 Directories Hidden) --
A --
  0: ROOT

Strike Any Key to Continue -

       ** Named Directory  Disk-Based  Definitions **
 4 Directory Entries Total (  1 Directories Hidden) --
C --
  7: ROBERT     8: SCHOOL     9: GAMES

** Current Directory **
       C 7: ROBERT
C7>;
C7>;  Like going to SCHOOL --
C7>;
C7>cd school
CD, Version 2.2
C8>dir
No File
C8>;
C8>;  Or going into OTHER (which is a System Directory)
C8>;
C8>cd other
CD, Version 2.2
Access Password?
** Access Granted **
C10>dir
No File
C10>;
C10>;  Or playing games -- note that by CDing into GAMES, we
C10>;  automatically come up in a Menu Environment
C10>;
C10>cd games
CD, Version 2.2

MENU  Version 1.1

This is a sample Menu -- I set the Global Menu
options to display menu and allow exit to ZCPR2

Menu Commands --
       X -- Display Directory (XDIR)
       Z -- Run Any Command Line
       Q -- Jump Out to ROBERT
Command (<CR>=Menu Disp, ^C=CP/M) - X
Input Options -- *.dir...................................
�XDIR III, Version 1.3    Vertical Listing by File Type and Name
Disk: C  User:   9, File Attributes:  Non-System
No files selected

MENU  Version 1.1 Strike Any Key -

This is a sample Menu -- I set the Global Menu
options to display menu and allow exit to ZCPR2

Menu Commands --
       X -- Display Directory (XDIR)
       Z -- Run Any Command Line
       Q -- Jump Out to ROBERT
Command (<CR>=Menu Disp, ^C=CP/M) - Z
Input Command Line -- dir.....................................
ST      .COM  |  MENU    .CPR
MENU  Version 1.1 Strike Any Key -

This is a sample Menu -- I set the Global Menu
options to display menu and allow exit to ZCPR2

Menu Commands --
       X -- Display Directory (XDIR)
       Z -- Run Any Command Line
       Q -- Jump Out to ROBERT
Command (<CR>=Menu Disp, ^C=CP/M) - Q
CD, Version 2.2

PATH Version 2.2
Current Symbolic Path --
       $$: --> C7: --> A$: --> A0:
Current Absolute Path --
       C7: --> C7: --> A7: --> A0:
Current Named Path --
       ROBERT: --> ROBERT: --> Noname: --> Noname:
MENU  Version 1.1

Menu Not Found
C7>;
C7>;  Note that MENU was still running, but it aborted gracefully
C7>;  under the new directory
C7>;
C7>
C7>;
C7>;  End of Demo
C7>;


4.0  ZCPR2 Commands

    ZCPR� will� generall� speaking� accep� an� conventiona� CP/� �
comman� an� i� i� abl� t� ru� virtuall� al� o� th� existin� CP/� �
softwar� (wit� th� fe� mino� exception� a� note� previously)�  �
Thi� sectio� o� th� Concept� Manua� deal� wit� th� ZCPR2-specifi� �
commands�� i.e.�� th� ZCPR� Residen� Command� an� th� transien� �
programs released with ZCPR2.

4.1  ZCPR2 Resident Commands

    Lik� th� CP/� 2.� CCP�� ZCPR� contain� som� command� withi� �
itself��  I� contain� al� o� th� CC� command� (excep� USER� whic� �
isn'� neede� anymore� an� � fe� more�� bu� al� o� th� ZCPR� resi�
den� command� ar� differen� wit� logica� extension� t� th� CC� �
commands�� Th� followin� discussio� applie� t� th� recommende� �
configuratio� o� ZCPR2.

    I� th� followin� discussion� "afn� refer� t� th� CP/� ambig�
uou� fil� nam� for� (containin� "?� and/o� "*� characters�� an� �
"ufn�� refer� t� th� CP/� unambiguou� fil� nam� for� (doe� no� �
contai� th� ambiguou� characters).

4.1.1  The DIR Command
    Th� DI� comman� i� use� t� displa� th� name� o� th� file� i� �
the current directory.  It has three basic forms --

         Display $DIR File Names       DIR DU:afn
         Display $SYS File Names       DIR DU:afn S
         Display All File Names        DIR DU:afn A

4.1.2  The ERA Command
    Th� ER� comman� i� use� t� eras� files��  I� i� no� abl� t� �
eras� Read/Onl� files� bu� i� ca� eras� Syste� files�  I� ha� tw� �
basic forms --

         Erase Specified Files         ERA DU:afn
         Erase with Verify             ERA DU:afn V

4.1.3  The REN Command
    Th� RE� comman� i� use� t� chang� th� nam� o� on� fil� t� �
another��  Again� i� ca� no� chang� th� nam� o� � Read/Onl� file�  �
It has only one basic form --

         Renam� Fil�                   RE� DU:ufn1=ufn�

    I� ufn� alread� exists� RE� wil� as� th� use� i� h� want� t� �
Erase it (with the prompt "ERA ufn1?").


4.1.4  The TYPE and LIST Commands
    TYPŠ an� LIS� ar� use� t� displa� file� o� th� consol� an� �
printer�� resp�  TYP� page� b� default� stoppin� afte� th� scree� �
is filled.  These two commands have three basic forms --

         Print File on Console         TYPE DU:ufn P
           Without Paging
         Print File on Console         TYPE DU:ufn
           With Paging
         Print File on Printer         LIST DU:ufn

4.1.5  The SAVE Command
    Th� SAVŠ comman� i� use� t� sav� th� content� o� th� TP� �
ont� dis� a� � file��  I� accept� tw� arguments��  � numbe� an� � �
fil� name��  Th� fil� nam� ma� b� optionall� followe� b�� th� �
lette� "S� t� indicat� tha� th� numbe� i� th� numbe� o� 128-byt� �
Sector� (Blocks�� t� b� saved�� and�� i� thi� optio� lette� i� �
omitted� th� numbe� i� assume� t� b� th� numbe� o� 256-byt� Page� �
to be saved.  The SAVE command has two basic forms --

         Save Memory into File         SAVE n DU:ufn
         Save Memory into File         SAVE n DU:ufn S
           and Specify Number of
           Blocks

    I� th� number�� n� i� followe� b� th� suffi� "H"� a� i� "FH� �
o� "2DH"�� the� � i� take� t� b� � hexadecima� value��  I� n� �
suffi�� i� given�� � i� assume� t� b� decimal��  Thi� hexadecima� �
optio� eliminate� th� nee� fo� conversio� fro� th� value� �
supplied by debuggers, like DDT.

    I� th� indicate� fil� alread� exists� SAV� wil� as� th� use� �
if he wishes to erase it with the prompt "ERA ufn?".

4.1.6  The GET Command
    GEԠ i� use� t� loa� � fil� anywher� int� memory��  I� �
require� tw� arguments��  � numbe� (assume� t� b� hexadecimal� o� �
th� 256-byt� pag� i� memor� a� whic� t� star� th� loa� an� th� �
name of the file.

         Load File Into Memory         GET adr DU:ufn

4.1.7  The GO Command
    Th
� G� comman� i� use� t� reexecut� th� las� progra� loade� �
into the TPA without having to reload it.

         Reexecute Last Transient      GO params
           Without Reloading It


4.1.8  The JUMP Command
    JUM� i� use� t� branc� t� anywher� i� memory�  I� take� onl� �
on� argument�� whic� i� th� addres� a� whic� t� jump��  Thi� �
addres� ca� b� t� an� byt� i� memor� (i� i� � ful� 16-bi� �
address), and it is assumed to be a hexadecimal number.

         Call Subroutine Anywhere in   JUMP adr
           Memory

4.1.9  The DU Form for Changing Disk and User
    Th� D� for� standin� alon� i� use� t� lo� int� � differen� �
directory.  There are three basic forms of this command --

         Change Disk                   D:
         Change User                   U:
         Change Disk and User at       DU:
           Same Time


4.2  ZCPR2 Standard Transient Commands

    Al� o� th� CP/M-supplie� transien� command� wil� wor� wit� �
ZCPR2� an� ZCPR� supplie� severa� additiona� ZCPR2-specifi� tran�
sients� a� indicate� i� th� followin� tables:


           Standard CP/M 2.2 Transients under ZCPR2

Program   Function                           Functional Changes
ASM       Intel 8080 Assembler               No Change
DDT       Debugger                           No Change
DUMP      File Dump                          No Change
ED        Character-Oriented Text Editor     No Change
LOAD      HEX-to-COM File Converter          No Change
MOVCP�    Reconfigur� CP/� fo� Differen�     Wil� Onl� Affec�
           Memory Size                        BDOS -- ZCPR2
                                              Mus� B�
                                              Reassembled
PIP       File and Peripheral Transfer       No Change
STAT      Statistics display, etc            No Change
SUBMIT    Batch Command Processor            No Change
SYSGEN    Get/Put System Image on Disk       No Change



                   Standard ZCPR2 Transients

    Th� standar� transient� o� ZCPR� ca� b� groupe� b�� subjec� �
are� a� organize� i� thei� Hel� Files��  Thi� groupin� i� a� �
follows:

    1.  I/O                       8.  Command Files
         CONFIG, TINIT                 SUB2
         DEVICE                        ZEX
         IOLOADER
         RECORD                   9.  Named Directories
         STARTUP                       CD
         SYSIO                         STARTUP as ST
                                       LD
    2.  Directories                    MKDIR
         XDIR3                         PWD

    3.  Disk Utilities           10.  ZCPR2
         DU2                           DIR, XDIR3
                                       ERA, ERASE
    4.  Library                        REN, RENAME
         LDIRZ                         TYPE, PAGE
         LRUNZ                         LIST, PRINT
         LU                            SAVE
                                       JUMP
    5.  Menu                           GO
         MCHECK                        GENINS
         MENU                          PATH
                                       WHEEL
    6.  File Compare                   PROTECT
         COMPARE
         CRC                     11.  Help
         DIFF                          HELP2

    7.  File Copy                12.  Misc
         MCOPY                         CCPLOC
                                       ECHO


             ZCPR2 Transients Grouped by Function


    Th� followin� i� � brie� overvie� o� thes� transient� whic� �
concentrate� o� thei� function� an� interactions��  Thi� overvie� �
i� organize� accordin� t� th� functiona� grouping� give� above�  �
Al� o� th� ZCPR2-specifi� an� ZCPR2-residen� command� ar� des�
cribe� i� detai� i� th� User'� Guide.



    1.  Input/Output

         Th� CONFI� an� TINI� program� ar� use� t� progra� th� �
TV� 95� CR� terminal�  Thes� ar� provided� o� course� fo� TV� 95� �
owners� bu� the� als� serv� a� example� o� ho� t� se� u� termina� �
programmer� fo� othe� type� o� terminal� a� well�  CONFI� i� use� �
t� creat� configuratio� file� fo� variou� type� o� functions� �
suc� a� assembl�� languag� softwar� development�� à languag� �
softwar� development�� wor� processing�� an� dat� bas� work�  Th� �
file� create� b� CONFI� contai� dat� whic� ma� b� use� b� CONFI� �
itself or TINIT to program the terminal.

         I� programmin� th� terminal�� th� attribute� o� th� �
display�� th� typ� o� cursor�� th� content� o� th� functio� keys� �
an� th� displa� o� th� statu� lin� ar� som� o� th� function� o� �
th� termina� whic� ma� b� programmed��  CONFI� serve� t� creat� �
configuratio� file� (o� typ� CFG� mainly�� an� TINI� i� use� t� �
perfor� th� programming�  TINI� read� th� indicate� configuratio� �
fil� afte� followin� � pat� i� lookin� fo� i� an� the� send� th� �
appropriate command sequences to the terminal.

         SYSIO.AS͠ i� � sampl� Redirectabl� I/� Packag� whic� �
run� o� m� ZCPR� system��  I� ca� b� use� t� ac� a� � mode� fo� �
th� desig� o� othe� suc� package� fo� variou� purpose� an� �
hardware configurations.  The reader is invited to study it.

         IOLOADEҠ i� use� t� loa� � Redirectabl� I/Ϡ Packag� �
int� memor� an� cal� it� initializatio� routine��  DEVIC� i� use� �
t� displa� th� name� an� meaning� o� th� devic� driver� containe� �
i� a� I/� packag� an� t� selec� � physical-to-logica� devic� �
assignmen� a� desire� b� th� user�  RECOR� i� use� t� contro� th� �
dis� fil� outpu� function� fo� recordin� consol� outpu� an� �
printe� outpu� int� dis� files.

         Finally��� STARTUР i� include� i� thi� listin� t� �
emphasiz堠 tha� i� ma�� b� use� t� execut� IOLOADEҠ� fo� �
initialization purposes.


    2.  Directories

         XDIR�� i� th� extende� director�� displa�� utilit�� o� �
ZCPR2��  I� support� � wid� variet� o� functions�� rangin� fro� �
director�� displa�� t� fil� nam� scanner��  I� use� path� an� �
supports the named directory scheme under ZCPR2.


    3.  Disk Utilities

         DU�� i� � slightl� enhance� versio� o� DU�� � dis� �
utilit� designe� b� War� Christensen�  Th� reason� � cam� u� wit� �
DU�� wer� t� ad� � coupl� o� additiona� features�� chang� DU'� �
human-engineerin� interfac� t� matc� m� particula� tastes� an� t� �
mak� i� mes� mor� cleanl� wit� ZCPR2. �
    4.  Library Utilities

         Lՠ (Librar�� Utility�� i� � progra� writte� b�� Gar� �
Novosielsk� whic� place� � numbe� o� smalle� file� int� on� larg� �
fil� wit� it� ow� directory��  Amon� othe� things�� thi� progra� �
help� t� conserv� spac� o� dis� b� eliminatin� � lo� o� th� wast� �
associate� wit� th� unuse� spac� i� th� las� grou� o� � fil� an� �
provide� � convenien� wa� t� grou� program� together.

         LDIR� i� � progra� � wrot� t� allo� th� use� t� examin� �
th� content� o� � librar� fil� an� displa� th� content� i� a� �
alphabetica� listin� wit� fil� siz� information��  I� use� path� �
t� fin� th� librar� fil� (o� typ� LBR� tha� i� wishe� t� dea� �
with.

         LRUNڠ i� � modificatio� o� th� Gary'� LRUΠ progra� �
whic� perform� th� sam� functio� bu� searche� alon� path� fo� th� �
librar� file.


    5.  Menu

         MENՠ� an� MCHECˠ ar� th� program� use� t dea� �
specificall�� wit� � men� comman� syste� unde� ZCPR2��  Menu� ar� �
create� i� th� for� o� MENU.CP� files�� wit� onl�� on� MENU.CP� �
fil堠 permitte� pe� director�� an� wit� eac� MENU.CPҠ fil� �
containin� u� t� 25� menus��  Th� Men� Syste� set� u� � comman� �
environmen� i� whic� th� command� whic� th� use� ma� execut� ar� �
presente� t� hi� i� th� for� o� � menu�� an� th� use� execute� �
them by selecting an option letter.

         MENՠ execute� MENU.CP� files�� an� MCHEC� i� use� t� �
check the syntax of such files.


    6.  File Compare

         COMPARŠ i� use� t� simpl� compar� tw� files�� tellin� �
th� use� i� the� ar� th� sam� o� not��  DIF� i� use� t� lis� ou� �
th� difference� betwee� tw� file� o� � byte-for-byt� basis��  Th� �
relativ� offset� int� th� files�� an� th� differen� byt� values� �
expressed in decimal, hexadecimal, and ASCII, are presented.

         CRà i� use� t� comput� Cycli� Redundanc� Chec� value� �
fo� files��  I� tw� file� ar� th� sam� siz� an� thei� CR� value� �
ar� th� same�� the� ther� i� � ver� goo� chanc� tha� the�� ar� �
copie� o� th� sam� file�  CR� i� particularl� usefu� i� comparin� �
� fil� tha� ha� jus� bee� downloade� b� � program�� lik� XMODEM� �
to the file on the remote computer it was downloaded from.


    7.  File Copy

         MCOP٠ i� � progra� whic� i� use� t� cop� file� i� th� �
ZCPR�� environment��  I� know� abou� paths�� ca� dea� wit� name� �
directories� ca� dea� wit� list� o� file� a� arguments� an� ha� � �
numbe� o� extende� feature� an� facilities��  Som� o� thes� �
features include:

              . Disk Directory Display with Sizing Info
              . Can Copy to Any Directory on Any Disk
              . Supports Multiple Copy in which a group of
                   files can be copied to several disks by
                   simply loading one disk after another
                   without concerning the user with Warm
                   Booting the system
              . Permits Disks to be changed on it at will
                   once it is loaded and begins running
              . Supports an Inspect Mode
              . Optional Verify via CRC's and Rereading
                   the files from the destination
              . Can be run from the command line or from
                   an internal command processor
              . Built-In Help



    8.  Command Files

         SUB�� i� � disk-base� indirec� comman� fil� facilit� �
lik� SUBMI� whic� wa� base� o� Ro� Fowler'� SuperSU� an� support� �
stil� mor� features�� includin� pat� searche� fo� th� comman� �
files to execute.

         ZEؠ i� � memory-base� indirec� comman� fil� facilit� �
whic� i� base� o� E� an� support� mor� features�� includin� pat� �
searches, immediate user input, and ZCPR2 interfacing.



    9.  Named Directories

         MKDI� i� use� t� creat� an� edi� name� director� files�  �
Th� use� ca� add� rename� an� delet� entrie� fro� suc� � fil� an� �
the� sav� th� result� o� dis� a� th� sam� fil� o� � differen� �
file.

         LĠ load� � name� director� fil� create� b� MKDIҠ int� �
th� memory-base� name� director� buffer��  I� als� reformat� th� �
informatio� i� th� fil� t� b� compatabl� wit� th� forma� use� i� �
the buffer.


         PWĠ print� th� nam� o� th� curren� director� th� use� �
i� logge� int� an� ca� als� prin� th� name� o� al� directorie� �
whic� ma� b� accesse� b� th� use� fro� th� curren� directory�  I� �
derive� it� informatio� fro� th� memory-base� name� director� �
buffe� an� th� firs� NAMES.DIҠ fil� encountere� alon� it� �
indicated path.

         CĠ i� use� t� Chang� Directorie� o� lo� int� � �
director� b� usin� it� name��  C� log� int� � name� director�� i� �
the following manner:

              1.  Scan first the memory-based named
                   directory buffer and then search
                   along the path and scan the first
                   disk-based NAMES.DIR file; this
                   is done to match the name given to
                   CD

              2.  Determine if the user number of the
                   desired directory is in the privil-
                   eged areas and, if so, ask for and
                   validate the access password

              3.  Once access right is determined, temp-
                   orarily log into the indicated directory
                   and look for ST.COM; if found, log in
                   permanently and execute it via the
                   Multiple Command Line Buffer facility;
                   if not found, simply log the user in


         STARTU� i� mentione� her� because�� whe� rename� t� ST� �
i� provide� a� initia� comman� sequenc� t� b� execute� upo� �
enterin� � particula� directory��  Thi� comman� sequenc� ma�� b� �
used to perform functions like the following:

              1.  Load New I/O Drivers
              2.  Load a New Memory-Based Named Dir
              3.  Establish a New Command Search Path
              4.  Reprogram the User's Terminal
              5.  Run the MENU System


   10.  ZCPR2

         Ther� ar� tw� set� o� programs/command� directl�� asso�
ciate� wit� ZCPR� itself��  Thes� ar� th� ZCPR� Residen� Command� �
an� thei� Alternat� Transien� Commands��  Th� Residen� Command� �
perfor� basi� function� rathe� quickly�� an� th� Alternat� Trans�
ien� Command� elaborat� o� thes� basi� function� bu� perfor� the� �
mor� slowly�� a� � genera� rule��  Som� o� th� command� i� th� �
Alternat� clas� hav� n� correspondin� comman� i� th� Residen� �
class�� bu� the�� ar� include� becaus� the�� perfor� � ZCPR2-�
supporting function. �
         The Resident Commands include:

              DIR  - Directory Display
              ERA  - File Erase
              REN  - File Rename
              TYPE - Print File on Console
              LIST - Print File on Printer
              SAVE - Save Memory Image on Disk
              JUMP - Jump to Anywhere in Memory
              GO   - Reexecute Last Loaded Transient

         The Alternate Transient Commands include:

              XDIR3   - Directory Display
              ERASE   - File Erase
              RENAME  - File Rename
              PAGE    - Print File on Console
              PRINT   - Print File on Printer

              GENINS  - Utility Install Program
              PROTECT - File Attribute Set Program
              PATH    - External Path Display/Set Utility
              WHEEL   - Set/Reset Wheel Byte



   11.  Help

         Th堠 HELР� progra� support� th堠 ZCPR���� onlin� �
documentatio� system��  Ove� 300� i� Hel� File� (o� typ� HLP� ar� �
provide� wit� th� ZCPR� System� an� al� command� distribute� wit� �
ZCPR2 are documented therein.


   12.  Miscellaneous

         CCPLO� i� use� t� displa� th� addres� o� th� CCP� BDOS� �
and BIOS.  This program is used during installation.

         ECHϠ i� use� t� ech� th� comman� line��  I� i� use� t� �
issu� � simpl� one-lin� messag� t� th� use� whe� hidde� comman� �
lines, like those generated by STARTUP/ST, are executed.




5.0  Multiple Command Lines

    Th� Multipl� Comman� Lin� Facilit� o� ZCPR�� support� tw� �
basic functions in the ZCPR2 environment:

         1)�i� allow� th� use� t� specif� � serie� o� command� �
�������������separate� b� semicolon� (a� recommended)

         2) i� allow� on� progra� t� easil� chai� t� anothe� o� �
�������������� whol� serie� o� programs

    Th� firs� applicatio� o� thi� facilit�� ha� bee� show� �
several times.  It permits command lines like the following:

         ed prog.mac;m80 =prog;l80 prog/e;era *.bak;era *.rel

    Th� secon� applicatio� i� employe� extensivel� b� fou� ZCPR� �
utilitie� i� particula� -- STARTUP�� MENU� CD� an� ZEX�  STARTUP� �
CD� an� MEN� hav� bee� demonstrate� earlier.

    Th� Multipl� Comman� Lin� Buffer� whic� i� use� t� stor� th� �
Multipl� Comman� Line�� i� locate� externa� t� ZCPR� i� som� saf� �
are� o� memor�� (suc� a� u� i� th� BIOS�� wher� i� won'� b� �
overwritte� ever� tim� � War� Boo� occurs��  I� i� structure� a� �
follows:

         Bytes 0 and 1:  Address of Next Character in Buffer
         Byte 2:  Size of Buffer
         Byte 3:  Dummy used by BDOS Readln Function 10
         Bytes 4-n:  Buffer Contents, terminated by a binary 0

    Whe� th� Col� Boo� routin� i� th� BIOӠ executes�� i� mus� �
initializ� thi� buffe� fo� subsequen� us� b�� ZCPR2��  I� ma� �
optionall�� stor� � comman� o� se� o� command� t� b� execute� o� �
Col� Boot�� amon� othe� things� bu� i� MUS� perfor� th� followin� �

functions as a minimum:

         1� se� th� Addres� o� th� Nex� Cha� t� poin� t� Byt� 4
         2) set the buffer size
         3) initialize the buffer contents, making sure they are
            terminated by a binary 0


    Fo� example� i� th� buffe� start� a� 0FF00� an� i� 128 byte� �
long�� th� BIOӠ Col� Boo� Routin� shoul� stor� th� followin� �
values starting at 0FF00H:

         FF00: 04  ; Low-Order Address of First Char
         FF01: FF  ; High-Order Address of First Char
         FF02: 80  ; Size of Buffer (80H=128 Bytes)
         FF03: xx  ; Don't Care
         FF04: 0   ; Buffer MUST be terminated by a 0

    I� � defaul� comman� lin� i� t� b� execute� o� Col� Boot� �
the� th� buffe� startin� a� 0FF04� shoul� b� fille� wit� th� �
character� o� th� lin� (cas� i� immaterial)��  I� an�� case�� th� �
buffer contents MUST be terminated by a binary 0.

    On� progra� ca� us� thi� knowledg� t� chai� t� anothe� �
progra� b� simpl� storin� � comman� lin� int� th� Multipl� Com�
man� Lin� Buffer��  Thi� i� ho� MEN� perform� it� function��  I� �
take� th� comman� lin� give� b� th� men� programme� (h� wh� se� �
u� th� MENU.CP� file� an� store� i� verbati� (wit� limite� pro�
cessing�� int� th� Multipl� Comman� Lin� Buffer��  Onc� stored� �
MENՠ the� terminate� thi� comman� wit� � semicolo� (t� indicat� �
tha� anothe� comman� follows)�� it� nam� (MENU� s� tha� MEN� wil� �
b� reentere� whe� th� user'� comman� i� finished� an� a� optiona� �
men� numbe� t� reente� at�  Al� o� thi� i� followe� b� � binar� � �
t� indicat� a� en� o� th� buffer.

    CD�� whe� i� log� int� � ne� directory�� look� fo� th� fil� �
ST.COM�� and�� i� i� i� found�� C� chain� t� ST.CO� b� usin� th� �
Multipl� Comman� Lin� Buffer��  Sinc� C� an� S� ar� bot� tw� �
character� long�� an� th� origina� C� comman� i� stil� i� th� �
buffer�� C� simpl� take� th� curren� valu� o� th� buffe� pointe� �
(whic� i� pointin� t� th� characte� afte� th� CĠ command�� vi� �
eithe� � semicolo� o� � binar� 0)�� back� i� u� � bytes� replace� �
th� pointer�� store� th� letter� "ST� wher� "CD� use� t� be�� an� �
return� t� ZCPR� wit� th� appropriat� user/dis� fla� s� tha� �
ZCPR� wil� lo� i� th� ne� directory�  ZCPR2� afte� loggin� i� th� �
ne�� directory�� look� a� th� Multipl� Comman� Lin� Buffer�� see� �
th� comman� "ST"� an� run� it�  Nic� an� simple!

    Th� followin� termina� sessio� illustrate� th� us� o� th� �
Multipl� Comman� Lin� Buffe� i� chainin� program� togethe� vi� �
ZCPR2�  Not� tha� AN� comman� line� eve� on� consistin� o� sever�
a� command� separate� b� semicolons�� ma� b� store� int� th� �
Multipl� Comman� Lin� Buffe� fo� th� purpos� o� chaining��  Th� �
termina� sessio� follow� o� th� nex� page:


B1>;
B1>;  This is a demo of chaining under ZCPR2
B1>;  Note that SYSLIB is used extensively in this
B1>;    example, and the reader is invited to refer
B1>;    to the SYSLIB User's Guide and SYSLIB User
B1>;    and Reference Manual if he really wants to see
B1>;    how this program works
B1>;
B1>
B1>;
B1>;  First, I have created a program that chains to itself,
B1>;  printing its command line each time:
B1>;
B1>type me.mac p
;
;  This program demonstrates the program chaining capability
;  under ZCPR2.
;
cr      equ     0dh     ;<CR>
lf      equ     0ah     ;<LF>

       ext     cline   ;SYSLIB routine to extract cmd line
       ext     pstr    ;SYSLIB routine to print string
       ext     print   ;SYSLIB routine to print ret string
       ext     bbline  ;one of the SYSLIB input line editors
       ext     cin     ;char in via SYSLIB
       ext     caps    ;char caps via SYSLIB
       ext     cout    ;char out via SYSLIB
       ext     crlf    ;new line

;
;  Print Banner
;
       call    print
       db      cr,lf,'Chaining Demo -- Command Line is: ',0
;
;  Extract and Print Command Line
;
       lxi     h,80h   ;pt to command line buffer
       call    cline   ;extract it
       call    pstr    ;print it
;
;  Prompt User and Get Single-Char Input from him
;
       call    print
       db      cr,lf,'Do you want to chain to ME? ',0
       call    cin     ;get response
       call    caps
       call    cout    ;echo
       call    crlf    ;new line
       cpi     'Y'     ;respond to Y only
       jnz     abort


;
;  Set Buffer Ptr and
;  Store ME Command into Multiple Command Line Buffer
;
       lxi     h,0ff00h        ;address of multiple command line
                               ;  buffer in my ZCPR2 System
       lxi     d,0ff00h+4      ;address of first char in buffer
       mov     m,e     ;set buffer ptr to first char
       inx     h
       mov     m,d     ;store low, high address of first char
       xchg            ;HL pts to first char in buffer
       lxi     d,command       ;store command name
       call    strput  ;save command name
       mvi     m,' '   ;store <SPACE> after command name
       inx     h       ;pt to char after space
       xchg            ;DE pts to next char in command line
;
;  Prompt User for and Get Command Line
;
       call    print
       db      cr,lf,'  Command Line? ',0
       xra     a       ;don't capitalize input
       call    bbline  ;get line from user
;
;  Store Rest of Command Line into Multiple Command Line Buffer
;
       xchg            ;DE pts to user input string, HL pts to
                       ;next char in command line
       call    strput  ;save string
       mvi     m,0     ;store ending zero in command
       ret             ;return to OS and let it run the command
;
;  Abort Program
;
abort:
       call    print
       db      cr,lf,'ME done',0
       ret
;
;  Utility Routine to Copy String pted to by DE to memory pted
;  to by HL until end of string (binary 0) is encountered.
;
strput:
       ldax    d       ;get char
       ora     a       ;done?
       rz              ;return if so
       mov     m,a     ;put it
       inx     h       ;pt to next
       inx     d
       jmp     strput  ;continue


;
;  ME Command
;
command:
       db      'me',0  ;name of this command

       end

B1>;
B1>;  Now to run the program -- all it does is store another
B1>;  command into the multiple Command Line Buffer which
B1>;  consists of its own name (ME) followed by the text input
B1>;  by the user.  When ME.COM runs, it prints the command
B1>;  line (the user text) and asks the user if he wants to
B1>;  do it again.
B1>;
B1>me

Chaining Demo -- Command Line is:
Do you want to chain to ME? Y

 Command Line? this is the first run of ME

Chaining Demo -- Command Line is:  THIS IS THE FIRST RUN OF ME
Do you want to chain to ME? Y

 Command Line? this is another run of me

Chaining Demo -- Command Line is:  THIS IS ANOTHER RUN OF ME
Do you want to chain to ME? Y

 Command Line? this is the third run

Chaining Demo -- Command Line is:  THIS IS THE THIRD RUN
Do you want to chain to ME? Y

 Command Line? i'm bored, so let's quit now

Chaining Demo -- Command Line is:  I'M BORED, SO LET'S QUIT NOW
Do you want to chain to ME? N

ME done
B1>;
B1>;  End of Demo
B1>;


6.0  Paths, Command Processing, and Extended Command Processors

6.1  Paths

    A� th� reade� ha� seen� th� concep� o� � pat� i� fundamenta� �
t� ZCPR2��  I� th� ZCPR� vernacular�� � Path� i� � sequenc� o� �
directorie� t� b� searche� fo� � file��  Th� specificatio� o� � �
pat� i� a� � sequenc� o� D� form� whic� ar� extende� b�� th� �
introductio� o� th� "$� characte� t� indicat� � curren� dis� o� �
curren� use� area�  Example� o� path� are:

         1) $�� $� A� A� -- Pat� Fro� Curren� Disk/Curren� Use� �
�������������t� Curren� Disk/Use� � t� Dis� A/Curren� Use� t� �
�������������Dis� A/Use� � (Curren� Disk/Use� i� th� disk/use� �
�������������are� tha� th� use� i� logge� into)

    I� � wa� logge� int� Dis� B�� Use� 5�� the� "$� i� th� dis� �
positio� (firs� character� woul� mea� � an� "$� i� th� 2n� posi�
tio� woul� mea� Use� 5��  Hence�� th� abov� path� whic� i� � sym�
boli� path� sinc� i� contain� th� "$� character�� woul� b� trans�
late� int� a� absolut� path� o� B� B� A� A� i� � wa� logge� int� �
B� o� C� C� A� A� i� � wa� logge� int� C7.

         2) $� A� A2� A1� B2� C1� C� B� $� A� -- � thin� yo� ca� �
�������������follo� thi� path�� thi� i� t� illustrat� tha� � pat� �
�������������lengt� i� indefinit� (usuall� u� t� 1�� directories� �
�������������whic� i� quit� reasonable� an� ca� exten� int� use� �
�������������area� beyon� 15� whic� can'� b� logge� into

    Again�� i� � wa� logge� int� B5� thi� symboli� pat� woul� b� �
translate� int� th� absolut� pat� of:

         B5 A0 A22 A14 B22 C12 C0 B0 B0 A5

    Th� PAT� comman� i� availabl� t� th� ZCPR� use� t� allo� hi� �
t� displa�� hi� curren� pat� an� dynamicall� chang� i� durin� � �
session��  Onc� changed� th� pat� stay� i� th� altere� for� unti� �
eithe� � Col� Boo� occur� o� th� use� employ� PAT� t� chang� i� �
again��  Thi� ha� bee� illustrate� severa� time� befor� i� thi� �
document��  Stud�� th� followin� termina� sessio� fo� specifi� �
example� o� th� us� o� path� i� ZCPR2.

B1>;
B1>;  This example illustrates paths under ZCPR2
B1>;
B1>


B1>;
B1>;  First, I have this program:
B1>;
B1>type where.mac
       ext     retud
       ext     print
       ext     padc
       ext     cout

       call    retud   ;get user/disk in C/B
       call    print
       db      'You are logged into Disk ',0
       mov     a,b     ;get disk
       adi     'A'     ;convert to letter
       call    cout
       call    print
       db      ' and User ',0
       mov     a,c     ;get user
       call    padc    ;print as decimal
       ret

       end

B1>;
B1>;  ... which does this:
B1>;
B1>where
You are logged into Disk B and User   1
B1>
B1>;
B1>;  There is currently only one copy of WHERE.COM, and that is
B1>;  in B1
B1>;
B1>
B1>;
B1>;  My path is:
B1>;
B1>path
PATH Version 2.2
Current Symbolic Path --
       $$: --> $0: --> A$: --> A0:
Current Absolute Path --
       B1: --> B0: --> A1: --> A0:
Current Named Path --
       ASM: --> DEV-ROOT: --> R-ASM: --> ROOT:
B1>2:


B2>;
B2>;  I do not cover B1 now, so WHERE.COM will not be found
B2>;  when I issue the command:
B2>;
B2>where
WHERE?
B2>;
B2>;  Unless, of course, I tell ZCPR2 where to look:
B2>;
B2>1:where
You are logged into Disk B and User   2
B2>;
B2>;  OR ... I could change the path to cover B1
B2>;
B2>path $$ $0 a$ a0 b1
PATH Version 2.2
Current Symbolic Path --
       $$: --> $0: --> A$: --> A0: --> B1:
Current Absolute Path --
       B2: --> B0: --> A2: --> A0: --> B1:
Current Named Path --
       BDSC: --> DEV-ROOT: --> R-BDSC: --> ROOT: --> ASM:
B2>;
B2>;  Now, WHERE in B1 will ALWAYS be found, because B1 is
B2>;  Specifically in the PATH!
B2>;
B2>where
You are logged into Disk B and User   2
B2>;
B2>;  ... whereever I go, B1 is in the path, and WHERE.COM in
B2>;  B1 will be found:
B2>;
B2>a10:;path
PATH Version 2.2
Current Symbolic Path --
       $$: --> $0: --> A$: --> A0: --> B1:
Current Absolute Path --
       A10: --> A0: --> A10: --> A0: --> B1:
Current Named Path --
       SYS: --> ROOT: --> SYS: --> ROOT: --> ASM:
A10>where
You are logged into Disk A and User  10
A10>b15:
B15>where
You are logged into Disk B and User  15
B15>a0:;where
You are logged into Disk A and User   0
A>b1:


B1>;
B1>;  Now, in a normal ZCPR2 working environment, it is nice to store
B1>;  commands in one of the user areas you can't log into, and then
B1>;  set up the path to go into it:
B1>;
B1>mcopy a16:=where.com
MCOPY  Version 2.2
       Copy B  1: WHERE   .COM to A 16:
No Original File WHERE   .COM on Destination
!

   Copy Complete,  Verify Phase --

   Verify Complete
**** MCOPY Complete ****
           1 Files Copied
           0 Copy Errors
B1>path $$ $0 a$ a0 a16
PATH Version 2.2
Current Symbolic Path --
       $$: --> $0: --> A$: --> A0: --> A16:
Current Absolute Path --
       B1: --> B0: --> A1: --> A0: --> A16:
Current Named Path --
       ASM: --> DEV-ROOT: --> R-ASM: --> ROOT: --> Noname:
B1>era where.com
WHERE   .COM
B1>where
You are logged into Disk B and User   1
B1>b5:;where
You are logged into Disk B and User   5
B5>a14:
A14>where
You are logged into Disk A and User  14
A14>;
A14>;  See the point?  Now, if I take away WHERE.COM from A16,
A14>;  it won't be found anymore:
A14>;
A14>era a16:where.com
WHERE   .COM
A14>where
WHERE?
A14>b1:
B1>where
WHERE?
B1>;
B1>;  End of Demo
B1>;



6.2  Command Processing

    Comman� processin� unde� ZCPR�� follow� � ver�� logica� �
sequence of events each time a command is issued:

1) Inpu� an� Pars� Comman� Lin� fro� Use� o� File

2) Determin� i� i� i� � ZCPR2-residen� comman� an� ru� i� �
����i� so

3) Searc� alon� th� comman� searc� path�� loggin� int� th� �
����disk� an� use� area� indicate� i� th� pat� unti� eithe� �
����th� botto� o� th� pat� i� reache� o� th� desire� CO� �
����fil� i� found� ru� progra� i� found

4) Invok� a� Extende� Comman� Processor�� passin� th� Com�
����man� Lin� t� it

5) Prin� erro� messag� i� 2� 3� an� � fail


    Whe� ZCPR� searche� fo� � file�� i� follow� � path��  Thi� �
pat� i� referre� t� a� th� Comman� Searc� Path��  Tw� extremel� �
flexibl� feature� i� thi� desig� are:

1) th� comman� searc� pat� ma� b� redefine� dynamicall�� b� �
����th� user

2) severa� ZCPR� transient� us� path� also� an� thes� path� �
����ma�� b� th� sam� pat� use� b� comman� searc� o� the� ma� �
����b� uniqu� t� eac� transient

    I� th� pat� searc� fails� ZCPR� ca� the� searc� fo� an� loa� �
a� extende� comman� processo� fo� furthe� processin� o� th� �
comman� lin� beyon� thos� facilitie� o� ZCPR� itself��  Refe� t� �
th� exampl� unde� sectio� 6.� fo� detail� o� th� ZCPR�� pat� �
searc� techniques.


6.3  Extended Command Processors

    Th� las� functio� t� b� performe� befor� ZCPR� finall� give� �
u� i� it� searc� fo� � comman� specifie� b� th� use� i� t� loo� �
fo� an� ru� a� Extende� Comman� Processor��  Thi� facilit� ca� b� �
engage� o� disengage� a� th� discretio� o� th� syste� manager� �
and� i� i� i� engaged� th� syste� manage� ca� elec� t� hav� ZCPR� �
searc� th� entir� comman� searc� pat� fo� th� Extende� Comman� �
Processo� o� t� onl� loo� i� th� las� director� logge� i� (a� th� �
en� o� th� path).


    Th� las� tw� option� ar� se� a� assembl� tim� b� th� ROOT�
ONL٠ equate��  Th� prio� option�� tha� o� havin� thi� featur� o� �
not�� i� als� se� a� assembl� tim� b� th� CMDRUΠ equate��  Als� �
specifie� a� thi� tim� i� th� nam� an� typ� o� th� fil� t� b� �
execute� a� th� Extende� Comman� Processor.

    I� th� Extende� Comman� Processo� i� no� found�� th� conven�
tiona� erro� messag� i� given�� flaggin� th� origina� comman� a� �
bein� i� error��  I� th� Extende� Comman� Processo� (name� CMD�
RUN.CO͠ a� pe� th� recommendation� i� found�� the� th� entir� �
comman� lin� i� passe� t� i� a� th� i� ha� bee� ru� a� � comman� �
i� it� ow� right��  Fo� instance�� i� th� origina� comman� lin� �
was:

         MASM MYPROG

an� th� fil� MASM.CO� wa� no� foun� bu� th� Extende� Comman� �
Processo� CMDRU� was�� the� thi� woul� b� equivalen� t� issuin� �
th� command:

         CMDRU� MAS� MYPROG

    Th� utilit� o� thi� featur� ca� b� see� immediately��  Ima�
gin� tha� th� SUBMI� progra� wer� rename� t� CMDRUN��  The� th� �
failur� o� � comman� woul� caus� SUBMI� t� ru� an� attemp� t� ru� �
� comman� file.


    Wit� thi� featur� i� mind�� thre� ZCPR� transient� ar� pro�
vide� whic� ma� b� use� a� Extende� Comman� Processors�  The� ar� �
SUB2�� ZEX� an� LRUNZ�  SUB� an� ZE� ar� comman� fil� processors�  �
SUB� i� lik� a� enhance� SUBMIT� an� ZE� i� als� lik� a� enhance� �
SUBMIԠ bu� i� place� it� executabl� tex� int� memor�� an� run� �
muc� faster.

    LRUN� i� � CO� fil� extractor�  I� work� i� conjunctio� wit� �
th� Librar� Uti
lit� (LU� progra� an� ca� extrac� � CO� fil� fro� �
COMMAND.LBҠ an� the� ru� it��  I� essence�� LRUN� a� a� Extende� �
Comman� Processo� act� a� � mediar� betwee� � CO� fil� store� i� �
COMMAND.LBҠ an� ZCPR2��  I� thi� case�� i� th� origina� comman� �
was:

         XXX� THI� I� IT

an� XXXX.CO� wa� no� found�� the� CMDRU� (LRUNZ� woul� b� execu�
ted�� fin� XXXX.CO� i� COMMAND.LB� (afte� searchin� th� comman� �
searc� pat� fo� COMMAND.LBR)� simulatin� thi� command:

         LRUN� XXX� THI� I� IT


    Onc� LRUN� locate� XXXX.CO� i� COMMAND.LBR�� i� woul� loa� �
XXXX.CO� an� pas� t� i� thi� comman� line:

         THI� I� IT

    Th� SUB2�� ZEX�� an� LRUN� program� ar� describe� i� mor� �
detail in the User's Guide.

    Th� followin� i� � termina� sessio� illustratin� th� us� o� �
ZEX as an Extended Command Processor:

B1>;
B1>;  I will illustrate the use of ZEX as the Extended
B1>;  Command Processor.  To do this, CMDRUN.COM must be
B1>;  created from the file ZEX.COM, and the name of the
B1>;  desired command file(s) must be made different from any
B1>;  corresponding COM file:
B1>;
B1>a0:
A>pip cmdrun.com=zex.com[r]

A>dir *.com
CMDRUN  .COM
A>1:
A1>;
A1>;  Since I have M80.ZEX and M80.COM, I want M80.ZEX to be
A1>;  unique so that a COM file won't be picked up before the
A1>;  ZEX file is run:
A1>;
A1>pip masm.zex=m80.zex

A1>b:

B1>;
B1>;  Now to illustrate by creating and assembling a program
B1>;
B1>ed demo.mac

NEW FILE
    : *i
   1:          ext     cline
   2:          ext     pstr
   3:          lxi     h,80h   ;pt to command line from OS
   4:          call    cline   ;get command line
   5:          call    pstr    ;print it
   6:          ret
   7:
   8:          end
   9:
    : *e


B1>;
B1>;  Now to use the MASM.ZEX file as tho it were a COM file.
B1>;  In the next command line, "time" is TIME.COM and "masm"
B1>;  is MASM.ZEX:
B1>;
B1>time;masm demo;time
TIME  Version 1.1    7:18:55 AM on Tuesday December 21, 1982
ZEX, Version 1.1
(ZEX Active)
B1>;  M80.SUB -- MACRO-80 Assembler and Linker
B1>M80 =DEMO

No Fatal error(s)

(ZEX Active)
B1>;  Please Type ^C if Error(s) Exist -

B1>ERA DEMO.BAK
DEMO    .BAK
B1>ERA DEMO.COM
No File
B1>L80 /P:100,DEMO,A:SYSLIB/S,DEMO/N,/U,/E

Link-80  3.44  09-Dec-81  Copyright (c) 1981 Microsoft
Data    0100    02C4    <  452>

35668 Bytes Free

Data    0100    02C4    <  452>

35668 Bytes Free
[0000   02C4        2]

(ZEX Active)
B1>ERA DEMO.REL
DEMO    .REL
B1>;  Assembly Complete
B1>TIME
TIME  Version 1.1    7:20:02 AM on Tuesday December 21, 1982
B1>
(ZEX Completed)
By Your Command >dir
DEMO    .MAC  |  DEMO    .COM
B1>demo this is a test
THIS IS A TEST
B1>;
B1>;  End of Demo
B1>;


7.0  Redirectable I/O

7.1  The Concept

    Redirectabl� Input/Output� refer� t� th� abilit� o� th� CP/� �
use� t� switc� t� differen� Input/Outpu� device� durin� th� �
cours� o� � CP/� session�  Optionall� implemente� throug� th� I/� �
Byte� I/� unde� CP/� support� fou� logica� devices� namely:

         � Consol� (CON:)� whic� i� a� input/outpu� device
         A Printer (LST:), which is an output-only device
         A Reader (RDR:), which is usually an input-only device
         A Punch (PUN:), which is usually an output-only device

Eac� o� thes� fou� logica� device� ma� hav� an�� on� o� fou� �
physica� device� assigne� t� them�� givin� th� use� u� t� sixtee� �
physica� device� h� ma� wor� with��  Th� reade� i� invite� t� �
refe� t� th� CP/� 2.� Alteratio� Guide� b� Digita� Researc� fo� �
furthe� information.

    Th� I/� Byt� (a� memor� locatio� 3� i� use� t� specif�� th� �
assignmen� o� thes� devices��  I� i� divide� int� fou� 2-bi� �
fields�� eac� fiel� associate� wit� � logica� devic� an� eac� o� �
th� fou� bi� combination� (00�� 01�� 10�� 11� withi� th� fiel� �
associate� wit� � physica� device��  Th� STA� comman� i� use� t� �
mak� mnemoni� assignment� t� th� variou� devices�� a� i� command� �
lik� "STAԠ CON:=CRT:"��  Th� followin� tabl� summarize� th� �
logica� an� physica� devic� assignment� an� mnemonic� availabl� �
through the I/O Byte:

                     I/O Byte Assignments

         Logical Device -->  LST: | PUN: | RDR: | CON:
         Bit Position   -->  7 6  | 5 4  | 3 2  | 1 0
    Physical Assignment   |  ---- | ---- | ---- | ----
          0     00 Binary |  TTY: | TTY: | TTY: | TTY:
          1     01 Binary |  CRT: | PTP: | PTR: | CRT:
          2     10 Binary |  LPT: | UP1: | UR1: | BAT:
          3     11 Binary |  UL1: | UP2: | UR2: | UC1:


                       I/O Byte Devices
        Physical Device     Typical Meaning
              TTY:           Teletype
              CRT:           Cathode Ray Tube Terminal
              BAT�           Batc� Processo� (RDR=in� LST=out)
              UC1:           User-Defined Console
              PTR:           Paper Tape Reader
           UR1:, UR2:        User-Defined Reader Devices
              PTP:           Paper Tape Punch
           UP1:, UP2:        User-Defined Punch Devices
              LPT:           Line Printer
              UL1:           User-Defined List Device

    Hence�� b�� usin� th� STA� command�� th� CP/� 2.�� use� ma� �
reassig� th� physica� device� t� hi� logica� devices�� usin� �
differen� device� fro� tim� t� tim� wit� hi� syste� withou� �
actuall� changin� th� hardwar� configuration��  Fo� instance�� m� �
syste� come� u� wit� CON:=CRT:�� an� th� CR� i� th� principa� �
consol� device�� bu� � ca� chang� i� whe� � wis� t� m�� printin� �
termina� b�� issuin� th� comman� "STA� CON:=TTY:"�� si� a� th� �
printin� termina� a� th� � wa� a� th� CRT�� and�� whe� finished� �
mov� bac� t� th� CR� b� issuin� th� comman� "STA� CON:=CRT:".


7.2  A More Flexible Redirectable I/O System

    Unde� ZCPR2�� � hav� implemente� � slightl� differen� schem� �
fo� redirectabl� I/O��  A� pe� th� ZCPR� norm�� yo� ma� selec� t� �
continu� usin� you� ol� schem� o� switc� t� thi� ne�� one��  Th� �
concep� o� thi� ne� schem� follows.

    First� th� BIO� a� loade� fro� th� syste� track� o� th� dis� �
contain� onl�� � fe� primitiv� I/� drivers��  Onl� th� CR� a� � �
consol� i� enabled�� an� th� reader�� punch� an� lis� device� ar� �
assigned to the CRT.  No redirection is permitted at this time.

    Second�� th� BIO� i� structure� wit� al� th� I/� entrie� i� �
it� jum� tabl� branchin� t� � secon� jum� tabl� (whic� i� init�
ialize� b� th� Col� Boo� Routine)��  Thi� secon� jum� tabl� i� �
place� o� � pag� boundar� a� th� beginnin� o� � 1K-byt� scratc� �
area��  I� i� i� thi� 1K-byt� scratc� are� tha� th� physica� �
devic� driver� fo� m� syste� reside�  Th� recommendatio� o� � 1K-�
byt� are� i� � minimum��  � hav� implemente� � 2K-byt� are� whic� �
i� larg� enoug� t� suppor� almos� anythin� � ca� conceiv� of� �
includin� redirectio� t� disk�  Pictur� follows:



                     Sample BIOS Structure

Base of BIOS -->    ------------------------------------
(Lower Memory)      | Jump for Cold and Warm Boots     |
                   | Console Status Jump to IOBASE+12 |
                   | Console Input Jump to  IOBASE+15 |
                   | Console Output Jump to IOBASE+18 |
                   | List Output Jump to    IOBASE+21 |
                   | Punch Output Jump to   IOBASE+24 |
                   | Reader Input Jump to   IOBASE+27 |
                   | Jumps for Disk I/O               |
                   | List Status Jump to    IOBASE+30 |
                   | Jump for Sector Translation      |
End of Jump Table ->|----------------------------------|
                   | Body of BIOS, Containing:        |
                   |    Cold and Warm Boot Routines   |
                   |    Disk I/O Routines             |
                   |    Sector Translation Routine    |
IOBASE ->           |----------------------------------|
(On Page Boundary,  | Jump to Status Routine           |
1K Bytes in Size)   | Jump to Device Select Routine    |
                   | Jump to Device Name Routine      |
                   | Jump to Package Init Routine     |
IOBASE + 12 -->     | Jump to Console Status           |
IOBASE + 15 -->     | Jump to Console Input            |
IOBASE + 18 -->     | Jump to Console Output           |
IOBASE + 21 -->     | Jump to List Output              |
IOBASE + 24 -->     | Jump to Punch Output             |
IOBASE + 27 -->     | Jump to Reader Input             |
IOBASE + 30 -->     | Jump to List Status              |
IOBASE + 33 -->     | Jump to New I/O Routine          |
End of Jump Table ->|----------------------------------|
                   | Body of Redirectable I/O Driver  |
                   |  Package Containing the Routines |
                   |  Jumped to Starting at IOBASE    |
End of BIOS -->     ------------------------------------



7.3  What the Redirectable I/O System Buys You

    A� th� reade� ca� see�� CP/� compatabilit� i� maintaine� i� �
tha� ther� ar� stil� onl� fou� logica� devices��  Thes� ar� th� �
Consol� (CON:)�� Printe� (LST:)� Reade� (RDR:)� an� Punc� (PUN:)�  �
Wha� th� reade� ma�� no� se� ye� i� tha� th� restrictio� o� �
assignin� onl�� fou� physica� device� t� eac� o� thes� logica� �
device� i� no� gon� a� wel� a� th� rathe� obscur� name� give� t� �
th� physica� device� (suc� a� UR1:� UC1:� BAT:� etc).

    Th� designe� o� thi� syste� doe� no� nee� t� pa�� attentio� �
t� th� structur� o� th� I/� Byt� a� define� b� Digita� Research�  �
Instead� h� ca� structur� th� I/� Byt� an� wa� h� choose� o� eve� �
selec� � differen� structure�� suc� a� � 2-byt� I/Ϡ Word�� t� �
contro� hi� redirectabl� I/O. �
    Environments such as the following can be implemented:

         No Reader or Punch Devices are available
         The LST: Device may be any of the following:
              1) the Printing Terminal
              2) the CRT
              3) a Line Printer
              4) a Modem
              5) a Link to Another Computer
              6) a Disk File
         The CON: Device may be any of the following:
              1) the Printing Terminal (TTY)
              2) the CRT
              3) a Modem
              4) a Link to Another Computer
              5) CRT Input and CRT and Modem Output
              6) CRT Input and CRT and Remote Computer Output
              7) CRT Input and CRT and Disk File Output
              8) TTY Input and TTY and Modem Output
              9) TTY Input and TTY and Remote Computer Output
             10) TTY Input and TTY and Disk File Output

    A� th� reade� ca� see� � no� hav� � LST� device� an� 1� CON� �
device� (whic� i� quit� � bi� mor� flexibl� tha� havin� onl�� � �
LST�� device� an� � CON� devices)�  Also� � device� require� onl� �
�� bit� t� represen� the� (0-5� an� 1� device� require� onl�� � �
bit� t� represen� the� (0-9)� s� onl� on� byt� i� require� fo� a� �
I/� Byte.

    Th� Redirectabl� I/� Driver� contai� thre� routine� (th� �
firs� thre� i� th� jum� tabl� startin� a� IOBASE� whic� provid� �
the following functions:

  1) STATUS -- Tell� th� callin� progra� ho� man�� physica� �
����������������device� ar� availabl� fo� th� CON:�� LST:� �
����������������RDR:�� an� PUN�� logica� device� an� whic� �
����������������physica� devic� i� currentl�� assigne� t� �
����������������eac� o� th� logica� devices

���2) SELECT --�Allow� � callin� progra� t� assig� � physi�
����������������ca� devic� t� � logica� device.

���3) NAMER  --�Return� t� th� callin� progra� � pointe� t� �
����������������� tex� strin� whic� describe� � physica� �
����������������device��  Th� callin� progra� passe� t� thi� �
����������������routin� th� logica� devic� an� physica� �
����������������devic� numbers.


    Th� STATU� routin� require� n� input� an� return� � pointe� �
t� � tabl� i� HL��  Thi� tabl� i� structure� a� � serie� o� fou� �
byt� pairs��  Th� firs� byt� pai� i� associate� wit� th� CON� �
device�� th� secon� wit� th� RDR� device� th� thir� wit� th� PUN� �
device�� an� th� fourt� wit� th� LST�� device�  Th� firs� byt� o� �
eac� pai� contain� th� numbe� o� physica� device� tha� th� logic�
a� devic� ma� b� assigne� t� (thi� numbe� i� i� th� rang� fro� � �
t� 255)�  Th� secon� byt� o� eac� pai� contain� th� numbe� o� th� �
physica� devic� currentl� assigne� t� th� logica� devic� (i� th� �
rang� fro� � t� numbe� o� device� - 1).  Summary:

                STATUS Routine Table Structure

                      Count       Assignment
         Device    Byte Number    Byte Number
           CON:         0              1
           RDR:         2              3
           PUN:         4              5
           LST:         6              7

    Example:
         STABLE:
              DB   6,2       ;6 Devices, Device 2 (3rd Device)
                             ;  Assigned to CON:
              DB   0,0       ;No RDR: Devices
              DB   0,0       ;No PUN: Devices
              DB   10,5      ;10 Devices, Device 5 (6th Device)
                             ;  Assigned to LST:

    Th� SELEC� routin� i� use� t� assig� � physica� devic� t� � �
logica� device��  I� i� calle� wit� th� logica� devic� numbe� �
(wher� CON�� i� 0�� RDR� i� 1� PUN� i� 2� an� LST� i� 3� i� th� � �
Registe� an� th� physica� devic� numbe� i� th� à register��  SE�
LECԠ return� wit� th� Zer� Fla� Se� (Z� i� a� invali� selectio� �
wa� mad� (suc� a� � � � o� � � ma� devic� number)�  Example:

              MVI  B,0       ;Select CON:
              MVI  C,4       ;Physical Device 4
              CALL IOBASE+3  ;SELECT Routine
              JZ   DEVERR    ;Error Handler
              MVI  B,3       ;Select LST:
              MVI  C,2       ;Physical Device 2
              CALL IOBASE+3  ;SELECT Routine
              JZ   DEVERR    ;Error Handler


    Finally�� th� NAME� routin� i� us� t� retur� t� th� calle� � �
tex� strin� (� vecto� o� ASCI� character� terminate� b� � binar� �
0�� whic� describe� th� physica� devic� requested��  O� input�� � �
contain� th� logica� devic� numbe� an� � contain� th� physica� �
devic� numbe� (a� i� th� SELEC� routine)��  O� output�� H� point� �
t� th� strin� an� th� Zer� Fla� i� Se� (Z� i� a� invali� selec�
tio� wa� made�  Thi� returne� tex� strin� i� contain� th� mnemon�
i� nam� o� th� devic� (u� t� eigh� character� long� followe� b� � �
spac� an� an� desire� tex� whic� describe� th� attribute� o� th� �
physica� device�  Example:

              MVI  B,0       ;Select CON:
              MVI  C,2       ;Physical Device 2
              CALL IOBASE+6  ;NAMER Routine
              JZ   DEVERR    ;Error Handler
              CALL PRINT     ;Print String pted to by HL

May result in the following text being printed:

         MODEM DC Hayes Smartmodem

Not� tha� thi� conform� t� entr� � (Physica� Devic� �� i� th� �
thir� device� i� m� tabl� � coupl� o� page� back.

    T� pu� thi� al� together�� th� progra� calle� DEVICE�� i� �
provide� wit� th� ZCPR� System��  I� perform� th� followin� func�
tions:

         o Returns the Names of All Physical Devices
         o Returns the Names of only the Physical Devices
              Associated with a Particular Logical Device
         o Allows the User to Assign a Physical Device to a
              Logical Device

    T� illustrat� thi� concep� i� general�� pleas� stud�� th� �
followin� termina� session��  Thi� i� a� olde� versio� o� m� �
curren� system�� th� mai� differenc� bein� tha� m� curren� syste� �
support� redirectio� t� dis� file� a� wel� a� mos� o� th� en�
vironmen� give� i� th� followin� example.


B7>;
B7>;  This is a sample terminal session illustrating the DEVICE2
B7>;  Program and how Redirectable I/O can work under ZCPR2
B7>;
B7>device2 //
DEVICE2, Version 1.0
       DEVICE is a program which enables the user to
manipulate the extended ZCPR2 redirectable device
drivers.  It allows the user to
perform the following
functions:
               Display the Names of the Current Devices
               Set One or More of the Current Devices
       The format of the DEVICE command is:
               DEVICE                          <-- Enter Interac
               DEVICE //                       <-- Ask for Help
               DEVICE Command,Command, ...     <-- Issue Command
where "command" may take the following forms:
               DISPLAY=ALL     <-- Display Names of All Devices
               DISPLAY=CON     <-- Display Names of Consoles
               DISPLAY=LST     <-- Display Names of Printers
               DISPLAY=RDR     <-- Display Names of Readers
               DISPLAY=PUN     <-- Display Names of Punches

               CON:=name       <-- Select Console
               LST:=name       <-- Select Printer
               RDR:=name       <-- Select Reader
               PUN:=name       <-- Select Punch

B7>device2 display=all
DEVICE2, Version 1.0

CON: Devices --
       CRTREM Televideo 950 CRT Input and CRT/Remote Output
       CRTMOD Televideo 950 CRT and Modem in Parallel
       CRT Televideo 950 CRT
       TTY Model 43 Printing Terminal
 Current Assignment: CRTMOD Televideo 950 CRT and Modem in Paral

RDR: Devices --
       CLOCK DC Hayes Chronograph
       CRTMOD CRT or Modem Input with CRT Output
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
 Current Assignment: CLOCK DC Hayes Chronograph
Strike Any Key to Continue --

PUN: Devices --
       CLOCK DC Hayes Chronograph
       CRTREM CRT and Remote Computer Output
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
 Current Assignment: CLOCK DC Hayes Chronograph


LST: Devices --
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
       CRT Televideo 950 CRT
       TTY Model 43 Printing Terminal
 Current Assignment: TTY Model 43 Printing Terminal
B7>;
B7>;  Interactive Mode allows the user to repeatedly perform
B7>;  functions
B7>;
B7>device2
DEVICE2, Version 1.0
DEVICE2 Interactive Command System
Type ? and Strike RETURN for Help
DEVICE2 Command? ?
DEVICE2 Commands are of the form:
Command,Command, ...    <-- Issue Commands
where "command" may take the following forms:
               DISPLAY=ALL     <-- Display Names of All Devices
               DISPLAY=CON     <-- Display Names of Consoles
               DISPLAY=LST     <-- Display Names of Printers
               DISPLAY=RDR     <-- Display Names of Readers
               DISPLAY=PUN     <-- Display Names of Punches

               CON:=name       <-- Select Console
               LST:=name       <-- Select Printer
               RDR:=name       <-- Select Reader
               PUN:=name       <-- Select Punch

A command line beginning with a semicolon (;) is a comment.
The X Command Exits DEVICE2.

DEVICE2 Command? ;  Note that DEVICE2 commands may be abbreviated
DEVICE2 Command? display=con

CON: Devices --
       CRTREM Televideo 950 CRT Input and CRT/Remote Output
       CRTMOD Televideo 950 CRT and Modem in Parallel
       CRT Televideo 950 CRT
       TTY Model 43 Printing Terminal
 Current Assignment: CRTMOD Televideo 950 CRT and Modem in Paral
DEVICE2 Command? d=c

CON: Devices --
       CRTREM Televideo 950 CRT Input and CRT/Remote Output
       CRTMOD Televideo 950 CRT and Modem in Parallel
       CRT Televideo 950 CRT
       TTY Model 43 Printing Terminal
 Current Assignment: CRTMOD Televideo 950 CRT and Modem in Paral
DEVICE2 Command? ;  Note that DEVICE2 commands may be stacked


DEVICE2 Command? d=c,display list

CON: Devices --
       CRTREM Televideo 950 CRT Input and CRT/Remote Output
       CRTMOD Televideo 950 CRT and Modem in Parallel
       CRT Televideo 950 CRT
       TTY Model 43 Printing Terminal
 Current Assignment: CRTMOD Televideo 950 CRT and Modem in Parallel

LST: Devices --
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
       CRT Televideo 950 CRT
       TTY Model 43 Printing Terminal
 Current Assignment: TTY Model 43 Printing Terminal
DEVICE2 Command? ;  The Display command is delimited by space or =
DEVICE2 Command? ;  The assignments commands are not, however
DEVICE2 Command? d punch

PUN: Devices --
       CLOCK DC Hayes Chronograph
       CRTREM CRT and Remote Computer Output
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
 Current Assignment: CLOCK DC Hayes Chronograph
DEVICE2 Command? pun:=modem
DEVICE2 Command? d p

PUN: Devices --
       CLOCK DC Hayes Chronograph
       CRTREM CRT and Remote Computer Output
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
 Current Assignment: MODEM DC Hayes Smartmodem
DEVICE2 Command? p=crtrem,d p

PUN: Devices --
       CLOCK DC Hayes Chronograph
       CRTREM CRT and Remote Computer Output
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
 Current Assignment: CRTREM CRT and Remote Computer Output
DEVICE2 Command? punch=clock,display punch

PUN: Devices --
       CLOCK DC Hayes Chronograph
       CRTREM CRT and Remote Computer Output
       MODEM DC Hayes Smartmodem
       REMOTE Remote Computer
 Current Assignment: CLOCK DC Hayes Chronograph
DEVICE2 Command? x
B7>;
B7>;  End of Demo
B7>; �
7.4  Loading Redirectable I/O Drivers at Cold Boot Time

    Th� Col� Boo� Routin� i� th� mai� bod� o� th� BIO� initial�
ize� th� I/� packag� startin� a� IOBASE�� providin� a� initia� �
jum� tabl� an� a� initia� se� o� routines.

    Again�� i� m� system� onc� th� Col� Boo� Routin� ha� finish�
ed�� i� passe� contro� t� ZCPR2��  On� o� th� thing� i� ha� don� �
befor� i� passe� control�� however�� i� t� stor� a� initia� com�
mand� STARTUP� i� th� Multipl� Comman� Lin� Buffer�  ZCPR� start� �
up�� see� thi� comman� i� it� buffer�� an� execute� it��  Upo� �
execution�� STARTU� load� th� Multipl� Comman� Lin� Buffe� wit� � �
serie� o� commands� which� i� m� case� are:

         IOLOADER -- Load SYSIO.IO into the Redirectable I/O
                     Buffer Starting at IOBASE
         LD LD    -- Load the Named Directory LD.DIR into the
                     Memory-Based Named Directory Buffer
         TINIT    -- Program my Televideo 950 CRT with the
                     Configuration found in STD.CFG
         ECHO msg -- Print a Welcome Message to the User

    O� interes� fo� thi� discussio� i� th� functio� performe� b� �
IOLOADER��  Generall� speaking�� IOLOADE� searche� alon� th� com�
man� searc� pat� fo� � fil� containin� Redirectabl� I/Ϡ Driver� �
an� load� th� drivers�� whe� found�� int� th� buffe� startin� a� �
IOBASE�  Al� suc� file� hav� � fil� typ� o� IO� an� � ca� hav� a� �
man�� suc� set� o� I/� driver� a� � desire��  I� IOLOADE� i� no� �
give� � fil� name� i� searche� fo� SYSIO.IO� i� IOLOADE� i� give� �
� fil� name�� a� i� "IOLOADE� DISKIO"�� i� searche� fo� "file�
name.IO� (DISKIO.IO).

    Onc� IOLOADE� ha� complete� it� load�� i� call� th� drive� �
initializatio� routin� a� IOBASE+� an� return� t� ZCPR� whe� thi� �
routin� i� finished��  Th� initializatio� routin� perform� what�
eve� devic� initialization� ar� desired.

    Al� o� thes� command� ar� discusse� i� detai� i� th� User'� �
Guide��  Pleas� not� tha� thes� program� ar� stil� bein� refine� �
(prio� t� releas� o� ZCPR2)�� an� the� ma� perfor� slightl� diff�
erentl�� tha� advertise� i� thi� Concept� Manual��  Th� User'� �
Guid� identifie� th� program� tha� i� discusse� b� versio� num�
ber�� an� i� wil� b� prepare� a� th� program� ar� finalize� fo� �
release.

    Fo� muc� mor� technica� informatio� o� th� content� o� � �
Redirectabl� Devic� Drive� Package�� loo� a� th� sourc� cod� t� �
SYSIO.ASM��  Thi� i� th� sourc� t� th� standar� packag� whic� � �
us� o� m� mai� microcomputer.

















              This Page Intentionally Left Blank