home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
zcpr2
/
z2con.wq
/
Z2CON.WS
Wrap
Text File
|
1985-02-09
|
123KB
|
3,166 lines
.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∙ Utilit∙ (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